Customers without power
Statewide outages
DATA: Eversource (E. Mass., W. Mass.), National Grid, Unitil
MAP: Mapbox
Gabriel Florit / Globe Staff


{% load admin_urls %}
Total amount of feedback: {{no_of_responses}} responses
| Rating | Number of responses | Percentage of responses (%) |
|---|---|---|
| Very dissatisfied | {{no_of_each_response.0}} | {{percentage_of_each_response.0}} |
| Dissatisfied | {{no_of_each_response.1}} | {{percentage_of_each_response.1}} |
| Neither satisfied nor dissatisfied | {{no_of_each_response.2}} | {{percentage_of_each_response.2}} |
| Satisfied | {{no_of_each_response.3}} | {{percentage_of_each_response.3}} |
| Very satisfied | {{no_of_each_response.4}} | {{percentage_of_each_response.4}} |


Let's explore principal component analysis for the abalone data set.
This notebook utilized two sources: this notebook and this notebook.
%matplotlib inline
# numbers
import numpy as np
import pandas as pd
# stats
import statsmodels.api as sm
import scipy.stats as stats
from sklearn.preprocessing import StandardScaler
# plots
import matplotlib.pyplot as plt
import seaborn as sns
# utils
import os, re
from pprint import pprint
Start with a method to extract data from a CSV file:
# Load data, filter outliers (zero height/length)
def abalone_load(data_file, infant=False, allofit=False):
# x data labels
xnlabs = ['Sex']
xqlabs = ['Length','Diameter','Height','Whole weight','Shucked weight','Viscera weight','Shell weight']
xlabs = xnlabs + xqlabs
# y data labels
ylabs = ['Rings']
# data
new_df = pd.read_csv(data_file, header=None, sep=' ', names=xlabs+ylabs)
# ---------------------
new_df['Volume'] = new_df['Length']*new_df['Diameter']*new_df['Height']
new_df['Volume (Normalized)'] = new_df['Volume']/new_df['Volume'].mean()
new_df['Volume (Log)'] = new_df['Volume'].apply( lambda x : np.log(x) )
new_df['Whole weight (Normalized)'] = new_df['Whole weight']/new_df['Whole weight'].mean()
new_df['Shell weight (Normalized)'] = new_df['Shell weight']/new_df['Shell weight'].mean()
new_df['Shucked weight (Normalized)'] = new_df['Shucked weight']/new_df['Shucked weight'].mean()
new_df['Viscera weight (Normalized)'] = new_df['Viscera weight']/new_df['Viscera weight'].mean()
new_df['Rings (Log)'] = new_df['Rings'].apply( lambda x : np.log(x) )
# ---------------------
if(infant):
return new_df[ new_df['Sex']=='I' ]
elif(allofit):
return new_df
else:
return new_df[ new_df['Sex']<>'I' ]
def adult_abalone_load(data_file):
return abalone_load(data_file,infant=False,allofit=False)
def infant_abalone_load(data_file):
return abalone_load(data_file,infant=True,allofit=False)
def abalone_removeoutliers(df,verbose=False):
len1 = len(df)
df = df[ df['Height'] < 0.30 ]
df = df[ df['Height'] > 0.001 ]
df = df[ df['Length'] > 0.001 ]
df = df[ df['Diameter'] > 0.001 ]
len2 = len(df)
if(verbose):
print "Removed",(len1-len2),"outliers"
return df
# x data labels
xnlabs = ['Sex']
xqlabs = ['Length','Diameter','Height','Whole weight','Shucked weight','Viscera weight','Shell weight']
xlabs = xnlabs + xqlabs
# y data labels
ylabs = ['Rings']
#adt_df = abalone_removeoutliers(adult_abalone_load('abalone/Dataset.data'),verbose=True)
abalone_df = abalone_removeoutliers(abalone_load('abalone/Dataset.data',allofit=True))
The data consists of multiple columns, each a measurement that was made on the abalone, together with the variable that we are trying to predict, "Rings" (which is an indication of the age of the abalone).
abalone_df.describe()
abalone_df.columns
To begin, we can plot the covariance matrix of our dataframe, picking out some particular response variables and input variables:
slim = abalone_df[[u'Rings',u'Rings (Log)',
u'Volume',
u'Whole weight', u'Shell weight',
u'Shucked weight', u'Viscera weight']]
correlation = slim.corr()
plt.figure(figsize=(10,10))
sns.heatmap(correlation, square=True,annot=True,vmin=0,vmax=1,cmap='jet')
plt.title('Correlation Matrix (Unscaled Variables)')
plt.show()
We can already see the challenge inherent in this data set: the input variables (consisting of three physical measurements, length, height, and diameter, as well as several weight mesaurements) are all closely correlated, but none are not very well-correlated with the system response.
cols = slim.columns.tolist()[1:]
slim = slim.reindex(columns=cols)
X = slim.iloc[:,1:6].values
y = slim.iloc[:,0].values
#print X
#print "-"*20
#print y
# -----------------
bigcols = slim.columns.tolist()
bigX = slim.iloc[:,:].values
print bigX.shape
To perform principal components analysis it is important to strip the values of the variables and put them in a numpy array, or an array of arrays. The input variables are in X
, while the system responses are in Y
. The matrix bigX
contains both input and response variables.
def get_normed_mean_cov(X):
X_std = StandardScaler().fit_transform(X)
X_mean = np.mean(X_std, axis=0)
#X_cov = np.cov(X_std.T)
X_cov = (X_std - X_mean).T.dot((X_std - X_mean)) / (X_std.shape[0]-1)
return X_std, X_mean, X_cov
X_std, X_mean, X_cov = get_normed_mean_cov(X)
bigX_std, bigX_mean, bigX_cov = get_normed_mean_cov(bigX)
Next we define a method to obtain a normalized X, which is normalized to have a mean of 0 and a variance of 1, which is stored in X_std
. We also compute the mean and covariance of each input variable, and store them in X_mean
and X_cov
, respectively.
print "Covariance matrix"
print X_cov
We examine the covariance matrix, then plot it.
plt.figure(figsize=(8,8))
sns.heatmap(pd.DataFrame(bigX_cov,columns=bigcols),
vmax=1, vmin=0,
square=True,annot=True,cmap='jet')
plt.title('Correlation between different features (scaled)')
The best correlation for the response variable is between the shell weight and the log of the number of rings. None of these variables are particularly well-correlated to the system response, though, so PCA probably won't help us much here.
eigenvals, eigenvecs = np.linalg.eig(X_cov)
print "Eigenvals:\n",eigenvals
print "Eigenvecs:\n",eigenvecs
We compute the eigenvalues and eigenvectors, which tell us about the spectral "characteristic" vector of this covariance matrix. This can, in turn, be used to compute the principal components, as well as the variance in the data that is explained by each variable.
tot = sum(eigenvals)
explained_variance = [(i/tot) for i in sorted(eigenvals, reverse=True)]
from pprint import pprint
eigenvalvec = [(np.abs(eigenvals[i]), eigenvecs[:,i]) for i in range(len(eigenvals))]
pprint([pair[0] for pair in eigenvalvec])
The list above is the (sorted) list of eigenvalues corresponding to each eigenvector. By comparing the relavitve vlaues of these eigenvalues, we can determine what each principal component is and how important that principal component is:
plt.figure(figsize=(6, 4))
plt.bar(range(5), explained_variance, alpha=0.5, align='center',
label='individual explained variance')
plt.ylabel('Explained variance ratio')
plt.xlabel('Principal components')
plt.legend(loc='best')
plt.tight_layout()
We can also plot the amount of variance explained by each input variable. In this case, we have one principal component that explains nearly all (95%) of the variance. The reason for this is not that we have discovered a very convenient principal component - the reason is, the principal component is a mixture of all variables in nearly equal proportions. That is, the principal component is the one that combines every single variable.
In other words, we can't eliminate any variables.
from sklearn.decomposition import PCA
pca = PCA().fit(X_std)
S_pca = pca.transform(X_std)
fig = plt.figure(figsize=(10,4))
ax1, ax2 = fig.add_subplot(121), fig.add_subplot(122)
# These two plots should be exactly the same
ax1.plot(np.cumsum(explained_variance))
ax1.plot(np.cumsum(pca.explained_variance_ratio_))
ax1.set_xlim(0,5,1)
ax1.set_xlabel('Number of Principal Components')
ax1.set_ylabel('Cumulative explained variance')
ax1.set_title('Explained Variance')
ax2.plot(np.cumsum(explained_variance))
ax2.plot(np.cumsum(pca.explained_variance_ratio_))
ax2.set_xlim(0,5,1)
ax2.set_ylim([0,1.1])
ax2.set_xlabel('Number of Principal Components')
ax2.set_ylabel('Cumulative explained variance')
ax2.set_title('Explained Variance')
plt.show()
If we limit the number of principal components to 3, we get the same result: there is only one principal component, which consists of every variable weighted equally.
from sklearn.decomposition import PCA
sklearn_pca = PCA(n_components=3).fit(X_std)
#Y_sklearn = sklearn_pca.fit_transform(X_std)
print sklearn_pca.components_
print np.linalg.norm(sklearn_pca.components_[0],2)
Examine the top row - the first principal component. This vector shows the weights of each variable in the principal components. So, whoop de doo, we found a single principal component that can account for 95% of the variance - but that's because it does f--k all to reduce the number of variables. It assigns virtually identical weights of 0.44 or 0.45 to every single component.
Examining infant and adult datasets separately shows that these two data frames are different: infant abalones have a stronger correlation between age and shell weight (and other input variables) than do adult abalones.
adt_df = abalone_removeoutliers(adult_abalone_load('abalone/Dataset.data'))
inf_df = abalone_removeoutliers(infant_abalone_load('abalone/Dataset.data'))
adt_df.columns
def get_normed_mean_cov(X):
X_std = StandardScaler().fit_transform(X)
X_mean = np.mean(X_std, axis=0)
#X_cov = np.cov(X_std.T)
X_cov = (X_std - X_mean).T.dot((X_std - X_mean)) / (X_std.shape[0]-1)
return X_std, X_mean, X_cov
def cov_pca_plots(df,labels,title=''):
slim = df[labels]
slimcols = labels[1:]
X = slim.iloc[:, 1:].values
Y = slim.iloc[:, 0].values
bigcols = labels
bigX = slim.iloc[:,:].values
X_std, X_mean, X_cov = get_normed_mean_cov(X)
bigX_std, bigX_mean, bigX_cov = get_normed_mean_cov(bigX)
eigenvals, eigenvecs = np.linalg.eig(X_cov)
tot = sum(eigenvals)
explained_variance = [(i/tot) for i in sorted(eigenvals, reverse=True)]
eigenvalvec = [(np.abs(eigenvals[i]), eigenvecs[:,i]) for i in range(len(eigenvals))]
pprint([pair[0] for pair in zip(eigenvals,eigenvecs)])
sns.heatmap(pd.DataFrame(bigX_cov,columns=bigcols),
vmax=1, vmin=0,
square=True,annot=True,cmap='jet')
plt.title(title+' Covariance Plot ')
print "-"*20
pca = PCA().fit(X_std)
S_pca = pca.transform(X_std)
print "Top 4 Principal Components:"
print pca.components_[:4]
fig = plt.figure(figsize=(10,4))
ax1, ax2 = fig.add_subplot(121), fig.add_subplot(122)
# These two plots should be exactly the same
ax1.plot(np.cumsum(explained_variance))
ax1.plot(np.cumsum(pca.explained_variance_ratio_))
ax1.set_xlim(0,5,1)
ax1.set_xlabel('Number of Principal Components')
ax1.set_ylabel('Cumulative explained variance')
ax1.set_title('Explained Variance')
ax2.plot(np.cumsum(explained_variance))
ax2.plot(np.cumsum(pca.explained_variance_ratio_))
ax2.set_xlim(0,5,1)
ax2.set_ylim([0,1.1])
ax2.set_xlabel('Number of Principal Components')
ax2.set_ylabel('Cumulative explained variance')
ax2.set_title('Explained Variance')
plt.title('Correlation between different features (scaled)')
Here is a plot of the covariance matrix for infant abalones. Note that the correlation between age (log of number of rings) and all other input variables is stronger for the infant abalones than for adult abalones:
labels = ['Rings (Log)',
'Volume',
'Whole weight',
'Shell weight',
'Shucked weight',
'Viscera weight']
cov_pca_plots(inf_df,labels,'Infant Abalone')
labels = ['Rings (Log)',
'Volume',
'Whole weight',
'Shell weight',
'Shucked weight',
'Viscera weight']
cov_pca_plots(adt_df,labels,'Adult Abalone')
We can also explore the effect of adding additional variables. However, it's important to keep in mind that if we only have length and weight information, any derived variables will themselves be length or weight variables, or encoded versions thereof.
def add_df_columns(df):
df['Shell-Whole Weight Ratio'] = df['Shell weight']/df['Whole weight']
df['Shell-Shucked Weight Ratio'] = df['Shell weight']/df['Shucked weight']
df['Shell-Viscera Weight Ratio'] = df['Shell weight']/df['Viscera weight']
df['Specific Volume'] = df['Volume']/df['Whole weight']
df['Weight-Length'] = df['Whole weight']/df['Volume'].apply(lambda x : pow(x,1./3.))
df['Growth Rate'] = df['Whole weight']/df['Rings']
return df
adt_df = add_df_columns(adt_df)
inf_df = add_df_columns(inf_df)
labels = ['Rings',
'Volume',
'Whole weight',
'Shell weight',
'Shucked weight',
'Viscera weight',
'Weight-Length',
'Growth Rate']
cov_pca_plots(inf_df,labels,'Infant Abalone')
labels = ['Rings (Log)',
'Volume',
'Whole weight', 'Shell weight',
'Shucked weight', 'Viscera weight',
'Weight-Length']
cov_pca_plots(adt_df,labels,'Adult Abalone')
From the above, we see the same pattern - there is one principal component that accounts for over 90% of the variance, and that principal component is an evenly-weighted mixture of each input variable.


