Instantly share code, notes, and snippets.

🍀
cvs -q up -Pd -A

# mbsdmurilobsd

🍀
cvs -q up -Pd -A
• Sort options
Created Aug 22, 2019 — forked from josephg/main.c
kqueue network & file example
View main.c
 #include #include #include #include #include #include #include #include #include
Created Feb 12, 2019 — forked from gubatron/dht-walkthrough.md
DHT walkthrough notes
View dht-walkthrough.md

# DHT Walkthrough Notes

I've put together these notes as I read about DHT's in depth and then learned how the libtorrent implementation based on the Kademlia paper actually works.

## What problem does this solve?

`400,000,000,000` (400 billion stars), that's a 4 followed by 11 zeros. The number of atoms in the universe is estimated to be around `10^82`. A DHT with keys of 160 bits, can have `2^160` possible numbers, which is around `10^48`

Created Jul 3, 2018
Telegram Bot example
View tg_bot.py
 #!/usr/bin/env python from __future__ import print_function import datetime import os import random import re import time import telepot
View tjsp.py
 """Simples script para baixar imagens do captcha do portal TJSP. Copyright (c) 2016, Murilo Ijanc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Created Dec 5, 2016
View mongoauthplugin.py
 import asyncio from bson import ObjectId class MongoAuthPlugin(BaseAuthPlugin): def __init__(self, context): super().__init__(context) self._db = db @asyncio.coroutine
Created May 4, 2016
bot politico
View botpolitico.py
 #!/usr/bin/env python # coding=utf-8 import urllib2 import argparse import facebook import time import random import re from lxml import html
Last active Aug 29, 2015
consulta juristec
View consulta

Created Dec 6, 2013
error in post data
View teste_form_cycle.py
 class CyclePostTest(TestCase): def setUp(self): user = User.objects.create_user('murilo', 'murilo@murilo.com', 'murilo') farm = Farm.objects.create(user=user, name='teste', full_area='123.45', uncultivated_area='0.00') self.client.login(username='murilo', password='murilo') data = dict(farm=farm, user=user, name='2014') self.resp = self.client.post('/ciclo/cadastrar/', data) def test_post(self): 'Valid Post should redirect to /ciclo/1/.'
Last active Dec 29, 2015
View fazenda_teste.py
 # encoding: utf-8 from django.test import TestCase from django.contrib.auth.models import User from django.test.client import Client from django.template.defaultfilters import slugify from django.test.client import RequestFactory from fazenda.core.models import Fazenda from fazenda.core.views import FazendaDetail
Created Oct 16, 2013