Skip to content

Commit 3dedfa0

Browse files
committed
Initial Commit
0 parents  commit 3dedfa0

18 files changed

+454
-0
lines changed

README.md

Whitespace-only changes.

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "g0vhk",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"gh-pages": "^1.0.0",
7+
"github-fork-ribbon-css": "^0.2.1",
8+
"react": "^16.0.0",
9+
"react-dom": "^16.0.0",
10+
"react-github-fork-ribbon": "^0.5.1",
11+
"react-highlight": "^0.10.0"
12+
},
13+
"devDependencies": {
14+
"spectacle-scripts": "1.0.15"
15+
},
16+
"homepage": "./",
17+
"scripts": {
18+
"start": "react-scripts start",
19+
"deploy": "gh-pages -d build",
20+
"build": "react-scripts build",
21+
"test": "react-scripts test --env=jsdom",
22+
"eject": "react-scripts eject"
23+
}
24+
}

public/favicon.ico

361 KB
Binary file not shown.

public/fb.png

56.3 KB
Loading

public/index.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<meta name="theme-color" content="#000000">
7+
<meta property="og:url" content="https://g0vhk-io.github.io/pyconhk2017/"></meta>
8+
<meta property="og:type" content="article"></meta>
9+
<meta property="og:title" content=""></meta>
10+
<meta property="og:description" content="PYTHON & OPEN DATA PROBLEM IN HONG KONG"></meta>
11+
<meta property="og:image" content="https://g0vhk-io.github.io/pyconhk2017/fb.png"></meta>
12+
<meta property="og:image:width" content="600"></meta>
13+
<meta property="og:image:height" content="315"></meta>
14+
<!--
15+
manifest.json provides metadata used when your web app is added to the
16+
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
17+
-->
18+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
19+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
20+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.0/gh-fork-ribbon.min.css" />
21+
22+
<!--
23+
Notice the use of %PUBLIC_URL% in the tags above.
24+
It will be replaced with the URL of the `public` folder during the build.
25+
Only files inside the `public` folder can be referenced from the HTML.
26+
27+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
28+
work correctly both with client-side routing and a non-root public URL.
29+
Learn how to configure a non-root public URL by running `npm run build`.
30+
-->
31+
<title>PYTHON & OPEN DATA PROBLEM IN HONG KONG</title>
32+
</head>
33+
<body>
34+
<noscript>
35+
You need to enable JavaScript to run this app.
36+
</noscript>
37+
<a class="github-fork-ribbon left-top" href="https://github.com/g0vhk-io/pyconhk2017/" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
38+
<div id="root"></div>
39+
<!--
40+
This HTML file is a template.
41+
If you open it directly in the browser, you will see an empty page.
42+
43+
You can add webfonts, meta tags, or analytics to this file.
44+
The build step will place the bundled scripts into the <body> tag.
45+
46+
To begin the development, run `npm start` or `yarn start`.
47+
To create a production bundle, use `npm run build` or `yarn build`.
48+
-->
49+
</body>
50+
</html>

public/manifest.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "g0vhk",
3+
"name": "g0vhk",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
}
10+
],
11+
"start_url": "./index.html",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}

src/ckan.png

295 KB
Loading

src/coding.jpg

66.3 KB
Loading

src/database.png

176 KB
Loading

src/database2.png

39.3 KB
Loading

src/frustrated.png

63.2 KB
Loading

src/haystack.png

62 KB
Loading

src/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react';
2+
import { render } from "react-dom";
3+
4+
import Presentation from "./presentation";
5+
import registerServiceWorker from './registerServiceWorker';
6+
7+
const root = document.getElementById('root');
8+
9+
render(
10+
<Presentation/>
11+
, root);
12+
13+
if (module.hot) {
14+
if (module.hot) {
15+
module.hot.accept();
16+
}
17+
}
18+
19+
registerServiceWorker();

src/me.jpg

12.9 KB
Loading

src/pdf.png

175 KB
Loading

