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 requests | |
import unittest | |
class TestNotesAPI(unittest.TestCase): | |
base_url = "https://afternoon-beach-08354.herokuapp.com/" | |
def test_add_note(self): | |
sample_note = {"content": "do prog2 assignment sooon!"} |
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 'package:cached_network_image/cached_network_image.dart'; | |
import 'package:extended_image/extended_image.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:photo_view/photo_view.dart'; | |
import 'package:skycap/ui/screens/submit_footage/image_editor_screen.dart'; | |
import 'package:skycap/utils/scaffold_app_bar.dart'; | |
class FullScreenView extends StatefulWidget { | |
final imageUrl; | |
final showEdit; |
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
class OperationCounterNumericProcessor(NumericProcessor): | |
def __init__(self, computations_list): | |
super().__init__(computations_list) | |
self.count_operations = {} | |
def run_one_computation(self, computation): | |
operation = computation["operation"] | |
if operation not in self.count_operations: | |
self.count_operations[operation] = 1 | |
else: |
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 'dart:async'; | |
import 'dart:io'; | |
import 'dart:typed_data'; | |
import 'package:camera/camera.dart'; | |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:connectivity_plus/connectivity_plus.dart'; | |
import 'package:filesize/filesize.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:geocoding/geocoding.dart'; |
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
class Product: | |
def __init__(self, name, price): | |
self.name = name | |
self.price = price | |
class Cart: | |
def __init__(self): | |
self.items = [] | |
def add_item(self, product): |
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
Simplified Table Tennis Game Rules: | |
- The game has 2 players or 4 players (2 teams of 2). | |
- The objective is to hit the ball in such a way that the opponent is not able to return it. Points are awarded to the player or team who succeeds in that. | |
- One team starts serving. The ball must only touch each table side once after each hit. | |
- The first player or team to reach 11 points with a lead of at least 2 points wins the game. | |
—> Make a program that manages the game by keeping track of the awarded points. When the game ends, it should announce the winner. | |
—> With your team, decide what objects (attributes and methods) are needed to develop this program. |
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 required modules | |
import requests, json | |
# Enter your API key here | |
api_key = "10562986aab4aacd5e1a4e38a655f13b" | |
# base_url variable to store url | |
base_url = "http://api.openweathermap.org/data/2.5/weather?" | |
# Give city name |
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
# Simple Snake Game in Python 3 for Beginners | |
# By @TokyoEdTech | |
import turtle | |
import time | |
import random | |
delay = 0.1 | |
# Score |
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 turtle import * | |
color('red', 'yellow') | |
begin_fill() | |
while True: | |
forward(200) | |
left(170) | |
if abs(pos()) < 1: | |
break | |
end_fill() |
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
# Simple Snake Game in Python 3 for Beginners | |
# By @TokyoEdTech | |
import turtle | |
import time | |
import random | |
delay = 0.1 | |
# Score |