본문 바로가기

전체 글

벤처창업 웹프로그래밍 1 종강 보호되어 있는 글입니다. 더보기
Positive feedback - Oscillator 더보기
이미지 변경 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Text : MonoBehaviour { public Image TestImage; public Sprite TestSprite; public void ChangeImage() { TestImage.sprite = TestSprite; } } using System.Collections; using System.Collections.Generic; using UnityEngine; public class spritePool : MonoBehaviour { public List m_liSprites; pu.. 더보기
프로그래머스 등수 매기기 object Solution { def solution(score: Vector[Vector[Int]]): Vector[Int] = { def avg(x:Vector[Int]):Int= (x(0)+x(1))/2 def filList(idx:Int=0,lst:List[Int]=List()):List[Int]={ if(idx==score.length) lst else filList(idx+1,lst ::: List(avg(score(idx)))) } val originList = filList() //[70,80,75,90] 평균이 적혀있는 리스트 val sortedList = (filList().sorted).reverse //[90,80,75,70]으로 정렬 def ranker(idx:Int=0,arr:.. 더보기
Python 으로 csv 파일 다루기 다루고자 하는 mpg.csv 는 이렇게 생겼다. python으로 csv 파일을 다룰 때에는 import pandas as pd 코드를 이용해서 Pandas 패키지를 사용하면 된다. 1. 산점도 만들기 import seaborn as sns sns.scatterplot() 를 이용해서 아래 코드는 mpg.csv를 파이썬으로 사용하는 코드이다. sns.scatterplot(data=???, x='???', y='???') 이런 형식으로 적게 되는데 중요한 것은 x, y에는 data 파일에 들어있는 실제 이름을 넣어야 한다는 것이다. 내 마음대로 이상한 이름 넣으면 오류뜸. 내가 문자열 형태로 입력했는데 그걸 인식해서 data 파일에 있는 데이터를 가져와서 그래프를 그린다는게 진짜 신기했다 .. 위의 사진은 .. 더보기
14주차 데이터 분석 작업 terminal에 들어가서 pip3 install jupyter 명령어를 입력해서 jupyter를 설치한다 다음 jupyter notebook 명령어를 입력하고 엔터를 치면 주피터 노트북이 실행된다. 그 외에도 pip3 install pandas 등 명령어로 각종 패키지를 설치할 수 있다. 참고 사이트 ) https://qa-testing.tistory.com/448 * 파이선에서 csv등의 데이터파일이 파이선에서 사용이 가능한 데이터프레임으로 전환작업을 진행함. * 목적에 따라서 사용하는 데이터분석패키지를 설치하고 이에 대한 라이브러리를 연결하는 작업을 함. * 데이터분석연산을 진행하고 시각화그래프를 생성함. 더보기
12/6 다시 푸는 Assignment 1 package hw1 import scala.annotation.tailrec import scala.util.control.TailCalls._ object Main { /** * Implement given functions, which are currently left blank. (???) * **WARNING: Please read the restrictions below carefully.** * * If you do not follow these, **your submission will not be graded.** * * 1. Do not use the keyword `var`. Use `val` and `def` instead. * 2. Do not use any library func.. 더보기
HW4-(1) /** * 32-bit raw bit stream. * * bits.length must be equal to 32 * bits.head must be an MSB of the value. */ sealed trait BinaryVal { val bits: List[Boolean] } // 32-bit raw int case class BinaryInt(bits: List[Boolean]) extends BinaryVal // 32-bit raw float case class BinaryFloat(bits: List[Boolean]) extends BinaryVal BinaryVal.scala sealed trait BinaryVal { val bits : List[Boolean] } case class.. 더보기