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
| let stars = () => 1 + Math.round(Math.random() * 4); | |
| // uncomment this if you want fixed stars | |
| // stars = () => 3; | |
| // 'SUBJECT_CODE': [COURSE_STARS, FACULTY_STARS] | |
| // for example `'CSE356': [1, 1]` | |
| const specialSubjects = { | |
| } | |
| if (window.location.pathname == '/Feedback') { |
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 timeit | |
| from terminaltables import SingleTable | |
| def bubble_sort(arr): | |
| for i in range(len(arr) - 1): | |
| for j in range(0, len(arr) - i - 1): | |
| if arr[j] > arr[j + 1]: | |
| arr[j], arr[j + 1] = arr[j + 1], arr[j] |
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 math | |
| def r(x): | |
| return str(round(x, 6)) | |
| def bisection_print(fn, xl, xu, last_xm=None, last_err=None, iter=1): | |
| out_str = f"\\textbf{{Iteration {iter}}}\n\n" | |
| out_str += "\n\\vspace{20pt}\\textbf{Step 1}\n" | |
| out_str += f"$$ x_{{l}} = {r(xl)}, x_{{u}} = {r(xu)} $$\n" |
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 { Component, createRef, RefObject } from "react"; | |
| import c from 'classnames'; | |
| /*--------------------- | |
| * Component Types | |
| *---------------------*/ | |
| interface State { | |
| years: number[], | |
| selected: string[], |
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
| let conf = { | |
| flipX: false, | |
| flipY: true, | |
| angle: 180, | |
| }; | |
| function rotate(){ | |
| let theaterButton = $('.ytp-size-button.ytp-button'); | |
| if (theaterButton.title.includes("Theater")) { | |
| setTimeout(rotate, 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
| package practice; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.util.ArrayList; | |
| import java.util.LinkedList; | |
| import java.util.Scanner; | |
| public class eliminate_lr { |
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
| #include <iostream> | |
| #include <string> | |
| #include <list> | |
| #include <unordered_map> | |
| #include <set> | |
| using namespace std; | |
| #ifndef CC_CFG_H | |
| #define CC_CFG_H |
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
| git --no-pager branch --merged main | xargs git branch -d |
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 django.db import transaction | |
| from ordered_model.serializers import OrderedModelSerializer | |
| from rest_framework import serializers | |
| from rest_framework.serializers import ListSerializer | |
| class ReplaceListSerializer(ListSerializer): | |
| @transaction.atomic() | |
| def update(self, instances, validated_data): | |
| ins_mapping = {ins.id: ins for ins in instances} |
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 Bun from 'bun'; | |
| import * as ts from 'typescript'; | |
| import { factory } from 'typescript'; | |
| const glob = new Bun.Glob('src/**/*.{ts,js,jsx,tsx}'); | |
| const tImportFactory = factory.createImportDeclaration( | |
| undefined, | |
| factory.createImportClause( |