Skip to content

Instantly share code, notes, and snippets.

Avatar
😋

Matt Madoshakalaka

😋
  • Altlab
  • Edmonton, Canada
View GitHub Profile
View cloner.rs
#![feature(cell_update)]
#[cfg(test)]
mod test {
use crate::*;
use std::cell::Cell;
#[test]
fn test() {
test_counter::<0>();
@shaypal5
shaypal5 / .travis.yml
Last active Aug 7, 2022
Comprehensive Python testing on Travis CI
View .travis.yml
language: python
# ===== Linux ======
os: linux
dist: xenial
python:
- 2.7
- 3.6
- 3.7
- 3.8
- 3.9
@iddan
iddan / sync_pipfile_setup.py
Last active Aug 25, 2019
Sync Pipfile and setup.py
View sync_pipfile_setup.py
# Sync Pipfile with setup.py dependencies
# Assumptions:
# - You are running in a directory with Pipfile, Pipfile.lock & setup.py
# - Your setup.py calls a function named setup()
# - setup() is called with keyword arguments of install_requires and dependency_links (can be empty lists)
# - All your remote dependencies are HTTPS git
import pipfile
import ast
import json
View automata.py
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state