The calls for research to be transparent and reproducible have never been louder. But today's tools for reproducible research can be intimidating, and disparate workflows and technical literacy levels can make it difficult to collaborate.
Stencila lets researchers create reproducible papers in their favorite tools and environment, whether it's Jupyter Notebook and RMarkdown, or Word and Excel.
Stencila is an open source project under active development. We your feedback but please be patient with bugs and instabilities!


|
QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.30
|
#include <ql/experimental/credit/randomdefaultmodel.hpp>
Public Member Functions | |
| GaussianRandomDefaultModel (const ext::shared_ptr< Pool > &pool, const std::vector< DefaultProbKey > &defaultKeys, const Handle< OneFactorCopula > &copula, Real accuracy, long seed) | |
| void | nextSequence (Real tmax=QL_MAX_REAL) override |
| void | reset () override |
| Public Member Functions inherited from RandomDefaultModel | |
| RandomDefaultModel (const ext::shared_ptr< Pool > &pool, const std::vector< DefaultProbKey > &defaultKeys) | |
| ~RandomDefaultModel () override=default | |
| void | update () override |
| virtual void | nextSequence (Real tmax=QL_MAX_REAL)=0 |
| virtual void | reset ()=0 |
| Public Member Functions inherited from Observer | |
| Observer ()=default | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| virtual | ~Observer () |
| std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
| void | registerWithObservables (const ext::shared_ptr< Observer > &) |
| Size | unregisterWith (const ext::shared_ptr< Observable > &) |
| void | unregisterWithAll () |
| virtual void | update ()=0 |
| virtual void | deepUpdate () |
| Public Member Functions inherited from Observable | |
| Observable () | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| virtual | ~Observable ()=default |
| void | notifyObservers () |
Private Attributes | |
| Handle< OneFactorCopula > | copula_ |
| Real | accuracy_ |
| long | seed_ |
| PseudoRandom::rsg_type | rsg_ |
Additional Inherited Members | |
| Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
| Protected Attributes inherited from RandomDefaultModel | |
| ext::shared_ptr< Pool > | pool_ |
| std::vector< DefaultProbKey > | defaultKeys_ |
Random default times using a one-factor Gaussian copula.
Definition at line 63 of file randomdefaultmodel.hpp.
| GaussianRandomDefaultModel | ( | const ext::shared_ptr< Pool > & | pool, |
| const std::vector< DefaultProbKey > & | defaultKeys, | ||
| const Handle< OneFactorCopula > & | copula, | ||
| Real | accuracy, | ||
| long | seed | ||
| ) |
|
overridevirtual |
Generate a sequence of random default times, one for each name in the pool, and store the result in the Pool using method setTime(name). tmax denotes the maximum relevant time- default times > tmax are not computed but set to tmax + 1 instead to save coputation time.
Implements RandomDefaultModel.
Definition at line 65 of file randomdefaultmodel.cpp.
|
overridevirtual |
Implements RandomDefaultModel.
Definition at line 60 of file randomdefaultmodel.cpp.
|
private |
Definition at line 74 of file randomdefaultmodel.hpp.
|
private |
Definition at line 75 of file randomdefaultmodel.hpp.
|
private |
Definition at line 76 of file randomdefaultmodel.hpp.
|
private |
Definition at line 77 of file randomdefaultmodel.hpp.


Drag/Click Slider with Customizable Labels
NO labels; NO whatever modifications
Labels with NO positioning rules specified (default to both top, left label to left, right label to right)
BEFORE
AFTER
Labels with positioning rules specified
BEFORE
AFTER
Customizable Hints
Disable hint
BEFORE
AFTER
Reemerging hint (default to no interaction for 10s)
BEFORE
AFTER
Reemerging hint (customized to no interaction for 2s)
BEFORE
AFTER
Instantly reemerging hint (customized to no interaction for 0.001s)
BEFORE
AFTER
Hint with custom styling
BEFORE
AFTER
seekTo
action
Position Observer with Seeking
BEFORE
AFTER
Example of seeking
BEFORE
AFTER
Tab + Keyboard
Move step set to 20%, Home for Center, PageUp for Left, PageDown for Right
BEFORE
AFTER
Inside Carousel
Carousel would not be scrolled when moving the slider


Preferences
Preferences Help
Save
your preferences when finished.
{{status-message}}
Preferences
(changes apply to Google Desktop Search application)
Search types
Index the following items so that you can search for them:
Email
Chats (AOL/MSN IM)
Web history
Word
Excel
PowerPoint
PDF
Text, media, and other files
Password-protected Office documents (Word, Excel)
Secure pages (HTTPS) in web history
Plug-ins
Index these additional items:
{{ADDIN-DO}} {{ADDIN-OPTIONS}}
To install plug-ins to index other items, visit the
Plug-ins Download page
.
Don't search these items
Do not search web sites with the following URLs or files with the following paths. Put each entry on a separate line. Examples:
c:\Documents and Settings\username\Private Stuff
http://www.domain.com/
[FORBIDDEN]
Search Box Display
Deskbar - A search box in your taskbar
Floating Deskbar - A search box you can put anywhere on your desktop
None
Number of Results
Display
10
20
30
50
100
results per page
Google integration
Show Desktop Search results on Google Web Search result pages.
Your personal results are private from Google.
Help us improve
Send non-personal usage data and crash reports to Google to help improve Desktop Search.
Save
your preferences when finished.
[$~BOTTOMLINE~$]
©2005 Google