src/presentation.js

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
// Import React
2+
import React from "react";
3+
4+
// Import Spectacle Core tags
5+
import {
6+
Appear,
7+
BlockQuote,
8+
Code,
9+
CodePane,
10+
Cite,
11+
Deck,
12+
Heading,
13+
Layout,
14+
Fit,
15+
Fill,
16+
ListItem,
17+
List,
18+
Link,
19+
Quote,
20+
Slide,
21+
Text
22+
} from "spectacle";
23+
24+
// Import theme
25+
import createTheme from "spectacle/lib/themes/default";
26+
import meImg from './me.jpg';
27+
import frustratedImg from './frustrated.png';
28+
import codingImg from './coding.jpg';
29+
import pdfImg from './pdf.png';
30+
import databaseImg from './database.png';
31+
import database2Img from './database2.png';
32+
import ckanImg from './ckan.png';
33+
import xmlImg from './xml.png';
34+
import haystackImg from './haystack.png';
35+
36+
// Require CSS
37+
require("normalize.css");
38+
require("spectacle/lib/themes/default/index.css");
39+
40+
const theme = createTheme({
41+
primary: "#666",
42+
secondary: "#1F2022",
43+
tertiary: "#03A9FC",
44+
quartenary: "#CECECE"
45+
}, {
46+
primary: "Helvetica",
47+
secondary: "Helvetica"
48+
});
49+
50+
51+
export default class Presentation extends React.Component {
52+
render() {
53+
return (
54+
<Deck transition={["zoom", "slide"]} transitionDuration={500} theme={theme}>
55+
<Slide transition={["zoom"]} bgColor="primary">
56+
<Heading size={4} caps lineHeight={1} textColor="secondary">
57+
Python & Open Data Problem in Hong Kong
58+
59+
</Heading>
60+
<Text margin="10px 0 0" textColor="tertiary" size={10} italic>
61+
The story of g0vhk.io
62+
</Text>
63+
<br/>
64+
<br/>
65+
PyCON HK 2017
66+
<br/>
67+
<br/>
68+
<Text margin="20px 0 0" textColor="quartenary" textSize={20}>
69+
<br/><br/>
70+
Ho Wa Wong,<br/>
71+
info@g0vhk.io
72+
</Text>
73+
74+
</Slide>
75+
<Slide transition={["fade"]} bgColor="primary">
76+
<Heading size={6} textColor="secondary" caps>Today's Agenda</Heading>
77+
<List>
78+
<ListItem>Hong Kong Open Data Problem</ListItem>
79+
<ListItem><Link href="http://g0vhk.io">g0vhk.io</Link></ListItem>
80+
<ListItem>Tech Stack</ListItem>
81+
</List>
82+
</Slide>
83+
<Slide transition={["fade"]} bgColor="primary">
84+
<Heading size={6} textColor="secondary" caps>About Myself</Heading>
85+
<br/>
86+
<br/>
87+
<Layout>
88+
<Fit>
89+
<img src={meImg}/>&nbsp;
90+
</Fit>
91+
<Fit>
92+
&nbsp;
93+
</Fit>
94+
<Fill>
95+
<List>
96+
<ListItem textSize={30}>Python & Open Source Developer</ListItem>
97+
<ListItem textSize={30}>Open Data Advocate</ListItem>
98+
<ListItem textSize={30}>Founder of <Link href="http://g0vhk.io">g0vhk.io</Link></ListItem>
99+
</List>
100+
</Fill>
101+
</Layout>
102+
</Slide>
103+
<Slide transition={["fade"]} bgColor="primary">
104+
<Heading size={6} textColor="secondary" caps>Problem of Open Data</Heading>
105+
<br/>
106+
<img src={frustratedImg} />
107+
</Slide>
108+
<Slide transition={["fade"]} bgColor="primary">
109+
<Heading size={6} textColor="secondary" caps>Problem of Open Data</Heading>
110+
<List>
111+
<ListItem>Government does not know what is it</ListItem>
112+
<ListItem>Not enough information freedom</ListItem>
113+
<ListItem>Data not machine processable</ListItem>
114+
<ListItem>Blah Blah Blah</ListItem>
115+
</List>
116+
</Slide>
117+
<Slide transition={["fade"]} bgColor="primary">
118+
<Heading size={6} textColor="secondary" caps>Problem of PDFs</Heading>
119+
<Appear>
120+
<Text>Not PDF itself...</Text>
121+
</Appear>
122+
<Appear>
123+
<Text>But our government uses the wrong file format.</Text>
124+
</Appear>
125+
</Slide>
126+
<Slide transition={["fade"]} bgColor="primary">
127+
<Heading size={6} textColor="secondary" caps>Civic Hacking</Heading>
128+
<Appear>
129+
<List>
130+
<ListItem>Solve real life social problem with tech</ListItem>
131+
<ListItem>Open Source</ListItem>
132+
<ListItem>Open Data</ListItem>
133+
<ListItem>Tech</ListItem>
134+
<ListItem>Problem</ListItem>
135+
</List>
136+
</Appear>
137+
</Slide>
138+
<Slide transition={["fade"]} bgColor="primary">
139+
<Heading size={6} textColor="secondary">g0vhk.io</Heading>
140+
Demo
141+
</Slide>
142+
<Slide transition={["fade"]} bgColor="primary">
143+
<Heading size={6} textColor="secondary">Tech Stack</Heading>
144+
145+
<img src="http://lucene.apache.org/solr/assets/identity/Solr_Logo_on_white.png" width="15%" />&nbsp;
146+
<img src="http://haystacksearch.org/images/logo.png" width="40%"/>&nbsp;
147+
<img src="https://scrapy.org/img/scrapylogo.png"/><br/>
148+
<img src="https://www.djangoproject.com/s/img/logos/django-logo-negative.png" width="25%"/>&nbsp;
149+
<img src="https://ckan.org/files/2017/03/Logo_438x144.png" width="30%"/>&nbsp;
150+
<img src="https://mariadb.org/wp-content/uploads/2015/09/MariaDB-Foundation-vertical-small.png" width="15%" /> <br/>
151+
<Code>
152+
lxml + pdfminer + ...
153+
</Code>
154+
</Slide>
155+
<Slide transition={["fade"]} bgColor="primary">
156+
<Heading size={6} textColor="secondary" caps>pdfminer</Heading>
157+
<List>
158+
<ListItem>Python PDF parser</ListItem>
159+
<ListItem><Link href="https://github.com/euske/pdfminer">Github</Link></ListItem>
160+
<ListItem>Turn hansard into django model</ListItem>
161+
</List>
162+
</Slide>
163+
<Slide transition={["fade"]} bgColor="primary">
164+
<Heading size={6} textColor="secondary" caps>pdfminer</Heading>
165+
<br/>
166+
<Layout>
167+
<Fit>
168+
<img src={pdfImg} />&nbsp;
169+
</Fit>
170+
<Fit>
171+
<br/>
172+
<br/>
173+
<br/>
174+
<br/>
175+
<br/>
176+
&nbsp; &rarr; &nbsp;
177+
</Fit>
178+
<Fit>
179+
<img src={databaseImg} />
180+
</Fit>
181+
</Layout>
182+
</Slide>
183+
<Slide transition={["fade"]} bgColor="primary">
184+
<Heading size={6} textColor="secondary" caps>lxml</Heading>
185+
<br/>
186+
<Layout>
187+
<Fit>
188+
<img src={xmlImg} />&nbsp;
189+
</Fit>
190+
<Fit>
191+
<br/>
192+
<br/>
193+
<br/>
194+
<br/>
195+
<br/>
196+
&nbsp; &rarr; &nbsp;
197+
</Fit>
198+
<Fit>
199+
<br/>
200+
<br/>
201+
<br/>
202+
<img src={database2Img} />
203+
</Fit>
204+
</Layout>
205+
</Slide>
206+
207+
<Slide transition={["fade"]} bgColor="primary">
208+
<Heading size={6} textColor="secondary" caps>morph.io</Heading>
209+
<List>
210+
<ListItem>morph.io: A scraping platform</ListItem>
211+
<ListItem>Run Scrapy Daily</ListItem>
212+
<ListItem>with SQLLite Database</ListItem>
213+
</List>
214+
</Slide>
215+
<Slide transition={["fade"]} bgColor="primary">
216+
<Heading size={6} textColor="secondary" caps>Django</Heading>
217+
</Slide>
218+
<Slide transition={["fade"]} bgColor="primary">
219+
<Heading size={6} textColor="secondary" caps>Haystack</Heading>
220+
<List>
221+
<ListItem>Modular search for Django</ListItem>
222+
<ListItem>supports Solr, Elasticsearch, Whoosh</ListItem>
223+
</List>
224+
<img src={haystackImg} />
225+
</Slide>
226+
<Slide transition={["fade"]} bgColor="primary">
227+
<Heading size={6} textColor="secondary" caps>CKAN</Heading>
228+
<br/>
229+
<br/>
230+
<img src={ckanImg} />
231+
</Slide>
232+
<Slide transition={["fade"]} bgColor="primary">
233+
<Heading size={2} textColor="secondary" caps>Thank you & Happy Python !</Heading>
234+
</Slide>
235+
</Deck>
236+
);
237+
}
238+
}

0 commit comments

Comments
 (0)