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
#inp = [2, 4, 1, 2, 3, 10, 13, 11, 7,6, 5,4,2,6,7,5,4,2] | |
inp = [5, 4, 1, 2, 3, 10, 13, 11, 3] | |
minv=1 | |
posn=0 | |
temp = min(inp) | |
res = [i for i, j in enumerate(inp) if j == temp] | |
out = [0]*len(inp) | |
out[res[0]]=1 |
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
User privilege specification | |
root ALL=(ALL:ALL) ALL | |
# Allow members of group sudo to execute any command | |
%sudo ALL=(ALL:ALL) ALL | |
# See sudoers(5) for more information on "#include" directives: | |
www-data ALL = (root) NOPASSWD:/sbin/ip | |
#includedir /etc/sudoers.d | |
root@raspberrypi:~# |
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/sh | |
MODEM_IP="192.168.1.1" | |
curl -s -X GET "http://$MODEM_IP/api/webserver/SesTokInfo" > ses_tok.xml | |
COOKIE=`grep "SessionID=" ses_tok.xml | cut -b 10-147` | |
TOKEN=`grep "TokInfo" ses_tok.xml | cut -b 10-41` | |
#curl -X GET "http://$MODEM_IP/api/monitoring/status" \ | |
curl -X POST "http://$MODEM_IP/api/device/control" \ | |
-H "Cookie: $COOKIE" -H "__RequestVerificationToken: $TOKEN" \ |
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
Step 24/25 : RUN cd /src && wine64 /wine/drive_c/Python37/Scripts/pyinstaller.exe --onefile /src/gui.py | |
---> Running in f224ccae0473 | |
3216 INFO: PyInstaller: 3.5 | |
3217 INFO: Python: 3.7.1 | |
3517 INFO: Platform: Windows-XP-5.1.2600 | |
3606 INFO: wrote Z:\src\gui.spec | |
3620 INFO: UPX is not available. | |
3623 INFO: Extending PYTHONPATH with paths |
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 ubuntu:16.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
ARG WINE_VERSION=winehq-staging | |
ARG PYTHON_VERSION=3.7.1 | |
ARG PYINSTALLER_VERSION=3.5 | |
# we need wine for this all to work, so we'll use the PPA | |
RUN set -x \ |
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 ubuntu:16.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
ARG WINE_VERSION=winehq-staging | |
ARG PYTHON_VERSION=3.7.1 | |
ARG PYINSTALLER_VERSION=3.5 | |
# we need wine for this all to work, so we'll use the PPA | |
RUN set -x \ |
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://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html, aggregate list from each section | |
address-book-new The icon used for the action to create a new address book. | |
application-exit The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit. | |
appointment-new The icon used for the action to create a new appointment in a calendaring application. | |
call-start The icon used for initiating or accepting a call. Should be similar to the standard cellular call pickup icon, a green handset with ear and mouth pieces facing upward. | |
call-stop The icon used for stopping a current call. Should be similar to the standard cellular call hangup icon, a red handset with ear and mouth pieces facing downward. | |
contact-new The icon used for the action to create a new contact in an address book application. | |
document-new The icon used for the action to create a new document. | |
document-open The icon used for the action to open a document. | |
document-open-recent T |
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
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import binascii,socket,struct | |
from dnslib import DNSRecord,RCODE | |
from dnslib.server import DNSServer,DNSHandler,BaseResolver,DNSLogger | |
from dnslib.proxy import ProxyResolver, PassthroughDNSHandler |
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
The following NEW packages will be installed: | |
cmake cmake-data libcurl4 libjsoncpp1 librhash0 libuv1 | |
0 upgraded, 6 newly installed, 0 to remove and 153 not upgraded. | |
Need to get 0 B/4677 kB of archives. | |
After this operation, 24.3 MB of additional disk space will be used. | |
proot info: pid 5383: translate("/" + "/var/cache/apt/archives/") | |
proot info: pid 5383: -> "/home/unknown/tegra_linux/var/cache/apt/archives/" | |
proot info: pid 5383: translate("/" + "/var/log/apt/") | |
proot info: pid 5383: -> "/home/unknown/tegra_linux/var/log/apt/" | |
proot info: pid 5383: translate("/" + "/var/log/apt/eipp.log.xz") |
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 -*- | |
from pyqtgraph.Qt import QtGui, QtCore | |
import numpy as np | |
import pyqtgraph as pg | |
from pyqtgraph.ptime import time | |
import serial | |
import random |
NewerOlder