Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 main | |
import ( | |
"unsafe" | |
"github.com/veandco/go-sdl2/sdl" | |
) | |
func main() { | |
const w = 640 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/python | |
# | |
# Based on answer from | |
# http://stackoverflow.com/questions/1420426/calculating-cpu-usage-of-a-process-in-linux | |
# | |
from time import sleep | |
import os | |
import os.path | |
import sys |
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
if _, err := os.Stat(filename); os.IsNotExist(err) { | |
fmt.Printf("no such file or directory: %s", filename) | |
return | |
} |
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/python | |
from PIL import Image | |
import argparse | |
import os | |
def main(): | |
parser = argparse.ArgumentParser(description="Resave jpeg files multiple times") | |
parser.add_argument("-n", "--number", default=500, type=int, | |
help="Number of resaves, default: 500") |
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/python | |
import pyglet | |
from pyglet.window import key | |
from time import time, strftime, localtime | |
running = False | |
begin, now, total = 0, 0, 0 | |
size = (320, 240) | |
format = "%.2f" |