This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PassengerId | Survived | Pclass | Name | Sex | Age | SibSp | Parch | Ticket | Fare | Cabin | Embarked | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 3 | Braund, Mr. Owen Harris | male | 22 | 1 | 0 | A/5 21171 | 7.25 | S | ||
| 2 | 1 | 1 | Cumings, Mrs. John Bradley (Florence Briggs Thayer) | female | 38 | 1 | 0 | PC 17599 | 71.2833 | C85 | C | |
| 3 | 1 | 3 | Heikkinen, Miss. Laina | female | 26 | 0 | 0 | STON/O2. 3101282 | 7.925 | S | ||
| 4 | 1 | 1 | Futrelle, Mrs. Jacques Heath (Lily May Peel) | female | 35 | 1 | 0 | 113803 | 53.1 | C123 | S | |
| 5 | 0 | 3 | Allen, Mr. William Henry | male | 35 | 0 | 0 | 373450 | 8.05 | S | ||
| 6 | 0 | 3 | Moran, Mr. James | male | 0 | 0 | 330877 | 8.4583 | Q | |||
| 7 | 0 | 1 | McCarthy, Mr. Timothy J | male | 54 | 0 | 0 | 17463 | 51.8625 | E46 | S | |
| 8 | 0 | 3 | Palsson, Master. Gosta Leonard | male | 2 | 3 | 1 | 349909 | 21.075 | S | ||
| 9 | 1 | 3 | Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg) | female | 27 | 0 | 2 | 347742 | 11.1333 | S |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This module creates an HTTPS web server and serves static content | |
| from a specified directory on a specified port. | |
| To generate a new cert: | |
| openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 | |
| To remove the passphrase requirement: | |
| openssl rsa -in key.pem -out newkey.pem && mv newkey.pem key.pem | |
| Or just include the "passphrase" option when configuring the HTTPS server. | |
| Sources: | |
| - http://blog.mgechev.com/2014/02/19/create-https-tls-ssl-application-with-express-nodejs/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Available variables which can be used inside of strings. | |
| // ${workspaceRoot}: the root folder of the team | |
| // ${file}: the current opened file | |
| // ${fileBasename}: the current opened file's basename | |
| // ${fileDirname}: the current opened file's dirname | |
| // ${fileExtname}: the current opened file's extension | |
| // ${cwd}: the current working directory of the spawned process | |
| { | |
| "version": "0.1.0", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Stretch Name | Start Year | End Year | |
|---|---|---|---|
| The Universe | -14500000000 | ||
| Sun as Main Sequence Star | -4500000000 | 5500000000 | |
| Earth as a Physical Planet | -4400000000 | 5500000000 | |
| Earth with Liquid Water | -4400000000 | 1000000000 | |
| Prokaryotes | -4000000000 | ||
| Photosynthesis | -3500000000 | ||
| O2 Rich Atmosphere | -2300000000 | ||
| Eukaryotes | -2200000000 | ||
| Multicellular Life | -1500000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private const int METRICSCACHE = 1000; | |
| private const int maxParallelism = 16; | |
| private static object Metrics_Lock = new object(); | |
| // Loop through the 'items' collection, creating maxParallelism simultaneous tasks | |
| // Each task return a result that is save as 'metrics' | |
| public void RunParallelTasks() | |
| { | |
| var tasks = new List<Task<Metric>>(maxParallelism); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Table</title> | |
| </head> | |
| <body> | |
| <div id="myDivTable"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // --------------------------------------------------------------------------------------------------------------- | |
| // If you run this on Windows 10 (having it's default printer "Microsoft Print to PDF" installed - no need office) | |
| // This should print a PDF file named "CreatedByCSharp.PDF" in your "MyDocuments" folder | |
| // containing the string "When nothing goes right, go left" | |
| // Microsoft Print to PDF is built-in Window 10. No Office required. | |
| // Settings → Devices → Add Printer for more information. | |
| // --------------------------------------------------------------------------------------------------------------- | |
| // If not present, you will need to add a reference to System.Drawing in your project References | |
| using System.Drawing; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Calculates the lenght in bytes of an object and returns its size in Ko | |
| /// Usage: | |
| /// int MessageSizeKo = GetObjectSize( myObject ); | |
| /// </summary> | |
| /// <param name="TestObject"></param> | |
| /// <returns></returns> | |
| private int GetObjectSize(object TestObject) | |
| { | |
| BinaryFormatter bf = new BinaryFormatter(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Make directory if it doesn't exist | |
| directory = 'media/csvs/' | |
| if not os.path.exists(directory): | |
| os.makedirs(directory) | |
| path = directory + 'student_data.csv' | |
| csvFile = open(path, 'w') | |
| csvFile.write('Name,Contact Number,email\n') | |
| # Iterate through queryset or list and do the following for each iteration |
NewerOlder