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 numpy as np | |
| import pygame | |
| from pygame.locals import * | |
| from OpenGL.GL import * | |
| from OpenGL.GLU import * | |
| from Utils import * | |
| def main_loop(): | |
| global end |
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 pygame | |
| from pygame.locals import * | |
| from OpenGL.GL import * | |
| from OpenGL.GLU import * | |
| from Utils import * | |
| def main_loop(): | |
| global end | |
| global can_draw |
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 pygame | |
| from pygame.locals import * | |
| from OpenGL.GL import * | |
| from OpenGL.GLU import * | |
| from Utils import * | |
| def main_loop(): | |
| global end | |
| while not end: |
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 numpy as np | |
| import pygame | |
| from pygame.locals import * | |
| from OpenGL.GL import * | |
| from OpenGL.GLU import * | |
| def main_loop(): | |
| global end | |
| while not end: |
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 random | |
| import pygame | |
| from pygame import Vector2 | |
| from pygame.transform import rotozoom | |
| from pygame.mixer import Sound | |
| def wrap_position(position, screen): | |
| x, y = position | |
| w, h = screen.get_size() |
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 random | |
| import requests | |
| from flask import Flask, render_template | |
| address = "https://the-one-api.dev/v2" | |
| quote_endpoint = "/quote" | |
| character_endpoint = "/character" | |
| access_token = "11111111111111" | |
| headers = { | |
| "Authorization": f"Bearer {access_token}" |
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
| ################## main.py ######################## | |
| import time | |
| from turtle import Screen, Turtle | |
| from player import Player | |
| from enemy import Enemy | |
| game_speed = 0.1 | |
| down_line = -200 | |
| up_line = 200 |
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
| from bs4 import BeautifulSoup | |
| import requests | |
| import csv | |
| headers = { | |
| 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'} | |
| response = requests.get("https://acg.gamer.com.tw/billboard.php?t=4&p=PC", headers=headers) | |
| page = response.text | |
| soup = BeautifulSoup(page, "html.parser") | |
| game_boxes = soup.select('.ACG-mainbox1') |
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
| """Synthesizes speech from the input string of text or ssml. | |
| Make sure to be working in a virtual environment. | |
| Note: ssml must be well-formed according to: | |
| https://www.w3.org/TR/speech-synthesis/ | |
| """ | |
| from google.cloud import texttospeech | |
| import PyPDF2 | |
| with open('test.pdf', 'rb') as pdfObj: |
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
| from tkinter import * | |
| from tkinter.ttk import Progressbar | |
| IS_COUNTING = False | |
| COUNT_DOWN_SEC = 5 | |
| PROGRESS = 0 | |
| timer = None | |
| update_progress_timer = None |
NewerOlder