Skip to content

Instantly share code, notes, and snippets.

View cfclrk's full-sized avatar
❤️

Chris Clark cfclrk

❤️
View GitHub Profile
@poliarush
poliarush / conftest.py
Created December 25, 2014 18:35
How to create shared object instance thru fixture with pytest xdist
import pytest
from random import randint
import logging
import pickle
logging.basicConfig(filename="log.log", level=logging.INFO)
class App(object):
def __init__(self):
self.a = randint(0, 100)
@renatoathaydes
renatoathaydes / ScalaVSCeylon.scala
Last active October 17, 2018 08:29
Scala VS Ceylon
// This is a comparison between Scala and Ceylon based on this previous comparison I made between Haskell and Groovy:
// https://gist.github.com/renatoathaydes/5078535
// Ex 1. If we have two lists, [2,5,10] and [8,10,11] and we want to get the products of all the possible
// combinations between numbers in those lists, here's what we'd do.
/* SCALA */
for { x <- List(2,5,10); y <- List(8,10,11) } yield x*y