Data URI manipulation made easy.
This isn't very robust, and will reject a number of valid data URIs. However, it meets the most useful case: a mimetype, a charset, and the base64 flag.
from struct import unpack | |
import Image | |
tag_types = { 0 : 'End', | |
1 : 'Byte', | |
2 : 'Short', | |
3 : 'Int', | |
4 : 'Long', | |
5 : 'Float', | |
6 : 'Double', |
def calc_ean_13_checksum(ean): | |
import math | |
sum = 0 | |
for x, c in enumerate(str(ean)[::-1]): | |
if (x+1) % 2 == 0: | |
sum += int(c) | |
else: | |
sum += int(c) * 3 | |
return int(math.ceil(sum / 10.0) * 10) - sum |
Last updated: 2015-08-11
exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .
###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs
#!/bin/sh | |
CONF=/etc/openvpn/home/client-config/DEFAULT | |
IP_URL=http://api.antizapret.info/group.php | |
trap cleanup EXIT | |
cleanup() { | |
rm $NEW_CONF 2>/dev/null | |
} |
https://egghead.io/
https://habr.com/post/359192/ алгоритмы на js все
https://www.youtube.com/watch?v=j4_9BZezSUA event loop
https://fseby.wordpress.com/2016/02/25/практическая-вводная-в-монады-в-javascript/
https://habrahabr.ru/company/mailru/blog/327522/ (Функциональное программирование в JavaScript с практическими примерами)
https://habrahabr.ru/post/298134/ (FizzBuzz, или почему программисты не умеют программировать)
http://dmitrysoshnikov.com/ecmascript/javascript-the-core-2nd-edition-rus/ (всякое общее)
https://medium.com/@frontman/приведение-типов-в-js-9d6f1845ea96 (приведение типов и др. инфа)
https://ru.wikipedia.org/wiki/Шаблон_проектирования
#!/bin/bash | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |