blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 2 333 | src_encoding stringclasses 30
values | length_bytes int64 18 5.47M | score float64 2.52 5.81 | int_score int64 3 5 | detected_licenses listlengths 0 67 | license_type stringclasses 2
values | text stringlengths 12 5.47M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
f8b5706fcee0a1b4ad776fc01fb469df13aba231 | Python | mykola-444/video_courses_python | /PycharmProjects/examples/88888.py | UTF-8 | 279 | 3.59375 | 4 | [] | no_license | lst = [4, 5]
print(lst)
def foo(lst):
lst.append("str")
print(lst)
def foo1(lst):
lst = [1, 4, 6]
print(lst)
foo(lst)
foo1(lst)
class MyClass:
attr = 1234
def too(self):
return "Hellow world"
print(MyClass.attr)
print(MyClass.too(1))
| true |
4cfd61a7a5c36674a97297a6118d69a544f67887 | Python | mario007/renmas | /renmas3/core/film.py | UTF-8 | 4,467 | 2.53125 | 3 | [] | no_license | import platform
from .image import ImageFloatRGBA
from ..samplers import Sample
class Film:
def __init__(self, width, height, renderer):
self._image = ImageFloatRGBA(width, height)
self._height = height
self._renderer = renderer
self._ds = None
self.set_pass(0)
def set_pass(self, n):
self._current_pass = float(n)
self._inv_pass = 1.0 / (float(n) + 1.0)
self._populate_ds()
def set_resolution(self, width, height):
self._image = ImageFloatRGBA(width, height)
self._height = height
@property
def image(self):
return self._image
#TODO -- currently only box filter are suported for now
def add_sample(self, sample, spectrum):
r, g, b = self._renderer.color_mgr.to_RGB(spectrum)
if r < 0.0: r = 0.0
if g < 0.0: g = 0.0
if b < 0.0: b = 0.0
iy = self._height - sample.iy - 1 #flip the image
r1, g1, b1, a1 = self._image.get_pixel(sample.ix, iy)
scaler = self._current_pass
inv_scaler = self._inv_pass
r = (r1 * scaler + r) * inv_scaler
g = (g1 * scaler + g) * inv_scaler
b = (b1 * scaler + b) * inv_scaler
self._image.set_pixel(sample.ix, iy, r, g, b)
def add_sample_asm(self, runtimes, label):
#eax - pointer to spectrum
#ebx - pointer to sample
bits = platform.architecture()[0]
asm_structs = Sample.struct()
ASM = """
#DATA
"""
ASM += asm_structs + """
float alpha_channel[4] = 0.0, 0.0, 0.0, 0.99
uint32 height
"""
if bits == '64bit':
ASM += "uint64 ptr_buffer\n"
else:
ASM += "uint32 ptr_buffer\n"
ASM += """
uint32 pitch_buffer
uint32 mask[4] = 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00
float scaler[4]
float inv_scaler[4]
#CODE
"""
ASM += "global " + label + ":\n "
if bits == '64bit':
ASM += 'push rbx\n'
else:
ASM += 'push ebx\n'
ASM += """macro call spectrum_to_rgb
macro eq128 xmm4 = mask
macro call andps xmm0, xmm4
macro eq128 xmm0 = xmm0 + alpha_channel
macro call zero xmm5
macro call maxps xmm0, xmm5
;flip the image and call set pixel
"""
if bits == '64bit':
ASM += """
pop rbx
mov eax, dword [rbx + sample.ix]
mov ecx, dword [rbx + sample.iy]
mov ebx, dword [height] ;because of flipping image
sub ebx, ecx
mov edx, dword [pitch_buffer]
mov rsi, qword [ptr_buffer]
imul ebx, edx
imul eax, eax, 16
add eax, ebx
add rax, rsi
"""
else:
ASM += """
pop ebx
mov eax, dword [ebx + sample.ix]
mov ecx, dword [ebx + sample.iy]
mov ebx, dword [height] ;because of flipping image
sub ebx, ecx
mov edx, dword [pitch_buffer]
mov esi, dword [ptr_buffer]
imul ebx, edx
imul eax, eax, 16
add eax, ebx
add eax, esi
"""
ASM += """
macro eq128 xmm1 = eax
macro eq128 xmm1 = xmm1 * scaler + xmm0
macro eq128 xmm1 = xmm1 * inv_scaler
macro eq128 eax = xmm1 {xmm7}
ret
"""
#TODO -- put alpha channel to 0.99 after xmm1 * inv_scaler
mc = self._renderer.assembler.assemble(ASM, True)
#mc.print_machine_code()
name = "film" + str(id(self))
self._ds = []
for r in runtimes:
if not r.global_exists(label):
self._ds.append(r.load(name, mc))
self._populate_ds()
def _populate_ds(self):
if self._ds is None:
return
for ds in self._ds:
width, height = self._image.size()
ds["height"] = height - 1
scaler = self._current_pass
inv_scaler = self._inv_pass
ds["scaler"] = (scaler, scaler, scaler, 1.0)
ds["inv_scaler"] = (inv_scaler, inv_scaler, inv_scaler, 1.0)
addr, pitch = self._image.address_info()
ds["ptr_buffer"] = addr
ds["pitch_buffer"] = pitch
| true |
aa98efa08803f63acf8b439670e069cec68b606d | Python | pbu88/tb-img-generator | /tbimg.py | UTF-8 | 533 | 2.84375 | 3 | [] | no_license | from PIL import Image, ImageDraw
def build_image(background_buff, tb_buff):
background_img = Image.open(background_buff)
tb_logo = Image.open(tb_buff)
width, height = background_img.size
# creates opaque rectangle
rect = Image.new('RGBA', (width, 65))
rdraw = ImageDraw.Draw(rect);
rdraw.rectangle(((-1, -1), (width + 1, 66)), fill=(255,255,255,127), outline=(255,255,255,255))
rect.paste(tb_logo, (20, 20), mask=tb_logo)
background_img.paste(rect, (0, 0), mask=rect)
return background_img
| true |
582ad2e74e0422c566f2cdf5cf008cea21c33c37 | Python | inarazim34/homework | /data types/Find the Runner-Up Score!.py | UTF-8 | 273 | 2.90625 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
if __name__ == '__main__':
n = int(input())
arr = list(map(int, input().split()))
z = max(arr)
i=0
while(i<n):
if z ==max(arr):
arr.remove(max(arr))
i+=1
print(max(arr))
| true |
a7880fb9de06aec10cd26401fd7e3c5a27e5bc6e | Python | BenRStutzman/kattis | /Open Kattis/rationalsequence2.py | UTF-8 | 489 | 3.015625 | 3 | [] | no_license | import sys
def main():
inp = [line.split() for line in sys.stdin.read().splitlines()]
for index, frac in inp[1:]:
p, q = [int(num) for num in frac.split('/')]
binary = ''
while True:
if p > q:
p -= q
binary += '1'
elif p < q:
q -= p
binary += '0'
else:
binary += '1'
break
print(index, int(binary[::-1], 2))
main()
| true |
0cdd51b3e79794d7cc1534bc674459c31df194d0 | Python | rhyun9584/BOJ | /python/1915.py | UTF-8 | 308 | 2.6875 | 3 | [] | no_license | N, M = map(int, input().split())
board = [list(map(int, input())) for _ in range(N)]
dp = [[0] * (M+1) for _ in range(N+1)]
for i in range(1, N+1):
for j in range(1, M+1):
if board[i-1][j-1] == 1:
dp[i][j] = min(dp[i-1][j], dp[i][j-1], dp[i-1][j-1]) + 1
print(max(map(max, dp))**2) | true |
68209bb5afba7ce0d595ee94a1c7ce7201dd3627 | Python | leofanky/db | /storage.py | UTF-8 | 2,291 | 2.6875 | 3 | [] | no_license | import portalocker
import os
import struct
class Storage(object):
def __init__(self, f):
self.f = f
self.locked = False
self.ensureSuperblock()
def ensureSuperblock(self):
self.lock()
self.seekEnd()
address = self.f.tell()
if address < 2048:
self.f.write(b'\x00' * (2048 - address))
self.unlock()
def refreshSuperblock(self):
self.lock()
self.seekSuperblock()
self.f.write(b'\x00'*2048)
self.unlock()
def lock(self):
if not self.locked:
portalocker.lock(self.f, portalocker.LOCK_EX)
self.locked = True
return True
else:
return False
def unlock(self):
if self.locked:
self.f.flush()
portalocker.unlock(self.f)
self.locked = False
def seekEnd(self):
self.f.seek(0, os.SEEK_END)
def seekSuperblock(self):
self.f.seek(0)
def bytesToInteger(self, byte):
return struct.unpack("!Q", byte)[0]
def integerToBytes(self, integer):
return struct.pack("!Q", integer)
def readInteger(self):
return self.bytesToInteger(self.f.read(8))
def writeInteger(self, integer):
self.lock()
self.f.write(self.integerToBytes(integer))
def write(self, data):
self.lock()
self.seekEnd()
address = self.f.tell()
self.writeInteger(len(data))
self.f.write(data)
return address
def read(self, address):
if address:
self.f.seek(address)
length = self.readInteger()
data = self.f.read(length)
return data
else:
return b''
def updateRootAddr(self, rootaddress):
self.lock()
self.f.flush()
if rootaddress:
self.seekSuperblock()
self.writeInteger(rootaddress)
else:
self.refreshSuperblock()
self.f.flush()
self.unlock()
def getRootAddr(self):
self.seekSuperblock()
rootaddress = self.readInteger()
return rootaddress
def close(self):
self.unlock()
self.f.close()
@property
def closed(self):
return self.f.closed | true |
8e6a8891559a19e97e343d29ab30ef2776a43d9a | Python | CDAT/vcs | /tests/test_vcs_scalefont_new_to_removed.py | UTF-8 | 527 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | import vcs
import unittest
class VCSScaleFOntToRemoved(unittest.TestCase):
def testRemoveTo(self):
#canvas = vcs.init()
nto = vcs.listelements("textorientation")
nt = vcs.listelements("template")
t = vcs.createtemplate()
t.scalefont(.6)
# canvas.removeobect(t)
vcs.removeobject(t)
nto2 = vcs.listelements("textorientation")
nt2 = vcs.listelements("template")
self.assertEqual(len(nto2), len(nto))
self.assertEqual(len(nt2), len(nt))
| true |
67ad1f08a669db862bf63292cf74ee310567fb92 | Python | csalley95/COMP151 | /44.py | UTF-8 | 1,255 | 3.953125 | 4 | [] | no_license | #Gradebook
class student:
def __init__(self,firstname,lastname,id): #constructor
self.firstname = firstname
self.lastname = lastname
self.id = id
self.assignmentlist = []
def addassignment(self,assignment):
#common- error checking assignment here
self.assignmentlist.append(assignment)
def calculateaverage(self):
average = self.runningtotal() / len(self.assignmentlist)
return average
def runningtotal(self):
total = 0
for i in self.assignmentlist:
total = i + total
return total
class GradeBook:
def __init__(self):
self.studentlist = []
def addstudent(self,student):
self.studentlist.append(student)
def printtallscores(self):
for i in self.studentlist:
print(i.firstname + " " + i.lastname + " " + str(i.calculateaverage()))
tempstudent1 = student("Bob","Smith",1)
tempstudent2 = student("Jane","Doe",2)
tempstudent1.addassignment(80)
tempstudent1.addassignment(95)
tempstudent2.addassignment(85)
tempstudent2.addassignment(95)
studentgradebook = GradeBook()
studentgradebook.addstudent(tempstudent1)
studentgradebook.addstudent(tempstudent2)
studentgradebook.printtallscores() | true |
ed66faa2ec07d52620d1816ce9d7a3285f67cd7b | Python | SimonHFL/reinforce_test | /tf_test2.py | UTF-8 | 1,867 | 2.59375 | 3 | [] | no_license | import tensorflow as tf
from tensorflow.python.ops import rnn_cell
#TODO:
# get gradients for probs in first run
# then get rewards, and feed back rewards and gradients for update.
# do stateful forward function.
input_arr = [
[[1,0]],
[[0,1]],
[[1,0]],
[[1,1]],
[[1,0]],
[[1,1]],
[[1,0]],
]
input = tf.placeholder(tf.float32, shape=(None,1,2), name='input')
def forward(input):
with tf.control_dependencies(None):
weights = tf.Variable(tf.random_normal([2, 2], stddev=0.35))
out = tf.matmul(input, weights)
probs = tf.nn.sigmoid(out)[0]
prediction = tf.argmax(probs, axis=0)
prob = tf.gather(probs, prediction)
return prediction, prob
i = tf.constant(1)
total_prob = tf.constant(1, dtype=tf.float32)
while_condition = lambda i, total_prob, output, input: tf.less(i, 6)
output = tf.constant("")
def body(i, total_prob,output,input):
prediction, prob = forward(input[i,:])
#return tf.multiply(total_prob,2)
output = tf.string_join( (output, tf.as_string(prediction)))
#output = tf.add(output,tf.to_int32(prediction))
return tf.add(i,1), tf.multiply(total_prob,prob ), output, input
# do the loop:
_, prob, output, _ = tf.while_loop(while_condition, body, [i, total_prob, output, input])
#prediction, prob = forward(input)
reward = tf.placeholder(tf.float32, shape=(), name='reward')
loss = - reward * prob
optimizer = tf.train.AdamOptimizer()
train_op = optimizer.minimize(loss)
def get_reward(output):
sum = 0
for x in output.decode('UTF-8'):
sum += float(x)
return sum
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
#print(sess.run(output, {input: input_arr}))
for _ in range(10000):
out, prob_out = sess.run([output, prob], {input: input_arr})
_ = sess.run(train_op, {input: input_arr, reward:get_reward(out)})
print(out)
print(str(prob_out))
| true |
44b1dd3881d80fa763bbe6fc7422007362073c88 | Python | mkraice1/CV_Final_Project | /body_coord.py | UTF-8 | 1,217 | 3.1875 | 3 | [] | no_license | #!/usr/bin/env python
import cv2
import numpy as np
"""
This program provide functions:
body_coord: computes the location of body coordinates in image frame
position_3D: computes the 3D location of hand position in body frame,
[x, y, z] = [column_direction, row_direction_ depth]
plot_vector: plot position vector of hand in body coordinates
"""
def getCentroid(img):
(row_list, col_list) = np.where(img == 0)
centroid_row = np.sum(row_list)/(row_list.size)
centroid_col = np.sum(col_list)/(col_list.size)
return centroid_col, centroid_row
def body_coord(depth_image):
# threshold the depth image to get human shape
retval2, threshold = cv2.threshold(depth_image, 125, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
# find centroid of detected human
threshold = np.array(threshold)
body_coord_col, body_coord_row = getCentroid(threshold)
return (body_coord_col, body_coord_row)
def position_3D(point, depth, frame):
(col, row) = np.subtract(point, frame)
return (col, row, depth)
def plot_vector(img, point1, point2):
# plot a vector from point2 to point1
cv2.circle(img, point1, 5, (0,255,0), 4)
cv2.line(img, point1, point2, (0,255,0),2)
return img | true |
6e813491211d77451c31fd8cd162f21f19a5dc96 | Python | Diego-18/python-algorithmic-exercises | /7. POO/Proyecto Programacion v1.5.8/modClases.py | UTF-8 | 11,835 | 3.359375 | 3 | [] | no_license | #!usr/bin/env python
#-*-coding:UTF-8-*-
import os
"""
Junio del 2015
Universidad Politecnica Territorial de Portuguesa "Juan de Jesus Montilla"
Programa Nacional de Formacion en Informatica Seccion 232
Maria J. Carrasco C. v24.019.728
Edwin A. Betancourt T. v24.587.403
clsNombre es una clase
aNombre es un atributo
fNombre es una funcion
fbNombre es una funcion booleana
fsNombre es una funcion cadena
fiNombre es una funcion entero
pNombre es un parametro
piNombre es un parametro entero
psNombre es un parametro cadena
lsNombre es una variable cadena
liNombre es una variable entero
lfNombre es una variable flotante
"""
class clsElemento:
def __init__(self,pCed,pNom, pApe, pTel, pEmail):
self.siguiente=None
self.anterior=None
self.aCedula=pCed #Atributo-Cedula sera igual a Parametro-Ced
self.aNombre=pNom #Atributo-Nombre sera igual a Parametro-Nom
self.aApellido=pApe #Atributo-Apellido sera igual a Prametro-Ape
self.aTelefono=pTel #Atributo-Telefono sera igual a Parametro-Tel
self.aEmail=pEmail #Atributo-Email sera igual a Parametro-Email
def setElemento(self):
return self.aCedula, self.aNombre, self.aApellido, self.aTelefono, self.aEmail
"""envia o retorna los atributos Cedula, Nombre, Apellido, Telefono y Email"""
class clsLista:
def __init__(self):
self.inicio=None
self.fin=None
def fbVacia(self): #Esta funcion indica si clsLista esta vacia=Verdad o si tiene algo=Falso
if self.inicio==None:
return True
else:
return False
def fInsertar(self,pCed,pNom, pApe, pTel, pEmail): #Opcion 1 en el fiMenu (Agregar)
temporal=clsElemento(pCed,pNom, pApe, pTel, pEmail)
self.liCedula=pCed #esta linea es para que fbExiste pueda hacer la comparacion
if self.fbVacia()==True:
self.inicio=temporal
self.fin=temporal
else:
if self.fbExiste(self)==True: #si recibe TRUE es porque exsite ya la cedula
return #interrumpe el ciclo para que no haga mas nada
if self.fbExiste(self)==False:
temporal.siguiente=self.inicio
self.inicio.anterior=temporal
self.inicio=temporal
print("\n\n Datos Insertados exitosamente...")
print lsRegistro
print (" "), (temporal.setElemento())
fsContinuar()
def fbExiste(self, liCedula):
temporal=self.inicio
while temporal!=None:
if str(temporal.aCedula)==str(self.liCedula):
print ("\n\n ATENCION: Ya existe ese numero de CEDULA registrado ")
print lsRegistro, (" "), temporal.setElemento()
fsContinuar()
return True #si ya existe retorna TRUE a fInsertar para que romapa el ciclo y no inserte nada
temporal=temporal.siguiente
return False
def fListar(self): #Opcion 5 en el fiMenu (Listar)
print lsRegistro #Variable que contiene el encabezado de datos registrados
temporal=self.inicio
if self.inicio == None:
print "\n\n No hay ningun dato a mostrar, ESTA VACIO...\n Por favor seleccione la opcion 1 para agregar. "
else:
while temporal!=None:
print (" "), (temporal.setElemento())
temporal=temporal.siguiente
def fBuscar(self,pElemento): #Opcion 2 en el fiMenu (Buscar)
print("\n\n ********************* B U S C A N D O ********************")
print ("\n Cedula - Nombre - Apellido - Telefono - CorreoE \n")
temporal=self.inicio
if self.inicio == None:
print "\n\n No hay ningun dato a buscar, ESTA VACIO...\n Por favor seleccione la opcion 1 para agregar. "
fsContinuar()
else:
temporal=self.inicio
while temporal!=None:
"""dentro del WHILE se colocan tantos IF como la cantidad de atributos q se busquen como por
ejemplo en este caso el aCedula, el aNombre, aApelldo, etc.. si tuviera aEdad o cualquier
otro atributo que se buscara, color, talla etc, se coloca el IF con ese atributo solamente
y solo se cambia la primera linea, if temporal.ATRIBUTOEJEMPLO==pElemento: , es decir el
condiciona. Lo que sigue dentro del IF es solo copiar y pegar"""
if str(temporal.aCedula)==pElemento: #aCedula fue guardada como entero(integer) en la lista, por ello debe ser tranformada a cadena (string)
print (" "), temporal.setElemento() #encerrandolo enparentesis con el str, ya que pElemeto fue introducida como cadena y pueden estar escritas
#iguales y al hacer la comparacion de igualdad sera falsa si son de tipos diferentes comparando a
#pesar de que sea similar aCedula 24587403 (es de tipo entero) con pElemento 24587403 (es de tipo cadena)
if temporal.aNombre==pElemento:
print (" "), temporal.setElemento()
if temporal.aApellido==pElemento:
print (" "), temporal.setElemento()
if str(temporal.aTelefono)==(pElemento):
print (" "), temporal.setElemento()
if temporal.aEmail==pElemento:
print (" "), temporal.setElemento()
temporal=temporal.siguiente
break
print ("\n\n Se ha culminado la busqueda completamente...")
fsContinuar()
def fEliminar(self, pCI): #Opcion 3
if self.fbVacia() == True:
print "\n\n No hay ningun dato a eliminar, ESTA VACIO...\n Por favor seleccione la opcion 1 para agregar. "
fsContinuar()
else:
temporal=self.inicio
self.anterior=temporal
while temporal!= None:
if temporal.aCedula==int(pCI):
print "\n Este es su opcion a elminimar"
print (" "),temporal.setElemento()
liValidar=fbDecicion("\n Esta seguro que decea eliminar?\n Escriba su opcion: Si - No: ")
if fbCancelar(liValidar)==True:
return
if liValidar==1:
self.anterior.siguiente = temporal.siguiente
print ("\n\n **************** E L I M I N A N D O ****************")
print ("\n Cedula - Nombre - Apellido - Telefono - CorreoE \n")
print (" "),temporal.setElemento()
print("\n Persona eliminada exitosamente...")
fsContinuar()
if self.fbVacia() == True:
print "\n\n Se han eliminado todas las personas... "
fsContinuar()
return
self.anterior = temporal
temporal=temporal.siguiente
print "\n\n No existe una persona registrada con ese numero de cedula..."
fsContinuar()
def fVaciar(self): #Opcion 6 Vaciar
if self.fbVacia() == True:
print "\n\n No hay datos para vacias, ESTA VACIO...\n Por favor seleccione la opcion 1 para agregar. "
fsContinuar()
else:
temporal=self.inicio
self.anterior=temporal
lis.fListar()
liValidar=fbDecicion("\n Esta seguro que decea vaciar todos?\n Escriba su opcion: Si - No: ")
if fbCancelar(liValidar)==True:
return
if liValidar==1:
while self.inicio!= None:
self.inicio=self.inicio.siguiente #esta linea permite eliminar el unico o el ultimo que existe
self.anterior.siguiente = temporal.siguiente
if self.fbVacia() == True:
print "\n\n Todos los datos han sido eliminados exitosamente\n Esta completamente VACIO... "
fsContinuar()
return
temporal=temporal.siguiente
fsContinuar()
def fModificar(self,pCI): #Opcion 4 de fiMenuMod
if self.fbVacia()==True:
print("\n\n No hay ningun dato, ESTA VACIO...\n Por favor seleccione la opcion 1 para agregar. ")
fsContinuar()
else:
temporal=self.inicio
while temporal!=None:
if temporal.aCedula==int(pCI):
print (" "),temporal.setElemento()
fsContinuar()
liOpcionM=9
while liOpcion!=0:
liOpcionM=fiMenuMod()
if fbCancelar(liOpcionM)==True:
return
if liOpcionM==1: #Modificar Cedula
liValidar=fbDecicion(" Esta seguro que decea modificar la CEDULA?\n Escriba su opcion: Si - No: ")
if liValidar==1:
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
liCINew=fiEntero("\n Por favor introduzca la nueva CEDULA para cambiarla:\n ")
if fbCancelar(liCINew)==True:
return
temporal.aCedula=liCINew
print ("\n Se modifico la CEDULA correctamente...")
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
fsContinuar()
else:
print(" El registro no fue modificado...")
fsContinuar
elif liOpcionM==2: #Modificar Nombre
liValidar=fbDecicion(" Esta seguro que decea modificar el NOMBRE?\n Escriba su opcion: Si - No: ")
if liValidar==1:
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
lsNombreNew=fsCadena(" Por favor introduzca el nuevo NOMBRE para cambiarlo:\n ")
if fbCancelar(lsNombreNew)==True:
return
temporal.aNombre=lsNombreNew
print("\n Se modifico el NOMBRE correctamente...")
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
fsContinuar()
else:
print (" El registro no fue modificado...")
fsContinuar()
elif liOpcionM==3: #Modificar Apellido
liValidar=fbDecicion(" Esta seguro que decea modificar el APELLIDO?\n Escriba su opcion: Si - No: ")
if liValidar==1:
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
lsApellidoNew=fsCadena(" Por favor introduzca el nuevo APELLIDO para cambiarlo:\n ")
if fbCancelar(lsApellidoNew)==True:
return
temporal.aApellido=lsApellidoNew
print("\n Se modifico el APELLIDO correctamente...")
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
fsContinuar()
else:
print(" El registro no fue modificado...")
fsContinuar()
elif liOpcionM==4: #Modificar Telefono
liValidar=fbDecicion(" Esta seguro que decea modificar el TELEFONO?\n Escriba su opcion: Si - No: ")
if liValidar==1:
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
liTelefonoNew=fiEntero(" Por favor introduzca el nuevo TELEFONO para cambiarlo:\n ")
if fbCancelar(liTelefonoNew)==True:
return
temporal.aTelefono=liTelefonoNew
print ("\n Se modifico el TELEFONO correctamente...")
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
fsContinuar()
else:
print(" El registro no fue modificado...")
fsContinuar()
elif liOpcionM==5: #Modificar Email
liValidar=fbDecicion(" Esta seguro que decea modificar el CORREO ELECTRONICO?\n Escriba su opcion: Si - No: ")
if liValidar==1:
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
lsEmailNew=fsCadenaS(" Por favor introduzca el nuevo CORREO ELECTRONICO para cambiarlo:\n ")
if fbCancelar(lsEmailNew)==True:
return
temporal.aEmail=lsEmailNew
print ("\n Se modifico el CORREO ELECTRONICO correctamente...")
print lsRegistrado #Variable que contiene el encabezado de datos
print (" "),temporal.setElemento()
fsContinuar()
else:
print (" El registro no fue modificado...")
fsContinuar()
elif liOpcionM==0:
print (" Ha elegido ir al menu principal...")
fsContinuar()
return
else:
lsValido=fsCadenaS("\n\n OPCION SELECCIONADA NO VALIDA... \n Por favor introduzca su opcion del 0 al 5 ")
return
temporal=temporal.siguiente
print (" No existe una persona registrada con ese numero de cedula...")
fsContinuar()
class clsVariables:
def __init__(self):
| true |
c8c84f57a610350aaa18e900975b244e09519a32 | Python | SzymonPucher/intern-task | /solution.py | UTF-8 | 1,109 | 3.609375 | 4 | [] | no_license |
file = open("original_string.txt","r")
s = file.read()
file.close()
def find_all(a_str, sub):
start = 0
while True:
start = a_str.find(sub, start)
if start == -1: return
yield start
start += len(sub)
""" Get position of all opening and closing tags """
opening_tag, closing_tag, corrector = list(find_all(s, '<'))[1:], list(find_all(s, '>')), 0
""" Solution 1: Truncate string """
content = [s[:closing_tag[0]+1]] # first tag
for iterator in range(len(closing_tag)-1):
content.append(s[closing_tag[iterator]+1:opening_tag[iterator]]) # appending words
content.append(s[opening_tag[iterator]:closing_tag[iterator+1]+1]) # appending htmls tag
content[-2] = content[-2] + ' ...'
print(content)
file = open("truncated_string.txt","w")
for string in content:
file.write(string + '\n')
file.close()
""" Solution 2: Add ellipsis not using truncated string """
for indx in opening_tag:
s = s[:indx+corrector] + '...' + s[indx+corrector:]
corrector = corrector + 3
print(s)
file = open("string_with_ellipsis.txt","w")
file.write(s)
file.close()
| true |
f8c9845f1449681ba86256d8802240724ee85357 | Python | calltimr/self-taught | /exception_handling.py | UTF-8 | 73 | 2.9375 | 3 | [] | no_license | a=1
b=0
try:
print(a/b)
except:
print("division by zero-notice")
| true |
359678129c48afdb881c6438c0428823b8c431e1 | Python | cdzm5211314/PythonFullStack | /03.CrawlerDoc/02.数据提取与存储/03.示例-电影天堂电影爬虫01.py | UTF-8 | 1,163 | 2.796875 | 3 | [] | no_license | # -*- coding:utf-8 -*-
# @Desc :
# @Author : Administrator
# @Date : 2019-03-27 14:11
import requests
from lxml import etree
headers = {
"User-Agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36",
# "Referer":"https://www.dytt8.net/html/gndy/dyzz/list_23_1.html"
}
BASE_URL = "https://www.dytt8.net"
url = "https://www.dytt8.net/html/gndy/dyzz/list_23_1.html" # 最新电影的第一页
response = requests.get(url,headers=headers)
# print(response.text) # 抓取页面内容有乱码
# print(response.content.decode("gbk")) # 查看网页源代码,发现页面是使用gb2312编码的,所以这里使用gbk解码
htmlElement = etree.HTML(response.content.decode("gbk"))
detail_urls = htmlElement.xpath('//table[@class="tbspan"]//a/@href') # 电影详情页列表
# print(detail_urls) # ['/html/gndy/dyzz/20190320/58364.html', '/html/gndy/dyzz/20190320/58363.html']
# 遍历获取电影的详情页列表: https://www.dytt8.net
for detail_url in detail_urls:
print(BASE_URL+detail_url,len(detail_urls)) # https://www.dytt8.net/html/gndy/dyzz/20190320/58364.html 25
| true |
0f699ec452f902613c8d6aa58042764702f6ceb2 | Python | Condorcyh/COIN | /backend-coin/service/robot/ques/unit.py | UTF-8 | 10,758 | 2.78125 | 3 | [] | no_license | import io
import json
import jieba.posseg
# # 将自定义字典写入文件
# result = []
# with(open("./data/userdict.txt","r",encoding="utf-8")) as fr:
# vocablist=fr.readlines()
# for one in vocablist:
# if str(one).strip()!="":
# temp=str(one).strip()+" "+str(15)+" nr"+"\n"
# result.append(temp)
# with(open("./data/userdict2.txt","w",encoding="utf-8")) as fw:
# for one in result:
# fw.write(one)
import sys, os
from sklearn.naive_bayes import MultinomialNB
import re
import jieba
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.naive_bayes import MultinomialNB
# 获取所有的文件
def getfilelist(root_path):
file_path_list=[]
file_name=[]
walk = os.walk(root_path)
for root, dirs, files in walk:
for name in files:
filepath = os.path.join(root, name)
file_name.append(name)
file_path_list.append(filepath)
# print(file_name)
# print(file_path_list)
# print(len(file_path_list))
return file_path_list
class Question_classify():
def __init__(self):
# 读取训练数据
self.train_x,self.train_y=self.read_train_data()
# 训练模型
self.model=self.train_model_NB()
# 获取训练数据
def read_train_data(self):
train_x=[]
train_y=[]
file_list=getfilelist("service/robot/ques/data/question/") # 遍历所有文件
# 遍历所有文件
for one_file in file_list:
# 获取文件名中的数字
num = re.sub(r'\D', "", one_file) # 替换文件名字符串的非数字字符为空,即提取字符中的数字,'\D'表示非数字字符
# 如果该文件名有数字,则读取该文件
if str(num).strip()!="":
# 设置当前文件下的数据标签,即该文件内数据对应的类别标签,对应训练样本的y数据
label_num=int(num)
# 读取文件内容
with(open(one_file,"r",encoding="utf-8")) as fr:
data_list=fr.readlines()
for one_line in data_list: # 一行为一条训练样本
word_list=list(jieba.cut(str(one_line).strip()))
# 将这一行加入结果集,每条训练样本的x数据由通过空格相连的词组构成
train_x.append(" ".join(word_list))
train_y.append(label_num)
return train_x,train_y
# 训练并测试贝叶斯分类器模型-Naive Bayes
def train_model_NB(self):
X_train, y_train = self.train_x, self.train_y
self.tv = TfidfVectorizer()
train_data = self.tv.fit_transform(X_train).toarray() # tfidf向量化模型是基于全部训练数据训练得到,后续预测的时候也需要使用
clf = MultinomialNB(alpha=0.01) # 建立MultinomialNB模型
clf.fit(train_data, y_train) # 训练MultinomialNB模型
return clf
# 预测
def predict(self,question):
question=[" ".join(list(jieba.cut(question)))]
test_data=self.tv.transform(question).toarray() # 用训练号的词向量化模型,向量化输入问句
y_predict = self.model.predict(test_data)[0] # 返回概率最大的预测类别
# print("question type:",y_predict)
return y_predict
# Disable
def blockPrint():
sys.stdout = open(os.devnull, 'w')
# Restore
def enablePrint():
sys.stdout = sys.__stdout__
# blockPrint()
# enablePrint()
class Question():
def __init__(self):
# 初始化相关设置:读取词汇表,训练分类器,连接数据库
self.init_config()
def init_config(self):
# # 读取词汇表
# with(open("./data/vocabulary.txt","r",encoding="utf-8")) as fr:
# vocab_list=fr.readlines()
# vocab_dict={}
# vocablist=[]
# for one in vocab_list:
# word_id,word=str(one).strip().split(":")
# vocab_dict[str(word).strip()]=int(word_id)
# vocablist.append(str(word).strip())
# # print(vocab_dict)
# self.vocab=vocab_dict
# 训练分类器
self.classify_model=Question_classify()
# 读取问题模板
with(open("service/robot/ques/data/question/question_classification.txt","r",encoding="utf-8-sig")) as f:
question_mode_list=f.readlines()
self.question_mode_dict={}
for one_mode in question_mode_list:
# 读取一行
mode_id,mode_str=str(one_mode).strip().split(":")
# 处理一行,并存入
self.question_mode_dict[int(mode_id)]=str(mode_str).strip()
# print(self.question_mode_dict)
# 创建问题模板对象
self.questiontemplate=QuestionTemplate()
def question_process(self,question):
# 接收问题
self.raw_question=str(question).strip()
# 对问题进行词性标注
self.pos_quesiton=self.question_posseg()
# 得到问题的模板
self.question_template_id_str=self.get_question_template()
# 查询图数据库,得到答案
self.answer=self.query_template()
return(self.answer)
# 分词和词性标注
def question_posseg(self):
# 添加自定义词典
jieba.load_userdict("service/robot/ques/data/extract.txt")
# 去除无用标点符号
clean_question = re.sub("[\s+\.\!\/_,$%^*(+\"\')]+|[+——()?【】“”!,。?、~@#¥%……&*()]+","",self.raw_question)
self.clean_question=clean_question
# 分词
question_seged=jieba.posseg.cut(str(clean_question))
result=[]
question_word, question_flag = [], []
for w in question_seged:
temp_word=f"{w.word}/{w.flag}"
result.append(temp_word) # result格式为“词/词性”
# 预处理问题,为后续的预测和查询存储数据
word, flag = w.word,w.flag
question_word.append(str(word).strip()) # 删除头尾空格、/n、/t
question_flag.append(str(flag).strip())
assert len(question_flag) == len(question_word)
self.question_word = question_word
self.question_flag = question_flag
# print(result)
return result
def get_question_template(self):
# 抽象问题
for item in ['nr','ns','n','nrt','nl']:
while (item in self.question_flag):
ix=self.question_flag.index(item) # 查找相应词性的位置
self.question_word[ix]=item # 词替换为词性
self.question_flag[ix]=item+"ed" # 修改词性,表示已替换了
# 将问题转化字符串
str_question="".join(self.question_word)
# print("抽象问题为:",str_question)
# 通过分类器获取问题模板编号
question_template_num=self.classify_model.predict(str_question)
# print("使用模板编号:",question_template_num)
question_template=self.question_mode_dict[question_template_num]
# print("问题模板:",question_template)
question_template_id_str=str(question_template_num)+"\t"+question_template
return question_template_id_str
# 根据问题模板的具体类容,构造cql语句,并查询
def query_template(self):
# 调用问题模板类中的获取答案的方法
try:
answer=self.questiontemplate.get_question_answer(self.pos_quesiton,self.question_template_id_str)
except:
answer="我也还不知道!"
return answer
class QuestionTemplate():
def __init__(self):
self.q_template_dict={
0:self.get_entity_near,
1:self.get_entity_description,
2:self.get_relationship,
3:self.get_another,
4:self.get_type_node
}
def get_question_answer(self,question,template):
# 如果问题模板的格式不正确则结束
assert len(str(template).strip().split("\t"))==2
template_id,template_str=int(str(template).strip().split("\t")[0]),str(template).strip().split("\t")[1]
self.template_id=template_id
self.template_str2list=str(template_str).split()
# 预处理问题
question_word,question_flag=[],[]
for one in question:
word, flag = one.split("/")
question_word.append(str(word).strip())
question_flag.append(str(flag).strip())
assert len(question_flag)==len(question_word)
self.question_word=question_word
self.question_flag=question_flag
self.raw_question=question
# 根据问题模板来做对应的处理,获取答案
answer=self.q_template_dict[template_id]()
dict = {}
dict["AnswerType"]=template_id
dict["AnswerMember"]=answer
return dict
def get_entity_name(self):
tag_index = 0
for i in range(len(self.question_flag)):
if(self.question_flag[i].startswith('n')):
tag_index = i
break
entity_name = self.question_word[tag_index]
return entity_name
def get_entity_name_last(self):
tag_index = 0
for i in range(len(self.question_flag)):
if(self.question_flag[i].startswith('n')):
tag_index = i
if(self.question_word[i]==self.get_entity_name()):
continue
else:
break
entity_name = self.question_word[tag_index]
return entity_name
# 0:节点
def get_entity_near(self):
answer = self.get_entity_name()
list = []
list.append(answer)
return list
# 1:描述节点
def get_entity_description(self):
return self.get_entity_near()
def get_relationship(self):
start = self.get_entity_name()
end = self.get_entity_name_last()
list=[]
list.append(start)
list.append(end)
return list
def get_another(self):
return self.get_relationship()
def get_type_node(self):
return self.get_entity_near()
def ques(ask_question):
sys.stderr = io.TextIOWrapper(sys.stderr.buffer,encoding='utf-8')
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
que=Question()
# def enablePrint():
# sys.stdout = sys.__stdout__
# enablePrint()
result=que.question_process(ask_question)
print(result["AnswerType"])
list = result["AnswerMember"]
for item in list:
print(item)
if __name__ =='__main__':
ques(sys.argv[1])
| true |
ba8c78bafba574845735460f502575fae1921549 | Python | TonyWong0512/CS325-W13 | /implementation1/algorithms/tests.py | UTF-8 | 998 | 3.875 | 4 | [] | no_license | #! /usr/bin/env python
"""
Inversions
Count the number of elements in a list that are less than other elements
Example: [1, 4, 2, 5, 3]
There are 3 inversions: (4, 2), (4, 3), (2, 5)
Note: This assumes the last element in the list is the total count of
inversions
"""
from brute_force import brute_force as algo
#from naive_dc import naive_dc as algo
#from inversions_merge import merge_sort as algo
# Build a list of lists of ints, each lists last element is the number
# of inversions in that list
lists = [[int(x) for x in line.split(',')] for line in open('test_input.txt').readlines()]
a1 = [1,2,3,4,5, 0]
a2 = [1,4,2,5,3, 3]
a3 = [5,4,3,2,1, 10]
def main():
# Append the sample lists
[lists.append(a) for a in (a1,a2,a3)]
# Print inversion counts for each list
counts = [(algo(l[:-1]), l[len(l)-1]) for l in lists]
for i, j in counts:
assert i == j, "Inversion count off: i:%d, j:%d" % (i,j)
print counts
if __name__ == "__main__":
main()
| true |
47e72bc377a92577d45e8abc13eeb37974657860 | Python | wangyufeng0615/gendice | /gendice.py | UTF-8 | 313 | 2.78125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 15 17:30:15 2015
@author: Alan
"""
from PIL import Image
import random
dice_blank = Image.open('dice_blank.png') #导入空白筛子
spot = Image.open('spot.png') #导入筛子上的黑点
print(dice_blank.size)
print(spot.size)
print(2828 / 75) | true |
980bcb41e05dce8e672929fe93168328bb2a5eda | Python | sfefilatyev/python_programming_interviews | /04_primitive_types/04_02_swap_bits_v1.py | UTF-8 | 496 | 3.75 | 4 | [] | no_license | #/usr/bin/python
# Swap bits of large 64-bit number.
# Implement code that takes an input 64-bit integers and swaps bits at indices `i` and `j`
import sys
def generate_mask(i):
number = 1 << i
return number
def swap_bits(number, i, j):
mask_i = 1 << i
mask_j = 1 << j
mask = mask_i | mask_j
number = number ^ mask
return number
if __name__ == "__main__":
print("Swapped bits :")
print(swap_bits(int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3])))
| true |
69f032b2c01996a8cc55e4793adb573e076f4f8d | Python | panditdandgule/Pythonpractice | /Fibonacci.py | UTF-8 | 431 | 4.15625 | 4 | [] | no_license | # Program to display the Fibonacci sequence up to n-th term where n is provided by the user
n=int(input())
n1=0
n2=1
count=0
if n<=0:
print("Please enter a positive number")
elif n==1:
print('Fibonacci sequance upto:',n)
print(n1)
else:
print('Fibonacci sequance upto:',n)
while count<n:
print(n1,end=', ')
nth=n1+n2
n1=n2
n2=nth
count+=1
| true |
feb4334eeae94f07851544d790dceb787ae91243 | Python | jingGM/slamplanning | /src/rrt_star/main.py | UTF-8 | 1,472 | 2.671875 | 3 | [] | no_license | import numpy as np
from rrt_star.rrt.rrt_star import RRTStar
from rrt_star.search_space.search_space import SearchSpace
from rrt_star.utilities.plotting import Plot
class RRTs:
def __init__(self,
dimensions,
obstacles,
start, goal,
length_intersection,
length_edge=np.array([(8, 4)]),
max_samples=1024,
prob_goal=0.1,
rewire_count=32,
display=True):
self.start = tuple(start)
self.goal = tuple(goal)
self.map = obstacles
self.space = SearchSpace(dimensions, self.map)
self.rrt = RRTStar(self.space,
length_edge,
self.start, self.goal,
max_samples,
length_intersection,
prob_goal,
rewire_count)
self.path = [goal]
def plan(self):
self.path = self.rrt.rrt_star()
return self.path
def display(self, path=None):
if path is not None:
self.path = path
plot = Plot("rrt_star_2d")
plot.plot_tree(self.space, self.rrt.trees)
plot.plot_path(self.space, self.path)
plot.plot_obstacles(self.space, self.map)
plot.plot_start(self.space, self.start)
plot.plot_goal(self.space, self.goal)
plot.draw(auto_open=True)
| true |
b920f8a098199bb4afcb4f1a24e9dd79ff6541c7 | Python | lsd-maddrive/quetzalcoatl-project | /quetzalcoatl_software/scripts/joy_ctrl.py | UTF-8 | 2,834 | 2.71875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python3
import rospy
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Joy
from std_msgs.msg import Int8, UInt8
from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal
from time import sleep
import numpy as np
# 0 - Blue
# 1 - Green
# 2 - Red
# 3 - Yellow
# 4 - LU
# 5 - RU
# 6 - LB
# 7 - RB
# 10 - Left stick
# 11 - Right stick
button_names = [
"Blue",
"Green",
"Red",
"Yellow",
"Left upper",
"Right upper",
"Left bottom",
"Right bottom",
"_",
"_",
"Left stick",
"Right stick",
]
axes_names = [
"Lstick horz",
"Lstick vert",
"Rstick horz",
"Rstick vert",
"Btns horz",
"Btns vert",
]
def show_clicked(msg):
print("Buttons:")
for i in range(len(msg.buttons)):
if msg.buttons[i] != 0:
print("\t" + button_names[i])
print("Axes:")
for i in range(len(msg.axes)):
print("\t%s: %.2f" % (axes_names[i], msg.axes[i]))
def joy_cb(msg):
if debug_enabled:
show_clicked(msg)
angular_pos.set_relative(msg.axes[0])
linear_vel.set_relative(msg.axes[3])
class TwoDirectionVelocity:
def __init__(self, min_value, max_value, zero_point=0):
assert min_value < zero_point < max_value
self._low_ratio = zero_point - min_value
self._high_ratio = max_value - zero_point
self._zero_point = zero_point
self._velocity = 0
def set_relative(self, ratio):
ratio = np.clip(ratio, -1, 1)
if ratio < 0:
self._velocity = self._zero_point + ratio * self._low_ratio
else:
self._velocity = self._zero_point + ratio * self._high_ratio
def get_velocity(self):
return self._velocity
if __name__ == "__main__":
rospy.init_node("control_link")
debug_enabled = rospy.get_param("~debug", False)
if debug_enabled:
rospy.loginfo("Debug enabled")
command_state = Twist()
rospy.Subscriber("joy", Joy, joy_cb, queue_size=5)
cmd_pub = rospy.Publisher("cmd_vel", Twist, queue_size=5)
forward_speed_limit_mps = rospy.get_param("~speed/frwd_limit", 1)
backward_speed_limit_mps = rospy.get_param("~speed/bkwrd_limit", -1)
steer_limit_deg = rospy.get_param("~steer/limit", 25)
steer_limit_rad = np.deg2rad(steer_limit_deg)
linear_vel = TwoDirectionVelocity(
min_value=backward_speed_limit_mps, max_value=forward_speed_limit_mps
)
angular_pos = TwoDirectionVelocity(
min_value=-steer_limit_rad, max_value=steer_limit_rad
)
rospy.loginfo("Ready, go!")
rate = rospy.Rate(5)
while not rospy.is_shutdown():
command_state.linear.x = linear_vel.get_velocity()
command_state.angular.z = angular_pos.get_velocity()
cmd_pub.publish(command_state)
rate.sleep()
| true |
5e32aaff7d516defd0ad2ba271bfe6630bae5f05 | Python | DanielHennyKwon/TAX_LIM_JEONG | /소득세법시행규칙.py | UTF-8 | 317,164 | 2.5625 | 3 | [] | no_license | # -*- coding: utf-8 -*-
#Created on 2019년 @author: 권달현
조={};서문={};조문={};부칙 = {};bubname='소득세법시행규칙'
편=장=절=관=항=조={}
서문['']={}
서문['소득세법 시행규']={}
서문['[시행 2018. 4. 24] [기획재정부령 제697호, 2018. 4. 24, 일부개정']={}
서문['기획재정부(소득세제과(사업소득, 기타소득)) 044-215-421']={}
서문['기획재정부(금융세제과(이자소득, 배당소득)) 044-215-423']={}
서문['기획재정부(재산세제과(양도소득세)) 044-215-431']={}
서문['기획재정부(소득세제과(근로소득)) 044-215-421']={}
제1조_=' 제1조 (목적) '
제1조={}
제1조['소득세법시행규칙 제1조 (목적)']={}
조문['제1조 (목적)']=제1조
조['제1조 (목적)']=제1조
제1조1항_='이 규칙은 「소득세법」 및 「소득세법 시행령」에서 위임된 사항과 그 시행에 필요한 사항을 규정함을 목적으로 한다.'
제1조1항={}
제1조[제1조1항_]=제1조1항
제1조['[전문개정 2010. 4. 30.]']={}
제2조_=' 제2조 (재외동포의 일시적 입국 사유와 입증방법) '
제2조={}
제2조['소득세법시행규칙 제2조 (재외동포의 일시적 입국 사유와 입증방법)']={}
조문['제2조 (재외동포의 일시적 입국 사유와 입증방법)']=제2조
조['제2조 (재외동포의 일시적 입국 사유와 입증방법)']=제2조
제2조1항_='① 영 제4조제4항에서 "기획재정부령으로 정하는 사유"는 사업의 경영 또는 업무와 무관한 것으로서 다음 각 호의 것을 말한다.'
제2조1항={}
제2조[제2조1항_]=제2조1항
제2조1항1호_='1. 단기 관광'
제2조1항1호={}
제2조1항[제2조1항1호_]=제2조1항1호
제2조1항2호_='2. 질병의 치료'
제2조1항2호={}
제2조1항[제2조1항2호_]=제2조1항2호
제2조1항3호_='3. 병역의무의 이행'
제2조1항3호={}
제2조1항[제2조1항3호_]=제2조1항3호
제2조1항4호_='4. 그 밖에 친족 경조사 등 사업의 경영 또는 업무와 무관한 사유'
제2조1항4호={}
제2조1항[제2조1항4호_]=제2조1항4호
제2조2항_='② 영 제4조제4항에서 "기획재정부령으로 정하는 방법"이란 다음 각 호의 구분에 따른 자료로서 제1항에 따른 일시적인 입국 사유와 기간을 객관적으로 입증하는 것을 말한다.'
제2조2항={}
제2조[제2조2항_]=제2조2항
제2조2항1호_='1. 제1항제1호에 따른 단기 관광에 해당하는 경우: 관광시설 이용에 따른 입장권, 영수증 등 입국기간 동안 관광을 한 것을 입증할 수 있는 자료'
제2조2항1호={}
제2조2항[제2조2항1호_]=제2조2항1호
제2조2항2호_='2. 제1항제2호에 따른 질병의 치료에 해당하는 경우: 「의료법」 제17조에 따른 진단서, 증명서, 처방전 등 입국기간 동안 진찰이나 치료를 받은 것을 입증하는 자료'
제2조2항2호={}
제2조2항[제2조2항2호_]=제2조2항2호
제2조2항3호_='3. 제1항제3호에 따른 병역의무의 이행에 해당하는 경우: 병역사항이 기록된 주민등록초본 또는 「병역법 시행규칙」 제8조에 따른 병적증명서 등 입국기간 동안 병역의무를 이행한 것을 입증하는 자료'
제2조2항3호={}
제2조2항[제2조2항3호_]=제2조2항3호
제2조2항4호_='4. 제1항제4호에 따른 친족 경조사 등 그밖에 사업의 경영 또는 업무와 무관한 사유에 해당하는 경우: 사업의 경영 또는 업무와 무관하게 일시적으로 입국한 것을 입증하는 자료'
제2조2항4호={}
제2조2항[제2조2항4호_]=제2조2항4호
제2조['[본조신설 2016. 3. 16.]']={}
제3조_=' 제3조 (일시퇴거자의 납세지) '
제3조={}
제3조['소득세법시행규칙 제3조 (일시퇴거자의 납세지)']={}
조문['제3조 (일시퇴거자의 납세지)']=제3조
조['제3조 (일시퇴거자의 납세지)']=제3조
제3조1항_='거주자가 법 제53조제2항 및 「소득세법 시행령」(이하 "영"이라 한다) 제114조제1항에 따른 사유로 일시퇴거한 경우에는 본래의 주소지 또는 거소지를 법 제6조에 따른 납세지로 본다. <개정 2010. 4. 30.>'
제3조1항={}
제3조[제3조1항_]=제3조1항
제4조_=' 제4조 삭제 '
제4조={}
제4조['소득세법시행규칙 제4조 삭제 ']={}
조문['제4조 삭제 ']=제4조
조['제4조 삭제 ']=제4조
제5조_=' 제5조 (납세지 지정신청) '
제5조={}
제5조['소득세법시행규칙 제5조 (납세지 지정신청)']={}
조문['제5조 (납세지 지정신청)']=제5조
조['제5조 (납세지 지정신청)']=제5조
제5조1항_='영 제6조제2항에서 "기획재정부령이 정하는 경우"라 함은 다음 각 호의 어느 하나에 해당하는 경우를 말한다. <개정 1998. 8. 11., 2008. 4. 29.>'
제5조1항={}
제5조[제5조1항_]=제5조1항
제5조1항1호_='1. 삭제 <2010. 4. 30.>'
제5조1항1호={}
제5조1항[제5조1항1호_]=제5조1항1호
제5조1항2호_='2. 삭제 <2003. 4. 14.>'
제5조1항2호={}
제5조1항[제5조1항2호_]=제5조1항2호
제5조1항3호_='3. 사업장의 이동이 빈번하거나 기타의 사유로 사업장을 납세지로 지정하는 것이 적당하지 아니하다고 국세청장이 인정하는 경우'
제5조1항3호={}
제5조1항[제5조1항3호_]=제5조1항3호
제6조_=' 제6조 (농가부업소득의 계산) '
제6조={}
제6조['소득세법시행규칙 제6조 (농가부업소득의 계산)']={}
조문['제6조 (농가부업소득의 계산)']=제6조
조['제6조 (농가부업소득의 계산)']=제6조
제6조1항_='영 제9조제6항에 따른 농가부업소득의 계산은 다음 각 호의 방법에 따른다. <개정 1997. 4. 23., 2005. 3. 19., 2012. 2. 28.>'
제6조1항={}
제6조[제6조1항_]=제6조1항
제6조1항1호_='1. 영 별표 1의 농가부업규모의 축산은 가축별로 이를 적용한다. 이 경우 공동으로 축산을 영위하는 경우에는 각 사업자의 지분을 기준으로 이를 적용한다.'
제6조1항1호={}
제6조1항[제6조1항1호_]=제6조1항1호
제6조1항2호_='2. 영 제9조제1항제1호의 농가부업규모를 초과하는 사육두수에서 발생한 소득과 기타의 부업에서 발생한 소득이 있는 경우에는 이를 합산한 소득금액에 대하여 영 제9조제1항제2호를 적용한다.'
제6조1항2호={}
제6조1항[제6조1항2호_]=제6조1항2호
제6_02조_=' 제6조의2(전통주의 범위) '
제6_02조={}
제6_02조['소득세법시행규칙 제6조의2(전통주의 범위)']={}
조문['제6조의2(전통주의 범위)']=제6_02조
조['제6조의2(전통주의 범위)']=제6_02조
제6_02조1항_='영 제9조의2제2호에서 "기획재정부령이 정하는 절차"라 함은 「주세법 시행령」 제2조의2의 규정에 의한 주류심의회(대통령령 제16665호 주세법시행령에 의하여 폐지되기 전의 것을 말한다) 또는 「주류심의회 규정」에 의한 주류심의회(대통령령 제6356호 주류심의회규정에 의하여 폐지되기 전의 것을 말한다)의 심의를 거친 주류를 말한다. <개정 2005. 3. 19., 2008. 4. 29.>'
제6_02조1항={}
제6_02조[제6_02조1항_]=제6_02조1항
제6_02조['[본조신설 2004. 3. 5.]']={}
제6_02조['[종전 제6조의2는 제6조의3으로 이동 <2004. 3. 5.>]']={}
제6_03조_=' 제6조의3(승선수당) '
제6_03조={}
제6_03조['소득세법시행규칙 제6조의3(승선수당)']={}
조문['제6조의3(승선수당)']=제6_03조
조['제6조의3(승선수당)']=제6_03조
제6_03조1항_='영 제12조제10호에서 "기획재정부령이 정하는 자"란 「선원법」 제2조제3호 및 제4호에 따른 선장 및 해원을 말한다. <개정 2001. 4. 30., 2004. 3. 5., 2005. 3. 19., 2008. 4. 29., 2014. 3. 14.>'
제6_03조1항={}
제6_03조[제6_03조1항_]=제6_03조1항
제6_03조['[본조신설 1999. 5. 7.]']={}
제6_03조['[제6조의2에서 이동 <2004. 3. 5.>]']={}
제6_04조_=' 제6조의4(연구활동을 지원하는 자의 범위) '
제6_04조={}
제6_04조['소득세법시행규칙 제6조의4(연구활동을 지원하는 자의 범위)']={}
조문['제6조의4(연구활동을 지원하는 자의 범위)']=제6_04조
조['제6조의4(연구활동을 지원하는 자의 범위)']=제6_04조
제6_04조1항_='영 제12조제12호나목에서 "직접적으로 연구활동을 지원하는 자로서 기획재정부령으로 정하는 자"라 함은 「특정연구기관 육성법」의 적용을 받는 연구기관 또는 특별법에 따라 설립된 정부출연연구기관, 「지방자치단체출연 연구원의 설립 및 운영에 관한 법률」에 따라 설립된 지방자치단체출연연구원의 종사자 중 다음 각 호의 자를 제외한 자를 말한다. <개정 2008. 4. 29.>'
제6_04조1항={}
제6_04조[제6_04조1항_]=제6_04조1항
제6_04조1항1호_='1. 연구활동에 직접 종사하는 자(대학교원에 준하는 자격을 가진 자에 한한다)'
제6_04조1항1호={}
제6_04조1항[제6_04조1항1호_]=제6_04조1항1호
제6_04조1항2호_='2. 건물의 방호ㆍ유지ㆍ보수ㆍ청소 등 건물의 일상적 관리에 종사하는 자'
제6_04조1항2호={}
제6_04조1항[제6_04조1항2호_]=제6_04조1항2호
제6_04조1항3호_='3. 식사제공 및 차량의 운전에 종사하는 자'
제6_04조1항3호={}
제6_04조1항[제6_04조1항3호_]=제6_04조1항3호
제6_04조['[본조신설 2007. 4. 17.]']={}
제7조_=' 제7조 (벽지의 범위) '
제7조={}
제7조['소득세법시행규칙 제7조 (벽지의 범위)']={}
조문['제7조 (벽지의 범위)']=제7조
조['제7조 (벽지의 범위)']=제7조
제7조1항_='영 제12조제15호에서 "기획재정부령이 정하는 벽지"라 함은 다음 각 호의 어느 하나에 해당하는 지역을 말한다. <개정 1998. 3. 21., 1998. 8. 11., 1999. 5. 7., 2001. 4. 30., 2003. 4. 14., 2005. 3. 19., 2008. 4. 29.>'
제7조1항={}
제7조[제7조1항_]=제7조1항
제7조1항1호_='1. 「공무원 특수지근무수당 지급대상지역 및 기관과 그 등급별 구분에 관한 규칙」 별표 1의 지역'
제7조1항1호={}
제7조1항[제7조1항1호_]=제7조1항1호
제7조1항1_02호_='1의2. 「지방공무원 특수지근무수당 지급대상지역 및 기관과 그 등급별 구분에 관한 규칙」 별표 1의 지역'
제7조1항1_02호={}
제7조1항[제7조1항1_02호_]=제7조1항1_02호
제7조1항2호_='2. 「도서ㆍ벽지 교육진흥법 시행규칙」 별표의 지역'
제7조1항2호={}
제7조1항[제7조1항2호_]=제7조1항2호
제7조1항3호_='3. 「광업법」에 의하여 광업권을 지정받아 광구로 등록된 지역'
제7조1항3호={}
제7조1항[제7조1항3호_]=제7조1항3호
제7조1항4호_='4. 별표 1의 의료취약지역(「의료법」 제2조의 규정에 의한 의료인의 경우로 한정한다)'
제7조1항4호={}
제7조1항[제7조1항4호_]=제7조1항4호
제7조1항5호_='5. 삭제 <2001. 4. 30.>'
제7조1항5호={}
제7조1항[제7조1항5호_]=제7조1항5호
제7조['[전문개정 1997. 4. 23.]']={}
제8조_=' 제8조 (원양어업 선박, 국외등의 건설현장 등 및 외항선박 승무원 등의 범위) '
제8조={}
제8조['소득세법시행규칙 제8조 (원양어업 선박, 국외등의 건설현장 등 및 외항선박 승무원 등의 범위)']={}
조문['제8조 (원양어업 선박, 국외등의 건설현장 등 및 외항선박 승무원 등의 범위)']=제8조
조['제8조 (원양어업 선박, 국외등의 건설현장 등 및 외항선박 승무원 등의 범위)']=제8조
제8조1항_='① 영 제16조제1항제1호에 따른 원양어업 선박은 「원양산업발전법」에 따라 허가를 받은 원양어업용인 선박을 말한다.'
제8조1항={}
제8조[제8조1항_]=제8조1항
제8조2항_='② 영 제16조제1항제1호에 따른 국외등의 건설현장 등은 국외등의 건설공사 현장과 그 건설공사를 위하여 필요한 장비 및 기자재의 구매, 통관, 운반, 보관, 유지ㆍ보수 등이 이루어지는 장소를 포함한다.'
제8조2항={}
제8조[제8조2항_]=제8조2항
제8조3항_='③ 영 제16조제3항을 적용할 때 외국을 항행하는 기간에는 해당 선박이나 항공기가 화물의 적재ㆍ하역, 그 밖의 사유로 국내에 일시적으로 체재하는 기간을 포함한다.'
제8조3항={}
제8조[제8조3항_]=제8조3항
제8조4항_='④ 영 제16조제3항에 따른 승무원은 제1항의 원양어업 선박에 승선하여 근로를 제공하는 자 및 외국을 항행하는 선박 또는 항공기에서 근로를 제공하는 자로서 다음 각 호의 어느 하나에 해당하는 자를 포함한다.'
제8조4항={}
제8조[제8조4항_]=제8조4항
제8조4항1호_='1. 해당 선박에 전속되어 있는 의사 및 그 보조원'
제8조4항1호={}
제8조4항[제8조4항1호_]=제8조4항1호
제8조4항2호_='2. 해외기지조업을 하는 원양어업의 경우에는 현장에 주재하는 선박수리공 및 그 사무원'
제8조4항2호={}
제8조4항[제8조4항2호_]=제8조4항2호
제8조['[전문개정 2010. 4. 30.]']={}
제9조_=' 제9조 (생산 및 그 관련직에 종사하는 근로자의 범위) '
제9조={}
제9조['소득세법시행규칙 제9조 (생산 및 그 관련직에 종사하는 근로자의 범위)']={}
조문['제9조 (생산 및 그 관련직에 종사하는 근로자의 범위)']=제9조
조['제9조 (생산 및 그 관련직에 종사하는 근로자의 범위)']=제9조
제9조1항_='①영 제17조제1항제1호 및 제3호에서 "기획재정부령이 정하는 자"라 함은 별표 2에 규정된 직종에 종사하는 근로자를 말한다. <개정 1998. 8. 11., 2001. 4. 30., 2003. 7. 12., 2008. 4. 29.>'
제9조1항={}
제9조[제9조1항_]=제9조1항
제9조2항_='②영 제17조제1항제2호에서 "기획재정부령이 정하는 자"란 어선에 승무하는 선원으로 하되, 「선원법」 제2조제3호에 따른 선장은 포함하지 아니한다. <개정 1998. 8. 11., 2001. 4. 30., 2005. 3. 19., 2008. 4. 29., 2014. 3. 14.>'
제9조2항={}
제9조[제9조2항_]=제9조2항
제9조3항_='③ 영 제17조제1항제4호 각 목 외의 부분에서 "기획재정부령으로 정하는 자"란 별표 2의2에 규정된 직종에 종사하는 근로자를 말한다. <신설 2018. 3. 21.>'
제9조3항={}
제9조[제9조3항_]=제9조3항
제9조4항_='④ 영 제17조제1항제4호나목을 적용할 때 사업소득에 대한 소득세 과세표준은 해당 과세연도의 종합소득세 과세표준에 종합소득금액을 사업소득금액으로 나눈 비율을 곱하여 계산한다. <신설 2018. 3. 21.>'
제9조4항={}
제9조[제9조4항_]=제9조4항
제10조_=' 제10조 (비과세소득의 범위) '
제10조={}
제10조['소득세법시행규칙 제10조 (비과세소득의 범위)']={}
조문['제10조 (비과세소득의 범위)']=제10조
조['제10조 (비과세소득의 범위)']=제10조
제10조1항_='①사업자가 그 종업원에게 지급한 경조금중 사회통념상 타당하다고 인정되는 범위내의 금액은 이를 지급받은 자의 근로소득으로 보지 아니한다.'
제10조1항={}
제10조[제10조1항_]=제10조1항
제10조2항_='② 삭제 <2010. 4. 30.>'
제10조2항={}
제10조[제10조2항_]=제10조2항
제10_02조_=' 제10조의2(사택을 제공받아 얻는 이익의 범위) '
제10_02조={}
제10_02조['소득세법시행규칙 제10조의2(사택을 제공받아 얻는 이익의 범위)']={}
조문['제10조의2(사택을 제공받아 얻는 이익의 범위)']=제10_02조
조['제10조의2(사택을 제공받아 얻는 이익의 범위)']=제10_02조
제10_02조1항_='법 제12조제5호아목5)에서 "기획재정부령으로 정하는 사택"이란 종교단체가 소유한 것으로서 「통계법」 제22조에 따라 작성된 한국표준직업분류에 따른 종교관련종사자(이하 이 조에서 "종교관련종사자"라 한다)에게 무상 또는 저가로 제공하는 주택이나, 종교단체가 직접 임차한 것으로서 종교관련종사자에게 무상으로 제공하는 주택을 말한다.'
제10_02조1항={}
제10_02조[제10_02조1항_]=제10_02조1항
제10_02조['[본조신설 2016. 3. 16.]']={}
제11조_=' 제11조 (일용근로자의 범위) '
제11조={}
제11조['소득세법시행규칙 제11조 (일용근로자의 범위)']={}
조문['제11조 (일용근로자의 범위)']=제11조
조['제11조 (일용근로자의 범위)']=제11조
제11조1항_='영 제20조제1호 각목 및 동조제2호 각목의 근로자가 근로계약에 따라 일정한 고용주에게 3월(영 제20조제1호 가목의 경우에는 1년으로 한다)이상 계속하여 고용되어 있지 아니하고 근로단체를 통하여 여러 고용주의 사용인으로 취업하는 경우에는 이를 일용근로자로 본다.'
제11조1항={}
제11조[제11조1항_]=제11조1항
제11_02조_=' 제11조의2(요양에 따른 연금계좌 인출금액 등) '
제11_02조={}
제11_02조['소득세법시행규칙 제11조의2(요양에 따른 연금계좌 인출금액 등)']={}
조문['제11조의2(요양에 따른 연금계좌 인출금액 등)']=제11_02조
조['제11조의2(요양에 따른 연금계좌 인출금액 등)']=제11_02조
제11_02조1항_='① 영 제20조의2제2항에서 "기획재정부령으로 정하는 금액"이란 다음 각 호의 금액의 합계액을 말한다.'
제11_02조1항={}
제11_02조[제11_02조1항_]=제11_02조1항
제11_02조1항1호_='1. 영 제20조의2제1항제1호다목의 사유로 지출하는 다음 각 목의 금액의 합계액'
제11_02조1항1호={}
제11_02조1항[제11_02조1항1호_]=제11_02조1항1호
제11_02조1항1호가목_='가. 영 제118조의5제1항 및 제2항에 따른 의료비와 간병인 비용'
제11_02조1항1호가목={}
제11_02조1항1호[제11_02조1항1호가목_]=제11_02조1항1호가목
제11_02조1항1호나목_='나. 법 제20조의3제1항제2호에 따른 연금계좌(이하 "연금계좌"라 한다) 가입자 본인의 휴직 또는 휴업 월수(1개월 미만의 기간이 있는 경우에는 이를 1개월로 본다) × 150만원'
제11_02조1항1호나목={}
제11_02조1항1호[제11_02조1항1호나목_]=제11_02조1항1호나목
제11_02조1항2호_='2. 200만원'
제11_02조1항2호={}
제11_02조1항[제11_02조1항2호_]=제11_02조1항2호
제11_02조2항_='② 연금계좌 가입자가 영 제20조의2제1항제1호다목의 사유로 연금계좌에서 인출하는 때에는 다음 각 호의 증명 서류를 연금계좌취급자에게 제출하여야 한다.'
제11_02조2항={}
제11_02조[제11_02조2항_]=제11_02조2항
제11_02조2항1호_='1. 진단서 등 요양기간이 3개월 이상임을 증명하는 서류'
제11_02조2항1호={}
제11_02조2항[제11_02조2항1호_]=제11_02조2항1호
제11_02조2항2호_='2. 다음 각 목의 구분에 따른 증명 서류'
제11_02조2항2호={}
제11_02조2항[제11_02조2항2호_]=제11_02조2항2호
제11_02조2항2호가목_='가. 제1항제1호가목의 금액: 제58조제1항제2호 후단에 따른 의료비영수증과 간병인의 이름ㆍ생년월일 등 인적사항이 기재된 간병료 영수증'
제11_02조2항2호가목={}
제11_02조2항2호[제11_02조2항2호가목_]=제11_02조2항2호가목
제11_02조2항2호나목_='나. 제1항제1호나목의 금액: 휴직 또는 휴업 사실을 증명하는 서류'
제11_02조2항2호나목={}
제11_02조2항2호[제11_02조2항2호나목_]=제11_02조2항2호나목
제11_02조['[본조신설 2015. 3. 13.]']={}
제11_03조_=' 제11조의3(의료비인출 증명서류 및 의료비연금계좌의 지정 절차 등) '
제11_03조={}
제11_03조['소득세법시행규칙 제11조의3(의료비인출 증명서류 및 의료비연금계좌의 지정 절차 등)']={}
조문['제11조의3(의료비인출 증명서류 및 의료비연금계좌의 지정 절차 등)']=제11_03조
조['제11조의3(의료비인출 증명서류 및 의료비연금계좌의 지정 절차 등)']=제11_03조
제11_03조1항_='① 영 제20조의2제1항제2호에서 "기획재정부령으로 정하는 증명서류"란 별지 제3호의4서식의 의료비인출 신청서 및 제58조제1항제2호 후단에 따른 의료비영수증을 말한다.'
제11_03조1항={}
제11_03조[제11_03조1항_]=제11_03조1항
제11_03조2항_='② 영 제20조의2제3항에 따라 연금계좌 가입자가 연금계좌를 영 제20조의2제3항에 따른 의료비연금계좌(이하 "의료비연금계좌"라 한다)로 지정하려는 경우 해당 연금계좌의 연금계좌취급자(이하 "연금계좌취급자"라 한다)는 해당 연금계좌를 의료비연금계좌로 지정하는 것에 동의하기 전에 그 연금계좌 외에 해당 연금계좌 가입자의 의료비연금계좌로 지정된 연금계좌가 없는지를 확인하여야 한다.'
제11_03조2항={}
제11_03조[제11_03조2항_]=제11_03조2항
제11_03조3항_='③ 연금계좌 가입자가 연금계좌를 의료비연금계좌로 지정한 날(이하 이 항에서 "의료비연금계좌 지정일"이라 한다) 전에 지급한 의료비를 영 제20조의2제1항제2호에 따라 의료비연금계좌에서 인출하려는 경우 연금계좌취급자는 해당 인출 전에 그 연금계좌 가입자가 의료비연금계좌 지정일 전에 해당 의료비연금계좌 외의 의료비연금계좌에서 그 의료비를 인출하지 아니하였는지를 확인하여야 한다.'
제11_03조3항={}
제11_03조[제11_03조3항_]=제11_03조3항
제11_03조['[본조신설 2015. 3. 13.]']={}
제12조_=' 제12조 (환매조건부 매매의 범위등) '
제12조={}
제12조['소득세법시행규칙 제12조 (환매조건부 매매의 범위등)']={}
조문['제12조 (환매조건부 매매의 범위등)']=제12조
조['제12조 (환매조건부 매매의 범위등)']=제12조
제12조1항_='① 삭제 <1996. 3. 30.>'
제12조1항={}
제12조[제12조1항_]=제12조1항
제12조2항_='②영 제24조에서 "사전약정이율을 적용하여 환매수 또는 환매도하는 조건"이라 함은 거래의 형식 여하에 불구하고 환매수 또는 환매도하는 경우에 당해채권 또는 증권의 시장가격에 의하지 아니하고 사전에 정하여진 이율에 의하여 결정된 가격으로 환매수 또는 환매도하는 조건을 말한다.'
제12조2항={}
제12조[제12조2항_]=제12조2항
제12_02조_=' 제12조의2(저축성보험의 보험료 합계액 계산 등) '
제12_02조={}
제12_02조['소득세법시행규칙 제12조의2(저축성보험의 보험료 합계액 계산 등)']={}
조문['제12조의2(저축성보험의 보험료 합계액 계산 등)']=제12_02조
조['제12조의2(저축성보험의 보험료 합계액 계산 등)']=제12_02조
제12_02조1항_='① 영 제25조제3항제2호다목에서 "기획재정부령으로 정하는 것"이란 다음 각 호의 요건을 모두 갖춘 보험계약을 말한다.'
제12_02조1항={}
제12_02조[제12_02조1항_]=제12_02조1항
제12_02조1항1호_='1. 저축을 목적으로 하지 아니하고 피보험자의 사망ㆍ질병ㆍ부상, 그 밖의 신체상의 상해나 자산의 멸실 또는 손괴만을 보장하는 계약일 것'
제12_02조1항1호={}
제12_02조1항[제12_02조1항1호_]=제12_02조1항1호
제12_02조1항2호_='2. 만기 또는 보험 계약기간 중 특정시점에서의 생존을 사유로 지급하는 보험금ㆍ공제금이 없을 것'
제12_02조1항2호={}
제12_02조1항[제12_02조1항2호_]=제12_02조1항2호
제12_02조2항_='②영 제25조제3항제2호다목에서 "기획재정부령으로 정하는 방식에 따라 계산한 합계액"이란 계약자가 가입한 모든 월적립식 보험계약의 같은 조 제1항에 따른 보험료(피보험자의 사망ㆍ질병ㆍ부상, 그 밖의 신체상의 상해나 자산의 멸실 또는 손괴를 보장하기 위한 특약에 따라 납입하는 보험료 및 「상법」 제650조의2에 따른 보험계약의 부활을 위하여 납입하는 보험료는 제외하되, 납입기간이 종료되었으나 계약기간 중에 있는 보험계약의 기본보험료를 포함한다. 이하 이 조에서 "보험료"라 한다)를 기준으로 다음 계산식에 따라 계산한 금액을 말한다.'
제12_02조2항={}
제12_02조[제12_02조2항_]=제12_02조2항
제12_02조['']={}
제12_02조3항_='③ 영 제25조제6항에 따라 보험계약을 변경하는 경우 같은 조 제3항제1호 및 같은 항 제2호다목에 따른 보험료 합계액의 계산방법은 다음 각 호의 구분에 따른다. 이 경우 같은 조 제6항제1호에 해당하는 변경이 있을 때에는 변경된 계약자의 보험료 합계액으로 계산한다.'
제12_02조3항={}
제12_02조[제12_02조3항_]=제12_02조3항
제12_02조3항1호_='1. 2017년 4월 1일부터 체결하는 영 제25조제3항제2호에 해당하는 보험으로서 계약변경 이후에도 같은 호 가목 및 나목의 요건을 충족하는 보험의 경우에는 계약변경 이후 보험료를 기준으로 같은 조 제2항에 따라 계산한 금액을 영 제25조제3항제2호다목의 보험료 합계액에 포함한다.'
제12_02조3항1호={}
제12_02조3항[제12_02조3항1호_]=제12_02조3항1호
제12_02조3항2호_='2. 2017년 4월 1일부터 체결하는 제1호에 해당하지 아니하는 보험의 경우에는 계약변경 전 납입한 보험료 및 계약변경 이후 납입하는 보험료의 합계액을 영 제25조제3항제1호의 보험료 합계액에 포함한다.'
제12_02조3항2호={}
제12_02조3항[제12_02조3항2호_]=제12_02조3항2호
제12_02조3항3호_='3. 2013년 2월 15일부터 2017년 3월 31일까지 체결하는 영 제25조제3항제1호에 해당하는 보험의 경우에는 계약변경 전 납입한 보험료 및 계약변경 이후 납입하는 보험료의 합계액을 영 제25조제3항제1호의 보험료 합계액(같은 호 가목의 금액을 기준으로 한 합계액을 말한다)에 포함한다.'
제12_02조3항3호={}
제12_02조3항[제12_02조3항3호_]=제12_02조3항3호
제12_02조3항4호_='4. 제1호부터 제3호까지에 해당하지 아니하는 경우에는 계약변경 전 납입한 보험료 및 계약변경 이후 납입하는 보험료 모두 영 제25조제3항제1호 및 같은 항 제2호다목의 보험료 합계액에서 제외한다.'
제12_02조3항4호={}
제12_02조3항[제12_02조3항4호_]=제12_02조3항4호
제12_02조['[본조신설 2017. 3. 10.]']={}
제13조_=' 제13조 (집합투자기구로부터의 이익에 대한 과세표준 계산방식 등) '
제13조={}
제13조['소득세법시행규칙 제13조 (집합투자기구로부터의 이익에 대한 과세표준 계산방식 등)']={}
조문['제13조 (집합투자기구로부터의 이익에 대한 과세표준 계산방식 등)']=제13조
조['제13조 (집합투자기구로부터의 이익에 대한 과세표준 계산방식 등)']=제13조
제13조1항_='① 「자본시장과 금융투자업에 관한 법률」에 따른 집합투자기구(이하 "집합투자기구"라 한다)의 결산에 따라 영 제26조의2에 따른 집합투자기구로부터의 이익을 분배받는 경우 투자자가 보유하는 「자본시장과 금융투자업에 관한 법률」에 따른 집합투자증권(이하 "집합투자증권"이라 한다)의 좌당 또는 주당 배당소득금액(이하 이 조에서 "좌당 배당소득금액"이라 한다)은 다음 각 호의 금액으로 한다. <개정 2011. 3. 28.>'
제13조1항={}
제13조[제13조1항_]=제13조1항
제13조1항1호_='1. 영 제26조의2제5항제3호 또는 제4호에 해당하는 집합투자증권: 집합투자기구가 투자자에게 좌당 또는 주당 분배하는 금액(영 제26조의2제4항 각 호 외의 부분 본문에 따라 집합투자기구로부터의 이익에 포함되지 아니하는 손익은 제외한다)'
제13조1항1호={}
제13조1항[제13조1항1호_]=제13조1항1호
제13조1항2호_='2. 제1호 외의 집합투자증권: 집합투자증권의 결산 시 과세표준기준가격(「자본시장과 금융투자업에 관한 법률」 제238조제6항에 따른 기준가격에서 영 제26조의2제4항 각 호 외의 부분 본문에 따라 집합투자기구로부터의 이익에 포함되지 아니하는 손익을 제외하여 산정한 금액을 말하며, 같은 법 제279조제1항에 따른 외국 집합투자증권으로서 과세표준기준가격이 없는 경우에는 같은 법 제280조제4항 본문에 따른 기준가격을 말한다. 이하 이 조에서 같다)에서 매수 시(매수 후 결산ㆍ분배가 있었던 경우에는 직전 결산ㆍ분배 직후를 말한다) 과세표준기준가격을 뺀 후 직전 결산ㆍ분배 시 발생한 과세되지 아니한 투자자별 손익을 더하거나 뺀 금액. 이 경우 영 제26조의2에 따른 집합투자기구로부터의 이익으로서 집합투자기구가 투자자에게 분배하는 금액을 한도로 한다.'
제13조1항2호={}
제13조1항[제13조1항2호_]=제13조1항2호
제13조2항_='② 집합투자증권의 환매 및 매도 또는 집합투자기구의 해지 및 해산(이하 이 조에서 "환매등"이라 한다)을 통하여 집합투자기구로부터의 이익을 받는 경우 집합투자증권의 좌당 배당소득금액은 다음 각 호의 금액으로 한다. <개정 2011. 3. 28.>'
제13조2항={}
제13조[제13조2항_]=제13조2항
제13조2항1호_='1. 영 제26조의2제5항제3호 또는 제4호에 해당하는 집합투자증권: 환매등(집합투자증권의 매도는 제외한다)이 발생하는 시점의 과세표준기준가격에서 직전 결산ㆍ분배 직후의 과세표준기준가격(최초 설정 또는 설립 후 결산ㆍ분배가 없었던 경우에는 최초 설정 또는 설립 시 과세표준기준가격을 말한다)을 뺀 금액'
제13조2항1호={}
제13조2항[제13조2항1호_]=제13조2항1호
제13조2항2호_='2. 제1호 외의 집합투자증권: 환매등이 발생하는 시점의 과세표준기준가격에서 매수 시(매수 후 결산ㆍ분배가 있었던 경우에는 직전 결산ㆍ분배 직후를 말한다) 과세표준기준가격을 뺀 후 직전 결산ㆍ분배 시 발생한 과세되지 아니한 투자자별 손익을 더하거나 뺀 금액'
제13조2항2호={}
제13조2항[제13조2항2호_]=제13조2항2호
제13조3항_='③ 증권시장에 상장된 집합투자증권(영 제26조의2제5항제3호 또는 제4호에 해당하는 집합투자증권은 제외한다)을 증권시장에서 매도하는 경우의 좌당 배당소득금액은 제2항제2호에도 불구하고 같은 호에 따라 계산된 금액과 매수ㆍ매도 시의 과세표준기준가격을 실제 매수ㆍ매도가격으로 하여 같은 호에 따라 계산된 금액 중 적은 금액으로 한다. <개정 2011. 3. 28.>'
제13조3항={}
제13조[제13조3항_]=제13조3항
제13조4항_='④투자자별 배당소득금액은 다음 계산식에 따라 계산한 금액으로 한다. <개정 2012. 2. 28.>'
제13조4항={}
제13조[제13조4항_]=제13조4항
제13조['']={}
제13조5항_='⑤ 제4항을 적용할 때 같은 계좌 내에서 같은 집합투자증권을 2회 이상 매수한 경우 매수 시의 과세표준기준가격은 선입선출법에 따라 산정하고, 투자자별 배당소득금액은 같은 시점에서 결산ㆍ분배 또는 환매등이 발생하는 집합투자증권 전체를 하나의 과세단위로 하여 계산한다.'
제13조5항={}
제13조[제13조5항_]=제13조5항
제13조6항_='⑥ 같은 계좌 내에서 같은 상장지수집합투자증권(「자본시장과 금융투자업에 관한 법률」에 따른 상장지수집합투자기구의 집합투자증권을 말하며, 이하 이 조에서 "상장지수집합투자증권"이라 한다)을 증권시장에서 2회 이상 매수한 경우 매수 시의 과세표준기준가격은 제5항에도 불구하고 이동평균법에 따라 산정하고, 투자자별 배당소득금액은 같은 시점에서 결산ㆍ분배 또는 환매등이 발생하는 상장지수집합투자증권 전체를 하나의 과세단위로 하여 계산한다. 다만, 같은 날 매도되는 상장지수집합투자증권은 전체를 하나의 과세단위로 하여 투자자별 배당소득금액을 계산한다.'
제13조6항={}
제13조[제13조6항_]=제13조6항
제13조7항_='⑦ 영 제26조의2제1항제2호나목에 따른 집합투자재산의 평가이익은 집합투자재산으로 인식되지만 실제로 귀속되지 아니한 이익으로서 이미 경과한 기간에 대응하는 집합투자재산의 이자, 미수 배당금, 미수 임대료 수입 등을 포함한다.'
제13조7항={}
제13조[제13조7항_]=제13조7항
제13조8항_='⑧ 제5항 및 제6항에서 사용하는 용어의 뜻은 다음과 같다.'
제13조8항={}
제13조[제13조8항_]=제13조8항
제13조8항1호_='1. "선입선출법"이란 먼저 매수한 집합투자증권부터 차례대로 환매등이 발생하는 것으로 보아 집합투자증권의 좌당 또는 주당 과세표준기준가격을 산정하는 방법을 말한다.'
제13조8항1호={}
제13조8항[제13조8항1호_]=제13조8항1호
제13조8항2호_='2. "이동평균법"이란 집합투자증권을 매수할 때마다 집합투자증권의 과세표준기준가격의 합계액을 집합투자증권의 좌수 또는 주수의 합계액으로 나누는 방법으로 좌당 또는 주당 평균 과세표준기준가격을 산출하고 그 중 가장 나중에 산출된 평균 과세표준기준가격에 따라 집합투자증권의 좌당 또는 주당 과세표준기준가격을 산정하는 방법을 말한다.'
제13조8항2호={}
제13조8항[제13조8항2호_]=제13조8항2호
제13조['[본조신설 2010. 4. 30.]']={}
제14조_=' 제14조 (상장지수증권으로부터의 이익에 대한 과세표준 계산방식 등) '
제14조={}
제14조['소득세법시행규칙 제14조 (상장지수증권으로부터의 이익에 대한 과세표준 계산방식 등)']={}
조문['제14조 (상장지수증권으로부터의 이익에 대한 과세표준 계산방식 등)']=제14조
조['제14조 (상장지수증권으로부터의 이익에 대한 과세표준 계산방식 등)']=제14조
제14조1항_='① 영 제26조의3제1항제2호 본문에 따른 상장지수증권(이하 "상장지수증권"이라 한다)으로부터의 이익을 분배받는 경우 투자자가 보유하는 상장지수증권의 증권당 배당소득금액(이하 이 조에서 "증권당 배당소득금액"이라 한다)은 다음 각 호의 구분에 따른 금액으로 한다. <개정 2018. 3. 21.>'
제14조1항={}
제14조[제14조1항_]=제14조1항
제14조1항1호_='1. 영 제26조의3제1항제2호 단서에 따라 증권시장에서 거래되는 주식의 가격만을 기반으로 하는 지수의 변화를 그대로 추적하는 것을 목적으로 하는 상장지수증권: 상장지수증권을 발행하는 자가 투자자에게 증권당 분배하는 금액(영 제26조의2제4항 각 호의 증권 또는 장내파생상품의 평가로 발생한 손익은 제외한다)'
제14조1항1호={}
제14조1항[제14조1항1호_]=제14조1항1호
제14조1항2호_='2. 제1호 외의 상장지수증권: 상장지수증권의 분배 시 과세표준기준가격(상장지수증권의 기초자산을 구성하는 가격ㆍ이자율ㆍ지표ㆍ단위 또는 이를 기초로 하는 지수 등의 증권당 평가금액에서 영 제26조의2제4항 각 호의 증권 또는 장내파생상품의 평가로 발생한 손익을 제외하여 산정한 금액을 말한다. 이하 이 조에서 같다)에서 매수 시 과세표준기준가격을 뺀 후 직전 분배 시 발생한 과세되지 아니한 투자자별 손익을 더하거나 뺀 금액. 이 경우 상장지수증권으로부터의 이익으로서 상장지수증권을 발행한 자가 투자자에게 분배하는 금액을 한도로 한다.'
제14조1항2호={}
제14조1항[제14조1항2호_]=제14조1항2호
제14조2항_='② 상장지수증권의 환매 및 매도 또는 상장폐지(이하 이 조에서 "환매 등"이라 한다)를 통하여 상장지수증권으로부터의 이익을 받는 경우 상장지수증권의 증권당 배당소득금액은 다음 각 호의 구분에 따른 금액으로 한다.'
제14조2항={}
제14조[제14조2항_]=제14조2항
제14조2항1호_='1. 제1항제1호에 해당하는 상장지수증권: 환매 등(상장지수증권의 매도는 제외한다)이 발생하는 시점의 과세표준기준가격에서 직전 분배 직후의 과세표준기준가격(최초 설정 후 분배가 없었던 경우에는 최초 설정 시 과세표준기준가격을 말한다)을 뺀 금액'
제14조2항1호={}
제14조2항[제14조2항1호_]=제14조2항1호
제14조2항2호_='2. 제1호 외의 상장지수증권: 환매 등이 발생하는 시점의 과세표준기준가격에서 매수 시 과세표준기준가격을 뺀 후 직전 분배 시 발생한 과세되지 아니한 투자자별 손익을 더하거나 뺀 금액'
제14조2항2호={}
제14조2항[제14조2항2호_]=제14조2항2호
제14조3항_='③ 상장지수증권(제1항제1호에 해당하는 상장지수증권은 제외한다)을 증권시장에서 매도하는 경우의 증권당 배당소득금액은 제2항제2호에도 불구하고 같은 호에 따라 계산된 금액과 매수ㆍ매도 시의 과세표준기준가격을 실제 매수ㆍ매도 가격으로 하여 같은 호에 따라 계산된 금액 중 적은 금액으로 한다.'
제14조3항={}
제14조[제14조3항_]=제14조3항
제14조4항_='④투자자별 배당소득금액은 다음 계산식에 따라 계산한 금액으로 한다.'
제14조4항={}
제14조[제14조4항_]=제14조4항
제14조['']={}
제14조5항_='⑤ 제4항을 적용할 때 같은 계좌 내에서 같은 상장지수증권을 증권시장에서 두 차례 이상 매수한 경우 매수 시의 과세표준기준가격은 제13조제8항제2호의 이동평균법을 준용하여 산정하고, 투자자별 배당소득금액은 같은 시점에서 분배 또는 환매 등이 발생하는 상장지수증권 전체를 하나의 과세단위로 하여 계산한다. 다만, 같은 날 매도되는 상장지수증권은 전체를 하나의 과세단위로 하여 투자자별 배당소득금액을 계산한다.'
제14조5항={}
제14조[제14조5항_]=제14조5항
제14조['[본조신설 2014. 3. 14.]']={}
제15조_=' 제15조 (교육서비스업의 범위) '
제15조={}
제15조['소득세법시행규칙 제15조 (교육서비스업의 범위)']={}
조문['제15조 (교육서비스업의 범위)']=제15조
조['제15조 (교육서비스업의 범위)']=제15조
제15조1항_='영 제35조에서 "기획재정부령으로 정하는 것"이란 다음 각 호의 어느 하나에 해당하는 것을 말한다. <개정 1998. 8. 11., 1999. 5. 7., 2005. 3. 19., 2007. 4. 17., 2008. 4. 29., 2010. 4. 30., 2013. 2. 23.>'
제15조1항={}
제15조[제15조1항_]=제15조1항
제15조1항1호_='1. 삭제 <1997. 4. 23.>'
제15조1항1호={}
제15조1항[제15조1항1호_]=제15조1항1호
제15조1항2호_='2. 「근로자직업능력 개발법」에 의하여 사업주가 소속 근로자의 직업능력의 개발ㆍ향상을 위하여 설치ㆍ운영하는 직업능력개발훈련시설'
제15조1항2호={}
제15조1항[제15조1항2호_]=제15조1항2호
제15조1항3호_='3. 한국표준산업분류상의 달리 분류되지 않은 기타 교육기관중 노인 학교'
제15조1항3호={}
제15조1항[제15조1항3호_]=제15조1항3호
제15_02조_=' 제15조의2(사택의 범위) '
제15_02조={}
제15_02조['소득세법시행규칙 제15조의2(사택의 범위)']={}
조문['제15조의2(사택의 범위)']=제15_02조
조['제15조의2(사택의 범위)']=제15_02조
제15_02조1항_='①영 제38조제1항제6호 단서에서 "기획재정부령으로 정하는 사택"이란 사용자가 소유하고 있는 주택을 같은 단서에 따른 종업원 및 임원(이하 이 조에서 "종업원등"이라 한다)에게 무상 또는 저가로 제공하거나, 사용자가 직접 임차하여 종업원등에게 무상으로 제공하는 주택을 말한다. <개정 2008. 4. 29., 2009. 4. 14.>'
제15_02조1항={}
제15_02조[제15_02조1항_]=제15_02조1항
제15_02조2항_='②제1항의 규정을 적용함에 있어서 사용자가 임차주택을 사택으로 제공하는 경우 임대차기간중에 종업원등이 전근ㆍ퇴직 또는 이사하는 때에는 다른 종업원등이 당해 주택에 입주하는 경우에 한하여 이를 사택으로 본다. 다만, 다음 각호의 1에 해당하는 경우에는 그러하지 아니하다.'
제15_02조2항={}
제15_02조[제15_02조2항_]=제15_02조2항
제15_02조2항1호_='1. 입주한 종업원등이 전근ㆍ퇴직 또는 이사한 후 당해 사업장의 종업원등중에서 입주희망자가 없는 경우'
제15_02조2항1호={}
제15_02조2항[제15_02조2항1호_]=제15_02조2항1호
제15_02조2항2호_='2. 당해 임차주택의 계약잔여기간이 1년 이하인 경우로서 주택임대인이 주택임대차계약의 갱신을 거부하는 경우'
제15_02조2항2호={}
제15_02조2항[제15_02조2항2호_]=제15_02조2항2호
제15_02조['[본조신설 2000. 4. 3.]']={}
제15_03조_=' 제15조의3(퇴직급여 적립방법 등) '
제15_03조={}
제15_03조['소득세법시행규칙 제15조의3(퇴직급여 적립방법 등)']={}
조문['제15조의3(퇴직급여 적립방법 등)']=제15_03조
조['제15조의3(퇴직급여 적립방법 등)']=제15_03조
제15_03조1항_='영 제38조제2항에서 "근로자가 적립금액 등을 선택할 수 없는 것으로서 기획재정부령으로 정하는 방법"이란 다음 각 호의 요건을 모두 충족하는 적립 방법을 말한다.'
제15_03조1항={}
제15_03조[제15_03조1항_]=제15_03조1항
제15_03조1항1호_='1. 「근로자퇴직급여 보장법」 제4조제1항에 따른 퇴직급여제도의 가입 대상이 되는 근로자(임원을 포함한다. 이하 이 조에서 같다) 전원이 적립할 것. 다만, 각 근로자가 다음 각 목의 어느 하나에 해당하는 날에 향후 적립하지 아니할 것을 선택할 수 있는 것이어야 한다.'
제15_03조1항1호={}
제15_03조1항[제15_03조1항1호_]=제15_03조1항1호
제15_03조1항1호가목_='가. 사업장에 제2호에 따른 적립 방식이 최초로 설정되는 날(해당 사업장에 최초로 근무하게 된 날에 제2호의 적립 방식이 이미 설정되어 있는 경우에는 「근로자퇴직급여 보장법」 제4조제1항에 따라 최초로 퇴직급여제도의 가입 대상이 되는 날을 말한다)'
제15_03조1항1호가목={}
제15_03조1항1호[제15_03조1항1호가목_]=제15_03조1항1호가목
제15_03조1항1호나목_='나. 제2호의 적립 방식이 변경되는 날'
제15_03조1항1호나목={}
제15_03조1항1호[제15_03조1항1호나목_]=제15_03조1항1호나목
제15_03조1항2호_='2. 적립할 때 근로자가 적립 금액을 임의로 변경할 수 없는 적립 방식을 설정하고 그에 따라 적립할 것'
제15_03조1항2호={}
제15_03조1항[제15_03조1항2호_]=제15_03조1항2호
제15_03조1항3호_='3. 제2호의 적립 방식이 「근로자퇴직급여 보장법」 제6조제2항에 따른 퇴직연금규약, 같은 법 제19조제1항에 따른 확정기여형퇴직연금규약 또는 「과학기술인공제회법」 제16조의2에 따른 퇴직연금급여사업을 운영하기 위하여 과학기술인공제회와 사용자가 체결하는 계약에 명시되어 있을 것'
제15_03조1항3호={}
제15_03조1항[제15_03조1항3호_]=제15_03조1항3호
제15_03조1항4호_='4. 사용자가 영 제40조의2제1항제2호가목 및 다목의 퇴직연금계좌에 적립할 것'
제15_03조1항4호={}
제15_03조1항[제15_03조1항4호_]=제15_03조1항4호
제15_03조['[본조신설 2015. 3. 13.]']={}
제16조_=' 제16조 (외화로 지급받은 급여의 원화환산기준 등) '
제16조={}
제16조['소득세법시행규칙 제16조 (외화로 지급받은 급여의 원화환산기준 등)']={}
조문['제16조 (외화로 지급받은 급여의 원화환산기준 등)']=제16조
조['제16조 (외화로 지급받은 급여의 원화환산기준 등)']=제16조
제16조1항_='①법 제20조의 규정에 의한 근로소득을 계산함에 있어서 거주자가 근로소득을 외화로 지급받은 때에는 당해 급여를 지급받은 날 현재 「외국환거래법」에 의한 기준환율 또는 재정환율에 의하여 환산한 금액을 근로소득으로 한다. 이 경우 급여를 정기급여지급일 이후에 지급받은 때에는 정기급여일 현재 「외국환거래법」에 의한 기준환율 또는 재정환율에 의하여 환산한 금액을 당해 근로소득으로 본다. <신설 2003. 4. 14., 2005. 3. 19.>'
제16조1항={}
제16조[제16조1항_]=제16조1항
제16조2항_='② 삭제 <2007. 4. 17.>'
제16조2항={}
제16조[제16조2항_]=제16조2항
제16조3항_='③ 삭제 <2007. 4. 17.>'
제16조3항={}
제16조[제16조3항_]=제16조3항
제16조4항_='④영 제38조제1항제12호 다목에서 "기획재정부령이 정하는 것"이란 다음 각 호의 어느 하나에 해당하는 것을 말한다. <신설 1998. 8. 11., 2004. 3. 5., 2005. 3. 19., 2008. 4. 29., 2009. 4. 14., 2010. 4. 30.>'
제16조4항={}
제16조[제16조4항_]=제16조4항
제16조4항1호_='1. 「보험업법」에 의하여 허가를 받은 보험사업자가 취급하는 퇴직보험'
제16조4항1호={}
제16조4항[제16조4항1호_]=제16조4항1호
제16조4항2호_='2. 「자본시장과 금융투자업에 관한 법률」에 따라 신탁업의 인가를 받은 금융회사 등이 취급하는 퇴직일시금신탁'
제16조4항2호={}
제16조4항[제16조4항2호_]=제16조4항2호
제16조4항3호_='3. 「자본시장과 금융투자업에 관한 법률」에 따른 집합투자업자가 취급하는 퇴직일시금신탁'
제16조4항3호={}
제16조4항[제16조4항3호_]=제16조4항3호
제16조['[제목개정 2003. 4. 14.]']={}
제16_02조_=' 제16조의2 삭제 '
제16_02조={}
제16_02조['소득세법시행규칙 제16조의2 삭제 ']={}
조문['제16조의2 삭제 ']=제16_02조
조['제16조의2 삭제 ']=제16_02조
제17조_=' 제17조 (점포임차인의 지위양도시 과세제외되는 사업소득의 범위) '
제17조={}
제17조['소득세법시행규칙 제17조 (점포임차인의 지위양도시 과세제외되는 사업소득의 범위)']={}
조문['제17조 (점포임차인의 지위양도시 과세제외되는 사업소득의 범위)']=제17조
조['제17조 (점포임차인의 지위양도시 과세제외되는 사업소득의 범위)']=제17조
제17조1항_='영 제41조제4항에서 "기획재정부령으로 정하는 사업소득"이라 함은 다음 각 호의 사업에서 발생하는 소득을 말한다. <개정 1997. 4. 23., 1998. 8. 11., 1999. 5. 7., 2005. 3. 19., 2007. 4. 17., 2008. 4. 29., 2010. 4. 30.>'
제17조1항={}
제17조[제17조1항_]=제17조1항
제17조1항1호_='1. 전문ㆍ과학 및 기술 서비스업 중 연구개발업, 기타 전문ㆍ과학 및 기술서비스업, 사업지원 서비스업'
제17조1항1호={}
제17조1항[제17조1항1호_]=제17조1항1호
제17조1항2호_='2. 한국표준산업분류상의 교육서비스업중 「유아교육법」에 따른 유치원, 「초ㆍ중등교육법」 및 「고등교육법」에 의한 학교와 제15조에서 규정하는 사업'
제17조1항2호={}
제17조1항[제17조1항2호_]=제17조1항2호
제17조1항3호_='3. 보건업 및 사회복지서비스업 중 「사회복지사업법」에 따른 사회복지사업'
제17조1항3호={}
제17조1항[제17조1항3호_]=제17조1항3호
제17조1항3_02호_='3의2. 예술, 스포츠 및 여가관련 서비스업(자영 예술가 및 그 밖의 기타 스포츠 서비스업만 해당한다)'
제17조1항3_02호={}
제17조1항[제17조1항3_02호_]=제17조1항3_02호
제17조1항4호_='4. 협회 및 단체, 수리 및 기타 개인서비스업 중 협회 및 단체, 기타 개인서비스업(미용, 욕탕 및 유사 서비스업, 세탁업, 장례식장 및 관련 서비스업, 예식장업은 제외한다)'
제17조1항4호={}
제17조1항[제17조1항4호_]=제17조1항4호
제17조1항5호_='5. 운수업 중 수상 운송지원 서비스업'
제17조1항5호={}
제17조1항[제17조1항5호_]=제17조1항5호
제17조1항6호_='6. 제64조제2호에서 규정하는 사업'
제17조1항6호={}
제17조1항[제17조1항6호_]=제17조1항6호
제17조['[본조신설 1996. 3. 30.]']={}
제17조['[제16조의2에서 이동 <2014. 3. 14.>]']={}
제18조_=' 제18조 (총수입금액의 귀속시기) '
제18조={}
제18조['소득세법시행규칙 제18조 (총수입금액의 귀속시기)']={}
조문['제18조 (총수입금액의 귀속시기)']=제18조
조['제18조 (총수입금액의 귀속시기)']=제18조
제18조1항_='①영 제48조 제1호ㆍ제4호 및 제5호에서 "인도한 날" 또는 "인도일"이라 함은 다음 각호의 경우에는 당해 호에 규정된 날을 말한다. <개정 1999. 5. 7.>'
제18조1항={}
제18조[제18조1항_]=제18조1항
제18조1항1호_='1. 납품계약 또는 수탁가공계약에 의하여 물품을 납품하거나 가공하는 경우에는 당해물품을 계약상 인도하여야 할 장소에 보관한 날. 다만, 계약에 따라 검사를 거쳐 인수 및 인도가 확정되는 물품은 당해검사가 완료된 날'
제18조1항1호={}
제18조1항[제18조1항1호_]=제18조1항1호
제18조1항2호_='2. 물품을 수출하는 경우에는 당해 수출물품을 계약상 인도하여야 할 장소에 보관한 날'
제18조1항2호={}
제18조1항[제18조1항2호_]=제18조1항2호
제18조2항_='② 삭제 <2000. 4. 3.>'
제18조2항={}
제18조[제18조2항_]=제18조2항
제18조['[제목개정 2000. 4. 3.]']={}
제19조_=' 제19조 (장기할부조건의 범위) '
제19조={}
제19조['소득세법시행규칙 제19조 (장기할부조건의 범위)']={}
조문['제19조 (장기할부조건의 범위)']=제19조
조['제19조 (장기할부조건의 범위)']=제19조
제19조1항_='영 제48조제4호에서 "기획재정부령이 정하는 장기할부조건"이라 함은 상품등의 판매 또는 양도(국외거래에 있어서는 소유권이전조건부 약정에 의한 자산의 임대를 포함한다)로서 판매금액 또는 수입금액을 월부ㆍ연부 기타의 지불방법에 따라 2회 이상으로 분할하여 수입하는 것중 해당 목적물의 인도일의 다음날부터 최종의 할부금의 지급기일까지의 기간이 1년 이상인 것을 말한다. <개정 2008. 4. 29.>'
제19조1항={}
제19조[제19조1항_]=제19조1항
제19조['[전문개정 1999. 5. 7.]']={}
제20조_=' 제20조 (건설등에 의한 수입의 수입시기 및 총수입금액 등의 계산) '
제20조={}
제20조['소득세법시행규칙 제20조 (건설등에 의한 수입의 수입시기 및 총수입금액 등의 계산)']={}
조문['제20조 (건설등에 의한 수입의 수입시기 및 총수입금액 등의 계산)']=제20조
조['제20조 (건설등에 의한 수입의 수입시기 및 총수입금액 등의 계산)']=제20조
제20조1항_='①영 제48조제5호 단서에 따른 건설등의 제공의 경우 각 과세기간의 총수입금액에 산입할 금액은 다음 계산식에 따라 계산한 금액으로 한다. <개정 2012. 2. 28.>'
제20조1항={}
제20조[제20조1항_]=제20조1항
제20조['']={}
제20조2항_='②영 제48조제5호 단서에서 "계약기간이 1년 이상인 경우로서 기획재정부령이 정하는 경우"라 함은 건설등의 계약기간(그 목적물의 건설등의 착수일부터 인도일까지의 기간을 말한다. 이하 이 조에서 같다)이 1년 이상인 건설등으로서 비치ㆍ기장된 장부에 의하여 해당과세기간 종료일까지 실제로 발생한 건설등의 필요경비 총누적액을 확인할 수 있는 경우를 말한다. <개정 2008. 4. 29.>'
제20조2항={}
제20조[제20조2항_]=제20조2항
제20조3항_='③영 제48조제5호 단서에서 "기획재정부령이 정하는 작업진행률"이라 함은 다음 산식에 의하여 계산한 비율을 말한다. 다만, 건설등의 수익실현이 건설등의 작업시간ㆍ작업일수 또는 기성공사의 면적이나 물량 등(이하 이 항에서 "작업시간등"이라 한다)과 비례관계가 있고, 전체 작업시간등에서 이미 투입되었거나 완성된 부분이 차지하는 비율을 객관적으로 산정할 수 있는 건설등의 경우에는 그 비율로 할 수 있다. <개정 2008. 4. 29.>'
제20조3항={}
제20조[제20조3항_]=제20조3항
제20조['작업진행률 = 해당과세기간말까지 발생한 건설등의 필요경비 총누적액 / 건설등의 필요경비 총예정액']={}
제20조4항_='④제3항의 규정에 의한 건설등의 필요경비 총예정액은 건설업회계처리기준을 적용 또는 준용하여 건설등의 도급계약당시 추정한 원가에 당해과세기간말까지의 변동상황을 반영하여 합리적으로 추정한 원가로 한다.'
제20조4항={}
제20조[제20조4항_]=제20조4항
제20조5항_='⑤영 제48조제5호 단서에서 "계약기간이 1년 미만인 경우로서 기획재정부령이 정하는 경우"라 함은 계약기간이 1년 미만인 경우로서 사업자가 그 목적물의 착수일이 속하는 과세기간의 결산을 확정함에 있어서 작업진행률을 기준으로 총수입금액과 필요경비를 계상한 경우를 말한다. <개정 2008. 4. 29.>'
제20조5항={}
제20조[제20조5항_]=제20조5항
제20조['[전문개정 1999. 5. 7.]']={}
제21조_=' 제21조 (선세금의 계산) '
제21조={}
제21조['소득세법시행규칙 제21조 (선세금의 계산)']={}
조문['제21조 (선세금의 계산)']=제21조
조['제21조 (선세금의 계산)']=제21조
제21조1항_='영 제51조제3항제1호 후단에 따른 월수의 계산에 있어 당해계약기간의 개시일이 속하는 달이 1월미만인 경우는 1월로 하고 당해계약기간의 종료일이 속하는 달이 1월미만인 경우에는 이를 산입하지 아니한다. <개정 2010. 4. 30.>'
제21조1항={}
제21조[제21조1항_]=제21조1항
제21조['[본조신설 1997. 4. 23.]']={}
제22조_=' 제22조 (매출에누리등의 범위) '
제22조={}
제22조['소득세법시행규칙 제22조 (매출에누리등의 범위)']={}
조문['제22조 (매출에누리등의 범위)']=제22조
조['제22조 (매출에누리등의 범위)']=제22조
제22조1항_='①영 제51조제3항제1호의2 본문에 따른 매출에누리는 다음 각 호의 어느 하나에 해당하는 것으로 한다. <개정 2010. 4. 30.>'
제22조1항={}
제22조[제22조1항_]=제22조1항
제22조1항1호_='1. 물품의 판매에 있어서 그 품질ㆍ수량 및 인도ㆍ판매대금결제 기타 거래조건에 따라 그 물품의 판매당시에 통상의 매출가액에서 일정액을 직접 공제하는 금액'
제22조1항1호={}
제22조1항[제22조1항1호_]=제22조1항1호
제22조1항2호_='2. 매출한 상품 또는 제품에 대한 부분적인 감량ㆍ변질ㆍ파손등으로 매출가액에서 직접 공제하는 금액'
제22조1항2호={}
제22조1항[제22조1항2호_]=제22조1항2호
제22조2항_='②영 제51조제3항제1호의3에 따른 매출할인금액은 외상거래대금을 결제하거나 외상매출금 또는 미수금을 그 약정기일전에 영수하는 경우 일정액을 할인하는 금액으로 한다. <개정 1999. 5. 7., 2010. 4. 30.>'
제22조2항={}
제22조[제22조2항_]=제22조2항
제22_02조_=' 제22조의2(시가의 계산) '
제22_02조={}
제22_02조['소득세법시행규칙 제22조의2(시가의 계산)']={}
조문['제22조의2(시가의 계산)']=제22_02조
조['제22조의2(시가의 계산)']=제22_02조
제22_02조1항_='영 제51조제5항제5호에서 "기획재정부령이 정하는 시가"라 함은 「법인세법 시행령」 제89조를 준용하여 계산한 금액으로 한다. <개정 2000. 4. 3., 2005. 3. 19., 2008. 4. 29.>'
제22_02조1항={}
제22_02조[제22_02조1항_]=제22_02조1항
제22_02조['[본조신설 1999. 5. 7.]']={}
제23조_=' 제23조 (총수입금액계산의 특례) '
제23조={}
제23조['소득세법시행규칙 제23조 (총수입금액계산의 특례)']={}
조문['제23조 (총수입금액계산의 특례)']=제23조
조['제23조 (총수입금액계산의 특례)']=제23조
제23조1항_='① 영 제53조제3항제1호 산식에서 "기획재정부령으로 정하는 이자율"이란 연간 1천분의 18을 말한다. <개정 2010. 4. 30., 2011. 3. 28., 2012. 2. 28., 2013. 2. 23., 2014. 3. 14., 2015. 3. 13., 2016. 3. 16., 2017. 3. 10., 2018. 3. 21.>'
제23조1항={}
제23조[제23조1항_]=제23조1항
제23조2항_='②영 제53조제5항의 규정을 적용함에 있어서 건설비상당액은 다음 각호의 산식에 의하여 계산한 금액으로 한다. 이 경우 당해 건축물의 취득가액은 자본적 지출액을 포함하고 재평가차액을 제외한 금액으로 한다. <개정 2002. 4. 13.>'
제23조2항={}
제23조[제23조2항_]=제23조2항
제23조2항1호_='1. 영 제53조제5항제1호의 경우'
제23조2항1호={}
제23조2항[제23조2항1호_]=제23조2항1호
제23조['']={}
제23조2호_='2. 영 제53조제5항제2호의 경우'
제23조2호={}
제23조[제23조2호_]=제23조2호
제23조['']={}
제23조3항_='③1990년 12월 31일이전에 취득ㆍ건설한 임대용부동산에 대한 건설비상당액은 제2항의 규정에 불구하고 당해부동산의 취득가액과 다음 각호의 산식에 의하여 계산한 금액중 큰 금액으로 한다. <개정 1999. 5. 7.>'
제23조3항={}
제23조[제23조3항_]=제23조3항
제23조['1.']={}
제23조['']={}
제23조['2.']={}
제23조['']={}
제23조4항_='④ 삭제 <2011. 3. 28.>'
제23조4항={}
제23조[제23조4항_]=제23조4항
제24조_=' 제24조 (경조금의 필요경비산입등) '
제24조={}
제24조['소득세법시행규칙 제24조 (경조금의 필요경비산입등)']={}
조문['제24조 (경조금의 필요경비산입등)']=제24조
조['제24조 (경조금의 필요경비산입등)']=제24조
제24조1항_='①영 제55조제1항제6호에 규정하는 종업원에는 당해 사업자의 사업에 직접 종사하고 있는 그 사업자의 배우자 또는 부양가족을 포함하는 것으로 한다.'
제24조1항={}
제24조[제24조1항_]=제24조1항
제24조2항_='②사업자가 그 종업원에게 지급한 경조금중 사회통념상 타당하다고 인정되는 범위내의 금액은 해당 과세기간의 소득금액 계산에 있어서 이를 필요경비에 산입한다. <개정 2010. 4. 30.>'
제24조2항={}
제24조[제24조2항_]=제24조2항
제24_02조_=' 제24조의2(보험료 등의 범위 등) '
제24_02조={}
제24_02조['소득세법시행규칙 제24조의2(보험료 등의 범위 등)']={}
조문['제24조의2(보험료 등의 범위 등)']=제24_02조
조['제24조의2(보험료 등의 범위 등)']=제24_02조
제24_02조1항_='① 영 제55조제1항제10호의2 및 제3항의 규정을 적용하는 때에는 사용자가 종업원에 대하여 확정기여형퇴직연금등을 설정하면서 설정 전의 근무기간분에 대한 부담금을 지출한 경우 그 지출금액은 제26조의2에 따라 퇴직급여충당금의 누적액에서 차감된 퇴직급여충당금에서 먼저 지출한 것으로 본다. <개정 2018. 3. 21.>'
제24_02조1항={}
제24_02조[제24_02조1항_]=제24_02조1항
제24_02조2항_='② 영 제55조제1항제26호에 따른 조합 또는 협회에 지급한 회비는 조합 또는 협회가 법령 또는 정관이 정하는 바에 따른 정상적인 회비징수 방식에 의하여 경상경비 충당 등을 목적으로 조합원 또는 회원에게 부과하는 회비로 한다. <신설 2018. 3. 21.>'
제24_02조2항={}
제24_02조[제24_02조2항_]=제24_02조2항
제24_02조['[본조신설 2006. 4. 10.]']={}
제24_02조['[제목개정 2018. 3. 21.]']={}
제24_03조_=' 제24조의3(유족에게 지급하는 학자금 등 필요경비 산입) '
제24_03조={}
제24_03조['소득세법시행규칙 제24조의3(유족에게 지급하는 학자금 등 필요경비 산입)']={}
조문['제24조의3(유족에게 지급하는 학자금 등 필요경비 산입)']=제24_03조
조['제24조의3(유족에게 지급하는 학자금 등 필요경비 산입)']=제24_03조
제24_03조1항_='영 제55조제1항제27호에서 "기획재정부령으로 정하는 요건"이란 종업원 사망 전에 결정되어 종업원에게 공통적으로 적용되는 지급기준에 따라 지급되는 것을 말한다.'
제24_03조1항={}
제24_03조[제24_03조1항_]=제24_03조1항
제24_03조['[본조신설 2015. 3. 13.]']={}
제25조_=' 제25조 삭제 '
제25조={}
제25조['소득세법시행규칙 제25조 삭제 ']={}
조문['제25조 삭제 ']=제25조
조['제25조 삭제 ']=제25조
제26조_=' 제26조 (대손충당금의 계산) '
제26조={}
제26조['소득세법시행규칙 제26조 (대손충당금의 계산)']={}
조문['제26조 (대손충당금의 계산)']=제26조
조['제26조 (대손충당금의 계산)']=제26조
제26조1항_='영 제56조제2항제2호에서 "기획재정부령이 정하는 것"이라 함은 해당 사업장에 적용되는 제50조제1항 각 호의 회계처리기준에 의한 대손충당금 설정대상채권을 말한다. 다만, 영 제98조제1항에 따른 특수관계인에게 시가보다 높은 가격으로 재화 또는 용역을 공급하는 경우의 시가초과액에 상당하는 채권을 제외한다. <개정 2008. 4. 29., 2012. 2. 28.>'
제26조1항={}
제26조[제26조1항_]=제26조1항
제26조['[전문개정 1999. 5. 7.]']={}
제26_02조_=' 제26조의2(퇴직급여충당금의 계산) '
제26_02조={}
제26_02조['소득세법시행규칙 제26조의2(퇴직급여충당금의 계산)']={}
조문['제26조의2(퇴직급여충당금의 계산)']=제26_02조
조['제26조의2(퇴직급여충당금의 계산)']=제26_02조
제26_02조1항_='영 제57조제2항의 규정을 적용하는 때에는 확정기여형퇴직연금등이 설정된 종업원에 대하여 그 설정 전에 계상된 퇴직급여충당금(제1호의 금액에 제2호의 비율을 곱하여 계산한 금액을 말한다)을 퇴직급여충당금의 누적액에서 차감한다.'
제26_02조1항={}
제26_02조[제26_02조1항_]=제26_02조1항
제26_02조1항1호_='1. 직전 과세기간 종료일 현재 퇴직급여충당금의 누적액'
제26_02조1항1호={}
제26_02조1항[제26_02조1항1호_]=제26_02조1항1호
제26_02조1항2호_='2. 직전 과세기간 종료일 현재 재직한 종업원의 전원이 퇴직한 경우에 퇴직급여로 지급되었어야 할 금액의 추계액 중 해당과세기간에 확정기여형퇴직연금등이 설정된 자가 직전 과세기간 종료일 현재 퇴직한 경우에 퇴직급여로 지급되었어야 할 금액의 추계액이 차지하는 비율'
제26_02조1항2호={}
제26_02조1항[제26_02조1항2호_]=제26_02조1항2호
제26_02조['[본조신설 2006. 4. 10.]']={}
제27조_=' 제27조 (가사관련경비) '
제27조={}
제27조['소득세법시행규칙 제27조 (가사관련경비)']={}
조문['제27조 (가사관련경비)']=제27조
조['제27조 (가사관련경비)']=제27조
제27조1항_='①영 제61조제1항제2호의 규정에 의하여 필요경비에 산입하지 아니하는 금액은 다음 산식에 의하여 계산한 금액으로 한다. 이 경우 적수의 계산은 매월말 현재의 초과인출금 또는 차입금의 잔액에 경과일수를 곱하여 계산할 수 있다.'
제27조1항={}
제27조[제27조1항_]=제27조1항
제27조['']={}
제27조2항_='②제1항의 규정을 적용함에 있어서 초과인출금의 적수가 차입금의 적수를 초과하는 경우에는 그 초과하는 부분은 없는 것으로 본다.'
제27조2항={}
제27조[제27조2항_]=제27조2항
제27조3항_='③제1항에 규정하는 부채에는 법 및 「조세특례제한법」에 의하여 필요경비에 산입한 충당금 및 준비금은 포함하지 아니하는 것으로 한다. <개정 1999. 5. 7., 2005. 3. 19.>'
제27조3항={}
제27조[제27조3항_]=제27조3항
제28조_=' 제28조 삭제 '
제28조={}
제28조['소득세법시행규칙 제28조 삭제 ']={}
조문['제28조 삭제 ']=제28조
조['제28조 삭제 ']=제28조
제29조_=' 제29조 삭제 '
제29조={}
제29조['소득세법시행규칙 제29조 삭제 ']={}
조문['제29조 삭제 ']=제29조
조['제29조 삭제 ']=제29조
제29_02조_=' 제29조의2 삭제 '
제29_02조={}
제29_02조['소득세법시행규칙 제29조의2 삭제 ']={}
조문['제29조의2 삭제 ']=제29_02조
조['제29조의2 삭제 ']=제29_02조
제30조_=' 제30조 삭제 '
제30조={}
제30조['소득세법시행규칙 제30조 삭제 ']={}
조문['제30조 삭제 ']=제30조
조['제30조 삭제 ']=제30조
제31조_=' 제31조 삭제 '
제31조={}
제31조['소득세법시행규칙 제31조 삭제 ']={}
조문['제31조 삭제 ']=제31조
조['제31조 삭제 ']=제31조
제32조_=' 제32조 (기준내용연수등) '
제32조={}
제32조['소득세법시행규칙 제32조 (기준내용연수등)']={}
조문['제32조 (기준내용연수등)']=제32조
조['제32조 (기준내용연수등)']=제32조
제32조1항_='①영 제63조제1항의 규정에 의하여 감가상각자산의 내용연수와 이에 따른 상각률을 정함에 있어서 시험연구용 자산ㆍ내용연수ㆍ상각방법별 상각률ㆍ기준내용연수 및 내용연수범위에 관하여는 「법인세법 시행규칙」 제15조의 규정을 준용한다. <개정 1999. 5. 7., 2005. 3. 19.>'
제32조1항={}
제32조[제32조1항_]=제32조1항
제32조2항_='②건축물이 내용연수범위가 서로 다른 2이상의 복합구조로 구성되어 있는 경우에는 주된 구조에 의한 내용연수범위를 적용하고 건축물외의 고정자산이 내용연수범위가 서로 다른 2이상의 업종에 공통으로 사용되고 있는 경우에는 그 사용기간 또는 사용정도의 비율에 따라 그 사용비율이 큰 업종의 내용연수범위를 적용한다.'
제32조2항={}
제32조[제32조2항_]=제32조2항
제32조3항_='③ 삭제 <1999. 5. 7.>'
제32조3항={}
제32조[제32조3항_]=제32조3항
제32조4항_='④ 삭제 <1999. 5. 7.>'
제32조4항={}
제32조[제32조4항_]=제32조4항
제33조_=' 제33조 (내용연수 변경등) '
제33조={}
제33조['소득세법시행규칙 제33조 (내용연수 변경등)']={}
조문['제33조 (내용연수 변경등)']=제33조
조['제33조 (내용연수 변경등)']=제33조
제33조1항_='① 삭제 <1999. 5. 7.>'
제33조1항={}
제33조[제33조1항_]=제33조1항
제33조2항_='②영 제63조의2제1항제2호에서 "기획재정부령으로 정하는 가동률"이란 다음 각 호의 어느 하나의 방법중 사업자가 선택한 가동률을 말한다. <개정 1999. 5. 7., 2008. 4. 29., 2010. 4. 30.>'
제33조2항={}
제33조[제33조2항_]=제33조2항
제33조['1.']={}
제33조['']={}
제33조['2.']={}
제33조['']={}
제33조3항_='③ 삭제 <1999. 5. 7.>'
제33조3항={}
제33조[제33조3항_]=제33조3항
제33조4항_='④ 삭제 <1999. 5. 7.>'
제33조4항={}
제33조[제33조4항_]=제33조4항
제34조_=' 제34조 삭제 '
제34조={}
제34조['소득세법시행규칙 제34조 삭제 ']={}
조문['제34조 삭제 ']=제34조
조['제34조 삭제 ']=제34조
제35조_=' 제35조 (내용연수 변경이 가능한 중고자산의 범위 등) '
제35조={}
제35조['소득세법시행규칙 제35조 (내용연수 변경이 가능한 중고자산의 범위 등)']={}
조문['제35조 (내용연수 변경이 가능한 중고자산의 범위 등)']=제35조
조['제35조 (내용연수 변경이 가능한 중고자산의 범위 등)']=제35조
제35조1항_='①영 제63조의3제1항에서 "기획재정부령이 정하는 자산"이라 함은 법인 또는 다른 사업자로부터 취득한 자산으로서 해당 자산의 사용연수가 이를 취득한 사업자에게 적용되는 기준내용연수의 100분의 50 이상이 경과된 자산을 말한다. <개정 2008. 4. 29.>'
제35조1항={}
제35조[제35조1항_]=제35조1항
제35조2항_='②영 제63조의3제1항의 규정에 의한 기준내용연수의 100분의 50에 상당하는 연수를 계산함에 있어서 6월 이하는 없는 것으로 하고, 6월을 초과하는 경우에는 1년으로 한다.'
제35조2항={}
제35조[제35조2항_]=제35조2항
제35조['[본조신설 2001. 4. 30.]']={}
제36조_=' 제36조 삭제 '
제36조={}
제36조['소득세법시행규칙 제36조 삭제 ']={}
조문['제36조 삭제 ']=제36조
조['제36조 삭제 ']=제36조
제37조_=' 제37조 삭제 '
제37조={}
제37조['소득세법시행규칙 제37조 삭제 ']={}
조문['제37조 삭제 ']=제37조
조['제37조 삭제 ']=제37조
제38조_=' 제38조 삭제 '
제38조={}
제38조['소득세법시행규칙 제38조 삭제 ']={}
조문['제38조 삭제 ']=제38조
조['제38조 삭제 ']=제38조
제39조_=' 제39조 (부가가치세매입세액의 필요경비산입) '
제39조={}
제39조['소득세법시행규칙 제39조 (부가가치세매입세액의 필요경비산입)']={}
조문['제39조 (부가가치세매입세액의 필요경비산입)']=제39조
조['제39조 (부가가치세매입세액의 필요경비산입)']=제39조
제39조1항_='영 제74조제2호에서 "기획재정부령이 정하는 것"이라 함은 다음 각 호의 어느 하나에 해당하는 것을 말한다. <개정 1998. 8. 11., 2005. 3. 19., 2008. 4. 29., 2013. 6. 28.>'
제39조1항={}
제39조[제39조1항_]=제39조1항
제39조1항1호_='1. 「부가가치세법」 제36조제1항부터 제3항까지에 규정하는 영수증을 교부받은 거래분에 포함된 매입세액으로서 공제대상이 아닌 금액'
제39조1항1호={}
제39조1항[제39조1항1호_]=제39조1항1호
제39조1항2호_='2. 삭제 <2010. 4. 30.>'
제39조1항2호={}
제39조1항[제39조1항2호_]=제39조1항2호
제39조1항3호_='3. 부동산임차인이 부담한 전세금 및 임차보증금에 대한 매입세액'
제39조1항3호={}
제39조1항[제39조1항3호_]=제39조1항3호
제40조_=' 제40조 (준공된 날의 의의) '
제40조={}
제40조['소득세법시행규칙 제40조 (준공된 날의 의의)']={}
조문['제40조 (준공된 날의 의의)']=제40조
조['제40조 (준공된 날의 의의)']=제40조
제40조1항_='영 제75조제2항에서 "기획재정부령이 정하는 건설이 준공된 날"이라 함은 건축물의 경우에는 영 제162조의 규정에 의한 취득일 또는 해당 건설의 목적물이 그 목적에 실제로 사용되기 시작한 날(이하 이 조에서 "사용개시일"이라 한다)중 빠른 날을 말하며, 토지와 건축물을 제외한 기타 사업용고정자산에 대하여는 사용개시일을 말한다. <개정 1997. 4. 23., 1998. 8. 11., 2008. 4. 29.>'
제40조1항={}
제40조[제40조1항_]=제40조1항
제40조['[전문개정 1996. 3. 30.]']={}
제41조_=' 제41조 (업무와 관련없는 지출금액의 계산) '
제41조={}
제41조['소득세법시행규칙 제41조 (업무와 관련없는 지출금액의 계산)']={}
조문['제41조 (업무와 관련없는 지출금액의 계산)']=제41조
조['제41조 (업무와 관련없는 지출금액의 계산)']=제41조
제41조1항_='①차입금이 업무와 관련없는 자산을 취득하기 위하여 사용되었는지의 여부가 불분명한 경우에 영 제78조제3호의 규정에 의하여 필요경비에 산입하지 아니하는 금액은 다음 산식에 의하여 계산한 금액으로 한다. 이 경우 적수의 계산은 월말 현재의 잔액에 경과일수를 곱하여 계산할 수 있다.'
제41조1항={}
제41조[제41조1항_]=제41조1항
제41조['']={}
제41조2항_='②제1항의 산식에서 차입금은 업무와 관련없는 자산을 취득하기 위하여 사용되었는지의 여부가 분명하지 아니한 차입금의 금액을, 지급이자는 당해 차입금에 대한 지급이자를 말한다.'
제41조2항={}
제41조[제41조2항_]=제41조2항
제41조3항_='③업무와 관련없는 자산의 적수가 차입금의 적수를 초과하는 경우에는 그 초과하는 부분은 없는 것으로 본다.'
제41조3항={}
제41조[제41조3항_]=제41조3항
제41조4항_='④영 제78조제5호에서 "기획재정부령이 정하는 것"이라 함은 사업자가 업무와 관련없는 자산을 취득하기 위한 자금의 차입에 관련되는 비용을 말한다. <개정 1998. 8. 11., 2008. 4. 29.>'
제41조4항={}
제41조[제41조4항_]=제41조4항
제42조_=' 제42조 (업무용승용차 관련비용 등의 필요경비불산입 특례) '
제42조={}
제42조['소득세법시행규칙 제42조 (업무용승용차 관련비용 등의 필요경비불산입 특례)']={}
조문['제42조 (업무용승용차 관련비용 등의 필요경비불산입 특례)']=제42조
조['제42조 (업무용승용차 관련비용 등의 필요경비불산입 특례)']=제42조
제42조1항_='① 영 제78조의3제1항제2호에서 "기획재정부령으로 정하는 승용자동차"란 「통계법」 제22조에 따라 작성된 한국표준산업분류에 따른 장례식장 및 장의관련 서비스업을 영위하는 사업자가 소유하거나 임차한 운구용 승용차를 말한다.'
제42조1항={}
제42조[제42조1항_]=제42조1항
제42조2항_='② 영 제78조의3제4항에서 "기획재정부령으로 정하는 운행기록 등"이란 국세청장이 기획재정부장관과 협의하여 고시하는 운행기록 방법을 말한다.'
제42조2항={}
제42조[제42조2항_]=제42조2항
제42조3항_='③ 영 제78조의3제4항에 따른 업무용 사용거리란 제조ㆍ판매시설 등 해당 사업자의 사업장 방문, 거래처ㆍ대리점 방문, 회의 참석, 판촉 활동, 출ㆍ퇴근 등 직무와 관련된 업무수행을 위하여 주행한 거리를 말한다.'
제42조3항={}
제42조[제42조3항_]=제42조3항
제42조4항_='④ 영 제78조의3제8항에서 "기획재정부령으로 정하는 금액"이란 다음 각 호의 어느 하나에 해당하는 금액을 말한다.'
제42조4항={}
제42조[제42조4항_]=제42조4항
제42조4항1호_='1. 「여신전문금융업법」제3조제2항에 따라 등록한 시설대여업자로부터 임차한 승용차: 임차료에서 해당 임차료에 포함되어 있는 보험료, 자동차세 및 수선유지비를 차감한 금액. 다만, 수선유지비를 별도로 구분하기 어려운 경우에는 임차료(보험료와 자동차세를 차감한 금액을 말한다)의 100분의 7을 수선유지비로 할 수 있다.'
제42조4항1호={}
제42조4항[제42조4항1호_]=제42조4항1호
제42조4항2호_='2. 제1호에 따른 시설대여업자 외의 자동차대여사업자로부터 임차한 승용차: 임차료의 100분의 70에 해당하는 금액'
제42조4항2호={}
제42조4항[제42조4항2호_]=제42조4항2호
제42조5항_='⑤ 법 제160조제3항에 따른 복식부기의무자가 사업을 폐업하는 경우에는 영 제78조의3제7항 및 제9항에 따라 이월된 금액 중 남은 금액을 폐업일이 속하는 과세기간에 모두 필요경비에 산입한다.'
제42조5항={}
제42조[제42조5항_]=제42조5항
제42조['[본조신설 2016. 3. 16.]']={}
제43조_=' 제43조 삭제 '
제43조={}
제43조['소득세법시행규칙 제43조 삭제 ']={}
조문['제43조 삭제 ']=제43조
조['제43조 삭제 ']=제43조
제44조_=' 제44조 삭제 '
제44조={}
제44조['소득세법시행규칙 제44조 삭제 ']={}
조문['제44조 삭제 ']=제44조
조['제44조 삭제 ']=제44조
제44_02조_=' 제44조의2(기부금대상민간단체 지정요건 등) '
제44_02조={}
제44_02조['소득세법시행규칙 제44조의2(기부금대상민간단체 지정요건 등)']={}
조문['제44조의2(기부금대상민간단체 지정요건 등)']=제44_02조
조['제44조의2(기부금대상민간단체 지정요건 등)']=제44_02조
제44_02조1항_='①행정자치부장관은 「비영리민간단체 지원법」에 따라 등록된 단체를 영 제80조제1항제5호에 따라 기부금대상민간단체로 기획재정부장관에게 추천하는 때에는 다음 각 호의 사항이 포함된 기부금대상민간단체 추천서를 매반기 종료일 1개월 전까지 제출하여야 한다. <개정 2008. 4. 29., 2013. 3. 23., 2014. 3. 14., 2014. 11. 19.>'
제44_02조1항={}
제44_02조[제44_02조1항_]=제44_02조1항
제44_02조1항1호_='1. 단체의 사업목적'
제44_02조1항1호={}
제44_02조1항[제44_02조1항1호_]=제44_02조1항1호
제44_02조1항2호_='2. 기부금의 용도'
제44_02조1항2호={}
제44_02조1항[제44_02조1항2호_]=제44_02조1항2호
제44_02조2항_='②영 제80조제1항제5호 나목에 따른 수입 중 개인의 회비ㆍ후원금이 차지하는 비율은 기부금대상민간단체로 지정을 받으려는 과세기간의 직전 과세기간 종료일부터 소급하여 1년간을 기준으로 산정한다. <개정 2010. 4. 30.>'
제44_02조2항={}
제44_02조[제44_02조2항_]=제44_02조2항
제44_02조3항_='③영 제80조제1항제5호 나목에서 "기획재정부령으로 정하는 비율"이란 100분의 50을 말한다. <개정 2008. 4. 29., 2010. 4. 30.>'
제44_02조3항={}
제44_02조[제44_02조3항_]=제44_02조3항
제44_02조4항_='④ 영 제80조제1항제5호 및 제6항에 따른 지정 및 재지정은 매반기별로 한다. <신설 2014. 3. 14.>'
제44_02조4항={}
제44_02조[제44_02조4항_]=제44_02조4항
제44_02조5항_='⑤ 삭제 <2008. 4. 29.>'
제44_02조5항={}
제44_02조[제44_02조5항_]=제44_02조5항
제44_02조['[본조신설 2006. 4. 10.]']={}
제45조_=' 제45조 (접대비의 필요경비 산입한도액 계산) '
제45조={}
제45조['소득세법시행규칙 제45조 (접대비의 필요경비 산입한도액 계산)']={}
조문['제45조 (접대비의 필요경비 산입한도액 계산)']=제45조
조['제45조 (접대비의 필요경비 산입한도액 계산)']=제45조
제45조1항_='법 제35조제1항제2호를 적용할 때 해당 사업의 수입금액에 같은 호 단서에 따른 수입금액(이하 이 조에서 "기타수입금액"이라 한다)이 포함되어 있는 경우 그 기타수입금액에 대하여 법 제35조제1항제2호에 따른 적용률을 곱하여 산출한 금액의 계산에 관하여는 「법인세법 시행규칙」 제20조제1항의 규정을 준용한다. <개정 2007. 4. 17., 2010. 4. 30.>'
제45조1항={}
제45조[제45조1항_]=제45조1항
제45조['[본조신설 2005. 3. 19.]']={}
제46조_=' 제46조 삭제 '
제46조={}
제46조['소득세법시행규칙 제46조 삭제 ']={}
조문['제46조 삭제 ']=제46조
조['제46조 삭제 ']=제46조
제47조_=' 제47조 삭제 '
제47조={}
제47조['소득세법시행규칙 제47조 삭제 ']={}
조문['제47조 삭제 ']=제47조
조['제47조 삭제 ']=제47조
제48조_=' 제48조 (시가의 계산) '
제48조={}
제48조['소득세법시행규칙 제48조 (시가의 계산)']={}
조문['제48조 (시가의 계산)']=제48조
조['제48조 (시가의 계산)']=제48조
제48조1항_='영 제89조제1항제3호에서 "기획재정부령이 정하는 시가"라 함은 「법인세법 시행령」 제89조를 준용하여 계산한 금액을 말한다. <개정 2005. 3. 19., 2008. 4. 29.>'
제48조1항={}
제48조[제48조1항_]=제48조1항
제48조['[본조신설 2001. 4. 30.]']={}
제49조_=' 제49조 (연지급수입의 의의) '
제49조={}
제49조['소득세법시행규칙 제49조 (연지급수입의 의의)']={}
조문['제49조 (연지급수입의 의의)']=제49조
조['제49조 (연지급수입의 의의)']=제49조
제49조1항_='영 제89조제2항제2호에서 "기획재정부령이 정하는 연지급수입"이라 함은 다음 각 호의 어느 하나에 해당하는 것을 말한다. <개정 1998. 8. 11., 1999. 5. 7., 2005. 3. 19., 2006. 4. 10., 2007. 4. 17., 2008. 4. 29.>'
제49조1항={}
제49조[제49조1항_]=제49조1항
제49조1항1호_='1. 당해 물품의 수입대금전액을 은행이 신용을 공여하는 기한부신용장방식 또는 공급자가 신용을 공여하는 수출자신용방식에 의한 수입방법에 의하여 그 선적서류나 물품의 영수일부터 일정기간이 경과한 후에 지급하는 방법에 의한 수입'
제49조1항1호={}
제49조1항[제49조1항1호_]=제49조1항1호
제49조1항2호_='2. 수출자가 발행한 기한부 환어음을 수입자가 인수하면 선적서류나 물품이 수입자에게 인도되도록 하고 그 선적서류나 물품의 인도일부터 일정기간이 지난 후에 수입자가 해당 물품의 수입대금 전액을 지급하는 방법에 의한 수입'
제49조1항2호={}
제49조1항[제49조1항2호_]=제49조1항2호
제49조1항3호_='3. 정유회사, 원유ㆍ액화천연가스 또는 액화석유가스 수입업자가 원유ㆍ액화천연가스 또는 액화석유가스의 일람불방식ㆍ수출자신용방식 또는 사후송금방식에 따른 수입대금결제를 위하여 「외국환거래법」상 연지급수입기간이내에 단기외화자금을 차입하는 방법에 의한 수입'
제49조1항3호={}
제49조1항[제49조1항3호_]=제49조1항3호
제49조1항4호_='4. 그 밖에 제1호 내지 제3호와 유사한 연지급수입'
제49조1항4호={}
제49조1항[제49조1항4호_]=제49조1항4호
제50조_=' 제50조 (기업회계의 기준등) '
제50조={}
제50조['소득세법시행규칙 제50조 (기업회계의 기준등)']={}
조문['제50조 (기업회계의 기준등)']=제50조
조['제50조 (기업회계의 기준등)']=제50조
제50조1항_='①법 제39조제5항에 따라 총수입금액과 필요경비의 귀속연도와 자산ㆍ부채의 취득 및 평가에 적용할 수 있는 기업회계의 기준 또는 관행은 다음 각 호의 어느 하나에 해당하는 회계처리기준으로 한다. <개정 1997. 4. 23., 1998. 3. 21., 1998. 8. 11., 1999. 5. 7., 2005. 3. 19., 2008. 4. 29., 2010. 4. 30., 2015. 3. 13.>'
제50조1항={}
제50조[제50조1항_]=제50조1항
제50조1항1호_='1. 「주식회사의 외부감사에 관한 법률」 제13조에 따른 회계처리기준'
제50조1항1호={}
제50조1항[제50조1항1호_]=제50조1항1호
제50조1항2호_='2. 증권선물위원회가 정한 업종별 회계처리준칙'
제50조1항2호={}
제50조1항[제50조1항2호_]=제50조1항2호
제50조1항3호_='3. 「공기업ㆍ준정부기관 회계사무규칙」'
제50조1항3호={}
제50조1항[제50조1항3호_]=제50조1항3호
제50조1항4호_='4. 삭제 <1999. 5. 7.>'
제50조1항4호={}
제50조1항[제50조1항4호_]=제50조1항4호
제50조1항5호_='5. 기타 법령의 규정에 의하여 제정된 회계처리기준으로서 기획재정부장관의 승인을 얻은 것'
제50조1항5호={}
제50조1항[제50조1항5호_]=제50조1항5호
제50조2항_='②법 제39조제5항을 적용할 때 기업회계의 기준 또는 관행의 준수여부는 거래건별로 이를 판단한다. <신설 2000. 4. 3., 2010. 4. 30.>'
제50조2항={}
제50조[제50조2항_]=제50조2항
제50조3항_='③ 삭제 <1997. 4. 23.>'
제50조3항={}
제50조[제50조3항_]=제50조3항
제50조4항_='④ 삭제 <1999. 5. 7.>'
제50조4항={}
제50조[제50조4항_]=제50조4항
제50조['[제목개정 1999. 5. 7.]']={}
제51조_=' 제51조 (재고자산의 평가등) '
제51조={}
제51조['소득세법시행규칙 제51조 (재고자산의 평가등)']={}
조문['제51조 (재고자산의 평가등)']=제51조
조['제51조 (재고자산의 평가등)']=제51조
제51조1항_='①영 제91조제3항의 규정에 의하여 종류별ㆍ사업장별로 재고자산을 평가하고자 하는 사업자는 종목별(한국표준산업분류에 의한 중분류 또는 소분류에 의한다)ㆍ사업장별로 제조원가명세서 또는 매출원가명세서를 작성하여야 한다.'
제51조1항={}
제51조[제51조1항_]=제51조1항
제51조2항_='②영 제92조제1항제2호에서 "기획재정부령으로 정하는 시가법"이란 재고자산을 제50조제1항제1호의 규정에 의한 기업회계기준이 정하는 바에 의하여 해당 과세기간 종료일 현재의 시가로 평가하는 방법을 말한다. <개정 1998. 8. 11., 2008. 4. 29., 2010. 4. 30.>'
제51조2항={}
제51조[제51조2항_]=제51조2항
제51조3항_='③ 삭제 <1997. 4. 23.>'
제51조3항={}
제51조[제51조3항_]=제51조3항
제52조_=' 제52조 삭제 '
제52조={}
제52조['소득세법시행규칙 제52조 삭제 ']={}
조문['제52조 삭제 ']=제52조
조['제52조 삭제 ']=제52조
제53조_=' 제53조 삭제 '
제53조={}
제53조['소득세법시행규칙 제53조 삭제 ']={}
조문['제53조 삭제 ']=제53조
조['제53조 삭제 ']=제53조
제53_02조_=' 제53조의2(채권등의 범위) '
제53_02조={}
제53_02조['소득세법시행규칙 제53조의2(채권등의 범위)']={}
조문['제53조의2(채권등의 범위)']=제53_02조
조['제53조의2(채권등의 범위)']=제53_02조
제53_02조1항_='영 제102조제1항제1호에서 "기획재정부령으로 정하는 것"이란 영 제24조에 따른 금융회사 등이 해당 증서의 발행일부터 만기까지 계속하여 보유하는 예금증서(양도성예금증서는 제외한다)를 말한다.'
제53_02조1항={}
제53_02조[제53_02조1항_]=제53_02조1항
제53_02조['[전문개정 2010. 4. 30.]']={}
제53_03조_=' 제53조의3 삭제 '
제53_03조={}
제53_03조['소득세법시행규칙 제53조의3 삭제 ']={}
조문['제53조의3 삭제 ']=제53_03조
조['제53조의3 삭제 ']=제53_03조
제53_04조_=' 제53조의4(입양자증명서류등) '
제53_04조={}
제53_04조['소득세법시행규칙 제53조의4(입양자증명서류등)']={}
조문['제53조의4(입양자증명서류등)']=제53_04조
조['제53조의4(입양자증명서류등)']=제53_04조
제53_04조1항_='영 제106조제10항에서 "기획재정부령으로 정하는 서류"란 다음 각 호의 어느 하나에 해당하는 서류를 말한다. <개정 1998. 8. 11., 2001. 4. 30., 2005. 3. 19., 2007. 4. 17., 2008. 4. 29., 2009. 4. 14., 2014. 3. 14.>'
제53_04조1항={}
제53_04조[제53_04조1항_]=제53_04조1항
제53_04조1항1호_='1. 입양자임을 증명할 수 있는 서류'
제53_04조1항1호={}
제53_04조1항[제53_04조1항1호_]=제53_04조1항1호
제53_04조['입양관계증명서 또는 「입양특례법」에 따른 입양기관이 발행하는 입양증명서']={}
제53_04조2호_='2. 수급자임을 증명할 수 있는 서류'
제53_04조2호={}
제53_04조[제53_04조2호_]=제53_04조2호
제53_04조['「국민기초생활 보장법 시행규칙」 제40조의 규정에 의한 수급자증명서']={}
제53_04조3호_='3. 위탁아동임을 증명할 수 있는 서류'
제53_04조3호={}
제53_04조[제53_04조3호_]=제53_04조3호
제53_04조['해당 과세기간 종료일 이후에 발급받은 가정위탁보호확인서. 다만, 해당 과세기간에 가정위탁보호가 종결된 경우에는 종결일이 명시되어 있어야 한다.']={}
제53_04조4호_='4. 그 밖에 부양가족임을 증명할 수 있는 서류'
제53_04조4호={}
제53_04조[제53_04조4호_]=제53_04조4호
제53_04조['가족관계증명서 또는 주민등록표등본']={}
제53_04조['[전문개정 1997. 4. 23.]']={}
제53_04조['[제53조의3에서 이동 <2005. 3. 19.>]']={}
제54조_=' 제54조 (장애아동의 범위) '
제54조={}
제54조['소득세법시행규칙 제54조 (장애아동의 범위)']={}
조문['제54조 (장애아동의 범위)']=제54조
조['제54조 (장애아동의 범위)']=제54조
제54조1항_='영 제107조제1항제1호에서 "기획재정부령으로 정하는 사람"이란 「장애아동 복지지원법」 제21조제1항에 따른 발달재활서비스를 지원받고 있는 사람을 말한다.'
제54조1항={}
제54조[제54조1항_]=제54조1항
제54조['[본조신설 2018. 3. 21.]']={}
제55조_=' 제55조 삭제 '
제55조={}
제55조['소득세법시행규칙 제55조 삭제 ']={}
조문['제55조 삭제 ']=제55조
조['제55조 삭제 ']=제55조
제56조_=' 제56조 삭제 '
제56조={}
제56조['소득세법시행규칙 제56조 삭제 ']={}
조문['제56조 삭제 ']=제56조
조['제56조 삭제 ']=제56조
제57조_=' 제57조 (주택임차자금 차입금의 이자율) '
제57조={}
제57조['소득세법시행규칙 제57조 (주택임차자금 차입금의 이자율)']={}
조문['제57조 (주택임차자금 차입금의 이자율)']=제57조
조['제57조 (주택임차자금 차입금의 이자율)']=제57조
제57조1항_='영 제112조제4항제2호나목에서 "기획재정부령으로 정하는 이자율"이란 연간 1천분의 18을 말한다. <개정 2011. 3. 28., 2012. 2. 28., 2013. 2. 23., 2014. 3. 14., 2015. 3. 13., 2016. 3. 16., 2017. 3. 10., 2018. 3. 21.>'
제57조1항={}
제57조[제57조1항_]=제57조1항
제57조['[본조신설 2010. 4. 30.]']={}
제58조_=' 제58조 (특별소득공제 및 특별세액공제) '
제58조={}
제58조['소득세법시행규칙 제58조 (특별소득공제 및 특별세액공제)']={}
조문['제58조 (특별소득공제 및 특별세액공제)']=제58조
조['제58조 (특별소득공제 및 특별세액공제)']=제58조
제58조1항_='①영 제113조제1항 각 호 외의 부분 본문에서 "기획재정부령으로 정하는 서류"란 다음 각 호의 서류[국세청장이 정하여 고시하는 기준에 해당하는 자로서 국세청장이 지정하는 자가 인터넷을 통하여 발급하는 서류(이하 이 조에서 "인터넷증빙서류"라 한다)를 포함한다]를 말한다. <개정 1998. 3. 21., 1998. 8. 11., 1999. 5. 7., 2000. 4. 3., 2001. 4. 30., 2002. 4. 13., 2003. 4. 14., 2004. 3. 5., 2005. 3. 19., 2006. 4. 10., 2007. 4. 17., 2008. 4. 29., 2009. 4. 14., 2010. 4. 30., 2011. 3. 28., 2013. 9. 27., 2014. 3. 14., 2017. 3. 10.>'
제58조1항={}
제58조[제58조1항_]=제58조1항
제58조1항1호_='1. 법 제59조의4제1항에 따른 보험료 세액공제에 있어서는 보험료납입증명서 또는 보험료납입영수증으로서 제61조의3에 따라 보험료 공제대상임이 표시되거나 영 제118조의4제1항에 따라 장애인전용보험으로 표시된 것'
제58조1항1호={}
제58조1항[제58조1항1호_]=제58조1항1호
제58조1항2호_='2. 법 제59조의4제2항에 따른 의료비 세액공제에 있어서는 의료비지급명세서. 이 경우 다음 각 목의 어느 하나에 해당하는 의료비영수증을 첨부하여야 한다.'
제58조1항2호={}
제58조1항[제58조1항2호_]=제58조1항2호
제58조1항2호가목_='가. 「의료법」에 따른 의료기관 및 「약사법」에 따른 약국에 지급한 의료비의 경우에는 「국민건강보험 요양급여의 기준에 관한 규칙」 제7조제1항에 따른 계산서ㆍ영수증, 동조제2항에 따른 진료비(약제비) 납입확인서 또는 「국민건강보험법」에 따른 국민건강보험공단의 이사장이 발행하는 의료비부담명세서'
제58조1항2호가목={}
제58조1항2호[제58조1항2호가목_]=제58조1항2호가목
제58조1항2호나목_='나. 안경 또는 콘택트렌즈 구입비용의 경우에는 사용자의 성명 및 시력교정용임을 안경사가 확인한 영수증'
제58조1항2호나목={}
제58조1항2호[제58조1항2호나목_]=제58조1항2호나목
제58조1항2호다목_='다. 보청기 또는 장애인보장구 구입비용의 경우에는 사용자의 성명을 판매자가 확인한 영수증'
제58조1항2호다목={}
제58조1항2호[제58조1항2호다목_]=제58조1항2호다목
제58조1항2호라목_='라. 영 제118조의5제1항제3호에 따른 의료기기 구입비용 또는 임차비용의 경우에는 의사ㆍ치과의사ㆍ한의사의 처방전과 판매자 또는 임대인이 발행한 의료기기명이 적힌 의료비영수증'
제58조1항2호라목={}
제58조1항2호[제58조1항2호라목_]=제58조1항2호라목
제58조1항3호_='3. 법 제59조의4제3항에 따른 교육비 세액공제의 경우에는 교육비납입증명서. 다만, 법령에 따라 자녀학비보조수당을 받은 자의 경우에는 자녀학비보조수당 금액의 범위에서 해당 법령이 정하는 바에 따라 소속기관장에게 이미 제출한 취학자녀의 재학증명서로 갈음할 수 있으며, 법 제59조의4제3항제3호에 따른 특수교육비의 경우에는 같은 호 가목 또는 나목에 해당하는 시설 또는 법인임을 해당 납입증명서를 발급한 자가 입증하는 서류를 첨부하여야 한다.'
제58조1항3호={}
제58조1항[제58조1항3호_]=제58조1항3호
제58조1항3_02호_='3의2. 법 제59조의4제3항제1호나목의 「학점인정 등에 관한 법률」에 따른 학위취득과정의 교육비 세액공제의 경우에는 다음 각 목의 서류'
제58조1항3_02호={}
제58조1항[제58조1항3_02호_]=제58조1항3_02호
제58조1항3_02호가목_='가. 「고등교육법」에 의한 대학ㆍ전문대학 및 이에 준하는 학교에서 이수하는 교육과정의 경우에는 당해 학교가 발행하는 교육비납입증명서'
제58조1항3_02호가목={}
제58조1항3_02호[제58조1항3_02호가목_]=제58조1항3_02호가목
제58조1항3_02호나목_='나. 가목에 규정된 학교 외의 교육기관에서 이수하는 교육과정의 경우에는 해당 교육기관이 발행(인터넷으로 발행하는 것을 포함한다. 이하 이 목에서 같다)하는 교육비납입증명서. 다만, 해당 교육기관이 해산 등으로 발행할 수 없는 경우에는 「평생교육법」 제19조제1항에 따른 국가평생교육연구원에서 발행하는 교육비납입증명서를 말한다.'
제58조1항3_02호나목={}
제58조1항3_02호[제58조1항3_02호나목_]=제58조1항3_02호나목
제58조1항3_03호_='3의3. 법 제59조의4제3항제1호나목의 「독학에 의한 학위취득에 관한 법률」에 따른 학위취득과정의 교육비 세액공제의 경우에는 해당 교육기관이 발행하는 교육비납입증명서'
제58조1항3_03호={}
제58조1항[제58조1항3_03호_]=제58조1항3_03호
제58조1항3_04호_='3의4. 법 제59조의4제3항제1호다목에 따른 국외교육비의 공제에 있어서는 영 제118조의6제4항 및 제5항의 요건을 갖춘 자임을 입증할 수 있는 서류'
제58조1항3_04호={}
제58조1항[제58조1항3_04호_]=제58조1항3_04호
제58조1항3_05호_='3의5. 영 제118조의6제1항제5호에 따른 공제 중 학교 외에서 구입한 초ㆍ중ㆍ고등학교의 방과후 학교 수업용 도서는 방과후 학교 수업용 도서 구입 증명서'
제58조1항3_05호={}
제58조1항[제58조1항3_05호_]=제58조1항3_05호
제58조1항4호_='4. 법 제52조제4항 및 제5항에 따른 주택자금공제의 경우에는 다음 각 목의 서류'
제58조1항4호={}
제58조1항[제58조1항4호_]=제58조1항4호
제58조1항4호가목_='가. 주택자금상환등증명서(법 제52조제4항제2호에 따른 월세액에 대한 공제의 경우는 제외한다) 또는 장기주택저당차입금이자상환증명서'
제58조1항4호가목={}
제58조1항4호[제58조1항4호가목_]=제58조1항4호가목
제58조1항4호나목_='나. 주민등록표등본'
제58조1항4호나목={}
제58조1항4호[제58조1항4호나목_]=제58조1항4호나목
제58조1항4호다목_='다. 법 제52조제4항제2호에 따른 월세액에 대한 공제에 대해서는 임대차계약증서 사본 및 현금영수증, 계좌이체 영수증, 무통장입금증 등 주택 임대인에게 월세액을 지급하였음을 증명할 수 있는 서류'
제58조1항4호다목={}
제58조1항4호[제58조1항4호다목_]=제58조1항4호다목
제58조1항4호라목_='라. 법 제52조제5항에 따른 장기주택저당차입금의 이자상환액에 대한 공제에 대하여는 그 차입금으로 취득한 주택의 가액 또는 주택분양권의 가격을 확인할 수 있는 다음의 어느 하나에 해당하는 서류와 등기사항증명서 또는 분양계약서'
제58조1항4호라목={}
제58조1항4호[제58조1항4호라목_]=제58조1항4호라목
제58조1항4호라목1반_='1) 「부동산가격공시에 관한 법률 시행규칙」 제13조에 따른 개별주택가격 확인서'
제58조1항4호라목1반={}
제58조1항4호라목[제58조1항4호라목1반_]=제58조1항4호라목1반
제58조1항4호라목2반_='2) 「부동산가격공시에 관한 법률 시행규칙」 제17조에 따른 공동주택가격 확인서'
제58조1항4호라목2반={}
제58조1항4호라목[제58조1항4호라목2반_]=제58조1항4호라목2반
제58조1항4호라목3반_='3) 1) 및 2)에 따른 서류 외에 주택의 가액 또는 주택분양권의 가격을 확인할 수 있는 서류로서 국세청장이 고시하는 서류'
제58조1항4호라목3반={}
제58조1항4호라목[제58조1항4호라목3반_]=제58조1항4호라목3반
제58조1항4호마목_='마. 영 제112조제4항제2호에 따른 차입금에 대한 공제에 대해서는 임대차계약증서 사본(영 제112조제4항제1호 후단 또는 같은 항 제2호 후단에 따라 공제를 받는 경우에는 임대차계약을 연장 또는 갱신하거나 이주를 하기 전의 임대차계약에 대한 임대차계약 증서 사본을 포함한다), 금전소비대차계약서 사본, 계좌이체 영수증 및 무통장입금증 등 해당 차입금에 대한 원리금을 대주(貸主)에게 상환하였음을 증명할 수 있는 서류'
제58조1항4호마목={}
제58조1항4호[제58조1항4호마목_]=제58조1항4호마목
제58조1항4호바목_='바. 영 제112조제9항제1호에 따른 차입금을 상환하는 경우에는 다음의 해당서류'
제58조1항4호바목={}
제58조1항4호[제58조1항4호바목_]=제58조1항4호바목
제58조1항4호바목1반_='(1) 자기가 건설한 주택(주택조합 또는 정비사업조합의 조합원이 취득한 주택을 포함한다): 사용승인서 또는 사용검사서(임시사용승인서를 포함한다) 사본'
제58조1항4호바목1반={}
제58조1항4호바목[제58조1항4호바목1반_]=제58조1항4호바목1반
제58조1항4호바목2반_='(2) 주택건설사업자가 건설한 주택: 주택매매계약서사본, 계약금을 납부한 사실을 입증할 수 있는 서류 및 「조세특례제한법」 제99조제1항제2호 단서에 해당하지 아니함을 확인하는 주택건설사업자의 확인서'
제58조1항4호바목2반={}
제58조1항4호바목[제58조1항4호바목2반_]=제58조1항4호바목2반
제58조1항4호사목_='사. 영 제112조제9항제2호 및 제4호에 따른 차입금의 경우에는 기존 및 신규 차입금의 대출계약서 사본'
제58조1항4호사목={}
제58조1항4호[제58조1항4호사목_]=제58조1항4호사목
제58조1항5호_='5. 법 제59조의4제4항에 따른 공제에 있어서는 기부금명세서. 이 경우 기부금영수증을 첨부하되, 「정치자금에 관한 법률」 등 관련 법령에서 영수증을 별도로 정하고 있는 경우에는 해당 법령에서 정하는 바에 따르며, 원천징수의무자가 기부금을 일괄징수하는 경우에는 기부금영수증을 첨부하지 아니할 수 있다.'
제58조1항5호={}
제58조1항[제58조1항5호_]=제58조1항5호
제58조1항6호_='6. 삭제 <2009. 4. 14.>'
제58조1항6호={}
제58조1항[제58조1항6호_]=제58조1항6호
제58조2항_='② 삭제 <2009. 4. 14.>'
제58조2항={}
제58조[제58조2항_]=제58조2항
제58조3항_='③법 제52조제1항ㆍ제4항ㆍ제5항 및 제59조의4제1항부터 제4항까지의 규정에 따른 특별소득공제 및 특별세액공제를 받기 위하여 제1항제3호의4, 같은 항 제4호나목ㆍ라목 및 바목에 따른 서류를 제출하고 그 이후 변동사항이 없는 경우에는 그 다음 과세기간분부터는 해당 서류를 제출하지 아니할 수 있다. <신설 2001. 4. 30., 2002. 4. 13., 2004. 3. 5., 2009. 4. 14., 2010. 4. 30., 2014. 3. 14.>'
제58조3항={}
제58조[제58조3항_]=제58조3항
제58조4항_='④국세청장은 제1항에 따른 인터넷증빙서류에 관하여 다음 각 호의 사항을 정하여 고시하여야 한다. <개정 2006. 4. 10., 2014. 3. 14.>'
제58조4항={}
제58조[제58조4항_]=제58조4항
제58조4항1호_='1. 인터넷증빙서류 신청자 및 발급자의 인적사항의 표기에 관한 사항'
제58조4항1호={}
제58조4항[제58조4항1호_]=제58조4항1호
제58조4항2호_='2. 소득ㆍ세액 공제 대상금액의 표기에 관한 사항'
제58조4항2호={}
제58조4항[제58조4항2호_]=제58조4항2호
제58조4항3호_='3. 암호화코드ㆍ복사방지마크 등 위조 또는 변조 방지장치에 관한 사항'
제58조4항3호={}
제58조4항[제58조4항3호_]=제58조4항3호
제58조4항4호_='4. 그 밖에 인터넷증빙서류가 갖추어야 할 요건에 관한 사항'
제58조4항4호={}
제58조4항[제58조4항4호_]=제58조4항4호
제58조5항_='⑤영 제113조제2항에서 "기획재정부령이 정하는 서류"란 영 제216조의3제1항 각 호의 지급액에 관한 서류로서 소득ㆍ세액 공제 명세를 일괄적으로 적어 국세청장이 발급하는 서류를 말한다. <신설 2006. 4. 10., 2008. 4. 29., 2014. 3. 14.>'
제58조5항={}
제58조[제58조5항_]=제58조5항
제58조['[제목개정 2014. 3. 14.]']={}
제58_02조_=' 제58조의2(성실사업자의 범위) '
제58_02조={}
제58_02조['소득세법시행규칙 제58조의2(성실사업자의 범위)']={}
조문['제58조의2(성실사업자의 범위)']=제58_02조
조['제58조의2(성실사업자의 범위)']=제58_02조
제58_02조1항_='영 제118조의8제1항제1호나목에서 "「조세특례제한법」 제5조의2제1호에 따른 전사적(全社的) 기업자원 관리설비 또는 「유통산업발전법」에 따라 판매시점정보관리시스템설비를 도입한 사업자 등 기획재정부령으로 정하는 사업자"란 다음 각 호의 어느 하나에 해당하는 사업자를 말한다. <개정 2008. 4. 29., 2009. 4. 14., 2013. 6. 28., 2014. 3. 14.>'
제58_02조1항={}
제58_02조[제58_02조1항_]=제58_02조1항
제58_02조1항1호_='1. 「조세특례제한법」 제5조의2제1호에 따른 전사적(全社的) 기업자원관리설비 또는 「유통산업발전법」에 따른 판매시점정보관리시스템설비를 도입한 사업자'
제58_02조1항1호={}
제58_02조1항[제58_02조1항1호_]=제58_02조1항1호
제58_02조1항2호_='2. 「영화 및 비디오물의 진흥에 관한 법률」에 따라 설립된 영화진흥위원회가 운영하는 영화상영관입장권통합전산망에 가입한 사업자'
제58_02조1항2호={}
제58_02조1항[제58_02조1항2호_]=제58_02조1항2호
제58_02조1항3호_='3. 전자상거래사업을 영위하는 사업자로서 다음 각 목의 어느 하나에 해당하는 사업자'
제58_02조1항3호={}
제58_02조1항[제58_02조1항3호_]=제58_02조1항3호
제58_02조1항3호가목_='가. 「여신전문금융업법」에 따른 결제대행업체를 통해서만 매출대금의 결제가 이루어지는 사업자'
제58_02조1항3호가목={}
제58_02조1항3호[제58_02조1항3호가목_]=제58_02조1항3호가목
제58_02조1항3호나목_='나. 납세지관할세무서장에게 신고한 사업용 계좌를 통해서만 매출대금의 결제가 이루어지는 사업자'
제58_02조1항3호나목={}
제58_02조1항3호[제58_02조1항3호나목_]=제58_02조1항3호나목
제58_02조1항3호다목_='다. 가목 및 나목의 방식으로만 매출대금의 결제가 이루어지는 사업자'
제58_02조1항3호다목={}
제58_02조1항3호[제58_02조1항3호다목_]=제58_02조1항3호다목
제58_02조1항4호_='4. 지방자치단체의 장의 주관 하에 수입금액이 공동으로 관리ㆍ배분되는 버스운송사업을 영위하는 사업자'
제58_02조1항4호={}
제58_02조1항[제58_02조1항4호_]=제58_02조1항4호
제58_02조1항5호_='5. 「부가가치세법」 제21조에 따른 수출에 의해서만 거래가 이루어지는 사업자'
제58_02조1항5호={}
제58_02조1항[제58_02조1항5호_]=제58_02조1항5호
제58_02조1항6호_='6. 납세지관할세무서장에게 신고한 사업용 계좌를 통해서만 매출 및 매입대금의 결제가 이루어지는 사업자'
제58_02조1항6호={}
제58_02조1항[제58_02조1항6호_]=제58_02조1항6호
제58_02조1항7호_='7. 「부가가치세법 시행령」 제42조에 따른 인적용역을 제공하고 그 수입금액이 원천징수되는 사업자'
제58_02조1항7호={}
제58_02조1항[제58_02조1항7호_]=제58_02조1항7호
제58_02조['[본조신설 2007. 4. 17.]']={}
제58_03조_=' 제58조의3(성실사업자의 판정기준) '
제58_03조={}
제58_03조['소득세법시행규칙 제58조의3(성실사업자의 판정기준)']={}
조문['제58조의3(성실사업자의 판정기준)']=제58_03조
조['제58조의3(성실사업자의 판정기준)']=제58_03조
제58_03조1항_='①다음 각 호의 구분에 따른 요건을 충족하는 경우에는 해당 과세기간 동안 영 제118조의8제1항제1호가목의 요건을 갖춘 것으로 판정한다. <개정 2014. 3. 14.>'
제58_03조1항={}
제58_03조[제58_03조1항_]=제58_03조1항
제58_03조1항1호_='1. 영 제210조의3제1항에 따른 현금영수증가맹점 가입대상자에 해당하는 사업자 : 다음 각 목의 어느 하나에 해당하는 경우'
제58_03조1항1호={}
제58_03조1항[제58_03조1항1호_]=제58_03조1항1호
제58_03조1항1호가목_='가. 법 제162조의3제1항에 따른 기간 이내에 현금영수증가맹점 및 신용카드가맹점으로 가입되어 있는 경우'
제58_03조1항1호가목={}
제58_03조1항1호[제58_03조1항1호가목_]=제58_03조1항1호가목
제58_03조1항1호나목_='나. 가목 외의 경우로서 해당 과세기간의 직전 과세기간에 현금영수증가맹점 및 신용카드가맹점으로 가입한 경우'
제58_03조1항1호나목={}
제58_03조1항1호[제58_03조1항1호나목_]=제58_03조1항1호나목
제58_03조1항2호_='2. 제1호 외의 사업자 : 해당 과세기간 중 현금영수증가맹점 및 신용카드가맹점에서 탈퇴한 사실이 없는 경우로서 해당 과세기간 종료일 현재 6개월 이상 동일한 기간 동안 계속하여 현금영수증가맹점 및 신용카드가맹점으로 가입되어 있는 경우'
제58_03조1항2호={}
제58_03조1항[제58_03조1항2호_]=제58_03조1항2호
제58_03조2항_='②제58조의2 각 호의 어느 하나에 해당하는 사업자가 해당 과세기간 동안 계속하여 그 사업을 영위하고 있는 경우에는 영 제118조의8제1항제1호나목의 요건을 충족한 것으로 판정한다. <개정 2014. 3. 14.>'
제58_03조2항={}
제58_03조[제58_03조2항_]=제58_03조2항
제58_03조3항_='③다음 각 호의 구분에 따른 요건을 충족하는 경우에는 해당 과세기간 동안 영 제118조의8제1항제3호에 따른 요건 중 사업용계좌의 신고의 요건을 갖춘 것으로 판정한다. <개정 2011. 3. 28., 2014. 3. 14.>'
제58_03조3항={}
제58_03조[제58_03조3항_]=제58_03조3항
제58_03조3항1호_='1. 법 제160조제3항에 따른 복식부기의무자 : 다음 각 목의 어느 하나에 해당하는 경우'
제58_03조3항1호={}
제58_03조3항[제58_03조3항1호_]=제58_03조3항1호
제58_03조3항1호가목_='가. 법 제160조의5제3항에 따른 기간 이내에 사업용계좌가 신고되어 있는 경우'
제58_03조3항1호가목={}
제58_03조3항1호[제58_03조3항1호가목_]=제58_03조3항1호가목
제58_03조3항1호나목_='나. 가목 외의 경우로서 직전 과세기간에 사업용계좌를 신고한 경우'
제58_03조3항1호나목={}
제58_03조3항1호[제58_03조3항1호나목_]=제58_03조3항1호나목
제58_03조3항2호_='2. 제1호 외의 사업자 : 해당 과세기간의 종료일 6월 이전에 사업용계좌가 신고되어 있는 경우'
제58_03조3항2호={}
제58_03조3항[제58_03조3항2호_]=제58_03조3항2호
제58_03조['[본조신설 2007. 4. 17.]']={}
제59조_=' 제59조 (일시퇴거자 동거상황표) '
제59조={}
제59조['소득세법시행규칙 제59조 (일시퇴거자 동거상황표)']={}
조문['제59조 (일시퇴거자 동거상황표)']=제59조
조['제59조 (일시퇴거자 동거상황표)']=제59조
제59조1항_='영 제114조제3항에 따라 주민등록표등본을 제출하여야 할 일시퇴거자가 기숙사, 그 밖에 다수인이 동거하는 숙소에 거주하는 때에는 주민등록표초본으로 그 등본에 갈음할 수 있다. <개정 2009. 4. 14.>'
제59조1항={}
제59조[제59조1항_]=제59조1항
제60조_=' 제60조 (외국납부세액공제) '
제60조={}
제60조['소득세법시행규칙 제60조 (외국납부세액공제)']={}
조문['제60조 (외국납부세액공제)']=제60조
조['제60조 (외국납부세액공제)']=제60조
제60조1항_='①국외원천소득이 종합소득ㆍ퇴직소득 또는 양도소득으로 구분하여 과세되지 아니한 외국납부세액에 대한 세액공제액은 종합소득금액ㆍ퇴직소득금액 또는 양도소득금액에 의하여 안분 계산한다. <개정 2007. 4. 17.>'
제60조1항={}
제60조[제60조1항_]=제60조1항
제60조2항_='②외국납부세액의 원화환산은 외국세액을 납부한 때의 「외국환거래법」에 의한 기준환율 또는 재정환율에 의한다. <개정 1999. 5. 7., 2005. 3. 19.>'
제60조2항={}
제60조[제60조2항_]=제60조2항
제60조3항_='③영 제117조제2항에서 "기획재정부령으로 정하는 금액"이란 다음 계산식에 따라 계산한 금액을 말한다. <개정 2012. 2. 28.>'
제60조3항={}
제60조[제60조3항_]=제60조3항
제60조['']={}
제60조4항_='④ 국내에서 공제받은 외국납부세액을 외국에서 환급받아 국내에서 추가로 세액을 납부할 경우의 원화환산은 제2항에 따라 적용한 해당 외국납부세액을 납부한 때의 「외국환거래법」에 따른 기준환율 또는 재정환율에 따른다. 다만, 환급받은 세액의 납부일이 분명하지 아니할 경우에는 해당 과세기간 동안 해당 국가에 납부한 외국납부세액의 제2항에 따라 환산한 원화 합계액을 해당 과세기간 동안 해당 국가에 납부한 외국납부세액의 합계액으로 나누어 계산한 환율에 따른다. <신설 2014. 3. 14.>'
제60조4항={}
제60조[제60조4항_]=제60조4항
제61조_=' 제61조 (재해손실세액공제) '
제61조={}
제61조['소득세법시행규칙 제61조 (재해손실세액공제)']={}
조문['제61조 (재해손실세액공제)']=제61조
조['제61조 (재해손실세액공제)']=제61조
제61조1항_='법 제58조제1항을 적용할 때 사업소득에 대한 소득세액은 다음 계산식에 따라 계산한 금액으로 한다.'
제61조1항={}
제61조[제61조1항_]=제61조1항
제61조['']={}
제61조['[전문개정 2012. 2. 28.]']={}
제61_02조_=' 제61조의2(연금계좌세액공제 증명서류) '
제61_02조={}
제61_02조['소득세법시행규칙 제61조의2(연금계좌세액공제 증명서류)']={}
조문['제61조의2(연금계좌세액공제 증명서류)']=제61_02조
조['제61조의2(연금계좌세액공제 증명서류)']=제61_02조
제61_02조1항_='영 제118조의2제2항에서 "기획재정부령으로 정하는 서류"란 영 제216조의3제1항제1호에 따른 지급액에 관한 서류로서 세액공제 명세를 적어 국세청장이 발급하는 서류를 말한다.'
제61_02조1항={}
제61_02조[제61_02조1항_]=제61_02조1항
제61_02조['[본조신설 2014. 3. 14.]']={}
제61_03조_=' 제61조의3(공제대상보험료의 범위) '
제61_03조={}
제61_03조['소득세법시행규칙 제61조의3(공제대상보험료의 범위)']={}
조문['제61조의3(공제대상보험료의 범위)']=제61_03조
조['제61조의3(공제대상보험료의 범위)']=제61_03조
제61_03조1항_='영 제118조의4제2항 각 호 외의 부분에서 "기획재정부령으로 정하는 것"이란 만기에 환급되는 금액이 납입보험료를 초과하지 아니하는 보험으로서 보험계약 또는 보험료납입영수증에 보험료 공제대상임이 표시된 보험의 보험료를 말한다.'
제61_03조1항={}
제61_03조[제61_03조1항_]=제61_03조1항
제61_03조['[본조신설 2014. 3. 14.]']={}
제61_04조_=' 제61조의4(중증질환자 등의 범위) '
제61_04조={}
제61_04조['소득세법시행규칙 제61조의4(중증질환자 등의 범위)']={}
조문['제61조의4(중증질환자 등의 범위)']=제61_04조
조['제61조의4(중증질환자 등의 범위)']=제61_04조
제61_04조1항_='영 제118조의5제4항에서 "기획재정부령으로 정하는 사람"이란 「국민건강보험법 시행령」 제19조제1항에 따라 보건복지부장관이 정하여 고시하는 기준에 따라 중증질환자, 희귀난치성질환자 또는 결핵환자 산정특례 대상자로 등록되거나 재등록된 자를 말한다.'
제61_04조1항={}
제61_04조[제61_04조1항_]=제61_04조1항
제61_04조['[전문개정 2018. 3. 21.]']={}
제61_05조_=' 제61조의5(체육시설업자의 범위) '
제61_05조={}
제61_05조['소득세법시행규칙 제61조의5(체육시설업자의 범위)']={}
조문['제61조의5(체육시설업자의 범위)']=제61_05조
조['제61조의5(체육시설업자의 범위)']=제61_05조
제61_05조1항_='영 제118조의6제6항제1호에서 "기획재정부령으로 정하는 체육시설업자"란 합기도장ㆍ국선도장ㆍ공수도장 및 단학장 등 「체육시설의 설치ㆍ이용에 관한 법률」에 따른 체육시설업자가 운영하는 체육시설과 유사한 체육시설(「민법」 제32조에 따라 설립된 비영리법인이 운영하는 체육시설을 포함한다)을 운영하는 자로서 다음 각 호의 어느 하나를 발급받거나 부여받은 자를 말한다.'
제61_05조1항={}
제61_05조[제61_05조1항_]=제61_05조1항
제61_05조1항1호_='1. 법 제168조제3항, 「법인세법」 제111조제3항 또는 「부가가치세법」 제8조제5항에 따른 사업자등록증'
제61_05조1항1호={}
제61_05조1항[제61_05조1항1호_]=제61_05조1항1호
제61_05조1항2호_='2. 「소득세법」 제168조제5항 또는 「법인세법 시행령」 제154조제3항에 따른 고유번호'
제61_05조1항2호={}
제61_05조1항[제61_05조1항2호_]=제61_05조1항2호
제61_05조['[본조신설 2014. 3. 14.]']={}
제61_05조['[제61조의4에서 이동 <2015. 3. 13.>]']={}
제61_06조_=' 제61조의6(교육비 세액공제 적용대상인 유사한 학자금 대출의 범위) '
제61_06조={}
제61_06조['소득세법시행규칙 제61조의6(교육비 세액공제 적용대상인 유사한 학자금 대출의 범위)']={}
조문['제61조의6(교육비 세액공제 적용대상인 유사한 학자금 대출의 범위)']=제61_06조
조['제61조의6(교육비 세액공제 적용대상인 유사한 학자금 대출의 범위)']=제61_06조
제61_06조1항_='영 제118조의6제9항제4호에서 "기획재정부령으로 정하는 대출"이란 다음 각 호의 어느 하나에 해당하는 대출을 말한다.'
제61_06조1항={}
제61_06조[제61_06조1항_]=제61_06조1항
제61_06조1항1호_='1. 「한국장학재단 설립 등에 관한 법률」 제2조제3호의2에 따른 전환대출'
제61_06조1항1호={}
제61_06조1항[제61_06조1항1호_]=제61_06조1항1호
제61_06조1항2호_='2. 「한국장학재단 설립 등에 관한 법률」 제2조제4호의2에 따른 구상채권 행사의 원인이 된 학자금 대출'
제61_06조1항2호={}
제61_06조1항[제61_06조1항2호_]=제61_06조1항2호
제61_06조1항3호_='3. 법률 제9415호 한국장학재단 설립 등에 관한 법률 부칙 제5조에 따라 승계된 학자금 대출'
제61_06조1항3호={}
제61_06조1항[제61_06조1항3호_]=제61_06조1항3호
제61_06조['[본조신설 2017. 3. 10.]']={}
제62조_=' 제62조 (공통손익의 계산과 구분경리) '
제62조={}
제62조['소득세법시행규칙 제62조 (공통손익의 계산과 구분경리)']={}
조문['제62조 (공통손익의 계산과 구분경리)']=제62조
조['제62조 (공통손익의 계산과 구분경리)']=제62조
제62조1항_='① 법 및 「조세특례제한법」 제3조제1항에 따른 법률에 따라 소득세가 감면되는 사업과 그 밖의 사업을 겸영하는 경우에 감면사업과 그 밖의 사업의 공통수입금액과 공통필요경비는 다음 각 호의 기준에 따라 구분하여 계산한다. 다만, 공통수입금액 또는 공통필요경비를 구분계산할 때 개별필요경비(공통필요경비 외의 필요경비의 합계액을 말한다. 이하 이 조에서 같다)가 없거나 그 밖의 사유로 다음 각 호의 규정을 적용할 수 없거나 이를 적용하는 것이 불합리한 경우에는 그 공통필요경비의 비용항목에 따라 국세청장이 정하는 작업시간, 사용시간, 사용면적 등의 기준에 따라 안분계산한다.'
제62조1항={}
제62조[제62조1항_]=제62조1항
제62조1항1호_='1. 감면사업과 그 밖의 사업의 공통수입금액은 해당 사업의 총수입금액에 비례하여 안분계산한다.'
제62조1항1호={}
제62조1항[제62조1항1호_]=제62조1항1호
제62조1항2호_='2. 감면사업과 그 밖의 사업의 업종이 같은 경우의 공통필요경비는 해당 사업의 총수입금액에 비례하여 안분계산한다.'
제62조1항2호={}
제62조1항[제62조1항2호_]=제62조1항2호
제62조1항3호_='3. 감면사업과 그 밖의 사업의 업종이 같지 아니한 경우의 공통필요경비는 감면사업과 그 밖의 사업의 개별 필요경비에 비례하여 안분계산한다.'
제62조1항3호={}
제62조1항[제62조1항3호_]=제62조1항3호
제62조2항_='② 법 및 「조세특례제한법」 제3조제1항에 따른 법률에 따른 경리의 구분은 각각의 해당 규정에 따라 구분하여야 할 사업 또는 수입별로 총수입금액과 필요경비를 장부상 각각 독립된 계정과목에 의하여 구분기장하는 것으로 한다. 다만, 각 사업 또는 수입에 공통되는 총수입금액과 필요경비는 그러하지 아니하다.'
제62조2항={}
제62조[제62조2항_]=제62조2항
제62조['[본조신설 2010. 4. 30.]']={}
제63조_=' 제63조 삭제 '
제63조={}
제63조['소득세법시행규칙 제63조 삭제 ']={}
조문['제63조 삭제 ']=제63조
조['제63조 삭제 ']=제63조
제63_02조_=' 제63조의2(필요경비의 안분 계산) '
제63_02조={}
제63_02조['소득세법시행규칙 제63조의2(필요경비의 안분 계산)']={}
조문['제63조의2(필요경비의 안분 계산)']=제63_02조
조['제63조의2(필요경비의 안분 계산)']=제63_02조
제63_02조1항_='① 영 제122조제5항에 따른 안분 계산은 같은 조 제4항에 따른 주거용 건물 및 다른 목적의 건물(각각에 부수되는 토지를 포함한다. 이하 이 조에서 같다)에 공통되는 필요경비를 해당 주거용 건물 및 다른 목적의 건물 각각의 가액에 비례하여 안분 계산하는 방식에 따른다.'
제63_02조1항={}
제63_02조[제63_02조1항_]=제63_02조1항
제63_02조2항_='② 제1항을 적용할 때 해당 주거용 건물 및 다른 목적의 건물의 가액의 구분이 불분명한 경우에는 해당 주거용 건물 및 다른 목적의 건물의 각각의 기준시가에 따라 안분 계산한다.'
제63_02조2항={}
제63_02조[제63_02조2항_]=제63_02조2항
제63_02조['[본조신설 2011. 3. 28.]']={}
제64조_=' 제64조 (중간예납에서 제외되는 소득) '
제64조={}
제64조['소득세법시행규칙 제64조 (중간예납에서 제외되는 소득)']={}
조문['제64조 (중간예납에서 제외되는 소득)']=제64조
조['제64조 (중간예납에서 제외되는 소득)']=제64조
제64조1항_='영 제123조제4호에서 "기획재정부령이 정하는 소득"이란 다음 각 호의 어느 하나에 규정하는 사업에서 발생한 소득을 말한다. 다만, 제3호의 경우에는 법 제144조의2에 따라 원천징수의무자가 직전 과세기간에 대한 사업소득세액의 연말정산을 한 것에 한정한다. <개정 1998. 3. 21., 1998. 8. 11., 2001. 4. 30., 2005. 3. 19., 2007. 4. 17., 2008. 4. 29., 2009. 4. 14., 2010. 4. 30., 2011. 3. 28., 2012. 8. 16.>'
제64조1항={}
제64조[제64조1항_]=제64조1항
제64조1항1호_='1. 법 제19조제1항제17호에 따른 사업 중 다음 각 목의 어느 하나에 해당하는 사업'
제64조1항1호={}
제64조1항[제64조1항1호_]=제64조1항1호
제64조1항1호가목_='가. 저술가, 화가, 배우, 가수, 영화감독, 연출가, 촬영사 등 자영 예술가'
제64조1항1호가목={}
제64조1항1호[제64조1항1호가목_]=제64조1항1호가목
제64조1항1호나목_='나. 직업선수, 코치, 심판 등 가목 외의 기타 스포츠 서비스업'
제64조1항1호나목={}
제64조1항1호[제64조1항1호나목_]=제64조1항1호나목
제64조1항2호_='2. 독립된 자격으로 보험가입자의 모집ㆍ증권매매의 권유ㆍ저축의 권장 또는 집금 등을 행하거나 이와 유사한 용역을 제공하고 그 실적에 따라 모집수당ㆍ권장수당ㆍ집금수당 등을 받는 업'
제64조1항2호={}
제64조1항[제64조1항2호_]=제64조1항2호
제64조1항3호_='3. 「방문판매 등에 관한 법률」에 의하여 방문판매업자 또는 후원방문판매업자를 대신하여 방문판매업무 또는 후원방문판매업무를 수행하고 그 실적에 따라 판매수당등을 받는 업'
제64조1항3호={}
제64조1항[제64조1항3호_]=제64조1항3호
제64조1항4호_='4. 「조세특례제한법」 제104조의7제1항에 따라 「소득세법」이 적용되는 전환정비사업조합의 조합원이 영위하는 공동사업'
제64조1항4호={}
제64조1항[제64조1항4호_]=제64조1항4호
제64조1항5호_='5. 「소득세법」이 적용되는 「주택법」 제2조제11호의 주택조합의 조합원이 영위하는 공동사업'
제64조1항5호={}
제64조1항[제64조1항5호_]=제64조1항5호
제64조['[전문개정 1997. 4. 23.]']={}
제65조_=' 제65조 (종합소득과세표준확정신고 등) '
제65조={}
제65조['소득세법시행규칙 제65조 (종합소득과세표준확정신고 등)']={}
조문['제65조 (종합소득과세표준확정신고 등)']=제65조
조['제65조 (종합소득과세표준확정신고 등)']=제65조
제65조1항_='①영 제130조제1항에 따른 종합소득 과세표준확정신고 및 납부계산서에는 소득ㆍ세액 공제신고서를 첨부하여야 한다. 다만, 과세표준확정신고를 하여야 할 자가 원천징수의무자에게 법 제140조제1항에 따른 근로소득자 소득ㆍ세액 공제신고서 또는 영 제201조의12 및 제202조의4제2항에 따른 소득ㆍ세액 공제신고서를 제출하여 연말정산을 받은 경우에는 소득ㆍ세액 공제신고서를 제출한 것으로 본다. <개정 1997. 4. 23., 2010. 4. 30., 2011. 3. 28., 2014. 3. 14., 2017. 3. 10.>'
제65조1항={}
제65조[제65조1항_]=제65조1항
제65조2항_='②영 제130조제3항에서 "소득금액계산명세서 등 기획재정부령으로 정하는 서류"란 다음 각 호의 서류를 말한다. <개정 2005. 3. 19., 2006. 4. 10., 2007. 4. 17., 2008. 4. 29., 2009. 4. 14., 2010. 4. 30., 2011. 3. 28., 2014. 3. 14., 2015. 3. 13.>'
제65조2항={}
제65조[제65조2항_]=제65조2항
제65조2항1호_='1. 다음 각 목의 소득금액명세서'
제65조2항1호={}
제65조2항[제65조2항1호_]=제65조2항1호
제65조2항1호가목_='가. 법 제12조제2호다목에 따른 농가부업소득이 있는 경우에는 비과세사업소득(농가부업소득)계산명세서'
제65조2항1호가목={}
제65조2항1호[제65조2항1호가목_]=제65조2항1호가목
제65조2항1호나목_='나. 법 제12조제2호바목에 따른 작물재배업에서 발생하는 소득이 있는 경우에는 비과세사업소득(작물재배업 소득)계산명세서'
제65조2항1호나목={}
제65조2항1호[제65조2항1호나목_]=제65조2항1호나목
제65조2항1호다목_='다. 법 제59조의5에 따라 소득세를 감면받은 때에는 소득세가 감면되는 소득과 그 밖의 소득을 구분한 계산서'
제65조2항1호다목={}
제65조2항1호[제65조2항1호다목_]=제65조2항1호다목
제65조2항1호라목_='라. 법 또는 다른 법률의 규정에 의하여 충당금ㆍ준비금 등을 필요경비 또는 총수입금액에 산입한 경우에는 그 명세서'
제65조2항1호라목={}
제65조2항1호[제65조2항1호라목_]=제65조2항1호라목
제65조2항1호마목_='마. 법 제43조의 규정에 의하여 공동사업에 대한 소득금액을 계산한 경우에는 공동사업자별소득금액등 분배명세서'
제65조2항1호마목={}
제65조2항1호[제65조2항1호마목_]=제65조2항1호마목
제65조2항1호바목_='바. 법 제45조의 규정에 의하여 이월결손금을 처리한 경우에는 이월결손금명세서'
제65조2항1호바목={}
제65조2항1호[제65조2항1호바목_]=제65조2항1호바목
제65조2항1호사목_='사. 그 밖에 총수입금액과 필요경비 계산에 필요한 참고서류'
제65조2항1호사목={}
제65조2항1호[제65조2항1호사목_]=제65조2항1호사목
제65조2항2호_='2. 삭제 <2014. 3. 14.>'
제65조2항2호={}
제65조2항[제65조2항2호_]=제65조2항2호
제65조2항3호_='3. 삭제 <2006. 4. 10.>'
제65조2항3호={}
제65조2항[제65조2항3호_]=제65조2항3호
제65조3항_='③2이상의 사업장을 가진 사업자가 법 제160조제5항에 따라 사업장별 거래내용이 구분될 수 있도록 장부에 기록한 경우에는 법 제70조제4항제2호 내지 제6호의 서류는 그 사업장별ㆍ소득별로 작성하고 합계표를 첨부하여야 한다. <개정 1999. 5. 7., 2011. 3. 28.>'
제65조3항={}
제65조[제65조3항_]=제65조3항
제65조4항_='④ 삭제 <2000. 4. 3.>'
제65조4항={}
제65조[제65조4항_]=제65조4항
제65_02조_=' 제65조의2 삭제 '
제65_02조={}
제65_02조['소득세법시행규칙 제65조의2 삭제 ']={}
조문['제65조의2 삭제 ']=제65_02조
조['제65조의2 삭제 ']=제65_02조
제65_03조_=' 제65조의3(조정반의 지정 절차 등) '
제65_03조={}
제65_03조['소득세법시행규칙 제65조의3(조정반의 지정 절차 등)']={}
조문['제65조의3(조정반의 지정 절차 등)']=제65_03조
조['제65조의3(조정반의 지정 절차 등)']=제65_03조
제65_03조1항_='① 영 제131조의3제1항에 따른 조정반(이하 이 조에서 "조정반"이라 한다)의 지정을 받으려는 자는 별지 제82호의3서식에 따른 조정반 지정 신청서를 작성하여 매년 11월 30일까지 대표자의 사무소 소재지 관할 지방국세청장에게 조정반 지정 신청을 하여야 한다. 다만, 법 제70조제6항 각 호의 어느 하나에 해당하는 자(이하 "세무사등"이라 한다)로서 매년 12월 1일 이후 개업한 자 또는 매년 12월 1일 이후 설립된 세무법인ㆍ회계법인은 각각 세무사등의 개업신고일(구성원이 2명 이상인 경우에는 최근 개업한 조정반 구성원의 개업신고일을 말한다) 또는 법인설립등기일부터 1개월 이내에 신청할 수 있다.'
제65_03조1항={}
제65_03조[제65_03조1항_]=제65_03조1항
제65_03조2항_='② 제1항의 신청을 받은 지방국세청장은 신청을 받은 연도의 12월 31일(제1항 단서에 따라 신청을 받은 경우 신청을 받은 날이 속하는 달의 다음 달 말일)까지 지정 여부를 결정하여 신청인에게 통지하고, 그 사실을 관보 또는 인터넷 홈페이지에 공고하여야 한다. 다만, 조정반 지정 신청을 한 영 제131조의3제1항 각 호의 자가 다음 각 호의 어느 하나에 해당하는 경우에는 조정반 지정을 하지 아니한다.'
제65_03조2항={}
제65_03조[제65_03조2항_]=제65_03조2항
제65_03조2항1호_='1. 기획재정부 세무사징계위원회 또는 금융위원회 공인회계사징계위원회의 징계 중 직무정지나 자격정지의 징계를 받아 그 징계기간이 종료되지 아니한 경우(다만, 공인회계사인 세무사의 경우에는 세무대리에 관련된 징계에 한정한다)'
제65_03조2항1호={}
제65_03조2항[제65_03조2항1호_]=제65_03조2항1호
제65_03조2항2호_='2. 제3항제2호부터 제4호까지에 해당하는 사유로 조정반이 취소되고 그 취소된 날부터 신청일까지 1년이 지나지 아니한 경우'
제65_03조2항2호={}
제65_03조2항[제65_03조2항2호_]=제65_03조2항2호
제65_03조2항3호_='3. 소득세 또는 법인세가 기장에 의하여 신고되지 아니하거나 추계결정ㆍ경정된 과세기간의 종료일부터 신청일까지 2년이 지나지 아니한 경우'
제65_03조2항3호={}
제65_03조2항[제65_03조2항3호_]=제65_03조2항3호
제65_03조3항_='③ 지방국세청장은 조정반이 다음 각 호의 어느 하나에 해당하는 경우에는 조정반 지정을 취소할 수 있다.'
제65_03조3항={}
제65_03조[제65_03조3항_]=제65_03조3항
제65_03조3항1호_='1. 조정반에 소속된 세무사등이 1명이 된 경우'
제65_03조3항1호={}
제65_03조3항[제65_03조3항1호_]=제65_03조3항1호
제65_03조3항2호_='2. 조정계산서를 거짓으로 작성한 경우'
제65_03조3항2호={}
제65_03조3항[제65_03조3항2호_]=제65_03조3항2호
제65_03조3항3호_='3. 부정한 방법으로 지정을 받은 경우'
제65_03조3항3호={}
제65_03조3항[제65_03조3항3호_]=제65_03조3항3호
제65_03조3항4호_='4. 조정반 지정일부터 1년 이내에 조정반의 구성원(세무법인 또는 회계법인인 경우에는 실제 조정계산서의 작성에 참여한 세무사등을 말한다. 이하 이 호에서 같다) 또는 구성원의 배우자가 대표이사 또는 과점주주였던 기업의 세무조정을 한 경우'
제65_03조3항4호={}
제65_03조3항[제65_03조3항4호_]=제65_03조3항4호
제65_03조4항_='④ 조정반 지정의 유효기간은 1년으로 한다.'
제65_03조4항={}
제65_03조[제65_03조4항_]=제65_03조4항
제65_03조5항_='⑤ 조정반의 구성원(세무법인 또는 회계법인은 제외한다)이나 대표자가 변경된 경우에는 그 사유가 발생한 날부터 14일 이내에 별지 제82호의3서식에 따른 조정반 변경지정 신청서를 작성하여 대표자의 사무소 소재지 관할 지방국세청장에게 조정반 변경지정 신청을 하여야 한다.'
제65_03조5항={}
제65_03조[제65_03조5항_]=제65_03조5항
제65_03조6항_='⑥ 제5항에 따라 조정반 변경지정 신청을 받은 지방국세청장은 신청을 받은 날부터 7일 이내에 변경지정 여부를 결정하여 신청인에게 통지하여야 한다.'
제65_03조6항={}
제65_03조[제65_03조6항_]=제65_03조6항
제65_03조7항_='⑦ 지방국세청장은 제2항에 따라 조정반을 지정하거나 제6항에 따라 조정반을 변경 지정하려는 경우에는 신청인에게 별지 제82호의4서식에 따른 조정반 지정서 또는 조정반 변경지정서를 발급하여야 한다.'
제65_03조7항={}
제65_03조[제65_03조7항_]=제65_03조7항
제65_03조8항_='⑧ 「법인세법 시행규칙」 제50조의3제2항 및 제6항에 따라 조정반 지정 또는 변경지정을 받은 자는 제2항 및 제6항에 따라 지정 또는 변경지정을 받은 것으로 본다.'
제65_03조8항={}
제65_03조[제65_03조8항_]=제65_03조8항
제65_03조['[전문개정 2016. 3. 16.]']={}
제65_04조_=' 제65조의4(조정계산서 첨부서류 제출면제자의 범위 등) '
제65_04조={}
제65_04조['소득세법시행규칙 제65조의4(조정계산서 첨부서류 제출면제자의 범위 등)']={}
조문['제65조의4(조정계산서 첨부서류 제출면제자의 범위 등)']=제65_04조
조['제65조의4(조정계산서 첨부서류 제출면제자의 범위 등)']=제65_04조
제65_04조1항_='영 제131조제5항에서 "기획재정부령이 정하는 요건을 갖춘 사업자"란 전자계산조직에 의하여 세무조정을 하고 해당 서류를 마이크로필름, 자기테이프, 디스켓 등에 수록ㆍ보관하여 항시 출력이 가능한 상태에 있는 사업자를 말한다. <개정 2011. 3. 28.>'
제65_04조1항={}
제65_04조[제65_04조1항_]=제65_04조1항
제65_04조['[본조신설 2010. 4. 30.]']={}
제66조_=' 제66조 삭제 '
제66조={}
제66조['소득세법시행규칙 제66조 삭제 ']={}
조문['제66조 삭제 ']=제66조
조['제66조 삭제 ']=제66조
제66_02조_=' 제66조의2(상속인의 종합소득과세표준확정신고) '
제66_02조={}
제66_02조['소득세법시행규칙 제66조의2(상속인의 종합소득과세표준확정신고)']={}
조문['제66조의2(상속인의 종합소득과세표준확정신고)']=제66_02조
조['제66조의2(상속인의 종합소득과세표준확정신고)']=제66_02조
제66_02조1항_='영 제137조의2제1항에서 "기획재정부령으로 정하는 서류"란 다음 각호의 사항을 기재한 서류를 말한다. <개정 2008. 4. 29., 2011. 3. 28.>'
제66_02조1항={}
제66_02조[제66_02조1항_]=제66_02조1항
제66_02조1항1호_='1. 상속인의 성명과 주소(국내에 주소가 없는 경우에는 거소)'
제66_02조1항1호={}
제66_02조1항[제66_02조1항1호_]=제66_02조1항1호
제66_02조1항2호_='2. 피상속인과의 관계'
제66_02조1항2호={}
제66_02조1항[제66_02조1항2호_]=제66_02조1항2호
제66_02조1항3호_='3. 상속인이 2명 이상 있는 경우에는 상속지분에 따라 안분계산한 세액'
제66_02조1항3호={}
제66_02조1항[제66_02조1항3호_]=제66_02조1항3호
제66_02조['[본조신설 2000. 4. 3.]']={}
제67조_=' 제67조 (소득금액 추계결정 또는 경정 시 적용하는 배율) '
제67조={}
제67조['소득세법시행규칙 제67조 (소득금액 추계결정 또는 경정 시 적용하는 배율)']={}
조문['제67조 (소득금액 추계결정 또는 경정 시 적용하는 배율)']=제67조
조['제67조 (소득금액 추계결정 또는 경정 시 적용하는 배율)']=제67조
제67조1항_='영 제143조제3항제1호 각 목 외의 부분 단서에서 "기획재정부령으로 정하는 배율"이란 3.2(법 제160조에 따른 간편장부대상자의 경우에는 2.6)를 말한다. <개정 2016. 3. 16.>'
제67조1항={}
제67조[제67조1항_]=제67조1항
제67조['[전문개정 2010. 4. 30.]']={}
제68조_=' 제68조 (기준경비율심의회 위원) '
제68조={}
제68조['소득세법시행규칙 제68조 (기준경비율심의회 위원)']={}
조문['제68조 (기준경비율심의회 위원)']=제68조
조['제68조 (기준경비율심의회 위원)']=제68조
제68조1항_='영 제145조제2항에서 "기획재정부령으로 정하는 공무원"이란 기획재정부에서 소득세제업무를 관장하는 고위공무원단에 속하는 공무원 1명과 국세청장이 지정하는 자를 말한다.'
제68조1항={}
제68조[제68조1항_]=제68조1항
제68조['[본조신설 2010. 4. 30.]']={}
제69조_=' 제69조 (수시부과) '
제69조={}
제69조['소득세법시행규칙 제69조 (수시부과)']={}
조문['제69조 (수시부과)']=제69조
조['제69조 (수시부과)']=제69조
제69조1항_='영 제148조제6항의 규정에 의한 수시부과 세액은 다음 각 호의 산식에 의하여 계산한 금액으로 한다. <개정 1999. 5. 7., 2001. 4. 30., 2007. 4. 17.>'
제69조1항={}
제69조[제69조1항_]=제69조1항
제69조1항1호_='1. 영 제148조제3항의 경우'
제69조1항1호={}
제69조1항[제69조1항1호_]=제69조1항1호
제69조['']={}
제69조2호_='2. 제1호외의 종합소득의 경우'
제69조2호={}
제69조[제69조2호_]=제69조2호
제69조['']={}
제69조3호_='3. 삭제 <2007. 4. 17.>'
제69조3호={}
제69조[제69조3호_]=제69조3호
제69_02조_=' 제69조의2 삭제 '
제69_02조={}
제69_02조['소득세법시행규칙 제69조의2 삭제 ']={}
조문['제69조의2 삭제 ']=제69_02조
조['제69조의2 삭제 ']=제69_02조
제70조_=' 제70조 (농지의 범위등) '
제70조={}
제70조['소득세법시행규칙 제70조 (농지의 범위등)']={}
조문['제70조 (농지의 범위등)']=제70조
조['제70조 (농지의 범위등)']=제70조
제70조1항_='① 삭제 <2017. 3. 10.>'
제70조1항={}
제70조[제70조1항_]=제70조1항
제70조2항_='②영 제153조제4항제1호가목에서 "기획재정부령으로 정하는 규모"라 함은 다음 각 호의 어느 하나의 것을 말한다. <신설 1997. 4. 23., 1998. 8. 11., 2003. 12. 15., 2005. 3. 19., 2008. 4. 29.>'
제70조2항={}
제70조[제70조2항_]=제70조2항
제70조2항1호_='1. 사업시행면적이 100만제곱미터'
제70조2항1호={}
제70조2항[제70조2항1호_]=제70조2항1호
제70조2항2호_='2. 「택지개발촉진법」에 의한 택지개발사업 또는 「주택법」에 의한 대지조성사업의 경우로서 당해 개발사업시행면적이 10만제곱미터'
제70조2항2호={}
제70조2항[제70조2항2호_]=제70조2항2호
제70조3항_='③ 영 제153조제4항제1호나목에서 "기획재정부령으로 정하는 공공기관"이란 「공공기관의 운영에 관한 법률」에 따라 지정된 공공기관과 「지방공기업법」에 따라 설립된 지방직영기업ㆍ지방공사ㆍ지방공단을 말한다. <신설 2008. 4. 29.>'
제70조3항={}
제70조[제70조3항_]=제70조3항
제70조4항_='④ 영 제153조제4항제1호나목에서 "기획재정부령으로 정하는 부득이한 사유"란 사업 또는 보상이 지연된 경우로서 그 책임이 해당 사업시행자에게 있다고 인정되는 사유를 말한다. <신설 2008. 4. 29.>'
제70조4항={}
제70조[제70조4항_]=제70조4항
제71조_=' 제71조 (1세대1주택의 범위) '
제71조={}
제71조['소득세법시행규칙 제71조 (1세대1주택의 범위)']={}
조문['제71조 (1세대1주택의 범위)']=제71조
조['제71조 (1세대1주택의 범위)']=제71조
제71조1항_='①영 제154조제1항 본문에서 규정하는 보유기간의 확인은 당해주택의 등기부등본 또는 토지ㆍ건축물대장등본등에 의한다.'
제71조1항={}
제71조[제71조1항_]=제71조1항
제71조2항_='② 삭제 <2006. 4. 10.>'
제71조2항={}
제71조[제71조2항_]=제71조2항
제71조3항_='③영 제154조제1항제1호 및 제3호에서 "기획재정부령으로 정하는 취학, 근무상의 형편, 질병의 요양, 그 밖에 부득이한 사유"란 세대전원이 다음 각 호의 어느 하나에 해당하는 사유로 다른 시(특별시, 광역시, 특별자치시 및 「제주특별자치도 설치 및 국제자유도시 조성을 위한 특별법」 제15조제2항에 따라 설치된 행정시를 포함한다)ㆍ군으로 주거를 이전하는 경우(광역시지역 안에서 구지역과 읍ㆍ면지역 간에 주거를 이전하는 경우와 특별자치시, 「지방자치법」 제7조제2항에 따라 설치된 도농복합형태의 시지역 및 「제주특별자치도 설치 및 국제자유도시 조성을 위한 특별법」 제15조제2항에 따라 설치된 행정시 안에서 동지역과 읍ㆍ면지역 간에 주거를 이전하는 경우를 포함한다)를 말한다. <개정 1998. 8. 11., 2000. 4. 3., 2005. 3. 19., 2005. 12. 31., 2008. 4. 29., 2013. 2. 23., 2014. 3. 14., 2016. 3. 16.>'
제71조3항={}
제71조[제71조3항_]=제71조3항
제71조3항1호_='1. 「초ㆍ중등교육법」에 따른 학교(초등학교 및 중학교를 제외한다) 및 「고등교육법」에 따른 학교에의 취학'
제71조3항1호={}
제71조3항[제71조3항1호_]=제71조3항1호
제71조3항2호_='2. 직장의 변경이나 전근등 근무상의 형편'
제71조3항2호={}
제71조3항[제71조3항2호_]=제71조3항2호
제71조3항3호_='3. 1년이상의 치료나 요양을 필요로 하는 질병의 치료 또는 요양'
제71조3항3호={}
제71조3항[제71조3항3호_]=제71조3항3호
제71조3항4호_='4. 「학교폭력예방 및 대책에 관한 법률」에 따른 학교폭력으로 인한 전학(같은 법에 따른 학교폭력대책자치위원회가 피해학생에게 전학이 필요하다고 인정하는 경우에 한한다)'
제71조3항4호={}
제71조3항[제71조3항4호_]=제71조3항4호
제71조4항_='④영 제154조제1항 단서의 규정에 해당하는지의 확인은 다음의 서류와 주민등록표등본에 의한다. <개정 1998. 8. 11., 2000. 4. 3., 2003. 4. 14., 2007. 4. 17., 2009. 4. 14., 2013. 3. 23., 2016. 3. 16.>'
제71조4항={}
제71조[제71조4항_]=제71조4항
제71조4항1호_='1. 영 제154조제1항제1호의 경우에는 임대차계약서 사본'
제71조4항1호={}
제71조4항[제71조4항1호_]=제71조4항1호
제71조4항2호_='2. 영 제154조제1항제2호 가목의 경우에는 협의매수 또는 수용된 사실을 확인할 수 있는 서류'
제71조4항2호={}
제71조4항[제71조4항2호_]=제71조4항2호
제71조4항3호_='3. 영 제154조제1항제2호나목의 경우에는 외교부장관이 교부하는 해외이주신고확인서. 다만, 「해외이주법」에 따른 현지이주의 경우에는 현지이주확인서 또는 거주여권사본'
제71조4항3호={}
제71조4항[제71조4항3호_]=제71조4항3호
제71조4항4호_='4. 영 제154조제1항제2호다목 및 제3호의 경우에는 재학증명서, 재직증명서, 요양증명서등 당해사실을 증명하는 서류'
제71조4항4호={}
제71조4항[제71조4항4호_]=제71조4항4호
제71조4항5호_='5. 삭제 <2005. 12. 31.>'
제71조4항5호={}
제71조4항[제71조4항5호_]=제71조4항5호
제71조4항6호_='6. 삭제 <2005. 12. 31.>'
제71조4항6호={}
제71조4항[제71조4항6호_]=제71조4항6호
제71조5항_='⑤제3항의 규정을 적용함에 있어서 제3항 각호의 사유가 발생한 당사자외의 세대원중 일부가 취학, 근무 또는 사업상의 형편등으로 당사자와 함께 주거를 이전하지 못하는 경우에도 세대전원이 주거를 이전한 것으로 본다.'
제71조5항={}
제71조[제71조5항_]=제71조5항
제71조6항_='⑥ 영 제154조제1항제2호나목을 적용할 때 「해외이주법」에 따른 현지이주의 경우 출국일은 영주권 또는 그에 준하는 장기체류 자격을 취득한 날을 말한다. <신설 2009. 4. 14.>'
제71조6항={}
제71조[제71조6항_]=제71조6항
제71조['[전문개정 1996. 3. 30.]']={}
제72조_=' 제72조 (1세대1주택의 특례) '
제72조={}
제72조['소득세법시행규칙 제72조 (1세대1주택의 특례)']={}
조문['제72조 (1세대1주택의 특례)']=제72조
조['제72조 (1세대1주택의 특례)']=제72조
제72조1항_='① 삭제 <2017. 3. 10.>'
제72조1항={}
제72조[제72조1항_]=제72조1항
제72조2항_='②영 제154조제1항을 적용할 때 주택에 부수되는 토지를 분할하여 양도(지분으로 양도하는 경우를 포함한다. 다만, 영 제154조제1항 본문에 해당하는 주택과 그 부수토지를 함께 지분으로 양도하는 경우를 제외한다)하는 경우에 그 양도하는 부분의 토지는 법 제89조제1항제3호가목에 따른 1세대1주택에 부수되는 토지로 보지 아니하며 1주택을 2이상의 주택으로 분할하여 양도(영 제154조제1항 본문에 해당하는 주택을 지분으로 양도하는 경우를 제외한다)한 경우에는 먼저 양도하는 부분의 주택은 그 1세대1주택으로 보지 아니한다. 이 경우 주택 및 그 부수토지의 일부가 「공익사업을 위한 토지 등의 취득 및 보상에 관한 법률」에 의한 협의매수ㆍ수용 및 그 밖의 법률에 따라 수용되는 경우의 해당 주택(그 부수토지를 포함한다)과 그 양도일 또는 수용일부터 5년 이내에 양도하는 잔존토지 및 잔존주택(그 부수토지를 포함한다)은 그러하지 아니하다. <개정 1996. 3. 30., 1997. 4. 23., 1998. 3. 21., 2000. 4. 3., 2003. 4. 14., 2005. 3. 19., 2012. 6. 29., 2013. 2. 23., 2014. 3. 14.>'
제72조2항={}
제72조[제72조2항_]=제72조2항
제72조3항_='③영 제155조제18항을 적용받으려는 자는 다음 각 호의 어느 하나의 서류를 제출하여야 한다. <신설 1996. 3. 30., 2012. 2. 28., 2017. 3. 10.>'
제72조3항={}
제72조[제72조3항_]=제72조3항
제72조3항1호_='1. 매각의뢰를 신청한 경우에는 부동산매각의뢰신청서접수증'
제72조3항1호={}
제72조3항[제72조3항1호_]=제72조3항1호
제72조3항2호_='2. 법원에 경매를 신청한 경우에는 그 사실을 입증하는 서류'
제72조3항2호={}
제72조3항[제72조3항2호_]=제72조3항2호
제72조3항3호_='3. 법원에 현금청산금 지급소송을 제기한 경우에는 소제기일을 확인할 수 있는 서류 등 해당 사실을 입증하는 서류'
제72조3항3호={}
제72조3항[제72조3항3호_]=제72조3항3호
제72조4항_='④영 제155조제18항제1호에 따라 매각을 의뢰한 부동산의 처분방법, 처분조건의 협의절차 등에 관하여는 「부동산 실권리자명의 등기에 관한 법률 시행령」 제6조의 규정을 준용한다. <신설 1996. 3. 30., 2000. 4. 3., 2005. 3. 19., 2017. 3. 10.>'
제72조4항={}
제72조[제72조4항_]=제72조4항
제72조5항_='⑤「금융회사부실자산 등의 효율적 처리 및 한국자산관리공사의 설립에 관한 법률」에 따라 설립된 한국자산관리공사(이하 "한국자산관리공사"라 한다)는 제4항에 따라 매각을 의뢰한 자가 매각의뢰를 철회한 경우에는 매각을 의뢰한 자의 납세지 관할세무서장에게 그 사실을 통보하여야 한다. <신설 1996. 3. 30., 2000. 4. 3., 2017. 3. 10.>'
제72조5항={}
제72조[제72조5항_]=제72조5항
제72조6항_='⑥제4항의 규정에 의한 부동산매각의뢰신청서 및 부동산 매각의뢰신청서접수증은 별지 제85호서식에 의한다. <신설 1996. 3. 30.>'
제72조6항={}
제72조[제72조6항_]=제72조6항
제72조7항_='⑦ 영 제155조제8항 및 같은 조 제10항제5호에서 "기획재정부령으로 정하는 취학, 근무상의 형편, 질병의 요양, 그밖에 부득이한 사유"란 제71조제3항 각 호의 어느 하나에 해당하는 사유로 다른 시(특별시, 광역시, 특별자치시 및 「제주특별자치도 설치 및 국제자유도시 조성을 위한 특별법」 제15조제2항에 따라 설치된 행정시를 포함한다)ㆍ군으로 주거를 이전하는 경우(광역시지역 안에서 구지역과 읍ㆍ면지역 간에 주거를 이전하는 경우와 특별자치시, 「지방자치법」 제7조제2항에 따라 설치된 도농복합형태의 시지역 및 「제주특별자치도 설치 및 국제자유도시 조성을 위한 특별법」 제15조제2항에 따라 설치된 행정시 안에서 동지역과 읍ㆍ면지역 간에 주거를 이전하는 경우를 포함한다)를 말한다. <신설 2009. 4. 14., 2013. 2. 23., 2014. 3. 14.>'
제72조7항={}
제72조[제72조7항_]=제72조7항
제72조8항_='⑧ 제7항에 해당하는지의 확인은 재학증명서, 재직증명서, 요양증명서 등 해당 사실을 증명하는 서류에 따른다. <신설 2009. 4. 14.>'
제72조8항={}
제72조[제72조8항_]=제72조8항
제72조9항_='⑨ 제7항을 적용할 때 제71조제3항 각 호의 사유가 발생한 당사자 외의 세대원 중 일부가 취학, 근무 또는 사업상의 형편 등으로 당사자와 함께 주거를 이전하지 못하는 경우에도 세대원이 주거를 이전한 것으로 본다. <신설 2009. 4. 14.>'
제72조9항={}
제72조[제72조9항_]=제72조9항
제73조_=' 제73조 (농어촌주택) '
제73조={}
제73조['소득세법시행규칙 제73조 (농어촌주택)']={}
조문['제73조 (농어촌주택)']=제73조
조['제73조 (농어촌주택)']=제73조
제73조1항_='① 삭제 <2017. 3. 10.>'
제73조1항={}
제73조[제73조1항_]=제73조1항
제73조2항_='② 삭제 <2017. 3. 10.>'
제73조2항={}
제73조[제73조2항_]=제73조2항
제73조3항_='③영 제155조제10항제4호다목에서 "기획재정부령이 정하는 어업인"이란 다음 각 호의 어느 하나에 해당하는 자를 말한다. <개정 1998. 8. 11., 2005. 3. 19., 2008. 4. 29., 2017. 3. 10.>'
제73조3항={}
제73조[제73조3항_]=제73조3항
제73조3항1호_='1. 「수산업법」에 의한 신고ㆍ허가 및 면허어업자'
제73조3항1호={}
제73조3항[제73조3항1호_]=제73조3항1호
제73조3항2호_='2. 제1호의 자에게 고용된 어업종사자'
제73조3항2호={}
제73조3항[제73조3항2호_]=제73조3항2호
제73조4항_='④영 제155조제13항에서 "기획재정부령이 정하는 서류"라 함은 다음 각 호의 서류를 말한다. <개정 1998. 8. 11., 2008. 4. 29., 2011. 12. 28.>'
제73조4항={}
제73조[제73조4항_]=제73조4항
제73조4항1호_='1. 제1항에 규정하는 연고지임을 입증할 수 있는 서류'
제73조4항1호={}
제73조4항[제73조4항1호_]=제73조4항1호
제73조4항2호_='2. 제3항에 규정하는 어업인임을 입증할 수 있는 서류(해당자에 한한다)'
제73조4항2호={}
제73조4항[제73조4항2호_]=제73조4항2호
제73조4항3호_='3. 농지원부 사본(해당하는 경우만 제출한다)'
제73조4항3호={}
제73조4항[제73조4항3호_]=제73조4항3호
제74조_=' 제74조 삭제 '
제74조={}
제74조['소득세법시행규칙 제74조 삭제 ']={}
조문['제74조 삭제 ']=제74조
조['제74조 삭제 ']=제74조
제74_02조_=' 제74조의2(계속 임대로 보는 부득이한 사유) '
제74_02조={}
제74_02조['소득세법시행규칙 제74조의2(계속 임대로 보는 부득이한 사유)']={}
조문['제74조의2(계속 임대로 보는 부득이한 사유)']=제74_02조
조['제74조의2(계속 임대로 보는 부득이한 사유)']=제74_02조
제74_02조1항_='영 제155조제22항제2호가목에서 "기획재정부령으로 정하는 부득이한 사유"란 다음 각 호의 어느 하나에 해당하는 경우를 말한다. <개정 2014. 3. 14., 2017. 3. 10.>'
제74_02조1항={}
제74_02조[제74_02조1항_]=제74_02조1항
제74_02조1항1호_='1. 「공익사업을 위한 토지 등의 취득 및 보상에 관한 법률」 또는 그 밖의 법률에 따라 수용(협의매수를 포함한다)된 경우'
제74_02조1항1호={}
제74_02조1항[제74_02조1항1호_]=제74_02조1항1호
제74_02조1항2호_='2. 사망으로 상속되는 경우'
제74_02조1항2호={}
제74_02조1항[제74_02조1항2호_]=제74_02조1항2호
제74_02조['[본조신설 2011. 12. 28.]']={}
제75조_=' 제75조 (주택과 조합원입주권을 소유한 경우의 경매 등으로 인한 1세대1주택 특례의 요건) '
제75조={}
제75조['소득세법시행규칙 제75조 (주택과 조합원입주권을 소유한 경우의 경매 등으로 인한 1세대1주택 특례의 요건)']={}
조문['제75조 (주택과 조합원입주권을 소유한 경우의 경매 등으로 인한 1세대1주택 특례의 요건)']=제75조
조['제75조 (주택과 조합원입주권을 소유한 경우의 경매 등으로 인한 1세대1주택 특례의 요건)']=제75조
제75조1항_='①영 제156조의2제3항에서 "3년 이내에 양도하지 못하는 경우로서 기획재정부령으로 정하는 사유에 해당하는 경우"란 조합원입주권을 취득한 날부터 3년이 되는 날 현재 다음 각 호의 어느 하나에 해당하는 경우로서 해당 각 호의 어느 하나의 방법에 따라 양도된 경우를 말한다. <개정 2006. 4. 10., 2008. 4. 29., 2009. 4. 14., 2012. 6. 29.>'
제75조1항={}
제75조[제75조1항_]=제75조1항
제75조1항1호_='1. 한국자산관리공사에 매각을 의뢰한 경우'
제75조1항1호={}
제75조1항[제75조1항1호_]=제75조1항1호
제75조1항2호_='2. 법원에 경매를 신청한 경우'
제75조1항2호={}
제75조1항[제75조1항2호_]=제75조1항2호
제75조1항3호_='3. 「국세징수법」에 따른 공매가 진행 중인 경우'
제75조1항3호={}
제75조1항[제75조1항3호_]=제75조1항3호
제75조2항_='②제1항의 규정을 적용받고자 하는 자는 다음 각 호의 어느 하나의 서류를 제출하여야 한다.'
제75조2항={}
제75조[제75조2항_]=제75조2항
제75조2항1호_='1. 매각의뢰를 신청한 경우에는 부동산 매각의뢰신청서 접수증'
제75조2항1호={}
제75조2항[제75조2항1호_]=제75조2항1호
제75조2항2호_='2. 법원에 경매를 신청한 경우에는 그 사실을 입증하는 서류'
제75조2항2호={}
제75조2항[제75조2항2호_]=제75조2항2호
제75조3항_='③제1항제1호의 규정에 따라 매각을 의뢰한 부동산의 처분방법, 처분조건의 협의절차 등에 관하여는 「부동산 실권리자명의 등기에 관한 법률 시행령」 제6조의 규정을 준용한다.'
제75조3항={}
제75조[제75조3항_]=제75조3항
제75조4항_='④한국자산관리공사는 제3항의 규정에 따라 매각을 의뢰한 자가 매각의뢰를 철회한 경우에는 매각을 의뢰한 자의 납세지 관할세무서장에게 그 사실을 통보하여야 한다.'
제75조4항={}
제75조[제75조4항_]=제75조4항
제75조5항_='⑤제4항의 규정에 따른 부동산매각의뢰신청서 및 부동산 매각의뢰신청서접수증은 별지 제85호서식에 의한다.'
제75조5항={}
제75조[제75조5항_]=제75조5항
제75조['[본조신설 2005. 12. 31.]']={}
제75_02조_=' 제75조의2(주택과 조합원입주권을 소유한 경우의 취학 등으로 인한 1세대1주택 특례의 요건) '
제75_02조={}
제75_02조['소득세법시행규칙 제75조의2(주택과 조합원입주권을 소유한 경우의 취학 등으로 인한 1세대1주택 특례의 요건)']={}
조문['제75조의2(주택과 조합원입주권을 소유한 경우의 취학 등으로 인한 1세대1주택 특례의 요건)']=제75_02조
조['제75조의2(주택과 조합원입주권을 소유한 경우의 취학 등으로 인한 1세대1주택 특례의 요건)']=제75_02조
제75_02조1항_='①영 제156조의2제4항제1호에서 "기획재정부령이 정하는 취학, 근무상의 형편, 질병의 요양 그 밖의 부득이한 사유"와 같은 조 제5항제2호에서 "기획재정부령으로 정하는 취학, 근무상의 형편, 질병의 요양, 그 밖에 부득이한 사유"란 각각 세대의 구성원 중 일부가 다음 각 호의 어느 하나에 해당하는 사유로 다른 시(특별시, 광역시, 특별자치시 및 「제주특별자치도 설치 및 국제자유도시 조성을 위한 특별법」 제15조제2항에 따라 설치된 행정시를 포함한다)ㆍ군으로 주거를 이전하는 경우(광역시지역 안에서 구지역과 읍ㆍ면지역 간에 주거를 이전하는 경우와 특별자치시, 「지방자치법」 제7조제2항에 따라 설치된 도농복합형태의 시지역 및 「제주특별자치도 설치 및 국제자유도시 조성을 위한 특별법」 제15조제2항에 따라 설치된 행정시 안에서 동지역과 읍ㆍ면지역 간에 주거를 이전하는 경우를 포함한다)를 말한다. <개정 2008. 4. 29., 2013. 2. 23., 2014. 3. 14.>'
제75_02조1항={}
제75_02조[제75_02조1항_]=제75_02조1항
제75_02조1항1호_='1. 「초ㆍ중등교육법」에 따른 학교(초등학교 및 중학교를 제외한다) 및 「고등교육법」에 따른 학교에의 취학'
제75_02조1항1호={}
제75_02조1항[제75_02조1항1호_]=제75_02조1항1호
제75_02조1항2호_='2. 직장의 변경이나 전근 등 근무상의 형편'
제75_02조1항2호={}
제75_02조1항[제75_02조1항2호_]=제75_02조1항2호
제75_02조1항3호_='3. 1년 이상의 치료나 요양을 필요로 하는 질병의 치료 또는 요양'
제75_02조1항3호={}
제75_02조1항[제75_02조1항3호_]=제75_02조1항3호
제75_02조2항_='②영 제156조의2제12항제5호에서 "기획재정부령이 정하는 서류"란 제73조제4항제2호와 농업인임을 입증할 수 있는 서류를 말한다. 다만, 영 제156조의2제11항을 적용받는 경우에 한정한다. <개정 2008. 4. 29., 2009. 4. 14.>'
제75_02조2항={}
제75_02조[제75_02조2항_]=제75_02조2항
제75_02조['[본조신설 2005. 12. 31.]']={}
제76조_=' 제76조 (부동산과다보유법인의 범위등) '
제76조={}
제76조['소득세법시행규칙 제76조 (부동산과다보유법인의 범위등)']={}
조문['제76조 (부동산과다보유법인의 범위등)']=제76조
조['제76조 (부동산과다보유법인의 범위등)']=제76조
제76조1항_='①법 제94조제1항제4호라목에 해당하는지의 여부는 양도일 현재 해당 법인의 자산총액을 기준으로 이를 판정한다. 다만, 양도일 현재의 자산총액을 알 수 없는 경우에는 양도일이 속하는 사업연도의 직전사업연도 종료일 현재의 자산총액을 기준으로 한다. <개정 2000. 4. 3., 2017. 3. 10.>'
제76조1항={}
제76조[제76조1항_]=제76조1항
제76조2항_='②영 제158조제7항에서 "기획재정부령으로 정하는 사업"이란 다음 각 호의 어느 하나에 해당하는 시설을 건설 또는 취득하여 직접 경영하거나 분양 또는 임대하는 사업을 말한다. <개정 1998. 8. 11., 2008. 4. 29., 2017. 3. 10.>'
제76조2항={}
제76조[제76조2항_]=제76조2항
제76조2항1호_='1. 골프장'
제76조2항1호={}
제76조2항[제76조2항1호_]=제76조2항1호
제76조2항2호_='2. 스키장'
제76조2항2호={}
제76조2항[제76조2항2호_]=제76조2항2호
제76조2항3호_='3. 휴양콘도미니엄'
제76조2항3호={}
제76조2항[제76조2항3호_]=제76조2항3호
제76조2항4호_='4. 전문휴양시설'
제76조2항4호={}
제76조2항[제76조2항4호_]=제76조2항4호
제76_02조_=' 제76조의2(파생상품등의 범위) '
제76_02조={}
제76_02조['소득세법시행규칙 제76조의2(파생상품등의 범위)']={}
조문['제76조의2(파생상품등의 범위)']=제76_02조
조['제76조의2(파생상품등의 범위)']=제76_02조
제76_02조1항_='영 제159조의2제1항제3호에서 "기획재정부령으로 정하는 것"이란 다음 각 호의 어느 하나에 해당하는 것을 말한다.'
제76_02조1항={}
제76_02조[제76_02조1항_]=제76_02조1항
제76_02조1항1호_='1. 미니코스피200선물'
제76_02조1항1호={}
제76_02조1항[제76_02조1항1호_]=제76_02조1항1호
제76_02조1항2호_='2. 미니코스피200옵션'
제76_02조1항2호={}
제76_02조1항[제76_02조1항2호_]=제76_02조1항2호
제76_02조['[본조신설 2016. 3. 16.]']={}
제76_02조['[종전 제76조의2는 제76조의3으로 이동 <2016. 3. 16.>]']={}
제76_03조_=' 제76조의3(파생상품등에 대한 양도차익 계산 등) '
제76_03조={}
제76_03조['소득세법시행규칙 제76조의3(파생상품등에 대한 양도차익 계산 등)']={}
조문['제76조의3(파생상품등에 대한 양도차익 계산 등)']=제76_03조
조['제76조의3(파생상품등에 대한 양도차익 계산 등)']=제76_03조
제76_03조1항_='①영 제161조의2제1항에서 "기획재정부령으로 정하는 방법에 따라 산출되는 손익"이란 다음 산식에 따라 계산한 금액을 말한다.'
제76_03조1항={}
제76_03조[제76_03조1항_]=제76_03조1항
제76_03조['']={}
제76_03조2항_='② 영 제161조의2제2항에서 "기획재정부령으로 정하는 방법에 따라 산출되는 손익"이란 다음 산식에 따라 계산한 금액을 말한다.'
제76_03조2항={}
제76_03조[제76_03조2항_]=제76_03조2항
제76_03조2항1호_='1. 반대거래로 계약이 소멸되는 경우'
제76_03조2항1호={}
제76_03조2항[제76_03조2항1호_]=제76_03조2항1호
제76_03조['']={}
제76_03조2호_='2. 권리행사 또는 최종거래일의 종료로 계약이 소멸되는 경우'
제76_03조2호={}
제76_03조[제76_03조2호_]=제76_03조2호
제76_03조['']={}
제76_03조3항_='③ 영 제161조의2제3항에서 "기획재정부령으로 정하는 방법에 따라 산출되는 손익"이란 다음 각 호의 구분에 따른 산식에 따라 계산한 금액을 말한다. <신설 2017. 3. 10.>'
제76_03조3항={}
제76_03조[제76_03조3항_]=제76_03조3항
제76_03조3항1호_='1. 증권을 환매하는 경우: 증권의 매도가격 - 증권의 매수가격'
제76_03조3항1호={}
제76_03조3항[제76_03조3항1호_]=제76_03조3항1호
제76_03조3항2호_='2. 권리행사 또는 최종거래일의 종료로 증권이 소멸되는 경우'
제76_03조3항2호={}
제76_03조3항[제76_03조3항2호_]=제76_03조3항2호
제76_03조['']={}
제76_03조4항_='④ 영 제161조의2제1항부터 제3항까지에서 "기획재정부령으로 정하는 비용"이란 「자본시장과 금융투자업에 관한 법률」 제58조에 따른 수수료로서 다음 각 호의 어느 하나에 해당하는 비용을 말한다. <개정 2018. 3. 21.>'
제76_03조4항={}
제76_03조[제76_03조4항_]=제76_03조4항
제76_03조4항1호_='1. 위탁매매수수료'
제76_03조4항1호={}
제76_03조4항[제76_03조4항1호_]=제76_03조4항1호
제76_03조4항2호_='2. 「자본시장과 금융투자업에 관한 법률」 제6조제7항에 따른 투자일임업을 영위하는 같은 법 제8조제3항의 투자중개업자가 투자중개업무와 투자일임업무를 결합한 자산관리계좌를 운용하여 부과하는 투자일임수수료 중 다음 각 목의 요건을 모두 갖춘 위탁매매수수료에 상당하는 비용'
제76_03조4항2호={}
제76_03조4항[제76_03조4항2호_]=제76_03조4항2호
제76_03조4항2호가목_='가. 전체 투자일임수수료를 초과하지 아니할 것'
제76_03조4항2호가목={}
제76_03조4항2호[제76_03조4항2호가목_]=제76_03조4항2호가목
제76_03조4항2호나목_='나. 영 제159조의2제1항 각 호에 해당하는 파생상품등을 온라인으로 직접 거래하는 경우에 부과하는 위탁매매수수료를 초과하지 아니할 것'
제76_03조4항2호나목={}
제76_03조4항2호[제76_03조4항2호나목_]=제76_03조4항2호나목
제76_03조4항2호다목_='다. 부과기준이 약관 및 계약서에 기재되어 있을 것'
제76_03조4항2호다목={}
제76_03조4항2호[제76_03조4항2호다목_]=제76_03조4항2호다목
제76_03조['[본조신설 2015. 3. 13.]']={}
제76_03조['[제76조의2에서 이동 <2016. 3. 16.>]']={}
제77조_=' 제77조 (환지예정지등의 양도 또는 취득가액의 계산) '
제77조={}
제77조['소득세법시행규칙 제77조 (환지예정지등의 양도 또는 취득가액의 계산)']={}
조문['제77조 (환지예정지등의 양도 또는 취득가액의 계산)']=제77조
조['제77조 (환지예정지등의 양도 또는 취득가액의 계산)']=제77조
제77조1항_='①양도 또는 취득가액을 기준시가에 의하는 경우 「도시개발법」 또는 「농어촌정비법」등에 의한 환지지구내 토지의 양도 또는 취득가액의 계산은 다음 각호의 산식에 의한다. 다만, 1984년 12월 31일이전에 취득한 토지로서 취득일 전후를 불문하고 1984년 12월 31일이전에 환지예정지로 지정된 토지의 경우에는 제2호의 산식에 의한다. <개정 1996. 3. 30., 1997. 4. 23., 2000. 4. 3., 2005. 3. 19.>'
제77조1항={}
제77조[제77조1항_]=제77조1항
제77조1항1호_='1. 종전의 토지소유자가 환지예정지구내의 토지 또는 환지처분된 토지를 양도한 경우'
제77조1항1호={}
제77조1항[제77조1항1호_]=제77조1항1호
제77조1항1호가목_='가. 양도가액'
제77조1항1호가목={}
제77조1항1호[제77조1항1호가목_]=제77조1항1호가목
제77조['']={}
제77조나목_='나. 취득가액'
제77조나목={}
제77조[제77조나목_]=제77조나목
제77조['']={}
제77조2호_='2. 환지예정지구내의 토지를 취득한 자가 당해 토지를 양도한 경우'
제77조2호={}
제77조[제77조2호_]=제77조2호
제77조2호가목_='가. 양도가액'
제77조2호가목={}
제77조2호[제77조2호가목_]=제77조2호가목
제77조['']={}
제77조나목_='나. 취득가액'
제77조나목={}
제77조[제77조나목_]=제77조나목
제77조['']={}
제77조2항_='②제1항의 규정을 적용함에 있어서 종전의 토지소유자가 환지청산금을 수령하는 경우의 양도 또는 취득가액의 계산은 다음 각호의 산식에 의한다.'
제77조2항={}
제77조[제77조2항_]=제77조2항
제77조2항1호_='1. 환지시 청산금을 수령한 경우'
제77조2항1호={}
제77조2항[제77조2항1호_]=제77조2항1호
제77조2항1호가목_='가. 양도가액'
제77조2항1호가목={}
제77조2항1호[제77조2항1호가목_]=제77조2항1호가목
제77조['']={}
제77조나목_='나. 취득가액'
제77조나목={}
제77조[제77조나목_]=제77조나목
제77조['']={}
제77조2호_='2. 환지예정지구의 토지 또는 환지처분된 토지를 양도한 경우'
제77조2호={}
제77조[제77조2호_]=제77조2호
제77조2호가목_='가. 양도가액'
제77조2호가목={}
제77조2호[제77조2호가목_]=제77조2호가목
제77조['']={}
제77조나목_='나. 취득가액'
제77조나목={}
제77조[제77조나목_]=제77조나목
제77조['']={}
제77조3항_='③제1항제1호 및 제2항의 경우에 환지사업으로 인하여 감소되는 토지의 면적에 대한 가액은 자본적 지출로 계상하지 아니한다.'
제77조3항={}
제77조[제77조3항_]=제77조3항
제78조_=' 제78조 (장기할부조건의 범위) '
제78조={}
제78조['소득세법시행규칙 제78조 (장기할부조건의 범위)']={}
조문['제78조 (장기할부조건의 범위)']=제78조
조['제78조 (장기할부조건의 범위)']=제78조
제78조1항_='① 삭제 <2000. 4. 3.>'
제78조1항={}
제78조[제78조1항_]=제78조1항
제78조2항_='② 삭제 <1996. 3. 30.>'
제78조2항={}
제78조[제78조2항_]=제78조2항
제78조3항_='③영 제162조제1항제3호에서 "기획재정부령이 정하는 장기할부 조건"이라 함은 법 제94조제1항 각호에 규정된 자산의 양도로 인하여 해당 자산의 대금을 월부ㆍ연부 기타의 부불방법에 따라 수입하는 것중 다음 각호의 요건을 갖춘 것을 말한다. <개정 1998. 8. 11., 1999. 5. 7., 2000. 4. 3., 2001. 4. 30., 2008. 4. 29., 2011. 3. 28.>'
제78조3항={}
제78조[제78조3항_]=제78조3항
제78조3항1호_='1. 계약금을 제외한 해당 자산의 양도대금을 2회이상으로 분할하여 수입할 것'
제78조3항1호={}
제78조3항[제78조3항1호_]=제78조3항1호
제78조3항2호_='2. 양도하는 자산의 소유권이전등기(등록 및 명의개서를 포함한다) 접수일ㆍ인도일 또는 사용수익일중 빠른 날의 다음날부터 최종 할부금의 지급기일까지의 기간이 1년 이상인 것'
제78조3항2호={}
제78조3항[제78조3항2호_]=제78조3항2호
제78조['[제목개정 2000. 4. 3.]']={}
제78_02조_=' 제78조의2 삭제 '
제78_02조={}
제78_02조['소득세법시행규칙 제78조의2 삭제 ']={}
조문['제78조의2 삭제 ']=제78_02조
조['제78조의2 삭제 ']=제78_02조
제79조_=' 제79조 (양도자산의 필요경비 계산등) '
제79조={}
제79조['소득세법시행규칙 제79조 (양도자산의 필요경비 계산등)']={}
조문['제79조 (양도자산의 필요경비 계산등)']=제79조
조['제79조 (양도자산의 필요경비 계산등)']=제79조
제79조1항_='①영 제163조제3항제4호에서 "기획재정부령이 정하는 것"이라 함은 다음 각 호의 비용을 말한다. <개정 1998. 8. 11., 2000. 4. 3., 2005. 3. 19., 2006. 9. 27., 2008. 4. 29., 2011. 3. 28., 2012. 2. 28.>'
제79조1항={}
제79조[제79조1항_]=제79조1항
제79조1항1호_='1. 「하천법」ㆍ「댐건설 및 주변지역지원 등에 관한 법률」 그 밖의 법률에 따라 시행하는 사업으로 인하여 해당사업구역 내의 토지소유자가 부담한 수익자부담금 등의 사업비용'
제79조1항1호={}
제79조1항[제79조1항1호_]=제79조1항1호
제79조1항2호_='2. 토지이용의 편의를 위하여 지출한 장애철거비용'
제79조1항2호={}
제79조1항[제79조1항2호_]=제79조1항2호
제79조1항3호_='3. 토지이용의 편의를 위하여 해당 토지 또는 해당 토지에 인접한 타인 소유의 토지에 도로를 신설한 경우의 그 시설비'
제79조1항3호={}
제79조1항[제79조1항3호_]=제79조1항3호
제79조1항4호_='4. 토지이용의 편의를 위하여 해당 토지에 도로를 신설하여 국가 또는 지방자치단체에 이를 무상으로 공여한 경우의 그 도로로 된 토지의 취득당시 가액'
제79조1항4호={}
제79조1항[제79조1항4호_]=제79조1항4호
제79조1항5호_='5. 사방사업에 소요된 비용'
제79조1항5호={}
제79조1항[제79조1항5호_]=제79조1항5호
제79조1항6호_='6. 제1호 내지 제5호의 비용과 유사한 비용'
제79조1항6호={}
제79조1항[제79조1항6호_]=제79조1항6호
제79조2항_='② 영 제163조제5항제2호에서 "기획재정부령으로 정하는 금융기관"이란 「자본시장과 금융투자업에 관한 법률」에 따른 투자매매업자 또는 투자중개업자, 「은행법」에 따른 인가를 받아 설립된 은행 및 「농업협동조합법」에 따른 농협은행을 말한다. <개정 2009. 4. 14., 2012. 2. 28.>'
제79조2항={}
제79조[제79조2항_]=제79조2항
제79조3항_='③ 영 제163조제11항제2호에서 "기획재정부령으로 정하는 방법"이란 「부동산 거래신고에 관한 법률」 제3조제1항에 따라 신고(「주택법」 제80조의2에 따른 주택 거래신고를 포함한다)한 실제거래가격을 관할 세무서장이 확인하는 방법을 말한다. <신설 2008. 4. 29., 2016. 3. 16.>'
제79조3항={}
제79조[제79조3항_]=제79조3항
제80조_=' 제80조 (토지ㆍ건물의 기준시가 산정) '
제80조={}
제80조['소득세법시행규칙 제80조 (토지ㆍ건물의 기준시가 산정)']={}
조문['제80조 (토지ㆍ건물의 기준시가 산정)']=제80조
조['제80조 (토지ㆍ건물의 기준시가 산정)']=제80조
제80조1항_='①영 제164조제8항에서 "기획재정부령이 정하는 방법에 의하여 계산한 가액"이란 다음 각 호의 가액을 말한다. <개정 1998. 3. 21., 1998. 8. 11., 1999. 5. 7., 2005. 8. 5., 2008. 4. 29., 2017. 3. 10.>'
제80조1항={}
제80조[제80조1항_]=제80조1항
제80조1항1호_='1. 취득일이 속하는 연도의 다음 연도 말일이전에 양도하는 경우에는 다음 각 목의 구분에 따른 산식에 의하여 계산한 가액. 다만, 다음 각 목의 산식에 의하여 계산한 양도당시의 기준시가가 취득당시의 기준시가보다 적은 경우에는 취득당시의 기준시가를 양도당시의 기준시가로 한다.'
제80조1항1호={}
제80조1항[제80조1항1호_]=제80조1항1호
제80조1항1호가목_='가. 양도일까지 새로운 기준시가가 고시(「부동산 가격공시에 관한 법률」에 따른 개별주택가격 및 공동주택가격의 공시를 포함한다. 이하 이 조에서 같다)되지 아니한 경우 : 양도당시의 기준시가 = 취득당시의 기준시가+(취득당시의 기준시가-전기의 기준시가)×[양도자산의 보유기간의 월수/기준시가 조정월수(100분의 100을 한도로 한다)]'
제80조1항1호가목={}
제80조1항1호[제80조1항1호가목_]=제80조1항1호가목
제80조1항1호나목_='나. 양도일부터 2월이 되는 날이 속하는 월의 말일까지 새로운 기준시가가 고시된 경우로서 거주자가 다음 산식을 적용하여 법 제110조제1항의 규정에 의한 신고를 하는 경우 : 양도당시의 기준시가=취득당시의 기준시가+(새로운 기준시가-취득당시의 기준시가)× (양도자산의 보유기간의 월수/기준시가 조정월수)'
제80조1항1호나목={}
제80조1항1호[제80조1항1호나목_]=제80조1항1호나목
제80조1항2호_='2. 제1호외의 경우에는 당해 양도자산의 취득당시의 기준시가'
제80조1항2호={}
제80조1항[제80조1항2호_]=제80조1항2호
제80조2항_='②제1항제1호 각목의 규정에 의한 "기준시가 조정월수"와 동호 가목의 규정에 의한 "전기의 기준시가"라 함은 다음 각호와 같다. <개정 1998. 3. 21., 1999. 5. 7.>'
제80조2항={}
제80조[제80조2항_]=제80조2항
제80조2항1호_='1. 기준시가 조정월수 : 제1항제1호 가목의 경우에는 전기의 기준시가 결정일부터 취득당시의 기준시가 결정일 전일까지의 월수를 말하며, 동호 나목의 경우에는 취득당시의 기준시가 결정일부터 새로운 기준시가 결정일 전일까지의 월수를 말한다.'
제80조2항1호={}
제80조2항[제80조2항1호_]=제80조2항1호
제80조2항2호_='2. 전기의 기준시가 : 취득당시의 기준시가 결정일 전일의 당해양도자산의 기준시가를 말한다.'
제80조2항2호={}
제80조2항[제80조2항2호_]=제80조2항2호
제80조3항_='③제1항제1호 가목의 규정을 적용함에 있어서 전기의 기준시가가 없는 경우에는 다음 각 호에 따른 가액을 전기의 기준시가로 본다. <개정 1996. 3. 30., 1998. 3. 21., 1999. 5. 7., 2000. 4. 3., 2001. 4. 30., 2005. 8. 5.>'
제80조3항={}
제80조[제80조3항_]=제80조3항
제80조3항1호_='1. 토지'
제80조3항1호={}
제80조3항[제80조3항1호_]=제80조3항1호
제80조['당해 토지와 지목ㆍ이용상황등이 유사한 인근토지의 전기의 기준시가']={}
제80조2호_='2. 법 제99조제1항제1호 나목의 규정에 의한 건물'
제80조2호={}
제80조[제80조2호_]=제80조2호
제80조['전기의 기준시가 = 국세청장이 당해 건물에 대하여 최초로 고시한 기준시가 × 당해 건물의 취득연도ㆍ신축연도ㆍ구조ㆍ내용연수 등을 감안하여 국세청장이 고시한 기준율']={}
제80조3호_='3. 법 제99조제1항제1호 다목의 규정에 의한 오피스텔 및 상업용 건물과 동호 라목의 규정에 의한 주택'
제80조3호={}
제80조[제80조3호_]=제80조3호
제80조['']={}
제80조4항_='④제3항제3호의 규정을 적용함에 있어서 당해 자산의 취득당시 또는 전기의 법 제99조제1항제1호 나목의 규정에 의한 가액이 없는 경우에는 제3항제2호의 규정을 준용하여 계산한 가액으로 한다. <신설 2001. 4. 30.>'
제80조4항={}
제80조[제80조4항_]=제80조4항
제80조5항_='⑤제1항 및 제2항의 규정에 의한 기준시가의 조정월수 및 양도자산보유기간의 월수를 계산함에 있어서 1월미만의 일수는 1월로 한다. <개정 2000. 4. 3.>'
제80조5항={}
제80조[제80조5항_]=제80조5항
제80조6항_='⑥영 제164조제4항의 규정을 적용함에 있어 동항 산식중 분모의 가액은 1990년 8월 30일 현재의 시가표준액을 초과하지 못하며, 1990년 8월 30일 직전에 결정된 시가 표준액과 취득일 직전에 결정된 시가표준액이 동일한 경우로서 1990년 1월 1일을 기준으로 한 개별공시지가에 곱하는 그 비율이 100분의 100을 초과하는 경우에는 그 초과하는 부분은 이를 없는 것으로 한다. <신설 1996. 3. 30., 2000. 4. 3.>'
제80조6항={}
제80조[제80조6항_]=제80조6항
제80조7항_='⑦영 제164조제4항의 규정을 적용함에 있어서 동항 산식중 "직전에 결정된 시가표준액"이라 함은 1989년 12월 31일 현재의 시가표준액을 말한다. 다만, 1990년 1월 1일이후 1990년 8월 29일이전에 시가표준액이 수시조정된 경우에는 당해최종 수시조정일의 전일의 시가표준액을 말한다. <신설 1998. 3. 21., 2000. 4. 3.>'
제80조7항={}
제80조[제80조7항_]=제80조7항
제80조8항_='⑧ 영 제164조제9항제1호에서 보상금액 산정의 기초가 되는 기준시가는 보상금 산정 당시 해당 토지의 개별공시지가를 말한다. <신설 2009. 4. 14.>'
제80조8항={}
제80조[제80조8항_]=제80조8항
제80_02조_=' 제80조의2(기준시가 고시 전 의견청취를 위한 공고방법) '
제80_02조={}
제80_02조['소득세법시행규칙 제80조의2(기준시가 고시 전 의견청취를 위한 공고방법)']={}
조문['제80조의2(기준시가 고시 전 의견청취를 위한 공고방법)']=제80_02조
조['제80조의2(기준시가 고시 전 의견청취를 위한 공고방법)']=제80_02조
제80_02조1항_='법 제99조제4항에서 "기획재정부령으로 정하는 방법"이란 국세청 인터넷 홈페이지에 게시하는 것을 말한다. <개정 2008. 4. 29., 2010. 4. 30.>'
제80_02조1항={}
제80_02조[제80_02조1항_]=제80_02조1항
제80_02조['[본조신설 2005. 8. 5.]']={}
제81조_=' 제81조 (토지ㆍ건물외의 자산의 기준시가 산정) '
제81조={}
제81조['소득세법시행규칙 제81조 (토지ㆍ건물외의 자산의 기준시가 산정)']={}
조문['제81조 (토지ㆍ건물외의 자산의 기준시가 산정)']=제81조
조['제81조 (토지ㆍ건물외의 자산의 기준시가 산정)']=제81조
제81조1항_='① 삭제 <2007. 4. 17.>'
제81조1항={}
제81조[제81조1항_]=제81조1항
제81조2항_='② 삭제 <2001. 4. 30.>'
제81조2항={}
제81조[제81조2항_]=제81조2항
제81조3항_='③ 영 제165조제8항제3호에서 "기획재정부령으로 정하는 방법에 따라 계산한 가액"이란 다음 각 호의 방법으로 환산한 가액을 말한다. 이 경우 "생산자물가지수"란 「한국은행법」에 따라 한국은행이 조사한 매월의 생산자물가지수를 말한다. <신설 2009. 4. 14.>'
제81조3항={}
제81조[제81조3항_]=제81조3항
제81조3항1호_='1. 양도 당시의 기준시가는 정하여져 있으나 취득 당시의 기준시가를 정할 수 없는 경우에 취득 당시의 기준시가로 하는 가액'
제81조3항1호={}
제81조3항[제81조3항1호_]=제81조3항1호
제81조['']={}
제81조2호_='2. 취득 당시의 기준시가와 양도 당시의 기준시가를 모두 정할 수 없는 경우에 취득 또는 양도 당시의 기준시가로 하는 가액'
제81조2호={}
제81조[제81조2호_]=제81조2호
제81조['']={}
제81조4항_='④영 제165조제9항에서 "기획재정부령으로 정하는 방법에 따라 계산한 가액"이란 다음 각 호의 규정에 의하여 계산한 가액을 말한다. 이 경우 1개월 미만의 월수는 1개월로 본다. <개정 1998. 8. 11., 1999. 5. 7., 2001. 4. 30., 2008. 4. 29., 2010. 4. 30.>'
제81조4항={}
제81조[제81조4항_]=제81조4항
제81조4항1호_='1. 당해법인의 동일한 사업연도내에 취득하여 양도하는 경우에는 다음 산식에 의하여 계산한 가액'
제81조4항1호={}
제81조4항[제81조4항1호_]=제81조4항1호
제81조['']={}
제81조2호_='2. 제1호외의 경우에는 당해 양도자산의 기준시가'
제81조2호={}
제81조[제81조2호_]=제81조2호
제81조5항_='⑤ 삭제 <2000. 4. 3.>'
제81조5항={}
제81조[제81조5항_]=제81조5항
제81조6항_='⑥영 제165조제10항제1호 및 제2호에 규정하는 자기자본이익률 및 자기자본회전율은 한국은행이 업종별, 규모별로 발표한 자기자본이익률 및 자기자본회전율을 말한다. <개정 2001. 4. 30.>'
제81조6항={}
제81조[제81조6항_]=제81조6항
제81조7항_='⑦ 삭제 <2009. 4. 14.>'
제81조7항={}
제81조[제81조7항_]=제81조7항
제82조_=' 제82조 (소형주택 등의 범위) '
제82조={}
제82조['소득세법시행규칙 제82조 (소형주택 등의 범위)']={}
조문['제82조 (소형주택 등의 범위)']=제82조
조['제82조 (소형주택 등의 범위)']=제82조
제82조1항_='① 삭제 <2018. 3. 21.>'
제82조1항={}
제82조[제82조1항_]=제82조1항
제82조2항_='② 삭제 <2014. 3. 14.>'
제82조2항={}
제82조[제82조2항_]=제82조2항
제82조3항_='③ 삭제 <2012. 2. 28.>'
제82조3항={}
제82조[제82조3항_]=제82조3항
제82조4항_='④영 제167조의3제5항제2호가목에서 "기획재정부령으로 정하는 부득이한 사유"란 「공익사업을 위한 토지 등의 취득 및 보상에 관한 법률」 등에 의하여 수용(협의매수를 포함한다)되거나 사망으로 인하여 상속되는 경우를 말한다. <개정 2005. 3. 19., 2005. 12. 31., 2008. 4. 29., 2017. 3. 10.>'
제82조4항={}
제82조[제82조4항_]=제82조4항
제82조['[본조신설 2004. 6. 3.]']={}
제82조['[제목개정 2005. 12. 31.]']={}
제83조_=' 제83조 (양도소득세가 중과되는 1세대 2주택에 관한 특례의 요건) '
제83조={}
제83조['소득세법시행규칙 제83조 (양도소득세가 중과되는 1세대 2주택에 관한 특례의 요건)']={}
조문['제83조 (양도소득세가 중과되는 1세대 2주택에 관한 특례의 요건)']=제83조
조['제83조 (양도소득세가 중과되는 1세대 2주택에 관한 특례의 요건)']=제83조
제83조1항_='영 제167조의10제1항제3호 및 영 제167조의11제1항제4호에서 "기획재정부령으로 정하는 취학, 근무상의 형편, 질병의 요양, 그 밖에 부득이한 사유"란 세대의 구성원 중 일부가 다음 각 호의 어느 하나에 해당하는 경우를 말한다.'
제83조1항={}
제83조[제83조1항_]=제83조1항
제83조1항1호_='1. 「초ㆍ중등교육법」에 따른 학교(초등학교 및 중학교는 제외한다) 및 「고등교육법」 제2조에 따른 학교에의 취학'
제83조1항1호={}
제83조1항[제83조1항1호_]=제83조1항1호
제83조1항2호_='2. 직장의 변경이나 전근 등 근무상의 형편'
제83조1항2호={}
제83조1항[제83조1항2호_]=제83조1항2호
제83조1항3호_='3. 1년 이상의 치료나 요양을 필요로 하는 질병의 치료 또는 요양'
제83조1항3호={}
제83조1항[제83조1항3호_]=제83조1항3호
제83조['[본조신설 2018. 3. 21.]']={}
제83_02조_=' 제83조의2(부동산가격안정심의위원회 위원의 임기 등) '
제83_02조={}
제83_02조['소득세법시행규칙 제83조의2(부동산가격안정심의위원회 위원의 임기 등)']={}
조문['제83조의2(부동산가격안정심의위원회 위원의 임기 등)']=제83_02조
조['제83조의2(부동산가격안정심의위원회 위원의 임기 등)']=제83_02조
제83_02조1항_='①영 제168조의4의 규정에 따른 부동산가격안정심의위원회의 위원의 임기는 2년으로 한다.'
제83_02조1항={}
제83_02조[제83_02조1항_]=제83_02조1항
제83_02조2항_='②부동산가격안정심의위원회의 구성ㆍ운영과 관련하여 필요한 사항은 기획재정부장관이 정한다. <개정 2008. 4. 29.>'
제83_02조2항={}
제83_02조[제83_02조2항_]=제83_02조2항
제83_02조['[본조신설 2005. 12. 31.]']={}
제83_03조_=' 제83조의3(농지의 범위 등) '
제83_03조={}
제83_03조['소득세법시행규칙 제83조의3(농지의 범위 등)']={}
조문['제83조의3(농지의 범위 등)']=제83_03조
조['제83조의3(농지의 범위 등)']=제83_03조
제83_03조1항_='①영 제168조의8제3항제7호 각 목 외의 부분에서 "질병"이라 함은 1년 이상의 치료나 요양을 필요로 하는 질병을 말한다.'
제83_03조1항={}
제83_03조[제83_03조1항_]=제83_03조1항
제83_03조2항_='②영 제168조의8제3항제7호 각 목 외의 부분에서 "고령"이라 함은 65세 이상의 연령을 말한다.'
제83_03조2항={}
제83_03조[제83_03조2항_]=제83_03조2항
제83_03조3항_='③영 제168조의8제3항제7호 각 목 외의 부분에서 "그 밖에 기획재정부령이 정하는 부득이한 사유"라 함은 「농지법 시행령」 제24조제1항제2호에 해당하는 경우를 말한다. <개정 2008. 4. 29.>'
제83_03조3항={}
제83_03조[제83_03조3항_]=제83_03조3항
제83_03조4항_='④영 제168조의8제7항에서 "기획재정부령이 정하는 서류"라 함은 다음 각 호의 서류를 말한다. <개정 2008. 4. 29.>'
제83_03조4항={}
제83_03조[제83_03조4항_]=제83_03조4항
제83_03조4항1호_='1. 별지 제90호서식의 질병 등으로 인한 농지의 비사업용토지 제외신청서'
제83_03조4항1호={}
제83_03조4항[제83_03조4항1호_]=제83_03조4항1호
제83_03조4항2호_='2. 삭제 <2006. 7. 5.>'
제83_03조4항2호={}
제83_03조4항[제83_03조4항2호_]=제83_03조4항2호
제83_03조4항3호_='3. 삭제 <2006. 7. 5.>'
제83_03조4항3호={}
제83_03조4항[제83_03조4항3호_]=제83_03조4항3호
제83_03조4항4호_='4. 재직증명서(자경할 수 없는 사유가 공직취임인 경우에 한한다)'
제83_03조4항4호={}
제83_03조4항[제83_03조4항4호_]=제83_03조4항4호
제83_03조4항5호_='5. 재학증명서(자경할 수 없는 사유가 취학인 경우에 한한다)'
제83_03조4항5호={}
제83_03조4항[제83_03조4항5호_]=제83_03조4항5호
제83_03조4항6호_='6. 진단서 또는 요양증명서(자경할 수 없는 사유가 질병인 경우에 한한다)'
제83_03조4항6호={}
제83_03조4항[제83_03조4항6호_]=제83_03조4항6호
제83_03조4항7호_='7. 그 밖에 자경할 수 없는 사유를 확인할 수 있는 서류'
제83_03조4항7호={}
제83_03조4항[제83_03조4항7호_]=제83_03조4항7호
제83_03조5항_='⑤영 제168조의8제7항에 따라 서류를 제출받은 납세지 관할세무서장은 「전자정부법」 제36조제1항에 따른 행정정보의 공동이용을 통하여 다음 각 호의 서류를 확인하여야 한다. 다만, 제1호에 따른 주민등록표 등본은 영 제168조의8제3항제7호의 적용을 받으려는 자가 확인에 동의하지 아니하는 경우에는 그 서류를 제출하도록 하여야 한다. <신설 2006. 7. 5., 2008. 4. 29., 2011. 3. 28.>'
제83_03조5항={}
제83_03조[제83_03조5항_]=제83_03조5항
제83_03조5항1호_='1. 주민등록표 등본'
제83_03조5항1호={}
제83_03조5항[제83_03조5항1호_]=제83_03조5항1호
제83_03조5항2호_='2. 토지등기부 등본 또는 토지대장 등본'
제83_03조5항2호={}
제83_03조5항[제83_03조5항2호_]=제83_03조5항2호
제83_03조['[본조신설 2005. 12. 31.]']={}
제83_04조_=' 제83조의4(사업에 사용되는 그 밖의 토지의 범위) '
제83_04조={}
제83_04조['소득세법시행규칙 제83조의4(사업에 사용되는 그 밖의 토지의 범위)']={}
조문['제83조의4(사업에 사용되는 그 밖의 토지의 범위)']=제83_04조
조['제83조의4(사업에 사용되는 그 밖의 토지의 범위)']=제83_04조
제83_04조1항_='①영 제168조의11제1항제1호 가목(1) 본문에서 "기획재정부령이 정하는 선수전용 체육시설의 기준면적"이라 함은 별표 3의 기준면적을 말한다. <개정 2008. 4. 29.>'
제83_04조1항={}
제83_04조[제83_04조1항_]=제83_04조1항
제83_04조2항_='②영 제168조의11제1항제1호 가목(1) 단서에서 "기획재정부령이 정하는 선수ㆍ지도자 등에 관한 요건"이라 함은 다음 각 호의 모든 요건을 말한다. <개정 2008. 4. 29.>'
제83_04조2항={}
제83_04조[제83_04조2항_]=제83_04조2항
제83_04조2항1호_='1. 선수는 대한체육회에 가맹된 경기단체에 등록되어 있는 자일 것'
제83_04조2항1호={}
제83_04조2항[제83_04조2항1호_]=제83_04조2항1호
제83_04조2항2호_='2. 경기종목별 선수의 수는 당해 종목의 경기정원 이상일 것'
제83_04조2항2호={}
제83_04조2항[제83_04조2항2호_]=제83_04조2항2호
제83_04조2항3호_='3. 경기종목별로 경기지도자가 1인 이상일 것'
제83_04조2항3호={}
제83_04조2항[제83_04조2항3호_]=제83_04조2항3호
제83_04조3항_='③영 제168조의11제1항제1호 가목(2)에서 "기획재정부령이 정하는 기준면적"이라 함은 별표 4의 기준면적을 말한다. <개정 2008. 4. 29.>'
제83_04조3항={}
제83_04조[제83_04조3항_]=제83_04조3항
제83_04조4항_='④영 제168조의11제1항제1호 나목 본문에서 "기획재정부령이 정하는 종업원 체육시설의 기준면적"이라 함은 별표 5의 기준면적을 말한다. <개정 2008. 4. 29.>'
제83_04조4항={}
제83_04조[제83_04조4항_]=제83_04조4항
제83_04조5항_='⑤영 제168조의11제1항제1호 나목 단서에서 "기획재정부령이 정하는 종업원체육시설의 기준"이라 함은 다음 각 호의 기준을 말한다. <개정 2008. 4. 29.>'
제83_04조5항={}
제83_04조[제83_04조5항_]=제83_04조5항
제83_04조5항1호_='1. 운동장과 코트는 축구ㆍ배구ㆍ테니스 경기를 할 수 있는 시설을 갖출 것'
제83_04조5항1호={}
제83_04조5항[제83_04조5항1호_]=제83_04조5항1호
제83_04조5항2호_='2. 실내체육시설은 영구적인 시설물이어야 하고, 탁구대를 2면 이상을 둘 수 있는 규모일 것'
제83_04조5항2호={}
제83_04조5항[제83_04조5항2호_]=제83_04조5항2호
제83_04조6항_='⑥영 제168조의11제1항제2호 다목에서 "기획재정부령이 정하는 율"이라 함은 100분의 3을 말한다. <개정 2008. 4. 29.>'
제83_04조6항={}
제83_04조[제83_04조6항_]=제83_04조6항
제83_04조7항_='⑦영 제168조의11제1항제3호 본문에서 "기획재정부령이 정하는 토지"라 함은 다음 각 호의 어느 하나에 해당하는 토지를 말한다. <개정 2008. 4. 29.>'
제83_04조7항={}
제83_04조[제83_04조7항_]=제83_04조7항
제83_04조7항1호_='1. 「경제자유구역의 지정 및 운영에 관한 법률」에 따른 개발사업시행자가 경제자유구역개발계획에 따라 경제자유구역 안에서 조성한 토지'
제83_04조7항1호={}
제83_04조7항[제83_04조7항1호_]=제83_04조7항1호
제83_04조7항2호_='2. 「관광진흥법」에 따른 사업시행자가 관광단지 안에서 조성한 토지'
제83_04조7항2호={}
제83_04조7항[제83_04조7항2호_]=제83_04조7항2호
제83_04조7항3호_='3. 「기업도시개발특별법」에 따라 지정된 개발사업시행자가 개발구역 안에서 조성한 토지'
제83_04조7항3호={}
제83_04조7항[제83_04조7항3호_]=제83_04조7항3호
제83_04조7항4호_='4. 「물류시설의 개발 및 운영에 관한 법률」에 따른 물류단지개발사업시행자가 해당 물류단지 안에서 조성한 토지'
제83_04조7항4호={}
제83_04조7항[제83_04조7항4호_]=제83_04조7항4호
제83_04조7항5호_='5. 「중소기업진흥 및 제품구매촉진에 관한 법률」에 따라 단지조성사업의 실시계획이 승인된 지역의 사업시행자가 조성한 토지'
제83_04조7항5호={}
제83_04조7항[제83_04조7항5호_]=제83_04조7항5호
제83_04조7항6호_='6. 「지역균형개발 및 지방중소기업 육성에 관한 법률」에 따라 지정된 개발촉진지구 안의 사업시행자가 조성한 토지'
제83_04조7항6호={}
제83_04조7항[제83_04조7항6호_]=제83_04조7항6호
제83_04조7항7호_='7. 「한국컨테이너부두공단법」에 따라 설립된 한국컨테이너부두공단이 조성한 토지'
제83_04조7항7호={}
제83_04조7항[제83_04조7항7호_]=제83_04조7항7호
제83_04조8항_='⑧영 제168조의11제1항제4호 단서에서 "기획재정부령이 정하는 기준면적"이라 함은 수용정원에 200제곱미터를 곱한 면적을 말한다. <개정 2008. 4. 29.>'
제83_04조8항={}
제83_04조[제83_04조8항_]=제83_04조8항
제83_04조9항_='⑨영 제168조의11제1항제5호 다목의 규정에 따른 시설기준은 별표 6 제1호와 같다.'
제83_04조9항={}
제83_04조[제83_04조9항_]=제83_04조9항
제83_04조10항_='⑩영 제168조의11제1항제5호 다목의 규정에 따른 기준면적은 별표 6 제2호와 같다.'
제83_04조10항={}
제83_04조[제83_04조10항_]=제83_04조10항
제83_04조11항_='⑪영 제168조의11제1항제6호에서 "기획재정부령이 정하는 휴양시설업용 토지"라 함은 「관광진흥법」에 따른 전문휴양업ㆍ종합휴양업 그 밖에 이와 유사한 시설을 갖추고 타인의 휴양이나 여가선용을 위하여 이를 이용하게 하는 사업용 토지(「관광진흥법」에 따른 전문휴양업ㆍ종합휴양업 그 밖에 이와 유사한 휴양시설업의 일부로 운영되는 스키장업 또는 수영장업용 토지를 포함하며, 온천장용 토지를 제외한다)를 말한다. <개정 2008. 4. 29.>'
제83_04조11항={}
제83_04조[제83_04조11항_]=제83_04조11항
제83_04조12항_='⑫영 제168조의11제1항제6호에서 "기획재정부령이 정하는 기준면적"이란 다음 각 호의 기준면적을 합한 면적을 말한다. <개정 2008. 4. 29., 2009. 4. 14., 2011. 3. 28.>'
제83_04조12항={}
제83_04조[제83_04조12항_]=제83_04조12항
제83_04조12항1호_='1. 옥외 동물방목장 및 옥외 식물원이 있는 경우 그에 사용되는 토지의 면적'
제83_04조12항1호={}
제83_04조12항[제83_04조12항1호_]=제83_04조12항1호
제83_04조12항2호_='2. 부설주차장이 있는 경우 「주차장법」에 따른 부설주차장 설치기준면적의 2배 이내의 부설주차장용 토지의 면적. 다만, 「도시교통정비 촉진법」에 따라 교통영향분석ㆍ개선대책이 수립된 주차장의 경우에는 같은 법 제16조제4항에 따라 해당 사업자에게 통보된 주차장용 토지면적으로 한다.'
제83_04조12항2호={}
제83_04조12항[제83_04조12항2호_]=제83_04조12항2호
제83_04조12항3호_='3. 「지방세법 시행령」 제101조제1항제2호에 따른 건축물이 있는 경우 재산세 종합합산과세대상 토지 중 건축물의 바닥면적(건물 외의 시설물인 경우에는 그 수평투영면적을 말한다)에 동조제2항의 규정에 따른 용도지역별 배율을 곱하여 산정한 면적 범위 안의 건축물 부속토지의 면적'
제83_04조12항3호={}
제83_04조12항[제83_04조12항3호_]=제83_04조12항3호
제83_04조13항_='⑬영 제168조의11제1항제10호 및 제11호 다목에서 "기획재정부령이 정하는 율"이라 함은 100분의 4를 말한다. <개정 2008. 4. 29.>'
제83_04조13항={}
제83_04조[제83_04조13항_]=제83_04조13항
제83_04조14항_='⑭영 제168조의11제1항제12호에서 "기획재정부령이 정하는 토지"라 함은 블록ㆍ석물ㆍ토관ㆍ벽돌ㆍ콘크리트제품ㆍ옹기ㆍ철근ㆍ비철금속ㆍ플라스틱파이프ㆍ골재ㆍ조경작물ㆍ화훼ㆍ분재ㆍ농산물ㆍ수산물ㆍ축산물의 도매업 및 소매업용(농산물ㆍ수산물 및 축산물의 경우에는 「유통산업발전법」에 따른 시장과 그 밖에 이와 유사한 장소에서 운영하는 경우에 한한다) 토지를 말한다. <개정 2008. 4. 29.>'
제83_04조14항={}
제83_04조[제83_04조14항_]=제83_04조14항
제83_04조15항_='⑮영 제168조의11제1항제12호에서 "기획재정부령이 정하는 율"이라 함은 다음 각 호의 규정에 따른 율을 말한다. <개정 2008. 4. 29.>'
제83_04조15항={}
제83_04조[제83_04조15항_]=제83_04조15항
제83_04조15항1호_='1. 블록ㆍ석물 및 토관제조업용 토지'
제83_04조15항1호={}
제83_04조15항[제83_04조15항1호_]=제83_04조15항1호
제83_04조['100분의 20']={}
제83_04조2호_='2. 조경작물식재업용 토지 및 화훼판매시설업용 토지'
제83_04조2호={}
제83_04조[제83_04조2호_]=제83_04조2호
제83_04조['100분의 7']={}
제83_04조3호_='3. 자동차정비ㆍ중장비정비ㆍ중장비운전에 관한 과정을 교습하는 학원용 토지'
제83_04조3호={}
제83_04조[제83_04조3호_]=제83_04조3호
제83_04조['100분의 10']={}
제83_04조4호_='4. 농업에 관한 과정을 교습하는 학원용 토지'
제83_04조4호={}
제83_04조[제83_04조4호_]=제83_04조4호
제83_04조['100분의 7']={}
제83_04조5호_='5. 제14항의 규정에 따른 토지'
제83_04조5호={}
제83_04조[제83_04조5호_]=제83_04조5호
제83_04조['100분의 10']={}
제83_04조16항_='⑯영 제168조의11제1항제13호에서 "주택 신축의 가능여부 등을 고려하여 기획재정부령이 정하는 기준에 해당하는 토지"란 법령의 규정에 따라 주택의 신축이 금지 또는 제한되는 지역에 소재하지 아니하고, 그 지목이 대지이거나 실질적으로 주택을 신축할 수 있는 토지(「건축법」 제44조에 따른 대지와 도로와의 관계를 충족하지 못하는 토지를 포함한다)를 말한다. <개정 2008. 4. 29., 2009. 4. 14.>'
제83_04조16항={}
제83_04조[제83_04조16항_]=제83_04조16항
제83_04조17항_='⑰영 제168조의11제1항제13호 및 제16항의 규정을 적용함에 있어서 나지가 2필지 이상인 경우에는 당해 세대의 구성원이 제16항의 규정에 따른 토지를 선택할 수 있다. 다만, 제18항의 규정에 따른 무주택세대 소유 나지의 비사업용토지 제외신청서를 제출하지 아니한 경우에는 제16항의 규정에 따른 토지에 해당하는 필지의 결정은 다음 각 호의 방법에 의한다.'
제83_04조17항={}
제83_04조[제83_04조17항_]=제83_04조17항
제83_04조17항1호_='1. 1세대의 구성원 중 2인 이상이 나지를 소유하고 있는 경우에는 다음의 순서를 적용한다.'
제83_04조17항1호={}
제83_04조17항[제83_04조17항1호_]=제83_04조17항1호
제83_04조17항1호가목_='가. 세대주'
제83_04조17항1호가목={}
제83_04조17항1호[제83_04조17항1호가목_]=제83_04조17항1호가목
제83_04조17항1호나목_='나. 세대주의 배우자'
제83_04조17항1호나목={}
제83_04조17항1호[제83_04조17항1호나목_]=제83_04조17항1호나목
제83_04조17항1호다목_='다. 연장자'
제83_04조17항1호다목={}
제83_04조17항1호[제83_04조17항1호다목_]=제83_04조17항1호다목
제83_04조17항2호_='2. 1세대의 구성원 중 동일인이 2필지 이상의 나지를 소유하고 있는 경우에는 면적이 큰 필지의 나지를, 동일한 면적인 필지의 나지 중에서는 먼저 취득한 나지를 우선하여 적용한다.'
제83_04조17항2호={}
제83_04조17항[제83_04조17항2호_]=제83_04조17항2호
제83_04조18항_='⑱제16항에 해당하는 토지의 소유자는 양도일이 속하는 과세기간의 과세표준신고시에 납세지 관할 세무서장에게 별지 제91호서식의 무주택세대 소유 나지의 비사업용토지 제외신청서에 다음 각 호의 서류를 첨부하여 제출하여야 한다. <개정 2009. 4. 14.>'
제83_04조18항={}
제83_04조[제83_04조18항_]=제83_04조18항
제83_04조18항1호_='1. 삭제 <2006. 7. 5.>'
제83_04조18항1호={}
제83_04조18항[제83_04조18항1호_]=제83_04조18항1호
제83_04조18항2호_='2. 삭제 <2006. 7. 5.>'
제83_04조18항2호={}
제83_04조18항[제83_04조18항2호_]=제83_04조18항2호
제83_04조18항3호_='3. 삭제 <2009. 4. 14.>'
제83_04조18항3호={}
제83_04조18항[제83_04조18항3호_]=제83_04조18항3호
제83_04조18항4호_='4. 삭제 <2009. 4. 14.>'
제83_04조18항4호={}
제83_04조18항[제83_04조18항4호_]=제83_04조18항4호
제83_04조19항_='⑲제18항에 따라 신청서를 제출받은 납세지 관할세무서장은 「전자정부법」 제36조제1항에 따른 행정정보의 공동이용을 통하여 다음 각 호의 서류를 확인하여야 한다. 다만, 제1호에 따른 주민등록표 등본은 신청인이 확인에 동의하지 아니하는 경우에는 이를 제출하도록 하여야 한다. <신설 2006. 7. 5., 2008. 4. 29., 2011. 3. 28.>'
제83_04조19항={}
제83_04조[제83_04조19항_]=제83_04조19항
제83_04조19항1호_='1. 주민등록표 등본'
제83_04조19항1호={}
제83_04조19항[제83_04조19항1호_]=제83_04조19항1호
제83_04조19항2호_='2. 토지등기부 등본 또는 토지대장 등본(토지이용계획 확인서를 포함한다)'
제83_04조19항2호={}
제83_04조19항[제83_04조19항2호_]=제83_04조19항2호
제83_04조['[본조신설 2005. 12. 31.]']={}
제83_05조_=' 제83조의5(부득이한 사유가 있어 비사업용 토지로 보지 아니하는 토지의 판정기준 등) '
제83_05조={}
제83_05조['소득세법시행규칙 제83조의5(부득이한 사유가 있어 비사업용 토지로 보지 아니하는 토지의 판정기준 등)']={}
조문['제83조의5(부득이한 사유가 있어 비사업용 토지로 보지 아니하는 토지의 판정기준 등)']=제83_05조
조['제83조의5(부득이한 사유가 있어 비사업용 토지로 보지 아니하는 토지의 판정기준 등)']=제83_05조
제83_05조1항_='①영 제168조의14제1항제4호에 따라 다음 각 호의 어느 하나에 해당하는 토지는 해당 각 호에서 규정한 기간동안 법 제104조의3제1항 각 호의 어느 하나에 해당하지 아니하는 토지로 보아 같은 항에 따른 비사업용 토지에 해당하는지 여부를 판정한다. 다만, 부동산매매업(한국표준산업분류에 따른 건물건설업 및 부동산공급업을 말한다)을 영위하는 자가 취득한 매매용부동산에 대하여는 제1호 및 제2호를 적용하지 아니한다. <개정 2009. 4. 14.>'
제83_05조1항={}
제83_05조[제83_05조1항_]=제83_05조1항
제83_05조1항1호_='1. 토지를 취득한 후 법령에 따라 당해 사업과 관련된 인가ㆍ허가(건축허가를 포함한다. 이하 같다)ㆍ면허 등을 신청한 자가 「건축법」 제18조 및 행정지도에 따라 건축허가가 제한됨에 따라 건축을 할 수 없게 된 토지 : 건축허가가 제한된 기간'
제83_05조1항1호={}
제83_05조1항[제83_05조1항1호_]=제83_05조1항1호
제83_05조1항2호_='2. 토지를 취득한 후 법령에 따라 당해 사업과 관련된 인가ㆍ허가ㆍ면허 등을 받았으나 건축자재의 수급조절을 위한 행정지도에 따라 착공이 제한된 토지 : 착공이 제한된 기간'
제83_05조1항2호={}
제83_05조1항[제83_05조1항2호_]=제83_05조1항2호
제83_05조1항3호_='3. 사업장(임시 작업장을 제외한다)의 진입도로로서 「사도법」에 따른 사도 또는 불특정다수인이 이용하는 도로 : 사도 또는 도로로 이용되는 기간'
제83_05조1항3호={}
제83_05조1항[제83_05조1항3호_]=제83_05조1항3호
제83_05조1항4호_='4. 「건축법」에 따라 건축허가를 받을 당시에 공공공지(公共空地)로 제공한 토지 : 당해 건축물의 착공일부터 공공공지로의 제공이 끝나는 날까지의 기간'
제83_05조1항4호={}
제83_05조1항[제83_05조1항4호_]=제83_05조1항4호
제83_05조1항5호_='5. 지상에 건축물이 정착되어 있지 아니한 토지를 취득하여 사업용으로 사용하기 위하여 건설에 착공(착공일이 불분명한 경우에는 착공신고서 제출일을 기준으로 한다)한 토지 : 당해 토지의 취득일부터 2년 및 착공일 이후 건설이 진행 중인 기간(천재지변, 민원의 발생 그 밖의 정당한 사유로 인하여 건설을 중단한 경우에는 중단한 기간을 포함한다)'
제83_05조1항5호={}
제83_05조1항[제83_05조1항5호_]=제83_05조1항5호
제83_05조1항6호_='6. 저당권의 실행 그 밖에 채권을 변제받기 위하여 취득한 토지 및 청산절차에 따라 잔여재산의 분배로 인하여 취득한 토지 : 취득일부터 2년'
제83_05조1항6호={}
제83_05조1항[제83_05조1항6호_]=제83_05조1항6호
제83_05조1항7호_='7. 당해 토지를 취득한 후 소유권에 관한 소송이 계속(係屬) 중인 토지 : 법원에 소송이 계속되거나 법원에 의하여 사용이 금지된 기간'
제83_05조1항7호={}
제83_05조1항[제83_05조1항7호_]=제83_05조1항7호
제83_05조1항8호_='8. 「도시개발법」에 따른 도시개발구역 안의 토지로서 환지방식에 따라 시행되는 도시개발사업이 구획단위로 사실상 완료되어 건축이 가능한 토지 : 건축이 가능한 날부터 2년'
제83_05조1항8호={}
제83_05조1항[제83_05조1항8호_]=제83_05조1항8호
제83_05조1항9호_='9. 건축물이 멸실ㆍ철거되거나 무너진 토지 : 당해 건축물이 멸실ㆍ철거되거나 무너진 날부터 2년'
제83_05조1항9호={}
제83_05조1항[제83_05조1항9호_]=제83_05조1항9호
제83_05조1항10호_='10. 거주자가 2년 이상 사업에 사용한 토지로서 사업의 일부 또는 전부를 휴업ㆍ폐업 또는 이전함에 따라 사업에 직접 사용하지 아니하게 된 토지 : 휴업ㆍ폐업 또는 이전일부터 2년'
제83_05조1항10호={}
제83_05조1항[제83_05조1항10호_]=제83_05조1항10호
제83_05조1항11호_='11. 천재지변 그 밖에 이에 준하는 사유의 발생일부터 소급하여 2년 이상 계속하여 재촌(영 제168조의8제2항의 규정에 따른 재촌을 말한다)하면서 자경(영 제168조의8제2항의 규정에 따른 자경을 말한다. 이하 이 호에서 같다)한 자가 소유하는 농지로서 농지의 형질이 변경되어 황지(荒地)가 됨으로써 자경하지 못하는 토지 : 당해 사유의 발생일부터 2년'
제83_05조1항11호={}
제83_05조1항[제83_05조1항11호_]=제83_05조1항11호
제83_05조1항12호_='12. 당해 토지를 취득한 후 제1호 내지 제11호의 사유 외에 도시계획의 변경 등 정당한 사유로 인하여 사업에 사용하지 아니하는 토지 : 당해 사유가 발생한 기간'
제83_05조1항12호={}
제83_05조1항[제83_05조1항12호_]=제83_05조1항12호
제83_05조2항_='②영 제168조의14제2항제3호의 규정에 따라 다음 각 호의 어느 하나에 해당하는 토지에 대하여는 해당 각 호에서 규정한 날을 양도일로 보아 영 제168조의6의 규정을 적용하여 비사업용 토지에 해당하는지 여부를 판정한다.'
제83_05조2항={}
제83_05조[제83_05조2항_]=제83_05조2항
제83_05조2항1호_='1. 한국자산관리공사에 매각을 위임한 토지 : 매각을 위임한 날'
제83_05조2항1호={}
제83_05조2항[제83_05조2항1호_]=제83_05조2항1호
제83_05조2항2호_='2. 전국을 보급지역으로 하는 일간신문을 포함한 3개 이상의 일간신문에 다음 각 목의 조건으로 매각을 3일 이상 공고하고, 공고일(공고일이 서로 다른 경우에는 최초의 공고일)부터 1년 이내에 매각계약을 체결한 토지 : 최초의 공고일'
제83_05조2항2호={}
제83_05조2항[제83_05조2항2호_]=제83_05조2항2호
제83_05조2항2호가목_='가. 매각예정가격이 영 제167조제5항의 규정에 따른 시가 이하일 것'
제83_05조2항2호가목={}
제83_05조2항2호[제83_05조2항2호가목_]=제83_05조2항2호가목
제83_05조2항2호나목_='나. 매각대금의 100분의 70이상을 매각계약 체결일부터 6월 이후에 결제할 것'
제83_05조2항2호나목={}
제83_05조2항2호[제83_05조2항2호나목_]=제83_05조2항2호나목
제83_05조2항3호_='3. 제2호의 규정에 따른 토지로서 동호 각 목의 요건을 갖추어 매년 매각을 재공고(직전 매각공고시의 매각예정가격에서 동 금액의 100분의 10을 차감한 금액 이하로 매각을 재공고한 경우에 한한다)하고, 재공고일부터 1년 이내에 매각계약을 체결한 토지 : 최초의 공고일'
제83_05조2항3호={}
제83_05조2항[제83_05조2항3호_]=제83_05조2항3호
제83_05조3항_='③ 영 제168조의14제3항제1호의2에서 "8년 이상 기획재정부령으로 정하는 토지소재지에 거주하면서 직접 경작한 농지ㆍ임야ㆍ목장용지"란 다음 각 호의 토지를 말한다. <신설 2009. 4. 14., 2011. 3. 28., 2015. 3. 13.>'
제83_05조3항={}
제83_05조[제83_05조3항_]=제83_05조3항
제83_05조3항1호_='1. 8년 이상 농지의 소재지와 같은 시ㆍ군ㆍ구(자치구를 말한다. 이하 이 항에서 같다), 연접한 시ㆍ군ㆍ구 또는 농지로부터 직선거리 30킬로미터 이내에 있는 지역에 사실상 거주하는 자가 「조세특례제한법 시행령」 제66조제13항에 따른 자경을 한 농지'
제83_05조3항1호={}
제83_05조3항[제83_05조3항1호_]=제83_05조3항1호
제83_05조3항2호_='2. 8년 이상 임야의 소재지와 같은 시ㆍ군ㆍ구, 연접한 시ㆍ군ㆍ구 또는 임야로부터 직선거리 30킬로미터 이내에 있는 지역에 사실상 거주하면서 주민등록이 되어 있는 자가 소유한 임야'
제83_05조3항2호={}
제83_05조3항[제83_05조3항2호_]=제83_05조3항2호
제83_05조3항3호_='3. 8년 이상 축산업을 영위하는 자가 소유하는 목장용지로서 영 별표 1의3에 따른 가축별 기준면적과 가축두수를 적용하여 계산한 토지의 면적 이내의 목장용지'
제83_05조3항3호={}
제83_05조3항[제83_05조3항3호_]=제83_05조3항3호
제83_05조4항_='④영 제168조의14제3항제5호에서 "기획재정부령으로 정하는 부득이한 사유에 해당되는 토지"란 다음 각 호의 어느 하나에 해당하는 토지를 말한다. <개정 2006. 4. 10., 2008. 4. 29., 2009. 4. 14., 2011. 3. 28., 2015. 3. 13.>'
제83_05조4항={}
제83_05조[제83_05조4항_]=제83_05조4항
제83_05조4항1호_='1. 공장의 가동에 따른 소음ㆍ분진ㆍ악취 등으로 인하여 생활환경의 오염피해가 발생되는 지역 안의 토지로서 그 토지소유자의 요구에 따라 취득한 공장용 부속토지의 인접토지'
제83_05조4항1호={}
제83_05조4항[제83_05조4항1호_]=제83_05조4항1호
제83_05조4항2호_='2. 2006년 12월 31일 이전에 이농한 자가 「농지법」 제6조제2항제5호에 따라 이농당시 소유하고 있는 농지로서 2009년 12월 31일까지 양도하는 토지'
제83_05조4항2호={}
제83_05조4항[제83_05조4항2호_]=제83_05조4항2호
제83_05조4항3호_='3. 「기업구조조정 촉진법」에 따른 부실징후기업과 채권금융기관협의회가 같은 법 제10조에 따라 해당 부실징후기업의 경영정상화계획 이행을 위한 약정을 체결하고 그 부실징후기업이 해당 약정에 따라 양도하는 토지(2008년 12월 31일 이전에 취득한 것에 한정한다. 이하 이 항에서 같다)'
제83_05조4항3호={}
제83_05조4항[제83_05조4항3호_]=제83_05조4항3호
제83_05조4항4호_='4. 채권은행 간 거래기업의 신용위험평가 및 기업구조조정방안 등에 대한 협의와 거래기업에 대한 채권은행 공동관리절차를 규정한 「채권은행협의회 운영협약」에 따른 관리대상기업과 채권은행자율협의회가 같은 협약 제19조에 따라 해당 관리대상기업의 경영정상화계획 이행을 위한 특별약정을 체결하고 그 관리대상기업이 해당 약정에 따라 양도하는 토지'
제83_05조4항4호={}
제83_05조4항[제83_05조4항4호_]=제83_05조4항4호
제83_05조4항5호_='5. 「산업집적활성화 및 공장설립에 관한 법률」 제39조에 따라 산업시설구역의 산업용지를 소유하고 있는 입주기업체가 산업용지를 같은 법 제2조에 따른 관리기관(같은 법 제39조제2항 각 호의 유관기관을 포함한다)에 양도하는 토지'
제83_05조4항5호={}
제83_05조4항[제83_05조4항5호_]=제83_05조4항5호
제83_05조4항6호_='6. 「농촌근대화촉진법」(법률 제4118호로 개정되기 전의 것)에 따른 방조제공사로 인한 해당 어민의 피해에 대한 보상대책으로 같은 법에 따라 조성된 농지를 보상한 경우로서 같은 법에 따른 농업진흥공사로부터 해당 농지를 최초로 취득하여 8년 이상 직접 경작한 농지. 이 경우 제3항제1호에 따른 농지소재지 거주요건은 적용하지 아니한다.'
제83_05조4항6호={}
제83_05조4항[제83_05조4항6호_]=제83_05조4항6호
제83_05조4항7호_='7. 「채무자의 회생 및 파산에 관한 법률」 제242조에 따른 회생계획인가 결정에 따라 회생계획의 수행을 위하여 양도하는 토지'
제83_05조4항7호={}
제83_05조4항[제83_05조4항7호_]=제83_05조4항7호
제83_05조5항_='⑤제1항제11호의 규정을 적용받고자 하는 자는 법 제105조 또는 제110조의 규정에 따른 양도소득세 과세표준 신고기한 내에 납세지 관할 세무서장에게 별지 제92호서식의 천재지변 등으로 인한 농지의 비사업용토지 제외신청서에 형질변경사실확인원 그 밖에 특례적용대상임을 확인할 수 있는 서류를 첨부하여 제출하여야 한다. <개정 2006. 7. 5., 2009. 4. 14.>'
제83_05조5항={}
제83_05조[제83_05조5항_]=제83_05조5항
제83_05조5항1호_='1. 삭제 <2006. 7. 5.>'
제83_05조5항1호={}
제83_05조5항[제83_05조5항1호_]=제83_05조5항1호
제83_05조5항2호_='2. 삭제 <2006. 7. 5.>'
제83_05조5항2호={}
제83_05조5항[제83_05조5항2호_]=제83_05조5항2호
제83_05조5항3호_='3. 삭제 <2006. 7. 5.>'
제83_05조5항3호={}
제83_05조5항[제83_05조5항3호_]=제83_05조5항3호
제83_05조6항_='⑥제5항에 따라 신청서를 제출받은 납세지 관할세무서장은 「전자정부법」 제36조제1항에 따른 행정정보의 공동이용을 통하여 다음 각 호의 서류를 확인하여야 한다. 다만, 제1호에 따른 주민등록표 등본은 신청인이 확인에 동의하지 아니하는 경우에는 이를 제출하도록 하여야 한다. <신설 2006. 7. 5., 2008. 4. 29., 2009. 4. 14., 2011. 3. 28.>'
제83_05조6항={}
제83_05조[제83_05조6항_]=제83_05조6항
제83_05조6항1호_='1. 주민등록표 등본'
제83_05조6항1호={}
제83_05조6항[제83_05조6항1호_]=제83_05조6항1호
제83_05조6항2호_='2. 토지등기부 등본 또는 토지대장 등본'
제83_05조6항2호={}
제83_05조6항[제83_05조6항2호_]=제83_05조6항2호
제83_05조['[본조신설 2005. 12. 31.]']={}
제84조_=' 제84조 삭제 '
제84조={}
제84조['소득세법시행규칙 제84조 삭제 ']={}
조문['제84조 삭제 ']=제84조
조['제84조 삭제 ']=제84조
제85조_=' 제85조 (분납의 신청) '
제85조={}
제85조['소득세법시행규칙 제85조 (분납의 신청)']={}
조문['제85조 (분납의 신청)']=제85조
조['제85조 (분납의 신청)']=제85조
제85조1항_='법 제112조 및 영 제175조의 규정에 의하여 납부할 세액의 일부를 분납하고자 하는 자는 다음 각호의 구분에 따라 납세지 관할세무서장에게 신청하여야 한다. <개정 2000. 4. 3., 2010. 4. 30.>'
제85조1항={}
제85조[제85조1항_]=제85조1항
제85조1항1호_='1. 법 제110조제1항의 규정에 의하여 확정신고를 하는 경우에는 별지 제84호서식의 양도소득과세표준확정신고및납부계산서에 분납할 세액을 기재하여 법 제110조제1항의 규정에 의한 확정신고 기한까지 신청하여야 한다.'
제85조1항1호={}
제85조1항[제85조1항1호_]=제85조1항1호
제85조1항2호_='2. 법 제105조제1항의 규정에 의하여 예정신고를 하는 경우에는 별지 제84호서식의 양도소득과세표준예정신고및납부계산서에 분납할 세액을 기재하여 동조동항의 규정에 의한 예정신고기한까지 신청하여야 한다.'
제85조1항2호={}
제85조1항[제85조1항2호_]=제85조1항2호
제85_02조_=' 제85조의2(생산자물가상승률 등) '
제85_02조={}
제85_02조['소득세법시행규칙 제85조의2(생산자물가상승률 등)']={}
조문['제85조의2(생산자물가상승률 등)']=제85_02조
조['제85조의2(생산자물가상승률 등)']=제85_02조
제85_02조1항_='①영 제176조의2제4항제2호에서 "생산자물가상승률"이라 함은 「한국은행법」 제86조의 규정에 의하여 한국은행이 조사한 각 연도(1984년 이전을 말한다. 이하 이 조에서 같다)의 연간생산자물가지수에 의하여 산정된 비율(당해 양도자산의 보유기간의 월수가 12월 미만인 연도에 있어서는 월간생산자물가지수에 의하여 산정된 비율)을 말한다. <개정 2005. 3. 19.>'
제85_02조1항={}
제85_02조[제85_02조1항_]=제85_02조1항
제85_02조2항_='② 영 제176조의2제5항의 규정에 의하여 국세청장은 관할세무서장 또는 지방국세청장으로 하여금 양도소득세의 과세대상이 되는 자산의 평가 및 이와 관련있는 사항을 당해 세무서 또는 지방국세청의 과장급 공무원 3인 이상과 공무원이 아닌 자로서 부동산 감정평가에 관한 학식ㆍ경험이 풍부한 자 3인 이상에게 국세청장이 정하는 절차에 따라 자문하게 할 수 있다.'
제85_02조2항={}
제85_02조[제85_02조2항_]=제85_02조2항
제85_02조['[본조신설 2000. 4. 3.]']={}
제86조_=' 제86조 (비거주자의 국내원천소득금액의 계산) '
제86조={}
제86조['소득세법시행규칙 제86조 (비거주자의 국내원천소득금액의 계산)']={}
조문['제86조 (비거주자의 국내원천소득금액의 계산)']=제86조
조['제86조 (비거주자의 국내원천소득금액의 계산)']=제86조
제86조1항_='①영 제179조제2항제8호의 항공기에 의한 국제운송업을 행하는 비거주자의 국내원천소득금액은 다음 산식에 의하여 계산한 금액으로 한다. <개정 2008. 4. 29.>'
제86조1항={}
제86조[제86조1항_]=제86조1항
제86조['']={}
제86조2항_='②영 제179조제2항제2호ㆍ제3호 및 제9호에서 "통상의 거래조건"이라 함은 당해 비거주자가 재고자산등을 「국제조세조정에 관한 법률」 제5조 및 동법 시행령 제4조의 규정에 의한 방법을 준용하여 계산한 시가에 의하여 거래하는 것을 말한다. <개정 1998. 3. 21., 2005. 3. 19., 2008. 4. 29.>'
제86조2항={}
제86조[제86조2항_]=제86조2항
제86조3항_='③ 제2항에 따라 해당 비거주자가 국내원천소득을 계산한 경우에는 「국제조세조정에 관한 법률 시행규칙」 제2조의4제1항제1호에 따른 별지 제1호서식의 무형자산에 대한 정상가격 산출방법 신고서, 같은 항 제2호에 따른 별지 제1호의2서식의 용역거래에 대한 정상가격 산출방법 신고서, 같은 항 제3호에 따른 별지 제1호의3서식의 정상가격 산출방법 신고서 및 같은 규칙 제6조제1항에 따른 별지 제8호서식의 국제거래명세서를 법 제70조 및 제74조에 따른 신고기한까지 납세지 관할 세무서장에게 제출하여야 한다. <신설 2013. 2. 23.>'
제86조3항={}
제86조[제86조3항_]=제86조3항
제86조['[제목개정 1998. 3. 21.]']={}
제86_02조_=' 제86조의2 삭제 '
제86_02조={}
제86_02조['소득세법시행규칙 제86조의2 삭제 ']={}
조문['제86조의2 삭제 ']=제86_02조
조['제86조의2 삭제 ']=제86_02조
제86_03조_=' 제86조의3(국내원천소득금액의 계산) '
제86_03조={}
제86_03조['소득세법시행규칙 제86조의3(국내원천소득금액의 계산)']={}
조문['제86조의3(국내원천소득금액의 계산)']=제86_03조
조['제86조의3(국내원천소득금액의 계산)']=제86_03조
제86_03조1항_='영 제181조제2항에서 "기획재정부령이 정하는 것"이라 함은 다음 각 호의 어느 하나에 해당하는 것을 말한다. <개정 2008. 4. 29., 2013. 2. 23.>'
제86_03조1항={}
제86_03조[제86_03조1항_]=제86_03조1항
제86_03조1항1호_='1. 국내사업장이 약정 등에 따른 대가를 받지 아니하고 본점 등을 위하여 재고자산을 구입하거나 보관함으로써 발생한 경비'
제86_03조1항1호={}
제86_03조1항[제86_03조1항1호_]=제86_03조1항1호
제86_03조1항2호_='2. 기타 국내원천소득의 발생과 합리적으로 관련되지 아니하는 경비'
제86_03조1항2호={}
제86_03조1항[제86_03조1항2호_]=제86_03조1항2호
제86_03조['[본조신설 1999. 5. 7.]']={}
제86_04조_=' 제86조의4(국내사업장과 본점 등의 거래에 대한 국내원천소득금액의 계산) '
제86_04조={}
제86_04조['소득세법시행규칙 제86조의4(국내사업장과 본점 등의 거래에 대한 국내원천소득금액의 계산)']={}
조문['제86조의4(국내사업장과 본점 등의 거래에 대한 국내원천소득금액의 계산)']=제86_04조
조['제86조의4(국내사업장과 본점 등의 거래에 대한 국내원천소득금액의 계산)']=제86_04조
제86_04조1항_='① 영 제181조의2제2항에서 "기획재정부령으로 정하는 비용"이란 다음 각 호의 금액을 말한다. <신설 2013. 2. 23.>'
제86_04조1항={}
제86_04조[제86_04조1항_]=제86_04조1항
제86_04조1항1호_='1. 자금거래에서 발생한 이자 비용'
제86_04조1항1호={}
제86_04조1항[제86_04조1항1호_]=제86_04조1항1호
제86_04조1항2호_='2. 보증거래에서 발생한 수수료 등 비용'
제86_04조1항2호={}
제86_04조1항[제86_04조1항2호_]=제86_04조1항2호
제86_04조2항_='② 영 제181조의2제1항 및 제2항에 따라 비거주자의 국내사업장과 국외의 본점 및 다른 지점간 거래(이하 이 조에서 "내부거래"라 한다)에 따른 국내원천소득금액을 계산하는 때 적용하는 정상가격은 비거주자의 국내사업장이 수행하는 기능, 부담하는 위험 및 사용하는 자산 등을 고려하여 계산한 금액으로 한다. <신설 2013. 2. 23.>'
제86_04조2항={}
제86_04조[제86_04조2항_]=제86_04조2항
제86_04조3항_='③ 영 제181조의2제1항 및 제2항에 따라 비거주자가 내부거래에 따른 국내원천소득금액을 계산한 때에는 내부거래에 관한 명세서와 「국제조세조정에 관한 법률 시행규칙」 제2조의4제1항제1호에 따른 별지 제1호서식의 무형자산에 대한 정상가격 산출방법 신고서, 같은 항 제2호에 따른 별지 제1호의2서식의 용역거래에 대한 정상가격 산출방법 신고서, 같은 항 제3호에 따른 별지 제1호의3서식의 정상가격 산출방법 신고서를 법 제70조 및 제74조에 따른 신고기한 내에 납세지 관할세무서장에게 제출하여야 한다. 이 경우 내부거래에 관한 명세서는 「국제조세조정에 관한 법률 시행규칙」 제6조제1항에 따른 별지 제8호서식(갑)을 준용한다. <신설 2013. 2. 23.>'
제86_04조3항={}
제86_04조[제86_04조3항_]=제86_04조3항
제86_04조4항_='④영 제181조의2제3항에 따라 비거주자의 국내사업장에 본점 및 그 국내사업장을 관할하는 관련지점 등의 공통경비를 배분함에 있어 다음 각 호의 어느 하나에 해당하는 본점 등의 경비는 국내사업장에 배분하지 아니한다. <개정 2013. 2. 23.>'
제86_04조4항={}
제86_04조[제86_04조4항_]=제86_04조4항
제86_04조4항1호_='1. 본점등에서 수행하는 업무중 회계감사, 각종 재무제표의 작성등 본점만의 고유업무를 수행함으로써 발생하는 경비'
제86_04조4항1호={}
제86_04조4항[제86_04조4항1호_]=제86_04조4항1호
제86_04조4항2호_='2. 본점등의 특정부서나 특정한 지점만을 위하여 지출하는 경비'
제86_04조4항2호={}
제86_04조4항[제86_04조4항2호_]=제86_04조4항2호
제86_04조4항3호_='3. 다른 법인에 대한 투자와 관련되어 발생하는 경비'
제86_04조4항3호={}
제86_04조4항[제86_04조4항3호_]=제86_04조4항3호
제86_04조4항4호_='4. 기타 국내원천소득의 발생과 합리적으로 관련되지 아니하는 경비'
제86_04조4항4호={}
제86_04조4항[제86_04조4항4호_]=제86_04조4항4호
제86_04조5항_='⑤영 제181조의2제3항에 따라 비거주자의 국내사업장에 본점 및 그 국내사업장을 관할하는 관련지점등의 공통경비를 배분함에 있어서는 그 배분의 대상이 되는 경비를 경비항목별기준에 따라 배분하는 항목별배분방법에 의하거나 배분의 대상이 되는 경비를 국내사업장의 수입금액이 본점 및 그 국내사업장을 관할하는 관련지점등의 총수입금액에서 차지하는 비율에 따라 배분하는 일괄배분방법에 의할 수 있다. <개정 2013. 2. 23.>'
제86_04조5항={}
제86_04조[제86_04조5항_]=제86_04조5항
제86_04조6항_='⑥제5항에 따라 공통경비를 배분하는 경우 외화의 원화환산은 과세기간중의 「외국환거래법」에 의한 기준환율 또는 재정환율의 평균을 적용한다. <개정 2005. 3. 19., 2013. 2. 23.>'
제86_04조6항={}
제86_04조[제86_04조6항_]=제86_04조6항
제86_04조7항_='⑦제4항부터 제6항까지의 규정을 적용함에 있어서 구체적인 배분방법, 첨부서류의 제출 기타 필요한 사항은 국세청장이 정한다. <개정 2013. 2. 23.>'
제86_04조7항={}
제86_04조[제86_04조7항_]=제86_04조7항
제86_04조['[본조신설 1999. 5. 7.]']={}
제86_04조['[제목개정 2013. 2. 23.]']={}
제87조_=' 제87조 (비거주자의 신고와 납부등) '
제87조={}
제87조['소득세법시행규칙 제87조 (비거주자의 신고와 납부등)']={}
조문['제87조 (비거주자의 신고와 납부등)']=제87조
조['제87조 (비거주자의 신고와 납부등)']=제87조
제87조1항_='①법 제124조의 규정에 의하여 비거주자의 국내원천소득을 종합하여 과세하는 경우에 이에 관한 신고와 납부에 관하여는 이 영중 거주자의 신고와 납부에 관한 규정을 준용한다.'
제87조1항={}
제87조[제87조1항_]=제87조1항
제87조2항_='②법 제125조의 규정에 의하여 비거주자의 국내원천소득을 종합하여 과세하는 경우에 이에 관한 결정ㆍ경정과 징수 및 환급에 관하여는 이 영중 거주자에 대한 소득세의 결정ㆍ경정과 징수 및 환급에 관한 규정을 준용한다.'
제87조2항={}
제87조[제87조2항_]=제87조2항
제88조_=' 제88조 (원천징수대상에서 제외되는 소득) '
제88조={}
제88조['소득세법시행규칙 제88조 (원천징수대상에서 제외되는 소득)']={}
조문['제88조 (원천징수대상에서 제외되는 소득)']=제88조
조['제88조 (원천징수대상에서 제외되는 소득)']=제88조
제88조1항_='영 제184조제1항제1호에서 "기획재정부령으로 정하는 바에 따라 계산한 의약품가격이 차지하는 비율에 상당하는 소득"이라 함은 「약사법」에 따른 약사가 의약품의 조제용역을 제공하고 지급받는 다음 각 호의 어느 하나에 해당하는 비용에 해당 의약품의 구입가격[보건복지부장관이 「국민건강보험법 시행령」 제22조제1항 후단에 따라 고시하는 약제 및 치료재료의 상한금액 및 「국민건강증진법」 제25조제1항제1호에 따른 국민건강관리사업(이하 이 조에서 "국민건강관리사업"이라 한다)에 따라 지급받는 약제비용을 한도로 한다]이 약제비 총액(해당 의약품의 조제용역 제공에 따른 요양급여비용, 의료급여비용 또는 약제비용에 본인부담금을 합한 비용을 말한다)에서 차지하는 비율을 곱한 금액에 상당하는 소득을 말한다. <개정 2008. 4. 29., 2011. 3. 28., 2013. 3. 23., 2018. 3. 21.>'
제88조1항={}
제88조[제88조1항_]=제88조1항
제88조1항1호_='1. 「국민건강보험법」 제47조에 따라 지급받는 요양급여비용'
제88조1항1호={}
제88조1항[제88조1항1호_]=제88조1항1호
제88조1항2호_='2. 「의료급여법」 제11조에 따라 지급받는 의료급여비용'
제88조1항2호={}
제88조1항[제88조1항2호_]=제88조1항2호
제88조1항3호_='3. 「한국보훈복지의료공단법 시행령」 제15조의2에 따라 지급받는 약제비용'
제88조1항3호={}
제88조1항[제88조1항3호_]=제88조1항3호
제88조1항4호_='4. 「산업재해보상보험법」 제40조제4항제2호에 따라 지급받는 요양급여비용'
제88조1항4호={}
제88조1항[제88조1항4호_]=제88조1항4호
제88조1항5호_='5. 국민건강관리사업에 따라 지급받는 약제비용'
제88조1항5호={}
제88조1항[제88조1항5호_]=제88조1항5호
제88조['[전문개정 2007. 4. 17.]']={}
제88_02조_=' 제88조의2(전환사채등에 대한 이자등 상당액) '
제88_02조={}
제88_02조['소득세법시행규칙 제88조의2(전환사채등에 대한 이자등 상당액)']={}
조문['제88조의2(전환사채등에 대한 이자등 상당액)']=제88_02조
조['제88조의2(전환사채등에 대한 이자등 상당액)']=제88_02조
제88_02조1항_='영 제193조의2제3항 단서에 따른 전환사채 또는 교환사채(이하 이 항에서 "전환사채등"이라 한다)가 주식으로 전환청구 또는 교환청구(이하 이 항에서 "청구"라 한다)된 이후에는 이를 법 제46조제1항에 따른 채권등이 아닌 것으로 본다. 다만, 영 제193조의2제3항 단서에 따라 주식으로 청구를 한 후에도 이자를 지급하는 약정이 있는 경우에는 해당 이자를 지급받는 자에게 청구일 이후의 약정이자가 지급되는 것으로 보아 청구일(청구일이 분명하지 아니한 경우에는 해당 전환사채등 발행법인의 사업연도 중에 최초로 청구된 날과 최종으로 청구된 날의 가운데에 해당하는 날을 말한다)부터 해당 전환사채등 발행법인의 사업연도 말일까지의 기간에 대하여 약정이자율을 적용한다.'
제88_02조1항={}
제88_02조[제88_02조1항_]=제88_02조1항
제88_02조['[본조신설 2010. 4. 30.]']={}
제88_03조_=' 제88조의3 삭제 '
제88_03조={}
제88_03조['소득세법시행규칙 제88조의3 삭제 ']={}
조문['제88조의3 삭제 ']=제88_03조
조['제88조의3 삭제 ']=제88_03조
제88_04조_=' 제88조의4(물가연동국고채에 대한 이자 등 상당액) '
제88_04조={}
제88_04조['소득세법시행규칙 제88조의4(물가연동국고채에 대한 이자 등 상당액)']={}
조문['제88조의4(물가연동국고채에 대한 이자 등 상당액)']=제88_04조
조['제88조의4(물가연동국고채에 대한 이자 등 상당액)']=제88_04조
제88_04조1항_='영 제193조의2제3항 각 호 외의 부분 본문에서 "기획재정부령으로 정하는 계산방법"이란 영 제22조의2제3항에 따른 물가연동국고채(이하 이 조에서 "물가연동국고채"라 한다)의 액면가액에 매도일 또는 이자 등의 지급일의 「국채법 시행규칙」 제3조에 따라 기획재정부 장관이 정하는 물가연동계수(이하 이 조에서 "물가연동계수"라 한다)를 적용하여 계산한 금액에서 물가연동국고채의 액면가액에 발행일 또는 직전 원천징수일의 물가연동계수를 적용하여 계산한 금액을 차감하는 방법을 말한다. 이 경우 원금증가분이 0보다 작은 경우에는 없는 것으로 보며, 발행일의 물가연동계수가 직전 원천징수일의 물가연동계수보다 클 경우에는 발행일의 물가연동계수를 적용한다.'
제88_04조1항={}
제88_04조[제88_04조1항_]=제88_04조1항
제88_04조['[본조신설 2016. 3. 16.]']={}
제89조_=' 제89조 (근로소득에 대한 원천징수) '
제89조={}
제89조['소득세법시행규칙 제89조 (근로소득에 대한 원천징수)']={}
조문['제89조 (근로소득에 대한 원천징수)']=제89조
조['제89조 (근로소득에 대한 원천징수)']=제89조
제89조1항_='①원천징수의무자가 매월분의 근로소득에 대하여 소득세를 원천징수하는 때에는 직전 과세기간분의 연말정산을 위하여 받은 근로소득자 소득ㆍ세액 공제신고서에 의하여 간이세액표를 적용한다. <개정 2010. 4. 30., 2014. 3. 14.>'
제89조1항={}
제89조[제89조1항_]=제89조1항
제89조2항_='②원천징수의무자가 해당 과세기간 중에 근로소득자 소득ㆍ세액 공제신고서를 받은 때에는 그 받은 날이 속하는 달분부터 그 신고서에 의하여 간이세액표를 적용한다. <개정 2010. 4. 30., 2014. 3. 14.>'
제89조2항={}
제89조[제89조2항_]=제89조2항
제89조3항_='③연봉제등의 채택으로 급여를 매월 1회 지급하는 방법외의 방법으로 지급하는 근로소득에 대한 소득세의 원천징수는 다음 각호의 방법에 의한다. <신설 1999. 5. 7.>'
제89조3항={}
제89조[제89조3항_]=제89조3항
제89조3항1호_='1. 정기적으로 분할하여 지급하는 경우'
제89조3항1호={}
제89조3항[제89조3항1호_]=제89조3항1호
제89조3항1호가목_='가. 분할지급대상기간이 1월을 초과하는 경우 : 법 제136조제1항제1호의 규정에 의한 지급대상기간이 있는 상여등에 대한 소득세 원천징수 적용'
제89조3항1호가목={}
제89조3항1호[제89조3항1호가목_]=제89조3항1호가목
제89조3항1호나목_='나. 분할지급대상기간이 1월미만인 경우 : 매월 지급하는 총액에 대하여 간이세액표 적용'
제89조3항1호나목={}
제89조3항1호[제89조3항1호나목_]=제89조3항1호나목
제89조3항2호_='2. 부정기적으로 지급하는 경우 : 법 제136조제1항제2호의 규정에 의한 지급대상기간이 없는 상여등에 대한 소득세 원천징수 적용'
제89조3항2호={}
제89조3항[제89조3항2호_]=제89조3항2호
제90조_=' 제90조 삭제 '
제90조={}
제90조['소득세법시행규칙 제90조 삭제 ']={}
조문['제90조 삭제 ']=제90조
조['제90조 삭제 ']=제90조
제91조_=' 제91조 (상여등에 대한 세액의 계산) '
제91조={}
제91조['소득세법시행규칙 제91조 (상여등에 대한 세액의 계산)']={}
조문['제91조 (상여등에 대한 세액의 계산)']=제91조
조['제91조 (상여등에 대한 세액의 계산)']=제91조
제91조1항_='①법 제136조제1항에 규정하는 근로소득에 해당하는 상여등을 지급하는 때에 원천징수하는 세액의 계산은 다음의 산식에 의하여 계산한 금액으로 한다.'
제91조1항={}
제91조[제91조1항_]=제91조1항
제91조['']={}
제91조2항_='②법 제136조제2항의 상여등에 대하여 원천징수할 소득세액의 계산은 다음 산식에 의한다.'
제91조2항={}
제91조[제91조2항_]=제91조2항
제91조['잉여금 처분에 의한 상여등의 금액×기본세율']={}
제91조3항_='③상여등의 금액과 그 지급대상기간이 사전에 정하여져 있는 경우(금액과 지급대상기간이 사전에 정하여진 상여등을 지급대상기간의 중간에 지급하는 경우를 포함한다)에는 매월분의 급여에 상여등의 금액을 그 지급대상기간으로 나눈 금액을 합한 금액에 대하여 간이 세액표에 의한 매월분 소득세를 징수할 수 있다.'
제91조3항={}
제91조[제91조3항_]=제91조3항
제91조['[전문개정 1997. 4. 23.]']={}
제92조_=' 제92조 (근로소득에 대한 세액의 연말정산) '
제92조={}
제92조['소득세법시행규칙 제92조 (근로소득에 대한 세액의 연말정산)']={}
조문['제92조 (근로소득에 대한 세액의 연말정산)']=제92조
조['제92조 (근로소득에 대한 세액의 연말정산)']=제92조
제92조1항_='①원천징수의무자가 법 제137조, 제137조의2 및 제138조에 따른 근로소득세액의 연말정산을 하지 아니한 때에는 원천징수관할세무서장은 즉시 연말정산을 하고 그 소득세를 원천징수의무자로부터 징수하여야 한다. <개정 2011. 3. 28.>'
제92조1항={}
제92조[제92조1항_]=제92조1항
제92조2항_='②제1항의 경우에 원천징수의무자가 근로소득세액의 연말정산을 하지 아니하고 행방불명이 된 때에는 원천징수관할세무서장은 당해 근로소득이 있는 자에게 과세표준 확정신고를 하여야 한다는 것을 통지하여야 한다.'
제92조2항={}
제92조[제92조2항_]=제92조2항
제93조_=' 제93조 (원천징수세액의 환급) '
제93조={}
제93조['소득세법시행규칙 제93조 (원천징수세액의 환급)']={}
조문['제93조 (원천징수세액의 환급)']=제93조
조['제93조 (원천징수세액의 환급)']=제93조
제93조1항_='①영 제201조제1항의 규정을 적용함에 있어서 원천징수의무자가 환급할 소득세가 연말정산하는 달에 원천징수하여 납부할 소득세를 초과하는 경우에는 다음달 이후에 원천징수하여 납부할 소득세에서 조정하여 환급한다. 다만, 당해 원천징수의무자의 환급신청이 있는 경우에는 원천징수 관할세무서장이 그 초과액을 환급한다. <개정 2002. 2. 1.>'
제93조1항={}
제93조[제93조1항_]=제93조1항
제93조2항_='②제1항 단서의 규정에 의하여 소득세의 환급을 받고자 하는 자는 원천징수세액환급신청서를 원천징수 관할세무서장에게 제출하여야 한다.'
제93조2항={}
제93조[제93조2항_]=제93조2항
제93조3항_='③제1항 및 제2항의 규정은 원천징수의무자가 원천징수하여 납부한 소득세액중 잘못 원천징수한 세액이 있는 경우에 이를 준용한다.'
제93조3항={}
제93조[제93조3항_]=제93조3항
제93_02조_=' 제93조의2(연금소득에 대한 원천징수) '
제93_02조={}
제93_02조['소득세법시행규칙 제93조의2(연금소득에 대한 원천징수)']={}
조문['제93조의2(연금소득에 대한 원천징수)']=제93_02조
조['제93조의2(연금소득에 대한 원천징수)']=제93_02조
제93_02조1항_='① 삭제 <2011. 3. 28.>'
제93_02조1항={}
제93_02조[제93_02조1항_]=제93_02조1항
제93_02조2항_='②원천징수의무자가 법 제143조의2제1항에 따라 공적연금소득의 지급이 최초로 개시되는 연도의 공적연금소득에 대하여 소득세를 원천징수함에 있어서는 다음 각 호의 구분에 따라 영 별표 3 연금소득간이세액표를 적용한다. <개정 2013. 2. 23., 2014. 3. 14.>'
제93_02조2항={}
제93_02조[제93_02조2항_]=제93_02조2항
제93_02조2항1호_='1. 공적연금소득을 지급받는 사람이 법 제143조의6제1항에 따른 연금소득자 소득ㆍ세액 공제신고서(이하 "연금소득자 소득ㆍ세액 공제신고서"라 한다)를 제출한 경우 : 연금소득자 소득ㆍ세액 공제신고서에 의하여 영 별표 3 연금소득간이세액표를 적용한다.'
제93_02조2항1호={}
제93_02조2항[제93_02조2항1호_]=제93_02조2항1호
제93_02조2항2호_='2. 공적연금소득을 지급받는 사람이 연금소득자 소득ㆍ세액 공제신고서를 제출하지 아니한 경우 : 공제대상 가족의 수를 1명으로 보아 영 별표 3 연금소득간이세액표를 적용한다.'
제93_02조2항2호={}
제93_02조2항[제93_02조2항2호_]=제93_02조2항2호
제93_02조3항_='③원천징수의무자가 직전 연도의 공적연금소득에 대한 연말정산을 위하여 영 제201조의7에 따라 연금소득자 소득ㆍ세액 공제신고서를 제출받은 경우 해당 연도에 지급되는 공적연금소득에 대하여 원천징수를 함에 있어서는 그 신고서에 의하여 영 별표 3 연금소득간이세액표를 적용한다. 다만, 해당 연도 중에 공제대상 가족수의 변동 등으로 새로 연금소득자 소득ㆍ세액 공제신고서를 제출받은 때에는 그 받은 날이 속하는 달의 공적연금소득분부터 해당 신고서에 의하여 영 별표 3 연금소득간이세액표를 적용한다. <개정 2013. 2. 23., 2014. 3. 14.>'
제93_02조3항={}
제93_02조[제93_02조3항_]=제93_02조3항
제93_02조['[본조신설 2001. 4. 30.]']={}
제93_03조_=' 제93조의3(공적연금소득에 대한 세액의 연말정산) '
제93_03조={}
제93_03조['소득세법시행규칙 제93조의3(공적연금소득에 대한 세액의 연말정산)']={}
조문['제93조의3(공적연금소득에 대한 세액의 연말정산)']=제93_03조
조['제93조의3(공적연금소득에 대한 세액의 연말정산)']=제93_03조
제93_03조1항_='원천징수의무자가 법 제143조의4에 따른 공적연금소득세액의 연말정산을 하지 아니한 때에는 원천징수 관할세무서장은 즉시 연말정산을 하고 그 소득세를 원천징수의무자로부터 징수하여야 한다. <개정 2013. 2. 23.>'
제93_03조1항={}
제93_03조[제93_03조1항_]=제93_03조1항
제93_03조['[본조신설 2001. 4. 30.]']={}
제93_03조['[제목개정 2013. 2. 23.]']={}
제94조_=' 제94조 (납세조합의 근로소득원천징수부) '
제94조={}
제94조['소득세법시행규칙 제94조 (납세조합의 근로소득원천징수부)']={}
조문['제94조 (납세조합의 근로소득원천징수부)']=제94조
조['제94조 (납세조합의 근로소득원천징수부)']=제94조
제94조1항_='영 제196조제1항은 법 제127조제1항제4호 각 목의 어느 하나에 해당하는 근로소득이 있는 자가 조직한 납세조합의 경우에 이를 준용한다. <개정 2010. 4. 30.>'
제94조1항={}
제94조[제94조1항_]=제94조1항
제94조['[제목개정 2010. 4. 30.]']={}
제94_02조_=' 제94조의2(연말정산사업소득의 소득률) '
제94_02조={}
제94_02조['소득세법시행규칙 제94조의2(연말정산사업소득의 소득률)']={}
조문['제94조의2(연말정산사업소득의 소득률)']=제94_02조
조['제94조의2(연말정산사업소득의 소득률)']=제94_02조
제94_02조1항_='영 제201조의11제4항에서 "기획재정부령으로 정하는 율"이란 다음 계산식에 따른 율을 말한다. 이 경우 해당 과세기간의 단순경비율이 결정되어 있지 아니한 경우에는 직전 과세기간의 단순경비율을 적용한다. <개정 2011. 3. 28.>'
제94_02조1항={}
제94_02조[제94_02조1항_]=제94_02조1항
제94_02조['']={}
제94_02조['[전문개정 2010. 4. 30.]']={}
제95조_=' 제95조 (납세관리인신고) '
제95조={}
제95조['소득세법시행규칙 제95조 (납세관리인신고)']={}
조문['제95조 (납세관리인신고)']=제95조
조['제95조 (납세관리인신고)']=제95조
제95조1항_='영 제206조제1항에 규정하는 납세관리인선정신고서는 「국세기본법 시행규칙」 별지 제43호서식을 준용한다. <개정 2005. 3. 19.>'
제95조1항={}
제95조[제95조1항_]=제95조1항
제95_02조_=' 제95조의2(간편장부대상자의 사업규모에 대한 특례) '
제95_02조={}
제95_02조['소득세법시행규칙 제95조의2(간편장부대상자의 사업규모에 대한 특례)']={}
조문['제95조의2(간편장부대상자의 사업규모에 대한 특례)']=제95_02조
조['제95조의2(간편장부대상자의 사업규모에 대한 특례)']=제95_02조
제95_02조1항_='① 영 제208조제5항제2호 단서에서 "기획재정부령으로 정하는 영세사업"이란 욕탕업을 말한다.'
제95_02조1항={}
제95_02조[제95_02조1항_]=제95_02조1항
제95_02조2항_='② 영 제208조제5항제2호 단서에서 "기획재정부령으로 정하는 금액"이란 1억 5천만원을 말한다.'
제95_02조2항={}
제95_02조[제95_02조2항_]=제95_02조2항
제95_02조['[본조신설 2014. 3. 14.]']={}
제95_02조['[종전 제95조의2는 제95조의3으로 이동 <2014. 3. 14.>]']={}
제95_03조_=' 제95조의3(경비 등의 지출증빙 특례) '
제95_03조={}
제95_03조['소득세법시행규칙 제95조의3(경비 등의 지출증빙 특례)']={}
조문['제95조의3(경비 등의 지출증빙 특례)']=제95_03조
조['제95조의3(경비 등의 지출증빙 특례)']=제95_03조
제95_03조1항_='영 제208조의2제1항제9호에서 "기타 기획재정부령이 정하는 경우"라 함은 다음 각 호의 어느 하나에 해당하는 경우를 말한다. <개정 2000. 4. 3., 2001. 4. 30., 2002. 4. 13., 2005. 3. 19., 2007. 4. 17., 2008. 4. 29., 2010. 4. 30., 2012. 2. 28., 2013. 6. 28.>'
제95_03조1항={}
제95_03조[제95_03조1항_]=제95_03조1항
제95_03조1항1호_='1. 「부가가치세법」 제10조에 따라 재화의 공급으로 보지 아니하는 사업의 양도에 의하여 재화를 공급받은 경우'
제95_03조1항1호={}
제95_03조1항[제95_03조1항1호_]=제95_03조1항1호
제95_03조1항2호_='2. 「부가가치세법」 제26조제1항제8호에 따른 방송용역을 공급받은 경우'
제95_03조1항2호={}
제95_03조1항[제95_03조1항2호_]=제95_03조1항2호
제95_03조1항3호_='3. 「전기통신사업법」에 의한 전기통신사업자로부터 전기통신역무를 제공받는 경우 다만, 「전자상거래 등에서의 소비자보호에 관한 법률」에 따른 통신판매업자가 「전기통신사업법」에 따른 부가통신사업자로부터 동법 제4조제4항에 따른 부가통신역무를 제공받는 경우를 제외한다.'
제95_03조1항3호={}
제95_03조1항[제95_03조1항3호_]=제95_03조1항3호
제95_03조1항4호_='4. 국외에서 재화 또는 용역을 공급받은 경우(세관장이 세금계산서 또는 계산서를 교부한 경우를 제외한다)'
제95_03조1항4호={}
제95_03조1항[제95_03조1항4호_]=제95_03조1항4호
제95_03조1항5호_='5. 공매ㆍ경매 또는 수용에 의하여 재화를 공급받은 경우'
제95_03조1항5호={}
제95_03조1항[제95_03조1항5호_]=제95_03조1항5호
제95_03조1항6호_='6. 토지 또는 주택을 구입하거나 주택의 임대업을 영위하는 자(법인을 제외한다)로부터 주택임대용역을 공급받은 경우'
제95_03조1항6호={}
제95_03조1항[제95_03조1항6호_]=제95_03조1항6호
제95_03조1항7호_='7. 택시운송용역을 공급받은 경우'
제95_03조1항7호={}
제95_03조1항[제95_03조1항7호_]=제95_03조1항7호
제95_03조1항8호_='8. 건물(토지를 함께 공급받은 경우에는 당해 토지를 포함하며, 주택을 제외한다)을 구입하는 경우로서 거래내용이 확인되는 매매계약서 사본을 과세표준확정신고서에 첨부하여 납세지 관할세무서장에게 제출하는 경우'
제95_03조1항8호={}
제95_03조1항[제95_03조1항8호_]=제95_03조1항8호
제95_03조1항8_02호_='8의2. 국세청장이 정하여 고시한 전산발매통합관리시스템에 가입한 사업자로부터 입장권ㆍ승차권ㆍ승선권 등을 구입하여 용역을 제공받은 경우'
제95_03조1항8_02호={}
제95_03조1항[제95_03조1항8_02호_]=제95_03조1항8_02호
제95_03조1항8_03호_='8의3. 항공기의 항행용역을 제공받은 경우'
제95_03조1항8_03호={}
제95_03조1항[제95_03조1항8_03호_]=제95_03조1항8_03호
제95_03조1항8_04호_='8의4. 부동산임대용역을 제공받은 경우로서 「부가가치세법 시행령」 제65조제1항의 규정을 적용받는 전세금 또는 임대보증금에 대한 부가가치세액을 임차인이 부담하는 경우'
제95_03조1항8_04호={}
제95_03조1항[제95_03조1항8_04호_]=제95_03조1항8_04호
제95_03조1항8_05호_='8의5. 재화공급계약ㆍ용역제공계약 등에 의하여 확정된 대가의 지급지연으로 인하여 연체이자를 지급하는 경우'
제95_03조1항8_05호={}
제95_03조1항[제95_03조1항8_05호_]=제95_03조1항8_05호
제95_03조1항8_06호_='8의6. 「유료도로법」 제2조제2호에 따른 유료도로를 이용하고 통행료를 지급하는 경우'
제95_03조1항8_06호={}
제95_03조1항[제95_03조1항8_06호_]=제95_03조1항8_06호
제95_03조1항9호_='9. 다음 각 목의 어느 하나에 해당하는 경우로서 공급받은 재화 또는 용역의 거래금액을 「금융실명거래 및 비밀보장에 관한 법률」 제2조제1호의 규정에 의한 금융회사 등을 통하여 지급한 경우로서 과세표준확정신고서에 송금사실을 기재한 경비 등의 송금명세서를 첨부하여 납세지 관할세무서장에게 제출하는 경우'
제95_03조1항9호={}
제95_03조1항[제95_03조1항9호_]=제95_03조1항9호
제95_03조1항9호가목_='가. 「부가가치세법」 제61조를 적용받는 사업자로부터 부동산임대용역을 공급받은 경우'
제95_03조1항9호가목={}
제95_03조1항9호[제95_03조1항9호가목_]=제95_03조1항9호가목
제95_03조1항9호나목_='나. 임가공용역을 공급받은 경우(법인과의 거래를 제외한다)'
제95_03조1항9호나목={}
제95_03조1항9호[제95_03조1항9호나목_]=제95_03조1항9호나목
제95_03조1항9호다목_='다. 운수업을 영위하는 자(「부가가치세법」 제61조를 적용받는 사업자에 한한다)가 제공하는 운송용역을 공급받은 경우(제7호의 규정을 적용받는 경우를 제외한다)'
제95_03조1항9호다목={}
제95_03조1항9호[제95_03조1항9호다목_]=제95_03조1항9호다목
제95_03조1항9호라목_='라. 「부가가치세법」 제61조를 적용받는 사업자로부터 「조세특례제한법 시행령」 제110조제4항 각호의 규정에 의한 재활용폐자원등 또는 「자원의 절약과 재활용촉진에 관한 법률」 제2조제2호에 따른 재활용가능자원(동법 시행규칙 별표 1 제1호 내지 제9호의 1에 해당하는 것에 한한다)을 공급받은 경우'
제95_03조1항9호라목={}
제95_03조1항9호[제95_03조1항9호라목_]=제95_03조1항9호라목
제95_03조1항9호마목_='마. 광업권, 어업권, 산업재산권, 산업정보, 산업상비밀, 상표권, 영업권, 토사석 의 채취허가에 따른 권리, 지하수의 개발ㆍ이용권 그밖에 이와 유사한 자산이나 권리를 공급받는 경우'
제95_03조1항9호마목={}
제95_03조1항9호[제95_03조1항9호마목_]=제95_03조1항9호마목
제95_03조1항9호바목_='바. 「부가가치세법 시행령」 제32조제2항에 따라 영세율이 적용되는 「 항공법」에 의한 상업서류송달용역을 제공받는 경우'
제95_03조1항9호바목={}
제95_03조1항9호[제95_03조1항9호바목_]=제95_03조1항9호바목
제95_03조1항9호사목_='사. 「공인중개사의 업무 및 부동산 거래신고에 관한 법률」에 의한 중개업자에게 수수료를 지급하는 경우'
제95_03조1항9호사목={}
제95_03조1항9호[제95_03조1항9호사목_]=제95_03조1항9호사목
제95_03조1항9호아목_='아. 「전자상거래 등에서의 소비자보호에 관한 법률」 제2조제2호 본문에 따른 통신판매에 따라 재화 또는 용역을 공급받은 경우'
제95_03조1항9호아목={}
제95_03조1항9호[제95_03조1항9호아목_]=제95_03조1항9호아목
제95_03조1항9호자목_='자. 그 밖에 국세청장이 정하여 고시하는 경우'
제95_03조1항9호자목={}
제95_03조1항9호[제95_03조1항9호자목_]=제95_03조1항9호자목
제95_03조['[본조신설 1999. 5. 7.]']={}
제95_03조['[제95조의2에서 이동 <2014. 3. 14.>]']={}
제95_04조_=' 제95조의4(현금영수증가맹점 가입대상자의 범위) '
제95_04조={}
제95_04조['소득세법시행규칙 제95조의4(현금영수증가맹점 가입대상자의 범위)']={}
조문['제95조의4(현금영수증가맹점 가입대상자의 범위)']=제95_04조
조['제95조의4(현금영수증가맹점 가입대상자의 범위)']=제95_04조
제95_04조1항_='①영 제210조의3제1항 단서에서 "기획재정부령으로 정하는 사업자"라 함은 다음 각 호의 자를 말한다. <개정 2008. 4. 29., 2012. 2. 28.>'
제95_04조1항={}
제95_04조[제95_04조1항_]=제95_04조1항
제95_04조1항1호_='1. 택시운송 사업자'
제95_04조1항1호={}
제95_04조1항[제95_04조1항1호_]=제95_04조1항1호
제95_04조1항2호_='2. 읍ㆍ면지역에 소재하는 소매업자 중 사업규모ㆍ시설ㆍ업황 등을 고려하여 국세청장이 지정하는 사업자'
제95_04조1항2호={}
제95_04조1항[제95_04조1항2호_]=제95_04조1항2호
제95_04조1항3호_='3. 「법인세법」 제117조의2제3항 단서에 따라 사실과 다르게 발급한 것으로 보지 아니하는 사업자를 통하여 현금영수증을 발급하는 사업자'
제95_04조1항3호={}
제95_04조1항[제95_04조1항3호_]=제95_04조1항3호
제95_04조2항_='② 영 별표 3의2 소매업란에서 "기획재정부령으로 정하는 업종"이란 다음 각 호의 어느 하나에 해당하는 업종을 말한다. <신설 2008. 4. 29., 2017. 3. 10.>'
제95_04조2항={}
제95_04조[제95_04조2항_]=제95_04조2항
제95_04조2항1호_='1. 노점상업ㆍ행상업'
제95_04조2항1호={}
제95_04조2항[제95_04조2항1호_]=제95_04조2항1호
제95_04조2항2호_='2. 무인자동판매기를 이용하여 재화 또는 용역을 공급하는 자동판매기운영업'
제95_04조2항2호={}
제95_04조2항[제95_04조2항2호_]=제95_04조2항2호
제95_04조2항3호_='3. 자동차소매업(중고자동차 소매업은 제외한다)'
제95_04조2항3호={}
제95_04조2항[제95_04조2항3호_]=제95_04조2항3호
제95_04조2항4호_='4. 우표ㆍ수입인지소매업 및 복권소매업'
제95_04조2항4호={}
제95_04조2항[제95_04조2항4호_]=제95_04조2항4호
제95_04조3항_='③영 별표 3의2 제조업란에서 "기획재정부령으로 정하는 업종"이라 함은 다음 각 호의 어느 하나에 해당하는 업종을 말한다. <개정 2008. 4. 29.>'
제95_04조3항={}
제95_04조[제95_04조3항_]=제95_04조3항
제95_04조3항1호_='1. 과자점업, 도정업 및 제분업(떡방앗간을 포함한다)'
제95_04조3항1호={}
제95_04조3항[제95_04조3항1호_]=제95_04조3항1호
제95_04조3항2호_='2. 양복점업, 양장점업 및 양화점업'
제95_04조3항2호={}
제95_04조3항[제95_04조3항2호_]=제95_04조3항2호
제95_04조['[본조신설 2007. 4. 17.]']={}
제96조_=' 제96조 삭제 '
제96조={}
제96조['소득세법시행규칙 제96조 삭제 ']={}
조문['제96조 삭제 ']=제96조
조['제96조 삭제 ']=제96조
제96_02조_=' 제96조의2(영수증을 발행할 수 있는 사업자의 범위) '
제96_02조={}
제96_02조['소득세법시행규칙 제96조의2(영수증을 발행할 수 있는 사업자의 범위)']={}
조문['제96조의2(영수증을 발행할 수 있는 사업자의 범위)']=제96_02조
조['제96조의2(영수증을 발행할 수 있는 사업자의 범위)']=제96_02조
제96_02조1항_='영 제211조제2항제3호에서 "기획재정부령이 정하는 사업"이라 함은 다음 각 호의 어느 하나에 해당하는 사업을 말한다. 다만, 제2호부터 제7호까지에 해당하는 사업은 직접 최종소비자에게 재화 또는 용역을 공급하는 경우에 한한다. <개정 1998. 8. 11., 2008. 4. 29., 2010. 4. 30.>'
제96_02조1항={}
제96_02조[제96_02조1항_]=제96_02조1항
제96_02조1항1호_='1. 금융 및 보험업'
제96_02조1항1호={}
제96_02조1항[제96_02조1항1호_]=제96_02조1항1호
제96_02조1항2호_='2. 사업시설관리 및 사업지원서비스업'
제96_02조1항2호={}
제96_02조1항[제96_02조1항2호_]=제96_02조1항2호
제96_02조1항3호_='3. 교육서비스업'
제96_02조1항3호={}
제96_02조1항[제96_02조1항3호_]=제96_02조1항3호
제96_02조1항4호_='4. 보건업 및 사회복지서비스업'
제96_02조1항4호={}
제96_02조1항[제96_02조1항4호_]=제96_02조1항4호
제96_02조1항5호_='5. 예술, 스포츠 및 여가 관련 서비스업'
제96_02조1항5호={}
제96_02조1항[제96_02조1항5호_]=제96_02조1항5호
제96_02조1항6호_='6. 협회 및 단체, 수리 및 기타 개인서비스업'
제96_02조1항6호={}
제96_02조1항[제96_02조1항6호_]=제96_02조1항6호
제96_02조1항7호_='7. 가구내 고용활동에서 발생하는 소득'
제96_02조1항7호={}
제96_02조1항[제96_02조1항7호_]=제96_02조1항7호
제96_02조1항8호_='8. 그 밖에 제1호부터 제7호까지와 유사한 사업으로서 계산서 발급이 불가능하거나 현저히 곤란한 사업'
제96_02조1항8호={}
제96_02조1항[제96_02조1항8호_]=제96_02조1항8호
제96_02조['[본조신설 1996. 3. 30.]']={}
제96_03조_=' 제96조의3(전자계산서) '
제96_03조={}
제96_03조['소득세법시행규칙 제96조의3(전자계산서)']={}
조문['제96조의3(전자계산서)']=제96_03조
조['제96조의3(전자계산서)']=제96_03조
제96_03조1항_='법 제163조제1항에 따른 전자계산서는 「전자문서 및 전자거래 기본법」 제24조제1항에 따라 제정된 전자계산서의 표준에 따라 생성ㆍ발급ㆍ전송되어야 한다. <개정 2015. 3. 13.>'
제96_03조1항={}
제96_03조[제96_03조1항_]=제96_03조1항
제96_03조['[본조신설 2013. 2. 23.]']={}
제96_03조['[종전 제96조의3은 제96조의4로 이동 <2013. 2. 23.>]']={}
제96_04조_=' 제96조의4(현금영수증 발급장치 등을 통한 지급명세서 작성방법 등) '
제96_04조={}
제96_04조['소득세법시행규칙 제96조의4(현금영수증 발급장치 등을 통한 지급명세서 작성방법 등)']={}
조문['제96조의4(현금영수증 발급장치 등을 통한 지급명세서 작성방법 등)']=제96_04조
조['제96조의4(현금영수증 발급장치 등을 통한 지급명세서 작성방법 등)']=제96_04조
제96_04조1항_='영 제213조의2제2항에 따라 현금영수증발급장치를 통하여 제출하는 지급명세서의 작성방법 등에 관하여 필요한 사항은 국세청장이 정하여 고시한다. <개정 2009. 4. 14.>'
제96_04조1항={}
제96_04조[제96_04조1항_]=제96_04조1항
제96_04조['[본조신설 2006. 4. 10.]']={}
제96_04조['[제96조의3에서 이동 <2013. 2. 23.>]']={}
제97조_=' 제97조 (지급명세서제출의무의 면제) '
제97조={}
제97조['소득세법시행규칙 제97조 (지급명세서제출의무의 면제)']={}
조문['제97조 (지급명세서제출의무의 면제)']=제97조
조['제97조 (지급명세서제출의무의 면제)']=제97조
제97조1항_='영 제214조제1항제3호에서 "기획재정부령으로 정하는 소득"이란 다음 각 호의 어느 하나에 해당하는 것을 말한다. <개정 2009. 4. 14., 2014. 3. 14., 2015. 3. 13.>'
제97조1항={}
제97조[제97조1항_]=제97조1항
제97조1항1호_='1. 법 제21조제1항제4호에 해당하는 기타소득으로서 1건당 환급금이 500만원 미만(체육진흥투표권의 경우 10만원 이하)인 경우'
제97조1항1호={}
제97조1항[제97조1항1호_]=제97조1항1호
제97조1항2호_='2. 법 제84조에 따라 소득세가 과세되지 아니하는 기타소득. 다만, 법 제21조제1항제15호 및 제19호에 따른 기타소득을 제외한다.'
제97조1항2호={}
제97조1항[제97조1항2호_]=제97조1항2호
제97조1항3호_='3. 영 제184조의2제1호의2의 규정에 의한 안마시술소에서 제공하는 용역에 대한 소득으로서 안마시술소가 소득세를 원천징수하는 소득'
제97조1항3호={}
제97조1항[제97조1항3호_]=제97조1항3호
제97조['[적용일자 2004. 1. 1.부터]']={}
제97조['[제목개정 2009. 4. 14.]']={}
제97_02조_=' 제97조의2(비거주자의 국내원천소득등에 대한 지급명세서 제출의무면제) '
제97_02조={}
제97_02조['소득세법시행규칙 제97조의2(비거주자의 국내원천소득등에 대한 지급명세서 제출의무면제)']={}
조문['제97조의2(비거주자의 국내원천소득등에 대한 지급명세서 제출의무면제)']=제97_02조
조['제97조의2(비거주자의 국내원천소득등에 대한 지급명세서 제출의무면제)']=제97_02조
제97_02조1항_='영 제216조의2제1항제8호에서 "기획재정부령으로 정하는 소득"이란 다음 각호의 소득을 말한다. <개정 2009. 4. 14.>'
제97_02조1항={}
제97_02조[제97_02조1항_]=제97_02조1항
제97_02조1항1호_='1. 예금 등의 잔액이 30만원 미만으로서 1년 이상 거래가 없는 계좌에서 발생하는 이자소득 또는 배당소득'
제97_02조1항1호={}
제97_02조1항[제97_02조1항1호_]=제97_02조1항1호
제97_02조1항2호_='2. 계좌별로 1년간 발생한 이자소득 또는 배당소득이 3만원 미만인 경우의 당해 소득'
제97_02조1항2호={}
제97_02조1항[제97_02조1항2호_]=제97_02조1항2호
제97_02조1항3호_='3. 법 제119조제7호의 국내원천소득으로서 일용근로자의 소득'
제97_02조1항3호={}
제97_02조1항[제97_02조1항3호_]=제97_02조1항3호
제97_02조['[본조신설 2002. 4. 13.]']={}
제97_02조['[제목개정 2009. 4. 14.]']={}
제98조_=' 제98조 삭제 '
제98조={}
제98조['소득세법시행규칙 제98조 삭제 ']={}
조문['제98조 삭제 ']=제98조
조['제98조 삭제 ']=제98조
제99조_=' 제99조 (지급명세서 제출기한의 연장) '
제99조={}
제99조['소득세법시행규칙 제99조 (지급명세서 제출기한의 연장)']={}
조문['제99조 (지급명세서 제출기한의 연장)']=제99조
조['제99조 (지급명세서 제출기한의 연장)']=제99조
제99조1항_='영 제216조제1항제1호 및 제2호에서 "기획재정부령이 정하는 기간분"이란 전산시스템의 유지ㆍ관리 및 입력ㆍ출력상태등을 감안하여 국세청장이 정하는 기간분으로 한다. <개정 2009. 4. 14.>'
제99조1항={}
제99조[제99조1항_]=제99조1항
제99조['[제목개정 2009. 4. 14.]']={}
제99_02조_=' 제99조의2(인적용역제공사업자 등의 범위) '
제99_02조={}
제99_02조['소득세법시행규칙 제99조의2(인적용역제공사업자 등의 범위)']={}
조문['제99조의2(인적용역제공사업자 등의 범위)']=제99_02조
조['제99조의2(인적용역제공사업자 등의 범위)']=제99_02조
제99_02조1항_='영 제224조제1항제6호에서 "기획재정부령이 정하는 자"라 함은 다음 각 호의 어느 하나에 해당하는 자를 말한다. <개정 2008. 4. 29.>'
제99_02조1항={}
제99_02조[제99_02조1항_]=제99_02조1항
제99_02조1항1호_='1. 수하물운반원'
제99_02조1항1호={}
제99_02조1항[제99_02조1항1호_]=제99_02조1항1호
제99_02조1항2호_='2. 중고자동차판매원'
제99_02조1항2호={}
제99_02조1항[제99_02조1항2호_]=제99_02조1항2호
제99_02조1항3호_='3. 욕실종사원'
제99_02조1항3호={}
제99_02조1항[제99_02조1항3호_]=제99_02조1항3호
제99_02조['[본조신설 2006. 4. 10.]']={}
제100조_=' 제100조 (일반서식) '
제100조={}
제100조['소득세법시행규칙 제100조 (일반서식)']={}
조문['제100조 (일반서식)']=제100조
조['제100조 (일반서식)']=제100조
제100조1항_='일반서식은 다음 각 호의 어느 하나에 따른다. <개정 1997. 4. 23., 1998. 3. 21., 1999. 5. 7., 2000. 4. 3., 2001. 4. 30., 2002. 4. 13., 2003. 4. 14., 2004. 3. 5., 2005. 3. 19., 2006. 4. 10., 2007. 4. 17., 2008. 4. 29., 2009. 4. 14., 2009. 6. 8., 2009. 9. 2., 2010. 4. 30., 2011. 3. 28., 2011. 8. 3., 2012. 2. 28., 2013. 2. 23., 2014. 3. 14., 2015. 3. 13., 2015. 6. 30., 2016. 2. 25., 2016. 3. 16., 2017. 3. 10., 2018. 3. 21.>'
제100조1항={}
제100조[제100조1항_]=제100조1항
제100조1항1호_='1. 영 제5조제5항에 규정하는 납세지신고서는 별지 제1호서식에 의한다.'
제100조1항1호={}
제100조1항[제100조1항1호_]=제100조1항1호
제100조1항2호_='2. 영 제6조제1항에 규정하는 납세지지정신청서는 별지 제2호서식에 의한다.'
제100조1항2호={}
제100조1항[제100조1항2호_]=제100조1항2호
제100조1항3호_='3. 영 제7조제1항에 규정하는 납세지변경신고서는 별지 제3호서식에 의한다.'
제100조1항3호={}
제100조1항[제100조1항3호_]=제100조1항3호
제100조1항3_02호_='3의2. 영 제40조의2제6항에 따른 연금수령개시 및 해지명세서는 별지 제3호의2서식에 따른다.'
제100조1항3_02호={}
제100조1항[제100조1항3_02호_]=제100조1항3_02호
제100조1항3_03호_='3의3. 영 제40조의4제4항에 따른 연금계좌이체명세서는 별지 제3호의3서식에 따른다.'
제100조1항3_03호={}
제100조1항[제100조1항3_03호_]=제100조1항3_03호
제100조1항3_04호_='3의4. 삭제 <2015. 3. 13.>'
제100조1항3_04호={}
제100조1항[제100조1항3_04호_]=제100조1항3_04호
제100조1항4호_='4. 영 제59조제4항에 규정하는 보험금사용계획서는 별지 제4호서식에 의한다.'
제100조1항4호={}
제100조1항[제100조1항4호_]=제100조1항4호
제100조1항5호_='5. 영 제60조제3항에 규정하는 국고보조금사용계획서는 별지 제5호서식에 의한다.'
제100조1항5호={}
제100조1항[제100조1항5호_]=제100조1항5호
제100조1항6호_='6. 영 제63조제2항의 규정에 의한 내용연수신고서, 영 제63조의2제2항의 규정에 의한 내용연수(변경)승인신청서, 영 제64조제2항의 규정에 의한 감가상각방법신고서 또는 영 제65조제2항의 규정에 의한 감가상각방법변경신청서는 별지 제6호서식에 의한다.'
제100조1항6호={}
제100조1항[제100조1항6호_]=제100조1항6호
제100조1항7호_='7. 영 제80조제1항제5호바목에 따른 연간 기부금 모금액 및 활용실적의 공개는 별지 제6호의2서식에 따른다.'
제100조1항7호={}
제100조1항[제100조1항7호_]=제100조1항7호
제100조1항7_02호_='7의2. 영 제80조제5항에 따른 수입명세서는 별지 제7호서식에 따른다.'
제100조1항7_02호={}
제100조1항[제100조1항7_02호_]=제100조1항7_02호
제100조1항7_03호_='7의3. 영 제84조제4항제2호에 따른 송금명세서는 별지 제7호의2서식에 따른다.'
제100조1항7_03호={}
제100조1항[제100조1항7_03호_]=제100조1항7_03호
제100조1항8호_='8. 영 제94조제1항 및 같은 조 제2항에 따른 재고자산등의 평가방법 신고서 또는 재고자산등의 평가방법 변경신고서는 별지 제8호서식에 따른다.'
제100조1항8호={}
제100조1항[제100조1항8호_]=제100조1항8호
제100조1항9호_='9. 영 제102조제8항제2호에 규정하는 채권등매출확인서는 별지 제9호의2서식에 의한다.'
제100조1항9호={}
제100조1항[제100조1항9호_]=제100조1항9호
제100조1항9_02호_='9의2. 삭제 <2010. 4. 30.>'
제100조1항9_02호={}
제100조1항[제100조1항9_02호_]=제100조1항9_02호
제100조1항9_03호_='9의3. 삭제 <2010. 4. 30.>'
제100조1항9_03호={}
제100조1항[제100조1항9_03호_]=제100조1항9_03호
제100조1항9_04호_='9의4. 삭제 <2009. 4. 14.>'
제100조1항9_04호={}
제100조1항[제100조1항9_04호_]=제100조1항9_04호
제100조1항10호_='10. 삭제 <2007. 4. 17.>'
제100조1항10호={}
제100조1항[제100조1항10호_]=제100조1항10호
제100조1항10_02호_='10의2. 영 제116조의3제3항의 규정에 의한 기장세액공제신청서는 별지 제10호의3서식에 의한다.'
제100조1항10_02호={}
제100조1항[제100조1항10_02호_]=제100조1항10_02호
제100조1항10_03호_='10의3. 법 제56조의3제2항에 따른 전자계산서 발급 세액공제신고서는 별지 제10호의4서식에 따른다.'
제100조1항10_03호={}
제100조1항[제100조1항10_03호_]=제100조1항10_03호
제100조1항11호_='11. 영 제117조제3항에 규정하는 외국납부세액공제(필요경비산입)신청서는 별지 제11호서식에 의한다.'
제100조1항11호={}
제100조1항[제100조1항11호_]=제100조1항11호
제100조1항12호_='12. 영 제118조제3항에 규정하는 재해손실세액공제신청서는 별지 제12호서식에 의한다.'
제100조1항12호={}
제100조1항[제100조1항12호_]=제100조1항12호
제100조1항13호_='13. 영 제125조제1항에 따른 중간예납추계액신고서는 별지 제14호서식에 의한다.'
제100조1항13호={}
제100조1항[제100조1항13호_]=제100조1항13호
제100조1항14호_='14. 삭제 <1997. 4. 23.>'
제100조1항14호={}
제100조1항[제100조1항14호_]=제100조1항14호
제100조1항15호_='15. 영 제127조제1항에 규정하는 토지등매매차익예정신고서와 같은 조 제2항에 따른 토지등매매차익예정신고납부계산서는 별지 제16호서식, 별지 제16호서식 부표(1) 및 별지 제16호서식 부표(2)에 의한다.'
제100조1항15호={}
제100조1항[제100조1항15호_]=제100조1항15호
제100조1항15_02호_='15의2. 영 제133조제5항에 따른 성실신고확인자 선임신고는 별지 제16호의2서식에 따른다.'
제100조1항15_02호={}
제100조1항[제100조1항15_02호_]=제100조1항15_02호
제100조1항16호_='16. 영 제138조제1항에 규정하는 외국항행사업으로부터 얻는 소득에 대한 세액감면신청서는 별지 제17호서식에 의한다.'
제100조1항16호={}
제100조1항[제100조1항16호_]=제100조1항16호
제100조1항17호_='17. 영 제138조제2항에 규정하는 외국인근로소득에 대한 세액감면신청서는 별지 제18호서식에 의한다.'
제100조1항17호={}
제100조1항[제100조1항17호_]=제100조1항17호
제100조1항18호_='18. 영 제141조제1항에 규정하는 사업장현황신고서는 별지 제19호서식에 따르고, 수입금액명세서 및 관련 자료는 별지 제19호의2서식부터 별지 제19호의8서식에 따른다.'
제100조1항18호={}
제100조1항[제100조1항18호_]=제100조1항18호
제100조1항18_02호_='18의2. 영 제143조제9항에 따른 주요경비지출명세서는 별지 제20호의5서식에 따른다.'
제100조1항18_02호={}
제100조1항[제100조1항18_02호_]=제100조1항18_02호
제100조1항18_03호_='18의3. 영 제149조에 따른 과세표준과 세액의 통지는 별지 제19호의9서식에 따른다.'
제100조1항18_03호={}
제100조1항[제100조1항18_03호_]=제100조1항18_03호
제100조1항18_04호_='18의4. 영 제149조제2항에 따른 상속인별 과세표준과 세액의 통지는 별지 제19호의10서식에 따른다'
제100조1항18_04호={}
제100조1항[제100조1항18_04호_]=제100조1항18_04호
제100조1항19호_='19. 영 제150조제3항 및 제4항에 규정하는 공동사업장등이동신고서는 별지 제20호서식에 의한다.'
제100조1항19호={}
제100조1항[제100조1항19호_]=제100조1항19호
제100조1항19_02호_='19의2. 영 제183조의3의 규정에 의한 국외특수관계인간 주식양도가액검토서는 별지 제20호의2서식에 따른다.'
제100조1항19_02호={}
제100조1항[제100조1항19_02호_]=제100조1항19_02호
제100조1항19_03호_='19의3. 영 제183조의4제2항의 규정에 의한 비거주자유가증권양도소득정산신고서는 별지 제20호의3서식에 의한다.'
제100조1항19_03호={}
제100조1항[제100조1항19_03호_]=제100조1항19_03호
제100조1항19_04호_='19의4. 영 제183조의4제4항에 따른 비거주자유가증권양도소득신고서는 별지 제20호의4서식에 따른다.'
제100조1항19_04호={}
제100조1항[제100조1항19_04호_]=제100조1항19_04호
제100조1항19_05호_='19의5. 삭제 <2011. 3. 28.>'
제100조1항19_05호={}
제100조1항[제100조1항19_05호_]=제100조1항19_05호
제100조1항20호_='20. 영 제185조제1항의 규정에 의한 원천징수이행상황신고서는 별지 제21호서식에 의한다.'
제100조1항20호={}
제100조1항[제100조1항20호_]=제100조1항20호
제100조1항21호_='21. 영 제186조제3항에 따른 원천징수세액 반기별납부 승인신청은 별지 제21호의2서식에 따른다.'
제100조1항21호={}
제100조1항[제100조1항21호_]=제100조1항21호
제100조1항21_02호_='21의2. 영 제186조제4항에 따른 원천징수세액 반기별납부 승인통지는 별지 제21호의3서식에 따른다.'
제100조1항21_02호={}
제100조1항[제100조1항21_02호_]=제100조1항21_02호
제100조1항22호_='22. 영 제187조제2항 본문에 따른 장기채권이자소득분리과세신청서는 별지 제21호의4서식에 따른다.'
제100조1항22호={}
제100조1항[제100조1항22호_]=제100조1항22호
제100조1항23호_='23. 영 제187조제2항 단서에 따른 장기채권이자소득분리과세철회신청서는 별지 제21호의5서식에 따른다.'
제100조1항23호={}
제100조1항[제100조1항23호_]=제100조1항23호
제100조1항23_02호_='23의2. 삭제 <2011. 3. 28.>'
제100조1항23_02호={}
제100조1항[제100조1항23_02호_]=제100조1항23_02호
제100조1항23_03호_='23의3. 삭제 <2011. 3. 28.>'
제100조1항23_03호={}
제100조1항[제100조1항23_03호_]=제100조1항23_03호
제100조1항23_04호_='23의4. 삭제 <2011. 3. 28.>'
제100조1항23_04호={}
제100조1항[제100조1항23_04호_]=제100조1항23_04호
제100조1항23_05호_='23의5. 삭제 <2011. 3. 28.>'
제100조1항23_05호={}
제100조1항[제100조1항23_05호_]=제100조1항23_05호
제100조1항24호_='24. 영 제192조제1항에 규정하는 소득금액변동통지서는 별지 제22호서식(1)에 의한다. 다만, 영 제192조제1항 단서의 규정에 의하여 통지하는 경우에는 별지 제22호서식(2)에 의한다.'
제100조1항24호={}
제100조1항[제100조1항24호_]=제100조1항24호
제100조1항25호_='25. 법 제133조제1항ㆍ제144조제1항ㆍ제144조의4ㆍ제145조제2항ㆍ제145조의3제2항ㆍ제156조제12항에 따른 원천징수영수증 및 영 제213조제1항에 따른 지급명세서는 별지 제23호서식(1), 별지 제23호서식(2), 별지 제23호서식(3), 별지 제23호서식(4), 별지 제23호서식(5), 별지 제23호서식(6) 또는 별지 제24호서식(6)에 따른다.'
제100조1항25호={}
제100조1항[제100조1항25호_]=제100조1항25호
제100조1항25_02호_='25의2. 영 제194조제3항에 따른 소득세 원천징수세액 조정신청서는 별지 제24호의2서식에 따르고, 같은 항에 따른 근로소득자 소득ㆍ세액 공제신고서는 별지 제37호서식(1)에 따른다.'
제100조1항25_02호={}
제100조1항[제100조1항25_02호_]=제100조1항25_02호
제100조1항25_03호_='25의3. 삭제 <2011. 3. 28.>'
제100조1항25_03호={}
제100조1항[제100조1항25_03호_]=제100조1항25_03호
제100조1항25_04호_='25의4. 삭제 <2011. 3. 28.>'
제100조1항25_04호={}
제100조1항[제100조1항25_04호_]=제100조1항25_04호
제100조1항25_05호_='25의5. 삭제 <2011. 3. 28.>'
제100조1항25_05호={}
제100조1항[제100조1항25_05호_]=제100조1항25_05호
제100조1항26호_='26. 법 제143조제1항에 따른 근로소득원천징수영수증, 법 제146조제3항에 따른 퇴직소득원천징수영수증 및 영 제202조의3제4항ㆍ영 제213조제1항에 따른 지급명세서는 별지 제24호서식(1), 별지 제24호서식(2), 별지 제24호서식(3), 별지 제24호서식(4) 또는 별지 제24호서식(6)에 따른다.'
제100조1항26호={}
제100조1항[제100조1항26호_]=제100조1항26호
제100조1항27호_='27. 영 제196조제1항에 규정하는 근로소득원천징수부는 별지 제25호서식(1)에 의한다.'
제100조1항27호={}
제100조1항[제100조1항27호_]=제100조1항27호
제100조1항28호_='28. 영 제196조의2에 따른 근무지(변동)신고서는 별지 제26호서식에 의한다.'
제100조1항28호={}
제100조1항[제100조1항28호_]=제100조1항28호
제100조1항28_02호_='28의2. 영 제201조의10제4항에 따른 연금보험료 등 소득ㆍ세액 공제확인서는 별지 제26호의2서식에 따른다.'
제100조1항28_02호={}
제100조1항[제100조1항28_02호_]=제100조1항28_02호
제100조1항28_03호_='28의3. 영 제201조의11제7항에 따른 사업소득원천징수부는 별지 제25호서식(2)에 의한다.'
제100조1항28_03호={}
제100조1항[제100조1항28_03호_]=제100조1항28_03호
제100조1항28_04호_='28의4. 영 제201조의12에 따른 소득ㆍ세액 공제신고서는 별지 제37호서식(1)에 따른다.'
제100조1항28_04호={}
제100조1항[제100조1항28_04호_]=제100조1항28_04호
제100조1항28_05호_='28의5. 영 제201조의6제1항의 규정에 의한 연금소득원천징수부는 별지 제25호서식(3)에 의한다.'
제100조1항28_05호={}
제100조1항[제100조1항28_05호_]=제100조1항28_05호
제100조1항28_06호_='28의6. 법 제143조의7에 따른 연금소득원천징수영수증 및 영 제213조제1항에 따른 지급명세서는 별지 제24호 서식(5) 및 별지 제24호서식(6)에 의한다.'
제100조1항28_06호={}
제100조1항[제100조1항28_06호_]=제100조1항28_06호
제100조1항28_07호_='28의7. 영 제202조의3제1항에 따른 과세이연계좌신고서는 별지 제24호의3서식과 같다.'
제100조1항28_07호={}
제100조1항[제100조1항28_07호_]=제100조1항28_07호
제100조1항28_08호_='28의8. 법 제145조의3제2항 및 영 제202조의4제2항에 따른 종교인소득 원천징수부는 별지 제25호서식(4)에 따르고, 소득ㆍ세액 공제신고서는 별지 제37호서식(2)에 따른다.'
제100조1항28_08호={}
제100조1항[제100조1항28_08호_]=제100조1항28_08호
제100조1항28_09호_='28의9. 삭제 <2011. 3. 28.>'
제100조1항28_09호={}
제100조1항[제100조1항28_09호_]=제100조1항28_09호
제100조1항29호_='29. 영 제205조제1항에 따른 근로소득원천징수영수증 또는 납세조합영수증은 별지 제24호서식(1) 또는 별지 제27호서식(1)에 따른다.'
제100조1항29호={}
제100조1항[제100조1항29호_]=제100조1항29호
제100조1항29_02호_='29의2. 영 제205조제4항에 따른 납세조합징수이행상황신고서 및 납세조합조합원 변동명세서는 각각 별지 제27호서식(4) 및 별지 제27호서식(5)에 따른다.'
제100조1항29_02호={}
제100조1항[제100조1항29_02호_]=제100조1항29_02호
제100조1항29_03호_='29의3. 영 제207조의2에 따른 비과세ㆍ면제신청서는 다음 각 목의 구분에 의한다.'
제100조1항29_03호={}
제100조1항[제100조1항29_03호_]=제100조1항29_03호
제100조1항29_03호가목_='가. 이자ㆍ배당ㆍ사용료ㆍ기타소득에 대한 비과세ㆍ면제신청서 : 별지 제29호의2서식(1)'
제100조1항29_03호가목={}
제100조1항29_03호[제100조1항29_03호가목_]=제100조1항29_03호가목
제100조1항29_03호나목_='나. 유가증권양도소득에 대한 비과세ㆍ면제신청서 : 별지 제29호의2서식(2)'
제100조1항29_03호나목={}
제100조1항29_03호[제100조1항29_03호나목_]=제100조1항29_03호나목
제100조1항29_03호다목_='다. 근로소득에 대한 비과세ㆍ면제신청서 : 별지 제29호의2서식(3)'
제100조1항29_03호다목={}
제100조1항29_03호[제100조1항29_03호다목_]=제100조1항29_03호다목
제100조1항29_03호라목_='라. 부동산양도소득에 대한 비과세ㆍ면제신청서: 별지 제29호의2서식(4)'
제100조1항29_03호라목={}
제100조1항29_03호[제100조1항29_03호라목_]=제100조1항29_03호라목
제100조1항29_03호마목_='마. 삭제 <2011. 3. 28.>'
제100조1항29_03호마목={}
제100조1항29_03호[제100조1항29_03호마목_]=제100조1항29_03호마목
제100조1항29_03호바목_='바. 삭제 <2011. 3. 28.>'
제100조1항29_03호바목={}
제100조1항29_03호[제100조1항29_03호바목_]=제100조1항29_03호바목
제100조1항29_04호_='29의4. 영 제207조제5항에 따른 양도소득세 신고납부(비과세ㆍ과세미달) 확인(신청)서는 별지 제29호의3서식과 같다.'
제100조1항29_04호={}
제100조1항[제100조1항29_04호_]=제100조1항29_04호
제100조1항29_05호_='29의5. 영 제207조의4제1항에 따른 원천징수특례사전승인신청서는 별지 제29호의4서식과 같다.'
제100조1항29_05호={}
제100조1항[제100조1항29_05호_]=제100조1항29_05호
제100조1항29_06호_='29의6. 영 제207조의4제4항 및 제207조의5제4항에 따른 보정요구는 별지 제29호의5서식에 따른다.'
제100조1항29_06호={}
제100조1항[제100조1항29_06호_]=제100조1항29_06호
제100조1항29_07호_='29의7. 영 제207조의5제1항에 따른 원천징수특례 적용을 위한 경정청구서는 별지 제29호의6서식과 같다.'
제100조1항29_07호={}
제100조1항[제100조1항29_07호_]=제100조1항29_07호
제100조1항29_08호_='29의8. 영 제208조의3제1항에 따른 기부자별 발급명세는 별지 제29호의7서식(1)에 따른다.'
제100조1항29_08호={}
제100조1항[제100조1항29_08호_]=제100조1항29_08호
제100조1항29_09호_='29의9. 영 제208조의3제2항에 따른 기부금영수증 발급명세서는 별지 제29호의7서식(2)에 따른다.'
제100조1항29_09호={}
제100조1항[제100조1항29_09호_]=제100조1항29_09호
제100조1항29_10호_='29의10. 삭제 <2009. 4. 14.>'
제100조1항29_10호={}
제100조1항[제100조1항29_10호_]=제100조1항29_10호
제100조1항29_11호_='29의11. 영 제208조의5제9항에 따른 사업용계좌신고(변경신고ㆍ추가신고)서는 별지 제29호의9서식에 따른다.'
제100조1항29_11호={}
제100조1항[제100조1항29_11호_]=제100조1항29_11호
제100조1항29_12호_='29의12. 영 제207조의7제3항에 따른 비거주연예인등의 용역제공소득 지급명세서는 별지 제29호의10서식에 따른다.'
제100조1항29_12호={}
제100조1항[제100조1항29_12호_]=제100조1항29_12호
제100조1항29_13호_='29의13. 영 제207조의7제4항에 따른 비과세외국연예등법인에 대한 원천징수세액 환급신청서는 별지 제29호의11서식에 따른다.'
제100조1항29_13호={}
제100조1항[제100조1항29_13호_]=제100조1항29_13호
제100조1항29_14호_='29의14. 영 제207조의8제1항에 따른 국내원천소득 제한세율 적용신청서는 별지 제29호의12서식에 따른다.'
제100조1항29_14호={}
제100조1항[제100조1항29_14호_]=제100조1항29_14호
제100조1항29_15호_='29의15. 영 제207조의2제9항 및 제207조의8제3항에 따른 국외투자기구 신고서는 별지 제29호의13서식에 따른다.'
제100조1항29_15호={}
제100조1항[제100조1항29_15호_]=제100조1항29_15호
제100조1항29_16호_='29의16. 영 제207조의9제1항에 따른 제한세율 적용을 위한 경정청구서는 별지 제29호의14서식에 따른다.'
제100조1항29_16호={}
제100조1항[제100조1항29_16호_]=제100조1항29_16호
제100조1항29_17호_='29의17. 영 제207조의2제15항에 따른 비과세ㆍ면제 적용을 위한 경정청구서는 별지 제29호의15서식에 따른다.'
제100조1항29_17호={}
제100조1항[제100조1항29_17호_]=제100조1항29_17호
제100조1항29_18호_='29의18. 영 제207조의10제3항제1호에 따른 원천징수이행상황신고서 및 같은 항 제2호에 따른 파견근로자 근로계약 명세서는 별지 제21호서식 및 별지 제101호서식에 따른다.'
제100조1항29_18호={}
제100조1항[제100조1항29_18호_]=제100조1항29_18호
제100조1항29_19호_='29의19. 영 제207조의10제4항제1호에 따른 근로소득 지급명세서 및 같은 항 제2호에 따른 파견외국법인에 대한 원천징수세액 환급신청서는 별지 제24호서식(1) 및 별지 제102호서식에 따른다.'
제100조1항29_19호={}
제100조1항[제100조1항29_19호_]=제100조1항29_19호
제100조1항30호_='30. 영 제211조에 규정하는 계산서는 별지 제28호서식(1) 또는 별지 제28호서식(2)에 의한다.'
제100조1항30호={}
제100조1항[제100조1항30호_]=제100조1항30호
제100조1항31호_='31. 영 제212조에 규정하는 매출ㆍ매입처별계산서합계표는 별지 제29호서식(1) 또는 별지 제29호서식(2)에 의한다.'
제100조1항31호={}
제100조1항[제100조1항31호_]=제100조1항31호
제100조1항31_02호_='31의2. 영 제215조제3항에 따른 이자ㆍ배당소득지급명세서는 별지 제30호서식(1)에 따른다.'
제100조1항31_02호={}
제100조1항[제100조1항31_02호_]=제100조1항31_02호
제100조1항32호_='32. 영 제216조의2제1항에 따른 지급명세서는 별지 제23호서식(1), 별지 제23호서식(5), 별지 제24호서식(1), 별지 제24호서식(2), 별지 제24호서식(7) 및 별지 제24호서식(8)에 의한다.'
제100조1항32호={}
제100조1항[제100조1항32호_]=제100조1항32호
제100조1항32_02호_='32의2. 영 제216조의2제4항의 규정에 의한 지급명세서는 다음 각목의 구분에 의한다.'
제100조1항32_02호={}
제100조1항[제100조1항32_02호_]=제100조1항32_02호
제100조1항32_02호가목_='가. 이자ㆍ배당소득지급명세서 : 별지 제30호서식(1)'
제100조1항32_02호가목={}
제100조1항32_02호[제100조1항32_02호가목_]=제100조1항32_02호가목
제100조1항32_02호나목_='나. 유가증권양도소득지급명세서 : 별지 제30호서식(2)'
제100조1항32_02호나목={}
제100조1항32_02호[제100조1항32_02호나목_]=제100조1항32_02호나목
제100조1항33호_='33. 영 제217조에 규정하는 이자ㆍ배당원천징수부는 별지 제31호서식(1) 또는 별지 제31호서식(2)에 의한다.'
제100조1항33호={}
제100조1항[제100조1항33호_]=제100조1항33호
제100조1항34호_='34. 삭제 <1997. 4. 23.>'
제100조1항34호={}
제100조1항[제100조1항34호_]=제100조1항34호
제100조1항35호_='35. 영 제222조에 규정하는 검사원증은 별지 제33호서식의 조사원증에 의한다.'
제100조1항35호={}
제100조1항[제100조1항35호_]=제100조1항35호
제100조1항35_02호_='35의2. 영 제224조제3항에 따른 사업장 제공자 등의 과세자료 제출명세서는 별지 제33호의2서식과 같다.'
제100조1항35_02호={}
제100조1항[제100조1항35_02호_]=제100조1항35_02호
제100조1항35_03호_='35의3. 영 제225조에 따른 손해배상청구소송결과통보서는 별지 제33호의3서식과 같다.'
제100조1항35_03호={}
제100조1항[제100조1항35_03호_]=제100조1항35_03호
제100조1항35_04호_='35의4. 제44조의2제1항에 따른 기부금대상민간단체추천서는 별지 제33호의4서식과 같다.'
제100조1항35_04호={}
제100조1항[제100조1항35_04호_]=제100조1항35_04호
제100조1항36호_='36. 삭제 <2009. 4. 14.>'
제100조1항36호={}
제100조1항[제100조1항36호_]=제100조1항36호
제100조1항37호_='37. 삭제 <2000. 4. 3.>'
제100조1항37호={}
제100조1항[제100조1항37호_]=제100조1항37호
제100조1항38호_='38. 영 제202조의3제2항 단서 및 이 규칙 제93조제2항에 따른 원천징수세액환급신청서는 별지 제21호서식에 따른다.'
제100조1항38호={}
제100조1항[제100조1항38호_]=제100조1항38호
제100조1항39호_='39. 영 제201조의11에 따른 사업소득세액연말정산신청서 및 사업소득세액연말정산포기서는 별지 제25호의2서식에 따르고, 영 제202조의4제2항에 따른 종교인소득세액연말정산신청서 및 종교인소득세액연말정산포기서는 별지 제25호의3서식에 따른다.'
제100조1항39호={}
제100조1항[제100조1항39호_]=제100조1항39호
제100조1항40호_='40. 제95조의2제9호의 규정에 의한 경비 등의 송금명세서는 별지 제7호의2서식에 따른다.'
제100조1항40호={}
제100조1항[제100조1항40호_]=제100조1항40호
제100조1항41호_='41. 영 제225조의2제1항제1호에 따른 파생상품거래명세서는 별지 제98호서식, 별지 제98호의3서식, 별지 제99호서식 및 별지 제99호의3서식에 따른다.'
제100조1항41호={}
제100조1항[제100조1항41호_]=제100조1항41호
제100조1항42호_='42. 영 제225조의2제1항제2호에 따른 주식등의 거래명세서는 별지 제100호서식에 따른다.'
제100조1항42호={}
제100조1항[제100조1항42호_]=제100조1항42호
제100조1항43호_='43. 영 제225조의2제2항에 따른 대주주의 주식등의 거래명세서는 별지 제100호의2서식에 따른다.'
제100조1항43호={}
제100조1항[제100조1항43호_]=제100조1항43호
제100조['[전문개정 1996. 3. 30.]']={}
제101조_=' 제101조 (과세표준확정신고 관련서식) '
제101조={}
제101조['소득세법시행규칙 제101조 (과세표준확정신고 관련서식)']={}
조문['제101조 (과세표준확정신고 관련서식)']=제101조
조['제101조 (과세표준확정신고 관련서식)']=제101조
제101조1항_='과세표준확정신고 관련 서식은 다음 각 호의 어느 하나에 따른다. <개정 1997. 4. 23., 1998. 3. 21., 1999. 5. 7., 2000. 4. 3., 2001. 4. 30., 2002. 4. 13., 2004. 3. 5., 2005. 3. 19., 2007. 4. 17., 2008. 4. 29., 2009. 4. 14., 2010. 4. 30., 2011. 3. 28., 2013. 2. 23., 2013. 9. 27., 2014. 3. 14., 2015. 3. 13., 2016. 3. 16., 2017. 3. 10.>'
제101조1항={}
제101조[제101조1항_]=제101조1항
제101조1항1호_='1. 영 제55조제4항에 규정하는 퇴직연금부담금조정명세서는 제102조제2항제14호의 규정에 의한 퇴직연금부담금조정명세서에 의한다.'
제101조1항1호={}
제101조1항[제101조1항1호_]=제101조1항1호
제101조1항2호_='2. 영 제56조제6항에 따른 대손충당금 및 대손금 조정명세서는 제102조제2항제12호에 따른 서식에 따른다.'
제101조1항2호={}
제101조1항[제101조1항2호_]=제101조1항2호
제101조1항3호_='3. 영 제57조제6항에 규정하는 퇴직급여충당금명세서는 제102조제2항제13호의 규정에 의한 퇴직급여충당금조정명세서에 의한다.'
제101조1항3호={}
제101조1항[제101조1항3호_]=제101조1항3호
제101조1항4호_='4. 영 제78조의3제10항의 규정에 의한 업무용승용차 관련비용 등 명세서는 별지 제63호서식에 의한다.'
제101조1항4호={}
제101조1항[제101조1항4호_]=제101조1항4호
제101조1항5호_='5. 영 제79조제5항의 규정에 의한 기부금명세서는 별지 제45호서식에 의한다.'
제101조1항5호={}
제101조1항[제101조1항5호_]=제101조1항5호
제101조1항5_02호_='5의2. 영 제81조제6항에 규정하는 특별재난지역 자원봉사용역등에 대한 기부금확인서는 별지 제36호의2서식에 의한다.'
제101조1항5_02호={}
제101조1항[제101조1항5_02호_]=제101조1항5_02호
제101조1항6호_='6. 영 제97조제2항에 따른 외화자산ㆍ부채의 평가는 제102조제2항제19호에 따른 외화평가차손익조정명세서에 따른다.'
제101조1항6호={}
제101조1항[제101조1항6호_]=제101조1항6호
제101조1항7호_='7. 영 제106조제1항에 따른 근로소득자 소득ㆍ세액 공제신고서는 별지 제37호서식(1)에 따른다.'
제101조1항7호={}
제101조1항[제101조1항7호_]=제101조1항7호
제101조1항8호_='8. 영 제107조제2항에 규정하는 장애인증명서는 별지 제38호서식에 의한다.'
제101조1항8호={}
제101조1항[제101조1항8호_]=제101조1항8호
제101조1항8_02호_='8의2. 영 제118조의2제1항에 따른 연금납입확인서는 별지 제38호의2서식에 따른다.'
제101조1항8_02호={}
제101조1항[제101조1항8_02호_]=제101조1항8_02호
제101조1항8_03호_='8의3. 영 제108조의3제2항에 따른 주택담보노후연금이자비용증명서는 별지 제38호의3서식에 따른다.'
제101조1항8_03호={}
제101조1항[제101조1항8_03호_]=제101조1항8_03호
제101조1항9호_='9. 영 제114조제2항에 규정하는 일시퇴거자 동거가족상황표는 별지 제39호서식에 의한다.'
제101조1항9호={}
제101조1항[제101조1항9호_]=제101조1항9호
제101조1항10호_='10. 삭제 <2005. 3. 19.>'
제101조1항10호={}
제101조1항[제101조1항10호_]=제101조1항10호
제101조1항11호_='11. 영 제130조제1항에 따른 종합소득 과세표준확정신고 및 납부계산서는 별지 제40호서식(1)에 따른다. 다만, 부동산임대업에서 발생한 사업소득 또는 부동산임대업 외의 업종에서 발생한 사업소득 중 하나의 소득이 발생하는 하나의 사업장만이 있는 사업자로서 장부를 기장하지 아니하고 단순경비율로 추계신고하는 경우와 법 제21조제1항제26호에 따른 종교인소득만 있는 경우에는 각각 별지 제40호서식(4)와 별지 제40호서식(5)로 갈음할 수 있다.'
제101조1항11호={}
제101조1항[제101조1항11호_]=제101조1항11호
제101조1항11_02호_='11의2. 영 제132조제3항의 규정에 의한 영수증수취명세서는 별지 제40호의5서식에 의한다.'
제101조1항11_02호={}
제101조1항[제101조1항11_02호_]=제101조1항11_02호
제101조1항12호_='12. 영 제130조제4항에 따른 표준재무상태표ㆍ표준손익계산서ㆍ표준원가명세서ㆍ표준합계잔액시산표는 별지 제40호의6서식부터 별지 제40호의9서식까지에 따른다.'
제101조1항12호={}
제101조1항[제101조1항12호_]=제101조1항12호
제101조1항13호_='13. 영 제135조에 따른 퇴직소득과세표준 확정신고 및 납부계산서는 별지 제40호의2서식에 따른다.'
제101조1항13호={}
제101조1항[제101조1항13호_]=제101조1항13호
제101조1항14호_='14. 삭제 <2007. 4. 17.>'
제101조1항14호={}
제101조1항[제101조1항14호_]=제101조1항14호
제101조1항14_02호_='14의2. 영 제149조의2제3항에 규정하는 결손금소급공제세액환급신청서는 별지 제40호의4서식에 의한다.'
제101조1항14_02호={}
제101조1항[제101조1항14_02호_]=제101조1항14_02호
제101조1항15호_='15. 영 제150조제6항에 규정하는 공동사업장에서 발생한 소득금액과 가산세액 및 원천징수된 세액의 각 공동사업자별 분배명세서는 별지 제41호서식에 의한다.'
제101조1항15호={}
제101조1항[제101조1항15호_]=제101조1항15호
제101조1항15_02호_='15의2. 삭제 <2011. 3. 28.>'
제101조1항15_02호={}
제101조1항[제101조1항15_02호_]=제101조1항15_02호
제101조1항16호_='16. 제58조제1항제1호에 규정하는 보험료납입증명서는 별지 제42호서식(1) 또는 별지 제42호서식(2)에 의한다.'
제101조1항16호={}
제101조1항[제101조1항16호_]=제101조1항16호
제101조1항17호_='17. 제58조제1항제2호에 따른 의료비지급명세서는 별지 제43호서식에 따르고, 의료비부담명세서는 별지 제43호의2서식에 따른다.'
제101조1항17호={}
제101조1항[제101조1항17호_]=제101조1항17호
제101조1항18호_='18. 제58조제1항제3호에 따른 교육비납입증명서는 별지 제44호서식(1)에 따른다.'
제101조1항18호={}
제101조1항[제101조1항18호_]=제101조1항18호
제101조1항18_02호_='18의2. 제58조제1항제3호의5에 따른 방과후 학교 수업용 도서 구입 증명서는 별지 제44호의2서식에 따른다.'
제101조1항18_02호={}
제101조1항[제101조1항18_02호_]=제101조1항18_02호
제101조1항19호_='19. 제58조제1항제4호에 규정하는 주택자금상환등증명서 또는 장기주택저당차입금이자상환증명서는 별지 제44호의3서식 또는 별지 제44호의4서식에 의한다.'
제101조1항19호={}
제101조1항[제101조1항19호_]=제101조1항19호
제101조1항20호_='20. 제58조제1항제5호에 규정하는 기부금명세서는 별지 제45호서식에 의한다.'
제101조1항20호={}
제101조1항[제101조1항20호_]=제101조1항20호
제101조1항20_02호_='20의2. 제58조제1항제5호 후단에 규정하는 기부금영수증은 별지 제45호의2서식에 의한다.'
제101조1항20_02호={}
제101조1항[제101조1항20_02호_]=제101조1항20_02호
제101조1항21호_='21. 제65조제1항에 따른 소득ㆍ세액 공제신고서는 별지 제37호서식(1) 또는 별지 제37호서식(2)에 따른다.'
제101조1항21호={}
제101조1항[제101조1항21호_]=제101조1항21호
제101조1항21_02호_='21의2. 제65조제2항제1호 가목의 규정에 의한 비과세사업소득(농가부업소득)계산명세서는 별지 제37호의3서식에 의한다.'
제101조1항21_02호={}
제101조1항[제101조1항21_02호_]=제101조1항21_02호
제101조1항21_03호_='21의3. 제65조제2항제1호나목에 따른 비과세사업소득(작물재배업 소득)계산명세서는 별지 제37호의4서식에 따른다.'
제101조1항21_03호={}
제101조1항[제101조1항21_03호_]=제101조1항21_03호
제101조1항22호_='22. 영 제201조의7제1항에 따른 연금소득자 소득ㆍ세액 공제신고서는 별지 제37호의2서식에 따른다.'
제101조1항22호={}
제101조1항[제101조1항22호_]=제101조1항22호
제101조1항23호_='23. 영 제217조의2제1항 각 호에 따른 해외현지법인 명세서등은 다음 각 목의 구분에 따른다.'
제101조1항23호={}
제101조1항[제101조1항23호_]=제101조1항23호
제101조1항23호가목_='가. 해외현지법인 명세서: 별지 제93호서식'
제101조1항23호가목={}
제101조1항23호[제101조1항23호가목_]=제101조1항23호가목
제101조1항23호나목_='나. 해외현지법인 재무상황표: 별지 제94호서식'
제101조1항23호나목={}
제101조1항23호[제101조1항23호나목_]=제101조1항23호나목
제101조1항23호다목_='다. 손실거래명세서: 별지 제95호서식'
제101조1항23호다목={}
제101조1항23호[제101조1항23호다목_]=제101조1항23호다목
제101조1항23호라목_='라. 해외영업소 설치현황표: 별지 제96호서식'
제101조1항23호라목={}
제101조1항23호[제101조1항23호라목_]=제101조1항23호라목
제101조1항23호마목_='마. 해외부동산 취득 및 투자운용(임대)명세서: 별지 제97호서식'
제101조1항23호마목={}
제101조1항23호[제101조1항23호마목_]=제101조1항23호마목
제101조['[전문개정 1996. 3. 30.]']={}
제102조_=' 제102조 (조정계산서 관련서식) '
제102조={}
제102조['소득세법시행규칙 제102조 (조정계산서 관련서식)']={}
조문['제102조 (조정계산서 관련서식)']=제102조
조['제102조 (조정계산서 관련서식)']=제102조
제102조1항_='①영 제130조제4항 및 영 제131조제1항에 규정하는 조정계산서는 별지 제46호서식에 의한다. <개정 2005. 3. 19.>'
제102조1항={}
제102조[제102조1항_]=제102조1항
제102조2항_='②조정계산서에는 다음 각 호에 규정하는 서류중 해당 사업자에 관련된 서류를 첨부하여야 한다. <개정 1997. 4. 23., 1998. 3. 21., 1999. 5. 7., 2003. 4. 14., 2005. 3. 19., 2007. 4. 17., 2009. 4. 14., 2010. 4. 30., 2011. 3. 28., 2013. 2. 23.>'
제102조2항={}
제102조[제102조2항_]=제102조2항
제102조2항1호_='1. 별지 제47호서식에 의한 소득금액조정합계표'
제102조2항1호={}
제102조2항[제102조2항1호_]=제102조2항1호
제102조2항2호_='2. 별지 제48호서식에 의한 과목별 소득금액조정명세서'
제102조2항2호={}
제102조2항[제102조2항2호_]=제102조2항2호
제102조2항3호_='3. 별지 제49호서식에 의한 유보소득조정명세서'
제102조2항3호={}
제102조2항[제102조2항3호_]=제102조2항3호
제102조2항4호_='4. 별지 제50호서식에 의한 소득구분계산서'
제102조2항4호={}
제102조2항[제102조2항4호_]=제102조2항4호
제102조2항5호_='5. 별지 제51호서식에 의한 추가납부세액계산서'
제102조2항5호={}
제102조2항[제102조2항5호_]=제102조2항5호
제102조2항5_02호_='5의2. 삭제 <2010. 4. 30.>'
제102조2항5_02호={}
제102조2항[제102조2항5_02호_]=제102조2항5_02호
제102조2항6호_='6. 별지 제52호서식(1)에 따른 총수입금액 조정명세서 및 별지 제52호서식(2)에 따른 조정후 총수입금액명세서'
제102조2항6호={}
제102조2항[제102조2항6호_]=제102조2항6호
제102조2항7호_='7. 별지 제53호서식에 따른 부동산(주택 제외) 임대보증금 등의 총수입금액 조정명세서(1)ㆍ(2) 및 부동산(주택) 임대보증금 등의 총수입금액 조정명세서(3)'
제102조2항7호={}
제102조2항[제102조2항7호_]=제102조2항7호
제102조2항8호_='8. 별지 제54호서식에 의한 국고보조금ㆍ보험차익금으로 취득한 고정자산 필요경비산입조정명세서'
제102조2항8호={}
제102조2항[제102조2항8호_]=제102조2항8호
제102조2항9호_='9. 별지 제55호서식에 따른 접대비조정명세서(1)ㆍ(2).'
제102조2항9호={}
제102조2항[제102조2항9호_]=제102조2항9호
제102조2항10호_='10. 별지 제56호서식에 따른 기부금 조정명세서.'
제102조2항10호={}
제102조2항[제102조2항10호_]=제102조2항10호
제102조2항11호_='11. 삭제 <2010. 4. 30.>'
제102조2항11호={}
제102조2항[제102조2항11호_]=제102조2항11호
제102조2항12호_='12. 별지 제58호서식에 의한 대손충당금 및 대손금조정명세서'
제102조2항12호={}
제102조2항[제102조2항12호_]=제102조2항12호
제102조2항13호_='13. 별지 제59호서식에 따른 퇴직급여충당금 조정명세서.'
제102조2항13호={}
제102조2항[제102조2항13호_]=제102조2항13호
제102조2항14호_='14. 별지 제60호서식에 의한 퇴직연금부담금조정명세서'
제102조2항14호={}
제102조2항[제102조2항14호_]=제102조2항14호
제102조2항15호_='15. 삭제 <1999. 5. 7.>'
제102조2항15호={}
제102조2항[제102조2항15호_]=제102조2항15호
제102조2항16호_='16. 별지 제62호서식에 의한 재고자산평가조정명세서'
제102조2항16호={}
제102조2항[제102조2항16호_]=제102조2항16호
제102조2항17호_='17. 삭제 <1999. 5. 7.>'
제102조2항17호={}
제102조2항[제102조2항17호_]=제102조2항17호
제102조2항18호_='18. 별지 제64호서식에 의한 지급이자조정명세서(1)ㆍ(2)'
제102조2항18호={}
제102조2항[제102조2항18호_]=제102조2항18호
제102조2항19호_='19. 별지 제65호서식에 의한 외화평가차손익조정명세서'
제102조2항19호={}
제102조2항[제102조2항19호_]=제102조2항19호
제102조2항20호_='20. 별지 제66호서식에 의한 선급비용조정명세서'
제102조2항20호={}
제102조2항[제102조2항20호_]=제102조2항20호
제102조2항21호_='21. 별지 제67호서식에 의한 제세공과금조정명세서'
제102조2항21호={}
제102조2항[제102조2항21호_]=제102조2항21호
제102조2항22호_='22. 별지 제68호서식에 의한 농ㆍ어촌특별세 과세대상 감면세액 합계표'
제102조2항22호={}
제102조2항[제102조2항22호_]=제102조2항22호
제102조2항23호_='23. 별지 제69호서식에 의한 최저한세조정명세서'
제102조2항23호={}
제102조2항[제102조2항23호_]=제102조2항23호
제102조2항24호_='24. 별지 제70호서식에 의한 특별비용조정명세서'
제102조2항24호={}
제102조2항[제102조2항24호_]=제102조2항24호
제102조2항25호_='25. 별지 제71호서식에 따른 세액공제액 조정명세서'
제102조2항25호={}
제102조2항[제102조2항25호_]=제102조2항25호
제102조2항26호_='26. 삭제 <2007. 4. 17.>'
제102조2항26호={}
제102조2항[제102조2항26호_]=제102조2항26호
제102조2항27호_='27. 별지 제73호서식에 의한 감면세액조정명세서'
제102조2항27호={}
제102조2항[제102조2항27호_]=제102조2항27호
제102조2항28호_='28. 삭제 <2009. 4. 14.>'
제102조2항28호={}
제102조2항[제102조2항28호_]=제102조2항28호
제102조2항29호_='29. 삭제 <1999. 5. 7.>'
제102조2항29호={}
제102조2항[제102조2항29호_]=제102조2항29호
제102조2항30호_='30. 「조세특례제한법 시행규칙」 제61조제1항제3호의3에 따른 연구ㆍ인력개발준비금조정명세서'
제102조2항30호={}
제102조2항[제102조2항30호_]=제102조2항30호
제102조2항31호_='31. 삭제 <2009. 4. 14.>'
제102조2항31호={}
제102조2항[제102조2항31호_]=제102조2항31호
제102조2항32호_='32. 삭제 <1999. 5. 7.>'
제102조2항32호={}
제102조2항[제102조2항32호_]=제102조2항32호
제102조2항33호_='33. 삭제 <1999. 5. 7.>'
제102조2항33호={}
제102조2항[제102조2항33호_]=제102조2항33호
제102조2항34호_='34. 삭제 <1999. 5. 7.>'
제102조2항34호={}
제102조2항[제102조2항34호_]=제102조2항34호
제102조2항35호_='35. 삭제 <1999. 5. 7.>'
제102조2항35호={}
제102조2항[제102조2항35호_]=제102조2항35호
제102조2항36호_='36. 「법인세법 시행규칙」 별지 제20호서식(1), 별지 제20호서식(2) 및 별지 제20호서식(4)를 준용하여 계산한 감가상각비 관련 조정명세서.'
제102조2항36호={}
제102조2항[제102조2항36호_]=제102조2항36호
제102조2항37호_='37. 삭제 <2008. 4. 29.>'
제102조2항37호={}
제102조2항[제102조2항37호_]=제102조2항37호
제102조3항_='③법 제70조제4항제3호 단서 및 제6호에 따른 간편장부소득금액계산서 및 추계소득금액계산서는 각각 별지 제82호서식 및 별지 제82호의2서식에 의한다. 다만, 영 제143조제3항에 따라 추계소득금액을 계산하여 이 규칙 제101조제11호 단서에 따라 별지 제40호서식(1) 또는 별지 제40호서식(4)를 제출한 때에는 별지 제82호의2서식을 제출한 것으로 본다. <개정 1999. 5. 7., 2000. 4. 3., 2010. 4. 30., 2012. 2. 28.>'
제102조3항={}
제102조[제102조3항_]=제102조3항
제103조_=' 제103조 (양도소득세 관련서식) '
제103조={}
제103조['소득세법시행규칙 제103조 (양도소득세 관련서식)']={}
조문['제103조 (양도소득세 관련서식)']=제103조
조['제103조 (양도소득세 관련서식)']=제103조
제103조1항_='① 영 제155조제13항 각 호 외의 부분 전단에 따른 농어촌주택 소유자 1세대1주택 특례적용신고서는 별지 제83호서식, 영 제155조제23항 각 호 외의 부분에 따른 임대주택사업자의 거주주택 1세대1주택 특례적용신고서는 별지 제83호의2서식, 영 제155조의2제4항에 따른 장기저당담보주택에 대한 특례적용신고서는 별지 제83호의3서식, 영 제156조의2제12항에 따른 조합원입주권 소유자 1세대1주택 특례적용신고서는 별지 제83호의4서식, 영 제167조의3제7항에 따른 1세대3주택 이상자의 장기임대주택 등 일반세율 적용신청서는 별지 제83호의5서식에 따른다. <개정 2011. 12. 28., 2014. 3. 14., 2017. 3. 10.>'
제103조1항={}
제103조[제103조1항_]=제103조1항
제103조2항_='② 영 제169조제1항 각 호 외의 부분 및 제170조에 따른 양도소득과세표준예정신고및납부계산서는 별지 제84호서식 또는 별지 제84호의4서식에 따른다. <개정 2010. 4. 30., 2011. 3. 28.>'
제103조2항={}
제103조[제103조2항_]=제103조2항
제103조3항_='③영 제169조제1항제2호다목에 따른 주식거래명세서는 별지 제84호의2서식에 의한다. <신설 2000. 4. 3., 2002. 4. 13., 2008. 4. 29., 2011. 3. 28.>'
제103조3항={}
제103조[제103조3항_]=제103조3항
제103조4항_='④영 제169조제1항제2호라목에 따른 대주주신고서는 별지 제84호의3서식에 따른다. <신설 2000. 4. 3., 2002. 4. 13., 2011. 3. 28., 2014. 3. 14.>'
제103조4항={}
제103조[제103조4항_]=제103조4항
제103조5항_='⑤ 영 제173조제1항에서 규정하는 양도소득과세표준 확정신고 및 납부계산서는 별지 제84호서식 또는 별지 제84호의4서식에 따른다. <개정 2010. 4. 30.>'
제103조5항={}
제103조[제103조5항_]=제103조5항
제103조6항_='⑥영 제173조제2항제2호에 규정하는 양도소득금액계산명세서는 국세청장이 정하는 바에 의한다. <개정 2000. 4. 3.>'
제103조6항={}
제103조[제103조6항_]=제103조6항
제103조7항_='⑦ 삭제 <2016. 3. 16.>'
제103조7항={}
제103조[제103조7항_]=제103조7항
제103조8항_='⑧영 제175조의2제4항의 규정에 의한 물납신청은 별지 제86호서식에 의하며, 동조제5항의 규정에 의한 물납결정상황통지는 별지 제87호서식에 의한다. <신설 1996. 3. 30., 1997. 4. 23., 2015. 3. 13.>'
제103조8항={}
제103조[제103조8항_]=제103조8항
제103조9항_='⑨영 제178조의6제2항의 규정에 의한 국외자산 양도소득세액공제(필요경비 산입)신청서는 별지 제89호서식에 의한다. <신설 1999. 5. 7., 2015. 3. 13.>'
제103조9항={}
제103조[제103조9항_]=제103조9항
제103조10항_='⑩ 영 제178조의10에 따른 국외전출자 양도소득세 세액공제신청서는 별지 제103호서식 및 별지 제103호서식 부표에 따른다. <신설 2017. 3. 10.>'
제103조10항={}
제103조[제103조10항_]=제103조10항
제103조11항_='⑪ 영 제178조의11제1항에 따른 납세관리인신고서는 「국세기본법 시행규칙」 제33조에 따른 별지 제43호 서식을 준용하고, 국외전출자 국내주식등 보유현황 신고서는 별지 제104호서식에 따른다. <신설 2017. 3. 10.>'
제103조11항={}
제103조[제103조11항_]=제103조11항
제103조12항_='⑫ 영 제178조의11제2항 및 같은 조 제3항에 따른 양도소득과세표준 신고 및 납부계산서는 별지 제84호서식에 따른다. <신설 2017. 3. 10.>'
제103조12항={}
제103조[제103조12항_]=제103조12항
제103조13항_='⑬ 영 제178조의12제4항에 따른 납부유예신청서는 별지 제105호서식에 따른다. <신설 2017. 3. 10.>'
제103조13항={}
제103조[제103조13항_]=제103조13항
부칙['부칙 <제697호, 2018. 4. 24.']={}
부칙['제1조(시행일) 이 규칙은 공포한 날부터 시행한다']={}
부칙['제2조(서식에 관한 적용례) 별지 제63호서식의 개정규정은 이 규칙 시행 이후 종합소득과세표준을 확정신고하는 분부터 적용한다']={}
bub={'서문':서문,'조문':조문,'조별':조,'부칙':부칙}
import wx
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, parent=None, title=bubname)
self.SetSize(620, 520)
self.mainPanel = wx.Panel(self)
self.expandButton = wx.Button(self.mainPanel, label=bubname)
self.tree = wx.TreeCtrl(self.mainPanel)
root = self.tree.AddRoot(bubname)
for i in bub:
ii = self.tree.AppendItem(root, i)
for j in bub[i]:
jj = self.tree.AppendItem(ii, j)
for k in bub[i][j]:
kk = self.tree.AppendItem(jj, k)
for m in bub[i][j][k]:
mm = self.tree.AppendItem(kk, m)
for n in bub[i][j][k][m]:
nn = self.tree.AppendItem(mm, n)
for p in bub[i][j][k][m][n]:
pp = self.tree.AppendItem(nn, p)
for q in bub[i][j][k][m][n][p]:
qq=self.tree.AppendItem(pp,q)
for r in bub[i][j][k][m][n][p][q]:
rr=self.tree.AppendItem(qq,r)
for s in bub[i][j][k][m][n][p][q][r]:
ss = self.tree.AppendItem(rr, s)
for t in bub[i][j][k][m][n][p][q][r][s]:
tt = self.tree.AppendItem(ss, t)
for u in bub[i][j][k][m][n][p][q][r][s][t]:
uu = self.tree.AppendItem(tt, u)
for v in bub[i][j][k][m][n][p][q][r][s][t][u]:
vv = self.tree.AppendItem(uu, v)
self.staticText = wx.TextCtrl(self.mainPanel, style=wx.TE_MULTILINE)
self.vtBoxSizer = wx.BoxSizer(wx.VERTICAL)
self.vtBoxSizer.Add(self.expandButton, 0, wx.EXPAND | wx.ALL, 5)
self.vtBoxSizer.Add(self.tree, 5, wx.EXPAND | wx.ALL, 5)
self.vtBoxSizer.Add(self.staticText, 0, wx.EXPAND | wx.ALL, 5)
self.mainPanel.SetSizer(self.vtBoxSizer)
self.Bind(wx.EVT_BUTTON, self.OnExpandButton, self.expandButton)
self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnNodeSelected, self.tree)
self.Bind(wx.EVT_CLOSE, self.OnClose)
def OnExpandButton(self, e):
self.tree.ExpandAll()
def __del__(self):
print('소멸합니다.')
def OnClose(self, event):
frame.Destroy()
def OnNodeSelected(self, e):
selected = self.tree.GetSelection()
self.staticText.SetLabel(self.tree.GetItemText(selected))
self.mainPanel.Layout()
if __name__ == '__main__':
app = wx.App(redirect=True)
frame = MyFrame()
wnd = wx.Frame(None, wx.ID_ANY, "")
wnd.CenterOnScreen()
app.SetTopWindow(wnd)
frame.Show()
app.MainLoop()
| true |
bdd84a029a1ba79c7955ff017dfc3c4182d90ed2 | Python | chvanEyll/StrategyIA | /ai/STA/Tactic/TacticBook.py | UTF-8 | 1,213 | 2.609375 | 3 | [
"MIT"
] | permissive | # Under MIT License, see LICENSE.txt
from .GoGetBall import GoGetBall
from .ProtectGoal import GoalKeeper
from .GoToPosition import GoToPosition
from .RotateAroundBall import RotateAroundBall
from .Stop import Stop
from .ProtectZone import ProtectZone
from .DemoFollowBall import DemoFollowBall
from .GoToPositionNoPathfinder import GoToPositionNoPathfinder
class TacticBook(object):
def __init__(self):
self.tactic_book = {'GoToPosition': GoToPosition,
'GoalKeeper': GoalKeeper,
'CoverZone': ProtectZone,
'GoGetBall': GoGetBall,
'DemoFollowBall': DemoFollowBall,
'Stop': Stop,
'GoStraightTo': GoToPositionNoPathfinder}
def get_tactics_name_list(self):
return list(self.tactic_book.keys())
def check_existance_tactic(self, tactic_name):
assert isinstance(tactic_name, str)
return tactic_name in self.tactic_book
def get_tactic(self, tactic_name):
if self.check_existance_tactic(tactic_name):
return self.tactic_book[tactic_name]
return self.tactic_book['Stop']
| true |
1ab4f1a441d9df8164b7fc8b289774bd6097dbc4 | Python | m1478/TestPartageMehdi | /main.py | UTF-8 | 809 | 2.75 | 3 | [] | no_license | # -*-coding: utf-8 -*-
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import NumericProperty, ReferenceListProperty, ObjectProperty
from random import randint
class JeuPerles(Widget):
perleVoyA = ObjectProperty(None)
perleVoyB = ObjectProperty(None)
#def on_touch_move(self, touch):
# self.perleVoyA.center = touch.pos
class Perle(Widget):
def __init__(self, voy):
voyelle = voy
def on_touch_move(self, touch):
#if touch.y > self.height/2:
self.center = touch.pos
#if touch.y < self.height/2:
# self.perleVoyB.center = touch.pos
class PerlesApp(App):
def build(self):
jeuP = JeuPerles()
#Clock.schedule_interval(jeuP.update, 1.0/60.0
return jeuP
if __name__ == '__main__':
PerlesApp().run()
| true |
7b7aecd7535bfe28f1ab9db8d86bc1862e463642 | Python | skd1729/Project-Euler-Solutions | /014.py | UTF-8 | 179 | 2.890625 | 3 | [] | no_license | le = [0]
for x in range(2,1000001):
t= x
c = 0
while t!=1:
if t%2 == 0:
t=t/2
else:
t = 3*t+1
c = c+1
if le[0] < c:
f=[x]
le[0] = c
print f
| true |
e7f378ded1e408c781756138b710c1e3452c9bf6 | Python | by-student-2017/DFTBaby-0.1.0-31Jul2019 | /DFTB/SlaterKoster/plot_pseudoatoms.py | UTF-8 | 2,286 | 2.78125 | 3 | [] | no_license | #!/usr/bin/env python
"""
plot radial wave functions of pseudo orbitals. You need to check that
the radial grid is large enough so that the tails of all orbitals decay to
zero.
"""
from numpy import *
from matplotlib.pyplot import *
import os.path
from DFTB import utils
from DFTB import AtomicData
def plot_pseudoatom(atom, pngfile, elmfile=None):
"""
plot all radial functions associated with a pseudo atom
and save the plot to a png-file
Parameters:
===========
atom: atom module, as written by generate_pseudoatoms.py
pngfile: file name
elmfile (optional): path to a hotbit .elm file with orbitals,
corresponding orbitals from the .elm file will be plotted
as dotted lines for comparison
"""
if elmfile != None:
from hotbit_format import parseHotbitParameters
hbdata = parseHotbitParameters(elmfile)
cla()
title("Z = %s, Nelec = %s" % (atom.Z, atom.Nelec))
xlabel("r / bohr", fontsize=15)
print "Atom %s" % AtomicData.atom_names[atom.Z-1]
print "========"
for i,orb_name in enumerate(atom.orbital_names):
print "Orbital %s: %s %s" % (orb_name, \
("%2.5f Hartree" % atom.energies[i]).rjust(15), \
("%2.5f eV" % (atom.energies[i]*AtomicData.hartree_to_eV)).rjust(20))
plot(atom.r, atom.radial_wavefunctions[i], lw=2.5, label="%s en=%s" % (orb_name, atom.energies[i]))
# compare with hotbit
if elmfile != None and hbdata.has_key("radial_wavefunction_%s" % orb_name):
ru = hbdata["radial_wavefunction_%s" % orb_name]
en = hbdata["orbital_energy_%s" % orb_name]
plot(ru[:,0], ru[:,1], ls="-.", label="%s en=%s (unconfined)" % (orb_name, en))
legend()
show()
# savefig(pngfile)
if __name__ == "__main__":
if len(sys.argv) < 2:
print "Usage: python %s <pseudo atom module>.py [<.elm file for comparison>]" % sys.argv[0]
print "Plots the atomic orbitals of a pseudo atom."
exit(-1)
modfile = sys.argv[1]
if len(sys.argv) > 2:
elmfile = sys.argv[2]
else:
elmfile = None
mod = utils.dotdic()
execfile(modfile, mod)
plot_pseudoatom(mod, "/tmp/%s.png" % AtomicData.atom_names[mod.Z-1], elmfile)
| true |
c5e36b4bef9aa05285699889b2f5f2edb3dc94c5 | Python | torryt/polyaco-plus | /acoc/ant.py | UTF-8 | 1,191 | 2.6875 | 3 | [] | no_license | from copy import copy
import numpy as np
from numpy.random.mtrand import choice
from utils import normalize
from acoc.edge import Edge
class Ant:
def __init__(self, start_vertex):
self.start_vertex = start_vertex
self.prev_edge = None
self.current_vertex = start_vertex
self.edges_travelled = []
self.is_stuck = False
self.at_target = False
def move_ant(self):
available_edges = [ce for ce in self.current_vertex.connected_edges if ce is not None]
if self.prev_edge:
available_edges.remove(self.prev_edge)
[available_edges.remove(e) for e in available_edges if e in self.edges_travelled]
if len(available_edges) == 0 or len(self.edges_travelled) > 10000:
self.is_stuck = True
return
weights = normalize(np.array([e.pheromone_strength for e in available_edges]))
edge = choice(available_edges, p=weights)
self.current_vertex = edge.a if self.current_vertex != edge.a else edge.b
self.edges_travelled.append(edge)
self.prev_edge = edge
if self.current_vertex == self.start_vertex:
self.at_target = True
| true |
2efa747557339012be9ac78f500a217d49f3627c | Python | sosnus/py | /Python/py5tut/pyqt5_simple_window.py | UTF-8 | 434 | 2.96875 | 3 | [] | no_license | import sys
from PyQt5 import QtWidgets
from PyQt5 import QtGui
# funkcja tworząca okno
def window():
app = QtWidgets.QApplication(sys.argv)
w = QtWidgets.QMainWindow()
w.setWindowTitle("Nazwa")
w.setWindowIcon(QtGui.QIcon('calc-w7.png'))
w.setGeometry(100,100,300,300)
b = QtWidgets.QPushButton(w)
b.setText("Push me")
w.show()
sys.exit(app.exec_())
# wywołujemy funkcję budującą
window()
| true |
2e39c3e2fbd7f95b5e5225cb974e2eeb6305478c | Python | zephyr123/blibli | /book/p10/p10_9.py | UTF-8 | 185 | 3.109375 | 3 | [] | no_license | filenames = ['cats.txt', 'dogs.txt']
for filename in filenames:
try:
with open(filename) as f_obj:
print(f_obj.read())
except FileNotFoundError:
pass | true |
061566f0bc7289c2c6e90181ec03753afee86b71 | Python | MMohan1/eueler | /isoscale.py | UTF-8 | 235 | 3.171875 | 3 | [] | no_license | def fibbonic(n=15):
a = 1
b = 1
count = 2
while count < n:
c = a+b
a,b = b,c
count += 1
return c
def isoscale():
print sum([fibbonic(6*n+3)/2 for n in range(1,13)])
if __name__ == '__main__':
#fibbonic()
isoscale()
| true |
2a9305b9b69dd63d8b35840d51e59e099823ce44 | Python | GouravSardana/chat-room | /clientServer.py | UTF-8 | 1,458 | 2.84375 | 3 | [] | no_license | import socket
import tkinter
import threading
host=input("Enter host: ")
port=input("Enter port: ")
if not port:
port=33000
else:
port=int(port)
buff=1024
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
def receive():
while True:
try:
msg=s.recv(buff).decode("utf-8")
msg_list.insert(tkinter.END, msg)
except OSError:
break
def send(event=None):
msg =my_msg.get()
my_msg.set("")
s.send(bytes(msg, "utf-8"))
if msg== "{quit}":
s.close()
top.quit()
def close():
s.close()
top.destroy()
exit()
top=tkinter.Tk()
top.title("Private Chat Room")
msg_frame = tkinter.Frame(top)
my_msg = tkinter.StringVar()
my_msg.set("Type your name here")
scrollbar=tkinter.Scrollbar(msg_frame)
msg_list=tkinter.Listbox(msg_frame, height=30, width=100, yscrollcommand=scrollbar.set)
scrollbar.pack(side=tkinter.RIGHT, fill=tkinter.Y)
msg_list.pack(side=tkinter.LEFT, fill = tkinter.BOTH)
msg_list.pack()
msg_frame.pack()
entry_field=tkinter.Entry(top, textvariable=my_msg)
entry_field.bind("<Return>", send)
entry_field.pack()
send_button= tkinter.Button(top, text="Send", command=send)
quit_button=tkinter.Button(top, text="QUIT",fg="Black", bg="Red", command=close)
send_button.pack()
quit_button.pack()
receive_thread=threading.Thread(target=receive)
receive_thread.start()
tkinter.mainloop() | true |
2d2d302eb0057332b31161b6ad42f9a278de3ffa | Python | Albatrossiun/GraduateCode1 | /CCDC.py | UTF-8 | 1,786 | 3.328125 | 3 | [] | no_license | import numpy as np
import matplotlib.pyplot as plt
def TestZGS():
Y = [1.12, 2.04, 2.98, 3.82]
X = Y.copy()
index = []
Err = []
for i in range(100):
index.append(i)
Err.append([(2.49-X[0])**2,(2.49-X[1])**2,(2.49-X[2])**2,(2.49-X[3])**2])
XX = X.copy()
print(XX)
X[0] = 0.15*(0.5*(XX[1]-XX[0]))+XX[0]
X[1] = 0.15*(0.5*(XX[2]-XX[1]))+XX[1]
X[2] = 0.15*(0.5*(XX[3]-XX[2]))+XX[2]
X[3] = 0.15*(0.5*(XX[0]-XX[3]))+XX[3]
plt.plot(index, Err)
plt.show()
def TestZGS_1():
Y = [0.6, 3.5, 7, 2, 0.1]
X = Y.copy()
index = []
#Err = []
Err_0 = []
Err_1 = []
Err_2 = []
Err_3 = []
Err_4 = []
for i in range(100):
index.append(i)
Err_0.append((2.64 - X[0]) ** 2)
Err_1.append((2.64 - X[1]) ** 2)
Err_2.append((2.64 - X[2]) ** 2)
Err_3.append((2.64 - X[3]) ** 2)
Err_4.append((2.64 - X[4]) ** 2)
#Err.append([(3.69-X[0])**2,(3.69-X[1])**2,(3.69-X[2])**2,(3.69-X[3])**2,(3.69-X[4])**2])
XX = X.copy()
print(XX)
X[0] = 1.5*(0.5*(XX[1]-XX[0]))+XX[0]
X[1] = 1.5*(0.5*((XX[2]-XX[1]) + (XX[3]-XX[1])))+XX[1]
X[2] = 1.5*(0.5*((XX[0]-XX[2]) + (XX[1]-XX[2])))+XX[2]
X[3] = 1.5*(0.5*(XX[4]-XX[3]))+XX[3]
X[4] = 1.5*(0.5*(XX[2]-XX[4]))+XX[4]
plt.plot(index, Err_0, label='sum(|x*-x0(K)|^2)')
plt.plot(index, Err_1, label='sum(|x*-x1(K)|^2)')
plt.plot(index, Err_2, label='sum(|x*-x2(K)|^2)')
plt.plot(index, Err_3, label='sum(|x*-x3(K)|^2)')
plt.plot(index, Err_4, label='sum(|x*-x4(K)|^2)')
plt.legend(loc='upper right')
plt.xlabel('iterations times(k)')
plt.ylabel('Err')
plt.show()
if __name__ == '__main__':
TestZGS_1() | true |
798f0fffe2c6454d2017864bdd7a5f70d6b7ce7e | Python | jody-frankowski/42 | /corewar/vm/integration-tests/generator.py | UTF-8 | 3,243 | 2.828125 | 3 | [] | no_license | #!/usr/bin/env python3
import os
COREWAR_MAGIC = bytearray.fromhex("00ea83f3")
def header(
magic: bytearray,
name: bytearray,
size: bytearray,
comment: bytearray
) -> bytearray:
"""
Construct a bytearray that represents a corewar binary header.
"""
header = bytearray()
header.extend(magic)
header.extend(name)
header.extend(size)
header.extend(comment)
# Does not need to be zero (see generate_non_null_header_padding_bytes)
header.extend(bytes(b'\x00\x00\x00\x00'))
return header
def name(name: str) -> bytearray:
"""
Transform a string to a bytearray, and fill it up to the required size of a
name field in a corewar binary header.
"""
name = bytearray(name, 'utf-8')
if len(name) < 128:
name.extend(b'N' * 128)
name = name[0:128]
return name
def comment(comment: str) -> bytearray:
"""
Transform a string to a bytearray, and fill it up to the required size of a
comment field in a corewar binary header.
"""
comment = bytearray(comment, 'utf-8')
if len(comment) < 2048:
comment.extend(b'C' * 2048)
comment = comment[0:2048]
return comment
def size(size: int) -> bytes:
"""
Transform an integer to a bytearray of the required size of the program size
field in a corewar binary header.
"""
return size.to_bytes(8, 'big')
def write_file(filename: str, data: bytearray):
"""
Write data to a file.
"""
os.makedirs(os.path.dirname(filename), exist_ok=True)
file = open(filename, "wb")
file.write(data)
# Errors
def generate_program_size_not_equal_to_real_size(test_name: str):
output = header(
COREWAR_MAGIC,
name("NAME"),
size(3),
comment("COMMENT")
)
write_file(test_name, output)
# Not Errors
def generate_program_size_equals_zero(test_name: str):
output = header(
COREWAR_MAGIC,
name("NAME"),
size(0),
comment("COMMENT")
)
write_file(test_name, output)
def generate_non_zero_acb(test_name: str):
output = header(
COREWAR_MAGIC,
name("NAME"),
size(3),
comment("COMMENT")
)
# aff r1
# Should be 10 40 01
# Web put 10 7f 01 instead
output.extend(bytes([0x10, 0b01111111, 0x01]))
write_file(test_name, output)
def generate_null_byte_in_comment(test_name: str):
output = header(
COREWAR_MAGIC,
name("NAME"),
size(0),
b'\x41\x00' * 1024
)
write_file(test_name, output)
def generate_null_byte_in_name(test_name: str):
output = header(
COREWAR_MAGIC,
b'\x41\x00' * 64,
size(0),
comment("COMMENT"),
)
write_file(test_name, output)
def generate_non_null_header_padding_bytes(test_name: str):
output = header(
COREWAR_MAGIC,
name("NAME"),
size(0),
comment("COMMENT"),
)
output = output[:-4]
output.extend(b'\xff\xff\xff\xff')
write_file(test_name, output)
if __name__ == "__main__":
# Errors
generate_program_size_not_equal_to_real_size(
"errors/program_size_not_equal_to_real_size.cor"
)
# Not Errors
generate_program_size_equals_zero(
"not-errors/program_size_equals_zero.cor"
)
generate_non_zero_acb(
"not-errors/non_zero_acb.cor"
)
generate_null_byte_in_comment(
"not-errors/null_byte_in_comment.cor"
)
generate_null_byte_in_name(
"not-errors/null_byte_in_name.cor"
)
generate_non_null_header_padding_bytes(
"not-errors/non_null_header_padding_bytes.cor"
)
| true |
a1f2d2cccc024f865262b13accf90580d381b5cb | Python | MukundhBhushan/micro-workshop | /tectpy/pyeg/formating.py | UTF-8 | 263 | 3.921875 | 4 | [] | no_license | print('I love {0} and {1}'.format('bread','butter'))
# Output: I love bread and butter
print('I love {1} and {0}'.format('bread','butter'))
# Output: I love butter and bread
x = 12.3456789
print('The value of x is %3.2f' %x)
print('The value of x is %3.4f' %x)
| true |
f5cad4e1b7ee463e7277a4d880e8736203b9d35d | Python | aiacov02/BitcoinAnalysis | /PartC/PricePrediction.py | UTF-8 | 3,683 | 2.6875 | 3 | [] | no_license | from pyspark import SparkConf, SparkContext, SQLContext
import warnings
warnings.filterwarnings('ignore')
import pandas as pd
import pyspark as spark
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics import mean_squared_error
from pyspark.sql.types import *
from sklearn.preprocessing import MinMaxScaler
from sklearn import preprocessing
from sklearn import cross_validation
from sklearn.model_selection import KFold
from pyspark.ml.feature import VectorAssembler
from pyspark.ml.regression import LinearRegression, RandomForestRegressor
from pyspark.ml.evaluation import RegressionEvaluator
from pyspark.sql.types import DateType
from sklearn.ensemble import RandomForestRegressor
from pyspark.sql.functions import udf
from pyspark.sql.types import StringType
from pyspark.sql.functions import from_unixtime
from pyspark.sql.functions import mean
from pyspark.sql.functions import lag, col
from pyspark.sql.window import Window
from pyspark.ml import Pipeline
sc = SparkContext()
sql = spark.SQLContext(sc)
# load data into dataframe
bit_df = sql.read.format('com.databricks.spark.csv').options(header='true', inferschema='true').load('input/bitstamp.csv')
# drop null values
bit_df = bit_df.na.drop()
# rename some columns
bit_df = bit_df.withColumnRenamed('Volume_(BTC)', 'Volume_BTC').withColumnRenamed('Volume_(Currency)', 'Volume_Currency')
# group all rows by date and calculate daily averages for each column
bit_df = bit_df.groupBy(from_unixtime("Timestamp", "yyyy-MM-dd").alias("Date")).agg(mean('Open').alias('Open'),
mean('High').alias('High'), mean('Low').alias('Low'), mean('Close').alias('Close'),
mean('Volume_BTC').alias('Volume_BTC'), mean('Volume_Currency').alias('Volume_Currency'), mean("Weighted_Price").alias("Weighted_Price"))
# set a window to order by Date
w = Window().partitionBy().orderBy(col("Date"))
# Copy the value of the Close field into the Price_After_Month field, 30 lines above
bit_df = bit_df.withColumn("Price_After_Month", lag("Close", -30, 'NaN').over(w))
# drop null rows
bit_df = bit_df.na.drop()
# vectorize the data
vectorAssembler = VectorAssembler(inputCols=['Open', 'High', 'Low', 'Close', 'Volume_BTC', 'Volume_Currency', 'Weighted_Price'], outputCol='features')
# vectorAssembler = VectorAssembler(inputCols=['DayMeanPrice'], outputCol='features')
vbit_df = vectorAssembler.transform(bit_df)
# split into train and test set. 70% train and 30% test
splits = vbit_df.randomSplit([0.7, 0.3])
train_df = splits[0]
test_df = splits[1]
# train the Linear Regression Model
lr = LinearRegression(featuresCol='features', labelCol='Price_After_Month', maxIter=1000, regParam=0.3, elasticNetParam=0.8)
lr_model = lr.fit(train_df)
print("Coefficients: " + str(lr_model.coefficients))
print("Intercept: " + str(lr_model.intercept))
trainingSummary = lr_model.summary
print("RMSE: %f" % trainingSummary.rootMeanSquaredError)
print("r2: %f" % trainingSummary.r2)
train_df.describe().show()
# perform prediction on test data
lr_predictions = lr_model.transform(test_df)
lr_predictions.select("prediction", "Price_After_Month", "features").show(5)
lr_evaluator = RegressionEvaluator(predictionCol="prediction", labelCol="Price_After_Month", metricName="r2")
print("R Squared (R2) on test data = %g" % lr_evaluator.evaluate(lr_predictions))
test_result = lr_model.evaluate(test_df)
print("Root Mean Squared Error (RMSE) on test data = %g" % test_result.rootMeanSquaredError)
# perform prediction on test data
predictions = lr_model.transform(test_df)
predictions = predictions.select("Date", "prediction", "Price_After_Month")
predictions.write.option("header", "true").csv('out/predictions')
| true |
e9629d6ada91953ed3ebefcf902aaa509187fc4c | Python | ragibayon/Toph-Solution | /Little Subarray Sum.py | UTF-8 | 269 | 2.984375 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 4 00:09:45 2020
@author: Ragib Shahariar Ayon
"""
input_string=input()
input_string2=input()
N,A,B=input_string.split()
list1=input_string2.split()
total=0
for item in list1[int(A):(int(B)+1)]:
total+=int(item)
print(total)
| true |
aa8af740b22c58dffef8316eb0f72bf872e94035 | Python | EulerMagno/Python_Excel | /Python/concatenandoPlanilhas.py | UTF-8 | 446 | 2.953125 | 3 | [] | no_license | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
arquivo_excel_1 = 'pedido1.xlsx'
arquivo_excel_2 = 'pedido2.xlsx'
df_419A = pd.read_excel(arquivo_excel_1)
df_420A = pd.read_excel(arquivo_excel_2)
df_todas = pd.concat([df_419A,df_420A])
df_todas.to_excel('concatenado.xlsx')
print(df_todas)
aluminio = df_todas.groupby(['alumínio']).sum()
print(aluminio)
aluminio.plot(kind='bar')
plt.show()
| true |
5f6bf6c57aefaf6aabab1ed981af1eb5f36a0d89 | Python | feipengsy/arbiter | /Core/Workflow/Utilities/other.py | UTF-8 | 4,555 | 2.640625 | 3 | [] | no_license | import random
import re
class other:
def __init__( self, parameters = None ):
self.ParametersDict = {}
self.ParametersDict['input'] = []
self.ParametersDict['output'] = []
self.ParametersDict['table'] = ''
self.optionTemplet = ''
self.parametersList = parameters
self.subJobCount = 1
def resolveParametersList( self ):
if self.parametersList != None:
for parameter in self.parametersList:
name = parameter.getName()
value = parameter.getValue()
if name == 'optionTemplet':
self.optionTemplet = value
if name == 'input':
self.ParametersDict['input'] = value
if name == 'output':
if value[-1] == '/':
self.ParametersDict['output'] = value
else:
self.ParametersDict['output'] = value + '/'
if name == 'count':
self.subJobCount = value
if name == 'table':
self.ParametersDict['table'] = value
return True
def toTXT( self ):
result = self.resolveParametersList()
if result:
#read job-option templet
f = open( self.optionTemplet, 'r' )
optionString = f.read()
f.close()
#generate input string
inputString = ''
for inputFile in self.ParametersDict['input']:
inputString = inputString + '"' + inputFile + '",'
inputString = inputString[:-1]
#generate output string
if self.ParametersDict['input']:
if len( self.ParametersDict['input'] ) == 1:
outputString = self.ParametersDict['input'][0]
outTempList = outputString.split( '/' )
outputString = outTempList[-1]
outTempList = outputString.split( '.' )
outputString = outTempList[0]
else:
outputString = ''
else:
outputString = ''
#generate table string
outputDirectory = ''
if self.ParametersDict['output']:
outputDirectory = self.ParametersDict['output']
tableString = ''
if self.ParametersDict['table']:
tableString = self.ParametersDict['table']
"""
# input assignment
startIndex = optionString.find( 'RawDataInputSvc.InputFiles' )
if startIndex != -1:
endIndex = optionString.find( ';', startIndex)
optionString.replace( optionString[startIndex:endIndex], 'RawDataInputSvc.InputFiles={' + inputString +'}' )
startIndex = optionString.find( 'EventCnvSvc.digiRootInputFile' )
if startIndex != -1:
endIndex = optionString.find( ';', startIndex)
optionString.replace( optionString[startIndex:endIndex], 'EventCnvSvc.digiRootInputFile={' + inputString +'}' )
"""
# i/o assignment
optionString = optionString.replace( '"#INPUT"', inputString )
optionString = optionString.replace( '#INPUT', inputString )
optionString = optionString.replace( '#OUTPUT', outputString )
optionString = optionString.replace( '#NUMBER', str(self.subJobCount) )
optionString = optionString.replace( '#RANDOM', str(random.randint(1000,9999)) )
if tableString:
pat = re.compile( '(EvtDecay.userDecayTableName.*".*".*;)' )
if pat.search( optionString ):
optionString = optionString.replace( pat.search( optionString ).groups()[0], 'EvtDecay.userDecayTableName="' + tableString + '";' )
pat = re.compile( '(RootCnvSvc.digiRootO[uU]tputFile *=.*)\n' )
if pat.search( optionString ):
ostring = pat.search( optionString ).groups()[0]
# strip all the space quotes
nstring = ostring.replace( ' ', '' )
nstring = nstring.replace( '"', '' )
nstring = nstring.replace( "'", '' )
nstring = nstring.replace( ";", '' )
# add the output directory
if outputDirectory:
nstring = nstring.replace( 'putFile=', 'putFile=' + outputDirectory )
# add the quotes
nstring = nstring.replace( 'putFile=', 'putFile="' )
nstring = nstring + '"'
# add the semicolon
nstring = nstring + ';'
# get the output
pat = re.compile( 'RootCnvSvc.digiRootO[uU]tputFile="(.*)";' )
outputFile = pat.search( nstring ).groups()[0]
optionString = optionString.replace( ostring, nstring )
return ( self.ParametersDict['input'], outputFile, optionString )
def toTXTFile( self, filename ):
f = open( filename, 'w+')
inputList, outputFile, ret = self.toTXT()
f.write( ret )
f.close()
return ( inputList, outputFile, filename )
| true |
9cbebf4a8e0788a846eaf896a66d867c3a8d52c1 | Python | arthur-bryan/python-data-structures | /queue/questao2.py | UTF-8 | 526 | 3.875 | 4 | [] | no_license | # -*- coding: utf-8 -*-
from queue import Queue
from stack import Stack
pilha_s = Stack()
# Alimentando a pilha:
for _ in range(4):
elemento = input("Adicione algo à pilha: ")
pilha_s.push(elemento)
# Invertendo a pilha com uma fila:
fila = Queue()
for _ in range(len(pilha_s)):
fila.insert(pilha_s.pop())
# Nova pilha com valores invertidos
pilha_invertida = Stack()
for _ in range(len(fila)):
pilha_invertida.push(fila.remove())
# Mostra nova pilha com os valores da primeira invertidos.
print(pilha_invertida)
| true |
4ecd714eafe6297910121451710598060d8041d8 | Python | peiyong86/ML_practice | /src/DecisionTrees/trees.py | UTF-8 | 2,454 | 2.96875 | 3 | [] | no_license | #!/usr/bin/env python
from .ops import cal_max_gain, most_common, get_subset
from .data_types import TreeNode
import numpy as np
__author__ = "Yong Pei"
class TreeC3:
def __init__(self):
self.__name__ = 'C3'
self.tree_node = None
def fit(self, X, Y, weights=None):
def build_tree(x, y, weights):
# if all labels are same, return
labels = set(y)
if len(labels) == 1:
return TreeNode(list(labels)[0])
size = len(y)
# if set size < 50, return
if size <= 50:
return TreeNode(most_common(y))
# pick feature
fea_num = x.shape[1]
info_gains = []
for i in range(fea_num):
info_gain = cal_max_gain(x, y, i, weights)
info_gains.append(info_gain)
picked = max(info_gains, key=lambda x: x[0])
picked_a = info_gains.index(picked)
t = picked[1]
# build tree
node = TreeNode({'feature': picked_a, 't': t})
left_x, left_y, right_x, right_y, left_weights, right_weights = \
get_subset(x, y, picked_a, t, weights)
node.left = build_tree(left_x, left_y, left_weights)
node.right = build_tree(right_x, right_y, right_weights)
return node
if weights is None:
weights = np.array([1.0]*len(X))
assert len(weights) == len(X)
self.tree_node = build_tree(X, Y, weights)
def display(self):
if not self.tree_node:
print("Tree not trained.")
return
stack = [self.tree_node]
tree_values = []
while stack:
values = [node.val for node in stack]
tree_values.append(values)
stack = [child for node in stack
for child in [node.left, node.right]
if child is not None]
print(tree_values)
def inference(self, node, x):
val = node.val
if isinstance(val, float):
return val
else:
a = val['feature']
t = val['t']
if x[a] > t:
return self.inference(node.right, x)
else:
return self.inference(node.left, x)
def predict(self, X):
pred = []
for x in X:
pred.append(self.inference(self.tree_node, x))
return pred
| true |
e0dcb78b439aa054f02b6121aa3176c7e9ec45ef | Python | alegis277/YurlyFinance | /loadStock.py | UTF-8 | 1,343 | 2.640625 | 3 | [] | no_license | import pandas as pd
import numpy as np
stock = {"CONCONCRET": [2175, 484], "PFAVAL": [648, 1172], "PFDAVVNDA": [16, 31360],
"PFBCOLOM": [33, 30630], "CEMARGOS": [183, 5470], "CNEC": [73, 10400]}
XLS_FILE = "https://www.bvc.com.co/mercados/DescargaXlsServlet?archivo=acciones&resultados=100"
df = pd.read_excel(XLS_FILE, header = 1)
df['Nemotecnico'] = df['Nemotecnico'].apply(lambda x: x.strip())
print("\nVARIATION IN EACH SHARE FROM BUY PRICE\n")
totalPortfolioOriginal = 0
totalPortfolioCurrent = 0
for key, value in stock.items():
stringToPrint = key + ": "
stringToPrint += str(float(value[1])) + " -> " + str(float(df.loc[df["Nemotecnico"] == key, "Ultimo Precio"]))
diffPrice = float(df.loc[df["Nemotecnico"] == key, "Ultimo Precio"]) - float(value[1])
stringToPrint += " (" + ("+" if diffPrice>=0 else "-") + str(np.abs(diffPrice)) + ")"
totalPortfolioOriginal += float(value[1] * value[0])
totalPortfolioCurrent += float(df.loc[df["Nemotecnico"] == key, "Ultimo Precio"] * value[0])
print(stringToPrint)
print("\nVARIATION IN PORTFOLIO\n")
stringToPrint = f'{totalPortfolioOriginal:,}' + " -> " + f'{totalPortfolioCurrent:,}'
diffPrice = totalPortfolioCurrent - totalPortfolioOriginal
stringToPrint += " (" + ("+" if diffPrice>=0 else "-") + f'{float(np.abs(diffPrice)):,}' + ")"
print(stringToPrint + "\n")
| true |
e25b7a6f05cfde3c8cf8c1773d62a2f0d11528df | Python | IPHC/FrameworkLegacy | /marco/harvest.py | UTF-8 | 7,179 | 2.875 | 3 | [] | no_license | #! /usr/bin/env python
import sys
import os
import commands
class DateType:
months = {"Jan" : 1, "Feb" : 2, "Mar" : 3, "Apr" : 4, \
"May" : 5, "Jun" : 6, "Jul" : 7, "Aug" : 8, \
"Sep" : 9, "Oct" : 10, "Nov" : 11, "Dec" : 12 }
def __init__(self):
self.month = 0
self.day = 0
self.hour = 0
self.min = 0
def value(self):
return self.month*1000000 + self.day*10000 + self.hour*100 + self.min*1
@staticmethod
def string2int(word):
if word in DateType.months:
return DateType.months[word]
return 0
def Help():
print "The correct syntax is :"
print "./harvest.py <minitree/ntuple> <folder on dpm/castor containing the samples> <output file>"
def Execute(pattern,folder,output):
print "====================================================================="
print " Looking for NTuples in the folder : " + folder
print "====================================================================="
# Dump content of the folder in log file
os.system("rfdir "+folder+" >& harvest.tmp~")
# Open the log file
try:
input = open("harvest.tmp~")
except :
print "ERROR : file called 'harvest.tmp~' is not found"
return
# Loop over the log file
files = []
nums = []
sizes = []
dates = []
for lines in input:
# Error : folder not found ?
if "No such file or directory" in lines:
print "ERROR : folder called '" + folder + "' is not found"
return
# Treat lines
lines = lines.lstrip()
lines = lines.split()
# Reject
if len(lines)<9:
continue
# Get MiniTree/Ntuple
if lines[8].startswith(pattern):
files.append(lines[8])
name = lines[8].replace("_"," ")
name = name.split()
try:
num = int(name[1])
except:
print "ERROR : cannot extract job number from " + lines[8]
return
nums.append(num)
sizes.append(int(lines[4]))
date = DateType()
date.month = DateType.string2int(lines[5])
date.day = int(lines[6])
time = lines[7].split(':')
date.hour = int(time[0])
date.min = int(time[1])
dates.append(date)
# Print number of files
print " Nb files = " + str(len(files))
if len(files)==0:
print " Nothing to do !"
return
# Get the first and last job number
numfirst=nums[0]
numlast=nums[0]
for i in range(0,len(files)):
if nums[i]<numfirst:
numfirst=nums[i]
if nums[i]>numlast:
numlast=nums[i]
print " First job number = " + str(numfirst) + " ; " +\
"Last job number = "+ str(numlast)
# Print size
average=0
minsize=sizes[0]
maxsize=sizes[0]
for i in range(0,len(files)):
average += sizes[i]
if sizes[i]<minsize:
minsize=sizes[i]
if sizes[i]>maxsize:
maxsize=sizes[i]
average /= len(files)
print " File Size (Mo) : average = " + str(average/1e6) + " ; min = " \
+ str(minsize/1e6) + " ; max = " + str(maxsize/1e6)
# Check job num
missing=[]
nduplicates=0
for i in range(numfirst,numlast+1):
entry=[]
for j in range(0,len(nums)):
if i==nums[j]:
entry.append(j)
if len(entry)==0:
missing.append(i)
elif len(entry)>1:
nduplicates+=1
print "ERROR : several files have the same numbers : "
for item in entry:
print " - '" + files[item] + "'"
print " Should first file be removed ? (Y/N)"
allowed_answers=['n','no','y','yes']
answer=""
while answer not in allowed_answers:
answer=raw_input(" Answer : ")
answer=answer.lower()
if answer=="yes" or answer=="y":
nduplicates-=1;
os.system("rfrm " + folder + "/" + files[ entry[0] ] )
print " file '" + files[ entry[0] ] +"' removed"
if(nduplicates>0):
print " Still duplicates. (" + str(nduplicates) + ")"
return
else:
print " No Duplicates found !"
if len(missing)==0:
print " All jobs are found !"
else:
print "WARNING : jobs number '" + ",".join(map(str,missing)) + "' are missed"
# Confirmation
print "====================================================================="
print " Are you sure to copy all files in '" + output + "_tmp_harvest' folder and to merge files into '" + output + ".root' ? (Y/N)"
allowed_answers=['n','no','y','yes']
answer=""
while answer not in allowed_answers:
answer=raw_input(" Answer : ")
answer=answer.lower()
if answer=="no" or answer=="n":
return
# Check output file exist
if os.path.isfile(output+".root"):
print " A file called '" + output + ".root' is found. Would you like to remove it ? (Y/N)"
answer=""
while answer not in allowed_answers:
answer=raw_input(" Answer : ")
answer=answer.lower()
if answer=="no" or answer=="n":
return
os.system("rm -f " + output + ".root")
# Check temporary dir exist
if os.path.isdir(output+"_tmp_harvest"):
print " A dir called '" + output + "_tmp_harvest' is found. Would you like to remove it ? (Y/N)"
answer=""
while answer not in allowed_answers:
answer=raw_input(" Answer : ")
answer=answer.lower()
if answer=="no" or answer=="n":
return
os.system("rm -rf " + output + "_tmp_harvest")
# Merging
print " Copying to the local disk ..."
os.system("mkdir "+output+"_tmp_harvest")
for i in range(0,len(files)):
print "====================================================================="
print " " + str(i+1) + "/" + str(len(files)) + " : copying file '" + files[i] + "' ..."
print ""
os.system("lcg-cp -v srm://sbgse1.in2p3.fr/" + folder + "/" + files[i] + " " + output + "_tmp_harvest/" + files[i])
print " Merging ..."
os.system("hadd " + output + ".root " + output + "_tmp_harvest/*")
print " Done."
print " Please, do not forget to remove the temporary folder '" + output + "_tmp_harvest'"
# Check number of arguments
if len(sys.argv)<4:
print "Error : wrong number of arguments"
Help()
else:
folder = sys.argv[2]
output = sys.argv[3]
#check output name
if not output.endswith(".root"):
print "Error: output file name must end by '.root'"
Help()
else:
output = output[:-5]
if sys.argv[1]=="ntuple":
Execute("NTuple",folder,output)
elif sys.argv[1]=="minitree":
Execute("patTuple",folder,output)
else:
print "Error : the only format is 'ntuple' or 'minitree'"
| true |
470543e4625aff4f2aeb99636a0880821f36f7ac | Python | WaltXin/PythonProject | /Dijkstra_shortest_path_Heap/Dijkstra_shortest_path_Heap.py | UTF-8 | 2,719 | 3.859375 | 4 | [] | no_license | from collections import defaultdict
def push(heap, item):
"""Push item onto heap, maintaining the heap invariant."""
heap.append(item)
shiftup(heap, 0, len(heap)-1)
def pop(heap):
"""Pop the smallest item off the heap, maintaining the heap invariant."""
lastelt = heap.pop() # raises appropriate IndexError if heap is empty
if heap:
returnitem = heap[0]
heap[0] = lastelt
shiftdown(heap, 0)
return returnitem
return lastelt
# 'heap' is a heap at all indices >= startpos, except possibly for pos. pos
# is the index of a leaf with a possibly out-of-order value. Restore the
# heap invariant.
def shiftup(heap, startpos, pos):
newitem = heap[pos]
# Follow the path to the root, moving parents down until finding a place
# newitem fits.
while pos > startpos:
parentpos = (pos - 1) >> 1
parent = heap[parentpos]
if newitem < parent:
heap[pos] = parent
pos = parentpos
continue
break
heap[pos] = newitem
def shiftdown(heap, pos):
endpos = len(heap)
startpos = pos
newitem = heap[pos]
# Bubble up the smaller child until hitting a leaf.
childpos = 2*pos + 1 # leftmost child position
while childpos < endpos:
# Set childpos to index of smaller child.
rightpos = childpos + 1
if rightpos < endpos and not heap[childpos] < heap[rightpos]:
childpos = rightpos
# Move the smaller child up.
heap[pos] = heap[childpos]
pos = childpos
childpos = 2*pos + 1
# The leaf at pos is empty now. Put newitem there, and bubble it up
# to its final resting place (by sifting its parents down).
heap[pos] = newitem
shiftup(heap, startpos, pos)
def dijkstra(edges, f, t):
g = defaultdict(list)
for l,r,c in edges:
g[l].append((c,r))
q, seen = [(0,f,())], set()
while q:
(cost,v1,path) = pop(q)
if v1 not in seen:
seen.add(v1)
path = (v1, path)
if v1 == t: return (cost, path)
for c, v2 in g.get(v1, ()):
if v2 not in seen:
push(q, (cost+c, v2, path))
return float("inf")
if __name__ == "__main__":
edges = [
("A", "B", 7),
("A", "D", 5),
("B", "C", 8),
("B", "D", 9),
("B", "E", 7),
("C", "E", 5),
("D", "E", 15),
("D", "F", 6),
("E", "F", 8),
("E", "G", 9),
("F", "G", 11)
]
print ("=== Dijkstra ===")
print (edges)
print ("A -> E:")
print (dijkstra(edges, "A", "E"))
print ("F -> G:")
print (dijkstra(edges, "F", "G")) | true |
c1289bb32504f25cefd30e24f3a0e13df9818568 | Python | Shitong91/Machine-Learning | /TensorFlow/exercise.py | UTF-8 | 577 | 2.78125 | 3 | [] | no_license | import tensorflow as tf
import numpy as np
#creat data
x_data = np.random.rand(100).astype(np.float32)
y_data = x_data*0.1+0.3
#create tensorflow structure start#
W=tf.Variable(tf.random_uniform([1],-1.0,1.0))
biases = tf.Variable(tf.zeros([1]))
y=W*x_data+biases
loss=tf.reduce_mean(tf.square(y-y_data))
optimizer=tf.train.GradientDescentOptimizer(0.5)
train=optimizer.minimize(loss)
init=tf.global_variables_initializer()
sess=tf.Session()
sess.run(init)
for step in range(201):
sess.run(train)
if step%20==0:
print(step,sess.run(W),sess.run(biases))
| true |
ef80203f34d311ca01478b8d6aa61883440143be | Python | shalahudinfadil/xpath-scraper | /app/models.py | UTF-8 | 755 | 2.515625 | 3 | [] | no_license | from app import db
from datetime import datetime
class News(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(255), nullable=False, default='')
url = db.Column(db.String(255), nullable=False, default='')
content = db.Column(db.Text)
summary = db.Column(db.Text)
article_ts = db.Column(db.BigInteger, nullable=False, default=0)
published_date = db.Column(db.Date, nullable=True)
inserted = db.Column(db.DateTime, nullable=False, default=datetime.now)
updated = db.Column(db.DateTime, nullable=False, default=datetime.now, onupdate=datetime.now)
def __repr__(self):
return '<Artikel: {}, Publikasi: {}, Inserted: {}>'.format(self.title, self.published_date, self.inserted) | true |
62f6923888fc9b3fe0b3fbaddfc5a886cd275333 | Python | asvedr/cardGame | /models.py | UTF-8 | 2,045 | 3.09375 | 3 | [
"MIT"
] | permissive | from dataclasses import dataclass, field
@dataclass
class User:
login : str
cards : list = field(default_factory=list)
money : int = 1000
bet : int = 0
position: int = None
actions : list = field(default_factory=list)
action : str = None
ready : bool = False
@dataclass
class Game:
users : list = field(default_factory=list)
turn_number : int = 0
active_player : int = 0
bank : int = 0
cards : list = field(default_factory=lambda : [i for i in range(54)])
cards_availble : list = field(default_factory=list)
game_status : str = 'wait'
def user_joined(self, login):
for user in self.users:
if user.login == login:
return True
return False
def join_user(self, user):
self.users.append(user)
class Users:
def __init__(self):
# Arseny: Why you use double '_' symbol in name of object attr?
# Arseny: If you want to create "private" attribute
# Arseny: You should use `_users`
# Arseny: `__users` mean that it's a class attribute
# Arseny: But it's not
self.__users = []
def __repr__(self):
return self.__users.__repr__()
def __str__(self):
return self.__users.__repr__()
def user_exist(self, login):
for user in self.__users:
if user.login == login:
return True
return False
def add_user(self,login):
if self.user_exist(login):
raise LoginException('Login already exist')
user = User(login=login)
self.__users.append(user)
def get_user(self,login):
if not self.user_exist(login):
return None
for user in self.__users:
if user.login == login:
return user
class LoginException(Exception):
def __init__(self, message):
super().__init__(message)
self.message = message
| true |
2d2e475e6e5ad7fb52db12c6f01b1d9c35591acb | Python | ebby-s/Celegans-simulation | /list_synapses.py | UTF-8 | 1,399 | 2.828125 | 3 | [] | no_license | import xlrd
book = xlrd.open_workbook("connectome.xlsx")
chem_sheet = book.sheet_by_name("male chemical")
gap_sheet = book.sheet_by_name("male gap jn asymmetric")
out_file = open("male_connections.txt", 'w')
# get row and column labels from tables
chem_col_labels = [str(cell).split("'")[1] for cell in chem_sheet.row(2)]
chem_row_labels = [str(cell).split("'")[1] for cell in chem_sheet.col(2)]
gap_col_labels = [str(cell).split("'")[1] for cell in gap_sheet.row(2)]
gap_row_labels = [str(cell).split("'")[1] for cell in gap_sheet.col(2)]
connections = [] # holds each connection in the format [presynaptic, postsynaptic, weight]
for j, postsynaptic in enumerate(chem_col_labels):
for i, presynaptic in enumerate(chem_row_labels):
if postsynaptic != "" and presynaptic != "" and chem_sheet.cell_value(i,j) != "":
connections.append([presynaptic, postsynaptic, str(chem_sheet.cell_value(i,j))])
for j, col_neuron in enumerate(gap_col_labels):
for i, row_neuron in enumerate(gap_row_labels):
if col_neuron != "" and row_neuron != "" and gap_sheet.cell_value(i,j) != "":
connections.append([col_neuron, row_neuron, str(gap_sheet.cell_value(i,j))])
connections.append([row_neuron, col_neuron, str(gap_sheet.cell_value(i,j))])
for connection in connections:
out_file.write(','.join(connection)+';')
| true |
1caee0eb08926aea4e9d4b7208aafb2396905926 | Python | ningbioinfo/HiCvisualisation | /HiC-integrationmap.py | UTF-8 | 4,659 | 2.546875 | 3 | [] | no_license | # generating heatmap with arc plot on top to visualise regional Hi-C interaction with integration with chromHMM states
import pandas as pd
import pybedtools
import numpy as np
import seaborn as sns
from scipy.stats import zscore
import matplotlib.pylab as plt
from matplotlib.patches import Arc
from matplotlib import gridspec
import argparse
parser = argparse.ArgumentParser(description='generating heatmap with arc plot on top to visualise regional Hi-C interaction with integration with chromHMM states.')
parser.add_argument("--int", help="significant interaction file with first three columns as bin1 bin2 and interaction count, the file must conatin a header.")
parser.add_argument("--bin", help="bed file for bin indexes")
parser.add_argument("--region", help="chr:start-end")
parser.add_argument("--chromhmm", help="path to the chromhmm file for integration")
#parser.add_argument("--name", help="name of the sample to plot")
parser.add_argument("--out",default="out.pdf", help="name of the sample to plot")
args = vars(parser.parse_args())
int_file = args['int']
region = args['region']
c = region.split(':')[0]
s = region.split(':')[0].split('-')[0]
e = region.split(':')[0].split('-')[1]
bin_file = args['bin']
chromhmm_file = args['chromhmm']
out_file = args['out']
def draw_arc(x,y,max_height,ax,colorpalette,colorindex):
point1 = [x,0]
point2 = [y,0]
center = [point1[0]+(point2[0]-point1[0])/2, 0]
width = (point2[0]-point1[0])
height = np.sqrt(width)*2
pac = Arc(center,width,height/2,angle=0,theta1=0,theta2=180,color=colorpalette[colorindex])
ax.add_patch(pac)
# bins
bins = pd.read_csv(bin_file,
sep = '\t',
header = None, usecols = [0,1,2,3])
bins = bins[(bins[0] == c) & (bins[1] >= s) & (bins[2] <= e)]
bins.columns = ['chrom','start','end', 'binid']
# interaction
df = pd.read_csv(int_file,
sep = '\t', usecols = [0,1,2])
min_bin = min(bins['binid'])
max_bin = max(bins['binid'])
sub_df = df[(df['bin1ID']>=min_bin) & (df['bin1ID']<=max_bin) & (df['bin2ID']>=min_bin) & (df['bin2ID']<=max_bin)]
coordinates = sub_df.values.tolist()
# load annotation
an = pd.read_csv(chromhmm_file,
sep='\t', skiprows=1, header=None, usecols = [0,1,2,3])
states = list(set(an[3].values.tolist()))
sub_an = an[(an[0] == c) & (an[1] >= s) & (an[2] <= e) & (an[3]!="15_Quies")]
# intersection
bins_bed = pybedtools.BedTool.from_dataframe(bins)
suban_bed = pybedtools.BedTool.from_dataframe(sub_an)
intersect = bins_bed.intersect(suban_bed, wo=True).to_dataframe().iloc[:,[0,1,2,3,7,8]]
intersect.columns = ['chrom','start','end','binid','annotation','overlapbase']
intersect = intersect.drop(['chrom','start','end'],axis=1)
intersect_spread = intersect.groupby(['binid', 'annotation'])['overlapbase'].sum().unstack('annotation')
intersect_spread_t = intersect_spread.transpose()
intersect_spread_t = intersect_spread_t.fillna(0)
for state in states:
if state not in list(intersect_spread_t.index):
intersect_spread_t.loc[state] = 0
intersect_spread_t_plot = intersect_spread_t.apply(zscore)
intersect_spread_t_plot = intersect_spread_t_plot.reindex(["1_TssA", "2_TssAFlnk", "10_TssBiv",
"3_TxFlnk", "4_Tx", "5_TxWk",
"6_EnhG", "7_Enh", "11_BivFlnk", "12_EnhBiv",
"8_ZNF/Rpts", "9_Het", "13_ReprPC", "14_ReprPCWk"])
# draw the plot
min_bin = min([min(i[0:2]) for i in coordinates])
max_bin = max([max(i[0:2]) for i in coordinates])
max_width = max([i[1]-i[0] for i in coordinates])
max_height = np.sqrt(max_width)+1
fig = plt.figure(figsize=(20, 20))
gs = gridspec.GridSpec(2, 1, height_ratios=[1, 3])
ax1 = plt.subplot(gs[0])
ax2 = plt.subplot(gs[1])
intensity = list(set([i[2] for i in coordinates]))
color_p = sns.color_palette("rocket_r",len(intensity)*2)[len(intensity):]
#color_p.reverse()
ax1.set_ylim(0,max_height/2)
ax1.set_xlim(min_bin-1, max_bin+1)
for i in coordinates:
draw_arc(int(i[0]),int(i[1]),max_height, ax1, color_p, intensity.index(i[2]))
#ax.axhline(y=0,color ='black', linewidth=1)
cbar_ax = fig.add_axes([.905, .3, .03, .3])
sns.heatmap(intersect_spread_t_plot, ax = ax2, cbar_ax = cbar_ax, cmap = "YlGnBu",
cbar_kws={'label': 'Z-score'})
cbar_ax.yaxis.label.set_size(20)
cbar_ax.tick_params(labelsize=15)
plt.subplots_adjust(hspace = 0.001)
ax1.axis('off')
ax2.set(xticklabels=[])
ax2.tick_params(bottom=False,labelsize=15)
ax2.set_xlabel(c+':'+str(s)+'-'+str(e),fontsize=20)
ax2.set_ylabel("ChromHMM states",fontsize=20)
plt.savefig(out_file, format='pdf', bbox_inches='tight', dpi=300)
| true |
b9be385607b85c7cc15bc2e8a8196e63079a405a | Python | Rory968/FIT3162Team15 | /predict.py | UTF-8 | 1,330 | 3.171875 | 3 | [] | no_license | # Written by Rory Austin id: 28747194
import predictions as p
import os
import sys
# This file when run takes a file that is present in the system and associates it with
# a species name the user passes through the command line, when it is run it will fetch the
# model for the specified species and prep the data for predictions, it will then make
# these predictions and save them to a new file called 'predictions.xls' in the downloads folder
# of the system.
def predict(species, data_name):
'''
This function makes use of the predictions file to predict the
reliability of a given set of observations using a pre trained model.
:param species:
:param data_name:
:return:
'''
p.predict(species, data_name)
cwd = os.getcwd()
os.remove(os.path.join(cwd, 'temp.csv'))
def main():
len(sys.argv)
try:
species = sys.argv[1]
except IndexError:
print("Must provide model argument, use 'list_names model' for a list of arguments.")
return
try:
data_name = sys.argv[2]
except IndexError:
print("Must provide data file name for predictions.")
return
if data_name.endswith('.xls'):
predict(species, data_name)
else:
print("Prediction data must be in .xls format.")
if __name__ == "__main__":
main()
| true |
b372ad7284a23c5ab86f3901ac8b1fb473d70414 | Python | ssub-e/Programmers-algorithms | /Level 2/예상 대진표/solution.py | UTF-8 | 253 | 3.0625 | 3 | [] | no_license | def solution(n,a,b):
answer = 0
while a!=b:
a= a%2==1 and (a+1)/2 or a/2 # 파이썬의 경우 '/' 연산의 결과가 정수가 아니다. 자바는 몫이지만
b= b%2==1 and (b+1)/2 or b/2
answer+=1
return answer
| true |
a0a270ee03b61725fa4bf983454779fb15856e01 | Python | pranjalghimire/mathematical-computing | /hw10-ghimire.py | UTF-8 | 5,226 | 3.828125 | 4 | [] | no_license | # hw10.py
# Chris Monico, 3/19/21
# Graphical illustration of Newton's Method for functions
# from C to C.
'''
Structured coding process
i)
Let pixel coordinate be (0,0)
Let top left coordinates be 1+12i
Let pixel width and height be 0.4 and 0.3
To find the center of coordinate (3,1)
Width is 0.4,
So, (3-0)*0.4=1.2 added in real direction
Height is 0.3
So, (1-0)*0.3=0.3 subtracted in imaginary direction
Since, y-direction is opposite
S0, final coordiantes
=1+12i+1.2-.3i
=2.2+11.7i
ii)
Get the input coordinates of initial value
For x coordinate,
Extract the real value of given intital coordinate
Add That to the width of each pixel times the value of real value of new coordinate
For y coordinate,
Extract the imaginary value of given intital coordinate
Subtract that to the width of each pixel times the value of imaginary value of new coordinate
Finally the answer is real plus the imaginary value
iii)
Let pixel coordinate be (0,0)
Let top left coordinates be 2+5i
Let pixel width and height be 0.3 and 0.6
To find the center of coordinate (5,3)
Width is 0.3,
So,
2 is real value
2+width(5)
2+0.3(5)
3.5
Height is 0.6
So,
5i is imaginary value
5-height(3)
5-0.6*3
3.2
So final answer is 3.5+3.2i
add the input real value to the resulting coordinate real value
'''
import tkinter as tk
import cmath
import math
def Newton(Function, Derivative, z0, epsilon):
x_curr=z0
for i in range(0,20):
fun=Function(x_curr)
dev=Derivative(x_curr)
#if y-value is near 0
if epsilon>abs(fun):
return x_curr
#if value is close to 0 slope
if epsilon>abs(dev):
print("Error really close to zero slope")
return
x_next=x_curr-(fun/dev)
x_curr=x_next
print("Failture to converge")
return
def colorFromRGB(r, g, b):
# R, G, B are floating point numbers between 0 and 1 describing
# the intensity level of the Red, Green and Blue components.
X = [int(r*255), int(g*255), int(b*255)]
for i in range(3):
X[i] = min(max(X[i],0), 255)
color = "#%02x%02x%02x"%(X[0],X[1],X[2])
return color
def color_from_comp(z):
x = z.real*2.7
y = z.imag*2.7
r = 0.5*(1.0 + math.tanh(x))
g = 0.5*(1.0 + math.sin(x*y))
b = 0.5*(1.0 + math.cos(x+y))
return colorFromRGB(r, g, b)
def F(z):
return z**5-1
def dF(z):
return 5*z**4
#############################################################
class MyApplication(tk.Frame):
def __init__(self, master):
super().__init__(master)
self.master = master
self.pack()
self.screen_width = 800
self.screen_height = 600
self.set_region(0+0j, 4)
self.create_widgets()
def set_region(self, center, region_width):
# This sets the region of the complex plane to be displayed
# on the canvas, by specifying the center and width of that region.
# The height is then determined from the aspect ratio of the canvas.
# Using those, we set the attributes:
# self.pixel_width : complex width of each pixel,
# self.pixel_height: complex height of each pixel
# self.top_left : complex number at the center of the top-left pixel.
self.pixel_width = region_width/(self.screen_width-1)
region_height = self.screen_height * region_width/self.screen_width
self.pixel_height = region_height / (self.screen_height - 1)
x = center.real - self.pixel_width*(self.screen_width/2)
y = center.imag + self.pixel_height*(self.screen_height/2)
self.top_left = x + 1j*y
def update_screen(self):
self.master.update_idletasks()
self.master.update()
def create_widgets(self):
# First, a Canvas widget that we can draw on. It will be 800 pixels wide,
# and 600 pixels tall.
self.canvas = tk.Canvas(self.master, width=self.screen_width, height=self.screen_height, background="white")
# This 'pack' method packs it into the top-level window.
self.canvas.pack()
def pixel_center(self, x, y) :
# Return the complex number corresponding to the center of the
# given pixel.
# This is problem 2; delete the 'pass' statement and write this method.
ans=self.top_left.real+self.pixel_width*x+(self.top_left.imag-self.pixel_height*y)*1j
return ans
def draw_pixel(self, x, y, C):
self.canvas.create_rectangle(x-0.5, y-0.5, x+0.5, y+0.5, fill=C, outline="")
def draw_newton_plot(self):
for i in range(self.screen_width):
for j in range(self.screen_height):
z = self.pixel_center(i, j)
root = Newton(F, dF, z, 0.00001)
if type(root) is complex:
color = color_from_comp(root)
else:
color="black"
self.draw_pixel(i, j, color)
if i%20 == 0:
self.update_screen()
root = tk.Tk()
app = MyApplication(master=root)
app.draw_newton_plot()
app.mainloop()
| true |
6d7efe2bf0896092d543ea07005b90902646a957 | Python | hiyangw/github-rss-feed-exporter | /lib/utils/utils.py | UTF-8 | 1,984 | 2.515625 | 3 | [] | no_license | import yaml
import logging
import json
import os
import sys
import xmltodict
import requests
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s',
datefmt='%d-%b-%y %H:%M:%S', level=logging.DEBUG)
def load_rss(url):
logging.info('Request URL: {}'.format(url))
try:
r = requests.request('GET', url)
data = r.content
logging.debug('Response data: {}'.format(data))
if r.status_code is 200:
logging.info('successful: {}'.format(url))
else:
logging.error('Error message: {}'.format(data['error']['title']))
sys.exit()
return xmltodict.parse(data)
except requests.exceptions.RequestException as e:
logging.error(e)
sys.exit()
def load_configure(file):
logging.info('Loading {} configuration...'.format(file))
return parse_yaml('configure/{}.yaml'.format(file))
def parse_yaml(file):
try:
return yaml.load(open(file, 'r'))
except yaml.YAMLError as exc:
logging.exception('Error while parsing YAML file:')
if hasattr(exc, 'problem_mark'):
if exc.context is not None:
logging.warning(' parser says\n' + str(exc.problem_mark) + '\n ' +
str(exc.problem) + ' ' + str(exc.context) +
'\nPlease correct data and retry.')
else:
logging.warning(' parser says\n' + str(exc.problem_mark) + '\n ' +
str(exc.problem) + '\nPlease correct data and retry.')
else:
logging.warning('Something went wrong while parsing yaml file')
return
def save_to_json(folder, filename, data):
with open('{}/{}.json'.format(folder, filename), 'w') as f:
f.write(json_dump(data))
f.close()
logging.info('Saved file: {}.json'.format(filename))
def json_dump(data):
return json.dumps(data, indent=4, sort_keys=True)
| true |
0b950b31a9da9736afefe43e944cce53a3ea440e | Python | xuelang201201/Python3Spider | /03_基本库的使用/3-1-使用urllib/3-1-3-解析链接/_09_quote.py | UTF-8 | 227 | 3.203125 | 3 | [] | no_license | """
该方法可以将内容转化为 URL 编码的格式
"""
from urllib.parse import quote
keyword = '壁纸'
url = 'https://www.baidu.com/s?wd=' + quote(keyword)
print(url)
# https://www.baidu.com/s?wd=%E5%A3%81%E7%BA%B8
| true |
ea08447d4ce17894cc392169d56b8aeb39cc5eba | Python | adeveloperdiary/Machine_Learning | /A_Artificial_Neural_Network/util.py | UTF-8 | 1,282 | 2.546875 | 3 | [] | no_license | import numpy as np
import datasets.mnist.loader as mnist
from sklearn.preprocessing import OneHotEncoder
def get_binary_dataset(ipython=False):
train_x_orig, train_y_orig, test_x_orig, test_y_orig = mnist.get_data(ipython)
index_5 = np.where(train_y_orig == 5)
index_8 = np.where(train_y_orig == 8)
index = np.concatenate([index_5[0], index_8[0]])
np.random.seed(1)
np.random.shuffle(index)
train_y = train_y_orig[index]
train_x = train_x_orig[index]
train_y[np.where(train_y == 5)] = 0
train_y[np.where(train_y == 8)] = 1
index_5 = np.where(test_y_orig == 5)
index_8 = np.where(test_y_orig == 8)
index = np.concatenate([index_5[0], index_8[0]])
np.random.shuffle(index)
test_y = test_y_orig[index]
test_x = test_x_orig[index]
test_y[np.where(test_y == 5)] = 0
test_y[np.where(test_y == 8)] = 1
return train_x, train_y, test_x, test_y
def pre_process_data(train_x, train_y, test_x, test_y):
# Normalize
train_x = train_x / 255.
test_x = test_x / 255.
enc = OneHotEncoder(sparse=False, categories='auto')
train_y = enc.fit_transform(train_y.reshape(len(train_y), -1))
test_y = enc.transform(test_y.reshape(len(test_y), -1))
return train_x, train_y, test_x, test_y
| true |
609271a73df8a64cc9e98e0681fa05fea5e98f2a | Python | marcelohdsg/Aulas_Python | /ex25.py | UTF-8 | 232 | 4.1875 | 4 | [] | no_license | #Verifique se o nome da pessoa tem 'Silva'
n = str(input('Entre com seu nome completo: '))
n = n.title()
if ('Silva' in n) == True:
print('\nSeu nome POSSUI "Silva"')
else:
print('\nSeu nome NÃO possui "Silva"') | true |
6943dc612188338a326e74b8bf84d6e9058028e6 | Python | lememebot/LememebotPy | /lememebot/handlers/Pasta.py | UTF-8 | 4,562 | 2.5625 | 3 | [] | no_license | import random
import re
import discord
import praw
''' TODO's:
Set typing when cooking
Search pastas
Save video/audio to commands (e.g !setvoice yeahboi youtubeYeahboiURL afterwhich !yeahboi would play the URL)
'''
class PastaBot():
def __init__(self, client):
self.client = client
self.MIN_MSGS_BETWEEN_PASTA = 1
self.MAX_MSGS_BETWEEN_PASTA = 3
self.wait_between_msgs = random.randint(self.MIN_MSGS_BETWEEN_PASTA, self.MAX_MSGS_BETWEEN_PASTA)
self.wait_between_msgs_count = 0
self.reddit = praw.Reddit(client_id='x06_R0whglm1fA',
client_secret="b7uHO17t4qm5Z6XjBGELZfTI3ng",
password='',
user_agent='testscript by /u/Vincible_',
username='')
async def on_message(self, client, message):
print('[DEBUG: PastaBot] in on_message')
if message.author.id != client.user.id:
# Copying stuff from Yoni thnx bby 😘
args = str.lower(message.content).split(sep=' ')
if args[0] == '!pasta':
try:
response = self.SetSettings(args[1], int(args[2]))
self.wait_between_msgs = random.randint(self.MIN_MSGS_BETWEEN_PASTA, self.MAX_MSGS_BETWEEN_PASTA)
await client.send_message(message.channel, response)
except Exception:
await client.send_message(message.channel, "something went wrong kiddo.")
# Check if it's wakeywakey time
elif (client.user.mentioned_in(message)
or self.WakeyWakeyTime() or
"pasta" in message.content):
await client.send_message(message.channel, self.GeneratePasta())
def SetSettings(self, command, num):
commands = ['setmin', 'setmax', 'stop', 'resume']
ayyMsgs = {(0): "Do you want infinite pastas? \nBecause that's how you get infinite pastas. Have fun.",
(1,7):["FUCK YEAH!","My man!", "Oh yeah baby", "😘😘😘", "ヽ(^◇^*)/"],
(8,15):["Really? fine...","Wow that's a great way to ruin fun!", "...","P-Pls Senapi don't do this (。✿‿✿。)"],
(16,100):["You suck.", "Fuck off", "You should kill yourself for what you just did, just sayin'"],
(100): "Ore wa ochinchin ga daisuki nandayo"}
isMin = False # meirl
if command not in commands:
return "Unknown command"
elif ((command == 'setmin' and num > self.MAX_MSGS_BETWEEN_PASTA) or
(command == 'setmax' and num < self.MIN_MSGS_BETWEEN_PASTA)):
return "setmin value must be lower than setmax value."
elif command == 'setmin':
self.MIN_MSGS_BETWEEN_PASTA = num
elif command == 'setmax':
self.MAX_MSGS_BETWEEN_PASTA = num
# Generate response
if num <= 0:
self.MIN_MSGS_BETWEEN_PASTA = 0
self.MAX_MSGS_BETWEEN_PASTA = 1
return ayyMsgs.get((0))
elif num >= 100:
return ayyMsgs.get((100))
else:
for key in ayyMsgs:
if type(key).__name__ == 'tuple' and key[0] <= num <= key[1]:
return random.choice(ayyMsgs.get(key))
def GeneratePasta(self):
try:
# Reset the counters
self.wait_between_msgs = random.randint(self.MIN_MSGS_BETWEEN_PASTA, self.MAX_MSGS_BETWEEN_PASTA)
self.wait_between_msgs_count = 0
# Get random post
comments = self.reddit.redditor('CummyBot2000').comments.top('month') # You are my Queen, Cummy! 😍😍😍
comment = self.get_random_comment(comments)
copypasta = comment.body
# Get rid of the evidence shhh bby
REEEEEEEEEEEE = re.compile(re.escape('cummybot'), re.IGNORECASE)
copypasta = REEEEEEEEEEEE.sub('leMemeBot69', copypasta)
except Exception:
copypasta = "something went wrong kiddo."
return copypasta
def WakeyWakeyTime(self):
self.wait_between_msgs_count += 1
# oh yeahhh lets go BABBBYYYY
return self.wait_between_msgs_count >= self.wait_between_msgs
def get_random_comment(self, comments):
num = random.randint(0,99)
count = 0
# Why isn't this Index Based ¯\_(ツ)_/¯
for comment in comments:
if (count == num):
return comment
count += 1
| true |
7ae2f557c998f70894ada8eb6b879436c4c37ee9 | Python | DDUDDI/mycode1 | /0515/memberIO2.py | UTF-8 | 295 | 2.859375 | 3 | [] | no_license | from member import Member
filepath = 'D:/Pycharm_Projects/0515/members.txt'
def getMemberFromLine(line):
info = line.split()
m = Member(int(info[0]), info[1], info[2]) # int(info[0])
if m:
return m
else:
print(f'{line} 객체 변환 실패')
return None | true |
17490a40f0932ed76167a5e950084046c38d078b | Python | danohn/Twilio-Weather | /weather.py | UTF-8 | 1,473 | 3.21875 | 3 | [
"MIT"
] | permissive | import os
import requests
import json
from datetime import datetime
from tzlocal import get_localzone
weather_api_key = os.environ['OPEN_WEATHER_MAP_API_KEY']
def get_weather(_zip):
url = f'https://api.openweathermap.org/data/2.5/weather?zip={_zip},au&units=metric&appid={weather_api_key}'
resp = requests.get(url).json()
weather = {
'weather_description': resp['weather'][0]['description'],
'weather_temp': resp['main']['temp'],
'weather_feels_like': resp['main']['feels_like'],
'weather_temp_min': resp['main']['temp_min'],
'weather_temp_max': resp['main']['temp_max'],
'weather_wind_speed': resp['wind']['speed'],
'weather_sunset_time': datetime.fromtimestamp(int(resp['sys']['sunset']), get_localzone()).strftime('%H:%M'),
'location_name': resp['name']
}
annoucement = f"""
Today\'s weather for {weather['location_name']} is {weather['weather_description']}.
It\'s {weather['weather_temp']} degrees but feels like {weather['weather_feels_like']} degrees.
The coldest temperature today will be {weather['weather_temp_min']} and the hottest temperature will be {weather['weather_temp_max']}.
The windspeed is currently {weather['weather_wind_speed']} meters per second.
Today's sunset will be at {weather['weather_sunset_time']}.
"""
return annoucement
if __name__ == '__main__':
my_weather = get_weather()
print(my_weather) | true |
1d097ff177d190debfcf5acb7ab76fb8f3edad41 | Python | sebasyii/JPJC-CS | /Exam Questions/JC2 Prelims 2019/Task 3/task3.py | UTF-8 | 4,900 | 3.5625 | 4 | [] | no_license | class Node:
def __init__(self, Data="", Priority=-1, Pointer=-1):
self.__Data = str(Data)
self.__Priority = int(Priority)
self.__Pointer = int(Pointer)
def getData(self):
return self.__Data
def getPriority(self):
return self.__Priority
def getPointer(self):
return self.__Pointer
def setData(self, Data):
self.__Data = Data
def setPriority(self, Priority):
self.__Priority = Priority
def setPointer(self, Pointer):
self.__Pointer = Pointer
class PQueue:
def __init__(self): # Initialise Method
self.__ThisPQueue = [Node() for i in range(10)]
self.__Front = -1
self.__Rear = -1
self.__NextFree = int(0)
for i in range(len(self.__ThisPQueue) - 1):
self.__ThisPQueue[i].setPointer(i + 1)
def IsEmpty(self):
return self.__Front == -1 and self.__Rear == -1
def IsFull(self):
return self.__NextFree == -1
def JoinPQueue(self, NewItem, Priority):
if self.IsFull():
print("Queue full.")
return
# Else Do this
else:
self.__ThisPQueue[self.__NextFree].setData(NewItem)
self.__ThisPQueue[self.__NextFree].setPriority(Priority)
# Pointing to new node
newNode = self.__NextFree
self.__NextFree = self.__ThisPQueue[self.__NextFree].getPointer()
# Set new pointer to -1
self.__ThisPQueue[newNode].setPointer(-1)
# If empty
if self.IsEmpty():
self.__Front = newNode
self.__Rear = newNode
# Lesser than The last item priority
elif Priority <= self.__ThisPQueue[self.__Rear].getPriority():
self.__ThisPQueue[self.__Rear].setPointer(newNode)
self.__Rear = newNode
elif Priority > self.__ThisPQueue[self.__Front].getPriority():
self.__ThisPQueue[newNode].setPointer(self.__Front)
self.__Front = newNode
# In between
else:
previous = -1
current = self.__Front
while (
self.__ThisPQueue[current].getPriority() >= Priority
and current != -1
):
previous = current
current = self.__ThisPQueue[current].getPointer()
self.__ThisPQueue[previous].setPointer(newNode)
self.__ThisPQueue[newNode].setPointer(current)
if self.__ThisPQueue[self.__Rear].getPointer() != -1:
self.__Rear = self.__ThisPQueue[self.__Rear].getPointer()
print(f"{NewItem} is added with {str(Priority)} Priority")
def LeavePQueue(self):
if self.IsEmpty():
print("Queue Empty")
return
data = self.__ThisPQueue[self.__Front].getData()
self.__ThisPQueue[self.__Front].setData("")
self.__ThisPQueue[self.__Front].setPriority(-1)
temp = self.__NextFree
self.__NextFree = self.__Front
self.__Front = self.__ThisPQueue[self.__Front].getPointer()
self.__ThisPQueue[self.__NextFree].setPointer(temp)
if self.__Front == -1:
self.__Rear = -1
return data
def OutputPQueue(self):
print(f"Front Pointer: {self.__Front}")
print(f"Rear Pointer: {self.__Rear}")
print(f"NextFree: {self.__NextFree}")
print()
print(f'{"Index":^10} {"Data":^20} {"Pointer":^10} {"Priority":^10}')
for idx in range(len(self.__ThisPQueue)):
print(
f"{idx:^10} {self.__ThisPQueue[idx].getData():^20} {self.__ThisPQueue[idx].getPointer():^10} {self.__ThisPQueue[idx].getPriority():^10}"
)
def menu():
print("\n")
print("Patient Queue Menu\n")
print("1) Add patient to PQueue")
print("2) Remove patient from PQueue")
print("3) Display PQueue")
print("4) Exit Program")
def main():
JPQueue = PQueue()
infile = open("PATIENTS.txt", "r")
for line in infile:
if line[-1] == "\n":
name, priority = line[:-1].split(",")
JPQueue.JoinPQueue(name, int(priority))
else:
name, priority = line.split(",")
JPQueue.JoinPQueue(name, int(priority))
infile.close()
while True:
menu()
option = input("Enter your choice:")
if option == "1":
name = input("Who do you want to add: ")
priority = int(input(f"What is {name} priority: "))
JPQueue.JoinPQueue(name, priority)
elif option == "2":
print(f"\n{JPQueue.LeavePQueue()} is removed\n")
elif option == "3":
JPQueue.OutputPQueue()
else:
break
JPQueue.OutputPQueue()
main()
| true |
b92f8bec72f0ebed63a888eda4460c6f3bba0a73 | Python | dataforgoodfr/batch8_ceebios | /batch8_ceebios/populate_db.py | UTF-8 | 1,922 | 2.703125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | import json
import os
from dotenv import load_dotenv
from pymongo import MongoClient
load_dotenv()
MONGO_HOST = os.getenv("MONGO_HOST")
MONGO_PORT = 27017
MONGO_dbname = 'ceebios'
MONGO_UNSERNAME = os.getenv("MONGO_USERNAME")
MONGO_PASSWORD = os.getenv("MONGO_PASSWORD")
def load_conf_mongo(host, port, username, password, dbname, col):
''' open mongodb client and cursor on one collection '''
client = MongoClient(host=host, port=port, username=username, password=password)
db1 = client[dbname]
cursor = db1[col]
return client, cursor
# now you have one cursor for collection species, and a second for documents
client_species, cursor_species = load_conf_mongo(MONGO_HOST, MONGO_PORT, \
MONGO_UNSERNAME, MONGO_PASSWORD, MONGO_dbname, 'species')
client_documents, cursor_documents = load_conf_mongo(MONGO_HOST, MONGO_PORT, \
MONGO_UNSERNAME, MONGO_PASSWORD, MONGO_dbname, 'documents)
print('- cursors to write or find into Mongodb:')
print('cursor_species', cursor_species)
print('cursor_documents', cursor_documents)
db = client.documents
print(db)
posts = db.posts # ? ? i don't understand i don't see such collection
for file in os.listdir("/Volumes/Extreme SSD/ceebios"):
if file.endswith(".json"):
with open(os.path.join("/Volumes/Extreme SSD/ceebios", file)) as json_file:
new_posts = json.load(json_file)
# result = posts.insert_many(new_posts)
# logiquement on insert ici l'article
result = cursor_documents.insert_many(new_posts)
print("Number of inserted articles: ")
print(len(result.inserted_ids))
print(f"done with {file}")
running_sum = 0
for post in posts.find():
running_sum += 1
print(running_sum)
# fermeture
client_documents.close()
client_species.close()
| true |
88110543c5ff8b75018882b14f5ddafb22131b8a | Python | mjaramillu/ST0245-032 | /talleres/taller04/taller04.py | UTF-8 | 1,728 | 3.375 | 3 | [] | no_license | #!/usr/bin/python
import random
from matplotlib import pyplot as pl
import time
import sys
sys.setrecursionlimit(50000)
# Add the elements in the list
def array_sum(array, index = 0):
if len(array) == 0:
return
if index == len(array): #C1
return 0
else:
return array[index] + array_sum(array, index + 1) #C2 + T(n-1)
# Determine if an array of volumes can fit into a target volume
def volume_group_sum (array, target, start = 0):
if start == len(array):
return target == 0 #C1
else:
return volume_group_sum(array, target - array[start], start + 1) or volume_group_sum(array, target, start + 1) #C2 + T(n-1) + T(n-1)
# Obtain fibonacci at position n
def fib(n):
if n <= 2:
return n
else:
return fib(n-1) + fib(n-2)
deltas = []
ns = []
array_to_sum = []
for i in range(20):
for i in range(500):
array_to_sum.append(random.randint(1,10))
begin_time = time.time()
array_sum(array_to_sum)
end_time = time.time()
delta = end_time - begin_time
ns.append(len(array_to_sum))
deltas.append(delta)
pl.plot(ns, deltas)
pl.show()
deltas = []
ns = []
array_to_sum = []
for i in range(20):
array_to_sum.append(random.randint(1,1000))
result = random.randint(1, 1000000)
begin_time = time.time()
volume_group_sum(array_to_sum, result)
end_time = time.time()
delta = end_time - begin_time
ns.append(len(array_to_sum))
deltas.append(delta)
pl.plot(ns, deltas)
pl.show()
deltas = []
ns = []
for i in range(20):
begin_time = time.time()
fib(i)
end_time = time.time()
delta = end_time - begin_time
ns.append(i)
deltas.append(delta)
pl.plot(ns, deltas)
pl.show()
| true |
9dafd90abd23506d921e5111e046c9a29326ba3a | Python | jokkolabs/face.ml | /utils/database.py | UTF-8 | 4,948 | 2.53125 | 3 | [] | no_license | #!/usr/bin/env python
# encoding=utf-8
from pymongo import MongoClient
from utils import _FACE_ID, _FROM, _FROM_TYPE
mongo_client = MongoClient('localhost', 27017)
db = mongo_client["face_db2"]
# def demongo(obj):
# ''' removes `_id` key from a mongo object
# Saves bandwidth since we don't use it '''
# nobj = copy.deepcopy(obj)
# try:
# del nobj['_id']
# except (KeyError, TypeError):
# pass
# return nobj
# def demongo_cursor(cursor):
# return [demongo(obj) for obj in cursor]
""" RawPictures - Facebook source image
- can contain face or not.
- useful RawPictures have {type: FACE_PICTURE} or {type: FACE_DONE}
- useless ones have {type: BAD_FACE}
- default (on creation) have {type: UNKNOWN}
- fields:
- url: full URL of JPEG image on facebook
- type: filter on status (see above)
- facebook_id: a unique identifier to that picture on facebook.
- facebook_owner: Facebook UID of the owner of the picture
- url_thumbnail: thumbnail (src_small) of the JPEG image on FB. """
RawPictures = db['raw_pictures']
RawPictures.ensure_index('url', unique=True, sparse=True)
RawPictures.ensure_index('facebook_id', unique=True, sparse=True)
""" FacePicture - An identified valid face
- fields:
- face_id: Unique identifier of that face
- url: URL of the original size JPEG file on FB.
- face_x: x coordinate of the face in the picture
- face_y: y coordinate of the face in the picture
- face_width: with of the face in the picture
- face_height: height of the face in the picture
- source_width: width of the original image on FB.
- source_height: height of the original image on FB.
- facebook_id: Unique ID of that pcture on FB.
- datetime: Creation date
- nb_votes: the total number of vote for the current period
- nb_votes_total: total number of votes for all times.
- tag: a string representing the dominant tag
- tags: a dict of (tag: number) with all tags set and number of hits
- views: number of views for the current period
- views_total: number of views for all times.
- score: score for the current period
- score_total: score for all times.
- nb_favorited: nb of people who has it in favorites
- favorite_votes:
- favorite_votes_total:
- bonusmalus:
- bonusmalus_total:
- has_won: a boolean to exclude some pictures (winners)
- win_period:
- win_score:
- win_views:
- win_votes: """
FacePictures = db['face_pictures']
FacePictures.ensure_index('increment', unique=True, sparse=True)
FacePictures.ensure_index(_FACE_ID, unique=True, sparse=True)
""" Votes - A vote for a picture
- fields:
- face_id: unique face ID
- from: FB id or IP address
- from_type: ANONYMOUS or LOGGED_IN
- type: REGULAR, FAVORITE
- datetime: time of the vote """
Votes = db['votes']
Votes.ensure_index(_FROM)
Votes.ensure_index(_FROM_TYPE)
Votes.ensure_index(_FACE_ID)
Votes.ensure_index('type')
""" TaggedFace - A catoegorization of a picture
- fields:
- face_id: unique face ID
- tag: one of the existing Tags
- datetime:
- from: Identified user
- from_type: ANONYMOUS or LOGGED_IN """
TaggedFace = db['tagged_face']
TaggedFace.ensure_index(_FROM)
TaggedFace.ensure_index(_FROM_TYPE)
TaggedFace.ensure_index(_FACE_ID)
""" Views - A visitor saw the picture
- fields:
- face_id: unique face ID
- from: FB id or IP address
- from_type: ANONYMOUS or LOGGED_IN
- type: VOTEPAGE, FAVORITEPAGE, GALLERY
- datetime: time of the vote """
Views = db['views']
Views.ensure_index(_FROM)
Views.ensure_index(_FROM_TYPE)
Views.ensure_index(_FACE_ID)
Views.ensure_index('type')
""" Periods - A wining-periods
-fields:
- voting_start: votes open (Monday morning)
- voting_end: votes closes (Friday 1pm)
- final_start: finals open (Friday 2pm)
- final_end: finals closes (Sunday 2pm)
- break_start: no votes (Sunday 2pm)
- break_end: end of period (Sunday 12am)
- period_id: Week number
- period_name: """
Periods = db['periods']
""" Events - An event triggering actions
- fields:
- start:
- end:
- type:
- """
Events = db['events']
""" Users - An identified
fields:
- type: ANONYMOUS or LOGGED_IN
- ident: IP or FB id
- various facebook data
- nb_remaing_votes_regular:
- nb_remaing_votes_favorite:
- nb_favorited: number of favs used
- favorites = [] """
Users = db['users']
""" Favorites - A face favorited by a user
fields:
- face_id
- user_id
- datetime """
Favorites = db['favorites']
| true |
10d3d564aa7dff2629181f0ea6d29a38924724b0 | Python | nathangiose/EOMP-databses | /LifeChoices/Tests/Administrator.py | UTF-8 | 12,283 | 2.625 | 3 | [] | no_license | from tkinter import *
from tkinter import ttk
import tkinter.messagebox
#import mysql.connector
import mysql.connector
# import doctest
class ConnectorDB:
def __init__(self, master):
self.master = master
titlespace = " "
self.master.title("Administrator")
self.master.geometry("1000x700")
self.master.resizable(width=False, height=False)
MainFrame = Frame(self.master, bd=10, width=770, height=700, relief=RIDGE, bg="Black")
MainFrame.grid()
TitleFrame = Frame(MainFrame, bd=8, width=770, height=100, relief=RIDGE, bg="Green")
TitleFrame.grid(row=0, column=0)
TopFrame3 = Frame(MainFrame, bd=5, width=770, height=500, relief=RIDGE)
TopFrame3.grid(row=1, column=0)
LeftFrame = Frame(TopFrame3, bd=5, width=770, height=400, relief=RIDGE, bg="#208020", padx=2)
LeftFrame.pack(side=LEFT)
LeftFrame1 = Frame(LeftFrame, bd=5, width=600, height=180, relief=RIDGE, padx=2, pady=4)
LeftFrame1.pack(side=TOP, padx=0, pady=0)
RightFrame = Frame(TopFrame3, bd=5, width=100, height=400, relief=RIDGE, bg="#208020", padx=2)
RightFrame.pack(side=RIGHT)
RightFrame1 = Frame(RightFrame, bd=5, width=90, height=300, relief=RIDGE, padx=2, pady=2)
RightFrame1.pack(side=TOP)
# DECLARING VARIABLES
ID = StringVar()
name = StringVar()
surname = StringVar()
id_number = StringVar()
phone_number = StringVar()
NextOfKinname = StringVar()
NextOfKinphoneNo = StringVar()
# DEF VARIABLES
def addData ():
if ID.get() == "" or name.get() == "" or surname.get() == "" or id_number.get() == "" or phone_number.get() == "":
tkinter.messagebox.showerror("Administrator", "Please fill in all fields")
else:
sqlCon = mysql.connector.connect(user='NATHAN', password='8-2fermENt2020', host='localhost',
database='LC',
auth_plugin='mysql_native_password')
cur = sqlCon.cursor()
cur.execute("Insert into register values('ID', 'name', 'surname', 'id_number', 'phone_number', 'password')", (
ID.get(),
name.get(),
surname.get(),
id_number.get(),
phone_number.get(),
))
sqlCon.commit()
sqlCon.close()
tkinter.messagebox.showinfo("Administrator", "Information Updated")
def DisplayData():
sqlCon = mysql.connector.connect(user='NATHAN', password='8-2fermENt2020', host='localhost',
database='LC',
auth_plugin='mysql_native_password')
cur = sqlCon.cursor()
cur.execute("select from register")
result = cur.fetchall()
if len(result):
self.student_records.delete(*self.student_records.get_children())
for row in result:
self.student_records.insert('', END, values=row)
sqlCon.commit()
sqlCon.close()
#tkinter.messagebox.showinfo("Administrator", "Information Updated")
def TraineeInfo (ev):
viewInfo=self.student_records.focus()
learnerData = self.student_records.item(viewInfo)
row = learnerData['values']
ID.set(row[0])
name.set(row[1])
surname.set(row[2])
id_number.set(row[3])
phone_number.set(row[4])
NextOfKinname.set(row[5])
NextOfKinphoneNo.set(row[6])
def update():
sqlCon = mysql.connector.connect(user='NATHAN', password='8-2fermENt2020', host='localhost',
database='LC',
auth_plugin='mysql_native_password')
cur = sqlCon.cursor()
cur.execute("update register set name%s, surname%s, id_number%s, phone_number%s, NOK-name%s, NOK-phone_number%s, where ID%s)", (
ID.get(),
name.get(),
surname.get(),
id_number.get(),
phone_number.get(),
NextOfKinname.get(),
NextOfKinphoneNo.get(),
))
sqlCon.commit()
DisplayData()
sqlCon.close()
tkinter.messagebox.showinfo("Administrator", "Information Updated")
def deleteDB():
sqlCon = mysql.connector.connect(user='NATHAN', password='8-2fermENt2020', host='localhost',
database='LC',
auth_plugin='mysql_native_password')
cur = sqlCon.cursor()
cur.execute("Delete from register where ID%s", ID.get())
sqlCon.commit()
DisplayData()
sqlCon.close()
tkinter.messagebox.showinfo("Administrator", "Information Deleted")
Reset()
def searchDB():
try:
sqlCon = mysql.connector.connect(user='NATHAN', password='8-2fermENt2020', host='localhost',
database='LC',
auth_plugin='mysql_native_password')
cur = sqlCon.cursor()
cur.execute("Select * from LC where ID%s", ID.get())
row = cur.fetchall()
ID.set(row[0])
name.set(row[1])
surname.set(row[2])
id_number.set(row[3])
phone_number.set(row[4])
NextOfKinname.set(row[5])
NextOfKinphoneNo.set(row[6])
sqlCon.commit()
DisplayData()
except:
tkinter.messagebox.showinfo("Administrator", "Record not Found")
Reset()
sqlCon.close()
def Reset ():
self.entstudentID.delete(0, END)
self.entname.delete(0, END)
self.entsurname.delete(0, END)
self.entIDnumber.delete(0, END)
self.entphoneNo.delete(0, END)
self.entNOKname.delete(0, END)
self.entNOKphoneNo.delete(0, END)
def iExit ():
iExit = tkinter.messagebox.askyesno("Administrator", "Confirm if you want to exit")
if iExit > 0:
master.destroy()
return
# WIDGETS
self.lbltitle = Label (TitleFrame, font=('Arial', 40, 'bold'), text="Administrator", bd=7, bg="Green")
self.lbltitle.grid(row=0, column=0, padx=132)
self.lblstudentID = Label(LeftFrame1, font=('Arial', 14, 'bold'), text="Student ID", bd=7)
self.lblstudentID.grid(row=1, column=0, sticky=W, padx=5)
self.entstudentID = Entry(LeftFrame1, font=('Arial', 14, 'bold'), bd=5, width=44, justify='left', textvariable=ID)
self.entstudentID.grid(row=1, column=1, sticky=W, padx=5)
self.lblname = Label(LeftFrame1, font=('Arial', 14, 'bold'), text="First name", bd=7)
self.lblname.grid(row=2, column=0, sticky=W, padx=5)
self.entname = Entry(LeftFrame1, font=('Arial', 14, 'bold'), bd=5, width=44, justify='left', textvariable=name)
self.entname.grid(row=2, column=1, sticky=W, padx=5)
self.lblsurname = Label(LeftFrame1, font=('Arial', 14, 'bold'), text="surname", bd=7)
self.lblsurname.grid(row=3, column=0, sticky=W, padx=5)
self.entsurname = Entry(LeftFrame1, font=('Arial', 14, 'bold'), bd=5, width=44, justify='left', textvariable=surname)
self.entsurname.grid(row=3, column=1, sticky=W, padx=5)
self.lblIDnumber = Label(LeftFrame1, font=('Arial', 14, 'bold'), text="ID number", bd=7)
self.lblIDnumber.grid(row=4, column=0, sticky=W, padx=5)
self.entIDnumber = Entry(LeftFrame1, font=('Arial', 14, 'bold'), bd=5, width=44, justify='left', textvariable=id_number)
self.entIDnumber.grid(row=4, column=1, sticky=W, padx=5)
self.lblphoneNo = Label(LeftFrame1, font=('Arial', 14, 'bold'), text="phone_number", bd=5)
self.lblphoneNo.grid(row=5, column=0, sticky=W, padx=5)
self.entphoneNo = Entry(LeftFrame1, font=('Arial', 14, 'bold'), bd=5, width=44, justify='left', textvariable=phone_number)
self.entphoneNo.grid(row=5, column=1, sticky=W, padx=5)
self.lblNOKname = Label(LeftFrame1, font=('Arial', 14, 'bold'), text="Next of Kin- name", bd=5)
self.lblNOKname.grid(row=6, column=0, sticky=W, padx=5)
self.entNOKname = Entry(LeftFrame1, font=('Arial', 14, 'bold'), bd=5, width=44, justify='left', bg="Green", textvariable=NextOfKinname)
self.entNOKname.grid(row=6, column=1, sticky=W, padx=5)
self.lblNOKphoneNo = Label(LeftFrame1, font=('Arial', 14, 'bold'), text="Next of Kin- phone_number", bd=5)
self.lblNOKphoneNo.grid(row=7, column=0, sticky=W, padx=5)
self.entNOKphoneNo = Entry(LeftFrame1, font=('Arial', 14, 'bold'), bd=5, width=44, justify='left', bg="Green", textvariable=NextOfKinphoneNo)
self.entNOKphoneNo.grid(row=7, column=1, sticky=W, padx=5)
# TREE VIEW
scroll_y = Scrollbar(LeftFrame, orient = VERTICAL)
self.student_records = ttk.Treeview(LeftFrame, height=12, columns=("ID", "name", "surname", "id_number", "phone_number", "NOK-name", "NOK-phone_number"), yscrollcommand=scroll_y.set)
scroll_y.pack(side=RIGHT, fill=Y)
self.student_records.heading("ID", text="Student ID")
self.student_records.heading("name", text="name")
self.student_records.heading("surname", text="surname")
self.student_records.heading("id_number", text="ID Number")
self.student_records.heading("phone_number", text="phone_number")
self.student_records.heading("NOK-name", text="NOK-name")
self.student_records.heading("NOK-phone_number", text="NOK-phone_number")
#self.student_records['tv'] = 'headings'
self.student_records.column("ID", width=70)
self.student_records.column("name", width=100)
self.student_records.column("surname", width=100)
self.student_records.column("id_number", width=100)
self.student_records.column("phone_number", width=70)
self.student_records.column("NOK-name", width=100)
self.student_records.column("NOK-phone_number", width=70)
self.student_records.pack(fill=BOTH, expand=1)
self.student_records.bind("<ButtonRelease-1>", TraineeInfo)
#DisplayData() #This keeps the data visble, and overrides the button
# BUTTONS
self.btnAddNew= Button(RightFrame1, font=('Arial', 16, 'bold'), text="Add New", bd=4, pady=1, padx=24, width=8, height=2, command=addData).grid(row=0, column=0, padx=1)
self.btnDisplay = Button(RightFrame1, font=('Arial', 16, 'bold'), text="Display", bd=4, pady=1, padx=24, width=8,
height=2, command=DisplayData).grid(row=1, column=0, padx=1)
self.btnUpdate = Button(RightFrame1, font=('Arial', 16, 'bold'), text="Update", bd=4, pady=1, padx=24, width=8,
height=2, command=update).grid(row=2, column=0, padx=1)
self.btnDelete = Button(RightFrame1, font=('Arial', 16, 'bold'), text="Delete", bd=4, pady=1, padx=24, width=8,
height=2, command=deleteDB).grid(row=3, column=0, padx=1)
self.btnSearch = Button(RightFrame1, font=('Arial', 16, 'bold'), text="Search", bd=4, pady=1, padx=24, width=8,
height=2, command=searchDB).grid(row=4, column=0, padx=1)
self.btnReset = Button(RightFrame1, font=('Arial', 16, 'bold'), text="Reset", bd=4, pady=1, padx=24, width=8,
height=2, command=Reset).grid(row=5, column=0, padx=1)
self.btnExit = Button(RightFrame1, font=('Arial', 16, 'bold'), text="Exit", bd=4, pady=1, padx=24, width=8,
height=2, command=iExit).grid(row=6, column=0, padx=1)
if __name__=='__main__':
master = Tk()
application = ConnectorDB(master)
master.mainloop()
| true |
cd78108ab41a6396d70702a05fd9d096b578583f | Python | Bpless/ramdapy | /ramda/internal/_indexOf.py | UTF-8 | 428 | 2.84375 | 3 | [] | no_license | from ramda.internal._equals import _equals
def _indexOf(_iter, comp):
'''
In this implementation, as compared to ramdajs,
we are ignoring the distinction between +0 and -0.
We could delegate to `index` method for `Array`
and `String` type but that is not compatible with
generators.
'''
for i, element in enumerate(_iter):
if _equals(element, comp):
return i
return -1
| true |
cce9bc23c0288e843cdf723b6793cf1b1362faac | Python | Ahemmetter/comp-physics | /10_1_joern_vahland.py | UTF-8 | 7,046 | 3.5 | 4 | [] | no_license | #! /usr/bin/env python
"""Uebung 10: Ising-Modell
Mit diesem Programm wird der Spinzustand eines 50x50 Gitters mit periodischen
Randbedingungen dargestellt. Es wird ausserdem die mittlere Magnetisierung der
Spins ueber der dimensionslosen Temperatur tau abgebildet. Im rechten Fenster
kann per Mausklick ein Ausgangszustand (tau und m) gewaehlt werden, welcher
auch im Gitter dargestellt wird. Ein Klick in das linke Fenster startet die
Simulation von 10 Monte-Carlo-Zeitschritten. Es wird die Aenderung der Spin-
Zustaende und der mittleren Magnetisierung dynamisch abgebildet.
"""
from __future__ import division
import numpy as np
from matplotlib import pyplot as plt
def m_inf(t):
"""Diese Funktion stellt die analytischen Werte fuer m_inf fuer die Zeiten
t bereit.
"""
# Setzte m=0 da fuer t > t_c eh m=0
m = np.zeros(len(t))
t_c = 2 / np.arcsinh(1)
# Berechne richtige Werte fuer m fuer t < t_c
m [ t < t_c ] = (1 - (1 / np.sinh(2/t[ t < t_c ])**4))**(1/8)
return m
def spinzustand_neu(m, n=50):
"""Diese Funktion berechnet zufaellige Spins fuer ein n x n Gitter mit den
Spin-Werten -1 und 1. Es kann die mittlere Magnetisierung m pro Spin uber-
geben werden.
"""
N = n**2 # Anzahl der Gitterpunkte
# Wahrscheinlichkeiten fuer Magn. +/- kann leicht aus p(-) + p(+) = 1 und
# <m> = 1/N sum(p_i(+) - p_i(-) bestimmt werden
p_plus = (m + 1)/2
p_minus = 1 - p_plus
spins = [-1, 1] # Spinmoeglichkeiten
# Bestimme Spins fuer n x n Gitter mit entspr. Wahrscheinlichkeit
gitter = np.random.choice(spins, size=(n, n), p=[p_minus, p_plus])
return gitter
def monte_carlo(gitter, n=50):
"""Diese Funktion fuehr auf dem n x n Gitter einen Monte-Carlo-Schritt
am n**2 zufaellig gewaehlten Spins durch
"""
# Anzahl der durchzufuehrenden Metropolis-Schritte
N = n**2
for i in range(N):
k, l = np.random.randint(n, size=2) # Matrix-Index fuer zuf. Spins
# Anliegende Spins (mit period. Randbed.) aufsummieren
sum_sigma = np.sum([gitter[k, ((l+1) % n)], gitter[k, ((l-1) % n)],
gitter[((k+1) % n), l], gitter[((k-1) % n), l]])
delta_H = 2 * gitter[k, l] * sum_sigma
# Pruefen ob Spin direkt geflippt oder zufaellig geflippt wird
if delta_H <= 0: # direkt geflippt (WS=1)
gitter[k, l] = -gitter[k, l]
else: # zufaellig geflippt (WS=ws_flip)
ws_flip = np.exp(-np.abs(delta_H)/tau)
# Es wird geprueft ob zufaellig geflippt werden muss
if np.random.uniform() < ws_flip:
gitter[k, l] = -gitter[k, l]
return gitter
def mouse_klick(event):
"""Bei Linksklick in die 'Spinverteilung' werden 10 Monte-Carlo-
Zeitschritte ausgefuehrt.
Bei Rechtsklick in die 'Mittlere Magnetisierung' wird ein neues Ausgangs-
Gitter mit den Klick-Koordinaten als Startparameter generiert.
"""
global gitter, tau
# Klick in linkes Fenster startet 10 Monte-Carlo-Schritte
if plt.get_current_fig_manager().toolbar.mode == '' and event.button == 1\
and event.inaxes == ax_gitter:
for i in range(10):
gitter = monte_carlo(gitter) # 1 Metropolis-Schritt
plt.setp(spins, data=gitter) # Gitter aktualisieren
# Phasendiagramm aktualisieren
plt.setp(phase, xdata=tau, ydata=np.mean(gitter))
plt.draw()
# Klick in rechtem Fenster generiert neues Spingitter
if plt.get_current_fig_manager().toolbar.mode == '' and event.button == 1\
and event.inaxes == ax_phase:
# Generieres neues Spin-Gitter mit mittlerer Magn. m = ydata und Plot
gitter = spinzustand_neu(event.ydata, n=n)
plt.setp(spins, data=gitter)
# Setzte tau auf den x-Wert des Klicks
tau = event.xdata
# Berechne wirkliches m aus dem gen. Gitter und Ausgabe in Plot
plt.setp(phase, xdata=tau, ydata=np.mean(gitter))
plt.draw()
def main():
"""Es wird das Ising-Modell abgebildet. Die Startwerte werden zu tau = 1.5
und m=0.8 gewaehlt.
"""
# Benutzerfuehrung
print __doc__
print "Der Spin '+1' wird in rot, der Spin '-1' wird in blau dargestellt"
# einige globale Parameter fuer Event-Funktion
global ax_gitter, ax_phase, gitter, tau, spins, phase, n
n = 50 # Gittergroesse
# Ausgangswerte
tau = 1.5 # dimensionslose Temperatur
m = 0.8 # mittlere Magnetisierung
# Plotbereiche anlegen
plt.figure(0, figsize=(15,7))
ax_gitter = plt.subplot(121)
ax_gitter.set_title("Spinverteilung")
ax_phase = plt.subplot(122)
ax_phase.set_title("Mittlere Magnetisierung")
ax_phase.set_xlabel(r"$\tau$")
ax_phase.set_ylabel(r"$m$")
ax_phase.set_xlim(0, 4)
ax_phase.set_ylim(-1.1, 1.1)
# oberen und unteren Zweig fuer analytischen Wert von m_inf zeichnen
# bei den
temps = np.linspace(4, 0, 1000, endpoint=False)
ax_phase.plot(temps, m_inf(temps), color='b', lw=2, label=r"$m_\infty$")
ax_phase.plot(temps, -m_inf(temps), color='b', lw=2)
ax_phase.legend(loc="upper right")
# Ausgangs Spin-Gitter berechnen
gitter = spinzustand_neu(m, n=n)
# Ausgangsplots erstellen und ausgeben
spins = ax_gitter.imshow(gitter, interpolation='nearest')
phase = ax_phase.plot(tau, np.mean(gitter), marker='o', color='k', ms=6)
plt.connect('button_press_event', mouse_klick)
plt.show()
if __name__ == "__main__":
main()
# tau = 1.5:
# Der Startwert von m beeinflusst stark den Verlauf der Monte-Carlo-
# Schritte. Desto naeher man an den zu erwartenden Werten von ca. -1/+1
# startet, desto eher stellt sich der zu erwartende Wert auf der
# analytischen Kurve ein. Legt man den Startwert in die Naehe von m=0 so
# kann beobachtet werden wie der Wert sehr lange um die 0 schwankt.
# Ein aehnliches Verhalten kann auch beobachtet werden wenn sich im
# Spin-Gitter 'Inseln' bilden. Diese fuehren dazu, dass wenig Spins
# flippen, da ihre umliegenden Spins ein flippen unwahrscheinlich machen.
# tau = 3:
# Es kann beobachtet werden, dass die mittlere Magnetisierung stark
# schwankt. Durch die sehr zufaellig verteilten Spin-Orientierung
# ist auch das flippen der einzelnen Spins sehr zufaellig. Dadurch
# schwankt auch der Mittelwert aller Spins entsprechend.
# Ich bekomme eine RuntimeWarning-Meldung fuer die Berechnung in Zeile 25. Ich
# bin mir nicht sicher wie der power-overflow entsteht, da ich ja eigentlich
# nur die benoetigten Werte uebergebe und die Formel ja auch richtig ueber-
# nommen sein sollte, und es scheinbar keine Beeintraechtigung beim ausfuehren
# des Programms gibt, und es auch schon recht spet ist, bin ich leider nicht
# mehr in der Lage dieses Problem zu beheben und wollte nur darauf aufmerksam
# machen das mir diese Fehlermeldung aufgefallen ist.
| true |
05267e2c44a614f34f841c0f6ed9ceb55a9b9d02 | Python | kevana/corpscores | /tests/test_forms.py | UTF-8 | 6,462 | 2.578125 | 3 | [] | no_license | # -*- coding: utf-8 -*-
'''
Form tests.
'''
from dci_notify.admin.forms import SendMessageForm
from dci_notify.public.forms import LoginForm
from dci_notify.user.forms import RegisterForm
class TestRegisterForm:
def test_validate_user_already_registered(self, user):
# Enters username that is already registered
form = RegisterForm(username=user.username, email='foo@bar.com',
carrier='at&t', phone_num='5551234567',
password='example', confirm='example')
assert form.validate() is False
assert 'Username already registered' in form.username.errors
def test_validate_email_already_registered(self, user):
# enters email that is already registered
form = RegisterForm(username='unique', email=user.email,
carrier='at&t', phone_num='5551234567',
password='example', confirm='example')
assert form.validate() is False
assert 'Email already registered' in form.email.errors
def test_validate_phone_already_registered(self, user):
# Enters phone number that is already registered
form = RegisterForm(username='unique', email='foo@bar.com',
carrier='at&t', phone_num=user.phone_num,
password='example', confirm='example')
assert form.validate() is False
assert 'Phone number already registered' in form.phone_num.errors
def test_validate_strings_too_long(self, user):
# Username
form = RegisterForm(username='u'*81, email='foo@bar.com',
carrier='at&t', phone_num='5551234567',
password='example', confirm='example')
assert form.validate() is False
assert 'Field must be between 3 and 25 characters long.' in form.username.errors
# Email
form = RegisterForm(username='unique', email='foo@'+'bar'*25+'.com',
carrier='at&t', phone_num='5551234567',
password='example', confirm='example')
assert form.validate() is False
assert 'Field must be between 6 and 40 characters long.' in form.email.errors
# First Name
form = RegisterForm(username='unique', email='foo@bar.com',
carrier='at&t', phone_num='5551234567',
password='example', confirm='example',
first_name='a'*100)
assert form.validate() is False
assert 'Field cannot be longer than 30 characters.' in form.first_name.errors
# Last Name
form = RegisterForm(username='unique', email='foo@bar.com',
carrier='at&t', phone_num='5551234567',
password='example', confirm='example',
last_name='a'*100)
assert form.validate() is False
assert 'Field cannot be longer than 30 characters.' in form.last_name.errors
# Corps
form = RegisterForm(username='unique', email='foo@bar.com',
carrier='at&t', phone_num='5551234567',
password='example', confirm='example',
corps='a'*100)
assert form.validate() is False
assert 'Field cannot be longer than 80 characters.' in form.corps.errors
# Phone number
form = RegisterForm(username='unique', email='foo@bar.com',
carrier='at&t', phone_num='55512345671111111',
password='example', confirm='example',
first_name='a'*100)
assert form.validate() is False
assert 'Field must be between 10 and 10 characters long.' in form.phone_num.errors
def test_validate_success_no_names(self, db):
form = RegisterForm(username='newusername', email='new@test.test',
carrier='at&t', phone_num='5551234567',
password='example', confirm='example')
assert form.validate() is True
def test_validate_success_with_names(self, db):
form = RegisterForm(username='newusername', email='new@test.test',
carrier='at&t', phone_num='5551234567',
first_name='John', last_name='Smith',
password='example', confirm='example',
corps='Bluecoats')
assert form.validate() is True
class TestLoginForm:
def test_validate_success(self, user):
user.set_password('example')
user.save()
form = LoginForm(username=user.username, password='example')
assert form.validate() is True
assert form.user == user
def test_validate_unknown_username(self, db):
form = LoginForm(username='unknown', password='example')
assert form.validate() is False
assert 'Unknown username' in form.username.errors
assert form.user is None
def test_validate_invalid_password(self, user):
user.set_password('example')
user.save()
form = LoginForm(username=user.username, password='wrongpassword')
assert form.validate() is False
assert 'Invalid password' in form.password.errors
def test_validate_inactive_user(self, user):
user.active = False
user.set_password('example')
user.save()
# Correct username and password, but user is not activated
form = LoginForm(username=user.username, password='example')
assert form.validate() is False
assert 'User not activated' in form.username.errors
class TestSendMessageForm:
def test_validate_no_recipients_selected(self, user):
pass
form = SendMessageForm(message='Test Message')
assert form.validate() is False
assert 'This field is required.' in form.users.errors
def test_validate_empty_message(self, user):
form = SendMessageForm(users=[user.id])
assert form.validate() is False
assert 'This field is required.' in form.message.errors
def test_validate_success(self, user):
form = SendMessageForm(users=[user.id], message='Test')
form.users.choices = [(user.id, user.full_name)]
assert form.validate() is True
assert user in form.users_list
| true |
e91e2a532d94a7c48a506a260224c09853bc2a02 | Python | aav331/Risk-Engine-for-all-New-York-Restaurants-using-Python | /Dist_Fire.py | UTF-8 | 715 | 2.859375 | 3 | [] | no_license | import json
import requests
import pandas as pd
import numpy as np
import geopy.distance
def get_fire_station_distance(rest):
fire_station = pd.read_csv('FDNY_Firehouse_Listing.csv')
fire_station = fire_station.dropna(subset=['Latitude', 'Longitude'])
res = [np.float(rest['Latitude']), np.float(rest['Longitude'])]
dist = []
for r in fire_station.index.values:
f = fire_station.loc[r, 'Latitude':'Longitude']
d = geopy.distance.distance(f, res).km * 1000
dist.append(d)
minimum_distance_to_fire_station = min(dist)
# print("Distance to fire station is:", minimum_distance_to_fire_station)
return (round(minimum_distance_to_fire_station,2))
| true |
96df9e06f74a71561baae8fa5d179bdef9ff44f0 | Python | huoweikong/Myprojects_python_pycharm | /src/test2.py | UTF-8 | 408 | 3.234375 | 3 | [] | no_license |
import re
tt="Tina is a good girl, she is cool, clever, and so on..."
rr=re.compile(r'\w*oo\w*')
print(rr.findall(tt))
p = re.compile(r'\d{3}-\d{6}')
print(p.findall('010-628888'))
print(p.search('010-628888').group())
a = re.search("a(\d+)b",'a3333b').group()
print(a)
b = re.findall(r"a(\d+?)b",'a3333b')
print(b)
src='那个人看起来好像一条狗,哈哈'
print(src.replace(',哈哈','.')) | true |
d2e858271a8293c242872c77134391cddbcfba76 | Python | vijaysundar2701/python | /pro41.py | UTF-8 | 465 | 2.75 | 3 | [] | no_license | az,by=input().split()
az=int(az)
by=int(by)
d=''
u=2
if(az+by<=3):
for i in range(0,az+by):
if(i%2!=0):
d=d+'0'
else:
d=d+'1'
else:
for i in range(0,az+by):
if(i==u):
d=d+'0'
if(u==by):
u=u+2
else:
u=u+3
else:
d=d+'1'
x=len(d)-1
if(int(d[x])==0):
print('-1')
elif az==1 and by==2: print("011")
else:
print(d)
| true |
49cc1b0f43427cf83ee0fdeeedb04a882d3a1e48 | Python | shakaran/light9 | /bcf2000.py | UTF-8 | 4,164 | 2.71875 | 3 | [] | no_license | #!/usr/bin/python
from __future__ import division
import math
import twisted.internet.fdesc
from twisted.internet import reactor
from twisted.internet.task import LoopingCall
class BCF2000(object):
control = {81 : "slider1", 82 : "slider2", 83 : "slider3", 84 : "slider4",
85 : "slider5", 86 : "slider6", 87 : "slider7", 88 : "slider8",
1 : "knob1", 2 : "knob2", 3 : "knob3", 4 : "knob4",
5 : "knob5", 6 : "knob6", 7 : "knob7", 8 : "knob8",
33 : "button-knob1", 34 : "button-knob2",
35 : "button-knob3", 36 : "button-knob4",
37 : "button-knob5", 38 : "button-knob6",
39 : "button-knob7", 40 : "button-knob8",
65 : "button-upper1", 66 : "button-upper2",
67 : "button-upper3", 68 : "button-upper4",
69 : "button-upper5", 70 : "button-upper6",
71 : "button-upper7", 72 : "button-upper8",
73 : "button-lower1", 74 : "button-lower2",
75 : "button-lower3", 76 : "button-lower4",
77 : "button-lower5", 78 : "button-lower6",
79 : "button-lower7", 80 : "button-lower8",
89 : "button-corner1", 90 : "button-corner2",
91 : "button-corner3", 92 : "button-corner4",
}
def __init__(self, dev="/dev/snd/midiC1D0"):
"""device was usually /dev/snd/midiC1D0 but then it showed up
once as C0D0. It should be autodetected"""
self.devPath = dev
self.dev = None
self.lastValue = {} # control name : value
self.reopen()
self.packet = ""
loop = LoopingCall(self.poll)
loop.start(.01)
def poll(self):
try:
bytes = self.dev.read(3)
except (IOError, AttributeError):
return
if len(bytes) == 0:
print "midi stall, reopen slider device"
self.reopen()
return
self.packet += bytes
if len(self.packet) == 3:
p = self.packet
self.packet = ""
self.packetReceived(p)
def packetReceived(self, packet):
b0, which, value = [ord(b) for b in packet]
if b0 != 0xb0:
return
if which in self.control:
name = self.control[which]
if name.startswith("button-"):
value = value > 0
self.lastValue[name] = value
self.valueIn(name, value)
else:
print "unknown control %s to %s" % (which, value)
def reopen(self):
if self.dev is not None:
try:
self.dev.close()
except IOError:
pass
self.lastValue.clear()
self.dev = open(self.devPath, "r+")
twisted.internet.fdesc.setNonBlocking(self.dev)
def valueIn(self, name, value):
"""override this with your handler for when events come in
from the hardware"""
print "slider %s to %s" % (name, value)
if name == 'slider1':
for x in range(2,8+1):
v2 = int(64 + 64 * math.sin(x / 3 + value / 10))
self.valueOut('slider%d' % x, v2)
for x in range(1,8+1):
self.valueOut('button-upper%s' % x, value > x*15)
self.valueOut('button-lower%s' % x, value > (x*15+7))
def valueOut(self, name, value):
"""call this to send an event to the hardware"""
if self.dev is None:
return
value = int(value)
if self.lastValue.get(name) == value:
return
self.lastValue[name] = value
which = [k for k,v in self.control.items() if v == name]
assert len(which) == 1, "unknown control name %r" % name
if name.startswith('button-'):
value = value * 127
#print "bcf: write %s %s" % (name, value)
self.dev.write(chr(0xb0) + chr(which[0]) + chr(int(value)))
def close(self):
self.dev.close()
self.dev = None
if __name__ == '__main__':
b = BCF2000()
reactor.run()
| true |
5c9b9ae3fb92485c539bb2eb6226d0403d14f295 | Python | rufuspollock/openspending | /openspending/ui/lib/views.py | UTF-8 | 6,448 | 2.671875 | 3 | [] | no_license | '''
This module implements views on the database.
'''
import logging
from collections import defaultdict
from openspending import mongo
from openspending import model
from openspending.lib.cubes import Cube, find_cube
log = logging.getLogger(__name__)
class View(object):
def __init__(self, dataset, name, label, dimension,
drilldown=None, cuts={}):
self.dataset = dataset
self.name = name
self.label = label
self.dimension = dimension
self.drilldown = drilldown
self.cuts = cuts
def apply_to(self, obj, filter):
"""
Applies the view to all entities in the same collection of
``obj`` that match the query ``filter``.
``obj``
a model object (instance of :class:`openspending.model.Base`)
``filter``
a :term:`mongodb query spec`
"""
data = self.pack()
mongo.db[obj.collection].update(
filter,
{'$set': {'views.%s' % self.name: data}},
multi=True
)
@classmethod
def by_name(cls, obj, name):
"""get a``View`` with the name ``name`` from the object
``obj``
a model object (instance of :class:`openspending.model.Base`)
``name``
The name of the ``View``
returns: An instance of :class:`View` if the view could
be found.
raises: ``ValueError`` if the view does not exist.
"""
if not 'views' in obj:
raise ValueError("%s has no views." % obj)
view_data = obj.get('views').get(name)
if view_data is None:
raise ValueError("View %s does not exist." % name)
return cls.unpack(name, view_data)
def pack(self):
"""
Convert view to a form suitable for storage in MongoDB.
Internal method, no API.
"""
return {
"label": self.label,
"dataset": self.dataset.get('name'),
"dimension": self.dimension,
"drilldown": self.drilldown,
"cuts": self.cuts
}
@classmethod
def unpack(cls, name, data):
"""
Create a :class:`View` instance from a view ``name``
and a datastructure ``data`` (like it is created by
:meth:`pack`). Internal mehtod, no API.
"""
dataset = model.dataset.find_one_by('name', data.get('dataset'))
return cls(dataset, name, data.get('label'), data.get('dimension'),
drilldown=data.get('drilldown'),
cuts=data.get('cuts', {}))
@property
def base_dimensions(self):
dimensions = [self.dimension, 'year']
dimensions.extend(self.cuts.keys())
return dimensions
@property
def full_dimensions(self):
dimensions = self.base_dimensions
if self.drilldown:
dimensions.append(self.drilldown)
return dimensions
@property
def signature(self):
return "view_%s_%s" % (self.name, "_".join(sorted(self.full_dimensions)))
def compute(self):
# TODO: decide if this is a good idea
if not find_cube(self.dataset, self.full_dimensions):
Cube.define_cube(self.dataset, self.signature, self.full_dimensions)
class ViewState(object):
def __init__(self, obj, view, time):
self.obj = obj
self.view = view
self.time = time
self._totals = None
self._aggregates = None
@property
def available_views(self):
return self.obj.get('views', {})
@property
def cuts(self):
_filters = self.view.cuts.items()
_filters.append((self.view.dimension + "._id", self.obj.get('_id')))
return _filters
@property
def totals(self):
if self._totals is None:
self._totals = {}
cube = find_cube(self.view.dataset, self.view.base_dimensions)
if cube is None:
log.warn("Run-time has view without cube: %s",
self.view.base_dimensions)
return self._totals
results = cube.query(['year'], self.cuts)
for entry in results.get('drilldown'):
self._totals[str(entry.get('year'))] = entry.get('amount')
return self._totals
@property
def aggregates(self):
if self._aggregates is None:
if self.view.drilldown is None:
return []
res = defaultdict(dict)
drilldowns = []
cube = find_cube(self.view.dataset, self.view.full_dimensions)
if cube is None:
log.warn("Run-time has view without cube: %s",
self.view.full_dimensions)
return []
results = cube.query(['year', self.view.drilldown], self.cuts)
for entry in results.get('drilldown'):
d = entry.get(self.view.drilldown)
if not d in drilldowns:
drilldowns.append(d)
res[drilldowns.index(d)][str(entry.get('year'))] = \
entry.get('amount')
self._aggregates = [(drilldowns[k], v) for k, v in res.items()]
# sort aggregations by time
if self.time is not None:
self._aggregates = sorted(self._aggregates, reverse=True,
key=lambda (k, v): v.get(self.time, 0))
return self._aggregates
def times(dataset, time_axis):
return sorted(model.entry.find({'dataset.name': dataset}).distinct(time_axis))
def handle_request(request, c, obj):
view_name = request.params.get('_view', 'default')
try:
c.view = View.by_name(obj, view_name)
except ValueError:
c.view = None
return
c.dataset = c.view.dataset
if c.dataset is None:
return
time_axis = c.dataset.get('time_axis', 'time.from.year')
req_time = request.params.get('_time')
c.times = times(c.dataset.get('name'), time_axis)
if req_time in c.times:
c.state['time'] = req_time
c.time = c.state.get('time')
if c.time not in c.times and len(c.times):
c.time = c.dataset.get('default_time', c.times[-1])
# TODO: more clever way to set comparison time
c.time_before = None
if c.time and c.times.index(c.time) > 0:
c.time_before = c.times[c.times.index(c.time) - 1]
c.viewstate = ViewState(obj, c.view, c.time)
| true |
b6d82d09e5939a410d3e8a24a1f294da47dfbab7 | Python | wuzhen-kelly/TestCode | /Chapter 6/tic_tac_toe.py | UTF-8 | 2,325 | 4.03125 | 4 | [] | no_license | #Tic-Tac-Toe
#跟人类对手下井字棋
#全局变量
X="X"
O="O"
EMPTY=""
TIE="TIE"
NUM_SQUARES=9
#显示游戏的说明
def instructions():
"""Display game instructions."""
print(
"""
Welcome to the greatest intellectual challenge of all time :Tic-Tac-Toe.
This will be a showdown between your human brain and my silicon processor.
You will make your move know by entering a number,0-8.The number
will correspond to the board position as illustrated:
0 | 1 | 2
---------
3 | 4 | 5
---------
6 | 7 |8
Prepare yourself ,human.The ultimate battle is about to begin.\n
"""
)
def ask_yes_no(question):
"""Ask a yes or no question."""
response=None
while response not in('y',"n"):
response=input(question).lower()
return response
#用于请求用户给出指定范围内的一个数字
def ask_number(question,low,high):
"""Ask for a number within a range."""
response=None
while response not in range(low,high):
response=int(input(question))
return response
#询问玩家是否希望先行棋,然后据此返回机器人和玩家的棋子。跟进井字棋的传统玩法,X先走
def pieces():
"""Determine if player or computer goes first."""
go_first=ask_yes_no("Do you require the first move?(y/n):")
if go_first=="y":
print("\nThen take the first move.You will need it.")
human=X
computer=O
else:
print("\nYour bravery will be your undoing...I will go first.")
computer=X
human=O
return computer,human
#用于创建新棋盘(一个长度为9的列表,各元素均被设置为EMPTY),然后将其返回
def new_board():
"""Create new game board."""
board=[]
for suqare in range(NUM_SQUARES):
board.append(EMPTY)
return board
#将棋盘显示出来
def display_board(board):
"""Display game board on screen."""
print("\n\t",board[0],"|",board[1],"|"board[2])
print(""\t,"---------")
print("\n\t",board[3],"|",board[4],"|"board[5])
print(""\t,"---------")
print("\n\t",board[6],"|",board[7],"|"board[8],"\n")
#该函数接收一个棋盘,并返回一组合法的行棋步骤
def legal_move(board):
| true |
b5a2eb552cc628bf7206bd86c619e46f0b0ac36c | Python | Orb-H/nojam | /source/nojam/10773.py | UTF-8 | 137 | 3.140625 | 3 | [] | no_license | k = int(input())
a = []
for i in range(k):
c = int(input())
if c > 0:
a.append(c)
else:
a.pop()
print(sum(a)) | true |
b74eb45cfd403ef074d8d2e537f373a10fdf0e8c | Python | shenhaiyu0923/resful | /z_python-stu1/数据库/查询.py | UTF-8 | 383 | 3.125 | 3 | [] | no_license | import MySQLdb
# 打开数据库连接
db = MySQLdb.connect("localhost", "root", "123456", "test",charset='utf8')
# 使用cursor()方法获取操作游标
cur = db.cursor()
# SQL 插入语句
sql = "select * from xiao where id = 1"
try:
cur.execute(sql)
data = cur.fetchone()
print("id","name","age","sex")
print (data)
except:
print("查询失败")
db.close() | true |
a137e7bacdf301266f37c6264fa117c3bf782f12 | Python | rohanmaddamsetti/STLE-analysis | /unused-code/plot-trees.py | UTF-8 | 648 | 2.703125 | 3 | [] | no_license | #!/usr/bin/env python
'''
plot-trees.py by Rohan Maddamsetti
hack to plot trees made from the concatenated tree clusters.
'''
import json
from pprint import pprint
import os
from ete3 import Tree
def main():
tree_list = []
treedir = "/Users/Rohandinho/Desktop/Projects/STLE-analysis/results/gene-tree-analysis/concat-gene-trees"
for f in os.listdir(treedir):
if not f.endswith('.json'):
continue
with open(os.path.join(treedir,f)) as data_file:
data = json.load(data_file)
jsontree = data['ml_tree']
t = Tree(jsontree)
print(jsontree)
print()
main()
| true |
df89fe17d1a232ebcf17175c903ee8202f014bbf | Python | hanguangbaihuo/sparrow_cloud | /sparrow_cloud/auth/user.py | UTF-8 | 467 | 2.734375 | 3 | [
"MIT"
] | permissive | # -*- coding: utf-8 -*-
class UserBase(object):
'''自定义的 User 对象'''
def __init__(self, user_id):
self._id = user_id
@property
def is_authenticated(self):
return True
@property
def id(self):
return self._id
class User(UserBase):
def __init__(self, user_id, payload):
super().__init__(user_id)
self._payload = payload
@property
def payload(self):
return self._payload | true |
f44c543fa100a7975231da2e663431bad3ecd53c | Python | Mywayking/user_agent_analysis | /mobile_identify/spider_fynas_ua/html_parser.py | UTF-8 | 2,893 | 2.75 | 3 | [] | no_license | # -*- coding: UTF-8 -*-
import re
import urlparse
from bs4 import BeautifulSoup
# import sys
# reload(sys)
# sys.setdefaultencoding('utf-8')
class HtmlParser(object):
def __init__(self):
self.page_url = "http://www.fynas.com"
def parse_urls(self, html_cont):
if html_cont is None:
return
new_urls = set()
soup = BeautifulSoup(html_cont, 'html.parser', from_encoding='utf-8')
links = soup.find_all('a', href=re.compile(r"/ua/search\?b=&d="))
# page_url="http://www.fynas.com"
for link in links:
new_url = link['href'].encode('utf-8')
# print new_url
new_full_url = urlparse.urljoin(self.page_url, new_url)
print
new_full_url
new_urls.add(new_full_url)
return new_urls
def parse(self, phone_urls, html_cont):
if html_cont is None:
return
soup = BeautifulSoup(html_cont, 'html.parser', from_encoding='utf-8')
next_urls = self._next_new_urls(soup)
new_data = self._get_new_data(phone_urls, soup)
return next_urls, new_data
def _next_new_urls(self, soup):
# next_urls = set()
# /view/123.htm
# page_url="http://www.fynas.com"
try:
x = soup.find('a', string=re.compile(u"下页"))
link = x['href'].encode('utf-8')
next_urls = urlparse.urljoin(self.page_url, link)
# print next_urls
return next_urls
except:
return 1
# # new_urls=1
return next_urls
def _get_new_data(self, phone_urls, soup):
# res_data = {}
data = []
s = re.findall(r"http:\/\/www\.fynas\.com\/ua\/search\?b=&d=(.*)", phone_urls)
print
s
if s[0] == '华为' or s[0] == '荣耀':
co = "Huawei"
elif s[0] == '小米' or s[0] == '红米':
co = "Xiaomi"
elif s[0] == '三星':
co = "Samsung"
elif s[0] == '魅族':
co = "Meizu"
elif s[0] == 'OPPO' or s[0] == 'vivo':
co = "OPPO"
elif s[0] == '锤子':
co = "Smartisan"
elif s[0] == 'iphone':
co = "Apple"
# print res_data['company']
# soup = BeautifulSoup(html_doct,'html.parser', from_encoding='utf-8')
trs = soup.find_all('tr')
for i in range(1, len(trs)):
# print trs[i]
res_data = {}
res_data['company'] = co
tds = trs[i].find_all('td')
# print tds
res_data['mobile'] = tds[0].string.strip()
res_data['OS'] = tds[1].string.strip()
res_data['browser'] = tds[2].string.strip()
# get_text()
res_data['UserAgent'] = tds[3].string.strip()
data.append(res_data)
return data
| true |
5f0cae0c05d8071f8bc29f367c67ad27a29baaaa | Python | hitochan777/kata | /atcoder/arc083/A.py | UTF-8 | 694 | 2.828125 | 3 | [] | no_license | A, B, C, D, E, F = (int(x) for x in input().split())
max_val = 0
ans = None
for ca in range(0, 31):
if 100*A*ca > F:
break
for cb in range(0, 16):
if 100*A*ca + 100*B*cb > F:
break
for cc in range(0, 3001):
if 100*A*ca + 100*B*cb +C*cc> F:
break
for cd in range(0, 1501):
if 100*A*ca + 100*B*cb +C*cc + D*cd > F:
break
S = 100*A*ca + 100*B*cb + C*cc + D*cd
if S == 0:
continue
if C*cc + D*cd > (A*ca + B*cb)*E:
continue
sugar = C*cc + D*cd
max_val = max(max_val, 100 * sugar / S)
if max_val == 100 * sugar / S:
ans = (S, sugar)
print(*ans)
| true |
28272b36f58ae903a789524512df93e3ab2db3f8 | Python | neverholiday/mytestwork | /puzzle/seven_dwarf.py | UTF-8 | 816 | 3.109375 | 3 | [] | no_license | import argparse
ap = argparse.ArgumentParser()
ap.add_argument("--input",help = "each number are seperated by comma",required=True)
args = vars(ap.parse_args())
number_of_dwarfs = args["input"].split(",")
number_of_dwarfs = [int(n) for n in number_of_dwarfs]
print number_of_dwarfs
temp_sum = 0
confirm_dwarfs = []
first_group = number_of_dwarfs[0:len(number_of_dwarfs)-2]
second_group = [number_of_dwarfs[len(number_of_dwarfs)-2],number_of_dwarfs[len(number_of_dwarfs) - 1]]
for sec in second_group:
for i in range(len(first_group)):
temp_sum = sum(first_group) - first_group[i]
temp_sum = temp_sum + sec
if(temp_sum == 100):
confirm_dwarfs = first_group
confirm_dwarfs.pop(i)
confirm_dwarfs.append(sec)
temp_sum = 0
print confirm_dwarfs | true |
99561d14025364c0bb344988ce73f51456bf1e39 | Python | bencecile/FFMpegSplit | /main.py | UTF-8 | 8,603 | 3.375 | 3 | [] | no_license | """
Benjamin Cecile
Uses FFMpeg to split a music file into individual tracks
By using FFMpeg, any file format that it supports can be split
The saved files will be in a folder with the same name as the original music filename
Ex. something/music.mp4 (as in the timing file) -> something/music/* (files inside that folder)
With regards to metadata, it will make a best effort for each file
If it's a file format that doesn't support metadata, it will try again without setting metadata
The metadata fields that will be set:
- Title (nameOfSong)
- Artist/Author (artist)
- Album (original music filename)
Format of the timing file:
Music filename to use for input
"|" are used for separators
startTime[|endTime]|nameOfSong[|artist] (the endTime and artist are optional)
... (Use the above format for as many lines as needed)
Any line that starts with "#" will be ignored
* endTime is optional and will use the next line's startTime or the end of the file as the end
of the current song
* The times are in the format of:
[[HH:]MM:]SS[.m...]
"""
import argparse
from pathlib import Path
import re
import subprocess
def main():
"""
The main entrypoint for the program
"""
#Create a parser to get all of the command line arguments
parser = argparse.ArgumentParser(description="Split up a music file into individual tracks")
parser.add_argument("timing_files", type=Path, nargs="+",
help="The timing file that describes how a file will be split")
args = parser.parse_args()
#Check the existence of FFMpeg on the PATH
#We also want to silence any output from it
try:
result = subprocess.run(["ffmpeg", "--help"], stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
result.check_returncode()
except (FileNotFoundError, subprocess.CalledProcessError):
print("FFMpeg needs to be installed on this machine and able to be found on the PATH")
exit(1)
#Make a list of tracks, making sure it exists, then using FFMpeg to split the files
all_tracks = [get_timings(i) for i in args.timing_files if check_good_file(i)]
for i in all_tracks:
if isinstance(i, str):
#Print the error message if the track is actually a string
print(i)
continue
print("Splitting '%s'..." % i["music_file"], end="\r")
size = len(i["tracks"])
for (num, track) in enumerate(i["tracks"]):
track_result = split(i["music_file"], track)
#Give up on these tracks if we get an error
if isinstance(track_result, str):
print(track_result)
break
print("Splitting '%s' at track #%d/%d" % (i["music_file"], num, size), end="\r")
print("Finished splitting '%s' for %d tracks" % (i["music_file"], size))
def check_good_file(file):
"""
Checks if the given file exists, returning a boolean
If it doesn't exist, it will print a message saying so
"""
if not file.exists():
print("The file '%s' doesn't exist" % file)
return False
return True
def get_timings(timing_file):
"""
Get the timings from the file
"""
tracks = {"tracks": []}
with open(timing_file) as reader:
#Find the music file
(line, lines) = get_next_line(reader)
tracks["music_file"] = Path(line)
if not tracks["music_file"].exists():
return "The given music file '%s' in '%s' doesn't exist" % (tracks["music_file"],
timing_file)
#Find the tracks
(line, next_lines) = get_next_line(reader)
line_num = lines + next_lines
while line:
track = parse_track(line)
#Return the error message, providing context that parse_track doesn't have
if isinstance(track, str):
return track % (timing_file, line_num)
tracks["tracks"].append(track)
(line, lines) = get_next_line(reader)
line_num += lines
#Adjust the end_times if they don't exist
if len(tracks["tracks"]) > 1:
for (i, track) in enumerate(tracks["tracks"][:-1]):
#If we can't find an end_time copy the start time from the next track
if track["end_time"] is None:
track["end_time"] = tracks["tracks"][i + 1]["start_time"]
return tracks
def get_next_line(reader):
"""
Gets the next real line by ignoring comments
The major thing it does is return None if the line is a comment
"""
line = reader.readline()
count = 1
while line and line[0] == "#":
line = reader.readline()
count += 1
#Strip of any whitespace before or after the line (including a newline)
return (line.strip(), count)
def parse_track(track):
"""
Tries to parse a track. This is a line from the timing file
If the parsing fails, it will return an error string that will be subbed with the timing file
name and the track number
If the optional parts (end_time and artist) are not there, they will have None instead
"""
parts = track.split("|")
if len(parts) < 2:
return "'%s' at line %d must have a start time and a song name"
start_time = parse_time(parts[0])
#Need to explicitly check for False because the time could be 0
if start_time is False:
return "'%s' at line %d must follow the correct time syntax in the start time"
end_time = parse_time(parts[1])
if end_time is False:
#Adjust the name_index if the end_time wasn't there
name_index = 1
end_time = None
else:
name_index = 2
if name_index >= len(parts):
return "'%s' at line %d must have a song name"
song_name = parts[name_index]
artist = None
if name_index + 1 < len(parts):
artist = parts[name_index + 1]
return {
"start_time": start_time,
"end_time": end_time,
"song_name": song_name,
"artist": artist
}
#This regex gets the time with hours, minutes and milliseconds as optional
#Hours, minutes and seconds are all 2 digits
#Milliseconds can any number of digits
TIME_RE = re.compile(r"^(?:(?:(?P<H>\d\d):)?(?P<M>\d\d):)?(?P<S>\d\d)(?:(?:\.)(?P<ms>\d+))?$")
def parse_time(time):
"""
If the given time is a time, return time in seconds or False
"""
match = TIME_RE.match(time)
if not match:
return False
seconds = int(match["S"])
if match["H"]: #Hours
seconds += int(match["H"]) * 3600
if match["M"]: #Minutes
seconds += int(match["M"]) * 60
if match["ms"]: #Milliseconds
seconds += int(match["ms"]) / 1000
return seconds
def split(file, track):
"""
Splits the given track with FFMpeg from the file
Returns a string if there was an error, None if not
"""
#Set the standard run options
options = ["ffmpeg"]
#Set the start time of the big music file
options.append("-ss")
options.append(str(track["start_time"]))
#Set the duration by using the end time
#If there isn't an end time, that means it's the last track and should go to the end of the file
if track["end_time"] is not None:
options.append("-t")
options.append(str(track["end_time"] - track["start_time"]))
#Set the input file
options.append("-i")
options.append(str(file))
#Make sure to copy the codec
options.append("-c")
options.append("copy")
#Set the force overwrite
options.append("-y")
music_dir = (file.parent / file.stem).resolve()
music_dir.mkdir(exist_ok=True)
name = track["song_name"]
if track["artist"]:
name += " by %s" % track["artist"]
#Append the file that we want to create
#It will be inside a directory named the same of the file (without the suffix)
options.append("%s/%s%s" % (music_dir, name, file.suffix))
ffmpeg = subprocess.run(options, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
if ffmpeg.returncode:
return "FFMpeg error on track '%s' in '%s'\nStderr:\n%s" % (options[-1], file,
ffmpeg.stderr.decode("UTF-8"))
return None
if __name__ == "__main__":
main()
| true |
7e15ae765da27b1f50ae961290b2f48ba9962248 | Python | isaaczst/zstProject | /CartPoleNN_Openloop/Task2a.py | UTF-8 | 6,126 | 2.9375 | 3 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 03 00:49:43 2016
@author: a8zn5
"""
class CartPoleV0(object):
def __init__(self, parameter):
self.gravity = 9.8
self.masscart = parameter[0]
self.masspole = parameter[1]
self.total_mass = (self.masspole + self.masscart)
self.length = parameter[2] # actually half the pole's length
self.polemass_length = (self.masspole * self.length)
self.force_mag = parameter[3]
self.tau = 0.02 # seconds between state updates
# Angle at which to fail the episode
self.theta_threshold_radians = 12 * 2 * math.pi / 360
#self.x_threshold = parameter[0]
def step(self, state, force):
x, x_dot, theta, theta_dot = state
# force = force_mag if action==1 else -force_mag
costheta = math.cos(theta)
sintheta = math.sin(theta)
temp = (force + self.polemass_length * theta_dot * theta_dot * sintheta) / self.total_mass
thetaacc = (self.gravity * sintheta - costheta* temp) / (self.length * (4.0/3.0 - self.masspole * costheta * costheta / self.total_mass))
xacc = temp - self.polemass_length * thetaacc * costheta / self.total_mass
x = x + self.tau * x_dot
x_dot = x_dot + self.tau * xacc
theta = theta + self.tau * theta_dot
theta_dot = theta_dot + self.tau * thetaacc
state = (x,x_dot,theta,theta_dot)
return np.array(state) #, reward, done, {}
class nnLearner1(object):
def __init__(self, structure,timeStepRange):
self.l0Size=structure[0] # inputs
self.l1Size=structure[1] # neurons for hidden layer1
self.l2Size=structure[2] # neurons for hidden layer2
self.l3Size=structure[3] # neurons for output layer
np.random.seed(1)
self.syn0 = 0.2*np.random.random((self.l0Size,self.l1Size)) - 0.1
self.syn1 = 0.2*np.random.random((self.l1Size,self.l2Size)) - 0.1
self.syn2 = 0.2*np.random.random((self.l2Size,self.l3Size)) - 0.1
self.bias0=0.2*np.random.random((self.l0Size,1)) - 0.1
self.bias1=0.2*np.random.random((self.l1Size,1)) - 0.1
self.bias2=0.2*np.random.random((self.l2Size,1)) - 0.1
self.alpha = 0.1
def nonlin(x,deriv=False):
if(deriv==True):
return x*(1-x)
return 1/(1+np.exp(-x))
def linAmp(x,deriv=False):
if(deriv==True):
constDeriv=np.ones(x.shape)
return constDeriv
return x
def train(self, state, action):
X = np.zeros((state.shape[0]-1,self.l0Size))
Y = np.zeros((state.shape[0]-1,self.l3Size))
X[:state.shape[0], :state.shap[1]] = state[:state.shape[0], :] #0~range-1
X[:state.shape[0], state.shap[1]]=action[:state.shape[0], :] #0~range-1
Y = state[1:,:] # 1~range
repetitionNo=100
for k in xrange(repetitionNo): #stochastic/minibatch way, no need too many times
# Feed forward through layers 0, 1, and 2
l0 = X # sampleRange x l0Size
l1 = self.nonlin(np.dot(l0,self.syn0)) # sampleRange x l0Size x l0Size x l1Size
l2 = self.nonlin(np.dot(l1,self.syn1)) # sampleRange x l1Size x l1Size x l2Size
l3 = self.linAmp(np.dot(l2,self.syn2)) # sampleRange x l2Size x l2Size x l3Size
l3_error = Y - l3
# below backpropagation
if k == repetitionNo-1: #(j% 10000) == 0:
errorRate = np.mean(np.abs(l3_error))
l3_delta = l3_error*self.linAmp(l3,deriv=True)
l2_error = l3_delta.dot(self.syn2.T)
l2_delta = l2_error*self.nonlin(l2,deriv=True)
l1_error = l2_delta.dot(self.syn1.T)
l1_delta = l1_error * self.nonlin(l1,deriv=True)
self.syn2 += l2.T.dot(l3_delta)*self.alpha
self.syn1 += l1.T.dot(l2_delta)*self.alpha
self.syn0 += l0.T.dot(l1_delta)*self.alpha
return l3, errorRate
class taskLocal1(object):
def __init__(self,timeStepRange):
self.timeStepRange=timeStepRange
self.state=np.zeros((timeStepRange,4))
self.state_hat=np.zeros((timeStepRange,4))
def reset(self, plant):
plant.state=np.array([0,0,0,0])
def genAction(self,i_episode, plant):
self.action=10*np.random.random((self.timeStepRange,1)) - 5
def step(self,plant):
for i in range(self.timeStepRange-1):
self.state[i+1,:]=plant.step(self.state[i,:], self.action[i])
def evaluation(self,i_episode,nn):
self.state_hat[1:, :], errorRate = nn.train(self.state,self.action)
if i_episode %100:
print errorRate
def plotFig(self):
# Plot the points using matplotlib
timeRange=self.state.shape[0]
t=range(timeRange)
#
plt.plot(t, self.action[t,0])
plt.xlabel(' ')
plt.ylabel('N')
plt.title(' ')
plt.legend(['force'])
plt.show()
#
plt.subplot(5, 1, 1)
plt.plot(t, self.state[t,0])
plt.plot(t, self.state_hat[t,0])
plt.xlabel(' ')
plt.ylabel('unit ')
plt.title(' ')
plt.legend(['position'])
plt.subplot(5, 1, 2)
plt.plot(t, self.state[t,1])
plt.plot(t, self.state_hat[t,1])
plt
plt.show() # You must call plt.show() to make graphics appear.
import math
import numpy as np
import matplotlib.pyplot as plt
def main():
parameterCartPole=(1.0, 0.1, 0.5) #( massCart, massPole, length)
plant=CartPoleV0(parameterCartPole)
nnStructure=(5,30,15,4,)
timeStepRange=20
neuronNet=nnLearner1(nnStructure,timeStepRange)
task=taskLocal1(timeStepRange)
episodeRange=5
for i_episode in range(episodeRange):
task.reset(plant)
task.genAction(i_episode,plant)
task.step(plant)
task.evaluation(i_episode,neuronNet)
task.plotFig()
if __name__ == '__main__':
main() | true |
6685555d91a2aae5c4d4f7a060e86f9b6d14e65c | Python | cshaib/SNAIL_Pytorch | /example/value.py | UTF-8 | 815 | 2.515625 | 3 | [] | no_license | import torch
import torch.nn as nn
class Value(nn.Module):
def __init__(self, num_arms):
super(Value, self).__init__()
self.is_recurrent = False
self.saved_log_probs = []
self.num_arms = num_arms
def forward(self, x):
return 1
class GRU_Value(Value):
def __init__(self, num_arms, init_state, hidden_size = 256):
super(GRU_Value, self).__init__(num_arms)
self.is_recurrent = True
self.hidden_size = hidden_size
self.init_state = init_state
self.gru = nn.GRU(input_size=1, hidden_size=hidden_size)
self.value = nn.Linear(hidden_size, 1)
self.prev_state = self.init_state
def forward(self, x):
x, h = self.gru(x, self.prev_state)
self.prev_state = h
return self.value(x)
def reset_hidden_state(self):
self.prev_state = self.init_state | true |
fc6aef757f999265d4d20118045e79830096c9fa | Python | JimLakis/Pandas_iloc_loc_indexing | /01_Dataframe_characteristics.py | UTF-8 | 1,208 | 4.1875 | 4 | [] | no_license | # Python v3.6
import pandas as pd
def load_CSV():
''' Reading in the CSV file, creating a DataFrame.
The CSV file was obtained from https://www.briandunning.com/sample-data/ '''
df = pd.read_csv('uk-500.csv', delimiter=',')
return df
def dimensions(df):
''' Determining the dimensions of df, rows by columns'''
print(df.shape[:])
def number_of_rows(df):
''' Determining just the number of rows '''
print(df.shape[0])
def header(df):
''' Listing the column headers of the df '''
print(df.head(0))
def types_returned_from_rows(df):
''' Returning data types for a single row verses multiple rows. '''
def single_row(df):
''' Returning a single row's data type yields a Series '''
print(f"Type of a single row returned: {type(df.iloc[0])}")
def multiple_rows(df):
''' Returning multiple row's data type yields a DataFrame '''
print(f"Type of multiple rows returned: {type(df.iloc[0:4])}")
single_row(df)
multiple_rows(df)
def main():
df = load_CSV()
dimensions(df)
number_of_rows(df)
header(df)
types_returned_from_rows(df)
if __name__ == '__main__':
main()
| true |
2dba754b840681eba7d28a142f435f015a641683 | Python | paunovaeleonora/SoftUni-Python-Basics-2020 | /Conditional Statements Advanced/trade_commissions.py | UTF-8 | 1,127 | 3.421875 | 3 | [] | no_license | city = input()
sales = float(input())
commission = 0
name = city == 'Sofia' or city == 'Varna' or city == 'Plovdiv'
if 0 <= sales <= 500 and name:
if city == 'Sofia':
commission = 0.05 * sales
elif city == 'Varna':
commission = 0.045 * sales
elif city == 'Plovdiv':
commission = 0.055 * sales
print(f'{commission:.2f}')
elif 500 < sales <= 1000 and name:
if city == 'Sofia':
commission = 0.07 * sales
elif city == 'Varna':
commission = 0.075 * sales
elif city == 'Plovdiv':
commission = 0.08 * sales
print(f'{commission:.2f}')
elif 1000< sales <= 10000 and name:
if city == 'Sofia':
commission = 0.08 * sales
elif city == 'Varna':
commission = 0.1 * sales
elif city == 'Plovdiv':
commission = 0.12 * sales
print(f'{commission:.2f}')
elif sales > 10000 and name:
if city == 'Sofia':
commission = 0.12 * sales
elif city == 'Varna':
commission = 0.13 * sales
elif city == 'Plovdiv':
commission = 0.145 * sales
print(f'{commission:.2f}')
else:
print('error')
| true |
b09b8db696792d92045c7fff72619790e4ec1e03 | Python | ngozinwogwugwu/exercises | /data_structures_homeworks/collinear_points/point.py | UTF-8 | 580 | 3.703125 | 4 | [] | no_license | class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __repr__(self):
return f"({self.x}, {self.y})"
def slope_to(self, other_point):
y_diff = other_point.y - self.y
x_diff = other_point.x - self.x
try:
return y_diff/x_diff
except ZeroDivisionError as error:
if y_diff >= 0:
return float('inf')
else:
return float('-inf')
def __lt__(self, other):
if self.y < other.y:
return True
if self.y > other.y:
return False
if self.x < other.x:
return True
return False
| true |
f91ec2c8d4c3bdf0017bca1b1a9276e42e4ebad5 | Python | bradyz/sandbox | /randoms/backwardsandforwards.py | UTF-8 | 338 | 2.921875 | 3 | [] | no_license | def base(n, k):
r = 0
x = 0
while k ** x < n:
x += 1
while n > 0:
r += (10 ** x) * (n // (k ** x))
n -= (k ** x) * (n // (k ** x))
x -= 1
return r
def answer(n):
for i in range(2, 1001):
tmp = str(base(n, i))
if tmp == "".join(reversed(tmp)):
return i
| true |
6ca76dea63cc7a63ffea6cf6ace3a0ba2cdcece0 | Python | MatsumasaH/TensorflowImageClassifier | /panda.py | UTF-8 | 30,066 | 2.78125 | 3 | [] | no_license | #########################################################
#########################################################
# So Many Libraries...
from __future__ import print_function
# Math
import math
import numpy as np
# IPython
from IPython import display
# Panda
import pandas as pd
from matplotlib import cm
from matplotlib import pyplot as plt
from matplotlib import gridspec
# ???
from sklearn import metrics
# Tensorflow
import tensorflow as tf
from tensorflow.python.data import Dataset
import importlib
# importlib.reload(panda)
import time
start = time.time()
from tensorflow.python.client import device_lib
#########################################################
#########################################################
def get_available_gpus():
"""Display you current avairable device
:return:
Array of Device Infomation
"""
get_available_gpus()
local_device_protos = device_lib.list_local_devices()
return [x.name for x in local_device_protos if x.device_type == 'GPU']
def main():
pass
def validation_test():
tf.logging.set_verbosity(tf.logging.ERROR)
# run_config = tf.estimator.RunConfig().replace(
# session_config=tf.ConfigProto(log_device_placement=True,
# device_count={'GPU': 1}))
pd.options.display.max_rows = 10
pd.options.display.float_format = '{:.1f}'.format
california_housing_dataframe = pd.read_csv(
"https://storage.googleapis.com/mledu-datasets/california_housing_train.csv", sep=",")
california_housing_dataframe = california_housing_dataframe.reindex(
np.random.permutation(california_housing_dataframe.index))
def preprocess_features(california_housing_dataframe):
"""Prepares input features from California housing data set.
Args:
california_housing_dataframe: A Pandas DataFrame expected to contain data
from the California housing data set.
Returns:
A DataFrame that contains the features to be used for the model, including
synthetic features.
"""
# Choose Features
selected_features = california_housing_dataframe[
["latitude",
"longitude",
"housing_median_age",
"total_rooms",
"total_bedrooms",
"population",
"households",
"median_income"]]
# Copy Array
processed_features = selected_features.copy()
# Create a synthetic feature.
processed_features["rooms_per_person"] = (
california_housing_dataframe["total_rooms"] /
california_housing_dataframe["population"])
# Return Array of Features Names
return processed_features
def preprocess_targets(california_housing_dataframe):
"""Prepares target features (i.e., labels) from California housing data set.
Args:
california_housing_dataframe: A Pandas DataFrame expected to contain data
from the California housing data set.
Returns:
A DataFrame that contains the target feature.
"""
# Initialize DataFrame Object
output_targets = pd.DataFrame()
# Scale the target to be in units of thousands of dollars.
output_targets["median_house_value"] = (
california_housing_dataframe["median_house_value"] / 1000.0)
# Return Series Object
return output_targets
# Choose Training Data
training_examples = preprocess_features(california_housing_dataframe.head(12000))
training_examples.describe()
# Choose Test Data
training_targets = preprocess_targets(california_housing_dataframe.head(12000))
training_targets.describe()
# Choose Validation Data
validation_examples = preprocess_features(california_housing_dataframe.tail(5000))
validation_examples.describe()
# Choose Validation Test Data
validation_targets = preprocess_targets(california_housing_dataframe.tail(5000))
validation_targets.describe()
plt.figure(figsize=(13, 8))
ax = plt.subplot(1, 2, 1)
ax.set_title("Validation Data")
ax.set_autoscaley_on(False)
ax.set_ylim([32, 43])
ax.set_autoscalex_on(False)
ax.set_xlim([-126, -112])
plt.scatter(validation_examples["longitude"],
validation_examples["latitude"],
cmap="coolwarm",
c=validation_targets["median_house_value"] / validation_targets["median_house_value"].max())
ax = plt.subplot(1, 2, 2)
ax.set_title("Training Data")
ax.set_autoscaley_on(False)
ax.set_ylim([32, 43])
ax.set_autoscalex_on(False)
ax.set_xlim([-126, -112])
plt.scatter(training_examples["longitude"],
training_examples["latitude"],
cmap="coolwarm",
c=training_targets["median_house_value"] / training_targets["median_house_value"].max())
_ = plt.plot()
def my_input_fn(features, targets, batch_size=1, shuffle=True, num_epochs=None):
"""Trains a linear regression model of multiple features.
Args:
features: pandas DataFrame of features
targets: pandas DataFrame of targets
batch_size: Size of batches to be passed to the model
shuffle: True or False. Whether to shuffle the data.
num_epochs: Number of epochs for which data should be repeated. None = repeat indefinitely
Returns:
Tuple of (features, labels) for next data batch
"""
# Convert pandas data into a dict of np arrays.
features = {key: np.array(value) for key, value in dict(features).items()}
# Construct a dataset, and configure batching/repeating.
ds = Dataset.from_tensor_slices((features, targets)) # warning: 2GB limit
ds = ds.batch(batch_size).repeat(num_epochs)
# Shuffle the data, if specified.
if shuffle:
ds = ds.shuffle(10000)
# Return the next batch of data.
features, labels = ds.make_one_shot_iterator().get_next()
return features, labels
def construct_feature_columns(input_features):
"""Construct the TensorFlow Feature Columns.
Args:
input_features: The names of the numerical input features to use.
Returns:
A set of feature columns
"""
return set([tf.feature_column.numeric_column(my_feature)
for my_feature in input_features])
def train_model(
learning_rate,
steps,
batch_size,
training_examples,
training_targets,
validation_examples,
validation_targets):
"""Trains a linear regression model of multiple features.
In addition to training, this function also prints training progress information,
as well as a plot of the training and validation loss over time.
Args:
learning_rate: A `float`, the learning rate.
steps: A non-zero `int`, the total number of training steps. A training step
consists of a forward and backward pass using a single batch.
batch_size: A non-zero `int`, the batch size.
training_examples: A `DataFrame` containing one or more columns from
`california_housing_dataframe` to use as input features for training.
training_targets: A `DataFrame` containing exactly one column from
`california_housing_dataframe` to use as target for training.
validation_examples: A `DataFrame` containing one or more columns from
`california_housing_dataframe` to use as input features for validation.
validation_targets: A `DataFrame` containing exactly one column from
`california_housing_dataframe` to use as target for validation.
Returns:
A `LinearRegressor` object trained on the training data.
"""
# On eachperiod, Calculate Loss
periods = 10
steps_per_period = steps / periods
# Create a linear regressor object.
my_optimizer = tf.train.GradientDescentOptimizer(learning_rate=learning_rate)
# Set up norm to avoid infinite increasing
my_optimizer = tf.contrib.estimator.clip_gradients_by_norm(my_optimizer, 5.0)
# Feed Optimizer and Feature Column Information
linear_regressor = tf.estimator.LinearRegressor(
feature_columns=construct_feature_columns(training_examples),
optimizer=my_optimizer
)
# Create input functions.
training_input_fn = lambda: my_input_fn(
training_examples,
training_targets["median_house_value"],
batch_size=batch_size)
predict_training_input_fn = lambda: my_input_fn(
training_examples,
training_targets["median_house_value"],
num_epochs=1,
shuffle=False)
predict_validation_input_fn = lambda: my_input_fn(
validation_examples, validation_targets["median_house_value"],
num_epochs=1,
shuffle=False)
# Train the model, but do so inside a loop so that we can periodically assess
# loss metrics.
print("Training model...")
print("RMSE (on training data):")
training_rmse = []
validation_rmse = []
for period in range(0, periods):
# Train the model, starting from the prior state.
linear_regressor.train(
input_fn=training_input_fn,
steps=steps_per_period,
)
# Take a break and compute predictions.
training_predictions = linear_regressor.predict(input_fn=predict_training_input_fn)
training_predictions = np.array([item['predictions'][0] for item in training_predictions])
# Also Validation Prediction
validation_predictions = linear_regressor.predict(input_fn=predict_validation_input_fn)
validation_predictions = np.array([item['predictions'][0] for item in validation_predictions])
# Compute training and validation loss.
training_root_mean_squared_error = math.sqrt(
metrics.mean_squared_error(training_predictions, training_targets))
validation_root_mean_squared_error = math.sqrt(
metrics.mean_squared_error(validation_predictions, validation_targets))
# Occasionally print the current loss.
print(" period %02d : %0.2f" % (period, training_root_mean_squared_error))
############################################################################
# Add the loss metrics from this period to our list.
training_rmse.append(training_root_mean_squared_error)
validation_rmse.append(validation_root_mean_squared_error)
############################################################################
print("Model training finished.")
# Output a graph of loss metrics over periods.
plt.ylabel("RMSE")
plt.xlabel("Periods")
plt.title("Root Mean Squared Error vs. Periods")
plt.tight_layout()
plt.plot(training_rmse, label="training")
plt.plot(validation_rmse, label="validation")
plt.legend()
return linear_regressor
# Calling Custom Train Model Function
linear_regressor = train_model(
learning_rate=0.00003,
steps=500,
batch_size=5,
training_examples=training_examples,
training_targets=training_targets,
validation_examples=validation_examples,
validation_targets=validation_targets)
california_housing_test_data = pd.read_csv(
"https://storage.googleapis.com/mledu-datasets/california_housing_test.csv", sep=",")
test_examples = preprocess_features(california_housing_test_data)
test_targets = preprocess_targets(california_housing_test_data)
predict_test_input_fn = lambda: my_input_fn(
test_examples,
test_targets["median_house_value"],
num_epochs=1,
shuffle=False)
test_predictions = linear_regressor.predict(input_fn=predict_test_input_fn)
test_predictions = np.array([item['predictions'][0] for item in test_predictions])
root_mean_squared_error = math.sqrt(
metrics.mean_squared_error(test_predictions, test_targets))
print("Final RMSE (on test data): %0.2f" % root_mean_squared_error)
print("elapsed_time:{0}".format(time.time() - start) + "[sec]")
return 0
def tensorflowMain():
# To Only Display / Save Error Log
# You can disable if you want
tf.logging.set_verbosity(tf.logging.ERROR)
# 100 Rows would be displayed maximum
pd.options.display.max_rows = 10
# No column limit
pd.set_option('display.max_columns', None)
# No Clipping for the values
pd.set_option('display.max_colwidth', -1)
# 0.05 will be 0.1
pd.options.display.float_format = '{:.1f}'.format
# Get Data and Convert it to DataFrame Object
california_housing_dataframe = pd.read_csv(
"https://storage.googleapis.com/mledu-datasets/california_housing_train.csv", sep=",")
# Randomize Data Order
california_housing_dataframe = california_housing_dataframe.reindex(
np.random.permutation(california_housing_dataframe.index))
# Divide Median House Value by 1000
california_housing_dataframe["median_house_value"] /= 1000.0
# Display Whole DataFrame
california_housing_dataframe
# Display Average and STD
california_housing_dataframe.describe()
# Define the input feature: total_rooms.
# Input Value
# DataFrame Class
my_feature = california_housing_dataframe[["total_rooms"]]
# Configure a numeric feature column for total_rooms.
# This is just label name
# This will go directly to linear_regressor
feature_columns = [tf.feature_column.numeric_column("total_rooms")]
# Define the label.
# DataFrame Object
targets = california_housing_dataframe["median_house_value"]
# Use gradient descent as the optimizer for training the model.
# Select optimizer with Mini-Batch Stochastic Gradient Descent(SGD)
my_optimizer = tf.train.GradientDescentOptimizer(learning_rate=0.0000001)
# To avoid infinite loop or something?
my_optimizer = tf.contrib.estimator.clip_gradients_by_norm(my_optimizer, 5.0)
# Configure the linear regression model with our feature columns and optimizer.
# Set a learning rate of 0.0000001 for Gradient Descent.
# Also, provide feature column name(Not Data)
linear_regressor = tf.estimator.LinearRegressor(
feature_columns=feature_columns,
optimizer=my_optimizer
)
# Feed Input to the LinearRegressor
def my_input_fn(features, targets, batch_size=1, shuffle=True, num_epochs=None):
"""Trains a linear regression model of one feature.
Args:
features: pandas DataFrame of features
targets: pandas DataFrame of targets
batch_size: Size of batches to be passed to the model
shuffle: True or False. Whether to shuffle the data.
num_epochs: Number of epochs for which data should be repeated. None = repeat indefinitely
Returns:
Tuple of (features, labels) for next data batch
"""
print("The Input Function was Called")
# Convert pandas data into a dict of np arrays.
# dict() : Convert list object to dictionary
# ex. List of Tuple, Tuple of List, List of Set
# dictionary.items() : Return List of object of tuple
# 内包表現 - Python Comprehension
features = {key: np.array(value) for key, value in dict(features).items()}
# Construct a dataset, and configure batching/repeating.
# Feed Full Datas that was received to the function
ds = Dataset.from_tensor_slices((features, targets)) # warning: 2GB limit
# Just setting batch size and num epoch variables
# num_epocks is not important, because there are 1000 steps mean 1000 * 1 = 1000 samples will be used
# That is not even 1 epoch, so there is no meaning to set up epoch here
ds = ds.batch(batch_size).repeat(num_epochs)
# Shuffle the data, if specified.
if shuffle:
ds = ds.shuffle(buffer_size=10000)
# Return the next batch of data.
features, labels = ds.make_one_shot_iterator().get_next()
return features, labels
# Now Start Actual Training
# The reason why variable name is _ is because we only need linear_regressor object to save the data
# The reason why it's lambda is because I guess not to execute immediately
# Feed Features DataFrame and Targets DataFrame and Step Limit
print("Training Starts")
_ = linear_regressor.train(
input_fn=lambda: my_input_fn(my_feature, targets),
steps=1000
)
print("Training Ends")
# Create an input function for predictions.
# Note: Since we're making just one prediction for each example, we don't
# need to repeat or shuffle the data here.
# If you just limit my_feature and targets to one value. That's it
# You are supposed to get perfect prediction function
prediction_input_fn = lambda: my_input_fn(my_feature, targets, num_epochs=1, shuffle=False)
# Call predict() on the linear_regressor to make predictions.
print("Prediction Starts")
predictions = linear_regressor.predict(input_fn=prediction_input_fn)
print("Prediction Ends")
# Format predictions as a NumPy array, so we can calculate error metrics.
print("Conversion Starts")
predictions = np.array([item['predictions'][0] for item in predictions])
print("Conversion Ended")
# Print Mean Squared Error and Root Mean Squared Error.
mean_squared_error = metrics.mean_squared_error(predictions, targets)
root_mean_squared_error = math.sqrt(mean_squared_error)
print("Mean Squared Error (on training data): %0.3f" % mean_squared_error)
print("Root Mean Squared Error (on training data): %0.3f" % root_mean_squared_error)
# You will see the difference is too big here
min_house_value = california_housing_dataframe["median_house_value"].min()
max_house_value = california_housing_dataframe["median_house_value"].max()
min_max_difference = max_house_value - min_house_value
print("Min. Median House Value: %0.3f" % min_house_value)
print("Max. Median House Value: %0.3f" % max_house_value)
print("Difference between Min. and Max.: %0.3f" % min_max_difference)
print("Root Mean Squared Error: %0.3f" % root_mean_squared_error)
calibration_data = pd.DataFrame()
calibration_data["predictions"] = pd.Series(predictions)
calibration_data["targets"] = pd.Series(targets)
calibration_data.describe()
calibration_data
# This was horrible, And have no idea about how it went at all
# So Now We need to visualize the information
####################################################################################################################
# Graph Plotting Sample ############################################################################################
sample = california_housing_dataframe.sample(n=300)
# Get the min and max total_rooms values.
x_0 = sample["total_rooms"].min()
x_1 = sample["total_rooms"].max()
# Retrieve the final weight and bias generated during training.
weight = linear_regressor.get_variable_value('linear/linear_model/total_rooms/weights')[0]
bias = linear_regressor.get_variable_value('linear/linear_model/bias_weights')
# Get the predicted median_house_values for the min and max total_rooms values.
y_0 = weight * x_0 + bias
y_1 = weight * x_1 + bias
# Plot our regression line from (x_0, y_0) to (x_1, y_1).
plt.plot([x_0, x_1], [y_0, y_1], c='r')
# Label the graph axes.
plt.ylabel("median_house_value")
plt.xlabel("total_rooms")
# Plot a scatter plot from our data sample.
plt.scatter(sample["total_rooms"], sample["median_house_value"])
# Display graph.
plt.show()
####################################################################################################################
####################################################################################################################
def train_model(learning_rate, steps, batch_size, input_feature="total_rooms"):
"""Trains a linear regression model of one feature.
Args:
learning_rate: A `float`, the learning rate.
steps: A non-zero `int`, the total number of training steps. A training step
consists of a forward and backward pass using a single batch.
batch_size: A non-zero `int`, the batch size.
input_feature: A `string` specifying a column from `california_housing_dataframe`
to use as input feature.
"""
# 10 Loops
periods = 10
# Calculate steps for each period
steps_per_period = steps / periods
# Prepare Feature Data
my_feature = input_feature
my_feature_data = california_housing_dataframe[[my_feature]]
# Prepare Label Data
my_label = "median_house_value"
targets = california_housing_dataframe[my_label]
# Create feature columns.
feature_columns = [tf.feature_column.numeric_column(my_feature)]
# Create input functions.
# Input, Target, Batch Size
training_input_fn = lambda: my_input_fn(my_feature_data, targets, batch_size=batch_size)
# Check Whole Data Without Shuffling
prediction_input_fn = lambda: my_input_fn(my_feature_data, targets, num_epochs=1, shuffle=False)
# Create a linear regressor object.
my_optimizer = tf.train.GradientDescentOptimizer(learning_rate=learning_rate)
# Always 5
my_optimizer = tf.contrib.estimator.clip_gradients_by_norm(my_optimizer, 5.0)
linear_regressor = tf.estimator.LinearRegressor(
feature_columns=feature_columns,
optimizer=my_optimizer
)
################################################################################################################
# Graph Size
plt.figure(figsize=(15, 6))
# Put more than 1 graph
plt.subplot(1, 2, 1)
# Title
plt.title("Learned Line by Period")
# Y Label
plt.ylabel(my_label)
# X Label
plt.xlabel(my_feature)
# Number of Samples
sample = california_housing_dataframe.sample(n=300)
# Scatter Plot Setting
plt.scatter(sample[my_feature], sample[my_label])
# Just make Color Array
colors = [cm.coolwarm(x) for x in np.linspace(-1, 1, periods)]
################################################################################################################
# Train the model, but do so inside a loop so that we can periodically assess
# loss metrics.
print("Training model...")
print("RMSE (on training data):")
root_mean_squared_errors = []
for period in range(0, periods):
# Train the model, starting from the prior state.
linear_regressor.train(
input_fn=training_input_fn,
steps=steps_per_period
)
# Take a break and compute predictions.
predictions = linear_regressor.predict(input_fn=prediction_input_fn)
predictions = np.array([item['predictions'][0] for item in predictions])
# Compute loss.
# Basically, Comparing Predictions and Targets
root_mean_squared_error = math.sqrt(
metrics.mean_squared_error(predictions, targets))
# Occasionally print the current loss.
print(" period %02d : %0.2f" % (period, root_mean_squared_error))
# Add the loss metrics from this period to our list.
root_mean_squared_errors.append(root_mean_squared_error)
# Finally, track the weights and biases over time.
# Apply some math to ensure that the data and line are plotted neatly.
# Calculate Maximum Height
y_extents = np.array([0, sample[my_label].max()])
# Sprintf like
weight = linear_regressor.get_variable_value('linear/linear_model/%s/weights' % input_feature)[0]
bias = linear_regressor.get_variable_value('linear/linear_model/bias_weights')
# Do some complicated calculation here
x_extents = (y_extents - bias) / weight
x_extents = np.maximum(np.minimum(x_extents,
sample[my_feature].max()),
sample[my_feature].min())
y_extents = weight * x_extents + bias
# Just Plot Different Color Graph
plt.plot(x_extents, y_extents, color=colors[period])
print("Model training finished.")
################################################################################################################
# Output a graph of loss metrics over periods.
plt.subplot(1, 2, 2)
plt.ylabel('RMSE')
plt.xlabel('Periods')
plt.title("Root Mean Squared Error vs. Periods")
plt.tight_layout()
plt.plot(root_mean_squared_errors)
################################################################################################################
# Output a table with calibration data.
calibration_data = pd.DataFrame()
calibration_data["predictions"] = pd.Series(predictions)
calibration_data["targets"] = pd.Series(targets)
display.display(calibration_data.describe())
print("Final RMSE (on training data): %0.2f" % root_mean_squared_error)
return calibration_data
####################################################################################################################
# train_model(
# learning_rate=0.00002,
# steps=3000,
# batch_size=10
# )
####################################################################################################################
train_model(
learning_rate=0.00002,
steps=500,
batch_size=5,
input_feature="population"
)
# Create New Series on the dataframe
california_housing_dataframe["rooms_per_person"] = (
california_housing_dataframe["total_rooms"] / california_housing_dataframe["population"])
# Train Again with Different Input feature
calibration_data = train_model(
learning_rate=0.05,
steps=500,
batch_size=5,
input_feature="rooms_per_person")
# Create a graph of Predictions VS Targets
plt.figure(figsize=(15, 6))
plt.subplot(1, 2, 1)
plt.scatter(calibration_data["predictions"], calibration_data["targets"])
# Display Hist Graph of the data
plt.subplot(1, 2, 2)
_ = california_housing_dataframe["rooms_per_person"].hist()
# Clip the Data by using Lambda
california_housing_dataframe["rooms_per_person"] = (
california_housing_dataframe["rooms_per_person"]).apply(lambda x: min(x, 5))
_ = california_housing_dataframe["rooms_per_person"].hist()
# Train Again with Clipped Data
calibration_data = train_model(
learning_rate=0.05,
steps=500,
batch_size=5,
input_feature="rooms_per_person")
# Plot Again to see the difference
_ = plt.scatter(calibration_data["predictions"], calibration_data["targets"])
def pandaDemo():
print("Panda Demo")
# Set panda not to truncate
pd.set_option('display.max_columns', None)
# pd.set_option('display.max_colwidth', -1)
# Show Version
# print(pd.__version__)
# Prepare Data Set
cities = pd.Series(['San Francisco', 'San Jose', 'Sacramento'])
# print(cities)
# Create Data Frame
city_names = pd.Series(['San Francisco', 'San Jose', 'Sacramento'])
population = pd.Series([852469, 1015785, 485199])
df = pd.DataFrame({ 'City name': city_names, 'Population': population })
# print(df)
# Get Data From CSV (Network)
california_housing_dataframe = pd.read_csv("https://storage.googleapis.com/mledu-datasets/california_housing_train.csv", sep=",")
# print(california_housing_dataframe.describe())
# Showing Only Head
# print(california_housing_dataframe.head())
# Make Graph
# You can not on this environment
california_housing_dataframe.hist('housing_median_age')
# DataFrame is just like an array
cities = pd.DataFrame({ 'City name': city_names, 'Population': population })
# print(type(cities['City name']))
# print(cities['City name'])
# You can also access by index
# print(type(cities['City name'][1]))
# print(cities['City name'][1])
# Also you can specify range
# print(type(cities[0:2]))
# print(cities[0:2])
# You can also do this
# print(population / 1000)
# Or this
# print(np.log(population))
# Or this
# print(population + 100)
# Or this
# print(population.apply(lambda val: val > 1000000))
# This is how you modify data
cities['Area square miles'] = pd.Series([46.87, 176.53, 97.92])
cities['Population density'] = cities['Population'] / cities['Area square miles']
# print(cities)
# You can do also complicated things like this
cities['Is wide and has saint name'] = (cities['Area square miles'] > 50) & cities['City name'].apply(lambda name: name.startswith('San'))
# print(cities)
# Examples of Indexing
# print(city_names.index)
# print(cities.index)
# cities.reindex([2, 0, 1])
# How to shuffle
cities.reindex(np.random.permutation(cities.index))
# print(cities)
if __name__ == '__main__':
main() | true |
4493848fad0cf5c3ddb76d8fa56be317eb26ceec | Python | acastillah/CS340-Algorithm---Final-Project | /sections-ext/algorithm.py | UTF-8 | 1,426 | 2.75 | 3 | [] | no_license | from ..algorithm import *
def overflow_fill_classroom(teacher, course, classroomSize, timeslot, ds, schedule, func_optimal_ts):
studentsInClass = []
availableStudents = ds["PossibleStudents"][course] - ds["StudentsInTimeslot"][timeslot]
ds["PossibleStudents"][course] = ds["StudentsInTimeslot"][timeslot] & ds["PossibleStudents"][course]
while classroomSize > 0 and availableStudents:
student = availableStudents.pop()
studentsInClass.append(student)
ds["StudentsInTimeslot"][timeslot].add(student)
classroomSize -= 1
if teacher in ds["TeacherBusy"]:
ds["TeacherBusy"][teacher].add(timeslot)
else:
ds["TeacherBusy"][teacher] = set([timeslot])
ds["PossibleStudents"][course] = ds["PossibleStudents"][course] | availableStudents
x = float(len(ds["PossibleStudents"][course]))
y = len(studentsInClass)
if (len(ds["TeacherBusy"][teacher]) < 3):
if (x/y > .4 and x > 10):
section_added = assign_class(ds, fill_classroom, schedule, course, True, func_optimal_ts)
ds = section_added[0]
schedule = section_added[1]
return (studentsInClass, ds)
def main(ds):
initialize = initialize_schedule(ds, overflow_fill_classroom, get_optimal_ts)
schedule = initialize[0]
ds = initialize[1]
schedule = fill_schedule(ds, schedule, overflow_fill_classroom, get_optimal_ts)
return schedule
| true |
c8f1ce907e26cc45ec5a87bff3214f66e77ac74b | Python | yukikongju/DNA-Sequencing | /Sequencing/count.py | UTF-8 | 659 | 3.15625 | 3 | [] | no_license | #!usr/bin/python
from collections import Counter
def countBase(genome):
counts = {'A': 0, 'C': 0, 'T': 0, 'G': 0}
for base in genome:
counts[base] += 1
return counts
def getCodeCount(translation):
code_seq = []
for i in translation:
code = aa_letter_to_code.get(i)
code_seq.append(code)
return Counter(code_seq)
def getHammingDistance(seq_1, seq_2):
count = abs(len(seq_1) - len(seq_2))
length = 0
if (len(seq_1) < len(seq_2)):
length = len(seq_1)
else:
length = len(seq_2)
for i in range(length):
if (seq_1[i] != seq_2[i]):
count+=1
return count
| true |
9a85ded941f6e483c1d5c318631ab81baefebb68 | Python | paulobazooka/intro-python-ifsp | /2018-03-20/crawler.py | UTF-8 | 202 | 2.90625 | 3 | [] | no_license | import csv
with open('remuneracoes.csv', 'r') as f: # Somente r para leitura do arquivo
list1 = [tuple(line.values()) for line in csv.DictReader(f)]
for linha in list1:
print(linha) | true |
ece0a435d9d1816d764bd011efa5aa8f183f2f8d | Python | chidi-ekeoma/AlienInvasion | /test_game/blue_sky.py | UTF-8 | 933 | 3.453125 | 3 | [] | no_license | #Create a game that moves an image all across the surface
import pygame
from pygame.sprite import Group
from settings import Settings
from mario import Mario
import game_functions as gf
def run_game():
# Initialise game and create a screen object.
pygame.init()
ai_settings = Settings()
screen = pygame.display.set_mode(
(ai_settings.screen_width, ai_settings.screen_height))
pygame.display.set_caption("Blue Sky")
#Bring in Mario
#Feed screen attributes to set Mario's position relative
#to the screen size
mario = Mario(ai_settings, screen)
# Create a group for the bullets
bullet = Group()
# Start the main loop for the game.
while True:
gf.check_events(ai_settings, screen, mario, bullet)
mario.update()
gf.update_bullets(bullet)
gf.update_screen(ai_settings, screen, mario, bullet)
run_game()
| true |
000e4d47534dc50f1ca7a5043b236c5ecf630043 | Python | ivgotcrazy/BestCode | /bestcode/import-users.py | UTF-8 | 2,036 | 2.765625 | 3 | [] | no_license | import MySQLdb
import sys, getopt
DATABASE = 'bestcode'
DATABASE_USER = 'bestcode-admin'
def PrintHelpAndExit():
help_msg = '''Usage: python import-users.py -u <user-name> -p <password> -f <users-file>
-h print help info
-u user to login mysql
-p user password
-f user list '''
print(help_msg)
sys.exit(1)
def GetLoginDbParam(argv):
user_name = ""
password = ""
force_rm_db = False
try:
opts, args = getopt.getopt(argv, "hu:p:f:", ["user=", "password=", "users-file"])
except getopt.GetoptError:
PrintHelpAndExit()
if len(opts) == 0:
PrintHelpAndExit()
for opt, arg in opts:
if opt == '-h':
PrintHelpAndExit()
elif opt in ("-u", "--user-name"):
user_name = arg
elif opt in ("-p", "--password"):
password = arg
elif opt in ("-f", "--users-file"):
config = arg
else:
print("Invalid option '%s'" % opt)
sys.exit(1)
return user_name, password, config
def ImportNames(argv):
user_name, password, config = GetLoginDbParam(argv)
try:
conn = MySQLdb.connect(host="localhost", port=3306, user=user_name, passwd=password)
conn.select_db('%s' % DATABASE)
except:
print("!!! Failed to connect database.")
return
try:
names_file = open(config, 'r')
for line in names_file:
if len(line.strip()) != 0:
print(line.split())
except:
print("!!! Failed to read file.")
return
'''
# create user and make grant
conn.cursor().execute("create user '%s'@'%%' identified by '123456'" % DATABASE_USER)
conn.cursor().execute("grant all privileges on %s.* to '%s'@'%%'" % (DATABASE, DATABASE_USER))
# must create localhost acount which allows localhost to login, but why '%' does not work?
conn.cursor().execute("create user '%s'@'localhost' identified by '123456'" % DATABASE_USER)
conn.cursor().execute("grant all privileges on %s.* to '%s'@'localhost'" % (DATABASE, DATABASE_USER))
conn.cursor().execute("flush privileges")
print(">>> Create user '%s' success." % DATABASE_USER)
'''
conn.close()
if __name__ == '__main__':
ImportNames(sys.argv[1:])
| true |
55ca6cea44a947aca2a14b5fa598504212343bce | Python | cwchou2016/ProjectEuler | /q10.py | UTF-8 | 399 | 3.375 | 3 | [] | no_license | # The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
# Find the sum of all the primes below two million.
num=2000000
sqrn=num**(1/2.0)
prms=range(2,num)
idx=0
while (idx < len(prms)):
base= prms[idx]
# print base
if base**2 >= num:
break
else:
mtpls=set(range(base*2, num, base))
prms=[n for n in prms if n not in mtpls]
idx+=1
print sum(prms)
| true |
b7b1556b6091c6b34f4b4426f1c0256d2021f344 | Python | pedroamaralf/TensorFlowNumberClassification | /tensorflowViewingAnImage.py | UTF-8 | 1,405 | 3.15625 | 3 | [] | no_license | import numpy as np
from binascii import hexlify
import matplotlib.pyplot as plt
#Following code snippet retrieved from:
#http://stackoverflow.com/questions/1035340/reading-binary-file-in-python-and-looping-over-each-byte
i=0
imageNum=0
x=0
y=0
w, h = 28, 28
data = np.zeros((h, w, 3), dtype=np.uint8)
numberOfBytesAllowing = 784
with open("OnePieceOfData/t10k-images.idx3-ubyte", "rb") as f:
#Used to pass over the first 16 bytes of the file as it's (right now) unnecessary data
byte = f.seek(16)
byte = f.read(1)
while(imageNum<50):
while byte != "":
hexifiedByte = hexlify(byte)
#print int(hexifiedByte, 16)
data[y][x][0] = int(hexifiedByte, 16)
byte = f.read(1)
x+=1
if(x==28):
y+=1
x=0
if(y==28):
break
else:
i+=1
plt.imshow(data)
plt.savefig("CreatedImages/array"+str(imageNum))
imageNum+=1
y=0
#I used pyplot to show the image as it presented it in the way I liked best. Source below:
#http://stackoverflow.com/questions/13811334/saving-numpy-ndarray-in-python-as-an-image
plt.imshow(data)
#plt.show()
plt.savefig("array")
#Thank you to this person for the conversion between bytes and pixel values:
#http://stackoverflow.com/questions/26441382/how-to-convert-a-hex-string-to-an-integer | true |
955934d2fa8afb5cc0f208dd2e2ac03641991b2c | Python | fseiffarth/ConvolutionAsMatrixMultiplication | /ConvolutionToMatrixMultiplication.py | UTF-8 | 8,253 | 2.609375 | 3 | [] | no_license | import numpy as np
from scipy.linalg import toeplitz, block_diag, pinv
from scipy.sparse import coo_matrix, bmat
from tables.idxutils import col_light
from openpyxl.styles.builtins import output
import torch
import torch.nn as nn
import torch.nn.functional as F
import random
#convolution matrix of input with multible batches and channels with some kernel which is equivalent to convolution of input with kernel
def convolution_matrix_block(input_shape, kernel):
# shape of the kernel, i.e. number of kernels (output_channels), input_channels, number of rows and columns
kernel_shape = kernel.shape
#2d convolution with arbitrary channels
try:
kernel_num, kernel_channel_num, kernel_row_num, kernel_col_num = kernel_shape
except ValueError:
print("Shape of kernel does not fit the settings")
#shape of the input size of the batch, input_channel number and the input size
try:
batch_size, channel_num, row_num, column_num = input_shape
except ValueError:
print("Shape of input does not fit the settings")
kernel = np.pad(kernel, ((0, 0), (0, 0), (0, 0), (0, column_num-kernel_col_num)),
'constant', constant_values=0)
#kernel channel and image channel does not fit
try:
channel_num == kernel_channel_num
except:
print("Input channels and kernel channels do not fit toghether")
#convolution matrix
block_list = []
for num in range(0, kernel_num): #number of different kernels, i.e. the output channel dimension
row_list = []
for channel in range(0, channel_num): #number of different channels, i.e. the input channel dimension
#generate the toeplitz matrices for the convolution
T = np.zeros((row_num-kernel_row_num+1, row_num, column_num-kernel_col_num+1, column_num))
toeplitz_blocks = []
for row_block_num in range(0, row_num-kernel_row_num+1):
toeplitz_blocks_rows = []
for col_block_num in range(0, row_num):
if col_block_num - row_block_num >=0 and col_block_num - row_block_num < kernel_row_num:
toeplitz_col = np.zeros((column_num-kernel_col_num + 1))
toeplitz_col[0] = kernel[num][channel][col_block_num-row_block_num][0]
T[row_block_num][col_block_num] = toeplitz(toeplitz_col, kernel[num][channel][col_block_num-row_block_num])
toeplitz_blocks_rows.append(T[row_block_num][col_block_num])
toeplitz_blocks.append(toeplitz_blocks_rows)
row_list.append(np.block(toeplitz_blocks))
#set toeplitz block in convolution matrix
block_list.append(row_list)
conv_matrix= np.block(block_list)
return conv_matrix
def convolution(input, kernel, padding = None):
# shape of the kernel, i.e. number of kernels (output_channels), input_channels, number of rows and columns
kernel_shape = kernel.shape
#2d convolution with arbitrary channels
if len(kernel_shape) == 4:
kernel_num, channel_num, kernel_row_num, kernel_col_num = kernel_shape
if padding is not None:
input = np.pad(input, ((0, 0), (0, 0), (kernel_row_num-1, kernel_row_num-1), (kernel_col_num-1, kernel_col_num-1)), 'constant', constant_values=padding)
# number of columns and rows of the input
input_shape = input.shape
#shape of the input size of the batch, input_channel number and the input size
batch_size, channel_num, row_num, column_num = input_shape
#calculate the result and reshape the input
#modify input if convolution with padding should be applied, i.e. add zero padding (possibly other constant values can be performed)
conv_matrix = convolution_matrix_block(input_shape, kernel)
return np.reshape(np.dot(block_diag(*[conv_matrix for i in range(0, batch_size)]), input.flatten()), (-1, kernel_num, row_num-kernel_row_num+1, column_num - kernel_col_num + 1))
def inverse_convolution(input, kernel, padding = None, output_shape = None):
inverse_blocks = []
if output_shape is None and padding is None:
output_shape = (input.shape[0], kernel.shape[1], input.shape[2] + kernel.shape[2] - 1, input.shape[3] + kernel.shape[3] - 1)
elif output_shape is None:
output_shape = (input.shape[0], kernel.shape[1], input.shape[2] + kernel.shape[2] - 1, input.shape[3] + kernel.shape[3] - 1)
conv_matrix = convolution_matrix_block(output_shape, kernel)
inverse_matrix = np.linalg.pinv(conv_matrix, rcond=1e-15)
print("ConvMatrixDone")
return np.dot(block_diag(*[inverse_matrix for i in range(0, input.shape[0])]), input.flatten()).reshape(output_shape)
def unpooling2d(input, kernel_shape, output_shape = None, algo = None):
#get kernel shape
kernel_row_num, kernel_col_num = kernel_shape
#get input shape
batch_size, channel_num, row_num, column_num = input.shape
if output_shape == None:
output_shape = (batch_size, channel_num, row_num*kernel_row_num, column_num*kernel_col_num)
else:
output_shape = output_shape
output = np.zeros(output_shape)
for batch in range(0, batch_size):
for channel in range(0, channel_num):
for row in range(0, output_shape[2]):
for column in range(0, output_shape[3]):
if row//kernel_row_num < len(input[batch][channel]) and column//kernel_col_num < len(input[batch][channel][len(input[batch][channel]) - 1]):
value = input[batch][channel][row//kernel_row_num][column//kernel_col_num]
output[batch][channel][row][column] = value
"""
if row % kernel_row_num == 0 and column % kernel_col_num == 0:
output[batch][channel][row][column] = value
else:
output[batch][channel][row][column] = value - random.uniform(0, abs(value))
"""
return output
def main():
test_kernel = np.random.rand(2, 1, 3, 3)
test_kernel = np.array([[[[1, 1], [1, 1]]],
[[[1, 1], [1, 0]]],
[[[1, 1], [0, 0]]],
[[[1, 0], [0, 0]]]])
#y = np.array([[[[1, -1], [2, 1]]]])
y = np.random.rand(1, 2, 1, 2)
y = np.array([[[[1, 1]], [[2, 2]], [[4, 4]], [[2, 2]]]])
#y_unpool = unpooling2d(y, (2, 2))
y_uncolvolved = inverse_convolution(y, test_kernel)
y_convolved = convolution(y_uncolvolved, test_kernel)
conv_mat = convolution_matrix_block(y_uncolvolved.shape, test_kernel)
print("Convolution Matrix", conv_mat)
print("Pseudo inverse", pinv(conv_mat))
#print("Unpooled", y_unpool)
print("Unconvolved", y_uncolvolved)
print("Reconvolved", y_convolved)
print("Should be zero", y - y_convolved)
print(F.max_pool2d(torch.tensor(y_convolved).double(), 2))
"""
#x = np.array([[[[1, 2, 3], [4, 5, 6], [7, 8, 9]]], [[[1, 2, 3], [4, 5, 6], [7, 8, 9]]]])
x = np.random.rand(2, 20, 12, 12)
#kernel = np.array([[[[1, 1, 1],[1, 1, 1]]]])
kernel = np.random.rand(50, 20, 5, 5)
conv_pytorch = nn.Conv2d(20, 50, 5, bias = False)
conv_pytorch.weight.data = torch.tensor(kernel)
print("Input", x)
print("Kernel", kernel)
#conv_mat = block_diag(*convolution_matrix_blocks(x.shape, kernel))
#pseudo_inv = np.linalg.pinv(conv_mat)
#print(pseudo_inv.shape)
result = convolution(x, kernel, padding = None)
print("Result", result)
print("Should be zero", torch.tensor(result) - conv_pytorch(torch.tensor(x)))
#print(inverse_convolution(result, kernel, padding = None))
#result2 = convolution(inverse_convolution(result, kernel, padding = None), kernel, padding = None)
result2 = conv_pytorch(torch.tensor(inverse_convolution(result, kernel, padding = None)))
print("Inverse Convolution", result2)
print("Should be zero", torch.tensor(result) - torch.tensor(result2))
"""
if __name__ == '__main__':
main()
| true |
356c28c2f4eb99cbd4e2fde6eb83b124647a1bbc | Python | intruedeep/target-data-extraction | /extract/tn_emulator/server.py | UTF-8 | 1,206 | 2.75 | 3 | [] | no_license | import numpy as np
import socket
import image
import cv2
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serversocket.bind(('192.168.1.3', 8888))
serversocket.listen(5) # become a server socket, maximum 5 connections
#def get_tile_location(img, lowbounds, highbounds, tilex, tiley, pixelx, pixely):
tilex = 40
tiley = 40
pixelx = 1280
pixely = 720
RED_LOWER = np.array([17, 15, 100])
RED_UPPER = np.array([50, 56, 200])
while True:
data = ''
connection, address = serversocket.accept()
while 1:
packet = connection.recv(1024)
data += packet
if not packet: break
if len(data) > 0:
f = open('___trash___.jpg', 'w+')
print('before f.write(data)')
f.write(data)
print('before imread')
print(len(data))
#img = cv2.imread('___trash___.jpg')
img = cv2.imread('___trash___.jpg')
print("image.data: " + str(len(img.data)))
x, y = image.get_tile_location(img, RED_LOWER, RED_UPPER, tilex, tiley, pixelx, pixely)
y = tiley - 1 - y #because y is inverted
clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
clientsocket.connect(('192.168.1.2', 9999))
print x, y
clientsocket.send('%d,%d'%(x, y))
clientsocket.close()
| true |
8549e1b7e1fbfcbc46a74081e90dca602548c300 | Python | bklimko/phys416-code | /Chapter 1 Work/chap1_problemA.py | UTF-8 | 1,144 | 4.03125 | 4 | [] | no_license | import numpy as np
import matplotlib.pyplot as plt
"""
Benjamin Klimko, PHYS 416 Spring 2018
The program has a hardcoded input n, which can be altered prior to running the program.
The program outputs a graph showing the computed number versus iteration for the hailstone (3n+1) problem
"""
# set input value here and initialize iteration counter
n = 27
original_n = np.copy(n)
count = 1
# create arrays to hold both iteration values and computed numbers
iteration = np.array([0])
computed = np.array([n])
# as long as n is not 1 continue the algorithm
while n != 1:
# check if n is even or odd-- if even divide by 2; if odd multiply by 3 and add 1
if n%2 == 0:
n /= 2
else:
n = (3*n) + 1
# increment counter, add to iteration array, and add the updated value of n to computed array
count += 1
iteration = np.append(iteration, count)
computed = np.append(computed, n)
# once n has become 1 plot the iterations vs computed number, add title and axis labels
plt.plot(iteration, computed)
plt.xlabel('Iterations')
plt.ylabel('Computed Number')
plt.title('Iterations vs Computed Number for N = {0}'.format(str(original_n)))
plt.show()
| true |
446beeb481375df47fc6528771594bb57c390a61 | Python | jose-troche/VideoContentExtractionAndQuery | /bin/extract_content.py | UTF-8 | 2,978 | 3.046875 | 3 | [] | no_license | #!/usr/bin/env python
import sys
import json
import glob
import boto3
from concurrent import futures
# This script extracts the content from a series of images / frames
# Provide the image files as arguments. Valid arguments:
# frame1.jpg
# *.jpg
# frame1.jpg frame2.jpg *.png
# some/folder/*.jpg
#
# The output is sent to stdout as a json that has a list of content items
# found in the images/frames
#
# The script uses AWS rekognition to detect labels, text and celebrity faces
MIN_CONFIDENCE = 75
rekognition=boto3.client('rekognition')
def extract_video_content(imageFilename):
"Extracts the video content of a specific image file"
with open(imageFilename, 'rb') as imageFile:
image = {'Bytes': imageFile.read()}
return (
get_labels(image, imageFilename) +
get_texts(image, imageFilename) +
get_celebrities(image, imageFilename)
)
def get_labels(image, filename):
labels = rekognition.detect_labels(
Image=image, MinConfidence=MIN_CONFIDENCE)['Labels']
return [
build_record(
label['Name'],
'Label',
filename,
label['Confidence'],
[
instance['BoundingBox']
for instance in label['Instances'] if instance['Confidence'] > MIN_CONFIDENCE
]
)
for label in labels if label['Confidence'] > MIN_CONFIDENCE
]
def get_texts(image, filename):
texts = rekognition.detect_text(Image=image)['TextDetections']
return [
build_record(
text['DetectedText'],
'Text',
filename,
text['Confidence'],
[
text['Geometry']['BoundingBox']
]
)
for text in texts
if text['Confidence'] > MIN_CONFIDENCE and text['Type'] == 'WORD'
]
def get_celebrities(image, filename):
celebrities = rekognition.recognize_celebrities(Image=image)['CelebrityFaces']
return [
build_record(
celebrity['Name'],
'Celebrity',
filename,
celebrity['MatchConfidence'],
[
celebrity['Face']['BoundingBox']
]
)
for celebrity in celebrities if celebrity['MatchConfidence'] > MIN_CONFIDENCE
]
def build_record(term=None, category=None, source=None, confidence=0, boundingBoxes=[]):
return {
'Term': term,
'Category': category,
'Source': source,
'Confidence': confidence,
'BoundingBoxes': boundingBoxes
}
if __name__ == "__main__":
if(len(sys.argv) < 2):
print('Please pass the file(s) to be processed as arguments')
sys.exit()
content_list = []
jobs = []
# This submits jobs to extract video content in parallel.
# Results are merged as the jobs complete
with futures.ThreadPoolExecutor(max_workers=1000) as executor:
for path in sys.argv[1:]:
for filename in glob.glob(path):
jobs.append(executor.submit(extract_video_content, filename))
for job in futures.as_completed(jobs):
content_list += job.result()
content = {
'VideoContent': content_list
}
print(json.dumps(content))
| true |
aa616a7b369d5975de35a608a45fb1fd83f7e4b5 | Python | ranguli/advent-of-code | /2020/day1/part1.py | UTF-8 | 531 | 3.703125 | 4 | [] | no_license | target = 2020
with open("input.txt") as f:
expenses = list(filter(None, f.read().split("\n")))
for index, expense in enumerate(expenses):
for other_expense in expenses[index:]:
if int(expense) + int(other_expense) == 2020:
print(
f"{expense} + {other_expense} = {int(expense)+int(other_expense)}"
)
print(
f"{expense} * {other_expense} = {int(expense)*int(other_expense)}"
)
break
| true |