This file contains 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
mod clock; | |
mod ego; | |
mod keepalive; | |
mod mavrouter; | |
use clap::Parser; | |
use file_rotate::compression::Compression; | |
use file_rotate::suffix::AppendTimestamp; | |
use file_rotate::suffix::FileLimit; | |
use file_rotate::ContentLimit; |
This file contains 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 python3 | |
# | |
# This script is a tool that helps you calculate the potential benefits | |
# in occupied size on disk using the ext4 inlinedata new feature on | |
# Linux kernels 3.8.0+: | |
# "The new Inline Data Support feature allows Ext4 to store files that only consist of a few bytes together with the inode to save storage space and accelerate access" | |
# see http://www.h-online.com/open/features/What-s-new-in-Linux-3-8-1804240.html for details. | |
# | |
# Just run it on your ext4 mountpoints and it will tell give you the trade off |
This file contains 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
## py3 | |
import shelve | |
import dbm | |
import pickle | |
with dbm.open('source', 'r') as source: # no .db here on purpose. | |
with shelve.open('destination.db') as destination: | |
for key in source.keys(): | |
key = key.decode('utf-8') | |
value = pickle.loads(source[key]) | |
print(key, value) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# | |
# /etc/makepkg.conf | |
# | |
######################################################################### | |
# SOURCE ACQUISITION | |
######################################################################### | |
# | |
#-- The download utilities that makepkg should use to acquire sources | |
# Format: 'protocol::agent' |
This file contains 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 errbot import BotPlugin, botcmd | |
class PluginMaker(BotPlugin): | |
""" Example demonstrating how to create an errbot plugin out of thin air. | |
This basically generates a plugin from scratch and registers it at activation. | |
""" | |
def activate(self): | |
super().activate() |
This file contains 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
goo.gl/c0wDyW |
This file contains 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 myhdl import always, always_comb, always_seq, Signal, ResetSignal, toVerilog, toVHDL, delay, traceSignals, Simulation, now, intbv, concat | |
def chenillar(clk, reset, leds, direction): | |
@always(clk.posedge) | |
def scroll(): | |
if bool(direction): | |
leds.next = leds >> 1 | |
if leds == 0b1: | |
direction.next = 0 | |
else: |
This file contains 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 | |
import matplotlib | |
matplotlib.use('Qt4Agg') | |
from datetime import datetime | |
import os | |
DIR = 'data/' | |
dirList=os.listdir(DIR) | |
unzip = lambda l:tuple(zip(*l)) |
This file contains 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 errbot import BotPlugin, botcmd | |
class RemindMe(BotPlugin): | |
@botcmd | |
def store(self, msg, args): | |
self['key'] = args | |
@botcmd | |
def recall(self, msg, args): | |
return self['key'] |
NewerOlder