This file contains 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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import random | |
try: | |
from tkinter import * | |
except ImportError: | |
from Tkinter import * | |
class Block(object): |
This file contains 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
fmtTime = (t) -> | |
d = new Date(null); | |
d.setSeconds(t/1000); | |
return d.toTimeString().substr 3, 5 | |
move = (obj, direction, step) -> | |
if !step? | |
step = 10 | |
attr = 'left' |
This file contains 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 random | |
def get_pkg(total_money, pkg_count): | |
pkg = random.randint(1, int(total_money * 2 / pkg_count)) | |
if (total_money - pkg) < (pkg_count - 1): | |
return get_pkg(total_money, pkg_count) | |
return pkg | |
This file contains 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
from bottle import abort | |
from bottle import post | |
from bottle import request | |
from bottle import run | |
from subprocess import call | |
def handle_pull_request(o): | |
pass |
This file contains 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
// APP | |
@IBAction func opx(_ sender: Any) { | |
// let openFileTypes = ["*"] | |
let openPanel = NSOpenPanel() | |
openPanel.allowsMultipleSelection = false | |
openPanel.canChooseDirectories = true | |
openPanel.canCreateDirectories = false | |
openPanel.canChooseFiles = true |