Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
Discover gists
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 | |
if [ ! -f package.json ]; then | |
# Default to npm regardless of missing package file. | |
echo "npm" | |
exit 0 | |
fi | |
NODE_VERSION=$(node --version) | |
NODE_VERSION="${NODE_VERSION%%\.*}" |
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 PyQt5.QtCore import QUrl, QSize | |
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineScript, QWebEnginePage, QWebEngineProfile | |
from PyQt5.QtWidgets import QToolBar, QAction, QLineEdit, QLabel, QMainWindow, QTabWidget, QApplication | |
from PyQt5.QtNetwork import QNetworkCookie | |
import http.cookiejar | |
def create_script(name, src, injection_point = QWebEngineScript.DocumentCreation, world = QWebEngineScript.MainWorld, on_subframes = True): | |
script = QWebEngineScript() | |
script.setSourceCode(src) |
Use chmod +X
(as opposed to +x
) which will make only directories executable and leave files alone.
This is great for recursively fixing a Drupal files directory. For example:
chmod -R 664 sites/default/files && chmod -R a+X sites/default/files
That will make all your files writeable by you and the server, but not executable, but will also make directories executable (i.e., listable).
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
/target/ | |
!.mvn/wrapper/maven-wrapper.jar | |
### STS ### | |
.apt_generated | |
.classpath | |
.factorypath | |
.project | |
.settings | |
.springBeans |
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
0000:006f JessTechColourRumblePad | |
0001:0329 Sl6566 | |
0005:05ac Mocute | |
0010:0082 AkishopCustomsPs360Plus | |
0078:0006 MicrontekUsbJoystick | |
0079:0006 PcTwinShock | |
0079:0011 DragonRiseGamepad | |
0079:1800 MayflashWiiUProAdapter | |
0079:181a VenomLimitedArcadeJoystick | |
0079:181b VenomArcadeJoystick |
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
// https://piccalil.li/blog/a-modern-css-reset | |
/* Box sizing rules */ | |
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
} | |
/* Remove default margin */ |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import struct | |
''' | |
同花顺自选股文件格式: | |
0000000: 0900 0721 3030 3039 3731 0711 3630 3036 ...!000971..6006 | |
0000010: 3738 0721 3030 3231 3134 0721 3030 3232 78.!002114.!0022 |
Using Fedora 38, say you want to update the package albert
from manuelschneid3r
, hosted at https://software.opensuse.org/download.html?project=home:manuelschneid3r&package=albert.
And with dnf update
, you get the following output:
~ sudo dnf update
Dependencies resolved.
NewerOlder