Skip to content

Instantly share code, notes, and snippets.

Aleksander Guryanov caiiiycuk

Block or report user

Report or block caiiiycuk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@caiiiycuk
caiiiycuk / find_old_files.py
Created Aug 23, 2018
Python 2, 3: Find and delete files last modified over than year ago
View find_old_files.py
import os
import time
import sys
src = os.getcwd()
oneyear = 365 * 24 * 60 * 60
totalsaved = 0
with open('old_files.sh', 'w') as f:
for root, dirs, files in os.walk(src):
View gist:92503185ee9d4ec7512c
val x = Iterator.from(0).takeWhile(_ <= 10)
val y = Iterator.from(0).takeWhile(_ <= 10)
val xy = y.flatMap { y => x.map { x => (x, y) } }
xy.foreach(println)
@caiiiycuk
caiiiycuk / XitrumTest
Created Jul 24, 2013
Scala bug SI-6240
View XitrumTest
import scala.reflect.runtime.universe._
object ParamAccess {
val typeString = typeOf[String]
}
class ParamAccess {
import ParamAccess._
def paramo[T: TypeTag](key: String, coll: Map[String, Seq[String]]): Option[T] = {
You can’t perform that action at this time.