Makesite.py
is an extremely simple (and extremely light) static site
generator written in Python. You write your content in text files and
Makesite.py
does the rest for you. It works by taking as input an HTML
template, a CSS style, and a bunch of text files (in Markdown) and
generating static HTML pages.
How it works
1) Download and place the following files into a folder:
makesite.py -- the Python script to generate each webpage
template.html -- the HTML skeleton of each webpage
style.css -- the CSS style of each webpage
index.md -- the text content of a webpage (Markdown)
2) Run:
python makesite.py
This will generate an index.html
that you can display with your browser.
Note that every time you make any modification you need to run
python makesite.py
again (that's what static site means).
What it is
Makesite.py
is not a blog generator! If a blog is what you are looking for,
there are a few dozen blog softwares out there. Makesite.py
was developed
with the following concepts in mind:
- Extremely simple (very easy to understand and modify)
- No installation required (run it anywhere)
- No configuration required (you provide a text file, you get a HTML page)
- No templating language (just pure HTML, CSS and Python!)
- All functions in one single script (that I can actually understand)
- Navigation bar generated for you (customizable if you want)
If all you want is to simply put HTML content on the web (such as a personal webpage), then this might be the right tool for you.
Please note that this project is under development. Features are being added or modified.
Example
To get you started there a basic website example (with a Makefile
included):
example/
|__ Makefile
|__ makesite.py
|__ template.html
|__ style.css
|__ index.md
|__ first/
|__ index.md
|__ second/
|__ index.md
|__ third/
|__ index.md
To generate the HTML pages (after you've downloaded the folder example
):
cd example
python makesite.py
or using the Makefile
:
cd example
make site
Now all you have to do is replace the content of the Markdown files (.md
)
with your own. For each Markdown file an HTML page will be created and added
to the navigation bar. Then you just upload the content of the example
folder
(the .html
, .css
, .jpg
, etc.) to any webserver.
In the above example each webpage (Markdown file) is placed into a sub-folder to keep things organized (with the exception of the website's landing page, the 'Home' page), but you can have all the pages in the same folder if you prefer (just give them different names).
To customize your website you can play around with the style.css
and/or
template.html
(see how below).
A Makefile
is also provided for convenience. For example, on a Mac/Linux
machine you can generate the website, display it in your browser, and upload
it to GitHub as:
cd example
make site
make show
make git
In use
Check my own website made with Makesite.py
: http://fspaolo.net
How to
Questions/Comments? Send me an email: fspaolo@gmail.com


The relevant reading background is
This exercise brings us back to the beginning of the semester and homework assignments 2 and 3, in particular exercises 5 and 6 of homework 3. The relevant chapter of Taylor's text is chapter 2 and partly chapter 3. The code you wrote for homework 3 may be useful.
In this exercise we will develop a model to determine the motion of a weather balloon released from the ground. We start from a simplified model and gradually add features to make our model more realistic.
After the balloon is released, it is driven by buoyancy. Initially, we will assume that the buoyancy force is given by a constant force, \( \boldsymbol{B} \). We assume that the motion is vertical only and label this in terms of the \( z \)-axis. That is our system is one-dimensional only. The constant buoyancy force is then given by its \( z \)-component only, that is \( \boldsymbol{B}=B_z\boldsymbol{k} \), where \( \boldsymbol{k} \) is the unit vector along the \( z \)-axis.
Let us now introduce air resistance, using a quadratic law: \( \boldsymbol{F}_D = −D \vert \boldsymbol{v}\vert \boldsymbol{v} \), where \( D \) is a constant and \( \boldsymbol{v} \) is the velocity. We are still in one dimension but have introduced forces and velocities as vectors (boldfaced quantities).
The balloon is released on a windy day, with a wind blowing with a velocity given by \( \boldsymbol{w} = w_x \boldsymbol{i} \) along the horizontal \( x \)-axis.
In a real situation, the wind velocity is smaller near the ground and increases gradually to the full velocity \( w_0 \) as the balloon moves upward. Typically, the velocity of the wind as function of the height \( z \) can be described by
$$
\boldsymbol{w}(z) = w_0 (1−\exp{(−z/d)}) \boldsymbol{i},
$$
where $d = 10$m is a length determining the change in height.
A mathematical pendulum consists of a point mass \( m \) suspended by a massless thread/rod of length \( l \) in a gravitational field, as shown in the figure here. The constraining force is labeled by \( \boldsymbol{T} \) and the gravitational force is labeled \( \boldsymbol{F}_g \). Homework assignments 6 and 7 may be useful to study here. Taylor chapter 5 is the relevant reference for this exercise.
We assume that the length \( l \) is constant and we define the coordinates involved as
$$
\boldsymbol{r} = l\sin(\phi)\boldsymbol{i}+l\cos(\phi)\boldsymbol{j},
$$
where \( \boldsymbol{i} \) and \( \boldsymbol{j} \) are the unit vectors in the \( x \) and \( y \) directions, respectively.
Transforming to polar coordinates \( r \) and \( \phi \), the equation for \( \phi \) is a second-order differential equation (you don't need to show this)
$$
\ddot{\phi}(t)=-\omega_0^2\sin{(\phi(t))}.
$$
This equation can be solved analytically if we assume that the angle \( \phi \) is very small. Then we can approximate our equation as
$$
\ddot{\phi}(t)=-\omega_0^2\phi(t).
$$
For our numerical treatment of the full second-order differential equation, we can proceed as we have done before and split the second-order differential in two first-order differential equations as shown here
$$
\frac{d\dot{\phi}}{dt}=-\omega_0^2\sin{(\phi)}.
$$
and
$$
\frac{d\phi}{dt}=\dot{\phi}.
$$
The following gives you an opportunity to earn five extra credit points on each of the remaining homeworks and ten extra credit points on the midterms and finals. This assignment also covers an aspect of the scientific process that is not taught in most undergraduate programs: scientific writing. Writing scientific reports is how scientist communicate their results to the rest of the field. Knowing how to assemble a well written scientific report will greatly benefit you in you upper level classes, in graduate school, and in the work place.
The full information on extra credits is found at https://github.com/mhjensen/Physics321/blob/master/doc/Homeworks/ExtraCredits/. There you will also find examples on how to write a scientific article. Below you can also find a description on how to gain extra credits by attending scientific talks.
This assignment allows you to gain extra credit points by practicing your scientific writing. For each of the remaining homeworks you can submit the specified section of a scientific report (written about the numerical aspect of the homework) for five extra credit points on the assignment. For the two midterms and the final, submitting a full scientific report covering the numerical analysis problem will be worth ten extra points. For credit the grader must be able to tell that you put effort into the assignment (i.e. well written, well formatted, etc.). If you are unfamiliar with writing scientific reports, see the information here
The following table explains what aspect of a scientific report is due with which homework. You can submit the assignment in any format you like, in the same document as your homework, or in a different one. Remember to cite any external references you use and include a reference list. There are no length requirements, but make sure what you turn in is complete and through. If you have any questions, please contact us.
| HW/Project | Due Date | Extra Credit Assignment |
|---|---|---|
| HW 3 | 2-8 | Abstract |
| HW 4 | 2-15 | Introduction |
| HW 5 | 2-22 | Methods |
| HW 6 | 3-1 | Results and Discussion |
| Midterm 1 | 3-12 | Full Written Report |
| HW 7 | 3-22 | Abstract |
| HW 8 | 3-29 | Introduction |
| HW 9 | 4-5 | Results and Discussion |
| Midterm 2 | 4-16 | Full Written Report |
| HW 10 | 4-26 | Abstract |
| Final | 4-30 | Full Written Report |
You can also gain extra credits if you attend scientific talks. This is described here.
This opportunity will allow you to earn up to 5 extra credit points on a Homework per week. These points can push you above 100% or help make up for missed exercises. In order to earn all points you must:
Approved talks: Talks given by researchers through the following clubs:
All the material on extra credits is at https://github.com/mhjensen/Physics321/blob/master/doc/Homeworks/ExtraCredits/.


Big growth for Takealot and Mr D Food
by Jamie McKaneNaspers has released its interim results for the six months ended 30 September 2019, showing impressive revenue growth for Takealot and Mr D Food.
“In South Africa, Takealot solidified its position as the country’s leading B2C platform, growing GMV 51% and revenue by 25% in local currency,” Naspers said.
“Similarly, its profitability improved 25% in local currency.”
“One of the main drivers in this performance was marketplace, with 88% growth in GMV,” the company said.
Mr D Food and Superbalist, the food delivery service and online fashion stores owned by Takealot, also showed impressive growth for the period.
“Takealot’s food-delivery service, Mr D Food, recorded GMV growth of over 103%,” Naspers said.
Superbalist reported good results too, with revenue growth of 28% year-on-year.
Takealot’s Black Friday plans
Takealot has big plans for its Black Friday 2019 sale, which should result in a large spike in revenue as consumers flood the online store to take advantage of the heavy discounts.
The company’s sales period will include a five-day Blue Dot Sale that begins on Black Friday (29 November) and will offer a range of new deals throughout the weekend, as well as Cyber Monday and Takealot Tuesday.
During this period, Takealot will cut prices by up to 60% on thousands of items. The retailer will also launch early Black Friday deals starting from 24 November, with fresh deals added daily.
Takealot expects its revenue to increase by 80% compared to Black Friday 2018.
Last year, Takealot made R196 million on Black Friday, and the company hopes to reach around R353 million in revenue this year.


Based on educational approach developed by Italian physician Maria Montessori.
Want to know more:
<EMAIL_ADDRESS>Children are smart and they love to learn new things.
The One Two Three learning process is divided into three simple steps that gradually increase in difficulty, so the language will be absorbed more easily and…
Have fun learning!


HMS Prince of Wales: Navy ship arrives in Portsmouth
The Royal Navy's newest aircraft carrier, HMS Prince of Wales, has been welcomed by thousands of people as it sailed into Portsmouth for the first time.
Shipping lanes were closed and an air exclusion zone was put in place for the arrival of the £3.1bn warship.
The welcome included a fly-past of two Hawk jets and a Wildcat helicopter.
It is the sister ship of HMS Queen Elizabeth, which has been based in Portsmouth since August 2017.
The ships are the most expensive to have ever been built for the Royal Navy.
They can be docked next to each other in Portsmouth Naval Base after £30m work was completed.
HMS Prince of Wales had been used in trials since September after setting sail from the Firth of Forth.
Commanding Officer Captain Darren Houston said: "Our first entry to Portsmouth represents the successful culmination of the build and sea trials period in which my ship's company and industry partners have worked so closely together to bring HMS Prince of Wales into service with the fleet.
"I am extremely proud of them and their families for their perseverance, patience and extraordinary efforts."
The 65,000-tonne ship will be formally commissioned before the end of the year.
A crew of at least 700 will serve on it but it has a capacity of about 1,600 people.
HMS Prince of Wales can also carry 36 jets and four helicopters.
Its flight deck is 70m wide and 280m long - as big as three football pitches - and it holds 45 days' worth of food in stores.
From keel to the top of its highest mast, the ship is taller than Nelson's Column.
HMS Queen Elizabeth is currently on the east coast of the USA and taking part in trials with the United States Navy.
.


7
1 After this I saw four angels standing at the four corners of the earth, tightly holding back the four winds of the earth so that no wind should blow on the earth, on the sea, or against any tree.
2 I saw another angel coming up from the east, who had the seal of the living God. He cried out with a loud voice to the four angels who were given permission to harm the earth and the sea:
3 "Do not harm the earth, the sea, or the trees until we have put a seal on the foreheads of the servants of our God."
4 I heard the number of those who were sealed: 144,000, who were sealed from every tribe of the people of Israel:
5 12,000 from the tribe of Judah were sealed,
,000 from the tribe of Reuben,
,000 from the tribe of Gad.
6 12,000 from the tribe of Asher,
,000 from the tribe of Naphtali,
,000 from the tribe of Manasseh.
7 12,000 from the tribe of Simeon,
,000 from the tribe of Levi,
,000 from the tribe of Issachar,
8 12,000 from the tribe of Zebulun,
,000 from the tribe of Joseph, and
,000 from the tribe of Benjamin were sealed.
9 After these things I looked, and there was a huge multitude that no one could count—from every nation, tribe, people, and language—standing before the throne and in front of the Lamb.
11 All the angels were standing around the throne and around the elders and the four living creatures, and they laid down on the ground and put their faces on the ground before the throne, and they worshiped God,
12 saying,
"Amen! Praise, glory, wisdom, thanksgiving, honor, power, and strength be to our God forever and ever! Amen!"
13 Then one of the elders asked me, "Who are these, clothed with white robes, and where did they come from?
14 I said to him, "Sir, you know," and he said to me, "These are the ones who have come out of the Great Tribulation. They have washed their robes and made them white in the blood of the Lamb.
15 For this reason, they are before the throne of God,
and they worship him day and night in his temple.
He who is seated on the throne will spread his tent over them.
16 They will not be hungry again, nor will they be thirsty again.
The sun will not beat down on them,
nor any burning heat.
17 For the Lamb in the middle of the throne will be their shepherd,
and he will guide them to springs of living water,
and God will wipe away every tear from their eyes."


Experiences
Mobile application development platforms have become a significant medium for software content delivery and distribution. Software has been quick to embrace this global trend and thus have created a demand for professionals with mobile application development skills in the local market as well. With the mainstream adoption of tablet devices and smart phones this potential is expected to grow at an exponential growth both globally and locally.
iOS offers various accessibility features to help users with vision and hearing disabilities. One major feature, VoiceOver, provides a voice reading information on the screen, including contextual buttons, icons, links and other user interface elements, and allows the user to navigate the operating system through gestures. Any apps with default controls and developed with a UIKit framework gets VoiceOver functionality built in.
So, what is Git in a nutshell? This is an important section to absorb, because if you understand what Git is and the fundamentals of how it works, then using Git effectively will probably be much easier for you. As you learn Git, try to clear your mind of the things you may know about other VCSs, such as CVS, Subversion or Perforce — doing so will help you avoid subtle confusion when using the tool. Even though Git’s user interface is fairly similar to these other VCSs, Git stores and thinks about information in a very different way, and understanding these differences will help you avoid becoming confused while using it.


Each gokrazy instance has a config.json
file that contains the instance
configuration.
You can open the instance config in your editor by running gok edit
:
gok edit
will open the config of the default instance, which is named “hello”.gok -i scanner edit
will open the config of instance “scanner”.If you prefer, you can also locate and edit the file directly on disk:
~/gokrazy/hello/config.json
This document is a reference, explaining all configuration fields. You don’t
need to read through it all before you first start using gokrazy — follow the
other configuration guides in this section instead. In case anything should be
unclear, you can look at the config.go
source
code (and send
feedback, please!).
Older versions of gokrazy only used command-line flags and plain-text config files instead of a central instance configuration. See the design document gokrazy “instance-centric” config re-design for details on why the change was made, how old setups are kept working and how they can be migrated.
Here is a minimal instance configuration example:
{
"Hostname": "hello",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
]
}
Most instance configuration files will be more complicated, for example:
{
"Hostname": "ts",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"tailscale.com/cmd/tailscaled",
"tailscale.com/cmd/tailscale",
"github.com/gokrazy/mkfs",
"github.com/stapelberg/dr"
],
"PackageConfig": {
"tailscale.com/cmd/tailscale": {
"CommandLineFlags": [
"up"
]
},
"tailscale.com/cmd/tailscaled": {
"CommandLineFlags": [
"--outbound-http-proxy-listen=localhost:9080"
]
},
"github.com/stapelberg/dr": {
"Environment": [
"HTTPS_PROXY=localhost:9080",
"HTTP_PROXY=localhost:9080"
]
}
}
}
(Corresponds to the former -hostname
gokr-packer flag.)
The Hostname
field sets the hostname
of your gokrazy instance.
The gokrazy
DHCP client
sends this hostname when acquiring a lease, so if hostname resolution is working
in your local network, you will be able to access the device in your browser by
entering the hostname, e.g. http://hello/
(username gokrazy
, password as
configured in HTTPPassword
or
~/.config/gokrazy/http-password.txt
).
Example:
{
"Hostname": "example",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
]
}
(Corresponds to the former -device_type
gokr-packer flag.)
The DeviceType
field specifies which kind of target device this gokrazy
instance should be built for.
empty (""): target the Raspberry Pi (default) or UEFI/BIOS PCs (router7
kernel), depending on the
KernelPackage
and FirmwarePackage
you specify.
odroidhc1
: target the Odroid XU4/HC1/HC2 devices. This results in an MBR
without a GPT (as the Odroid devices do not support GPT), and in extra
bootloader files in the root partition.
The possible values are defined in
github.com/gokrazy/internal/deviceconfig
(→ config.go)
Example:
{
"Hostname": "alternative",
"DeviceType": "odroidhc1",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
]
}
(Corresponds to the former gokr-packer command line arguments.)
The Packages
field lists the Go packages that should be built and included in
your gokrazy instance.
Each listed package is a Go import path
referencing an executable Go program (package main
).
To add a package to a gokrazy instance, use the gok add
command, which also
works for packages that have not yet been published and are stored on your local
disk.
Example:
{
"Hostname": "hello",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"github.com/stapelberg/scan2drive/cmd/scan2drive"
]
}
The PackageConfig
field specifies how each package listed in Packages
will
be built into your instance, and how it will be started at runtime.
PackageConfig
is a map that is keyed by the package Go import path.
See also the Package Config page.
(Corresponds to the former buildflags
per-package directory text files.)
The GoBuildFlags
field configures extra arguments that the gok
CLI passes to
go build
when building your Packages
. See the cmd/go
documentation
for available flags.
To pass build tags, do not use -tags=mycustomtag
, as that will overwrite
gokrazy’s own build tags. Instead, set the GoBuildTags
field.
Note that no shell escaping or quoting (with single or double quotes) is
required. The build flags are passed when calling go build
via the exec
system call.
Example:
{
"Hostname": "scanner",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"github.com/stapelberg/scan2drive/cmd/scan2drive"
],
"PackageConfig": {
"github.com/stapelberg/scan2drive/cmd/scan2drive": {
"GoBuildFlags": [
"-ldflags=-linkmode external -extldflags -static"
]
}
}
}
(Corresponds to the former buildtags
per-package directory text files.)
The GoBuildTags
field configures additional Go build
tags (also known as build
constraints) to use when building your program.
Note: Some Go packages use build tags to optionally build code which uses
cgo. Because gokrazy intentionally does not include a
C runtime environment, configuring such build tags results either in compilation
failures, or in programs that compile but won’t start. But, for certain specific
use-cases (scan2drive
’s turbojpeg support, for example), you can enable just
enough cgo to end up with a fully statically linked program, which does work on
gokrazy.
Example:
{
"Hostname": "scanner",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"github.com/stapelberg/scan2drive/cmd/scan2drive"
],
"PackageConfig": {
"github.com/stapelberg/scan2drive/cmd/scan2drive": {
"GoBuildTags": [
"turbojpeg"
]
}
}
}
(Corresponds to the former env
per-package directory text files.)
The Environment
field configures environment
variables that will be set
when starting your program.
Each entry is a key=value
pair, like in Go’s
os.Environ()
.
Example:
{
"Hostname": "ts",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"github.com/stapelberg/dr"
],
"PackageConfig": {
"github.com/stapelberg/dr": {
"Environment": [
"HTTPS_PROXY=localhost:9080",
"HTTP_PROXY=localhost:9080"
]
}
}
}
(Corresponds to the former flags
per-package directory text files.)
The CommandLineFlags
field configures command line
flags that will
be set when starting your program.
Note that no shell escaping or quoting (with single or double quotes) is
required. The command line flags are passed when starting your program via the
exec
system call.
Example:
{
"Hostname": "ts",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"tailscale.com/cmd/tailscaled"
],
"PackageConfig": {
"tailscale.com/cmd/tailscaled": {
"CommandLineFlags": [
"--port=41641",
"--outbound-http-proxy-listen=localhost:9080"
]
}
}
}
(Corresponds to the former dontstart
per-package directory text files.)
Enabling the DontStart
field makes the gokrazy init system not start your
program automatically.
You can still start the program manually via the web interface, or interactively
via breakglass
.
This is useful for programs that are interactive command line tools, instead of permanently running services.
Example:
{
"Hostname": "ts",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"tailscale.com/cmd/tailscaled",
"tailscale.com/cmd/tailscale"
],
"PackageConfig": {
"tailscale.com/cmd/tailscale": {
"DontStart": true
}
}
}
(Corresponds to the former waitforclock
per-package directory text files.)
The WaitForClock
field makes the gokrazy init system wait for clock
synchronization before starting the program. This is useful when modifying the
program source to call
gokrazy.WaitForClock()
is inconvenient.
Example:
{
"Hostname": "scanner",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"github.com/stapelberg/scan2drive/cmd/scan2drive"
],
"PackageConfig": {
"github.com/stapelberg/scan2drive/cmd/scan2drive": {
"WaitForClock": true
}
}
}
(Corresponds to the former extrafiles
per-package directory text files.)
The ExtraFileContents
field allows adding extra files into the root file
system of your gokrazy instance. Any file aside from the built Go program
(e.g. scan2drive
) is considered extra.
ExtraFileContents
is a map from root file system destination path
(e.g. /etc/caddy/Caddyfile
) to the plain text contents of the extra file.
The extra file will be created as a regular file (not executable) with default
permissions (UNIX mode 644
, or -rw-r--r--
). Note that gokrazy’s root file
system is read-only.
It can be more convenient to manage extra files as standalone, separate files
(not as part of config.json
), which the
ExtraFilePaths
field allows you to do.
Example:
{
"Hostname": "webserver",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"github.com/caddyserver/caddy/v2/cmd/caddy"
],
"PackageConfig": {
"github.com/caddyserver/caddy/v2/cmd/caddy": {
"ExtraFileContents": {
"/etc/caddy/Caddyfile": "http://:8080 {
root * /tmp
file_server browse
}
"
}
}
}
}
(Corresponds to the former extrafiles
per-package directory text files.)
The ExtraFilePaths
field allows adding extra files into the root file
system of your gokrazy instance. Any file aside from the built Go program
(e.g. scan2drive
) is considered extra.
ExtraFilePaths
is a map from root file system destination path
(e.g. /etc/caddy/Caddyfile
) to a relative or absolute path of the extra files
to include. Relative paths are relative to the instance directory,
e.g. ~/gokrazy/hello
— the same directory in which config.json
lives.
The extra file path can refer to one of:
<path>.tar
. All files contained in the archive are included.<path>_<target_goarch>.tar
, for example
firmware_amd64.tar
Go packages that target gokrazy can optionally include a _gokrazy
directory,
in which gokrazy will look for extrafiles. Conceptually, the directory is
handled as if you had configured ExtraFilePaths: "/home/michael/go/src/github.com/gokrazy/wifi/_gokrazy/extrafiles"
.
Example:
{
"Hostname": "webserver",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass",
"github.com/caddyserver/caddy/v2/cmd/caddy"
],
"PackageConfig": {
"github.com/caddyserver/caddy/v2/cmd/caddy": {
"ExtraFilePaths": {
"/etc/caddy/Caddyfile": "Caddyfile"
}
}
}
}
cat > ~/gokrazy/webserver/Caddyfile <<'EOT'
http://:80 {
root * /tmp
file_server browse
}
EOT
(Corresponds to the former -serial_console
gokr-packer flag.)
The SerialConsole
field controls whether the Linux kernel provides a serial
console on the Raspberry Pi’s UART0 RX/TX ports (see
pinout.xyz). To use this serial console, a popular option
is to connect a USB-to-serial adapter.
Linux supports multiple consoles, but only one can be the default console. Kernel messages during boot will be printed to the default console. When you turn off the serial console, the default console will be shown on the HDMI output, and accept input from the USB keyboard.
The advantage of using a serial console is that you can easily save the entire boot output to a file on a separate computer (whereas with an HDMI console, text scrolls by very fast), and you can get debug output from the Raspberry Pi bootloader as well for debugging.
serial0,115200
(default if unset) enables UART0 as a serial console with
115200 baud. This value is used as console=
Linux kernel parameter, so use
values like ttyS0,115200
if you want to use a different serial port for your
console, e.g. when running gokrazy on a PC.disabled
will disable the serial console (the default console will be HDMI),
which frees up the serial port for usage by your applications.off
sets enable_uart=0
in config.txt
for the Raspberry Pi firmware,
which will save a little bit of power by running the Pi at lower clock speeds.If you want to write an application that uses the serial port, open
/dev/serial0
(example),
which is a symlink that points to the device handling the RX/TX pins (typically
ttyAMA0
or ttyS0
).
Example:
{
"Hostname": "router7",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
],
"SerialConsole": "ttyS0,115200"
}
(Corresponds to the former -gokrazy_pkgs
gokr-packer flag.)
Aside from the user-specified Packages
, a gokrazy instance also
includes a couple of packages that are considered part of the system, because
they are needed to boot the system into a useful state. These are placed in the
/gokrazy
directory (other packages are placed in the /user
directory).
If unset, the following packages will be included by default:
github.com/gokrazy/gokrazy/cmd/dhcp
sets the IP address after obtaining a
DHCPv4
lease.github.com/gokrazy/gokrazy/cmd/ntp
synchronizes the hardware clock via
NTP.github.com/gokrazy/gokrazy/cmd/randomd
stores/loads a kernel random
seed across boots.Typically you don’t need to configure this field, but it can be useful to
overwrite the GokrazyPackages
if some component clashes with how you want to
use your device. For example, for router7, I need to
remove the gokrazy dhcp
package as router7 has its own DHCP client. Or, if you
were building a local NTP server, you might want to remove the gokrazy ntp
package.
Example:
{
"Hostname": "router7",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
],
"GokrazyPackages": [
"github.com/gokrazy/gokrazy/cmd/ntp",
"github.com/gokrazy/gokrazy/cmd/randomd"
]
}
(Corresponds to the former -kernel_package
gokr-packer flag.)
The KernelPackage
field specifies a Go import path that references a package
which does not contain any Go code, but instead contains a Linux kernel image
(vmlinuz
).
The following files are taken from the kernel package directory and are included in the boot file system of your gokrazy instance:
vmlinuz
, a compiled Linux kernel image*.dtb
, Linux device tree filesboot.scr
, U-Boot scriptAdditionally, the lib/modules
subdirectory (containing loadable Linux kernel
modules) is included in the root file system. Note that these modules are only
included, but not automatically loaded (there is no udev
or equivalent on
gokrazy). If you need to load modules for your hardware, see
bluetooth.go
for an example program that loads kernel modules.
Default if unset: github.com/gokrazy/kernel
Example:
{
"Hostname": "router7",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
],
"KernelPackage": "github.com/rtr7/kernel"
}
(Corresponds to the former -firmware_package
gokr-packer flag.)
The FirmwarePackage
field specifies a Go import path that references a package
which does not contain any Go code, but instead contains Raspberry Pi firmware
files.
The following files are taken from the firmware package directory and are included in the boot file system of your gokrazy instance:
*.bin
, Raspberry Pi firmware files*.dat
, Raspberry Pi firmware files*.elf
, Raspberry Pi firmware files*.upd
, Raspberry Pi EEPROM update files*.sig
, Raspberry Pi EEPROM update signaturesDefault if unset: github.com/gokrazy/firmware
If empty, no files will be included.
Example:
{
"Hostname": "router7",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
],
"FirmwarePackage": ""
}
(Corresponds to the former -eeprom_package
gokr-packer flag.)
The EEPROMPackage
field specifies a Go import path that references a package
which does not contain any Go code, but instead contains Raspberry Pi EEPROM
update files.
The following files are taken from the firmware package directory and are included in the boot file system of your gokrazy instance:
pieeprom-*.bin
, Raspberry Pi EEPROM update filesrecovery.bin
, Raspberry Pi EEPROM update fileslv805-*.bin
, Raspberry Pi EEPROM update filesDefault if unset: github.com/gokrazy/rpi-eeprom
If empty, no files will be included.
Example:
{
"Hostname": "router7",
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
],
"EEPROMPackage": ""
}
The Update
field contains a struct that configures how gokrazy updates are done.
You typically don’t need to configure the Update
field.
Hostname (in UpdateStruct) overrides Struct.Hostname, but only for deploying the update via HTTP, not in the generated image.
The UseTLS
field accepts the following values:
off
: disable TLS even if certificates existself-signed
: create (self-signed) TLS certificates if neededSee Using TLS in untrusted networks for more details.
Example:
{
"Hostname": "webserver",
"Update": {
"HTTPPassword": "secret",
"UseTLS": "self-signed"
},
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
]
}
(Corresponds to the former -http_port
gokr-packer flag.)
The HTTPPort
field sets the HTTP port (port 80 by default) on which the
gokrazy web interface will be available. This field controls both: which port
your gokrazy instance listens on (server), and which port the gok
CLI will use
for updating your instance (client).
It can be useful to configure a different port if you want to run a web server on port 80, for example.
If UseTLS
is enabled, this field is ignored and
HTTPSPort
is used instead.
Example:
{
"Hostname": "webserver",
"Update": {
"HTTPPassword": "secret",
"HTTPPort": "1080"
},
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
]
}
(Corresponds to the former -https_port
gokr-packer flag.)
See HTTPPort
, but when TLS is enabled
(default 443).
Example:
{
"Hostname": "webserver",
"Update": {
"HTTPPassword": "secret",
"UseTLS": "self-signed",
"HTTPSPort": "8443"
},
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
]
}
(Corresponds to the former http-password.txt
host-specific config file.)
The HTTPPassword
field configures the secret password that allows accessing
and updating your gokrazy instance.
When creating a new gokrazy instance (gok new
), the gok
CLI will create a
random password.
Example:
{
"Hostname": "webserver",
"Update": {
"HTTPPassword": "secret"
},
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
]
}
(Corresponds to the former cert.pem
host-specific config file.)
When enabling TLS, the CertPEM
field allows you to use a
custom certificate file. This can be useful if you already have a certificate
setup for your environment (self-signed or otherwise).
Example:
{
"Hostname": "webserver",
"Update": {
"HTTPPassword": "secret",
"CertPEM": "/home/michael/.ca/webservercert.pem",
"KeyPEM": "/home/michael/.ca/webserverkey.pem"
},
"Packages": [
"github.com/gokrazy/fbstatus",
"github.com/gokrazy/hello",
"github.com/gokrazy/serial-busybox",
"github.com/gokrazy/breakglass"
]
}
(Corresponds to the former key.pem
host-specific config file.)
Like CertPEM
, but for the private key instead of the
certificate.


