Skip to content

Instantly share code, notes, and snippets.

@FedericoPonzi
FedericoPonzi / 21.cpp
Created November 5, 2017 15:34
This is my first attempt to learn CUDA, and is the solution for the problem 21 on project euler.
#include <iostream>
#include <math.h>
#include <vector>
#include <map>
#include <string>
using namespace std;
void divide(int N, long* m){
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "inc/env.h"
Env **environment;
/**
* This sould be a K-V hashmap. I will rewrite it someday (maybe)
*/
==Phrack Inc.==
Volume One, Issue 7, Phile 3 of 10
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following was written shortly after my arrest...
\/\The Conscience of a Hacker/\/
by
import requests
import datetime
import time
import threading
import sys
from threading import Lock
import queue
chal_url = "https://challenge.curbside.com/"
@FedericoPonzi
FedericoPonzi / Vagrantfile
Created April 30, 2017 18:38
Vagrant with hadoop local
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Random;
/**
* Created by Federico Ponzi on 19/02/17.
* https://www.linkedin.com/pulse/performance-array-vs-linked-list-modern-computers-dat-hoang-tien
*/
public class Benchmark
{
@FedericoPonzi
FedericoPonzi / adblock.txt
Created January 17, 2017 16:21
My filters for adblocker. Used for (mostly) annoying popup ads not blocked when browsing streaming sites.
ebalovochrome.ru
ucmzz.bestprizeland.2069.ws
codeonclick.com
algocashmaster.net
seen-on-screen.thewhizmarketing.com
speednetwork6.adk2x.com
traffic.getmyads.com
adskeeper.co.uk
h3649.ru
trendingpatrol.com
@FedericoPonzi
FedericoPonzi / summary.py
Created January 5, 2017 09:57
A small script to summarize text
# coding=utf-8
from __future__ import absolute_import
from __future__ import division, print_function, unicode_literals
from sumy.parsers.html import HtmlParser
from sumy.parsers.plaintext import PlaintextParser
from sumy.nlp.tokenizers import Tokenizer
from sumy.summarizers.lsa import LsaSummarizer as Summarizer
from sumy.nlp.stemmers import Stemmer
from sumy.utils import get_stop_words
@FedericoPonzi
FedericoPonzi / big-o-java-collections.md
Last active December 18, 2024 16:07
Big O notation for java's collections

The book Java Generics and Collections has this information (pages: 188, 211, 222, 240).

List implementations:

                      get  add  contains next remove(0) iterator.remove
ArrayList             O(1) O(1) O(n)     O(1) O(n)      O(n)
LinkedList O(n) O(1) O(n) O(1) O(1) O(1)
@FedericoPonzi
FedericoPonzi / not_expected_to_understand_this.md
Created December 18, 2016 11:38
Line 2238 Unix V6 Comment: You are not expected to understand this.

Here is the famous line 2238 of Unix V6 which is part of some of the most delicate parts of the kernel, context switching.

This comment received huge publicity and just may be the the most famous source code comment in computing history.

2230	/*
2231	 * If the new process paused because it was
2232	 * swapped out, set the stack level to the last call
3333	 * to savu(u_ssav).  This means that the return
2235	 * actually returns from the last routine which did

2236 * the savu.