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
#!/bin/bash | |
# | |
# script to extract ImageNet dataset | |
# ILSVRC2012_img_train.tar (about 138 GB) | |
# ILSVRC2012_img_val.tar (about 6.3 GB) | |
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory | |
# | |
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md | |
# | |
# train/ |
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 UpbitAPI: | |
""" | |
:라이브러리: | |
import requests, jwt, uuid, hashlib, time | |
from urllib.parse import urlencode | |
:사용법: | |
with open(r"C:\Users\Jay\Desktop\upbit.txt", 'r') as f: |
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 numpy as np | |
t = np.arange(1000) | |
v = np.zeros(1000) | |
v[10]=1 | |
v[200]=5 | |
v[240]=2 | |
def psc(t, tau1, tau2): | |
assert tau1<tau2 |
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 inspect | |
class foo: | |
def __init__(self, a, b=10, *c, **d): | |
values = inspect.getargvalues(inspect.currentframe())[3] | |
print(values) | |
# {'d': {}, 'c': (), 'b': 10, 'a': 1, 'self': <__main__.foo object at 0x0000021BD7DEECF8>} |
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 sys | |
from PySide2.QtCore import * | |
from PySide2.QtGui import * | |
from PySide2.QtWidgets import * | |
class tooldemo(QMainWindow): | |
def __init__(self, parent = None): | |
super(tooldemo, self).__init__(parent) | |
layout = QVBoxLayout() | |
tb = self.addToolBar("File") |
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 os, sys | |
from PySide2.QtWidgets import QTextEdit, QApplication, QMainWindow, QMdiArea, QMdiSubWindow, QMessageBox | |
class MainWindow(QMainWindow): | |
def __init__(self, parent=None): | |
super().__init__(parent) | |
self.setCentralWidget(MdiArea()) | |
class MdiArea(QMdiArea): | |
def __init__(self, parent=None): |
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 os, sys | |
from PySide2.QtWidgets import QTextEdit, QApplication, QMainWindow, QMdiArea, QMdiSubWindow, QMessageBox | |
class MainWindow(QMainWindow): | |
def __init__(self, parent=None): | |
super().__init__(parent) | |
self.setCentralWidget(MdiArea()) | |
class MdiArea(QMdiArea): | |
def __init__(self, parent=None): |
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 PySide2.QtWidgets import QApplication, QMainWindow, QMdiArea, QAction, QMdiSubWindow, QTextEdit | |
import sys | |
class MDIWindow(QMainWindow): | |
count = 0 | |
def __init__(self): | |
super().__init__() |
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 | |
import pyodbc | |
from sqlalchemy import create_engine | |
engine = create_engine("mssql+pyodbc://DESKTOP-R5QA5N1/test?driver=SQL+Server+Native+Client+11.0") | |
df = pd.DataFrame([1]) | |
df.to_sql('test', con=engine) |
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 | |
from sqlalchemy import create_engine | |
engine = create_engine('postgresql://id:password@localhost:port/database') | |
df.to_sql('table_name', engine) | |
pd.read_sql("select * from users limit 1", engine) |
NewerOlder