Table of Contents:
Discover gists
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
def is_safe(graph, colours, colour, current): | |
neighbours = graph[current] | |
for neighbour in neighbours: | |
if colour == colours[neighbour - 1]: | |
return False | |
return True | |
def graph_traversal(graph, colours, vertices, current): | |
if current == vertices + 1: | |
return True |
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 heapq | |
from typing import List | |
def djikstra(graph_inner, starting, vertices) -> List: | |
pq = [] | |
dist = [float('inf') for i in range(vertices)] | |
dist[starting] = 0 | |
print(dist) | |
heapq.heappush(pq, [0, starting]) |
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
const KEY_CODE = { | |
ARROW_DOWN: 40, | |
BACKSPACE: 8, | |
ENTER: 13, | |
}; | |
/** | |
* Dispatch keydown event. | |
* | |
* @param {number} keyCode |
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
#!/bin/sh | |
#https://github.com/PythonicNinja/jetbrains-reset-trial-mac-osx/blob/master/runme.sh | |
for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine Rider; do | |
echo "Closing $product" | |
ps aux | grep -i MacOs/$product | cut -d " " -f 5 | xargs kill -9 | |
echo "Resetting trial period for $product" |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
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
root = true | |
# C# files | |
[*.cs] | |
#### Core EditorConfig Options #### | |
# Indentation and spacing | |
indent_size = 4 | |
indent_style = space |
- Create the GPT partition table
$ parted /dev/sdX mklabel gpt
- Create the UEFI FAT32 partition (which will be
/dev/sdXY
)$ parted /dev/sdX mkpart esp fat32 1MiB 512MiB
$ parted /dev/sdX set 1 esp on
$ parted /dev/sdX set 1 boot on
$ mkfs.fat -F 32 -n UEFI /dev/sdXY
NewerOlder