This file contains 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 pandas as pd | |
def split_dataframe(df, chunk_size, file_name = "shopee"): | |
""" | |
Splits a Dataframe into smaller chunks of a specified size and saves each chunk as a separate CSV file. | |
Parameters: | |
- df (pandas.DataFrame): The DataFrame to be split. | |
- chunk_size (int): The number of rows each chunk should contain. | |
- file_name (str, optional): The base name for the output CSV files. Defaults to "shopee". |
This file contains 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
{ | |
"deploy": { | |
"VM:-": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"main:1": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, |
This file contains 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
\documentclass[letterpaper,11pt]{article} | |
\usepackage{latexsym} | |
\usepackage[empty]{fullpage} | |
\usepackage{titlesec} | |
\usepackage{marvosym} | |
\usepackage[usenames,dvipsnames]{color} | |
\usepackage{verbatim} | |
\usepackage{enumitem} | |
\usepackage[hidelinks]{hyperref} |
This file contains 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 functools import wraps | |
import pandas as pd | |
import numpy as np | |
from pandas import DataFrame, Series | |
def inputvalidator(input_="ohlc"): | |
def dfcheck(func): | |
@wraps(func) | |
def wrap(*args, **kwargs): |
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 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
numpy | |
pandas | |
scipy | |
# visualization | |
matplotlib | |
seaborn | |
plotly | |
yellowbrick | |
# cloud service | |
google-cloud-bigquery |
This file contains 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 threading | |
x = 0 | |
def increament(): global x x +=1 | |
def thread_task(lock): for _ in range(100000): | |
lock.acquire() increament() lock.release() | |
def main_task(): global x x = 0 lock = threading.Lock() t1 = threading.Thread(target=thread_task, args=(lock, )) t2 = threading.Thread(target=thread_task, args=(lock, )) t3 = |
This file contains 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 threading | |
x = 0 | |
def increament(): | |
global x | |
x +=1 | |
def thread_task(lock): | |
for _ in range(100000): |
This file contains 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
{ | |
// | |
// EDITOR CONFIG | |
// | |
"editor.fontSize": 12, | |
"editor.lineHeight": 0, | |
"editor.lineNumbers": true, | |
"editor.tabSize": 4, | |
This file contains 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 DBMongo{ | |
constructor(url){ | |
this.url = url | |
this.MongoClient = require('mongodb').MongoClient; | |
} | |
createcollection(clt="hardware", dbase="mydb"){ | |
this.MongoClient.connect(this.url, function(err, db){ | |
if(err) throw err; | |
var dbo = db.db(dbase) |
NewerOlder