This is an outdated version
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
__version__ = "0.1-prealpha" | |
__author__ = "Adam Hopkins" | |
import trio | |
from itertools import count | |
from functools import partial | |
from functools import lru_cache | |
from collections import defaultdict | |
from typing import Optional, List |
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
# The MIT License (MIT) | |
# Copyright (c) 2016 Vladimir Ignatev | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the Software | |
# is furnished to do so, subject to the following conditions: | |
# |
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
class DictObj(dict): | |
def __init__(self, **kwargs): | |
dict.__init__(self, **kwargs) | |
self.__dict__ = self | |
obj = DictObj(a=1) | |
print(obj.a) # 1 | |
print(obj.get('a')) # 1 | |
print(obj) # {'a': 1} |
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
#!/bin/sh | |
sudo apt-get update \ | |
&& sudo apt-get install -qy docker.io | |
sudo apt-get update \ | |
&& sudo apt-get install -y apt-transport-https \ | |
&& curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
This is an outdated version
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: `Ember's Route Hook Order`, | |
queryParams: ['foo'], | |
foo: null, | |
actions: { | |
clearLog() { | |
Ember.$('.log-item').remove(); |
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
for i in {1..100}; do curl -o /dev/null -s -w '%{time_total}\n' <URL>; done; |
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
from sanic import Sanic | |
import json | |
import asyncio | |
app = Sanic(__name__) | |
feeds = {} | |
class Feed(object): |