Skip to content

Instantly share code, notes, and snippets.

View cvgarciarea's full-sized avatar

Cristian García cvgarciarea

  • Dualboot Partners
  • Montevideo, Uruguay
  • X @zades9
View GitHub Profile
export ANDROID_SDK=$HOME/Android/Sdk
export PATH=$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$PATH
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$PATH:$ANDROID_HOME/tools
import sys
import json
import socket
import http.server
import socketserver
PORT = 8008
if len(sys.argv) > 1:
PORT = int(sys.argv[1])
#!/usr/bin/env python
# -*- coding: utf-8 -*-
LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
LETTER_QTY = len(LETTERS)
def get_column_number(word):
exp = 1
col = 0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
import curses
from curses import wrapper
from curses.textpad import rectangle
from math import ceil
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
class Complejo:
def __init__(self, a=0, b=0):
if not es_un_real(a):
raise TypeError("a debe ser un número real")
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
if (len(sys.argv) > 1):
numero = sys.argv[1]
else:
numero = str(input("CI (sin digito verificador): "))
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Hay un montón de cosaas de cairo que no uso, las
# podés ver acá: https://cairographics.org/documentation/pycairo/2/reference/context.html
import math
import cairo
import gi
@cvgarciarea
cvgarciarea / head_tab_window.py
Last active July 18, 2024 08:14
A Gtk+ Window with a tabs on HeaderBar.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import gi
gi.require_versions({"Gtk": "3.0", "Gdk": "3.0"})
from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GObject
{
"objects": {
"square": 308,
"triangle": 307,
"r1": 311,
"trigger-right": 313,
"start": 315,
"trigger-left": 312,
"l3": 317,
"l1": 310,
@cvgarciarea
cvgarciarea / Cairo Hexagon
Created December 5, 2016 18:04
Draw a regular hexagon on Cairo
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk