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
#!/usr/bin/env python3 | |
import os | |
import requests | |
import argparse | |
from tqdm import tqdm | |
# Headers for the API request | |
headers = { | |
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0", |
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 os | |
import requests | |
from tqdm import tqdm | |
# Parameters for the API request | |
params = { | |
"playlist_id": "1GKM6Q2Bn82Dl0zVZrxew9", | |
"sort_id": 0, | |
"page": 1 | |
} |
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
{"lastUpload":"2021-03-11T03:16:37.895Z","extensionVersion":"v3.4.3"} |
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
public static function getStudentsArray() | |
{ | |
$students = Student::get(); | |
$students->each(function ($model) { | |
$model->setAppends(['numerator_full_name']); | |
}); | |
$students = $students->pluck('numerator_full_name', 'id')->toArray(); | |
return $students; | |
} |
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
<?php | |
$arr = [ | |
['R1', 'R2', 'R3'], | |
['A1', 'A2', 'A3'], | |
['M1', 'M2'] | |
]; | |
$result = [""]; | |
foreach ($arr as $item) { | |
$tmp = []; |
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
<?php | |
$arr = [ | |
['R1', 'R2'], | |
['A1', 'A2', 'A3'], | |
['M1', 'M2'] | |
]; | |
for ($i = 0; $i < count($arr[0]); $i++){ | |
for ($j = 0; $j < count($arr[1]); $j++) { | |
for ($k = 0; $k < count($arr[2]); $k++) { | |
echo $arr[0][$i] . $arr[1][$j] . $arr[2][$k]; |
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
<?php | |
$arrResult = [ | |
'R' => ['1', '2'], | |
'A' => ['1', '2', '3'], | |
'M' => ['1', '2'], | |
]; | |
//R1A1M1 | |
foreach ($arrResult['R'] as $item1){ | |
foreach ($arrResult['A'] as $item2) { |