index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
34,400 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /wdcs/discover.py | import csv
from wdcs.ap import *
from wdcs.crack import *
from wdcs.basicutils import Logger
class Discover(object):
def __init__(self, config, database, crack_utils, file_manager):
self.config = config
self.db = database
self.crack_utils = crack_utils
self.file_manager = file_man... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,401 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /additional/hashcat_crack.py | # External cracking script, part of https://github.com/mmmds/WirelessDiscoverCrackScan
import datetime
import subprocess
import os
### CONFIGURATION
HASHCAT_DIR = "C:\\hashcat-5.1.0"
HASHCAT_EXE = "hashcat64.exe"
LOG_FILE = "crack_log.txt"
DICT_DIR = "./dicts"
def load_dict_list():
for r,d,f in os.walk(DICT_DIR)... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,402 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /wdcs.py | import sys
from wdcs.wdcs import WDCS
def print_usage():
bold = '\033[1m'
end_bold = '\033[0m'
print(bold + "Wireless Discover Crack Scan" +end_bold +" (v0.1)\n\tmass automated wifi security tool")
print("Usage:"
+ "\n\t{}{} auto{} - start auto scan".format(bold, script_name, end_bold)
... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,403 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /wdcs/database.py | from wdcs.ap import *
import sqlite3
class Database(object):
def __init__(self, file_manager):
self.con = sqlite3.connect(file_manager.filepath("wifi.db"))
self.__sql_init()
def __sql_init(self):
try:
c = self.con.cursor()
c.execute(
"CREATE TA... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,404 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /wdcs/config.py | import configparser
from wdcs.basicutils import Bssid
from wdcs.logger import Logger
import os
class Config(object):
def __init__(self, file_manager):
self.define_const()
config_path = file_manager.filepath("cfg.ini")
parser = configparser.ConfigParser()
default = configparser.Con... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,405 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /wdcs/logger.py | import datetime
import logging
import os
import sys
class LoggerImpl(object):
def __init__(self):
filename = os.getenv("HOME") + "/.wdcs/log"
stdout_handler = logging.StreamHandler(sys.stdout)
file_handler = logging.FileHandler(filename)
logging.basicConfig(handlers=[stdout_handle... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,406 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /wdcs/scan.py | from wdcs.crack import WpaSupplicant
from wdcs.logger import Logger
from wdcs.process import Process
from wdcs import timeutils
import time
class Nmap(object):
def __init__(self, config, db, file_manager):
self.config = config
self.db = db
self.file_manager = file_manager
def __start... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,407 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /wdcs/process.py | from wdcs.logger import Logger
import subprocess
import os
from wdcs import timeutils
import time
class Process(object):
@classmethod
def start_process_pipe(cls, cmd):
return Process.start_process(cmd, subprocess.PIPE, subprocess.STDOUT)
@classmethod
def start_process_pipe_stdout(cls, cmd):
... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,408 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /wdcs/hashcat.py | from wdcs import process
from wdcs.logger import Logger
class Hashcat(object):
def __init__(self, config):
self.config = config
pass
def crack_pmkid(self, filepath):
return self.__crack(filepath, "16800")
def crack_4hs(self, filepath):
return self.__crack(filepath, "2500... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,409 | mmmds/WirelessDiscoverCrackScan | refs/heads/master | /wdcs/crack.py | from wdcs.basicutils import *
from wdcs.logger import Logger
from timeit import default_timer as timer
from wdcs import timeutils
import sys
import traceback
import time
import string
import random
class CrackSuccess(Exception):
pass
class CrackSuccessNoPsk(CrackSuccess):
pass
class NoStations(Exception):... | {"/wdcs/ap.py": ["/wdcs/basicutils.py", "/wdcs/logger.py", "/wdcs/timeutils.py"], "/wdcs/wdcs.py": ["/wdcs/config.py", "/wdcs/scan.py", "/wdcs/database.py", "/wdcs/discover.py", "/wdcs/timeutils.py", "/wdcs/crack.py", "/wdcs/hashcat.py"], "/wdcs/basicutils.py": ["/wdcs/process.py", "/wdcs/logger.py"], "/wdcs/discover.p... |
34,410 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/utils.py | import math
import random
from color import Color
def blendChannel(a, b, t):
if t == 0:
return a
elif t == 1:
return b
else:
return int(math.sqrt((1 - t) * a**2 + t * b**2))
def bound(value, smallest, largest):
return min(max(value, smallest), largest)
... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,411 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/effects/baseEffect.py | import time
from leds import LedStripControl
from button import Button, ButtonCommand
class BaseEffect:
button: Button
ledStrip: LedStripControl
isInfinite: bool
loopInterval: int
def __init__(self, ledStrip: LedStripControl, button: Button, isInfinite: bool = True, loopInterval: int =... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,412 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/effects/lambdaColor.py | from .baseEffect import BaseEffect
from button import Button
from color import Color
from leds import LedStripControl, NUM_LEDS
from utils import blendChannel, bound
import time
import random
class AnimationState:
WAITING = 0
ANIMATING = 1
class LambdaColor(BaseEffect):
# colorGetter: func... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,413 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/main.py | import time
from leds import LedStripControl
from button import ButtonCommand, Button
from color import Color
import effects
LEDSTRIP_DATA_PIN = 28
BUTTON_PIN = 27
ledStrip = LedStripControl(LEDSTRIP_DATA_PIN)
button = Button(BUTTON_PIN)
effectFns: list = [
effects.ProximaPlane(ledStrip, button)... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,414 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/color.py | class Color:
BLACK = (0, 0, 0)
RED = (255, 0, 0)
YELLOW = (255, 150, 0)
GREEN = (0, 255, 0)
CYAN = (0, 255, 255)
BLUE = (0, 0, 255)
PURPLE = (180, 0, 255)
WHITE = (255, 255, 255)
ALL = (RED, YELLOW, GREEN, CYAN, BLUE, PURPLE, WHITE)
| {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,415 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/button.py | import time
from machine import Pin, Timer
class ButtonCommand:
NONE = 0
NEXT = 1
OFF = 2
class Button:
__btn: Pin
__riseStart: int
__isDown: bool
__command: int
__checkTimer: Timer
__holdTimer: Timer
def __init__(self, pin: int) -> None:
self.__btn = ... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,416 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/effects/__init__.py | from .biColor import BiColor
from .rainbowStars import RainbowStars
from .wipePlane import WipePlane
from .proximaPlane import ProximaPlane
| {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,417 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/effects/rainbowStars.py | from .lambdaColor import LambdaColor
from leds import LedStripControl
from button import Button
from utils import getNewRandomColor
class RainbowStars(LambdaColor):
def __init__(self, ledStrip: LedStripControl, button: Button) -> None:
def colorGetter(prev):
return getNewRandomColor(pre... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,418 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/leds.py | import array
from machine import Pin
import rp2
LED_POSITIONS = ((-109, -53, -30), (-5, -53, -30), (-65, 37, 74), (-109, -67, 74), (99, 37, 74), (55, -67, 0), (-109, 37, -74), (-35, -7, -74), (69, -7, -74), (-109, 23, -30), (-35, -17, -30), (69, -17, -30), (109, 23, -30), (35, 67, 0))
NUM_LEDS = len(LED_POSITIONS... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,419 | krismsd/rpipico-led-lamp | refs/heads/master | /light-coords.py | ### Script for calculating end positions of LED tree given sequence of joined parts and known lengths of parts
LEFT = "left"
RIGHT = "right"
UP = "up"
DOWN = "down"
IN = "in"
OUT = "out"
STRAIGHT = "straight"
LONGSTRAIGHT = "longstraight"
class v:
turnHalf = 13
straight = 40
longstraight = 8... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,420 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/effects/baseSweepingEffect.py | import time
from .lambdaColor import BaseEffect
from leds import AXIS_RANGES, LedStripControl
from button import Button
from color import Color
from utils import getNewRandomColor
class BaseSweepingEffect(BaseEffect):
ANIMATION_DURATION = 4000
# animationGenerator: Generator
# animation: tupl... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,421 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/effects/biColor.py | import random
from .lambdaColor import LambdaColor
from leds import LedStripControl
from button import Button
from color import Color
class BiColor(LambdaColor):
def __init__(self, ledStrip: LedStripControl, button: Button, color1, color2) -> None:
def colorGetter(prev):
if prev == C... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,422 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/effects/wipePlane.py | from .baseSweepingEffect import BaseSweepingEffect
from leds import LED_POSITIONS, NUM_LEDS
from utils import bound, blendChannel
class WipePlane(BaseSweepingEffect):
def animateFrame(self, position, axis, colors, isForwards):
(color, bgColor) = colors
for i in range(NUM_LEDS):
... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,423 | krismsd/rpipico-led-lamp | refs/heads/master | /mc-code/effects/proximaPlane.py | from .baseSweepingEffect import BaseSweepingEffect
from leds import LED_POSITIONS, NUM_LEDS
from utils import bound
class ProximaPlane(BaseSweepingEffect):
def animateFrame(self, position, axis, colors, isForwards):
color = colors[0]
for i in range(NUM_LEDS):
led = LED_POSITIO... | {"/mc-code/effects/lambdaColor.py": ["/mc-code/effects/baseEffect.py"], "/mc-code/effects/__init__.py": ["/mc-code/effects/biColor.py", "/mc-code/effects/rainbowStars.py", "/mc-code/effects/wipePlane.py", "/mc-code/effects/proximaPlane.py"], "/mc-code/effects/rainbowStars.py": ["/mc-code/effects/lambdaColor.py"], "/mc-... |
34,427 | NazarNintendo/ml-deepnetwork | refs/heads/master | /utils/datagen.py | from utils.models import Element
import numpy as np
import random
train_test_proportion = .80
def generate_random_data(size) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]:
"""
Randomly generates linearly-separable data, writes it to a file and return as numpy arrays.
:param size: amount of ele... | {"/utils/datagen.py": ["/utils/models.py"], "/neural/__init__.py": ["/neural/deep.py"], "/utils/__init__.py": ["/utils/models.py", "/utils/datagen.py", "/utils/reports.py"], "/neural/deep.py": ["/utils/__init__.py"], "/run.py": ["/neural/__init__.py"]} |
34,428 | NazarNintendo/ml-deepnetwork | refs/heads/master | /neural/__init__.py | from .deep import *
| {"/utils/datagen.py": ["/utils/models.py"], "/neural/__init__.py": ["/neural/deep.py"], "/utils/__init__.py": ["/utils/models.py", "/utils/datagen.py", "/utils/reports.py"], "/neural/deep.py": ["/utils/__init__.py"], "/run.py": ["/neural/__init__.py"]} |
34,429 | NazarNintendo/ml-deepnetwork | refs/heads/master | /utils/__init__.py | from .models import *
from .datagen import *
from .reports import *
| {"/utils/datagen.py": ["/utils/models.py"], "/neural/__init__.py": ["/neural/deep.py"], "/utils/__init__.py": ["/utils/models.py", "/utils/datagen.py", "/utils/reports.py"], "/neural/deep.py": ["/utils/__init__.py"], "/run.py": ["/neural/__init__.py"]} |
34,430 | NazarNintendo/ml-deepnetwork | refs/heads/master | /utils/reports.py | from datetime import datetime
def save_report(weights, biases, train_accuracy, test_accuracy, time_elapsed, train_size, test_size,
generations) -> None:
"""
Saves a report to the reports directory.
"""
with open(f'reports/{datetime.now().strftime("%d-%m-%Y-%H-%M-%S")}.txt', 'w') as f:
... | {"/utils/datagen.py": ["/utils/models.py"], "/neural/__init__.py": ["/neural/deep.py"], "/utils/__init__.py": ["/utils/models.py", "/utils/datagen.py", "/utils/reports.py"], "/neural/deep.py": ["/utils/__init__.py"], "/run.py": ["/neural/__init__.py"]} |
34,431 | NazarNintendo/ml-deepnetwork | refs/heads/master | /utils/models.py | import random
import time
random.seed(time.time())
class Element:
def __init__(self, x=None, y=None, value=None):
self.x = x if x else random.gauss(0, .4)
self.y = y if y else random.gauss(0, .4)
self.value = value if value else self.get_value()
def __str__(self) -> str:
"""
... | {"/utils/datagen.py": ["/utils/models.py"], "/neural/__init__.py": ["/neural/deep.py"], "/utils/__init__.py": ["/utils/models.py", "/utils/datagen.py", "/utils/reports.py"], "/neural/deep.py": ["/utils/__init__.py"], "/run.py": ["/neural/__init__.py"]} |
34,432 | NazarNintendo/ml-deepnetwork | refs/heads/master | /neural/deep.py | from utils import *
from plotter import plot, graph
import time
import numpy as np
np.random.seed(int(time.time()))
class DeepNetwork:
learning_rate = 0.25
def __init__(self, filepath=None, size=100):
# 2 neurons in the input layer.
# 10 neurons in the hidden layer.
# 1 neuron in the... | {"/utils/datagen.py": ["/utils/models.py"], "/neural/__init__.py": ["/neural/deep.py"], "/utils/__init__.py": ["/utils/models.py", "/utils/datagen.py", "/utils/reports.py"], "/neural/deep.py": ["/utils/__init__.py"], "/run.py": ["/neural/__init__.py"]} |
34,433 | NazarNintendo/ml-deepnetwork | refs/heads/master | /run.py | from neural import DeepNetwork
deep_network = DeepNetwork(size=100)
deep_network.train()
deep_network.predict_from_file('data/predict.txt')
| {"/utils/datagen.py": ["/utils/models.py"], "/neural/__init__.py": ["/neural/deep.py"], "/utils/__init__.py": ["/utils/models.py", "/utils/datagen.py", "/utils/reports.py"], "/neural/deep.py": ["/utils/__init__.py"], "/run.py": ["/neural/__init__.py"]} |
34,434 | NazarNintendo/ml-deepnetwork | refs/heads/master | /plotter/graph.py | import matplotlib.pyplot as plt
def plot(X, Y, Xp, Pp, title):
"""
Plots the data and decision boundary.
"""
scatter(Xp.T.tolist(), Pp.T.tolist(), '#FDE8D2', '#D0E9E9', title)
scatter(X.T.tolist(), Y.tolist(), '#ff9933', '#00e6e6', title)
plt.show()
def scatter(X, Y, color1, color2, title):
... | {"/utils/datagen.py": ["/utils/models.py"], "/neural/__init__.py": ["/neural/deep.py"], "/utils/__init__.py": ["/utils/models.py", "/utils/datagen.py", "/utils/reports.py"], "/neural/deep.py": ["/utils/__init__.py"], "/run.py": ["/neural/__init__.py"]} |
34,435 | JamesLaw86/finance_tools | refs/heads/master | /old/data_requests.py | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 7 18:16:41 2018
@author: James
"""
import requests
import pandas as pd
import matplotlib.pyplot as plt
import re
import numpy as np
def make_request(ticker, function = 'TIME_SERIES_DAILY',
api_key = '',
outputsize = 'compact',
... | {"/analyse_stock_data.py": ["/retrieve_stock_data.py"]} |
34,436 | JamesLaw86/finance_tools | refs/heads/master | /old/analysis_methods.py | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 14 18:20:17 2018
@author: James
"""
import numpy as np
import matplotlib.pyplot as plt
def percent_match(col = 'adjusted close', df = None,
window = 5, offset = 0):
"""
Get the trend of the last 10 days.
Compare against the last X years o... | {"/analyse_stock_data.py": ["/retrieve_stock_data.py"]} |
34,437 | JamesLaw86/finance_tools | refs/heads/master | /old/analyse.py | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 14 18:21:00 2018
@author: James
"""
import data_requests
import analysis_methods
df = data_requests.make_request('^FTSE', 'TIME_SERIES_DAILY_ADJUSTED',
outputsize = 'full')
s = analysis_methods.percent_match('D' , df = df, offset = -5)
... | {"/analyse_stock_data.py": ["/retrieve_stock_data.py"]} |
34,438 | JamesLaw86/finance_tools | refs/heads/master | /retrieve_stock_data.py | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 27 14:03:15 2021
@author: james
"""
#stocks available: https://globefunder.com/revolut-stocks-list/
import yfinance as yf
import datetime
import shelve
import re
from dataclasses import dataclass
@dataclass
class stock:
"""Class to represent a particular company"""... | {"/analyse_stock_data.py": ["/retrieve_stock_data.py"]} |
34,439 | JamesLaw86/finance_tools | refs/heads/master | /analyse_stock_data.py | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 27 14:03:15 2021
@author: james
"""
import retrieve_stock_data as rsd
import numpy as np
def get_biggest_changes(dfs, days = -1):
"""
Get the stocks that have changed the most in the given timeframe
based on the average over the given period.
Note wer'e... | {"/analyse_stock_data.py": ["/retrieve_stock_data.py"]} |
34,442 | evertismael/mpu6050-visualizer | refs/heads/main | /0020_stream_to_file.py | #!/usr/bin/python
import smbus
import numpy as np
import helpers as helpers
import time
import pickle
# Register
power_mgmt_1 = 0x6b
power_mgmt_2 = 0x6c
def read_byte(reg):
return bus.read_byte_data(address, reg)
def read_word(reg):
h = bus.read_byte_data(address, reg)
l = bus.read_byte... | {"/0020_stream_to_file.py": ["/helpers.py"], "/0038_display_offline.py": ["/helpers.py", "/filters.py"], "/0010_test_raspy_mpu6050_console.py": ["/helpers.py"], "/0030_recover_from_file.py": ["/helpers.py"], "/0035_batch_offline_processing.py": ["/helpers.py", "/filters.py"]} |
34,443 | evertismael/mpu6050-visualizer | refs/heads/main | /test.py | # TODO:
# Stream to a file, and plot the raw data in degrees and rad/sec
import time
import pickle
import numpy as np
roll = 1.4
pitch = 2.3
yaw = 3.0
measurement = np.zeros((10,))
measurement[1:4] = np.array([roll, pitch, yaw])
measurement[4:7] = np.array([roll, pitch, yaw])
measurement[7:10... | {"/0020_stream_to_file.py": ["/helpers.py"], "/0038_display_offline.py": ["/helpers.py", "/filters.py"], "/0010_test_raspy_mpu6050_console.py": ["/helpers.py"], "/0030_recover_from_file.py": ["/helpers.py"], "/0035_batch_offline_processing.py": ["/helpers.py", "/filters.py"]} |
34,444 | evertismael/mpu6050-visualizer | refs/heads/main | /0038_display_offline.py | import numpy as np
import pickle
import matplotlib
import tkinter as tk
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
from matplotlib.figure import Figure
import matplotlib.animation as animation
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import style
import... | {"/0020_stream_to_file.py": ["/helpers.py"], "/0038_display_offline.py": ["/helpers.py", "/filters.py"], "/0010_test_raspy_mpu6050_console.py": ["/helpers.py"], "/0030_recover_from_file.py": ["/helpers.py"], "/0035_batch_offline_processing.py": ["/helpers.py", "/filters.py"]} |
34,445 | evertismael/mpu6050-visualizer | refs/heads/main | /filters.py | import numpy as np
class ComplementaryFilter:
def __init__(self, x_0, w_0=np.zeros((3, 1)), alpha=0.9):
self.x = x_0 # initial State
self.x_0 = x_0 # just a copy for memory
self.w_0 = w_0 # initial gyro angular value (to remove since we assume it's static)
se... | {"/0020_stream_to_file.py": ["/helpers.py"], "/0038_display_offline.py": ["/helpers.py", "/filters.py"], "/0010_test_raspy_mpu6050_console.py": ["/helpers.py"], "/0030_recover_from_file.py": ["/helpers.py"], "/0035_batch_offline_processing.py": ["/helpers.py", "/filters.py"]} |
34,446 | evertismael/mpu6050-visualizer | refs/heads/main | /0010_test_raspy_mpu6050_console.py | #!/usr/bin/python
import smbus
import numpy as np
import helpers as helpers
import time
# source: https://tutorials-raspberrypi.com/measuring-rotation-and-acceleration-raspberry-pi/
# Register
power_mgmt_1 = 0x6b
power_mgmt_2 = 0x6c
def read_byte(reg):
return bus.read_byte_data(address, reg)
de... | {"/0020_stream_to_file.py": ["/helpers.py"], "/0038_display_offline.py": ["/helpers.py", "/filters.py"], "/0010_test_raspy_mpu6050_console.py": ["/helpers.py"], "/0030_recover_from_file.py": ["/helpers.py"], "/0035_batch_offline_processing.py": ["/helpers.py", "/filters.py"]} |
34,447 | evertismael/mpu6050-visualizer | refs/heads/main | /helpers.py | #!/usr/bin/python
import math
import numpy as np
import os
def dist(a, b):
return math.sqrt((a * a) + (b * b))
def get_roll_pitch_yaw(x, y, z, factor=1):
roll = np.arctan2(x, np.sqrt(y ** 2 + z ** 2)) * factor
pitch = np.arctan2(y, np.sqrt(x ** 2 + z ** 2)) * factor
yaw = np.arctan2(np.... | {"/0020_stream_to_file.py": ["/helpers.py"], "/0038_display_offline.py": ["/helpers.py", "/filters.py"], "/0010_test_raspy_mpu6050_console.py": ["/helpers.py"], "/0030_recover_from_file.py": ["/helpers.py"], "/0035_batch_offline_processing.py": ["/helpers.py", "/filters.py"]} |
34,448 | evertismael/mpu6050-visualizer | refs/heads/main | /0030_recover_from_file.py | import numpy as np
import matplotlib.pyplot as plt
import helpers as helpers
# --------------------------------------------------------------------------------------------------------------------
# Read the File / Load data:
# --------------------------------------------------------------------------------------... | {"/0020_stream_to_file.py": ["/helpers.py"], "/0038_display_offline.py": ["/helpers.py", "/filters.py"], "/0010_test_raspy_mpu6050_console.py": ["/helpers.py"], "/0030_recover_from_file.py": ["/helpers.py"], "/0035_batch_offline_processing.py": ["/helpers.py", "/filters.py"]} |
34,449 | evertismael/mpu6050-visualizer | refs/heads/main | /0035_batch_offline_processing.py | import numpy as np
import matplotlib.pyplot as plt
import helpers as helpers
import filters as filters
# --------------------------------------------------------------------------------------------------------------------
# Read the File / Load data:
# ---------------------------------------------------------... | {"/0020_stream_to_file.py": ["/helpers.py"], "/0038_display_offline.py": ["/helpers.py", "/filters.py"], "/0010_test_raspy_mpu6050_console.py": ["/helpers.py"], "/0030_recover_from_file.py": ["/helpers.py"], "/0035_batch_offline_processing.py": ["/helpers.py", "/filters.py"]} |
34,456 | pcie-bench/pcie-model | refs/heads/master | /model/eth.py | ## Copyright (C) 2015-2018 Rolf Neugebauer. All rights reserved.
## Copyright (C) 2015 Netronome Systems, Inc. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##... | {"/model/util.py": ["/model/__init__.py"], "/model/mem_bw.py": ["/model/__init__.py"], "/model/niantic.py": ["/model/__init__.py"], "/nic_bw.py": ["/model/__init__.py"], "/model/simple_nic.py": ["/model/__init__.py"], "/pcie_bw.py": ["/model/__init__.py"]} |
34,457 | pcie-bench/pcie-model | refs/heads/master | /model/util.py | ## Copyright (C) 2015-2018 Rolf Neugebauer. All rights reserved.
## Copyright (C) 2015 Netronome Systems, Inc. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##... | {"/model/util.py": ["/model/__init__.py"], "/model/mem_bw.py": ["/model/__init__.py"], "/model/niantic.py": ["/model/__init__.py"], "/nic_bw.py": ["/model/__init__.py"], "/model/simple_nic.py": ["/model/__init__.py"], "/pcie_bw.py": ["/model/__init__.py"]} |
34,458 | pcie-bench/pcie-model | refs/heads/master | /model/mem_bw.py | ## Copyright (C) 2015-2018 Rolf Neugebauer. All rights reserved.
## Copyright (C) 2015 Netronome Systems, Inc. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##... | {"/model/util.py": ["/model/__init__.py"], "/model/mem_bw.py": ["/model/__init__.py"], "/model/niantic.py": ["/model/__init__.py"], "/nic_bw.py": ["/model/__init__.py"], "/model/simple_nic.py": ["/model/__init__.py"], "/pcie_bw.py": ["/model/__init__.py"]} |
34,459 | pcie-bench/pcie-model | refs/heads/master | /model/niantic.py | ## Copyright (C) 2015-2018 Rolf Neugebauer. All rights reserved.
## Copyright (C) 2015 Netronome Systems, Inc. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##... | {"/model/util.py": ["/model/__init__.py"], "/model/mem_bw.py": ["/model/__init__.py"], "/model/niantic.py": ["/model/__init__.py"], "/nic_bw.py": ["/model/__init__.py"], "/model/simple_nic.py": ["/model/__init__.py"], "/pcie_bw.py": ["/model/__init__.py"]} |
34,460 | pcie-bench/pcie-model | refs/heads/master | /nic_bw.py | #! /usr/bin/env python3
#
## Copyright (C) 2015-2018 Rolf Neugebauer. All rights reserved.
## Copyright (C) 2015 Netronome Systems, Inc. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a co... | {"/model/util.py": ["/model/__init__.py"], "/model/mem_bw.py": ["/model/__init__.py"], "/model/niantic.py": ["/model/__init__.py"], "/nic_bw.py": ["/model/__init__.py"], "/model/simple_nic.py": ["/model/__init__.py"], "/pcie_bw.py": ["/model/__init__.py"]} |
34,461 | pcie-bench/pcie-model | refs/heads/master | /model/pcie.py | ## Copyright (C) 2018 Rolf Neugebauer. All rights reserved.
## Copyright (C) 2015 Netronome Systems, Inc. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## ht... | {"/model/util.py": ["/model/__init__.py"], "/model/mem_bw.py": ["/model/__init__.py"], "/model/niantic.py": ["/model/__init__.py"], "/nic_bw.py": ["/model/__init__.py"], "/model/simple_nic.py": ["/model/__init__.py"], "/pcie_bw.py": ["/model/__init__.py"]} |
34,462 | pcie-bench/pcie-model | refs/heads/master | /model/__init__.py | __all__ = [
"eth",
"mem_bw",
"niantic",
"pcie",
"simple_nic",
]
| {"/model/util.py": ["/model/__init__.py"], "/model/mem_bw.py": ["/model/__init__.py"], "/model/niantic.py": ["/model/__init__.py"], "/nic_bw.py": ["/model/__init__.py"], "/model/simple_nic.py": ["/model/__init__.py"], "/pcie_bw.py": ["/model/__init__.py"]} |
34,463 | pcie-bench/pcie-model | refs/heads/master | /model/simple_nic.py | ## Copyright (C) 2015-2018 Rolf Neugebauer. All rights reserved.
## Copyright (C) 2015 Netronome Systems, Inc. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##... | {"/model/util.py": ["/model/__init__.py"], "/model/mem_bw.py": ["/model/__init__.py"], "/model/niantic.py": ["/model/__init__.py"], "/nic_bw.py": ["/model/__init__.py"], "/model/simple_nic.py": ["/model/__init__.py"], "/pcie_bw.py": ["/model/__init__.py"]} |
34,464 | pcie-bench/pcie-model | refs/heads/master | /pcie_bw.py | #! /usr/bin/env python3
#
## Copyright (C) 2015-2018 Rolf Neugebauer. All rights reserved.
## Copyright (C) 2015 Netronome Systems, Inc. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a co... | {"/model/util.py": ["/model/__init__.py"], "/model/mem_bw.py": ["/model/__init__.py"], "/model/niantic.py": ["/model/__init__.py"], "/nic_bw.py": ["/model/__init__.py"], "/model/simple_nic.py": ["/model/__init__.py"], "/pcie_bw.py": ["/model/__init__.py"]} |
34,465 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Resources/resource_students.py | from Base.base_tools import BaseTools
class ResourceStudent(BaseTools):
# 学生查询所有
def resource_get_student_all(self):
pass
# 学生查询 指定
def resource_get_student_one(self):
pass
# 学生查询 list
def resource_get_student_list(self):
pass
# 学生查询 模糊
def resource_get_student_p... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,466 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Resources/__init__.py | # 服务器ip和端口号
server_port="http://127.0.0.1:8000/api/departments/"
"""
学院信息:
"""
# 查询学院所有
depart_url_all=server_port | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,467 | LGY2008/Restful_Depart_Interface | refs/heads/master | /TestJB/test01.py | import json
import requests
# 查询学院所有
# str=requests.get('http://127.0.0.1:8000/api/departments/')
# # 断言状态码是否为200
# print("获取状态码:",str.status_code)
# print("获取的json值为:",str.json())
# 查询学院指定
# str=requests.get(url='http://127.0.0.1:8000/api/departments/T03/')
#
# print(str.status_code)
# print(str.url)
# dec={'dep_i... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,468 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Base/write_yaml.py | import yaml
data={
"data": [
{
"dep_id":"T01",
"dep_name":"Test学院",
"master_name":"Test-Master",
"slogan":"Here is Slogan"
}
]... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,469 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Resources/resource_depart.py | import json
from Base.base_tools import BaseTools
import Resources
class ResourceDepart(BaseTools):
# 拼接url 封装
def resource_condition(self,condition=None,id=None):
if condition is not None:
url=Resources.depart_url_all+"?"+condition
return self.get_method( url )
elif id ... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,470 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Base/base_tools.py | import json
import requests
class BaseTools():
# 获取结果
def get_result(self,str):
"""
:param str: 服务器响应结果
:return: 返回字典格式 键名内容:url、status、json、text、headers
"""
result={}
# 请求rul
result['url']=str.url
# 服务器响应HTTP状态码
result['status']=str.status... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,471 | LGY2008/Restful_Depart_Interface | refs/heads/master | /TestJB/test03.py | #encoding=utf-8
import json
import requests
# 查询所有学院
url="http://127.0.0.1:8000/api/departments/"
# 调用GET请求
# response=requests.get(url)
# 以text形式获取结果
# result=response.json()
# print(result)
# code=response.status_code
# print(code)
# response.raise_for_status()
# print(response.content)
# print(response.url)
# print... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,472 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Base/read_yml_test.py | import yaml,os,sys
sys.path.append(os.getcwd())
class ReadYaml():
# def __init__(self,file_name):
# self.file_name=os.getcwd()+os.sep+"Data"+os.sep+file_name
#
# def read_yaml(self):
# with open(self.file_name,"r",encoding="utf-8") as f:
# return yaml.load(f)
def read_yaml1(... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,473 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Resources/resource_in.py | from Resources.resource_classes import ResourceClass
from Resources.resource_depart import ResourceDepart
from Resources.resource_students import ResourceStudent
class ResourceIn():
# 学院统一入口类
def get_depart(self):
return ResourceDepart()
# 班级统一入口类
def get_class(self):
return ResourceClas... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,474 | LGY2008/Restful_Depart_Interface | refs/heads/master | /TestJB/test07_PUT.py | import json
import requests
# 定义url
url="http://127.0.0.1:8000/api/departments/T0111/"
# 定义报文
data={
"data": [
{
"dep_id": "T0111",
"dep_name": "Test学院updata",
"master_name": "Test-Master",
... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,475 | LGY2008/Restful_Depart_Interface | refs/heads/master | /TestJB/test05.py | from time import sleep
from selenium.webdriver.common.action_chains import ActionChains
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver=webdriver.Firefox()
url="file:///E:/%E8%AF%BE%E5%A0%82/WebDriver/%E6%B3%A8%E5%86%8CA.html"
driver.get(url)
username=driver.find_element_by_xpath... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,476 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Base/read_yml.py | import yaml,os
class ReadYaml():
def __init__(self,file_name):
self.file_name=os.getcwd()+os.sep+"Data"+os.sep+file_name
def read_yaml(self):
with open(self.file_name,"r",encoding="utf-8") as f:
return yaml.load(f)
| {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,477 | LGY2008/Restful_Depart_Interface | refs/heads/master | /TestJB/test07_DELETE.py | import requests
# 定义url
url="http://127.0.0.1:8000/api/departments/Test_0111/"
# 请求
r=requests.delete(url)
# 获取响应状态码
print(r.status_code)
# 以文本形式获取响应数据
print(r.text) | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,478 | LGY2008/Restful_Depart_Interface | refs/heads/master | /TestJB/test02.py | import requests,urllib3
# http=urllib3.PoolManager()
# h=http.request("GET","http://www.baidu.com")
# print(h.status)
# print(h.data)
r=requests.get("http://www.baidu.com")
print(type(r.content)) | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,479 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Scripts/test_depart.py | import os,sys
import pytest
sys.path.append(os.getcwd())
from Resources.resource_in import ResourceIn
from Base.read_yml import ReadYaml
# 读取数据 格式封装
def get_data(method):
if method=="get":
return ReadYaml("depart_data.yml").read_yaml().get("text_depart_get_all")
elif method=="post":
return Rea... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,480 | LGY2008/Restful_Depart_Interface | refs/heads/master | /TestJB/test06_POST.py | import json
import unittest
import requests
class Test01(unittest.TestCase):
def test001(self):
# 定义url
url="http://127.0.0.1:8000/api/departments/"
# 定义报文
data={
"data": [
{
"dep_id": "T0111",
... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,481 | LGY2008/Restful_Depart_Interface | refs/heads/master | /TestJB/test04.py | from time import sleep
import time
import sys
from selenium import webdriver
import unittest
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
class test01(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.dri... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,482 | LGY2008/Restful_Depart_Interface | refs/heads/master | /Resources/resource_classes.py | from Base.base_tools import BaseTools
class ResourceClass(BaseTools):
# 班级查询所有
def resource_get_class_all(self):
pass
# 班级查询 指定
def resource_get_class_one(self):
pass
# 班级查询 list
def resource_get_class_list(self):
pass
# 班级查询 模糊
def resource_get_class_partial(sel... | {"/Resources/resource_students.py": ["/Base/base_tools.py"], "/Resources/resource_depart.py": ["/Base/base_tools.py", "/Resources/__init__.py"], "/Resources/resource_in.py": ["/Resources/resource_classes.py", "/Resources/resource_depart.py", "/Resources/resource_students.py"], "/Scripts/test_depart.py": ["/Resources/re... |
34,483 | grateful-dead-live/recordings_alignment | refs/heads/master | /prepare.py | import os, json, re
import networkx as nx
from networkx.drawing.nx_agraph import read_dot
from copy import copy
from collections import Counter
from subprocess import Popen, DEVNULL, PIPE
from pprint import pprint
from internetarchive import get_item
import pickle, sys
#DATE = '90-03-14'
#FOLDER = '/Volumes/gspeed1/t... | {"/align1.py": ["/prepare.py"]} |
34,484 | grateful-dead-live/recordings_alignment | refs/heads/master | /align1.py | from prepare import prepare_data
import json, sys, os
from collections import Counter
from pprint import pprint
from scipy import stats
import numpy as np
from copy import copy
from pprint import pprint
from scipy import stats
import matplotlib.pyplot as plt
from meta_alignment_test import plot_timelines
#DATE = sys.... | {"/align1.py": ["/prepare.py"]} |
34,492 | msheroubi/AnalogClockReader | refs/heads/master | /MS_ClockReader.py | import numpy as np
import cv2
import math
from PIL import ImageGrab
import time
from skimage.transform import (hough_line, hough_line_peaks,
probabilistic_hough_line)
from skimage.feature import canny
from skimage import data
"""
==============================================... | {"/clockTest.py": ["/MS_ClockReader.py"]} |
34,493 | msheroubi/AnalogClockReader | refs/heads/master | /clockTest.py | import MS_ClockReader
import importlib
import time
'''
=========================================================================
CLOCK TEST FILE-this test file is not a 100% accurate in its FALSE (X) readings,
for false readings, if you run the main file (MS_ClockReader)
with the image that failed, asi... | {"/clockTest.py": ["/MS_ClockReader.py"]} |
34,502 | adwalkz/DjangoDataAnalysis | refs/heads/main | /client/models.py | from django.db import models
from ts.models import Clients
class SurveyQuestion(models.Model):
QTYPES = ((1, 'TEXT'), (2, 'CHOICE'))
company_id = models.ForeignKey(Clients, on_delete=models.CASCADE)
ques_id = models.AutoField(primary_key=True)
ques_category = models.CharField(default="GENERAL", max_l... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,503 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/views.py | from django.shortcuts import render
from django.views import generic
from .models import Clients
class indexView(generic.ListView):
"""
Handle index page request.
"""
template_name = 'ts/index.html'
context_object_name = 'latest_survey_list'
def get_queryset(self):
return Clients.obje... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,504 | adwalkz/DjangoDataAnalysis | refs/heads/main | /client/migrations/0006_surveyquestion_ques_category.py | # Generated by Django 3.1 on 2021-07-10 05:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('client', '0005_remove_surveyquestion_ques_category'),
]
operations = [
migrations.AddField(
model_name='surveyquestion',
... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,505 | adwalkz/DjangoDataAnalysis | refs/heads/main | /client/urls.py | from django.urls import path
from . import views
app_name = "client"
urlpatterns = [
path('<int:pk>/', views.index, name='index'),
path('<int:pk>/survey/', views.survey, name='survey'),
path('<int:pk>/save/', views.save, name='save'),
path('<int:pk>/feedback/', views.feedback, name='fe... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,506 | adwalkz/DjangoDataAnalysis | refs/heads/main | /client/migrations/0003_auto_20210708_2332.py | # Generated by Django 3.1 on 2021-07-08 23:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('client', '0002_auto_20210702_1731'),
]
operations = [
migrations.AlterField(
model_name='surveyquestion',
name='ques_t... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,507 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/admin.py | from django.contrib import admin
from .models import Clients
admin.site.register(Clients)
| {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,508 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/migrations/0005_auto_20210625_1054.py | # Generated by Django 3.1 on 2021-06-25 10:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ts', '0004_auto_20210625_1053'),
]
operations = [
migrations.AlterField(
model_name='clients',
name='status',
... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,509 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/migrations/0006_auto_20210625_1055.py | # Generated by Django 3.1 on 2021-06-25 10:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ts', '0005_auto_20210625_1054'),
]
operations = [
migrations.AlterField(
model_name='clients',
name='company_id',
... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,510 | adwalkz/DjangoDataAnalysis | refs/heads/main | /client/migrations/0009_auto_20210710_1349.py | # Generated by Django 3.1 on 2021-07-10 13:49
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ts', '0012_auto_20210701_1820'),
('client', '0008_syrveyresponse'),
]
operations = [
migrations.RenameModel(
old_name='SyrveyRespo... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,511 | adwalkz/DjangoDataAnalysis | refs/heads/main | /client/admin.py | from django.contrib import admin
from .models import SurveyQuestion, SurveyQuestionChoice
admin.site.register(SurveyQuestion)
admin.site.register(SurveyQuestionChoice)
| {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,512 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/migrations/0007_auto_20210625_1133.py | # Generated by Django 3.1 on 2021-06-25 11:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ts', '0006_auto_20210625_1055'),
]
operations = [
migrations.RenameField(
model_name='clients',
old_name='name',
n... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,513 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/apps.py | from django.apps import AppConfig
class TsConfig(AppConfig):
name = 'ts'
| {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,514 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/migrations/0012_auto_20210701_1820.py | # Generated by Django 3.1 on 2021-07-01 18:20
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ts', '0011_auto_20210628_1647'),
]
operations = [
migrations.RemoveField(
model_name='surveyquestionchoice',
name='company_id'... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,515 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/migrations/0010_auto_20210625_1222.py | # Generated by Django 3.1 on 2021-06-25 12:22
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ts', '0009_auto_20210625_1208'),
]
operations = [
migrations.AlterField(
model_name='surveyquesti... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,516 | adwalkz/DjangoDataAnalysis | refs/heads/main | /client/migrations/0001_initial.py | # Generated by Django 3.1 on 2021-07-01 18:20
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('ts', '0012_auto_20210701_1820'),
]
operations = [
migrations.CreateModel(
nam... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,517 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/migrations/0011_auto_20210628_1647.py | # Generated by Django 3.1 on 2021-06-28 16:47
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ts', '0010_auto_20210625_1222'),
]
operations = [
migrations.AlterModelOptions(
name='clients',
options={'verbose_name_plural'... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,518 | adwalkz/DjangoDataAnalysis | refs/heads/main | /client/views.py | from django.shortcuts import render, get_object_or_404, get_list_or_404
from django.db.models import Count, Avg, Max, Min
from ts.models import *
from .models import SurveyQuestion, SurveyQuestionChoice, SurveyResponse
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from fpdf import FPDF
cl... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,519 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/migrations/0004_auto_20210625_1053.py | # Generated by Django 3.1 on 2021-06-25 10:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ts', '0003_auto_20210625_1052'),
]
operations = [
migrations.RenameField(
model_name='clients',
old_name='client_name',
... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,520 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/migrations/0002_auto_20210625_1050.py | # Generated by Django 3.1 on 2021-06-25 10:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ts', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='clients',
old_name='client_name',
... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,521 | adwalkz/DjangoDataAnalysis | refs/heads/main | /client/migrations/0002_auto_20210702_1731.py | # Generated by Django 3.1 on 2021-07-02 17:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('client', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='surveyquestion',
name='ques_type',
... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,522 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/models.py | from django.db import models
class Clients(models.Model):
company_id = models.AutoField(primary_key=True)
client_name = models.CharField(max_length=100)
survey_start_date = models.DateTimeField()
status = models.IntegerField(default=1)
class Meta:
verbose_name_plural = "Clients"
... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,523 | adwalkz/DjangoDataAnalysis | refs/heads/main | /ts/migrations/0009_auto_20210625_1208.py | # Generated by Django 3.1 on 2021-06-25 12:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ts', '0008_surveyquestion_surveyquestionchoice'),
]
operations = [
migrations.AlterField(
model_name='surveyquestion',
... | {"/client/models.py": ["/ts/models.py"], "/ts/views.py": ["/ts/models.py"], "/ts/admin.py": ["/ts/models.py"], "/client/admin.py": ["/client/models.py"], "/client/views.py": ["/ts/models.py", "/client/models.py"]} |
34,524 | yhtps237/ostendit | refs/heads/master | /shows/migrations/0006_auto_20200527_0939.py | # Generated by Django 2.2.1 on 2020-05-27 05:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shows', '0005_auto_20200525_1600'),
]
operations = [
migrations.AlterField(
model_name='shows',
name='title',
... | {"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls.... |
34,525 | yhtps237/ostendit | refs/heads/master | /shows/models.py | from django.db import models
from django.conf import settings
from django.utils import timezone
from django.db.models import Q
# Create your models here.
User = settings.AUTH_USER_MODEL
class ShowsGetQuerySet(models.QuerySet):
def published(self):
now = timezone.now()
return self.filter(published... | {"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.