Skip to content

Instantly share code, notes, and snippets.

View pignuante's full-sized avatar
😭
I may be slow to respond.

Pignu pignuante

😭
I may be slow to respond.
View GitHub Profile
def wordCounter(rowMsg):
wordsList = [] # 문자열에서 단어단위로 쪼개어 저장.
result = {} # 갯수를 딕셔너리에 저장.
start = 0 # 문자열을 인덱스 단위로 카운트할떄 시작과 끝.
end = 0
# 문자열의 마지막에 공백문자를 넣어준다.
if rowMsg[len(rowMsg) - 1] != ' ':
rowMsg += ' '
@pignuante
pignuante / bubleSort.py
Created August 31, 2016 07:19
python으로 만든 간단한 버블정렬
def bubbleSort(input):
for start in range(len(input) - 1):
for end in range(len(input) - 1):
if input[end] > input[end + 1]:
input[end+1], input[end] = input[end], input[end+1]
def Fibonacci(start1 = 0, start2 = 1, end = 10):
result = []
result.append(start1)
result.append(start2)
for count in range(2, end):
result.append(result[count - 1] + result[count -2])
<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8">
<title>Receive</title>
<style>
.block {
background-color: #FFE4E1;
package hufs.ces.image.button;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
#include<stdio.h>
int who_is_first (int age1, int age2, int(*cmp)(int n1, int n2));
int older_first (int age1, int age2);
int younger_first (int age1, int age2);
int main(void) {
int age1 = 20;
int age2 = 30;
int first;
/* This example is rewritten based on the example from */
/* <http://www.coe.uncc.edu/~abw/parallel/pthreads/pthreads.html */
/* It illustrates the idea of shared memory programming */
/* oct-03-2000 */
#include <pthread.h>
#include <stdio.h>
#define MAX 50
#define BUFLEN 24
#define MAX_COUNT 15
# coding: utf-8
from __future__ import division
import ui
import clipboard
from console import hud_alert
shows_result = False
def button_tapped(sender):
x, y=map(int,input().split(' '));print("MTWTFSSOUEHRAUNEDUITN"[([4,2,6,4,1,5,3,0,5,2,2,6][-x]+y)%7::7])
# function define
def LIS(A):
S = [1 for num in range(0, len(A))]
I = [num for num in range(0, len(A))]
length = 0
for i in range(0, len(A)):
for j in range(0, i):
if(A[j] < A[i] and S[i] < S[j]+1):
S[i] = S[j]+1
I[i] = j