A Pen by Md. Alamin Mahamud on CodePen.
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
| import csv | |
| with open("data.csv", "w+") as csvfile: | |
| writer = csv.writer(csvfile) | |
| writer.writerow(["Col 1", "Col 2"]) | |
| writer.writerow(["Data 1", "Data 2"]) | |
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
| from os.path import dirname, basename, isfile | |
| import glob | |
| modules = glob.glob(dirname(__file__)+"/*.py") | |
| __all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] |
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
| #!/usr/bin/python3 | |
| import mysql.connector | |
| from mysql.connector import errorcode | |
| from datetime import date, datetime, timedelta | |
| config = { | |
| 'user': 'root', | |
| 'password': 'root_mysql', | |
| 'host': '127.0.0.1', | |
| 'database': 'shoparu_01', |
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
| #!/bin/bash | |
| ################################################################################ | |
| # CORE FUNCTIONS - Do not edit | |
| ################################################################################ | |
| # | |
| # VARIABLES | |
| # | |
| _bold=$(tput bold) | |
| _underline=$(tput sgr 0 1) | |
| _reset=$(tput sgr0) |
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
| { "workbench.colorTheme": "Monokai", "editor.fontSize": 16, "editor.fontFamily": "'MonacoB', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'" } |
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
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo apt-key fingerprint 0EBFCD88 | |
| sudo add-apt-repository \ |
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
| # Distro: Ubuntu Desktop 16.04 LTS | |
| sudo apt-get install libgtk-3-dev libgtk-3-common libgtk-3-0 -y | |
| sudo apt-get install libtiff5-dev libpng12-dev libjpeg-dev libgif-dev libgnutls-dev libxml2-dev libxpm-dev libncurses-dev -y | |
| # Download the latest version in tar.gz | |
| cd ~/Downloads | |
| tar -xvzf emacs*.tar.gz | |
| rm emacs*.tar.gz | |
| mv emacs* emacs-source | |
| cd emacs-source | |
| ./autogen.sh |
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
| <?php | |
| class SomeClass { | |
| public static function getInstance() | |
| { | |
| if (null === static::$instance) { | |
| static::$instance = new static(); | |
| } | |
| return static::$instance; |
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
| Django==1.11.7 | |
| flake8==3.5.0 | |
| jedi==0.11.0 | |
| mccabe==0.6.1 | |
| parso==0.1.0 | |
| pycodestyle==2.3.1 | |
| pyflakes==1.6.0 | |
| pypugjs==4.2.2 | |
| pytz==2017.3 | |
| six==1.11.0 |
NewerOlder