Skip to content

Instantly share code, notes, and snippets.

View andilabs's full-sized avatar
👨‍💻
still in love with coding!

Andrzej Kostanski andilabs

👨‍💻
still in love with coding!
View GitHub Profile
#!/usr/bin/python
# -*- coding: utf-8 -*-
import MySQLdb
dir_texts = 'raw_text_gumtree_opis'
def write_to_file(with_name, write_this):
with_name = dir_texts +"/"+ str(with_name)
with open(with_name, "w") as F:
F.write(write_this)
# You may want to call this something more specific - for example, in
# Latter, this is called 'GameModal'
class ApplicationModal
constructor: (options) ->
@options = $.extend {
header: 'Modal Heading'
content: ''
open_now: true
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
import qrcode
import qrcode.image.svg
img = qrcode.make('http://', image_factory=qrcode.image.svg.SvgImage)
with open('/Users/andi/dupa.svg', 'w') as f:
img.save(f)
rm -rf accounts/migrations
rm -rf core/migrations
rm -rf www/migrations
# rm -rf ~/.virtualenvs/spots/lib/python2.7/site-packages/easy_thumbnails/migrations/
# rm -rf ~/.virtualenvs/spots/lib/python2.7/site-packages/easy_thumbnails/south_migrations/
# python manage.py schemamigration easy_thumbnails --initial --settings=mbf.settings.andi
python manage.py schemamigration accounts --initial --settings=mbf.settings.andi
python manage.py schemamigration core --initial --settings=mbf.settings.andi
#!/usr/bin/python
# -*- coding: utf-8 -*-
from apiclient.discovery import build
from django.conf import settings
def translate(word, from_l, to_l):
if isinstance(word, unicode) is False:
word = unicode(word, 'utf-8')
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, figure, footer, header, hgroup,
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, figure, footer, header, hgroup,