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 django_filters.rest_framework import DjangoFilterBackend | |
from drf_spectacular.utils import OpenApiParameter, extend_schema, extend_schema_view | |
from rest_framework.filters import OrderingFilter, SearchFilter | |
from api.endpoints.common.views import BaseModelViewSet | |
from api.models import Launch | |
from api.permission import HasGroupPermission | |
from ...common.prefetches import get_prefetched_launch_queryset | |
from ...launch.filters import LaunchFilterSet |
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 time | |
from utils import get_inputs | |
from collections import Counter | |
def part_one(): | |
input = get_inputs(puzzle_day=6) | |
buffer_size = 4 | |
for i in range(len(input) - buffer_size + 1): | |
_string = (input[i: i + buffer_size]) |
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 datetime import timedelta | |
from difflib import SequenceMatcher | |
import requests | |
from django.utils.text import slugify | |
def find_spacex_api(launch): | |
max_delta = 7 | |
url = 'https://api.spacexdata.com/v3/launches' |
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 openpyxl import load_workbook | |
some_array = [1,2,3] | |
wb = load_workbook(filename = 'your_excel.xlsx') | |
ws = wb.get_sheet_by_name('Sheet Name') | |
for row in ws.iter_rows('C{}:C{}'.format(ws.min_row, ws.max_row)): | |
for cell in row: | |
print cell.value | |
## Read the printed value here - then write condition to replace with formula. |
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 requests | |
from datetime import timedelta | |
from django.utils.datetime_safe import datetime | |
BASE_URL = 'https://launchlibrary.net/' | |
headers = { | |
"Content-Type": "application/json" | |
} | |
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
public enum PUBGSeason { | |
PRE1_2017("2017-pre1", "Early Access Season #1"), | |
PRE2_2017("2017-pre2", "Early Access Season #2"), | |
PRE3_2017("2017-pre3", "Early Access Season #3"); | |
PUBGSeason(String seasonName, String seasonKey) { | |
this.seasonName = seasonName; | |
this.seasonKey = seasonKey; | |
} |