This Gist was automatically created by Carbide, a free online programming environment.
Last active
May 15, 2024 17:05
-
-
Save hawkrives/4855616dbda70f7708839ac07cfcf246 to your computer and use it in GitHub Desktop.
test carbide
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 {examine, expandStudent} from '@gobbldygook/core' | |
import yaml from 'js-yaml' | |
import {padStart} from 'lodash/padStart' | |
import * as school from '@gobbldygook/school-stolaf' | |
function find_details_subdir(clbid) { | |
let str_clbid = padStart(clbid, 10, '0') | |
let n_thousand = Math.floor(clbid / 1000) | |
let thousands_subdir = padStart(n_thousand * 1000, 5, '0') | |
return thousands_subdir + '/' + str_clbid | |
} | |
function loadCourse(clbid) { ///Load the course… by requesting it from github! :D | |
return fetch(`https://raw.githubusercontent.com/StoDevX/course-data/master/courses/${find_details_subdir(clbid)}.json`).then(r => r.json()) | |
} | |
function loadArea({name, revision, type}) { ///This variant won't actually work for most people, but it'd do for a demo. | |
let url | |
if (name === 'Computer Science') { | |
url = 'https://raw.githubusercontent.com/hawkrives/gobbldygook-area-data/master/majors/computer-science.yaml' | |
} | |
else if (name === 'Asian Studies') { | |
url = 'https://raw.githubusercontent.com/hawkrives/gobbldygook-area-data/master/majors/asian-studies.yaml' | |
} | |
return fetch(url).then(r => r.text()).then(t => yaml.safeLoad(t)) | |
} | |
function prettify(school, results) { | |
// make the results pretty | |
return JSON.stringify(results) | |
} | |
async function main(student_file) { | |
const student = {name: 'Hawken Rives'} | |
// We start with a basic student, and flesh it out with the referenced data | |
const loaded = await expandStudent(student, loadCourse, loadArea) | |
// Then we check it | |
const results = await examine(loaded) | |
// and finally we show the results | |
console.log(prettify(school, results)) | |
} |
I found a great and easy way to make money. I bet on sports. By the way, this is a popular method in Azerbaijan, and many people earn money this way. It is only important to choose a reliable bookmaker. It's good that I found the bookmaker Mostbet https://mostbetaz.org/ оn the website you can read more about it. Here you will be able to bet on a variety of sporting events. And there is also a convenient mobile application. If you live in Azerbaijan and don't know where to bet on sports, then Mostbet is the perfect option for you, because here you will be able to enjoy betting on sports.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good afternoon. Every time I play at the Australian Shazam Casino, I get a lot of positive emotions and impressions. The casino website has a user-friendly and optimised interface that allows you to navigate through the sections and quickly find games for yourself. By the way, all the games that are presented on this casino are developed by leading providers that guarantee the quality of the game and high winnings.