Skip to content

Instantly share code, notes, and snippets.

View martinleblanc's full-sized avatar
🏠
Working from home

Martin LeBlanc martinleblanc

🏠
Working from home
View GitHub Profile
@martinleblanc
martinleblanc / question1.py
Last active August 27, 2018 14:12
question1.py
# module1
import module2
def function1():
module2.function2()
def function3():
print('Goodbye, World!')
@martinleblanc
martinleblanc / question2.py
Last active August 27, 2018 14:51
Question 2
class CheckoutView(View):
def post(self, request, card, amount, *args, **kwargs):
try:
credit_card_service.charge_credit_card(card, amount)
except InsufficientFundsError:
self.errors.append('Insufficient funds')
except NotForSaleError:
self.errors.append('Asset is not for sale under the given circumstances')
except AssetAlreadyPurchasedException, e:
self.errors.append("You already purchased {}(id={})".format(e.reference_identifier, e.reference_primary_key))
[{'username': u'intercom1000', 'user_id': 79L, 'name': u'dsfadfa sdfasdfsadf', 'unsubscribed_from_emails': False, 'signed_up_at': 1529412641L, 'email': u'sdafasdfasdf@sadiofjsadf.com', 'custom_attributes': {'deposited_last_30_days': 0, 'is_screened': False, 'is_eu_citizen': 'Maybe', 'country_code': None, 'timemachine_49': False, 'asset_spending_total': 0, 'last_synced_with_nextfinder': 1529394660L, 'is_contributor': False, 'timemachine_discount': 0, 'pro_billing_interval': None, 'timemachine_19': False, 'pro_subscription': None, 'deleted': False, 'deposited_total': 0, 'icons_downloaded': 0L, 'pro_subscription_owner': None, 'timemachine_stock_asset_spending': 0, 'pro_subscription_cancelled': None, 'pro_subscription_created': None, 'is_frozen': False, 'asset_spending_last_30_days': 0, 'balance': 0}, 'id': 79L}]
category: [17]
style: [2]
icon_type: 1
author_user_id: 42743
downloads: 55
popularity: 25.3263910172
license_scope: 2
id: 1272808
is_premium: True
tag: [u'artificial', u'intelligence', u'robot']
{
'organizationId': 2,
'memberships': [{
'user': {
'username': u 'iconfinder',
'emailMd5Hash': '9edff23a1c02e5209045436a5f3293ae',
'company': u '123123',
'vatNumber': u 'dk-33778899',
'userId': 4 L,
'address': {
[INFO]
[INFO] --- maven-thrift-plugin:0.1.10:compile (thrift-sources) @ bender ---
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ bender ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /code/bender/src/main/resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ bender ---
Downloading: http://maven.twttr.com/org/apache/maven/shared/maven-shared-utils/0.1/maven-shared-utils-0.1.pom
@martinleblanc
martinleblanc / api.php
Created August 28, 2017 11:33
Iconfinder API example
--------- index.php:
<?php
include("settings.php");
include("helpers/token.php");
include("helpers/curl.php");
// Get token.
Process: Logic Pro X [487]
Path: /Applications/Logic Pro X.app/Contents/MacOS/Logic Pro X
Identifier: com.apple.logic10
Version: 10.0.4 (2911.63)
Build Info: MALogic-2911063000000000~16
App Item ID: 634148309
App External ID: 73352631
Code Type: X86-64 (Native)
Parent Process: launchd [254]
Responsible: Logic Pro X [487]