Teen in West Lothain subjects 61-year-old woman to sex attack in broad daylight
Police hunt teenager who pounced on woman just before mid day in Livingston
by Debbie Hall, https://www.dailyrecord.co.uk/authors/debbie-hall/A 61-year-old women has been sexually assaulted by a teenager in broad daylight.
Police are appealing for information after the woman was attacked in Knightsridge, Livingston, on Wednesday, November 6, just before mid day.
The woman was walking along Ogilvie Way at around 11.50am when she was stopped in her path by a young man, thought to be around 14 to 16 years of age, who demanded money from her.
She told him she didn’t have any on her, so he grabbed her and sexually assaulted her before running off towards the shops on Cameron Way.
The suspect is described as white, Scottish, with local accent, around five feet six inches tall, of slim build with reddish/auburn hair and brown eyes.

Detective Constable Lynn Myles, Livingston CID, is leading the investigation.
She said: “Officers have been carrying out enquiries since the attack happened, checking CCTV and speaking to locals, however, unfortunately, have not, at this time, identified the youth responsible.
“Thankfully there have been no other attacks of this nature in the area. It has been very distressing for the woman involved and it is imperative that we catch the suspect as soon as possible.
“The area would have been quite busy at this time, the road runs by a school, is on the way to local shops and used by dog walkers and runners, so maybe someone saw this boy hanging about or running off afterwards?
“If you have any information that will assist officers with their inquiry, or recognise the description of the suspect, then please contact the CID at Livingston on 101.”
Anyone with information can get get in touch quoting reference number 1389 of the 6, November, 2019.
Alternatively, details can be passed anonymously to Crimestoppers on 0800 555 111.


