This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import xml.etree.ElementTree as ET | |
tree = ET.parse(sys.argv[1]) | |
root = tree.getroot() | |
nfe = root.findall("{http://www.portalfiscal.inf.br/nfe}NFe")[0] | |
icms = nfe.findall('.//{http://www.portalfiscal.inf.br/nfe}ICMS70/{http://www.portalfiscal.inf.br/nfe}vICMS') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slos: | |
- name: myteam-a.service-a | |
objectives: | |
availability: 99 | |
latency: | |
- le: 5.0 # 95% < 5s | |
target: 95 | |
- le: 10.0 # 97% < 10s | |
target: 97 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import logging | |
import json | |
try: | |
from urllib.parse import unquote | |
except ImportError: | |
# Python 2. | |
from urllib import unquote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from gi.repository import GLib, Gtk, Gdk | |
import Xlib.display | |
size = 167 | |
def main(): | |
window = Gtk.Window() # Gtk.WINDOW_TOPLEVEL) | |
window.set_default_size(size*0.68, Gdk.Screen.height()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"io" | |
"net" | |
"net/http" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numba | |
from numba import cuda | |
import numpy as np | |
@cuda.jit | |
def sort_kernel(array): | |
""" | |
Função executada dentro da GPU via LLVM | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from numba import cuda | |
@cuda.jit | |
def add_2(array): | |
pos = cuda.grid(1) | |
array[pos] = array[pos] + 2 | |
# criamos um vetor ordenado até 100000, [0, 1, 2, .. 999999] dentro da GPU | |
an_array = cuda.to_device(np.arange(100000)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from numba import cuda | |
@cuda.jit | |
def add_2(array): | |
pos = cuda.grid(1) | |
array[pos] = array[pos] + 2 | |
# criamos um vetor ordenado até 100000, [0, 1, 2, .. 999999] | |
an_array = np.arange(100000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from numba import cuda | |
@cuda.jit | |
def multiply_by_2(array): | |
pos = cuda.grid(1) | |
array[pos] = array[pos] * 2 | |
# criamos um vetor ordenado até 1000, [0, 1, 2] | |
an_array = np.arange(1000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numba import cuda | |
@cuda.jit | |
def multiply_by_2(array): | |
pos = cuda.grid(1) | |
array[pos] = array[pos] * 2 |
NewerOlder