git clone https://github.com/cartalyst/platform.git blog
Navigate into the downloaded folder and run
import facebook | |
from collections import Counter | |
import requests | |
likes_counter = Counter() | |
# Get temp tokens at: https://developers.facebook.com/tools/explorer/ | |
USER_ACCESS_TOKEN = "" | |
client = facebook.GraphAPI(access_token=USER_ACCESS_TOKEN, version='2.5') |
<?php | |
$template =[ | |
'@name@' => [ | |
'User name', | |
'Anik', | |
], | |
'@email@' => [ | |
'Email', | |
'my.mail@mail.com' |
from StringIO import StringIO | |
from openpyxl import Workbook | |
from openpyxl.compat import range | |
from openpyxl.cell import get_column_letter | |
from openpyxl.styles import Style, Font | |
def make_excel(dataset, | |
key_headers=None, # The order of attributes, or what to include | |
line_headers=None, # The order of table attributes, or what to include |
import requests | |
from BeautifulSoup import BeautifulSoup as BS | |
import re | |
def get_dl_page(package_id): | |
get_request = requests.get('https://apkpure.com/search?q=' + package_id) | |
page = BS(get_request.text) | |
# it is assumed that the first search result is the thing we are looking for | |
link_ps = page.findAll('p', {'class': 'search-title'}) | |
page_link = link_ps[0].a.get('href') |
# import | |
import os | |
from os import path, listdir as list_dir, rename as move | |
from os.path import isdir as is_dir, isfile as is_file | |
from pprint import pprint | |
import shutil | |
# global variables | |
#================== |
/* | |
|-------------------------------------------------------------------------- | |
| Delete form macro | |
|-------------------------------------------------------------------------- | |
| | |
| This macro creates a form with only a submit button. | |
| We'll use it to generate forms that will post to a certain url with the DELETE method, | |
| following REST principles. | |
| | |
*/ |
<?php namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Str; | |
class MakeAll extends Command | |
{ | |
/** | |
* The name and signature of the console command. | |
* |
// define route like this | |
Route::get('single/{id}/{any}',"BaseController@Single_Items")->name('item.single'); | |
//make a function like below in your helper file | |
function Replace($data) { | |
$data = str_replace("'", "", $data); | |
$data = str_replace("!", "", $data); | |
$data = str_replace("@", "", $data); | |
$data = str_replace("#", "", $data); |
<?php | |
// Visual composer get terms on dropdown params | |
if( !function_exists('vcdd_get_terms') ){ | |
function vcdd_get_terms( $taxonomy = 'category' ){ | |
$get_categories = get_categories( array( | |
'taxonomy' => $taxonomy, | |
) ); | |
foreach ( $get_categories as $category ) { | |
$categories[] = [ $category->term_id => $category->name ]; | |
} |