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 flask import Flask, render_template, request, jsonify | |
from flask_cors import CORS, cross_origin | |
import highlighter | |
from mycalendar import main as calendar_main | |
import palette | |
from urllib.request import urlopen | |
app = Flask(__name__) |
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
def check(A, r, c): | |
""" | |
ARGs: | |
- tick position | |
RETURN: | |
boolean | |
""" | |
global win_array | |
# row | |
cbw = c |
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
def wins(player, A): | |
for case in [[0, 1, 2], | |
[3, 4, 5], | |
[6, 7, 8], | |
[0, 3, 6], | |
[1, 4, 7], | |
[2, 5, 8], | |
[0, 4, 8], | |
[2, 4, 6]]: | |
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 bisect | |
class NFA(object): | |
EPSILON = object() | |
ANY = object() | |
def __init__(self, start_state): | |
self.transitions = {} | |
self.final_states = set() | |
self._start_state = start_state |
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 sys, time | |
from PyQt5 import QtCore, QtGui, QtWidgets | |
from PyQt5.QtWidgets import QApplication, QMainWindow | |
from PyQt5.QtCore import QRunnable, QThreadPool | |
from gui import Ui_MainWindow | |
from firebase import Firebase | |
class MainWindow(QMainWindow): | |
def __init__(self, led, humi, temp): |
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
-- 1 | |
SELECT mamh, tenmh, tclt, tcth | |
FROM Khoa JOIN Monhoc | |
ON (Khoa.makhoa = Monhoc.makhoa) | |
WHERE tenkhoa = N'Ngoại ngữ'; | |
-- 2 | |
SELECT * | |
FROM Monhoc | |
WHERE tclt > tcth; |
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
#include <stdio.h> | |
void PrintASCII() { | |
for(int i = 0; i < 256; ++i){ | |
printf("%d %c\n", i, i); | |
} | |
} | |
int SumOdd(int n) { | |
// 1 3 5 7... 2n+1 |
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
// Online C compiler to run C program online | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
struct node { | |
int info; | |
struct node* left; | |
struct node* right; | |
}; |
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
#include <stdio.h> | |
#include <math.h> | |
#include <stdbool.h> | |
char Lowercase(char c) { | |
// A to Z only | |
char uppercase = (int)c; | |
if (uppercase >= 65 && uppercase <= 90) uppercase += 32; | |
return uppercase; //printf("%c") | |
} |
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
#include <stdio.h> | |
const float pi = 3.14; | |
void ToChar(int); // 6a | |
void GetOrder(char); // 6b | |
void AreaVolumnGlob(float); // 7 | |
void Power(int); // 8 | |
void HourMinSec(unsigned int); // 9 | |
void SumAllDigit(unsigned int); //10 |
NewerOlder