Skip to content

Instantly share code, notes, and snippets.

View vrootic's full-sized avatar
🏠
Working from home

Vic vrootic

🏠
Working from home
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 1024
#define TILE_WIDTH 8
__global__
void vecMutKernel (float* front, float* end, float* ans, int n)
{
##Mac App Download List
* Appcleaner
* Mongohub
* Sequel Pro
* VLC
* Hub (brew install hub, for github command)
* GitHub
* Mou
* SourceTree
def create_directory (records)
@dir = [] # Store all {container_object_id : [file_object_id]}
@container = [] # All content
@file = [] # [file_object_ids]
if records.respond_to?('each')
records.each do |record|
if record['container'] == nil && record['type'] == "container"
@container.push record['object_id']
end
[{27=>[377, 379, 381, 383, 131, 133, 135, 603]}, {17=>[27, 371, 385, 369, 147]}, {603=>[605]}]
set encoding=utf-8
syntax on
set nocompatible
set ai
set shiftwidth=2
set tabstop=4
set softtabstop=4
set expandtab
public static void unzip(String zipFilePath, String dirPath, int bufferSize) throws IOException {
int size;
byte[] buffer = new byte[bufferSize];
try {
if (!dirPath.endsWith("/")) {
dirPath += "/";
}
File f = new File(dirPath);
import requests
from bs4 import BeautifulSoup
import pycurl
import io
def get_content(url):
res = requests.get(url)
return res.content
def html_parser(url):
import os
from flask import render_template, request, send_from_directory
from werkzeug.utils import secure_filename
from app import app
@app.route('/')
def index():
return render_template('index.html')
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse" >
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#" style="">Lab212</a>
def packed_bytes_to_iq(self, bytes):
''' Convenience function to unpack array of bytes to Python list/array
of complex numbers and normalize range. Called automatically by read_samples()
'''
if has_numpy:
# use NumPy array
iq = np.empty(len(bytes)//2, 'complex')
iq.real, iq.imag = bytes[::2], bytes[1::2]
iq /= (255/2)
iq -= (1 + 1j)