{% extends 'base_core.html' %} {% block title %} Have any type of technical problem, report to us. {% endblock title %} {% block content %}


Version 1.1
Copyright (c) 2004 OpenXCF. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
"This product includes software developed by the OpenXCF (http://openxcf.sourceforge.net/)."Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear.


| 004:146 Khan | : |
Except those who repent (from hypocrisy), do righteous good deeds, hold fast to Allah, and purify their religion for Allah (by worshipping none but Allah, and do good for Allah's sake only, not to show-off), then they will be with the believers. And Allah will grant to the believers a great reward. |
| 004:146 Maulana | : |
Save those who repent and amend hold fast to Allah and are sincere in their obedience to Allah -- these are with the believers. And Allah will soon grant the believers a mighty reward. |
| 004:146 Pickthal | : |
Save those who repent and amend and hold fast to Allah and make their religion pure for Allah (only). Those are with the believers. And Allah will bestow on the believers an immense reward. |
| 004:146 Rashad | : |
Only those who repent, reform, hold fast to GOD, and devote their religion absolutely to GOD alone, will be counted with the believers. GOD will bless the believers with a great recompense. |
| 004:146 Sarwar | : |
those (hypocrites) who have repented, put their trust in God, and sincerely followed only His religion will live with the believers to whom God will give a great reward. |
| 004:146 Shakir | : |
Except those who repent and amend and hold fast to Allah and are sincere in their religion to Allah, these are with the believers, and Allah will grant the believers a mighty reward. |
| 004:146 Sherali | : |
Except those who repent and amend and hold fast to ALLAH and are sincere in their obedience to ALLAH - these are among the believers. And ALLAH will soon bestow a great reward upon the believers. |
| 004:146 Yusufali | : |
Except for those who repent, mend (their lives) hold fast to Allah, and purify their religion as in Allah's sight: if so they will be (numbered) with the believers. And soon will Allah grant to the believers a reward of immense value. |
Concepts/Themes Covered: الإيمان > الإيمان بالله > النفاق Faith> Belief In Allah> Hypocrisy الإيمان > الله جلّ جلاله > التوكل عليه جلّ وعلا Faith> Allah, Glory to his Majesty> Trust In Allah الإيمان > المؤمنون > ما أعده الله لهم Faith> The Believers> What has Allah Prepared for them الإيمان > المؤمنون > وعده إياهم Faith> The Believers> His Promise to them
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


An individual's cervix might appear cancer free, but since the transformation zones aren't always visible, some of the patients require further testing while some don't. This decision is very important for the healthcare provider and critical for the patient. Identifying the transformation zones is not an easy task for the healthcare providers, therefore, an algorithm-aided decision will significantly improve the quality and efficiency of cervical cancer screening for these patients. Using this tool you can upload a picture of a cervix and get a diagnosis immidiately. Type 2 and 3 requires further medical inspections. Type 1 is considered normal.


Estimates latent profiles (finite mixture models) using the open
source package mclust
, or the commercial program
Mplus (using the R-interface of
MplusAutomation
).
estimate_profiles( df, n_profiles, models = NULL, variances = "equal", covariances = "zero", package = "mclust", select_vars = NULL, ... )
| df | data.frame of numeric data; continuous indicators are required for mixture modeling. |
|---|---|
| n_profiles | Integer vector of the number of profiles (or mixture components) to be estimated. |
| models | Integer vector. Set to |
| variances | Character vector. Specifies which variance components to estimate. Defaults to "equal" (constrain variances across profiles); the other option is "varying" (estimate variances freely across profiles). Each element of this vector refers to one of the models you wish to run. |
| covariances | Character vector. Specifies which covariance components to estimate. Defaults to "zero" (do not estimate covariances; this corresponds to an assumption of conditional independence of the indicators); other options are "equal" (estimate covariances between items, constrained across profiles), and "varying" (free covariances across profiles). |
| package | Character. Which package to use; 'mclust' or 'MplusAutomation' (requires Mplus to be installed). Default: 'mclust'. |
| select_vars | Character. Optional vector of variable names in |
| ... | Additional arguments are passed to the estimating function; i.e.,
|
A list of class 'tidyLPA'.
Six models are currently available in tidyLPA, corresponding to the most common requirements. These are:
Equal variances and covariances fixed to 0
Varying variances and covariances fixed to 0
Equal variances and equal covariances
Varying variances and equal covariances (not able to be fit w/ mclust)
Equal variances and varying covariances (not able to be fit w/ mclust)
Varying variances and varying covariances
Two interfaces are available to estimate these models; specify their numbers
in the models
argument (e.g., models = 1
, or
models = c(1, 2, 3)
), or specify the variances/covariances to be
estimated (e.g.,: variances = c("equal", "varying"), covariances =
c("zero", "equal")
). Note that when mclust is used, models =
c(1, 2, 3, 6)
are the only models available.
iris_sample <- iris[c(1:4, 51:54, 101:104), ] # to make example run more quickly # Example 1: iris_sample %>% subset(select = c("Sepal.Length", "Sepal.Width", "Petal.Length")) %>% estimate_profiles(3)#> tidyLPA analysis using mclust: #> #> Model Classes AIC BIC Entropy prob_min prob_max n_min n_max BLRT_p #> 1 3 62.15 68.94 1.00 1.00 1.00 0.17 0.50 0.01# \donttest{ # Example 2: iris %>% subset(select = c("Sepal.Length", "Sepal.Width", "Petal.Length")) %>% estimate_profiles(n_profiles = 1:4, models = 1:3)#>#> tidyLPA analysis using mclust: #> #> Model Classes AIC BIC Entropy prob_min prob_max n_min n_max BLRT_p #> 1 1 1150.81 1168.87 1.00 1.00 1.00 1.00 1.00 #> 1 2 885.64 915.74 0.99 1.00 1.00 0.34 0.66 0.01 #> 1 3 765.16 807.31 0.93 0.94 1.00 0.27 0.40 0.01 #> 1 4 758.71 812.90 0.87 0.70 0.96 0.09 0.39 0.03 #> 2 1 1150.81 1168.87 1.00 1.00 1.00 1.00 1.00 #> 2 2 770.96 810.10 1.00 1.00 1.00 0.33 0.67 0.01 #> 2 3 702.55 762.76 0.89 0.91 1.00 0.31 0.35 0.01 #> 2 4 695.51 776.80 0.88 0.91 0.95 0.09 0.35 0.09 #> 3 1 851.33 878.43 1.00 1.00 1.00 1.00 1.00 #> 3 2 693.26 732.40 1.00 1.00 1.00 0.33 0.67 0.01 #> 3 3 650.14 701.32 0.92 0.94 1.00 0.33 0.34 0.01 #> 3 4 646.81 710.03 0.90 0.71 0.97 0.05 0.34 0.07# Example 3: iris_sample %>% subset(select = c("Sepal.Length", "Sepal.Width", "Petal.Length")) %>% estimate_profiles(n_profiles = 1:4, variances = c("equal", "varying"), covariances = c("zero", "zero"))#> Warning: some model(s) could not be fitted!#> Warning: Mclust could not estimate model 2 with 4 classes.#> Warning: #> One or more analyses resulted in warnings!


CocoaMessage()
Syntax
Result = CocoaMessage(ReturnValueAddress, Object, Method$ [, ParameterValue [, Parameter$, [, ParamaterValue, ...]]])Description
For advanced users. Available on OS X only, it allows to easily send an Objective-C message to the OS X framework and access any API. Usually Objective-C use brackets to have a clear syntax for messages. As PureBasic doesn't have built-in Objective-C support, it needs to emulate it, so the syntax is a bit different. Once learnt, it's easy to call the required API. To get more examples, please read the following thread on the forums.
Parameters
ReturnValueAddress If the API call return a structure or a type different than 'integer', this field is used to set the returning result. An address to the structure or variable needs to be specified. If zero is specified, the result will be ignored. Object The object on which the Objective-C methods will be called. It can be zero if the method is a static method (mostly when creating an object). Method$ The method to call on the object, usually followed by a semicolon (':'). If the method needs a structure as parameter, '@' needs to be appended after the semicolon. If the method expect a string as parameter, '$' can be appended after the semicolon, so the string will be automatically converted in a temporary NSString. This is not required, but it can be useful and ease the coding. If the method isn't supported by the object, a debugger message will be raised at runtime. ParameterValue (optional) The parameter value associated to the previous method. Parameter$ (optional) The next method parameter. PureBasic support up to 7 method parameters.
Return value
Integer return value. Useful for object creation id.
Remarks
PureBasic has already setup a temporary memory pool which is flushed every time WindowEvent() or WaitWindowEvent() is called. If you need to release big objects immediately, you will have to create a local memory pool around your calls.
Example: with string
; Objective-C: ; ColorList = [NSColorList colorListNamed:@"Crayons"]; ; ColorList = CocoaMessage(0, 0, "NSColorList colorListNamed:$", @"Crayons") ; Will create an NSString for "Crayons" under the hood (respecting ascii/unicode mode of the program)
Example: with complex type
; Objective-C: ; Transform = [NSAffineTransform transform]; ; Transform = CocoaMessage(0, 0, "NSAffineTransform transform") ; Get an identity transform ; Objective-C: ; [TransForm scaleXBy:sx yBy:sy]; ; sx.CGFloat = 5.5 sy.CGFloat = 20 CocoaMessage(0, TransForm, "scaleXBy:@", @sx, "yBy:@", @sy) ; Scale x by 5.5, y by 20. As sx is not an integer, '@' needs to be specified ; Objective-C: ; NSAffineTransform TransformStruct = [TransForm transformStruct]<EMAIL_ADDRESS>TransForm, "transformStruct") ; Get the transform structure Debug TransformStruct\m11 ; debug outputs 5.5
Supported OS
MacOS X


