Skip to content

Instantly share code, notes, and snippets.

View andrewssobral's full-sized avatar
🔴
I may be very slow to respond.

Andrews Cordolino Sobral andrewssobral

🔴
I may be very slow to respond.
View GitHub Profile
@andrewssobral
andrewssobral / cracking.md
Created May 3, 2018 14:05 — forked from vertexclique/cracking.md
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@andrewssobral
andrewssobral / gist:1417d380fcdada4112a150ebdf933124
Created May 3, 2018 14:04 — forked from yumitsu/gist:ec0c8f1f03dbc94eed8c
ST3 build 3065, Linux x64 - licenses

These licenses will be valid after sublime_text patching:

- BEGIN License -
Love
Unlimited user license
EA7E-8441
918381ACA844A0379CCAC729059720A4
BC9D409098618744BB45FF23E67568DB
82B926D92157127DB3B4054834D0477F
@andrewssobral
andrewssobral / LICENCE SUBLIME TEXT
Created May 3, 2018 13:44 — forked from cprakashagr/LICENCE SUBLIME TEXT
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
@andrewssobral
andrewssobral / print_env_info.py
Created February 27, 2018 14:45
env_info (python)
#import os
import socket
import platform
print('-------------------------------------------------------------')
print('Interpreter')
print('platform.python_version: ', platform.python_version())
print('platform.python_compiler: ', platform.python_compiler())
print('platform.python_build: ', platform.python_build())
print()
print('Platform')
# remove docker containers from specific image
docker rm -f $(docker ps -a -f "ancestor=activeeon/visdom_server" -q)
# run in background
nohup command &>/dev/null &
@andrewssobral
andrewssobral / pytorch_mnist_visdom.py
Last active March 13, 2021 16:57
pytorch_mnist_visdom
from __future__ import print_function
import argparse
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms

Portainer

Portainer runs as a lightweight Docker container (the Docker image weights less than 4MB) on a Docker engine or Swarm cluster.

$ docker volume create portainer_data
$ docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

Then, connect to http://localhost:9000/

import os
import math
import numpy as np
from argparse import ArgumentParser
from visdom import Visdom
from six.moves import urllib
# General parameters
DEFAULT_VISDOM_PORT = 8097
DEFAULT_VISDOM_HOST = "127.0.0.1"
# PNG TO JPG
mkdir jpegs
sips -s format jpeg ./*.png --out jpegs
# JPG TO PNG
mkdir pngs
sips -s format png ./*.jpg --out pngs
# GIF TO JPG
find . -iname "*.gif" -type f -exec sh -c 'sips -s format jpeg "$0" --out "${0%.gif}.jpeg"' {} \;