Skip to content

Instantly share code, notes, and snippets.

View advishnuprasad's full-sized avatar
🐍
Devops & Python Consultant

A D Vishnu Prasad advishnuprasad

🐍
Devops & Python Consultant
View GitHub Profile
@advishnuprasad
advishnuprasad / folder_splitter.py
Last active April 28, 2018 14:20 — forked from zupo/folder_splitter.py
Split a folder with many files into subfolders with N files.Usage: python folder_splitter.py path/to/target/folder
# -*- coding: utf-8 -*-
# @author: Peter Lamut
import argparse
import os
import shutil
N = 1000 # the number of files in seach subfolder folder
o = Object.new
# class_eval example
class << o; self; end.class_eval { def test1; :test1; end }
o.test1 #=> test1
# instance_eval example
class << o; self; end.instance_eval { def test2; :test2; end }
o.test2 #=> NoMethodError