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 product in PhpStorm WebStorm DataGrip IntelliJIdea CLion PyCharm GoLand RubyMine; do | |
echo "Resetting evaluation period for $product..." | |
rm ~/Library/Application\ Support/JetBrains/$product*/eval/*.evaluation.key | |
rm ~/Library/Application\ Support/JetBrains/$product*/options/other.xml | |
done | |
rm ~/Library/Preferences/jetbrains.* |
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 __future__ import unicode_literals | |
from django.db import models | |
from django.db.models.fields.related_descriptors import ForwardManyToOneDescriptor # noqa | |
class RelationNotLoaded(Exception): | |
pass | |
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 aiohttp import web | |
from threading import Thread | |
import asyncio | |
import time, uuid | |
loop = asyncio.get_event_loop() | |
def long_blocking_thing(sleep): | |
time.sleep(sleep) | |
return 42 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle" | |
android:dither="true"> | |
<corners android:radius="2dp"/> | |
<solid android:color="#CCC" /> | |
</shape> | |
</item> | |
<item android:bottom="2dp"> |
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 nltk | |
import string | |
from urllib import urlopen | |
from itertools import imap | |
url = "http://google.com" | |
html = urlopen(url).read() | |
text = nltk.clean_html(html) | |
text_noPunc = text.translate(string.maketrans("",""), string.punctuation) | |
words = text_noPunc.split() |
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
//Creating the data to be sent, note the escaped quotes that are required | |
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(3); | |
nameValuePairs.add(new BasicNameValuePair("\A\"", "\"/api/v1/a/1/\"")); | |
nameValuePairs.add(new BasicNameValuePair("\"B\"", "\"/api/v1/b/1/\"")); | |
nameValuePairs.add(new BasicNameValuePair("\"C\"", "\"Hello from Android\"")); |
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
package com.javatarts.basketballgm.data; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import android.content.Context; | |
import android.database.sqlite.SQLiteDatabase; |