My Book Store
ID
Name
Price
Action
1
hello world
54
Read
Update
Delete
2
css for beginners
65
Read
Update
Delete
3
JS for Ninjas
23
Read
Update
Delete


--- layout: default title: About ---
Mark Otto is a designer living and working in San Francisco. Originally from Wisconsin, he freelanced his way through high school and college before moving to California to work at a design firm, ZURB, in 2007. There he designed and developed dozens of projects with clients large and small, including Photobucket, Britney Spears, SafetyWeb, and Zazzle. In early 2010, after a two-and-a-half year stint at ZURB, he left to become a product designer at Twitter.
Since joining Twitter, Otto has worked on numerous projects including the Promoted Products suite, Twitter.com, the Twitter Help Center, several internal tools, and most recently the popular open-source front-end toolkit Bootstrap.
This URL has been my online home for many years, manifesting at times as a blog or a portfolio until landing on this current single-column blog. Today it is an outlet for my design- and development-related ramblings.
Some fun facts about the site include:
For comments or questions, feel free to ask me on Twitter or shoot me an email at markdotto at gmail dot com.


Kurento Utils for Node.js and Browsers
:warning: Warning
This library is not actively maintained. It was written to simplify the Kurento Tutorials and has several shortcomings for more advanced uses.
For real-world applications we recommend to avoid using this library and instead to write your JavaScript code directly against the browser’s WebRTC API.
kurento-utils-js is a browser library that can be used to simplify creation and handling of RTCPeerConnection objects, to control the browser’s WebRTC API.
Installation instructions
Be sure to have installed Node.js and Bower in your system:
curl -sSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g bower
To install the library, it's recommended to do that from the NPM repository:
npm install kurento-utils
Alternatively, you can download the code using git and install manually its dependencies:
git clone https://github.com/Kurento/kurento.git
cd kurento/browser/kurento-utils-js/
npm install
Screen and window sharing depends on the privative module kurento-browser-extensions
. To enable its support, you'll need to install
the package dependency manually or use a getScreenConstraints
function yourself on runtime. If it's not available, when trying to share the screen or a window content it will throw an exception.
Browser
To build the browser version of the library you'll only need to exec the grunt task runner and they will be generated on the dist
folder. Alternatively, if you don't have it globally installed, you can run a local copy by executing:
node_modules/.bin/grunt


