prompt large_stringlengths 72 9.34k | completion large_stringlengths 0 7.61k |
|---|---|
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | return max(values) |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | difference = value - obj.properties['elem_width'].value
handleLeft = obj.handles[3]
handleRight = obj.handles[4]
amount = difference/2
obj.move_handle(handleLeft, (handleLeft.pos.x - amount, handleLeft.pos.y), 0, 0)
obj.move... |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | difference = value - obj.properties['elem_height'].value
handleTop = obj.handles[1]
handleBottom = obj.handles[6]
amount = difference/2
obj.move_handle(handleTop, (handleTop.pos.x, handleTop.pos.y - amount), 0, 0)
obj.move_h... |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | width = self.getValue(optWidth[0], optWidth[1], 'elem_width')
self.adjustWidth(width) |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | height = self.getValue(optHeight[0], optHeight[1], 'elem_height')
self.adjustHeight(height) |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | diagram = dia.active_display().diagram
for obj in self.group:
diagram.update_connections(obj) |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | dia.active_display().add_update_all()
dia.active_display().flush() |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | win = ResizeWindow(group, data)
win.show() |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | dia.message(gtk.MESSAGE_INFO, "Please select a group of objects") |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | __init__ |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | initWindow |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | dimensionsFrame |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | enableValueEntry |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | contentsFrameWidth |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | contentsFrameHeight |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | dialogContents |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | getSelectedGroupOption |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | getValue |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | adjustWidth |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | adjustHeight |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | toFloat |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | clickAplicar |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | show |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | hide |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | run |
<|file_name|>group_resize.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Dia Group Resize Plugin
# Copyright (c) 2015, Alexandre Machado <axmachado@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
# t... | dia_group_resize_db |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
from . import res_partner_bank<|fim▁hole|><|fim▁end|> | from . import account_bank_statement_import |
<|file_name|>sam_to_fastq.py<|end_file_name|><|fim▁begin|><|fim▁hole|> cut=line.split('\t')
if len(cut)<11: continue
print ">"+cut[0]
print cut[9]
print "+"
print cut[10]<|fim▁end|> | #!/usr/bin/env python2.7
import sys
for line in open(sys.argv[1]): |
<|file_name|>sam_to_fastq.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7
import sys
for line in open(sys.argv[1]):
cut=line.split('\t')
if len(cut)<11: <|fim_middle|>
print ">"+cut[0]
print cut[9]
print "+"
print cut[10]
<|fim▁end|> | continue |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | @home_api.route('/profiles')
def profiles():
"""Gets all profiles for all elements for user application to display and manipulate elements""" |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | """Gets all profiles for all elements for user application to display and manipulate elements"""
return jsonify(home_services.get_profiles()) |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | """Updates single element with all new values received from the user application"""
received_element = request.get_json()
home_services.update_element(received_element)
return 'OK' |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | """Updates all elements with all new values received from the user application"""
received_elements = request.get_json()
home_services.update_elements(received_elements)
return 'OK' |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | """Deletes a single element with given hid"""
element = request.get_json()
home_services.delete_element(element['hid'])
return 'OK' |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | """Adds, Updates or deletes time rule for the given element"""
rules = request.get_json()
if len(rules) == 0:
raise Exception("No elements in the list")
for rule in rules:
if 'id' not in rule:
rule['id'] = None
home_services.save_time_rules(rules)
return 'OK' |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | """Gets list of timerules for given hid"""
timerules= home_services.read_time_rules(hid)
return jsonify(timerules) |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | raise Exception("No elements in the list") |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | rule['id'] = None |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | profiles |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | update_element |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | update_elements |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | delete_element |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | timerules |
<|file_name|>home_endpoints.py<|end_file_name|><|fim▁begin|># Endpoints for user to control the home.
from datetime import datetime
from flask import Blueprint, jsonify, request
from services import elements_services, home_services
home_api = Blueprint('/home_api', __name__)
elements_services = elements_services.Ele... | get_timerules |
<|file_name|>hmm.py<|end_file_name|><|fim▁begin|>hmm = [
"https://media3.giphy.com/media/TPl5N4Ci49ZQY/giphy.gif",
"https://media0.giphy.com/media/l14qxlCgJ0zUk/giphy.gif",
"https://media4.giphy.com/media/MsWnkCVSXz73i/giphy.gif",
"https://media1.giphy.com/media/l2JJEIMLgrXPEbDGM/giphy.gif",
"https:... | ] |
<|file_name|>0005_auto__add_field_idea_color.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):<|fim▁hole|> ... | # Adding field 'Idea.color'
db.add_column(u'brainstorming_idea', 'color', |
<|file_name|>0005_auto__add_field_idea_color.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
<|fim_middle|>
<|fim▁end|> | def forwards(self, orm):
# Adding field 'Idea.color'
db.add_column(u'brainstorming_idea', 'color',
self.gf('django.db.models.fields.CharField')(default='', max_length=100, blank=True),
keep_default=False)
def backwards(self, orm):
# Deleting ... |
<|file_name|>0005_auto__add_field_idea_color.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Ad... | db.add_column(u'brainstorming_idea', 'color',
self.gf('django.db.models.fields.CharField')(default='', max_length=100, blank=True),
keep_default=False) |
<|file_name|>0005_auto__add_field_idea_color.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Ad... | db.delete_column(u'brainstorming_idea', 'color') |
<|file_name|>0005_auto__add_field_idea_color.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def <|fim_middle|>(self, orm):
... | forwards |
<|file_name|>0005_auto__add_field_idea_color.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Ad... | backwards |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | # -*- coding: utf-8 -*-
from exceptions import DropPage, AbortProcess |
<|file_name|>pretty.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | def log(level: int, x: Any) -> None:
if logging.getLogger(None).isEnabledFor(level): |
<|file_name|>pretty.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | if logging.getLogger(None).isEnabledFor(level):
for line in pprint.pformat(x).split('\n'):
logging.log(level, line) |
<|file_name|>pretty.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | log(logging.INFO, x) |
<|file_name|>pretty.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | log(logging.DEBUG, x) |
<|file_name|>pretty.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | for line in pprint.pformat(x).split('\n'):
logging.log(level, line) |
<|file_name|>pretty.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | log |
<|file_name|>pretty.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | info |
<|file_name|>pretty.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | debug |
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from quotes.models import Quote
from django.contrib import admin
class QuoteAdmin(admin.ModelAdmin):
list_display = ('message', 'name', 'program', 'class_of',<|fim▁hole|> 'submission_time')
admin.site.register(Quote, QuoteAdmin)<|fim▁end|> | |
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from quotes.models import Quote
from django.contrib import admin
class QuoteAdmin(admin.ModelAdmin):
<|fim_middle|>
admin.site.register(Quote, QuoteAdmin)
<|fim▁end|> | list_display = ('message', 'name', 'program', 'class_of',
'submission_time') |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | """
Uses OS X's OpenDirectory.framework to get the user's login shell
:param username:
A unicode string of the user to get the shell for - None for the
current user
:return:
A unicode string of the user's login shell
"""
if username is None:
username = getuser(... |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | username = getuser()
if not isinstance(username, str_cls):
username = username.decode('utf-8') |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | username = username.decode('utf-8') |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | raise TypeError('username must be a unicode string, not %s' % type_name(username)) |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | error_ref = CoreFoundation.CFErrorRef()
session = OpenDirectory.ODSessionCreate(
CoreFoundation.kCFAllocatorDefault,
None,
byref(error_ref)
)
if bool(error_ref):
raise OSError('Error!')
node = OpenDirectory.ODNodeCreateWithName(
... |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | raise OSError('Error!') |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | raise OSError('Error!') |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | raise OSError('Error!') |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | raise OSError('Error!') |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | od_record = CoreFoundation.CFArrayGetValueAtIndex(results, 0)
attributes = OpenDirectory.ODRecordCopyValues(od_record, kODAttributeTypeUserShell, byref(error_ref))
if bool(error_ref):
raise OSError('Error!')
num_attributes = CoreFoundation.CFArrayGetCount(... |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | raise OSError('Error!') |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | string_ref = CoreFoundation.CFArrayGetValueAtIndex(attributes, 0)
login_shell = cfstring_to_unicode(string_ref) |
<|file_name|>open_directory.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from getpass import getuser
import ctypes
from ctypes.util import find_library
from ctypes import c_void_p, c_uint32, POINTER, c_bool, byref
from .core_foundat... | get_user_login_shell |
<|file_name|>plano.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.forms import inlineformset_factory
from djangosige.apps.financeiro.models import PlanoContasGrupo, PlanoContasSubgrupo
class PlanoContasGrupoForm(fo... | model = PlanoContasGrupo
fields = ('tipo_grupo', 'descricao',) |
<|file_name|>plano.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.forms import inlineformset_factory
from djangosige.apps.financeiro.models import PlanoContasGrupo, PlanoContasSubgrupo
class PlanoContasGrupoForm(fo... | class Meta:
model = PlanoContasGrupo
fields = ('tipo_grupo', 'descricao',)
widgets = {
'descricao': forms.TextInput(attrs={'class': 'form-control'}),
'tipo_grupo': forms.Select(attrs={'class': 'form-control'}),
}
labels = {
'descricao': _('... |
<|file_name|>plano.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.forms import inlineformset_factory
from djangosige.apps.financeiro.models import PlanoContasGrupo, PlanoContasSubgrupo
class PlanoContasGrupoForm(fo... | model = PlanoContasGrupo
fields = ('tipo_grupo', 'descricao',)
widgets = {
'descricao': forms.TextInput(attrs={'class': 'form-control'}),
'tipo_grupo': forms.Select(attrs={'class': 'form-control'}),
}
labels = {
'descricao': _('Descrição'),
... |
<|file_name|>plano.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.forms import inlineformset_factory
from djangosige.apps.financeiro.models import PlanoContasGrupo, PlanoContasSubgrupo
class PlanoContasGrupoForm(fo... | ss Meta:
model = PlanoContasSubgrupo
fields = ('descricao',)
widgets = {
'descricao': forms.TextInput(attrs={'class': 'form-control'}),
}
labels = {
'descricao': _('Descrição'),
}
Pl |
<|file_name|>plano.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.forms import inlineformset_factory
from djangosige.apps.financeiro.models import PlanoContasGrupo, PlanoContasSubgrupo
class PlanoContasGrupoForm(fo... | el = PlanoContasSubgrupo
fields = ('descricao',)
widgets = {
'descricao': forms.TextInput(attrs={'class': 'form-control'}),
}
labels = {
'descricao': _('Descrição'),
}
Pl |
<|file_name|>para_training_local.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# setup of the grid parameters
<|fim▁hole|>
# the queue that is used solely for the final ISV training step
isv_training_queue = { 'queue':'q1wm', 'memfree':'32G', 'pe_opt':'pe_mth 4', 'hvmem':'8G' }
# number of audio files that on... | # default queue used for training
training_queue = { 'queue':'q1dm', 'memfree':'16G', 'pe_opt':'pe_mth 2', 'hvmem':'8G', 'io_big':True } |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>TESTS = {
"Level_1": [
{
"input": [1, 2, 3],
"answer": 2,
"explanation": "3-1=2"
},
{
"input": [5, -5],
"answer": 10,
"explanation": "5-(-5)=10"
},
{
... | "answer": 37.0,
"explanation": "29.0-(-8.0)"},
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
<|fim▁hole|>from plugins.dbms.maxdb.enumeration import Enumeration
from plugins.dbms.maxdb.filesystem import Filesystem
fr... | from lib.core.enums import DBMS
from lib.core.settings import MAXDB_SYSTEM_DBS
from lib.core.unescaper import unescaper |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.enums import DBMS
from lib.core.settings import MAXDB_SYSTEM_DBS
from lib.core.unescaper import unescaper
f... | """
This class defines SAP MaxDB methods
"""
def __init__(self):
self.excludeDbsList = MAXDB_SYSTEM_DBS
Syntax.__init__(self)
Fingerprint.__init__(self)
Enumeration.__init__(self)
Filesystem.__init__(self)
Miscellaneous.__init__(self)
Takeover.__... |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.enums import DBMS
from lib.core.settings import MAXDB_SYSTEM_DBS
from lib.core.unescaper import unescaper
f... | self.excludeDbsList = MAXDB_SYSTEM_DBS
Syntax.__init__(self)
Fingerprint.__init__(self)
Enumeration.__init__(self)
Filesystem.__init__(self)
Miscellaneous.__init__(self)
Takeover.__init__(self) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.enums import DBMS
from lib.core.settings import MAXDB_SYSTEM_DBS
from lib.core.unescaper import unescaper
f... | __init__ |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | @property |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
<|fim_middle|>
<|fim▁end|> | class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init__(self, package_name):
"""Query pkg-config for information about a package.
:type package_name: str
:param package_name: The name of the package to query.
:raises Pkg... |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
<|fim_middle|>
def __init__(self, package_name):
"""Query pkg-config fo... | """Raised when information could not be obtained from pkg-config.""" |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | """Query pkg-config for information about a package.
:type package_name: str
:param package_name: The name of the package to query.
:raises PkgConfig.Error: When a call to pkg-config fails.
"""
self.package_name = package_name
self._cflags = self._call("--cflags"... |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | try:
cmd = [Configuration.current.pkg_config] + list(pkg_config_args) + [self.package_name]
print("Executing command '{}'".format(cmd), file=sys.stderr)
return shlex.split(subprocess.check_output(cmd).decode('utf-8'))
except subprocess.CalledProcessError as e:
... |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | """Flags for this package in a format suitable for passing to `swiftc`.
:rtype: list[str]
"""
return (
["-Xcc {}".format(s) for s in self._cflags_only_other]
+ ["-Xlinker {}".format(s) for s in self._libs_only_other]
+ self._cflags_only_I
... |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | """CFLAGS for this package.
:rtype: list[str]
"""
return self._cflags |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | """LDFLAGS for this package.
:rtype: list[str]
"""
return self._libs |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def <|fim_m... | __init__ |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | _call |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | swiftc_flags |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | cflags |
<|file_name|>pkg_config.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import shlex
import subprocess
import sys
from .config import Configuration
class PkgConfig(object):
class Error(Exception):
"""Raised when information could not be obtained from pkg-config."""
def __init_... | ldflags |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.