prompt large_stringlengths 72 9.34k | completion large_stringlengths 0 7.61k |
|---|---|
<|file_name|>exclude_list_dialog.py<|end_file_name|><|fim▁begin|># This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import re
from PyQt5.QtCore import Qt, pyqt... | _setupUI |
<|file_name|>exclude_list_dialog.py<|end_file_name|><|fim▁begin|># This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import re
from PyQt5.QtCore import Qt, pyqt... | show |
<|file_name|>exclude_list_dialog.py<|end_file_name|><|fim▁begin|># This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import re
from PyQt5.QtCore import Qt, pyqt... | addStringFromLineEdit |
<|file_name|>exclude_list_dialog.py<|end_file_name|><|fim▁begin|># This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import re
from PyQt5.QtCore import Qt, pyqt... | removeSelected |
<|file_name|>exclude_list_dialog.py<|end_file_name|><|fim▁begin|># This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import re
from PyQt5.QtCore import Qt, pyqt... | restoreDefaults |
<|file_name|>exclude_list_dialog.py<|end_file_name|><|fim▁begin|># This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import re
from PyQt5.QtCore import Qt, pyqt... | onTestStringButtonClicked |
<|file_name|>exclude_list_dialog.py<|end_file_name|><|fim▁begin|># This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import re
from PyQt5.QtCore import Qt, pyqt... | reset_input_style |
<|file_name|>exclude_list_dialog.py<|end_file_name|><|fim▁begin|># This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import re
from PyQt5.QtCore import Qt, pyqt... | reset_table_style |
<|file_name|>exclude_list_dialog.py<|end_file_name|><|fim▁begin|># This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import re
from PyQt5.QtCore import Qt, pyqt... | display_help_message |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | dockerfile = image.get('Dockerfile', 'Dockerfile')
name = image.get('name', None) |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
<|fim_middle|>
COMMAND_NA... | def __init__(self, config=None, **kwds) :
self.logger = logging.getLogger(type(self).__name__)
self.kwds = kwds
self.images = {}
if config is None:
config = Config()
config.update(dict(
images= [
{
'p... |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | self.logger = logging.getLogger(type(self).__name__)
self.kwds = kwds
self.images = {}
if config is None:
config = Config()
config.update(dict(
images= [
{
'path': 'docker/*',
}
... |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | pattern = pattern[name]
if isinstance(pattern, six.string_types):
return pattern
else:
match = pattern.match(path)
if match:
return match.group(name)
return None |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | try:
return self.images[image_name]
except KeyError:
self.logger.debug('image builder cache miss, try to find it')
for img_cfg in self.patterns:
for path in glob.glob(img_cfg['Dockerfile']):
found_image_name = self.get_matching_patt... |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | imgBuilder = self.images.get(imgName, None)
if imgBuilder :
return imgBuilder.buildTag()
return None |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | if isinstance(names, six.string_types):
names = [names]
def iter_buildable_deps(name):
"""
instanciates a builder for each image dependency
does nothing when the image cannot be build
"""
for dep_name, _ in self.getImage(name).image... |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | """
instanciates a builder for each image dependency
does nothing when the image cannot be build
"""
for dep_name, _ in self.getImage(name).imageDeps():
try:
self.getImage(dep_name)
yield dep_name
... |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | if tags is None:
tags = ['latest']
for image in images:
self.getImage(image).tag(client, tags, **kwds) |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | from . import addCommonOptions, commonSetUp
from .dockerfile import addDockerfileOptions
from .image import addImageOptions
try:
add = parser.add_argument
except AttributeError:
add = parser.add_option
add("image", nargs="*",
help="images to build")
add(... |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | """
Builds a list of images
"""
from . import commonSetUp
if not args:
import argparse
parser = argparse.ArgumentParser()
add_options(parser)
args = parser.parse_args(argv[1:])
import sys, os
import yaml
from docker import Client
from . import commonSe... |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | config = Config()
config.update(dict(
images= [
{
'path': 'docker/*',
}
],
)) |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | path = '.' |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | if '*' in dockerfile:
raise ValueError('Ambiguity in your configuration for %r, globbing can'
'be done either in "Dockerfile" or "path" key but not both at the'
'same time' % image)
dockerfile = os.path.join(path, docke... |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | raise ValueError('Ambiguity in your configuration for %r, globbing can'
'be done either in "Dockerfile" or "path" key but not both at the'
'same time' % image) |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | name = dockerfile |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | start = re.sub('^([^*]*/|).*', r'^\1(?P<name>.*)', dockerfile)
end = re.sub('^.*\*(?:|[^/]*)(/.*)$', r'\1$', dockerfile)
name = re.compile(start + end) |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | return pattern |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | match = pattern.match(path)
if match:
return match.group(name) |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | return match.group(name) |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | image = ImageBuilder(image_name,
contextPath=context_path,
dockerfile=path,
tagResolver=self,
**self.kwds
)
self.images[image_name] = im... |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | return imgBuilder.buildTag() |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | names = [names] |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | raise RuntimeError("dependency loop detected, %s some how depends on itself %s" %
(name, ' -> '.join(child_images + [name]))
) |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | tags = ['latest'] |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | import argparse
parser = argparse.ArgumentParser()
add_options(parser)
args = parser.parse_args(argv[1:]) |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | main() |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def <|fim_middle|>(self, con... | __init__ |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | get_matching_pattern |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | getImage |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | imageTag |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | build |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | iter_buildable_deps |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | tag |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | add_options |
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob
import fnmatch
import itertools
import logging
import os
import re
import six
import sys
import yaml
from .dockerfile import Dockerfile
from .image import ImageBuilder
from .config import Config
class Builder(object) :
def __init__(self, config=No... | main |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
<|fim▁hole|> root, dirs, files = next(os.walk(path))
return files
class Command(BaseC... |
def get_modules():
path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade') |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
def get_modules():
<|fim_middle|>
class Command(BaseCommand):
"""
Upgrades Ja... | path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade')
root, dirs, files = next(os.walk(path))
return files |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
def get_modules():
path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade')
root, ... | """
Upgrades Janeway
"""
help = "Upgrades an install from one version to another."
def add_arguments(self, parser):
"""Adds arguments to Django's management command-line parser.
:param parser: the parser to which the required arguments will be added
:return: None
"... |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
def get_modules():
path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade')
root, ... | """Adds arguments to Django's management command-line parser.
:param parser: the parser to which the required arguments will be added
:return: None
"""
parser.add_argument('--path', required=False) |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
def get_modules():
path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade')
root, ... | if not options.get('path'):
print('No upgrade selected. Available upgrade paths: ')
for file in get_modules():
module_name = file.split('.')[0]
print('- {module_name}'.format(module_name=module_name))
print('To run an upgrade use the follow... |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
def get_modules():
path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade')
root, ... | print('No upgrade selected. Available upgrade paths: ')
for file in get_modules():
module_name = file.split('.')[0]
print('- {module_name}'.format(module_name=module_name))
print('To run an upgrade use the following: `python3 manage.py run_upgrade ... |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
def get_modules():
path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade')
root, ... | translation.activate('en')
upgrade_module_name = options.get('path')
upgrade_module_path = 'utils.upgrade.{module_name}'.format(module_name=upgrade_module_name)
try:
upgrade_module = import_module(upgrade_module_path)
upgrade_module.execut... |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
def <|fim_middle|>():
path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade')
roo... | get_modules |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
def get_modules():
path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade')
root, ... | add_arguments |
<|file_name|>run_upgrade.py<|end_file_name|><|fim▁begin|>import os
from importlib import import_module
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
def get_modules():
path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade')
root, ... | handle |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | # Add some buttons
buttonrow = tk.Frame(root)
buttonrow.place(y=0,x=0) |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | camera.capture(imagefile)
image1 = Image.open(imagefile)
return image1 |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | count = 0
while (count < 9):
sleep(0.5)
image1 = newphoto()
if lastfilter is not "none":
dofilter(lastfilter,image1)
count = count + 1 |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | global image1
image1 = takephoto()
tkimage1 = ImageTk.PhotoImage(image1)
panel1.configure(image=tkimage1)
panel1.image = tkimage1 |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | global image1
image1= ImageChops.invert(image1)
tkimage1 = ImageTk.PhotoImage(image1)
panel1.configure(image=tkimage1)
panel1.image = tkimage1 |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | global image1
r, g, b = image1.split()
image1 = Image.merge("RGB", (g,g,g))
tkimage1 = ImageTk.PhotoImage(image1)
panel1.configure(image=tkimage1)
panel1.image = tkimage1 |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | lastfilter = thefilter
global image1
image1 = image1.filter(thefilter)
tkimage1 = ImageTk.PhotoImage(image1)
panel1.configure(image=tkimage1)
panel1.image = tkimage1 |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | dofilter(lastfilter,image1) |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | takephoto |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | photoloop |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | newphoto |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | invert |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | grayscale |
<|file_name|>camera_try.py<|end_file_name|><|fim▁begin|># quick demo of some python image filters
# using raspberry pi camera
import Tkinter as tk
from picamera import PiCamera
from time import sleep
from PIL import Image,ImageFilter,ImageChops,ImageTk
imagefile = "image.jpg"
w = 320
h = 240
lastfilter = "none"
camer... | dofilter |
<|file_name|>euler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from pygal import *
def listeEuler(f, x0, y0, pas, n):
x, y, L = x0, y0, []
for k in range(n):
L += [(x, y)]
x += pas
y += pas * f(x, y)
return L
def euler(f, x0, y0, xf, n):<|fim▁hole|> cour... | pas = (xf - x0) / n
courbe = XY() |
<|file_name|>euler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from pygal import *
def listeEuler(f, x0, y0, pas, n):
<|fim_middle|>
def euler(f, x0, y0, xf, n):
pas = (xf - x0) / n
courbe = XY()
courbe.title = "Methode d Euler"
courbe.add("Solution approchee", listeEuler... | x, y, L = x0, y0, []
for k in range(n):
L += [(x, y)]
x += pas
y += pas * f(x, y)
return L |
<|file_name|>euler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from pygal import *
def listeEuler(f, x0, y0, pas, n):
x, y, L = x0, y0, []
for k in range(n):
L += [(x, y)]
x += pas
y += pas * f(x, y)
return L
def euler(f, x0, y0, xf, n):
<|fim_middle|>
... | pas = (xf - x0) / n
courbe = XY()
courbe.title = "Methode d Euler"
courbe.add("Solution approchee", listeEuler(f, x0, y0, pas, n))
courbe.render_to_file("courbeEulerPython.svg") |
<|file_name|>euler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from pygal import *
def <|fim_middle|>(f, x0, y0, pas, n):
x, y, L = x0, y0, []
for k in range(n):
L += [(x, y)]
x += pas
y += pas * f(x, y)
return L
def euler(f, x0, y0, xf, n):
pas = (xf -... | listeEuler |
<|file_name|>euler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from pygal import *
def listeEuler(f, x0, y0, pas, n):
x, y, L = x0, y0, []
for k in range(n):
L += [(x, y)]
x += pas
y += pas * f(x, y)
return L
def <|fim_middle|>(f, x0, y0, xf, n):
pas = ... | euler |
<|file_name|>typegroups.py<|end_file_name|><|fim▁begin|>import array
import numbers
real_types = [numbers.Real]
int_types = [numbers.Integral]
iterable_types = [set, list, tuple, array.array]<|fim▁hole|>
try:
import numpy
except ImportError:
pass
else:
real_types.extend([numpy.float32, numpy.float64])
... | |
<|file_name|>typegroups.py<|end_file_name|><|fim▁begin|>import array
import numbers
real_types = [numbers.Real]
int_types = [numbers.Integral]
iterable_types = [set, list, tuple, array.array]
try:
import numpy
except ImportError:
pass
else:
<|fim_middle|>
# use these with isinstance to test for vari... | real_types.extend([numpy.float32, numpy.float64])
int_types.extend([numpy.int32, numpy.int64])
iterable_types.append(numpy.ndarray) |
<|file_name|>cre.locate_sample.py<|end_file_name|><|fim▁begin|>#!/hpf/largeprojects/ccmbio/naumenko/tools/bcbio/anaconda/bin/python
"""
Looks for a specific sample
"""
import re
import sys
import os
import os.path
sample = sys.argv[1]
family,sample_only = sample.split("_")
match = re.match('\d*',family)
if match:... | |
<|file_name|>cre.locate_sample.py<|end_file_name|><|fim▁begin|>#!/hpf/largeprojects/ccmbio/naumenko/tools/bcbio/anaconda/bin/python
"""
Looks for a specific sample
"""
import re
import sys
import os
import os.path
sample = sys.argv[1]
family,sample_only = sample.split("_")
match = re.match('\d*',family)
if match:... | prefix=str(int(match.group(0))/100)
report_path = prefix+'x/'+family
report=0
bam=0
errors = []
if os.path.isfile(report_path+'/'+family+'.csv'):
#print("Report exists")
report=1
else:
errors.append('Error: no report')
if os.path.isfile(report_path+'/'+sample+'.bam'):... |
<|file_name|>cre.locate_sample.py<|end_file_name|><|fim▁begin|>#!/hpf/largeprojects/ccmbio/naumenko/tools/bcbio/anaconda/bin/python
"""
Looks for a specific sample
"""
import re
import sys
import os
import os.path
sample = sys.argv[1]
family,sample_only = sample.split("_")
match = re.match('\d*',family)
if match:... | report=1 |
<|file_name|>cre.locate_sample.py<|end_file_name|><|fim▁begin|>#!/hpf/largeprojects/ccmbio/naumenko/tools/bcbio/anaconda/bin/python
"""
Looks for a specific sample
"""
import re
import sys
import os
import os.path
sample = sys.argv[1]
family,sample_only = sample.split("_")
match = re.match('\d*',family)
if match:... | errors.append('Error: no report') |
<|file_name|>cre.locate_sample.py<|end_file_name|><|fim▁begin|>#!/hpf/largeprojects/ccmbio/naumenko/tools/bcbio/anaconda/bin/python
"""
Looks for a specific sample
"""
import re
import sys
import os
import os.path
sample = sys.argv[1]
family,sample_only = sample.split("_")
match = re.match('\d*',family)
if match:... | bam=1 |
<|file_name|>cre.locate_sample.py<|end_file_name|><|fim▁begin|>#!/hpf/largeprojects/ccmbio/naumenko/tools/bcbio/anaconda/bin/python
"""
Looks for a specific sample
"""
import re
import sys
import os
import os.path
sample = sys.argv[1]
family,sample_only = sample.split("_")
match = re.match('\d*',family)
if match:... | errors.append(' ERROR: no bam') |
<|file_name|>cre.locate_sample.py<|end_file_name|><|fim▁begin|>#!/hpf/largeprojects/ccmbio/naumenko/tools/bcbio/anaconda/bin/python
"""
Looks for a specific sample
"""
import re
import sys
import os
import os.path
sample = sys.argv[1]
family,sample_only = sample.split("_")
match = re.match('\d*',family)
if match:... | print(sample+'\t'+os.getcwd()+"/"+report_path+"\t"+os.getcwd()+"/"+report_path+'/'+sample+'.bam') |
<|file_name|>cre.locate_sample.py<|end_file_name|><|fim▁begin|>#!/hpf/largeprojects/ccmbio/naumenko/tools/bcbio/anaconda/bin/python
"""
Looks for a specific sample
"""
import re
import sys
import os
import os.path
sample = sys.argv[1]
family,sample_only = sample.split("_")
match = re.match('\d*',family)
if match:... | print(sample+'\t'+' '.join(errors)) |
<|file_name|>cre.locate_sample.py<|end_file_name|><|fim▁begin|>#!/hpf/largeprojects/ccmbio/naumenko/tools/bcbio/anaconda/bin/python
"""
Looks for a specific sample
"""
import re
import sys
import os
import os.path
sample = sys.argv[1]
family,sample_only = sample.split("_")
match = re.match('\d*',family)
if match:... | print("Family ID is not starting with digital") |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | parser = ArgumentParser()
parser.add_argument("-d", "--dir", dest="myDirVariable",
help="Choose dir", metavar="DIR", required=True)
parser.add_argument("-n", metavar='N', type=int,
dest="number_of_selected_files",
help="Number of selec... |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | with open("file_for_pymol.pml", "w") as file_for_pymol:
file_for_pymol.write("""
load {s1}
load {s2}
align {s3}, {s4}
quit
""".format(s1=structure_1, s2=structure_2,
s3=os.path.splitext(structure_1)[0],
s4=os.path.splitext(struc... |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | for line in files:
line = line.rstrip()
if re.search('.pdb$', line):
#if re.search('.pdb.dat', line):
pdb_files.append(line)
#if re.search('exp.dat', line):
#print('experimental file', line)
# exp_file.append(line)
total_number_of_pdb_files ... |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | print('Parametrs ')
print('Total number of pdb files', total_number_of_pdb_files)
if total_number_of_pdb_files < args.number_of_selected_files:
print("Number od pdb files is ", total_number_of_pdb_files)
sys.exit(0)
if args.k_number_of_options > args.number_of_selected_files:
p... |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | for i in range(args.k_number_of_options):
list_of_random_items_modified[i] = adderror("exp.dat",list_of_random_items[i]+'.dat')
str1 = ''.join(str(e)+"\n" for e in list_of_random_items_modified)
str2 = ''.join(str(e)+"\n" for e in list_of_random_items)
print(str1)
print(str2)
return(str... |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | for e in list_of_random_items:
value_of_index[e] = selected_files_for_ensamble.index(e)
print(selected_files_for_ensamble.index(e))
with open("input_for_ensamble_fit", "w") as f:
f.write(strings[0]) |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | ensable_output=[None]*args.k_number_of_options
for i in range(k_number_of_options):
command = "/storage/brno3-cerit/home/krab1k/saxs-ensamble-fit/core/ensamble-fit -L -p /storage/brno2/home/petrahrozkova/SAXS/mod -n " + str(args.number_of_selected_files) + " -m /storage/brno2/home/petrahrozkova/SAXS/" ... |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | with open('result', 'r') as f:
(f.readline())
result = f.readline()
values_of_index_result = result.split(',')[4:]
return(values_of_index_result) |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | sum_rmsd = 0
values_of_index_result = ensable_output[0]
dictionary_index_and_structure = dict()
for i, j in enumerate(selected_files_for_ensamble):
dictionary_index_and_structure[i] = j
for i, j in enumerate(values_of_index_result):
f = float(j)
if f != 0:
comput... |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | pdb_files.append(line) |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | print("Number od pdb files is ", total_number_of_pdb_files)
sys.exit(0) |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | print("Number of selected structure is only", args.number_of_selected_files)
sys.exit(0) |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | print ("For q>1 is not implemented now \n")
sys.exit(0) |
<|file_name|>test_caxs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n numb... | computed_rmsd = rmsd_pymol(selected_files_for_ensamble[i],
list_of_random_items[0])
print('Adjusted rmsd ', f*computed_rmsd, '\n')
sum_rmsd += f*computed_rmsd |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.