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
| +------+------------+---------+------------------+ | |
| | id | tag | country | diff | | |
| +------+------------+---------+------------------+ | |
| | 139 | ThorZaIN | SE | 134.838370657 | | |
| | 2494 | hOpe | SE | 132.505908338 | | |
| | 1394 | Center | KR | 126.412464939 | | |
| | 33 | Puzzle | KR | 123.90734736 | | |
| | 213 | Apocalypse | KR | 107.444816489 | | |
| | 414 | Mini | SE | 105.1572460329 | | |
| | 224 | SjoW | SE | 101.3095816449 | |
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
| ACQUIRED QUALIFIED | |
| National | |
| China Austria | |
| Denmark Brazil | |
| France Bulgaria | |
| Italy Czech Republic | |
| Netherlands Great Britain | |
| Norway Hungary |
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 Match(models.Model): | |
| class Meta: | |
| verbose_name_plural = 'matches' | |
| db_table = 'match' | |
| period = models.ForeignKey(Period, null=False) | |
| date = models.DateField('Date played', null=False) | |
| pla = models.ForeignKey(Player, related_name='match_pla', verbose_name='Player A', null=False) | |
| plb = models.ForeignKey(Player, related_name='match_plb', verbose_name='Player B', null=False) | |
| sca = models.SmallIntegerField('Score for player A', null=False, db_index=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
| class MatchForm(forms.ModelForm): | |
| def __init__(self, *args, **kwargs): | |
| super(MatchForm, self).__init__(*args, **kwargs) | |
| q = Q(closed=False, lft=F('rgt')-1) | |
| if self.instance.eventobj != None: | |
| q = q | Q(id=self.instance.eventobj.id) | |
| self.fields['eventobj'].queryset = Event.objects.filter(q).order_by('-id') | |
| class MessagesInline(admin.StackedInline): | |
| model = Message |
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 MyForm(form): | |
| def __init__(user, *args, **kwargs): | |
| super(MyForm, self).__init__(*args, **kwargs) | |
| self.fields['character'] = forms.ChoiceField( | |
| choices=[(c.id, c.name) for c in Character.objects.filter(...)] | |
| ) | |
| # In view | |
| def my_view(request): | |
| form = MyForm(request.user, ...) |
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 Data.List (intercalate, transpose) | |
| import Data.Maybe (fromJust) | |
| import GHC.Exts (sortWith) | |
| data Square = Empty | Mine | Click | |
| newtype Minefield = Minefield [[Square]] | |
| instance Show Square where | |
| show Empty = "." | |
| show Mine = "*" |
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 requests | |
| resp = requests.get('http://worldcup.sfg.io/matches') | |
| for jogo in (j for j in requests.get('http://worldcup.sfg.io/matches').json() if j['status'] == 'completed'): | |
| print jogo['home_team']['country'], jogo['home_team']['goals'], 'x', jogo['away_team']['country'], jogo['away_team']['goals'] |
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
| " Easymotion { | |
| let g:EasyMotion_leader_key = '<Space>' | |
| let g:StupidEasyMotion_leader_key = 'f' | |
| let g:EasyMotion_use_upper = 1 | |
| let g:EasyMotion_keys = 'ASDFWIERUOGHJKL' | |
| " } | |
| " Vim Over { | |
| let g:over_enable_auto_nohlsearch = 1 | |
| let g:over_enable_cmd_window = 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
| #include <iostream> | |
| #include <stack> | |
| #include <cstdlib> | |
| typedef unsigned long long ull; | |
| ull ack(ull m, ull n) | |
| { | |
| std::stack<ull> st; | |
| st.push(m); |
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 sys | |
| def sieve(limit): | |
| a = [True] * limit | |
| a[0] = a[1] = False | |
| for i, isprime in enumerate(a): | |
| if isprime: | |
| yield i |
OlderNewer