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
import React from 'react'; | |
import {render} from 'react-dom'; | |
import $ from 'jquery'; | |
class ApiConnectors extends React.Component { | |
constructor (props){ | |
super(props); | |
this.state = { | |
apiParams: props.apiParams, | |
apiUrl: props.apiUrl, |
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
-- using multiple subqueries to ensure no mistakes | |
SELECT | |
average2.weekly as week, | |
ROUND(AVG(average2.backlog),1) as backlog | |
FROM | |
( | |
SELECT | |
SUM(average.is_backlog) as backlog, | |
average.weekly, | |
average.current_day |
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
def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█'): | |
""" | |
Call in a loop to create terminal progress bar | |
@params: | |
iteration - Required : current iteration (Int) | |
total - Required : total iterations (Int) | |
prefix - Optional : prefix string (Str) | |
suffix - Optional : suffix string (Str) | |
decimals - Optional : positive number of decimals in percent complete (Int) | |
length - Optional : character length of bar (Int) |
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
SELECT | |
a.order_id as order_id, | |
a.creation_time, | |
a.finalize_time, | |
a.c_user_id, | |
a.ug_id, | |
a.sales_type, | |
a.payment_type, | |
a.delivery_date, | |
a.ag_type_name, |
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
import matplotlib.pyplot as plt | |
import numpy as np | |
plt.figure() | |
languages =['Python', 'SQL', 'Java', 'C++', 'JavaScript'] | |
pos = np.arange(len(languages)) | |
popularity = [56, 39, 34, 34, 29] | |
# change the bar colors to be less bright blue |
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
# Unsophisticated corr analysis to deal w variable bias | |
data_corr = sDf.corr() | |
size = data_corr.shape[0] - 1 | |
# Set the threshold to select only highly correlated attributes | |
threshold = 0.5 | |
# List of pairs along with correlation above threshold | |
corr_list = [] |
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
# update reps | |
sudo apt-get update | |
# installation of the key software | |
# SOFTWARE | |
# server monitoring tool | |
sudo apt-get install glances | |
# just invoke glances to monitor the system | |
# FIREWALL |
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
SELECT | |
TO_JSON(ARRAY_AGG(a)) | |
FROM ( | |
SELECT | |
raw_data.*, | |
'http://spark-in.me/post/'||raw_data.slug as disqus_article_url, | |
(SELECT to_json(array_agg(e)) FROM ( | |
SELECT DISTINCT | |
at.\"id\" as tag_id, | |
at.title as tag_title, |
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
.find('[name="articleText"]') | |
.summernote({ | |
ace: { | |
aceTheme: 'ace/theme/dawn', | |
aceMode: 'c_cpp', | |
aceLineHeight: '32px', | |
aceFontSize: '16px', | |
aceModeSelectorLabel: 'select your language', | |
aceCodeInputAreaLabel: 'input your code', | |
aceCodeSubmitBtnLabel: 'Insert', |
OlderNewer