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 | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (C) 2012 Wilson Pinto Júnior <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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 | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (C) 2014 Wilson Pinto Júnior <[email protected]> | |
# | |
import time | |
import sys | |
def print_in_line(text): |
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
# *-* coding: utf-8 *-* | |
# Author: Wilson Júnior <[email protected]> | |
# Licence: MIT | |
from gi.repository import Gtk, WebKit | |
class MyApp(Gtk.Window): |
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 | |
# Simple Netflix laucher | |
# AUTHOR: Wilson Júnior <[email protected]> | |
import os | |
from gi.repository import ( | |
Gdk, Gtk, WebKit, Soup) |
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 ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
type blah struct{} |
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 ( | |
"crypto/tls" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"golang.org/x/net/http2" | |
) |
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 |
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
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 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)) |
OlderNewer