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
function isClockwise(from, to) { | |
let diff = normalize(from) - normalize(to); | |
return normalize(diff) > 180; | |
} | |
// Returns angle normalized to between [0, 360). | |
function normalize(angle) { | |
while (angle < 0) { | |
angle += 360; | |
} |
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 pandas | |
f = pandas.read_csv("keepass_export.csv") | |
f = f[f["Group"] != "Root/Recycle Bin"] | |
f2 = pandas.DataFrame() | |
f2["title"] = f["Title"] | |
f2["website"] = f["URL"] | |
f2["username"] = f["Username"] | |
f2["password"] = f["Password"] | |
f2["notes"] = f["Notes"] |
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 <stdio.h> | |
#include <string.h> | |
void swap(char* a, char* b) { | |
char t = *a; | |
*a = *b; | |
*b = t; | |
} | |
void bubblesort(char* s, int 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 pygame | |
# Game variables | |
my_dudes_x_position = 300 | |
bullets = [] | |
window = pygame.display.set_mode((640, 480)) | |
clock = pygame.time.Clock() | |
def clear_the_screen(): |
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
<Point><coordinates>176.0837184,-38.7152427</coordinates></Point> | 8 | <h1>TWO MILE BAY</h1><h2>Broadcasts</h2><ul><li>tx: MOBILE<br>150.6875<br>SELF LOADER LOGGING</li><li>tx: MOBILE<br>153.55625<br>SELF LOADER LOGGING</li><li>tx: MOBILE<br>150.8375<br>SELF LOADER LOGGING</li><li>tx: MOBILE<br>150.8625<br>SELF LOADER LOGGING</li><li>tx: MOBILE<br>153.53125<br>SELF LOADER LOGGING</li></ul> |
---|
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 ij.ImagePlus; | |
import ij.plugin.filter.PlugInFilter; | |
import ij.process.ImageProcessor; | |
public class My_Inverter implements PlugInFilter { | |
public int setup(String arg, ImagePlus im) { | |
return DOES_8G; // this plugin only works on 8-bit grayscale images | |
} | |
public void run(ImageProcessor ip) { |
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
{ | |
"album": { | |
"#text": "The System is a Vampire", | |
"mbid": "" | |
}, | |
"artist": { | |
"#text": "Shapeshifter", | |
"mbid": "40d1d78f-6b66-4b14-b8c8-f13786a8cf4f" | |
}, | |
"date": { |
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
Connection from 130.217.220.68 port 22 [tcp/ssh] accepted | |
Connection from 93.155.247.169 port 22 [tcp/ssh] accepted | |
Connection from 69.14.182.219 port 22 [tcp/ssh] accepted | |
Connection from 69.14.182.219 port 22 [tcp/ssh] accepted | |
Connection from 85.217.190.69 port 22 [tcp/ssh] accepted | |
Connection from 85.217.190.69 port 22 [tcp/ssh] accepted | |
Connection from 174.36.47.98 port 22 [tcp/ssh] accepted | |
Connection from 12.234.201.132 port 22 [tcp/ssh] accepted | |
Connection from 89.16.174.125 port 22 [tcp/ssh] accepted | |
Connection from 88.191.138.141 port 22 [tcp/ssh] accepted |
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 ruby | |
# | |
# This file, gist, is generated code. | |
# Please DO NOT EDIT or send patches for it. | |
# | |
# Please take a look at the source from | |
# http://github.com/defunkt/gist | |
# and submit patches against the individual files | |
# that build gist. | |
# |
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 ruby | |
# | |
# This file, gist, is generated code. | |
# Please DO NOT EDIT or send patches for it. | |
# | |
# Please take a look at the source from | |
# http://github.com/defunkt/gist | |
# and submit patches against the individual files | |
# that build gist. | |
# |
NewerOlder