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 { Component } from '@angular/core'; | |
import { NavController } from 'ionic-angular'; | |
@Component({ | |
selector: 'page-home', | |
templateUrl: 'home.html' | |
}) | |
export class HomePage { | |
constructor(public navCtrl: NavController) { |
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 f(a, r): | |
last = a[0] | |
for i in range(len(a)): | |
if abs(last - a[i]) > r: | |
return False | |
last = a[i] | |
return True | |
def g(a, r): | |
last, j, p = a[0], 0, [] |
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
ghost-0 (err): | |
ghost-0 (err): | |
ghost-0 (err): ERROR: Access denied. | |
ghost-0 (err): | |
ghost-0 (err): Error | |
ghost-0 (err): at Error.UnauthorizedError (/var/www/ghost/core/server/errors/unauthorized-error.js:6:18) | |
ghost-0 (err): at authenticate (/var/www/ghost/core/server/middleware/auth.js:100:50) | |
ghost-0 (err): at allFailed (/var/www/ghost/node_modules/passport/lib/middleware/authenticate.js:94:18) | |
ghost-0 (err): at attempt (/var/www/ghost/node_modules/passport/lib/middleware/authenticate.js:167:28) | |
ghost-0 (err): at Strategy.strategy.fail (/var/www/ghost/node_modules/passport/lib/middleware/authenticate.js:284:9) |
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
['ve', 'got', 'did', 'hear', 'hate'] | |
['don', 'want', 'say', 'won', 'hate'] | |
['yeah', 'make', 'gonna', 'body', 'got'] | |
['stop', 'gonna', 'want', 'matter', 'll'] | |
['life', 'new', 'live', 'death', 'day'] | |
['like', 'fucking', 'shit', 'man', 'got'] | |
['ll', 'fall', 'make', 'man', 'lost'] | |
['just', 'want', 'stand', 'edge', 'say'] | |
['time', 'won', 'stand', 'face', 'end'] | |
['away', 'come', 'stand', 'heart', 'stay'] |
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
... | |
['like', 'feel', 'girls', 'cause', 'make', 'said', 'shit', 'bitch', 'chorus', 'em'] | |
['que', 'el', 'te', 'yo', 'tu', 'en', 'lo', 'mi', 'se', 'es'] | |
['oh', 'gonna', 'ah', 'uh', 'ooh', 'whoa', 've', 'hands', 'woah', 'beautiful'] | |
['love', 'want', 'heart', 'need', 'real', 'way', 'cause', 'live', 'boy', 'game'] | |
['la', 'el', 'en', 'los', 'ella', 'ooh', 'hey', 'es', 'pa', 'las'] | |
['na', 'music', 'choose', 'cool', 'bump', 'ready', 'hey', 'bad', 'shine', 'shoe'] | |
['don', 'wanna', 'want', 'stop', 'need', 'say', 'cause', 'care', 'think', 'tell'] | |
['yeah', 'hard', 'ah', 'ooh', 'hey', 'right', 'money', 'woah', 'party', 'whoa'] | |
['got', 've', 'money', 'party', 'cause', 'boy', 'em', 'look', 'bitch', 'damn'] |
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 unique(iterable): | |
# http://stackoverflow.com/questions/6534430/why-does-pythons-itertools-permutations-contain-duplicates-when-the-original | |
seen = set() | |
for i in iterable: | |
if str(i) in seen: | |
continue | |
seen.add(str(i)) | |
yield i | |
states = [i for i in unique(itertools.permutations([[2,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
>>> import json | |
>>> f = open("somefile.json") | |
>>> d = json.load(f) | |
>>> print d | |
{u'95659045': {u'90': False}} | |
>>> f.seek(0) | |
>>> l = f.readlines() | |
>>> print l | |
['{"95659045": {"1": false}, "95659045": {"90": false}}'] | |
>>> |
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
ExifTool Version Number : 10.10 | |
File Name : DSC_0040.NEF | |
Directory : . | |
File Size : 19 MB | |
File Modification Date/Time : 2016:06:14 10:32:06+02:00 | |
File Access Date/Time : 2016:06:14 10:32:06+02:00 | |
File Inode Change Date/Time : 2016:06:14 10:32:06+02:00 | |
File Permissions : rwx------ | |
File Type : NEF | |
File Type Extension : nef |
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
#!/usr/bin/python | |
# -*- coding: latin-1 -*- | |
#:kivy 1.9.0 | |
#:import NavigationDrawer kivy.garden.navigationdrawer | |
#:import RandChar chargen.randchar | |
<WrapLabel@Label>: | |
text_size: self.size | |
<SidePanel@GridLayout>: |
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
upstream php-handler { | |
server 127.0.0.1:9000; | |
#server unix:/var/run/php5-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name cloud.ars-artificia.com; | |
# enforce https | |
return 301 https://$server_name$request_uri; |