This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _to_snake_case(word): | |
final = '' | |
for item in word: | |
if item.isupper(): | |
final += "_" + item.lower() | |
else: | |
final += item | |
if final[0] == "_": | |
final = final[1:] | |
return final |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(box_syntax)] | |
use std::rc::Rc; | |
#[derive(Debug)] | |
enum List<T: Clone> { | |
Empty, | |
Exist(Rc<Box<Node<T>>>), | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
def each_slice_2(f, iterator): | |
a = iterator.__iter__() | |
for i in a: | |
try: | |
j = a.__next__() | |
except: | |
j = 0 | |
yield f(i, j) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[print(*t) for terms, used in zip([input().split()], [set()]) for t in map(lambda x: (x, terms.count(x)), terms) if t not in used and (used.add(t) or True)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------- Rust extension configuration -------- | |
// The mode in which the extension will function | |
"rust.mode": "rls", | |
// Specifies path to Racer binary if it's not in PATH | |
"rust.racerPath": "C:\\Users\\tera\\.cargo\\bin\\racer.exe", | |
// Specifies path to Rustfmt binary if it's not in PATH | |
"rust.rustfmtPath": "C:\\Users\\tera\\.cargo\\bin\\rustfmt.exe", |
OlderNewer