Skip to content

Commit d0227f6

Browse files
author
James Campbell
committed
added circle-ci badge
1 parent 59f5fa3 commit d0227f6

File tree

1 file changed

+39
-38
lines changed

1 file changed

+39
-38
lines changed

README.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<a href='https://travis-ci.org/jamesacampbell/python-examples'>![travis build status](https://travis-ci.org/jamesacampbell/python-examples.svg)</a>
2+
[![CircleCI](https://circleci.com/gh/jamesacampbell/python-examples/tree/master.svg?style=svg)](https://circleci.com/gh/jamesacampbell/python-examples/tree/master)
23

34
# python-examples
4-
This is a collection of python examples I created for some key libraries in Python that I use all the time.
5+
This is a collection of python examples I created for some key libraries in Python that I use all the time.
56

67
It is a way for me to remember and hopefully get others started.
78

@@ -14,9 +15,9 @@ It is a way for me to remember and hopefully get others started.
1415
~~**urllib2** ([package download link](http://pymotw.com/2/urllib2/))~~
1516
~~1. [access foursquare API](#foursquare-api-example)~~
1617

17-
## *By python 3.x module:*
18+
## *By python 3.x module:*
1819

19-
**http.server** (built-in to python3)
20+
**http.server** (built-in to python3)
2021

2122
1. [http example](#http-example)
2223

@@ -32,9 +33,9 @@ It is a way for me to remember and hopefully get others started.
3233

3334
1. [argparse example](#argparse-example)
3435

35-
**bs4** ([package download link](http://www.crummy.com/software/BeautifulSoup/bs4/download/))
36+
**bs4** ([package download link](http://www.crummy.com/software/BeautifulSoup/bs4/download/))
3637

37-
1. [html to text parser](#html-to-text-example)
38+
1. [html to text parser](#html-to-text-example)
3839
2. [email parser](#email-parser-example)
3940

4041
**fuzzywuzzy** (install by `pip3 install fuzzywuzzy --upgrade`)
@@ -86,7 +87,7 @@ It is a way for me to remember and hopefully get others started.
8687

8788
1. [wallet query example](#bitcoin-wallet-example)
8889

89-
**PySocks** ([package download link](https://github.com/Anorov/PySocks))
90+
**PySocks** ([package download link](https://github.com/Anorov/PySocks))
9091
1. [connect to tor and print .onion site](#tor-connect-example)
9192

9293
**shodan** (module download via pip install shodan)
@@ -98,20 +99,20 @@ It is a way for me to remember and hopefully get others started.
9899

99100
1. [websockify example](#websockify-example)
100101

101-
**scrapy** ([package download link](http://scrapy.org/download/))
102+
**scrapy** ([package download link](http://scrapy.org/download/))
102103

103104
1. [crawl all internal links for a domain](#scrapy-spider-example)
104105

105-
## http.server Example
106+
## http.server Example
106107
This example runs a web server to http://127.0.0.1:8000. Go to http://127.0.0.1:8000/web.html to verify it is working.
107108

108-
#### Run the example:
109+
#### Run the example:
109110

110-
<code>$ python3 example-http-server.py</code>
111+
<code>$ python3 example-http-server.py</code>
111112

112113
This will output that it is running on port 8000.
113114

114-
## pdfquery Example
115+
## pdfquery Example
115116
This example takes in the first argument the name of the pdf you want to get text from and prints the text found in the pdf to the screen.
116117

117118
#### Run the example:
@@ -121,8 +122,8 @@ This example takes in the first argument the name of the pdf you want to get tex
121122
This will output the text of the pdf to stdout if it contains any.
122123

123124

124-
## PDF Merge Example
125-
This example reads in a list of pdfs, you can specify the prefix of the list of pdfs using the `-p` argument or default is read\_. So for example, read_001.pdf, read_002.pdf would automatically get merged into a single pdf called merged.pdf. You can also set the output name via the `-o` argument.
125+
## PDF Merge Example
126+
This example reads in a list of pdfs, you can specify the prefix of the list of pdfs using the `-p` argument or default is read\_. So for example, read_001.pdf, read_002.pdf would automatically get merged into a single pdf called merged.pdf. You can also set the output name via the `-o` argument.
126127

127128
#### Run the example:
128129

@@ -139,12 +140,12 @@ The first example I created is pattern-example-twitter.py. Pattern is a great li
139140

140141
This twitter example connects to twitter and searches either a random string or terms you set via the terminal with the -s 'search terms'.
141142

142-
Terminal Example:
143+
Terminal Example:
143144

144145
<code>$ python pattern-example-twitter.py -s 'Hello World'</code>
145146

146147
## Tor Connect Example
147-
Tor (The Onion Router) has a particular socks port and connection setup that needs configured to connect in Python. This example shows you how. You must already have [Tor](http://torproject.org/download) installed.
148+
Tor (The Onion Router) has a particular socks port and connection setup that needs configured to connect in Python. This example shows you how. You must already have [Tor](http://torproject.org/download) installed.
148149

149150
*Note:* You need to install the Socksipy module for this to work, which has an actively maintained fork in [PySocks](https://github.com/Anorov/PySocks). It is easy if you already have pip (and if you don't have pip you should). <code>$ pip install PySocks</code>
150151

@@ -236,20 +237,20 @@ I hope you enjoy this example.
236237
-------------------
237238
```
238239

239-
## FuzzyWuzzy Example
240+
## FuzzyWuzzy Example
240241
This example searches for 'cowboy' and returns Dallas Cowboys as the closest match from the list available.
241242

242-
#### Run the Example:
243+
#### Run the Example:
243244
```
244245
$ python3 fuzzywuzzy-example.py
245246
```
246-
Returns:
247+
Returns:
247248
```
248249
Dallas Cowboys, 90
249250
```
250251

251252
## Google Mask Example
252-
This example used to do three things, 1. sets your search term, 2 . set your number of mask search terms, and 3. selects a random user agent for each search query. Google killed their API for this, so byebye.
253+
This example used to do three things, 1. sets your search term, 2 . set your number of mask search terms, and 3. selects a random user agent for each search query. Google killed their API for this, so byebye.
253254

254255
#### Run the Example:
255256
```
@@ -260,10 +261,10 @@ Returns:
260261
doesn't work anymore because google killed their API
261262
```
262263

263-
## Server Example
264+
## Server Example
264265
This example starts an http server on localhost:10010 and returns data when you visit the page
265266

266-
#### Run the Example:
267+
#### Run the Example:
267268
```
268269
$ python3 server-example.py
269270
```
@@ -339,7 +340,7 @@ Key: EXIF LensModel, value 50mm F1.7
339340
Key: Thumbnail YCbCrPositioning, value Co-sited
340341
Key: Image DateTime, value 2013:04:07 14:13:38
341342
Key: EXIF ExifVersion, value 0230
342-
Key: Thumbnail ImageDescription, value
343+
Key: Thumbnail ImageDescription, value
343344
Key: Image ExifOffset, value 360
344345
Key: Thumbnail JPEGInterchangeFormatLength, value 7654
345346
Key: EXIF ExposureMode, value Auto Bracket
@@ -357,7 +358,7 @@ Key: EXIF FocalLength, value 50
357358
Key: Thumbnail Compression, value JPEG (old-style)
358359
Key: EXIF FileSource, value Digital Camera
359360
Key: EXIF Flash, value Flash did not fire, compulsory flash mode
360-
Key: Image ImageDescription, value
361+
Key: Image ImageDescription, value
361362
Key: Thumbnail XResolution, value 72
362363
Key: Thumbnail ResolutionUnit, value Pixels/Inch
363364
Key: EXIF LightSource, value Unknown
@@ -546,8 +547,8 @@ This is a link:
546547
Take a Tour
547548
```
548549

549-
## Quandl Example
550-
This example gets the stocks from AAPL into a dataframe and prints it.
550+
## Quandl Example
551+
This example gets the stocks from AAPL into a dataframe and prints it.
551552

552553
#### Run the Example:
553554
```
@@ -567,7 +568,7 @@ This example takes a json object and converts it to python and iterates through
567568

568569
#### Run the Example:
569570
```
570-
$ python3 json-example.py
571+
$ python3 json-example.py
571572
```
572573

573574
## Foursquare API Example
@@ -585,7 +586,7 @@ What is the name of the venue to search?: Millenium Hotel
585586
{
586587
u'geocode': {
587588
u'parents': [
588-
589+
589590
],
590591
u'what': u'',
591592
u'where': u'londonuk',
@@ -633,14 +634,14 @@ What is the name of the venue to search?: Millenium Hotel
633634
u'hereNow': {
634635
u'count': 0,
635636
u'groups': [
636-
637+
637638
],
638639
u'summary': u'Nobodyhere'
639640
},
640641
u'specials': {
641642
u'count': 0,
642643
u'items': [
643-
644+
644645
]
645646
},
646647
u'contact': {
@@ -694,8 +695,8 @@ What is the name of the venue to search?: Millenium Hotel
694695
Lat/Long: 51.5108680696, -0.151263216976
695696
```
696697

697-
## argparse Example
698-
This example sets some basic args.
698+
## argparse Example
699+
This example sets some basic args.
699700

700701
#### Run the Example:
701702

@@ -719,10 +720,10 @@ optional arguments:
719720
--verbose verbose flag
720721
```
721722

722-
## Shodan Count Example
723+
## Shodan Count Example
723724
This example connects to shodan api via your configs.py file with proper api key variable set and then queries for nginx in Glasgow, GB.
724725

725-
#### Run the Example:
726+
#### Run the Example:
726727
```
727728
python3 shodan-example.py
728729
```
@@ -734,10 +735,10 @@ Results found: 246
734735
[Finished in 0.6s]
735736
```
736737

737-
## Google GEO and Shodan Example
738+
## Google GEO and Shodan Example
738739
This example takes an address, gets the lat/long, and searches in shodan for matches near that location.
739740

740-
#### Run the Example:
741+
#### Run the Example:
741742
```
742743
python3 get-geo-example.py
743744
```
@@ -753,16 +754,16 @@ Results found: 572
753754
## RethinkDB Example
754755
This example takes pastebin archive daily json data into a test table in rethinkdb and pulls out values from it.
755756

756-
#### Run the Example:
757+
#### Run the Example:
757758
```
758759
python3 rethink-example.py
759760
```
760761

761762
#### Returns:
762763

763764

764-
## Websockify Example
765-
This example uses websockify.
765+
## Websockify Example
766+
This example uses websockify.
766767
```
767768
python3 websockify-example.py :8015 :80
768769
```

0 commit comments

Comments
 (0)