This file contains 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
{ | |
"status": "OK", | |
"result": { | |
"keyword": "cars", | |
"page": "3", | |
"result": [ | |
{ | |
"status": true, | |
"network": "flickr", | |
"count": 10, |
This file contains 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
# my function to solve the captcha | |
# here I'm passing the url of the image with captcha_image | |
# the url example: https://images-na.ssl-images-amazon.com/captcha/sargzmyv/Captcha_xhoxwckkdo.jpg | |
``` | |
def solve_captcha(captcha_image): | |
print('--- called solve_captcha for captcha: '+str(captcha_image)) | |
print('--- setting Death By Captcha credentials---') | |
client = deathbycaptcha.SocketClient('vega6dev', 'dev@1234') |
This file contains 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
# Generated by Django 2.0.5 on 2018-05-28 17:20 | |
from django.db import migrations | |
def create_countries(apps, schema_editor): | |
Country = apps.get_model('address', 'Country') | |
db_alias = schema_editor.connection.alias | |
Country.objects.using(db_alias).bulk_create([ | |
Country(name='Afghanistan', code='AF', isd_code=93, currency_name='Afghan afghani', currency_code='AFN', |
This file contains 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
""" | |
Given two strings, a and b, that may or may not be of same length, | |
determine the minimum number of character deletions required to make a and b anagrams. | |
Any characters can be deleted from either of the strings | |
NOTE: Anagram of a word is formed by arranging the letters of the word. | |
For eg. -> for the word RAM: RAM, AMR, MAR, etc are the anagrams | |
""" | |
attempts = int(input()) |
This file contains 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
/** | |
* prepare music loop | |
* | |
* requires: james-heinrich/getid3 package | |
* install using composer: | |
* `composer require james-heinrich/getid3` | |
* | |
* @param $music_path, Local Music file absolute path | |
* @param $total_media_count, Number of Images/Videos to add in the video | |
* @param $each_media_delay, Delay duration for each Image/Video |
This file contains 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 ContactViewSet(viewsets.ModelViewSet): | |
""" | |
This viewset automatically provides `list`, `create`, `retrieve`, | |
`update` and `destroy` actions. | |
Additionally we also provide an extra `favourite`action | |
""" | |
serializer_class = ContactSerializer | |
permission_classes = (IsAuthenticated, AdminAuthenticationPermission,) |
This file contains 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 ContactSerializer(serializers.HyperlinkedModelSerializer): | |
phone_numbers = ContactPhoneNumberSerializer( | |
source='contactphonenumber_set', | |
many=True, | |
required=False | |
) | |
emails = ContactEmailSerializer( | |
source='contactemail_set', | |
many=True, | |
required=False |
This file contains 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
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative master..development |
This file contains 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
servicesDummy = [ | |
{ | |
id: 1, | |
serviceName: 'menicure', | |
subservices: [ | |
{ id: 1, subserviceName: 'deluxe menicure', price: 45 }, | |
{ id: 2, subserviceName: 'jelly menicure', price: 55 }, | |
{ id: 3, subserviceName: 'classic menicure', price: 85 }, | |
] | |
}, |
This file contains 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
{ | |
"serviceList": [ | |
{ | |
"technician": { | |
"firstName": "Anuj", | |
"id": 23, | |
"lastName": "Sharma", | |
"nickName": "sdsd", | |
"salonsId": 1, | |
"usersId": 1 |
OlderNewer