Skip to content

Instantly share code, notes, and snippets.

@mercutiodesign
mercutiodesign / 2011-10-19.tex
Created October 22, 2011 17:16
Analysis Notizen
\documentclass[12pt,a4paper,leqno]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{fancyhdr}
\pagestyle{fancy}
@mercutiodesign
mercutiodesign / random_imgur.py
Created July 12, 2012 20:19
random imgur downloader
import os
import sys
import random
import time
from urllib.request import Request, urlopen
from urllib.error import URLError, HTTPError
CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz"
start_time = time.time()
# Build and Object Folders
bin/
obj/
#User Specific Files
*.user
*.suo
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# Rate die Zahl
zahl = 12
geraten = -1
print("An welche Zahl denke ich?")
while geraten != zahl:
geraten = int(input("Es ist... "))
if geraten == zahl:
@mercutiodesign
mercutiodesign / 0_reuse_code.js
Created January 31, 2014 00:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# coding: utf-8
from bs4 import BeautifulSoup
from urllib import request
def extract(path):
'''
Returns a list of heroes displayed on the dotabuff page at `path`
'''
page = BeautifulSoup(request.urlopen("http://dotabuff.com/" + path))
return (a.text for a in page.select('.hero-link'))
@mercutiodesign
mercutiodesign / rust_udl.xml
Created May 15, 2015 20:30 — forked from heimp/rust_udl.xml
Compare to other definition
<NotepadPlus>
<UserLang name="Rust" ext="rs" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="yes" Keywords5="no" Keywords6="yes" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00// 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
diff --git a/PKGBUILD b/PKGBUILD
index 66ab106..e320d2d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ pkgver=10.13
pkgrel=1
pkgdesc="Backup software to synchronize files and folders"
arch=('i686' 'x86_64')
-url="https://www.freefilesync.org"
+url="https://freefilesync.org"
@mercutiodesign
mercutiodesign / moshInstall2AmazonAMI.sh
Last active June 22, 2021 01:15 — forked from pesblog/moshInstall2AmazonAMI.sh
mosh install to AWS EC2 (Amazon AMI)
#!/bin/sh
sudo yum -y install autoconf automake gcc gcc-c++ make boost-devel zlib-devel ncurses-devel protobuf-devel openssl-devel
cd /usr/local/src
VERSION=1.3.2
PKGNAME=mosh-$VERSION
FNAME=$PKGNAME.tar.gz
sudo wget https://mosh.org/$FNAME
sudo tar xvf $FNAME
cd $PKGNAME
import torch
import torchvision
from pathlib import Path
import zipfile
path = Path('./data/tiny-imagenet-200.zip')
extracted_path = path.parent / path.stem
if extracted_path.exists():