This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cs1robots as cs | |
| import time | |
| # patch some methods | |
| def add_beeper(self, av, st, num=None): | |
| if num is None: | |
| self.beepers[(av, st)] = 1 | |
| else: | |
| self.beepers[(av, st)] = num |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| # ============================================================= | |
| # 2-dimensional matrix | |
| class Matrix: | |
| """| 1 2 | -> Matrix([1, 2, 3, 4]) | |
| | 3 4 | | |
| """ | |
| def __init__(self, elems): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original: | |
| A: (0, 0, 0) | |
| |-B: (0, 0, 0) | |
| |-D: (0, 0, 0) | |
| |-F: (1, 0, 0) | |
| |-G: (2, 0, 0) | |
| |-E: (0, 0, 0) | |
| |-C: (0, 0, 0) | |
| |-H: (0, 1, 0) | |
| |-I: (0, 2, 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| #include <vector> | |
| #include <chrono> | |
| #include <thread> | |
| #include <cmath> | |
| template<typename T> | |
| int cut(T value, int bottom, int top) { | |
| int intValue = static_cast<int>(value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public class FlyCamera : MonoBehaviour { | |
| /* | |
| Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care. | |
| Converted to C# 27-02-13 - no credit wanted. | |
| Simple flycam I made, since I couldn't find any others made public. | |
| Made simple to use (drag and drop, done) for regular keyboard layout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var w = 31; | |
| var ct = 0; | |
| var ic = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); | |
| function rp(s, n) { | |
| var line = ""; | |
| var i; | |
| for (i = 0; i < n; i++) { | |
| line += s; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.5.7; | |
| contract BC3D { | |
| // ====================================================== | |
| // Types. | |
| struct Project { | |
| bytes32 id; | |
| string name; | |
| string keyword; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install imdbpy๋ก imdbpy ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์นํด์ผ๋จ. | |
| # (์ ๋๋ฉด python -m pip install imdbpy) | |
| from imdb import IMDb | |
| def printMovie(movie): | |
| # movie['title']: ์ ๋ชฉ๋ง, movie['long imdb title']: ์ฐ๋๋ ๊ฐ์ด. | |
| title = movie['long imdb title'] | |
| movieID = movie.movieID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| '''์ง์ ํ ํด๋์ weekly .md ํ์ผ๋ค์์ ์ฌ์ฉ์๊ฐ ์์ฑํ ๋ถ๋ถ๋ค์ ๋ฝ์๋ด์ ํ ํ์ผ๋ก ๋ง๋ค์ด์ค๋๋ค.''' | |
| import glob | |
| import re | |
| import pathlib | |
| def getBasename(path): | |
| '''๊ฒฝ๋ก์์ ํ์ผ ์ด๋ฆ๋ง ์ถ์ถ. (a/b/c.md์์ c.md๋ง ์ถ์ถ.)''' | |
| return pathlib.Path(path).name |
OlderNewer