- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
def refactored_merge_two_sorted_lists(L1, L2): | |
dummy_head = tail = Node() | |
cur1 = L1 | |
cur2 = L2 | |
while cur1 and cur2: | |
if cur1.data < cur2.data: | |
tail.next, cur1 = cur1, cur1.next | |
else: | |
tail.next, cur2 = cur2, cur2.next |
# -*- coding: utf-8 -*- | |
__author__ = "Myong-Hoon Jeon" | |
from unittest import main, TestCase | |
class Node: | |
""" 연결리스트의 Node. """ |
# -*- coding: utf-8 -*- | |
__author__ = "MH Jeon" | |
import os | |
from unittest import main, TestCase | |
import sys | |
""" Solution for EPI 8.1: Implement stack with max API """ |
from unittest import main, TestCase | |
class Node: | |
def __init__(self, data, next): | |
self._data = data | |
self._next = next | |
def __repr__(self): |
from unittest import main, TestCase | |
class Node: | |
def __init__(self, data, next): | |
self._data = data | |
self._next = next | |
def __repr__(self): |
# -*- coding: utf-8 -*- | |
from unittest import TestCase, main | |
__author__ = 'MH Jeon' | |
class Node: | |
def __init__(self, data): |
""" | |
# -*- coding: utf-8 -*- | |
# UTF-8 encoding when using korean | |
num_of_lines = 2 | |
for i in range(num_of_lines): | |
if i == 0: | |
total_num = int(input()) | |
else: | |
num_list = [int(x) for x in input().split()] |
__author__ = 'dkarchmer' | |
''' | |
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but | |
requires your Django server to have an API for your user to access Cognito based credentials | |
Because of Cognito, the client (this script) will only get temporary AWS credentials associated | |
to your user and only your user, and based on whatever you configure your AIM Policy to be. | |
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate | |
how to create a stand-alone Python script but operating similarly to these apps. |
import os, boto3 | |
from botocore.client import Config | |
from django.conf import settings | |
from rest_framework import parsers | |
from rest_framework.permissions import IsAuthenticated | |
from rest_framework.views import APIView | |
from rest_framework.response import Response | |
from rest_framework.renderers import JSONRenderer |