wsgen(1) wsgen(1) Name wsgen - Java(TM) API for XML Web Services (JAX-WS) 2.0 Specification Version: 2.1 Implementation Version: 2.1.1 The wsgen tool generates JAX-WS portable artifacts used in JAX-WS web services. The tool reads a web service endpoint implementation class (SEI) and generates all the required artifacts for web service deploy‐ ment, and invocation Overview The wsgen tool generates JAX-WS portable artifacts used in JAX-WS web services. The tool reads a web service endpoint class and generates all the required artifacts for web service deployment, and invocation. JAXWS 2.1.1 RI also provides a wsgen ant task, see Wsgen ant task @ https://jax-ws.dev.java.net/nonav/2.1.1/docs/wsgenant.html for details. Launching wsgen o Solaris/Linux * export JAXWS_HOME=/pathto/jaxws-ri * $JAXWS_HOME/bin/wsgen.sh -help o Windows * set JAXWS_HOME=c:\pathto\jaxws-ri * %JAXWS_HOME%\bin\wsgen.bat -help Syntax wsgen [options] <SEI> The following table lists the wsgen options. Option Description -classpath <path> Specify where to find input class files -cp <path> Same as -classpath <path> -d <directory> Specify where to place gen‐ erated output files -extension allow vendor extensions (functionality not speci‐ fied by the specification). Use of extensions may result in applications that are not portable or may not interoperate with other implementations -help Display help -keep Keep generated files -r <directory> Used only in conjunction with the -wsdl option. Specify where to place gen‐ erated resource files such as WSDLs -s <directory> Specify where to place gen‐ erated source files -verbose Output messages about what the compiler is doing -version Print version information. Use of this option will ONLY print version informa‐ tion. Normal processing will not occur. -wsdl[:protocol] By default wsgen does not generate a WSDL file. This flag is optional and will cause wsgen to generate a WSDL file and is usually only used so that the developer can look at the WSDL before the endpoint is deploy. The protocol is optional and is used to specify what protocol should be used in the wsdl:binding. Valid proto‐ cols include: soap1.1 and Xsoap1.2. The default is soap1.1. Xsoap1.2 is not standard and can only be used in conjunction with the -extension option. -servicename <name> Used only in conjunction with the -wsdl option. Used to specify a particular wsdl:service name to be generated in the WSDL. Example, -servicename "{http://mynames‐ pace/}MyService" -portname <name> Used only in conjunction with the -wsdl option. Used to specify a particular wsdl:port name to be gener‐ ated in the WSDL. Example, -portname "{http://mynames‐ pace/}MyPort" Example wsgen -d stock -cp myclasspath stock.StockService This will generate the wrapper classes needed for StockService annotated with @WebService annotation inside stockdirectory. wsgen -wsdl -d stock -cp myclasspath stock.StockService This will generate a SOAP 1.1 WSDL and schema for your Java class stock.StockService annotated with @WebService annotation. wsgen -wsdl:Xsoap1.2 -d stock -cp myclasspath stock.StockService Will generate a SOAP 1.2 WSDL. Note that you do not have to generate WSDL at the development time as JAXWS runtime will automatically generate a WSDL for you when you deploy your service. 16 Mar 2012 wsgen(1)


