Skip to content

Instantly share code, notes, and snippets.

View edran's full-sized avatar
🚒
Pls work on climate now! Email me, I can help!

Nantas Nardelli edran

🚒
Pls work on climate now! Email me, I can help!
View GitHub Profile
#!/usr/bin/env python
class ExamBoard(object):
def submit(self, work):
work_is_passing_grade = len([work]) > 0
return work_is_passing_grade
class Society(object):
@edran
edran / csv2OSTV.py
Last active August 29, 2015 14:09
csv2OSTV formatter.
import argparse
def break_r(path, number):
n = int(number)
f = open(path, "r")
ls = f.readlines()
print(ls)
s = []
@edran
edran / create_user.sh
Last active August 29, 2015 14:13
Create user data folder for workstation users
#!/bin/bash
# Note: the script will *purposely* then go to the
# back up folder if run from the home directory.
set -e # errors yeah
BACKUP="$HOME/.home_backup"
THIS_USER=`logname`
DATA="/data/$THIS_USER"
@edran
edran / history.txt
Created April 8, 2015 17:10
ROS nao 2.1 installation history
1 ls
2 su -c 'sed -i "s|#allow user nao to shutdown the robot|nao ALL=(ALL) ALL\n&|" /etc/sudoers'
3 curl -k -s https://chili-research.epfl.ch/ros4nao/bootstrap.sh | sh
4 sudo emerge log4cxx netifaces pyyaml poco
5 ping 8.8.8.8
6 sudo emerge log4cxx netifaces pyyaml poco
7 sudo robotpkgin install nao-robot
8 roscore
9 source .bash_profile
10 roscore
@edran
edran / server.lua
Created August 3, 2015 12:07
Small buffer receiving set of functions
require 'socket'
require 'struct'
-- TODO: make class
print "Initializing server..."
server = socket.tcp()
server:bind('*',12312)
server:listen(32)
client = server:accept()
@edran
edran / rep_info.py
Created February 16, 2017 18:30 — forked from ebetica/rep_info.py
Example script to go through some starcraft replays and grab infomation about it, dumping into a CSV
# This script tries as best as possible to filter out bad replays
# Pass it a subdir, and it will read all '.rep' files, and spit out a list
# of the corrupt files in stdout
from __future__ import print_function
from pyreplib import replay
from itertools import repeat
from multiprocessing import Pool, Process, Pipe
from multiprocessing.pool import ThreadPool
from Queue import Queue
import os
@edran
edran / check_rep.py
Created February 16, 2017 18:30 — forked from ebetica/check_rep.py
Runs through a directory of starcraft replays and outputs all the corrupt ones
# This script tries as best as possible to filter out bad replays
# Pass it a subdir, and it will read all '.rep' files, and spit out a list
# of the corrupt files in stdout
from __future__ import print_function
from pyreplib import replay # https://github.com/HearthSim/pyreplib/
from itertools import repeat
from multiprocessing import Pool, Process, Pipe
from multiprocessing.pool import ThreadPool
import os
import sys

Keybase proof

I hereby claim:

  • I am edran on github.
  • I am edran (https://keybase.io/edran) on keybase.
  • I have a public key ASCN-UQ2mipGKTRMjQHr878roH8thV3KolEqAmNDGpU3ZAo

To claim this, I am signing this object:

@edran
edran / pyproject.toml
Created February 17, 2022 11:15
Reproducing poetry issue
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Nantas Nardelli <nantas@carbonre.tech>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.9"