index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
43,666
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/migrations/0005_auto_20180810_0215.py
# Generated by Django 2.0.7 on 2018-08-09 20:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('infinityroom', '0004_auto_20180810_0152'), ] operations = [ migrations.AlterField( model_name='globalvars', name='tc...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,667
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/migrations/0008_auto_20180819_2151.py
# Generated by Django 2.1 on 2018-08-19 16:21 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('infinityroom', '0007_auto_20180819_1953'), ] operations = [ migrations.AlterField( model_name='settings', name='sys_ip...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,668
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/migrations/0004_auto_20180810_0152.py
# Generated by Django 2.0.7 on 2018-08-09 20:22 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('infinityroom', '0003_auto_20180808_0025'), ] operations = [ migrations.RenameField( model_name='globalvars', old_name='tcp',...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,669
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/migrations/0002_auto_20180807_2251.py
# Generated by Django 2.0.7 on 2018-08-07 17:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('infinityroom', '0001_initial'), ] operations = [ migrations.RenameField( model_name='ledthemes', old_name='themeOption', ...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,670
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/models.py
from django.db import models import json # Create your models here. class LEDThemes(models.Model): themeName = models.CharField(max_length=100) themeId = models.IntegerField() #Order in which it will be displayed themeSNo = models.IntegerField() #type - Where to calculate the effects (Node MCU - 0 ...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,671
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/send_to_esp.py
############################################################################### # Communication Standrad & Protocol # # 1) Receive '>>' for every data sent as acknowladge # 2) Send '\r' in the end of every chunk of data # # Command information # A - Apply theme # B 123 - Brightness # C 1234567 - Color # L 1...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,672
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/migrations/0006_auto_20180815_1606.py
# Generated by Django 2.1 on 2018-08-15 10:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('infinityroom', '0005_auto_20180810_0215'), ] operations = [ migrations.AddField( model_name='ledthemes', name='themeSp...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,673
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/migrations/0010_auto_20180902_0730.py
# Generated by Django 2.0.7 on 2018-09-02 02:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('infinityroom', '0009_device_devgrp_db'), ] operations = [ migrations.AlterField( model_name='device', name='devGrp_d...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,674
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/apps.py
from django.apps import AppConfig #from infinityroom.models import GlobalVars class InfinityroomConfig(AppConfig): name = 'infinityroom' def ready(self): print('shaeed khan') #g = GlobalVars.objects.all() #for a in g: # a.delete()
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,675
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/__init__.py
default_app_config = 'infinityroom.apps.InfinityroomConfig'
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,676
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/migrations/0009_device_devgrp_db.py
# Generated by Django 2.0.7 on 2018-09-02 01:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('infinityroom', '0008_auto_20180819_2151'), ] operations = [ migrations.AddField( model_name='device', name='devGrp_d...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,677
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/migrations/0007_auto_20180819_1953.py
# Generated by Django 2.1 on 2018-08-19 14:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('infinityroom', '0006_auto_20180815_1606'), ] operations = [ migrations.CreateModel( name='Device', fields=[ ...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,678
shaeed/ArtStudio
refs/heads/master
/artstdweb/artstdweb/constants.py
# -*- coding: utf-8 -*- #Infinity room name class const: #Hardware names (Will be returned from the NodeMCU) infRoom = 'InfinityRoom' #Devices type DEV_IR = 'ir' #Infinity room 2812b leds DEV_LED = 'led' DEV_FAN = 'fan' DEV_OUTLET = 'outlet' #Target types (URL on which data wi...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,679
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/connect_to_controllers.py
import requests import socket from artstdweb.constants import const from infinityroom.models import Settings class GetIP: def getAdr(target): ip = '' sett = Settings.objects.all() if(len(sett) < 1): #Database is empty #This will be executed only once ctc ...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,680
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/urls.py
# -*- coding: utf-8 -*- from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^install$', views.install, name='install'), url(r'^theme$', views.changeTheme, name='changeTheme'), url(r'^device$', views.changeDevice, name='change...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,681
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/views.py
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from infinityroom.process_request import ProcessRequest as pr # Create your views here. def index(req): status, data = pr.home(req) if(status): #return render(req, 'inf_control.html', data) return re...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,682
shaeed/ArtStudio
refs/heads/master
/artstdweb/infinityroom/process_request.py
# -*- coding: utf-8 -*- from infinityroom.install import createThemes from infinityroom.models import LEDThemes, Device from infinityroom.send_to_controllers import sendToControllers from artstdweb.constants import const class ProcessRequest: def home(req = None): #Get all the available themes the...
{"/artstdweb/infinityroom/urls.py": ["/artstdweb/infinityroom/__init__.py"]}
43,701
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestPage.py
from cefpython3 import cefpython as cef import re, os, platform import sys import json from threading import Thread from subprocess import Popen, PIPE from urllib.parse import urlparse def get_python_path(): return os.path.split(os.path.abspath(os.path.dirname(os.__file__)))[ 0] + "/pyth...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,702
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0/kam1n0-resources/bin/ExtractBinaryViaIDA.py
# ******************************************************************************* # * Copyright 2017 McGill University 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 L...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,703
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py
# ******************************************************************************* # * Copyright 2017 McGill University 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 ...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,704
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0/kam1n0-commons/src/main/resources/ExtractBinaryViaIDA.py
# ******************************************************************************* # * Copyright 2017 McGill University 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 L...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,705
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/IDAUtils.py
# ******************************************************************************* # * Copyright 2017 McGill University 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 L...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,706
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0/kam1n0-symbolic/scripts/generate2.py
#!/usr/bin/env python import json from json import JSONEncoder ################## ### x86* data ### ################## data = { 'AMD64': { 'CondTypes': { }, 'CondBitOffsets': { }, 'CondBitMasks': { }, 'OpTypes': { } }, 'X86': { 'CondTypes': { }, ...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,707
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0/kam1n0-resources/bin/pr.py
import argparse import os import numpy as np from tqdm import tqdm from joblib import Parallel, delayed from sklearn.cluster import KMeans import numpy as np import sys def get_func_call(fcallpath): f = open(fcallpath,'r') lines = f.readlines() lines = [line.strip() for line in lines] f.close() all...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,708
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0/kam1n0-resources/bin/iffnn.py
import torch import torch.nn as nn from collections import OrderedDict import json import numpy as np import argparse import os class IFFNN_MulCls(nn.Module): def __init__(self, input_size, hidden_sizes, num_classes,use_last_param=True,use_dropout=False, act_func = 'relu'): super(IFFNN_MulCls, self).__i...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,709
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py
import urllib.request, urllib.error, urllib.parse import urllib.request, urllib.parse, urllib.error import http.cookiejar from . import RequestPage from threading import Thread from urllib.parse import urlparse from urllib.parse import urlsplit, urlunsplit ERROR_CONNECTION = 2 ERROR_LOGIN = 1 ERROR_HTTP = 3 ...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,710
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-builds/windows/installer-src-32-64/libs-client/get-pip.py
#!/usr/bin/env python # # Hi There! # # You may be wondering what this giant blob of binary data here is, you might # even be worried that we're up to something nefarious (good for you for being # paranoid!). This is a base85 encoding of a zip file, this zip file contains # an entire copy of pip (version 21.1). # # Pip...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,711
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/Manager.py
#!/usr/bin/env python # # ******************************************************************************* # * Copyright 2017 McGill University 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. # *...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,712
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/forms/IndexForClassificationSelectionForm.py
# ******************************************************************************* # * Copyright 2017 McGill University 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 L...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,713
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/Plugin.py
# ******************************************************************************* # * Copyright 2017 McGill University 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 ...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,714
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py
# ******************************************************************************* # * Copyright 2017 McGill University 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 ...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,715
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionForm.py
# ******************************************************************************* # * Copyright 2017 McGill University 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 ...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,716
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin/Kam1n0/forms/SelectionForm.py
# ******************************************************************************* # * Copyright 2017 McGill University 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 ...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,717
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0/gen_arch_def.py
from idautils import * from idaapi import * from idc import * from collections import defaultdict import xml.etree.cElementTree as ET info = get_inf_structure() registers = set(GetRegisterList()) instructions = set(GetInstructionList()) suffix_groups = set() instructions_branching = set() instruction_to_groups = defau...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,718
McGill-DMaS/Kam1n0-Community
refs/heads/master2.x
/kam1n0-clients/ida-plugin-tester.py
from Kam1n0.Manager import Kam1n0PluginManager from Kam1n0 import IDAUtils as ut import idaapi import idc print('Kam1n0 testing script for idapro is now running...') print('Waiting for idapro...') idaapi.auto_wait() print('Testing every callback functions provided by the connector.') def get_mgr(): pri...
{"/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/RequestMini.py"], "/kam1n0-clients/ida-plugin/Kam1n0/Manager.py": ["/kam1n0-clients/ida-plugin/Kam1n0/utilities/CloneConnector.py", "/kam1n0-clients/ida-plugin/Kam1n0/forms/ConnectionManagementForm.py", "/kam...
43,733
Colin-Cai-Uni/skynet_part2
refs/heads/master
/master_sign.py
import os #import time from Crypto.Signature import PKCS1_PSS from Crypto.Hash import SHA384 from Crypto.PublicKey import RSA def sign_file(f): # The commented out code below makes the function prepend an expiry timestamp # messages are considered invalid past their expiry time # the lifespan value of 60 i...
{"/lib/comms.py": ["/dh/__init__.py"]}
43,734
Colin-Cai-Uni/skynet_part2
refs/heads/master
/master_view.py
import os from Crypto.Cipher import PKCS1_OAEP from Crypto.PublicKey import RSA def decrypt_valuables(f): # The file is encrypted by the RSAES-OAEP encryption scheme of PKCS 1 # with a 3072-bit public key generated by ssh # Decrypt the file using the private key key = RSA.importKey(open('skynet_encrypt...
{"/lib/comms.py": ["/dh/__init__.py"]}
43,735
Colin-Cai-Uni/skynet_part2
refs/heads/master
/lib/comms.py
import struct from Crypto.Cipher import AES from Crypto.Random.Fortuna import FortunaGenerator from Crypto.Hash import HMAC from Crypto.Hash import SHA384 from dh import create_dh_key, calculate_dh_secret class StealthConn(object): def __init__(self, conn, client=False, server=False, verbose=False): self....
{"/lib/comms.py": ["/dh/__init__.py"]}
43,736
Colin-Cai-Uni/skynet_part2
refs/heads/master
/dh/__init__.py
from Crypto.Hash import SHA256 from Crypto.Random import random from lib.helpers import read_hex # 3072 bit safe prime for Diffie-Hellman key exchange # obtained from RFC 3526 raw_prime = """FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B 3...
{"/lib/comms.py": ["/dh/__init__.py"]}
43,737
Colin-Cai-Uni/skynet_part2
refs/heads/master
/lib/files.py
import os #import time from Crypto.Signature import PKCS1_PSS from Crypto.Hash import SHA384 from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_OAEP # Encryption key encryption_key = """ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDJaeX+ EdvX3omyJDM8KmXMuOZFTrkwSRse8NENc7Jjygz/KbmyeGPa+GdKlGWAuO4Waxz7 Wu5KjVNz/...
{"/lib/comms.py": ["/dh/__init__.py"]}
43,742
msuriar/ipv6
refs/heads/master
/ipv6_test.py
#!/usr/bin/env python from ipv6 import * import unittest class BadAddress(unittest.TestCase): def test_bad_characters(self): badInputs = ('123.456.789', '2001:/', 'ghi') for s in badInputs: self.assertFalse(IPv6Prefix.check_characters(s)) def test_invalid_abbreviation(self): badInputs = ('2001:...
{"/ipv6_test.py": ["/ipv6.py"]}
43,743
msuriar/ipv6
refs/heads/master
/ipv6.py
#!/usr/bin/env python """IPv6 utility module. Toy utility I wrote to get my head around TDD with python. If you actually want to do serious heavy lifting with IP addresses, use the ipaddr module here: http://code.google.com/p/ipaddr-py/ """ import doctest import re class Error(Exception): """Base error class."""...
{"/ipv6_test.py": ["/ipv6.py"]}
43,775
powerplace-io/pyplot-maptiles
refs/heads/master
/maptiles.py
"""https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Python""" import numpy as np from skimage import io from pyproj import Proj from collections import namedtuple import matplotlib.pyplot as plt from matplotlib import ticker Tile = namedtuple('Tile', 'z x y') WEBMERCATOR = Proj("+init=EPSG:3857") class Ti...
{"/example.py": ["/maptiles.py"]}
43,776
powerplace-io/pyplot-maptiles
refs/heads/master
/example.py
import matplotlib.pyplot as plt from maptiles import MapboxMap import numpy as np # Specify valid mapbox api key access_token = "pk..." # Initialize plot fig, ax = plt.subplots() # Initialize Map map = MapboxMap(ax, access_token) # Plot area map.plot_area(area=[[55, -10], [30, 50]], zoom=4) # Plot some points on...
{"/example.py": ["/maptiles.py"]}
43,778
jithzzzz/Rest-API-Example-Django
refs/heads/master
/Payments/views.py
# from django.shortcuts import render, redirect from django.http.response import HttpResponse from django.http.response import JsonResponse from rest_framework.parsers import JSONParser from rest_framework import status from Payments.serializers import InvoiceSerializer from rest_framework.decorators import api_view ...
{"/Payments/views.py": ["/Payments/serializers.py", "/Payments/models.py"], "/Payments/serializers.py": ["/Payments/models.py"], "/Payments/tests.py": ["/Payments/models.py", "/Payments/serializers.py"], "/Payments/admin.py": ["/Payments/models.py"]}
43,779
jithzzzz/Rest-API-Example-Django
refs/heads/master
/Payments/migrations/0004_auto_20210728_1616.py
# Generated by Django 3.1.5 on 2021-07-28 10:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Payments', '0003_auto_20210728_1614'), ] operations = [ migrations.AlterField( model_name='invoicedata', name='payme...
{"/Payments/views.py": ["/Payments/serializers.py", "/Payments/models.py"], "/Payments/serializers.py": ["/Payments/models.py"], "/Payments/tests.py": ["/Payments/models.py", "/Payments/serializers.py"], "/Payments/admin.py": ["/Payments/models.py"]}
43,780
jithzzzz/Rest-API-Example-Django
refs/heads/master
/Payments/serializers.py
from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import invoiceData class InvoiceSerializer(serializers.ModelSerializer): class Meta: model = invoiceData fields = ('invoiceNumber', 'clientEmail', 'clientName'...
{"/Payments/views.py": ["/Payments/serializers.py", "/Payments/models.py"], "/Payments/serializers.py": ["/Payments/models.py"], "/Payments/tests.py": ["/Payments/models.py", "/Payments/serializers.py"], "/Payments/admin.py": ["/Payments/models.py"]}
43,781
jithzzzz/Rest-API-Example-Django
refs/heads/master
/Payments/tests.py
import json from rest_framework import status from django.test import TestCase, Client from django.urls import reverse from Payments.models import invoiceData from Payments.serializers import InvoiceSerializer # initialize the APIClient app client = Client() # Create your tests here. class InvoiceDataTest(TestCase):...
{"/Payments/views.py": ["/Payments/serializers.py", "/Payments/models.py"], "/Payments/serializers.py": ["/Payments/models.py"], "/Payments/tests.py": ["/Payments/models.py", "/Payments/serializers.py"], "/Payments/admin.py": ["/Payments/models.py"]}
43,782
jithzzzz/Rest-API-Example-Django
refs/heads/master
/Payments/migrations/0002_auto_20210728_1428.py
# Generated by Django 3.1.5 on 2021-07-28 08:58 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Payments', '0001_initial'), ] operations = [ migrations.AddField( model_name='invoicedata', name='paymentStatus', ...
{"/Payments/views.py": ["/Payments/serializers.py", "/Payments/models.py"], "/Payments/serializers.py": ["/Payments/models.py"], "/Payments/tests.py": ["/Payments/models.py", "/Payments/serializers.py"], "/Payments/admin.py": ["/Payments/models.py"]}
43,783
jithzzzz/Rest-API-Example-Django
refs/heads/master
/Payments/admin.py
from django.contrib import admin # Register your models here. from .models import invoiceData admin.site.register(invoiceData)
{"/Payments/views.py": ["/Payments/serializers.py", "/Payments/models.py"], "/Payments/serializers.py": ["/Payments/models.py"], "/Payments/tests.py": ["/Payments/models.py", "/Payments/serializers.py"], "/Payments/admin.py": ["/Payments/models.py"]}
43,784
jithzzzz/Rest-API-Example-Django
refs/heads/master
/Payments/migrations/0003_auto_20210728_1614.py
# Generated by Django 3.1.5 on 2021-07-28 10:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Payments', '0002_auto_20210728_1428'), ] operations = [ migrations.RemoveField( model_name='invoicedata', name='paym...
{"/Payments/views.py": ["/Payments/serializers.py", "/Payments/models.py"], "/Payments/serializers.py": ["/Payments/models.py"], "/Payments/tests.py": ["/Payments/models.py", "/Payments/serializers.py"], "/Payments/admin.py": ["/Payments/models.py"]}
43,785
jithzzzz/Rest-API-Example-Django
refs/heads/master
/Payments/urls.py
from django.urls import path from . import views urlpatterns = [ path('csrf', views.csrf, name="csrf"), path('invoicelist', views.invoice_list, name='invoicelist'), path('siglerecord/<int:pk>', views.payment_link, name="siglerecord"), path('user-invoice-payment/<int:pk>', views.checkout, name="user-...
{"/Payments/views.py": ["/Payments/serializers.py", "/Payments/models.py"], "/Payments/serializers.py": ["/Payments/models.py"], "/Payments/tests.py": ["/Payments/models.py", "/Payments/serializers.py"], "/Payments/admin.py": ["/Payments/models.py"]}
43,786
jithzzzz/Rest-API-Example-Django
refs/heads/master
/Payments/models.py
import Payments from django.db import models # Create your models here. # Create your models here. class invoiceData(models.Model): invoiceNumber = models.CharField(max_length=50) clientEmail = models.EmailField() clientName = models.CharField(max_length=50) projectName = models.CharField(max_length=...
{"/Payments/views.py": ["/Payments/serializers.py", "/Payments/models.py"], "/Payments/serializers.py": ["/Payments/models.py"], "/Payments/tests.py": ["/Payments/models.py", "/Payments/serializers.py"], "/Payments/admin.py": ["/Payments/models.py"]}
43,788
pshar33/Parity_backend
refs/heads/main
/project/urls.py
# We have 2 api calls for each model(House, Thermostat,Room and Light). # First url for each view is for Getting the list, Creating a new entry and adding to that list with the POST request. # Second url is for getting a specific entry for that specific model and Updating it with the PUT request. from django.conf.urls...
{"/project/urls.py": ["/homes/api.py"], "/homes/api.py": ["/homes/serializer.py"]}
43,789
pshar33/Parity_backend
refs/heads/main
/homes/serializer.py
# I have created different serializers for the different models defined in our model.py. These are being called in the views defined in api.py. from rest_framework import serializers from homes.models import * class HouseSerializer(serializers.ModelSerializer): class Meta: model = House fields ...
{"/project/urls.py": ["/homes/api.py"], "/homes/api.py": ["/homes/serializer.py"]}
43,790
pshar33/Parity_backend
refs/heads/main
/homes/api.py
#This is the file where all the Views of our API exist. #I have created classes ending with List for GET and POST requests. #I have creared classes ending with Detail to get the entry that needs to be updated and the PUT functionality is present in this class. #EXCEPTION HANDLING has been implemented in all the classes...
{"/project/urls.py": ["/homes/api.py"], "/homes/api.py": ["/homes/serializer.py"]}
43,791
pshar33/Parity_backend
refs/heads/main
/homes/migrations/0002_auto_20210307_1728.py
# Generated by Django 3.1.7 on 2021-03-07 22:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('homes', '0001_initial'), ] operations = [ migrations.AddField( model_name='light', name='time_updated', ...
{"/project/urls.py": ["/homes/api.py"], "/homes/api.py": ["/homes/serializer.py"]}
43,792
pshar33/Parity_backend
refs/heads/main
/homes/admin.py
# I created admin.py to test and observe the tables created in django admin site.Below are all the tables we registered. from django.contrib import admin from homes.models import * admin.site.register(House) admin.site.register(Thermostat) admin.site.register(Room) admin.site.register(Light)
{"/project/urls.py": ["/homes/api.py"], "/homes/api.py": ["/homes/serializer.py"]}
43,855
AtharvaGupta01/Flask_test
refs/heads/master
/app.py
from flask import Flask, jsonify, request, render_template from flask_restful import Resource, Api #from flask_pymongo import PyMongo from thisisatest import a import pymongo import re from collections import OrderedDict from datetime import datetime app = Flask(__name__) api = Api(app) # class HelloWorld(Resource): ...
{"/app.py": ["/thisisatest.py"]}
43,856
AtharvaGupta01/Flask_test
refs/heads/master
/thisisatest.py
import pymongo import re from collections import OrderedDict from datetime import datetime def a(): myclient = pymongo.MongoClient("mongodb://localhost:27017", username="", password="") raw_events_db = myclient["raw_events_db"] events_collection = raw_events_db["events"] applications_db = myclient['app...
{"/app.py": ["/thisisatest.py"]}
43,858
Creohex/octocord-peon
refs/heads/master
/peon_discord/peon_discord/commands.py
"""Command model, definitions and command/handler sets for discord client.""" import os import random import re import time from abc import abstractmethod from datetime import datetime from peon_common import exceptions, utils async def reply(message, text): """Reply to the message with text (returns new messag...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,859
Creohex/octocord-peon
refs/heads/master
/peon_common/peon_common/exceptions.py
"""Custom exceptions definitions.""" class Error(Exception): """Base error.""" def __init__(self, message=None, *args, **kwargs): args = args kwargs = kwargs message = message.format(*args, **kwargs) if args or kwargs else message super(Error, self).__init__(message) ...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,860
Creohex/octocord-peon
refs/heads/master
/peon_common/init/await_db.py
#!/usr/bin/env python3 import time from peon_common.db import check_connection def await_db(retries=10): """Attempts to establish connection with database.""" print(f"Waiting for db to come online... ({retries} retries)") for counter in range(1, retries + 1): if check_connection(): ...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,861
Creohex/octocord-peon
refs/heads/master
/peon_discord/start.py
#!/usr/bin/env python3 import time import traceback from peon_discord.client import Peon def start(): try: print("Starting peon...") Peon().run() except: print("Exception occured!") traceback.print_exc() finally: time.sleep(5) start() if __name__ == "__m...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,862
Creohex/octocord-peon
refs/heads/master
/peon_common/peon_common/db.py
"""Database entities.""" import time import pymongo from collections.abc import MutableMapping from pymongo.errors import ( AutoReconnect, ConnectionFailure, OperationFailure, WTimeoutError, ) from .utils import ( get_env_vars, ENV_DB_USER, ENV_DB_PASS, ENV_DB_HOST, ) def check_con...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,863
Creohex/octocord-peon
refs/heads/master
/peon_common/peon_common/utils.py
"""Various utils, DB operations, etc.""" import binascii import json import os import random import re import requests import socket import time import urllib.parse import nltk.chat.eliza import psutil import steamapi from peon_common.exceptions import ( CommandExecutionError, CommandMalformed, ) ENV_TOKEN...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,864
Creohex/octocord-peon
refs/heads/master
/peon_telegram/peon_telegram/constants.py
"""Telegram client-related constants.""" DEBUG = True """Signals whether to post debug/exception data.""" PREFIX = "/" """Prefix used for basic client commands.""" MSG_MAX_CHARACTERS = 4096 """Maximum amount of characters supported in a message.""" USER_NAME_REGEX = r"^@\w+$" """Telegram user name format regex."""...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,865
Creohex/octocord-peon
refs/heads/master
/peon_telegram/peon_telegram/client.py
"""Telegram client.""" import logging from .handlers import HANDLERS from peon_common.utils import ENV_TOKEN_TELEGRAM, get_env_vars from telegram.ext import ApplicationBuilder logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) class Peon(): ...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,866
Creohex/octocord-peon
refs/heads/master
/tests/test_common.py
"""Common-related test cases.""" import pytest from peon_common import utils from peon_common.exceptions import ( CommandMalformed, ) # TODO: complete cases.. @pytest.mark.parametrize( ("text", "expected"), [ ("", ""), ("<,$%[ ]", ""), ("--. .. -... -... . .-. .. ... ....", "gibb...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,867
Creohex/octocord-peon
refs/heads/master
/peon_telegram/start.py
#!/usr/bin/env python3 from peon_telegram.client import Peon def start(): Peon().run() if __name__ == "__main__": start()
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,868
Creohex/octocord-peon
refs/heads/master
/peon_common/init/check_env.py
#!/usr/bin/env python3 from peon_common.utils import get_env_vars if __name__ == "__main__": print("Verifying environment variables...") get_env_vars() print("Environment variables verified.")
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,869
Creohex/octocord-peon
refs/heads/master
/peon_discord/peon_discord/client.py
"""Discord client.""" import discord from datetime import datetime from . import commands, CommandSet, Command, MentionHandler from peon_common.utils import ( get_env_vars, get_file, ENV_TOKEN_DISCORD, ) class Peon(): """Discord Peon client.""" NAME = "Peon" GAME_NAME = "work work" AVAT...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,870
Creohex/octocord-peon
refs/heads/master
/peon_discord/peon_discord/__init__.py
"""Peon discord client module.""" from .commands import ( Command, MentionHandler, CommandSet, ) __all__ = [Command.__name__, MentionHandler.__name__, CommandSet.__name__]
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,871
Creohex/octocord-peon
refs/heads/master
/peon_common/peon_common/__init__.py
"""Peon common entities.""" from peon_common.db import ( Database, MongoObject, Document, ) __all__ = [Database.__name__, MongoObject.__name__, Document.__name__]
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,872
Creohex/octocord-peon
refs/heads/master
/peon_telegram/peon_telegram/handlers.py
"""Peon handlers.""" import functools import os import re from datetime import datetime from peon_common import exceptions, utils from peon_telegram import constants from peon_common.exceptions import ( CommandAccessRestricted, CommandExecutionError, CommandMalformed, ) from telegram import ( constan...
{"/peon_common/peon_common/db.py": ["/peon_common/peon_common/utils.py"], "/peon_telegram/peon_telegram/client.py": ["/peon_telegram/peon_telegram/handlers.py"], "/peon_discord/peon_discord/client.py": ["/peon_discord/peon_discord/__init__.py"], "/peon_discord/peon_discord/__init__.py": ["/peon_discord/peon_discord/com...
43,885
emre/magicdice
refs/heads/master
/examples/verify.py
from magicdice.utils import verify bid_block_id = 30710738 bid_tx_id = "1ddbb2ccd975c7339a22c284fd0a91781ec99094" roll_block_id = 30710739 roll_tx_id = "7b143697e667fd2a706ab0f88cc1dd9b6f252241" server_seed = "8cc9pxehpq3kuoi9j5qd" if verify( bid_block_id, bid_tx_id, roll_block_id, ro...
{"/examples/verify.py": ["/magicdice/utils.py"], "/magicdice/core.py": ["/magicdice/utils.py", "/magicdice/constants.py", "/magicdice/api_client.py"], "/examples/simple_bot.py": ["/magicdice/core.py"]}
43,886
emre/magicdice
refs/heads/master
/setup.py
from setuptools import setup, find_packages setup( name='magicdice', version='0.0.1', packages=find_packages(), url='https://github.com/emre/magicdice', license='MIT', author='Emre Yilmaz', author_email='mail@emreyilmaz.me', description='A Python library to interact with the magic-dice ...
{"/examples/verify.py": ["/magicdice/utils.py"], "/magicdice/core.py": ["/magicdice/utils.py", "/magicdice/constants.py", "/magicdice/api_client.py"], "/examples/simple_bot.py": ["/magicdice/core.py"]}
43,887
emre/magicdice
refs/heads/master
/magicdice/__init__.py
class MagicDice: def __init__(self, account, active_key): self.account = account self.active_key = active_key
{"/examples/verify.py": ["/magicdice/utils.py"], "/magicdice/core.py": ["/magicdice/utils.py", "/magicdice/constants.py", "/magicdice/api_client.py"], "/examples/simple_bot.py": ["/magicdice/core.py"]}
43,888
emre/magicdice
refs/heads/master
/magicdice/constants.py
MAGICDICE_ACCOUNT = "magicdice"
{"/examples/verify.py": ["/magicdice/utils.py"], "/magicdice/core.py": ["/magicdice/utils.py", "/magicdice/constants.py", "/magicdice/api_client.py"], "/examples/simple_bot.py": ["/magicdice/core.py"]}
43,889
emre/magicdice
refs/heads/master
/magicdice/api_client.py
import requests class ApiClient: """The main API client to interact with the magic-dice website's HTTP endpoint. """ def __init__(self, api_base_url=None): self.api_base_url = api_base_url or "https://magic-dice.com/api" def _generate_url(self, path): """Generates URLS based on t...
{"/examples/verify.py": ["/magicdice/utils.py"], "/magicdice/core.py": ["/magicdice/utils.py", "/magicdice/constants.py", "/magicdice/api_client.py"], "/examples/simple_bot.py": ["/magicdice/core.py"]}
43,890
emre/magicdice
refs/heads/master
/magicdice/core.py
import time from steem.account import Account from steem.transactionbuilder import TransactionBuilder from steembase import operations from .utils import get_steem_client from .constants import MAGICDICE_ACCOUNT from .api_client import ApiClient class Magicdice: """The main class to broadcast transfers """ ...
{"/examples/verify.py": ["/magicdice/utils.py"], "/magicdice/core.py": ["/magicdice/utils.py", "/magicdice/constants.py", "/magicdice/api_client.py"], "/examples/simple_bot.py": ["/magicdice/core.py"]}
43,891
emre/magicdice
refs/heads/master
/examples/simple_bot.py
from magicdice.core import Magicdice m = Magicdice( '<account>', '<private_active_key>') # Send 10 0.100 STEEM bids with under 50 prediction for i in range(0, 10): resp = m.bid('under', '50', '0.100 STEEM', 'foo', ensure_pickup=True) roll = resp[2] status = "won" if roll["won"] else "lost" print(...
{"/examples/verify.py": ["/magicdice/utils.py"], "/magicdice/core.py": ["/magicdice/utils.py", "/magicdice/constants.py", "/magicdice/api_client.py"], "/examples/simple_bot.py": ["/magicdice/core.py"]}
43,892
emre/magicdice
refs/heads/master
/magicdice/utils.py
import hashlib import hmac import json import re from steem import Steem from steem.amount import Amount def get_steem_client(keys=None): """Helper function to get the Steem client :return (steem.Steem): Main steem instance """ return Steem(nodes=["https://api.steemit.com"], keys=keys) def get_op_...
{"/examples/verify.py": ["/magicdice/utils.py"], "/magicdice/core.py": ["/magicdice/utils.py", "/magicdice/constants.py", "/magicdice/api_client.py"], "/examples/simple_bot.py": ["/magicdice/core.py"]}
43,950
a5932016/PttBots
refs/heads/master
/bot/views.py
from django.shortcuts import render # Create your views here. # import 必要的函式庫 from django.conf import settings from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt from linebot import LineBotApi, WebhookParser from linebot.exceptions...
{"/bot/views.py": ["/chat/chat.py", "/chat/match.py"], "/chat/chat.py": ["/chat/match.py"]}
43,951
a5932016/PttBots
refs/heads/master
/chat/match.py
import json import os import random from .Matcher.bm25Matcher import bestMatchingMatcher from .Matcher.matcher import Matcher def getMatcher(matcherType,removeStopWords=False): """ 回傳初始完畢的 Matcher Args: - matcherType:要使用哪種字串匹配方式 - Fuzzy - WordWeight - sort: ...
{"/bot/views.py": ["/chat/chat.py", "/chat/match.py"], "/chat/chat.py": ["/chat/match.py"]}
43,952
a5932016/PttBots
refs/heads/master
/chat/chat.py
import json import os import random import logging import chat.match as match from .responsesEvaluate import Evaluator def testSegment(matcher): logging.info("測試斷詞模塊中") try: matcher.wordSegmentation("測試一下斷詞") logging.info("測試成功") except Exception as e: logging.info(repr(e)) ...
{"/bot/views.py": ["/chat/chat.py", "/chat/match.py"], "/chat/chat.py": ["/chat/match.py"]}
43,954
skarthi32/spark_etl
refs/heads/master
/test/test_main.py
import pytest from datetime import datetime def test_main(): pass
{"/src/spark_etl/deployers/__init__.py": ["/src/spark_etl/deployers/hdfs_deployer.py", "/src/spark_etl/deployers/s3_deployer.py"], "/src/spark_etl/job_submitters/__init__.py": ["/src/spark_etl/job_submitters/livy_job_submitter.py"]}
43,955
skarthi32/spark_etl
refs/heads/master
/src/spark_etl/deployers/__init__.py
from .abstract_deployer import AbstractDeployer from .hdfs_deployer import HDFSDeployer from .s3_deployer import S3Deployer
{"/src/spark_etl/deployers/__init__.py": ["/src/spark_etl/deployers/hdfs_deployer.py", "/src/spark_etl/deployers/s3_deployer.py"], "/src/spark_etl/job_submitters/__init__.py": ["/src/spark_etl/job_submitters/livy_job_submitter.py"]}
43,956
skarthi32/spark_etl
refs/heads/master
/src/spark_etl/__init__.py
from .application import Application from .build import Build from .exceptions import SparkETLException, SparkETLDeploymentFailure, SparkETLLaunchFailure, SparkETLGetStatusFailure, \ SparkETLKillFailure
{"/src/spark_etl/deployers/__init__.py": ["/src/spark_etl/deployers/hdfs_deployer.py", "/src/spark_etl/deployers/s3_deployer.py"], "/src/spark_etl/job_submitters/__init__.py": ["/src/spark_etl/job_submitters/livy_job_submitter.py"]}
43,957
skarthi32/spark_etl
refs/heads/master
/src/spark_etl/job_submitters/livy_job_submitter.py
import os import json import time import subprocess from urllib.parse import urlparse import uuid import tempfile from requests.auth import HTTPBasicAuth import requests from .abstract_job_submitter import AbstractJobSubmitter from spark_etl.utils import CLIHandler from spark_etl.core import ClientChannelInterface fr...
{"/src/spark_etl/deployers/__init__.py": ["/src/spark_etl/deployers/hdfs_deployer.py", "/src/spark_etl/deployers/s3_deployer.py"], "/src/spark_etl/job_submitters/__init__.py": ["/src/spark_etl/job_submitters/livy_job_submitter.py"]}
43,958
skarthi32/spark_etl
refs/heads/master
/src/spark_etl/job_submitters/__init__.py
from .abstract_job_submitter import AbstractJobSubmitter from .livy_job_submitter import LivyJobSubmitter
{"/src/spark_etl/deployers/__init__.py": ["/src/spark_etl/deployers/hdfs_deployer.py", "/src/spark_etl/deployers/s3_deployer.py"], "/src/spark_etl/job_submitters/__init__.py": ["/src/spark_etl/job_submitters/livy_job_submitter.py"]}
43,959
skarthi32/spark_etl
refs/heads/master
/src/spark_etl/deployers/s3_deployer.py
import os from urllib.parse import urlparse from .abstract_deployer import AbstractDeployer from spark_etl import Build from spark_etl.exceptions import SparkETLDeploymentFailure class S3Deployer(AbstractDeployer): """ This deployer deploys application to AWS S3 buckets """ def __init__(self, config):...
{"/src/spark_etl/deployers/__init__.py": ["/src/spark_etl/deployers/hdfs_deployer.py", "/src/spark_etl/deployers/s3_deployer.py"], "/src/spark_etl/job_submitters/__init__.py": ["/src/spark_etl/job_submitters/livy_job_submitter.py"]}
43,960
skarthi32/spark_etl
refs/heads/master
/src/spark_etl/deployers/hdfs_deployer.py
import uuid import subprocess import os from urllib.parse import urlparse from .abstract_deployer import AbstractDeployer from spark_etl import Build from spark_etl.exceptions import SparkETLDeploymentFailure def _execute(host, cmd, error_ok=False): r = subprocess.call(["ssh", "-q", "-t", host, cmd], shell=False)...
{"/src/spark_etl/deployers/__init__.py": ["/src/spark_etl/deployers/hdfs_deployer.py", "/src/spark_etl/deployers/s3_deployer.py"], "/src/spark_etl/job_submitters/__init__.py": ["/src/spark_etl/job_submitters/livy_job_submitter.py"]}
43,962
abhishekRT/FWA
refs/heads/master
/virtusa/views.py
from django.http import HttpResponse from data.models import Inpatient, Outpatient, Beneficiary, Test, Train, InpatientTest, OutpatientTest, BeneficiaryTest from data.code import fraud, Claim_level from django.shortcuts import render def home(request): return render(request,'home.html') def aboutus(request): return r...
{"/virtusa/views.py": ["/data/models.py", "/data/code.py"], "/data/admin.py": ["/data/models.py"]}
43,963
abhishekRT/FWA
refs/heads/master
/data/migrations/0006_outpatient.py
# Generated by Django 3.1 on 2020-09-20 11:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data', '0005_auto_20200920_1629'), ] operations = [ migrations.CreateModel( name='Outpatient', fields=[ ...
{"/virtusa/views.py": ["/data/models.py", "/data/code.py"], "/data/admin.py": ["/data/models.py"]}
43,964
abhishekRT/FWA
refs/heads/master
/data/migrations/0005_auto_20200920_1629.py
# Generated by Django 3.1 on 2020-09-20 10:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data', '0004_inpatient'), ] operations = [ migrations.AlterField( model_name='inpatient', name='DiagnosisGroupCode', ...
{"/virtusa/views.py": ["/data/models.py", "/data/code.py"], "/data/admin.py": ["/data/models.py"]}
43,965
abhishekRT/FWA
refs/heads/master
/data/migrations/0002_auto_20200920_1412.py
# Generated by Django 3.1 on 2020-09-20 08:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='beneficiary', name='name', ), ...
{"/virtusa/views.py": ["/data/models.py", "/data/code.py"], "/data/admin.py": ["/data/models.py"]}
43,966
abhishekRT/FWA
refs/heads/master
/data/migrations/0009_remove_test_potentialfraud.py
# Generated by Django 3.1 on 2020-09-21 08:19 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('data', '0008_test_train'), ] operations = [ migrations.RemoveField( model_name='test', name='PotentialFraud', ), ]...
{"/virtusa/views.py": ["/data/models.py", "/data/code.py"], "/data/admin.py": ["/data/models.py"]}
43,967
abhishekRT/FWA
refs/heads/master
/data/code.py
### import packages import os import pandas as pd import numpy as np from sklearn import preprocessing from sklearn.model_selection import train_test_split, ShuffleSplit, learning_curve, GridSearchCV from sklearn.linear_model import LogisticRegression from sklearn.metrics import roc_curve, accuracy_score, confusion_mat...
{"/virtusa/views.py": ["/data/models.py", "/data/code.py"], "/data/admin.py": ["/data/models.py"]}
43,968
abhishekRT/FWA
refs/heads/master
/data/migrations/0003_auto_20200920_1442.py
# Generated by Django 3.1 on 2020-09-20 09:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data', '0002_auto_20200920_1412'), ] operations = [ migrations.AlterField( model_name='beneficiary', name='RenalDiseas...
{"/virtusa/views.py": ["/data/models.py", "/data/code.py"], "/data/admin.py": ["/data/models.py"]}