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
| class IndexController extends CI_Controller { | |
| function __construct() { | |
| parent::__construct(); | |
| $this->load->helper('captcha'); | |
| $this->load->model('user', 'user'); | |
| } | |
| public function location($location_id) { | |
| $this->index($location_id); | |
| } | |
| public function index($location_id = 1) { |
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 rename 's/(?<!\.)\b\w*/\u$&/g' * |
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 bhtsne import tsne | |
| from sklearn.datasets.base import load_data | |
| from sklearn.utils import Bunch | |
| import pandas as pd | |
| import numpy as np | |
| from ggplot import * | |
| def load_netflix(return_X_y=False): | |
| data, target, target_names = load_data('/home/comtom/extra/netflix/', 'file1-100mil.csv') |
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 time | |
| import datetime | |
| with open('file1.csv', 'w') as output: | |
| with open('combined_data_1.txt', 'r') as f: | |
| currentMovieID = 0 | |
| for line in f: | |
| line = line.strip() |
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 matplotlib.pyplot as plt | |
| from sklearn.datasets.base import load_data | |
| from sklearn.utils import Bunch | |
| from sklearn.decomposition import PCA | |
| from sklearn.discriminant_analysis import LinearDiscriminantAnalysis | |
| def load_netflix(return_X_y=False): | |
| data, target, target_names = load_data('/home/comtom/extra/netflix/', 'file1.csv') |
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
| # Python virtual env alias | |
| alias activate='test -d ENV && source ./ENV/bin/activate || echo "No Virtualenv in the current folder"' | |
| alias mkenv='test -d ENV && echo "Already exists" || virtualenv --system-site-packages ENV; activate' |
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 file is executed on every boot (including wake-boot from deepsleep) | |
| def wifi_connect(): | |
| import network | |
| sta_if = network.WLAN(network.STA_IF) | |
| if not sta_if.isconnected(): | |
| sta_if.active(True) | |
| sta_if.connect('ss', 'wifi') | |
| while not sta_if.isconnected(): |
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 asyncio | |
| import aiomysql | |
| loop = asyncio.get_event_loop() | |
| # async def main(all_done): | |
| # """Get all messages.""" | |
| # conn = await aiomysql.connect(host='127.0.0.1', port=3306, user='test', |
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 | |
| if (! extension_loaded('mssql')) { | |
| //Return an associative array. Used on mssql_fetch_array()'s result_type parameter. | |
| define('MSSQL_ASSOC', '1'); | |
| //Return an array with numeric keys. Used on mssql_fetch_array()'s result_type parameter. | |
| define('MSSQL_NUM', '2'); | |
| //Return an array with both numeric keys and keys with their field name. This is the default value for mssql_fetch_array()'s result_type parameter. | |
| define('MSSQL_BOTH', '3'); | |
| //Indicates the 'TEXT' type in MSSQL, used by mssql_bind()'s type parameter. | |
| define('SQLTEXT', '35'); |
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
| format PE | |
| entry main | |
| section '.text' code readable executable | |
| main: | |
| push str_intro | |
| push format_output | |
| call [printf] |