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
import subprocess | |
import pandas as pd | |
columns = ["task", "data", "nrow" , "k", "na", "sort", "active"] | |
dtypes = {x: str for x in columns} | |
data = pd.read_csv("_control/data.csv", names=columns, dtype=dtypes) | |
for index, row in data.iterrows(): | |
if row["active"] != "1": | |
continue |
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
import os | |
import time | |
import pstats | |
import argparse | |
import pandas as pd | |
csv_columns = [ | |
"ncalls", | |
"ncalls_percent", | |
"primitive_calls", |
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 | |
import pandas as pd | |
import argparse | |
def main(): | |
# Parse command line | |
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, | |
description=""" | |
Convert RUR income and taxes, sums them and substracts. |
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
import sys | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 | |
from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0 | |
devices = { | |
'nintendo': 36, | |
'samsung': 31, | |
'ps4': 32, |
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
[Unit] | |
Description=Start screen with irssi on startup | |
After=multi-user.target | |
[Service] | |
Type=idle | |
ExecStart=/bin/su -l -c "screen -S irc -d -m irssi" username | |
[Install] | |
WantedBy=multi-user.target |
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
package main | |
import ( | |
"flag" | |
"log" | |
"os" | |
"os/signal" | |
"sync" | |
"time" |
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
// For forwarding testing call | |
// "insmod ./x86_64-native-linuxapp-gcc/kmod/rte_kni.ko lo_mode=lo_mode_fifo_skb" | |
// from DPDK directory before compiling this test. It will make a loop of packets | |
// inside KNI device and receive from KNI will receive all packets that were sent to KNI. | |
// For ping testing call | |
// "insmod ./x86_64-native-linuxapp-gcc/kmod/rte_kni.ko" | |
// from DPDK directory before compiling this test. Use --ping option. | |
// Other variants of rte_kni.ko configuration can be found here: |
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
import urllib2 | |
import xml.etree.ElementTree as ET | |
import pickle | |
import time | |
def main(): | |
# Gather required info. | |
lastfm_username = raw_input("Lastfm username: ").strip() | |
lastfm_key = raw_input("Lastfm API key: ").strip() | |
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 python | |
# Today is the 9th of March 2015. | |
# | |
# Not really tested! | |
# | |
# Instructions: | |
# | |
# 0. Install python and pip. | |
# 1. Download this to a file `lastfm_to_gmusic.py` |