Skip to content

Instantly share code, notes, and snippets.

View aron-bordin's full-sized avatar

aron aron-bordin

View GitHub Profile

Keybase proof

I hereby claim:

  • I am aron-bordin on github.
  • I am aronbordin (https://keybase.io/aronbordin) on keybase.
  • I have a public key ASA20bTNUW3ZDPpbfrEE1o7_4C2ebfeUFV-_kJpbHEpkywo

To claim this, I am signing this object:

from math import inf
K = 3
class Arquivo:
registros = [3, 4, 5, 1, 2, 6, 8]
<h2 class="page-header">Linear Systems (A⋅x = b)</h2>
<div class="alert alert-warning" ng-if="error != null">
<strong>Error</strong> {{error}}
</div>
<form class="form-horizontal">
<div class="form-group">
#! /usr/bin/env python
from utils import *
pending_requests = 0
result = {}
def response_parse(response):
global pending_requests
#include <stdio.h>
#include <stdlib.h>
#include <list>
#include <windows.h>
using namespace std;
#include <conio.h>
@aron-bordin
aron-bordin / safe-import.py
Created October 9, 2015 21:18
Testing Python ast to safe-import
import ast
import codegen
class CallWrapper(ast.NodeTransformer):
def visit_Call(self, node):
if node.col_offset == 0:
return None
return node
src = open('test1.py').read()
from kivy.base import runTouchApp
from kivy.lang import Builder
runTouchApp(Builder.load_string('''
ActionBar:
pos_hint: {'top':1}
btn: btn
ActionView:
use_separator: True
ActionPrevious:
@aron-bordin
aron-bordin / ContextualActionView.py
Created July 12, 2015 04:03
Kivy ContextualActionView example
from kivy.base import runTouchApp
from kivy.uix.floatlayout import FloatLayout
from kivy.factory import Factory
from kivy.lang import Builder
from kivy.uix.actionbar import ContextualActionView
if __name__ == "__main__":
# XXX clean the first registration done from '__main__' here.
@aron-bordin
aron-bordin / check_ssh_git_python.py
Created July 7, 2015 00:38
Validate if git remote(github) password is valid. To do it, I try to connect to the git ssh. It'll run the ssh-agent and start it
from sh import ssh, ErrorReturnCode_1, ErrorReturnCode_255
aggregated = ""
def ssh_interact(char, stdin):
global aggregated
aggregated += char
if aggregated.startswith("Enter passphrase"):
stdin.put("mypass\n")
try:
@aron-bordin
aron-bordin / kivyconsole.py
Last active March 28, 2024 15:31
Initial Python/Kivy Terminal Emulator (It's just a performance test. You can use this sample to write your own terminal emulator)
from kivy.base import runTouchApp
from kivy.event import EventDispatcher
from kivy.lang import Builder
from kivy.properties import ObjectProperty, ListProperty, StringProperty, \
NumericProperty, Clock, partial
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.textinput import TextInput
import os
import subprocess
import threading