History of Blockchain Technology
It's still early days for blockchain
Hamster Dance stage
via GIPHY
We are still at a really early stage and the possibilites are largely unwritten. But there are ideas being discussed in a lot of different fields. We're going to look back at how it got started and along the way begin to understand what it is.
IT and business research and advisory firm Gartner charts emerging technologies and assesses where they are in terms of
usefuless and viability for business purposes. They do a yearly report of things business leaders should watch, and they
chart technologies to identify a sort of lifecycle.
We're leaving the Peak of Inflated Expectations: Early publicity produces a number of success stories — often accompanied by scores of failures.
Some companies take action; many do not.
Entering into the Trough of Disillusionment: Interest wanes as experiments and implementations fail
to deliver. Producers of the technology shake out or fail. Investments continue only if the surviving providers improve their
products to the satisfaction of early adopters.
So we're at this interesting point in the cycle where the craziness is dying down and things are beginning to settle. It's a good time for measured, thoughtful conversations.
Bitcoin
Bitcoin is the first application of blockchain technology.
It’s a decentralized currency.
Peer-to-peer networks, protocols (how those peers talk to each other) and software combine to make it possible to create and use digital currency.
Digital cash is not a new idea
Digital cash as a concept goes back to the early 80s, but there were some persistent problems because a bank still has to keep track (it was centralized)
Hashcash was a concept introduced in 1997 as a way to thwart email spam (computational puzzle that increased the effort of sending a single email, making spam too computationally expensive) -- this is the Proof
of Work concept that blockchain uses.
there were other experimental e-cash systems in the 90s.
"Satoshi Nakamoto", October 31, 2008
"A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another
without going through a financial institution."
bitcoin software becomes available to the public on sourceforge.net in Nov 2008
The Genesis Block
Block 0
Mined on Jan 3, 2009
This is the first block in any blockchain.
A block is just data, that has some particular characteristics that we'll go into in more detail later on.
Mining is the process by which this data is verified and added to the chain of what's come before.
There is work to be done (PoW) and all the computers on the network race to be the first.
“Roughly one new block is created (mined) every 10 minute (sic). Miners are rewarded with new coins if and when they create new
blocks and are paid transaction fees in return of including transactions in their blocks. ” Excerpt From: “Mastering Blockchain.”
Bitcoin Pizza Day
Visit pizzaforcoins.com to find out what pizza joints near you will accept bitcoin!
Alternatively, read venture capital firm Ledra Capital's analysis of why that expensive pizza does not matter.
2010: Bitcoin is valued for the first time.
This is the first public bitcoin purchase where bitcoin are traded with currency value.
On 22nd May 2010, Laszlo Hanyecz bought a pizza for 10,000 bitcoins. This is the current USD value of that pizza.
Mt. Gox established on July 17, 2010.
Security breach at MtGox in June 2011 results in fraudulent trading and results in the site being shut down for a week
By November, the Bitcoin market is valued at over $1 milliion
Altcoin
Bitcoin enters mainstream media: Time magazine runs a story on it in April, 2011.
This is the year we start to see forks of the Bitcoin source code, starting with Namecoin and Litecoin.
Altcoin, alternative cryptocurrencies, are continuously introduced from this point.
Volatility
Bitcoin reaches an all-time high price in April, 2013 and then crashes immediately afterwards.
source: coindesk.com
This year in Bitcoin
The high in the past year was $19,086.64 in mid December.
Today it is $8,909.13
Blockchain 2.0
Smart contracts
Blocks in the chain begin to be used for more than a transaction record -- beyond just an exchange.
Because you can hold any data in a block, it can also hold code to execute or enforce contracts, and it can do so automatically.
Like a vending machine: you put in your money, make a selection, and you get the candy bar. No negotiation, no variation.
Adds business logic to a transaction. So bitcoin is just the transaction, but the next generation of blockchains introduce the idea of transactions plus conditions.
Ethereum
Decentralized Applications
Ethereum builds a new blockchain, introduced in Jan 2014.
From their website:
"Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference."
Other blockchains start appearing: Ripple, Hyperledger. Some are public and open source; others are private. Their primary intended uses differ.
Possibilities for decentralized applications include the exchange of currency but other things as well:
file storage
ridesharing
social messaging
buying/selling physical items
The Smart Economy
Companies start taking advantage of blockchain tech to combine assets with identity and smart contracts
China's NEO is doing something different that is making a lot of news. Every individual, business, or any other entity operating on the Neo platform is expected to have a unique digital identity
that will be verifiable. People, businesses, and projects have the option to transact among themselves only if the other
party has the required identity, which makes the Neo network regulatory-compliant. Read more: Why China's Neo Can Do What
No Other Cryptocurrency Can | Investopedia https://www.investopedia.com/tech/china-neo-cryptocurrency/#ixzz5APvn2YlY Follow
us: Investopedia on Facebook
Blockchain 3.0
The Decentralized Web
Transnational, unlimited by geography
Freedom and empowerment -- govt restrictions and censorship can be circumvented
International business facilitated by transnational organizations that are decentralized -- not controlled by any nation-state
Information can be separated from geographical servers -- eg Wikipedia, which is subject to local jurisdiction
Namecoin (first fork of the bitcoin source code): decentralized DNS - in this system, top-level domains don’t exist anymore https://namecoin.org/
Blockstack, from their website "Blockstack is a new internet for decentralized apps that you access through the Blockstack Browser. With Blockstack, there
is a new world of apps that let you own your data and maintain your privacy, security and freedom."


Goploader
Because file sharing is meant to be easy
Introduction
This is a page about the
goploader
project. The philosophy of goploader is that it should be easy to share files from your terminal. If you want to share a file with a few of your friends for example.
This project is composed of a client and a server.  If you want people to use your service with the official client, they will have to modify
the ~/.config/goploader.conf.yml
file.
Features
- HTTPS only using Let's Encrypt and Caddy Server
- Upload directly from
stdin
. - Upload a file by giving it as an argument to the client.
- All files are encrypted upon reception and decrypted when served.
- The key to decrypt files is not saved on the server.
Current Limitations
- File size is limited to 20 Mo (20 MB)
- Files live for two hours only.
Usage
First Run
On the first run, goploader will try to read from ~/.config/goploader.conf.yml
. A default configuration will be written in this file if it can't be found. Also, if the ~/.config/
directory doesn't exist, it will be
created. This will be executed only once, you'll get a single line of log the first time you'll use the client.
Note : If you want to use another server than mine (a friend of yours installed the server or your own server), you'll have to edit this file to point to your service.
General Documentation
Here are some small examples of how to use the command line application
goploader
. Here is a list of the accepted arguments of the client :
| Short | Long | Default | Description |
|---|---|---|---|
-c
|
--clipboard
|
false | Copies the returned URL directly to the clipboard (needs
xclip or
xsel ) |
-d
|
--delay
|
0 | Defines a delay before the program executes. In the form of
10s /
2m /etc… |
-n
|
--name
|
""
|
Specify the filename you want. This will be the filename of the file when downloading it or viewing it. When uploading a file, defaults to the name of the file. When uploading from stdin, defaults to
stdin . |
-p
|
--progress
|
false | Displays a progress bar while uploading the file. Shows ETA, current network speed, percentage and size uploaded. |
-s
|
--screenshot
|
false | Takes a screenshot and directly uploads it. Works nicely with the
delay option. Note : The import command must be available. |
-t
|
--tee
|
false | Displays the content on
stdout whever you read from
stdin or a file. |
-v
|
--verbose
|
false | Activates the debug logs. Useful for troubleshooting. |
-w
|
--window
|
false | When using the
screenshot , this option allows you to select a window or a zone to screenshot before uploading it. |
These options can be activated separately. For example
goploader --progress --delay="5s" myfile.txt
can be written
goploader -pd 5s myfile.txt
. All the short arguments can be concatenated on the condition that they are all boolean except the last one that can be a boolean or take a value.
Here are some examples.
Take a screenshot of the whole screen after 5 seconds, upload it with a progress bar and copy the returned URL to the clipboard :
$ goploader --progress --screenshot --delay="5s" --clipboard
Long Options
$ goploader -pscd 5s
Short Options
Select a windows or zone, screenshot that and upload it :
$ goploader --screenshot --window
Long Options
$ goploader -sw
Short Options
Upload a file with a progress bar :
$ goploader -p myfile
Argument
$ goploader -p
< myfile
Stdin
$ cat myfile | goploader -p
Stdin
Note : When the datasource is stdin, the total size of the file (or the total amount of text a command yields) can't be calculated
that's why the progress bar will only display the upload speed.
Curl
One of the main goal of goploader is the ease of use. That's also why the goploader server doesn't use a JSON API, to guarantee that any user can upload files painlessly.
For that reason, you can also don't use a client at all and simply upload your files with curl.
$ curl -F<EMAIL_ADDRESS>https://up.depado.eu/
Your file will be named myfile.txt
$ curl -F name="myamazingfile!" -F<EMAIL_ADDRESS>https://up.depado.eu/
Your file will be named myamazingfile!
$ cat myfile.txt | curl -F name="stdin" -F file=@_ https://up.depado.eu/
Reads data from stdin
Downloads
Here are the download links for the client. For a more up to date version, consider installing
Go
on your computer and compile the client from the Github source code.
Binary Downloads
Archlinux
If you're running Archlinux, there is a goploader-client-git
package in AUR.
yaourt -S goploader-client-git
Thanks to krion for setting up the AUR package
Server
If you wish, you can install the
goploader
server. You can either compile it from the source code if you have a specific architecture or download the Linux 64-Bit or ARMv7 version with the link below.
You don't need to create a
conf.yml
file. If you run the server and the said file is absent or have missing fields, the server will enter setup mode in which you will be able to configure your server on a web page. It will then marshal the configuration
to the said
conf.yml
file and you will be able to run the server once again which will work as expected.
This very page is served by the goploader server itself. You can disable it by setting the fulldoc
option to false (while doing your setup or directly in the configuration file). After that you're free to modify the templates/welcome.html
to whatever you want.
If people want to use your service, they'll have to modify the configuration file that is created in their configuration directory : ~/.config/goploader.conf.yml
.


About
Services
Contacts
Rubber Duck Software
We make websites.
“
Rubber duck debugging:
A programmer would carry around a rubber duck and debug his code by forcing himself to explain it, line-by-line, to the duck.”
Our Services
Our goal is to deliver beautiful and functional web applications.
Planning
We plan ahead, to prevent future problems and complications.
Research
Research is one of our best weapon. We follow the technology quite closely and quickly adopt to the new things.
Efficiency
We try to use our time efficiently, so we won't waste the most precious thing we have.
Consulting
We are here to help you, feel free to contact us if you have any questions!
Get in Touch
Send us an email:
info@rubberducksoftware.co.uk