Dataset Viewer
Auto-converted to Parquet Duplicate
repo_name
stringclasses
400 values
branch_name
stringclasses
4 values
file_content
stringlengths
16
72.5k
language
stringclasses
1 value
num_lines
int64
1
1.66k
avg_line_length
float64
6
85
max_line_length
int64
9
949
path
stringlengths
5
103
alphanum_fraction
float64
0.29
0.89
alpha_fraction
float64
0.27
0.89
shuishen112/pairwise-rnn
refs/heads/master
import data_helper import time import datetime import os import tensorflow as tf import numpy as np import evaluation now = int(time.time()) timeArray = time.localtime(now) timeStamp = time.strftime("%Y%m%d%H%M%S", timeArray) timeDay = time.strftime("%Y%m%d", timeArray) print (timeStamp) def main(args): ar...
Python
116
36.043102
159
/main.py
0.553088
0.546842
shuishen112/pairwise-rnn
refs/heads/master
class Singleton(object): __instance=None def __init__(self): pass def getInstance(self): if Singleton.__instance is None: # Singleton.__instance=object.__new__(cls,*args,**kwd) Singleton.__instance=self.get_test_flag() print("build FLAGS over") ret...
Python
197
60.426395
121
/config.py
0.627396
0.597571
shuishen112/pairwise-rnn
refs/heads/master
from tensorflow import flags import tensorflow as tf from config import Singleton import data_helper import datetime,os import models import numpy as np import evaluation import sys import logging import time now = int(time.time()) timeArray = time.localtime(now) timeStamp = time.strftime("%Y%m%d%H%M%S", timeArray)...
Python
164
35.829269
161
/run.py
0.628704
0.62142
shuishen112/pairwise-rnn
refs/heads/master
#coding:utf-8 import tensorflow as tf import numpy as np from tensorflow.contrib import rnn import models.blocks as blocks # model_type :apn or qacnn class QA_CNN_extend(object): # def __init__(self,max_input_left,max_input_right,batch_size,vocab_size,embedding_size,filter_sizes,num_filters,hidden_size, # dro...
Python
381
46.682415
147
/models/QA_CNN_pairwise.py
0.592162
0.5751
shuishen112/pairwise-rnn
refs/heads/master
from my.general import flatten, reconstruct, add_wd, exp_mask import numpy as np import tensorflow as tf _BIAS_VARIABLE_NAME = "bias" _WEIGHTS_VARIABLE_NAME = "kernel" def linear(args, output_size, bias, bias_start=0.0, scope=None, squeeze=False, wd=0.0, input_keep_prob=1.0, is_train=None):#, name_w='',...
Python
160
36.712502
116
/models/my/nn.py
0.572754
0.558005
shuishen112/pairwise-rnn
refs/heads/master
from .QA_CNN_pairwise import QA_CNN_extend as CNN from .QA_RNN_pairwise import QA_RNN_extend as RNN from .QA_CNN_quantum_pairwise import QA_CNN_extend as QCNN def setup(opt): if opt["model_name"]=="cnn": model=CNN(opt) elif opt["model_name"]=="rnn": model=RNN(opt) elif opt['model_name']=='qcnn': model=QCNN(opt...
Python
14
25.642857
58
/models/__init__.py
0.691689
0.689008
shuishen112/pairwise-rnn
refs/heads/master
# -*- coding: utf-8 -*- from tensorflow import flags import tensorflow as tf from config import Singleton import data_helper import datetime import os import models import numpy as np import evaluation from data_helper import log_time_delta,getLogger logger=getLogger() args = Singleton().get_rnn_flag() #args...
Python
114
31.622807
92
/test.py
0.651019
0.64324
shuishen112/pairwise-rnn
refs/heads/master
#-*- coding:utf-8 -*- import os import numpy as np import tensorflow as tf import string from collections import Counter import pandas as pd from tqdm import tqdm import random from functools import wraps import time import pickle def log_time_delta(func): @wraps(func) def _deco(*args, **kwargs): star...
Python
363
33.487602
167
/data_helper.py
0.582389
0.574804
pablor0mero/Placester_Test_Pablo_Romero
refs/heads/master
# For this solution I'm using TextBlob, using it's integration with WordNet. from textblob import TextBlob from textblob import Word from textblob.wordnet import VERB import nltk import os import sys import re import json results = { "results" : [] } #Override NLTK data path to use the one I uploaded in the folder d...
Python
71
44.929577
157
/main.py
0.670813
0.666869
GabinCleaver/Auto_Discord_Bump
refs/heads/main
import requests import time token = "TOKEN" headers = { 'User-Agent' : 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7', 'Authorization' : token } id = input(f"[?] Salon ID: ") print("") while True: requests.post( f"https://discord.com/api/...
Python
21
20.809525
109
/autobump.py
0.561845
0.51153
altopalido/yelp_python
refs/heads/master
# Madis Settings MADIS_PATH='/Users/alexiatopalidou/Desktop/erg/madis/src' # Webserver Settings # IMPORTANT: The port must be available. web_port = 9090 # must be integer (this is wrong:'9090')
Python
6
31.666666
57
/yelp_python/settings.py
0.75
0.709184
altopalido/yelp_python
refs/heads/master
# ----- CONFIGURE YOUR EDITOR TO USE 4 SPACES PER TAB ----- # import settings import sys def connection(): ''' User this function to create your connections ''' import sys sys.path.append(settings.MADIS_PATH) import madis con = madis.functions.Connection('/Users/alexiatopalidou/Desktop/erg/yelp_p...
Python
206
26.485437
361
/yelp_python/app.py
0.622395
0.612681
smellycats/SX-CarRecgServer
refs/heads/master
from car_recg import app from car_recg.recg_ser import RecgServer from ini_conf import MyIni if __name__ == '__main__': rs = RecgServer() rs.main() my_ini = MyIni() sys_ini = my_ini.get_sys_conf() app.config['THREADS'] = sys_ini['threads'] app.config['MAXSIZE'] = sys_ini['threads'] * 16 app...
Python
14
27.857143
64
/run.py
0.613861
0.59901
smellycats/SX-CarRecgServer
refs/heads/master
# -*- coding: utf-8 -*- import Queue class Config(object): # 密码 string SECRET_KEY = 'hellokitty' # 服务器名称 string HEADER_SERVER = 'SX-CarRecgServer' # 加密次数 int ROUNDS = 123456 # token生存周期,默认1小时 int EXPIRES = 7200 # 数据库连接 string SQLALCHEMY_DATABASE_URI = 'mysql://root:root@127.0.0...
Python
53
17.905661
69
/car_recg/config.py
0.593812
0.56986
smellycats/SX-CarRecgServer
refs/heads/master
# -*- coding: utf-8 -*- import os import Queue import random from functools import wraps import arrow from flask import g, request from flask_restful import reqparse, Resource from passlib.hash import sha256_crypt from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from car_recg import app, db, api...
Python
176
30.78409
134
/car_recg/views.py
0.558634
0.540222
josemiche11/reversebycondition
refs/heads/master
''' Input- zoho123 Output- ohoz123 ''' char= input("Enter the string: ") char2= list(char) num= "1234567890" list1= [0]*len(char) list2=[] for i in range(len(char)): if char2[i] not in num: list2.append( char2.index( char2[i])) char2[i]= "*" list2.reverse() k=0 for j in range( len(c...
Python
26
17.461538
45
/reversebycondition.py
0.539526
0.472332
Lasyin/batch-resize
refs/heads/master
import os import sys import argparse from PIL import Image # From Pillow (pip install Pillow) def resize_photos(dir, new_x, new_y, scale): if(not os.path.exists(dir)): # if not in full path format (/usrers/user/....) # check if path is in local format (folder is in current working directory) ...
Python
73
43.109589
179
/batch_resize.py
0.554969
0.551863
snehG0205/Twitter_Mining
refs/heads/master
import tweepy import csv import pandas as pd from textblob import TextBlob import matplotlib.pyplot as plt ####input your credentials here consumer_key = 'FgCG8zcxF4oINeuAqUYzOw9xh' consumer_secret = 'SrSu7WhrYUpMZnHw7a5ui92rUA1n2jXNoZVb3nJ5wEsXC5xlN9' access_token = '975924102190874624-uk5zGlYRwItkj7pZO2m89NefRm5DFLg...
Python
104
28.73077
157
/tweepy_tester.py
0.66796
0.655674
snehG0205/Twitter_Mining
refs/heads/master
import tweepy import csv import pandas as pd # keys and tokens from the Twitter Dev Console consumer_key = 'FgCG8zcxF4oINeuAqUYzOw9xh' consumer_secret = 'SrSu7WhrYUpMZnHw7a5ui92rUA1n2jXNoZVb3nJ5wEsXC5xlN9' access_token = '975924102190874624-uk5zGlYRwItkj7pZO2m89NefRm5DFLg' access_token_secret = 'ChvmTjG8hl61xUrXkk3Ad...
Python
52
32.53846
146
/twitter1.py
0.729513
0.716332
snehG0205/Twitter_Mining
refs/heads/master
import csv csvFile = open('res.csv', 'w+')
Python
2
20.5
31
/tester.py
0.642857
0.642857
snehG0205/Twitter_Mining
refs/heads/master
from test import mining tag = "#WednesdayWisdom" limit = "10" sen_list = mining(tag,int(limit)) print(sen_list)
Python
5
21.4
33
/Twitter-Flask/untitled.py
0.72973
0.711712
snehG0205/Twitter_Mining
refs/heads/master
from flask import Flask, render_template, request from test import mining app = Flask(__name__) @app.route('/') def index(): return render_template('hello.html') @app.route('/', methods=['GET', 'POST']) def submit(): if request.method == 'POST': print (request.form) # debug line, see data printed below tag = r...
Python
24
25.416666
124
/Twitter-Flask/app.py
0.631912
0.627172
snehG0205/Twitter_Mining
refs/heads/master
#!/usr/bin/env python print ("some output") return "hello"
Python
4
14
21
/Twitter-Flask/hello.py
0.694915
0.694915
snehG0205/Twitter_Mining
refs/heads/master
import matplotlib.pyplot as plt # Data to plot labels = 'Neutral', 'Positive', 'Negative' sizes = [20, 40, 40] colors = ['lightskyblue','yellowgreen', 'lightcoral'] explode = (0.0, 0, 0) # explode 1st slice # Plot plt.pie(sizes, explode=explode, labels=labels, colors=colors, autopct='%1.1f%%', shadow=True,...
Python
16
27.125
61
/piPlotter.py
0.685969
0.650334
nopple/ctf
refs/heads/master
#!/usr/bin/env python import socket, subprocess, sys from struct import pack, unpack global scenes global officers scenes = {} officers = {} remote = len(sys.argv) > 1 PORT = 8888 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if remote: HOST = "dosfun4u_5d712652e1d06a362f7fc6d12d66755b.2014.shallweplayaga...
Python
124
25.620968
131
/dosfun4u/pwn.py
0.668585
0.624962
nopple/ctf
refs/heads/master
#!/usr/bin/env python import socket from struct import pack, unpack DEBUG = False server = "shitsco_c8b1aa31679e945ee64bde1bdb19d035.2014.shallweplayaga.me" server = "127.0.0.1" port = 31337 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((server, port)) s.settimeout(30) def recv_until(s, pattern): ...
Python
71
25.830986
127
/shitsco/pwn.py
0.669816
0.618898
phu-bui/Nhan_dien_bien_bao_giao_thong
refs/heads/master
import tkinter as tk from tkinter import filedialog from tkinter import * from PIL import Image, ImageTk import numpy from keras.models import load_model model = load_model('BienBao.h5') class_name = { 1:'Speed limit (20km/h)', 2:'Speed limit (30km/h)', 3:'Speed limit (50km/h)', 4:'Speed limit (60km/h)'...
Python
103
30.747572
107
/main.py
0.631386
0.579688
Jerin-Alisha/Python-Code-Assessment
refs/heads/master
def returnSum(dict): sum=0 for i in dict: sum=sum+dict[i] return sum dict={'Rick':85,'Amit':42,'George':53,'Tanya':60,'Linda':35} print 'sum:', returnSum(dict)
Python
7
24.714285
60
/Dictionary with function.py
0.582888
0.524064
Jerin-Alisha/Python-Code-Assessment
refs/heads/master
n=int(input("enter the numbers u want to print:")) for i in range(1,n+1): if(i%3==0): print ('Fizz') continue elif(i%5==0): print ('Buzz') continue print i
Python
9
21.222221
50
/FizzBuzz.py
0.46789
0.440367
Jerin-Alisha/Python-Code-Assessment
refs/heads/master
def switch(on_strike): players = {1,2} return list(players.difference(set([on_strike])))[0] def get_player(previous_score, previous_player, previous_bowl_number): if previous_score%2 == 0 and (previous_bowl_number%6 !=0 or previous_bowl_number ==0): player = previous_player elif p...
Python
36
28.611111
90
/Cricket Match Player Score.py
0.646098
0.61343
Jerin-Alisha/Python-Code-Assessment
refs/heads/master
arr=[1,2,3,5,8,4,7,9,1,4,12,5,6,5,2,1,0,8,1] a = [None] * len(arr); visited = 0; for i in range(0, len(arr)): count = 1; for j in range(i+1, len(arr)): if(arr[i] == arr[j]): count = count + 1; a[j] = visited; if(a[i] != visited): a[i]...
Python
14
31.285715
69
/repeat.py
0.408511
0.353191
TheDinner22/lightning-sim
refs/heads/main
# represent the "board" in code # dependencies import random class Board: def __init__(self, width=10): self.width = width self.height = width * 2 self.WALL_CHANCE = .25 self.FLOOR_CHANCE = .15 # create the grid self.create_random_grid() def create_random_gri...
Python
191
35.329842
97
/lib/board.py
0.51333
0.506269
TheDinner22/lightning-sim
refs/heads/main
# use pygame to show the board on a window # dependencies import pygame, random class Window: def __init__(self, board): # init py game pygame.init() # width height self.WIDTH = 600 self.HEIGHT = 600 # diffenet display modes self.display_one = False ...
Python
159
28.754717
87
/lib/window.py
0.501057
0.487104
TheDinner22/lightning-sim
refs/heads/main
# this could and will be better i just needed to make it here as a # proof of concept but it will be online and better later import os, sys BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # adds project dir to places it looks for the modules sys.path.append(BASE_PATH) from lib.board import B...
Python
15
25.4
125
/main.py
0.736709
0.736709
JoeChan/openbgp
refs/heads/master
# Copyright 2015 Cisco Systems, Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
Python
267
24.932585
80
/openbgp/common/constants.py
0.69103
0.617362
Glitchfix/TransposeMatrixIndorse
refs/heads/master
from flask import Flask, render_template, request, jsonify from flask_cors import CORS import json import numpy as np app = Flask(__name__) CORS(app) @app.route('/transpose', methods=["POST"]) def homepage(): data = request.json result = None error = "" try: mat = data["matrix"] mat =...
Python
29
19.724138
58
/server.py
0.579035
0.579035
shlsheth263/malware-detection-using-ANN
refs/heads/master
from tkinter import * from tkinter import ttk from tkinter import filedialog import test_python3 class Root(Tk): def __init__(self): super(Root, self).__init__() self.title("Malware Detection") self.minsize(500, 300) self.labelFrame = ttk.LabelFrame(self, text = " Open File") ...
Python
35
24.685715
99
/python/gui.py
0.620267
0.600223
shlsheth263/malware-detection-using-ANN
refs/heads/master
#!/usr/bin/env python import sys import time import pandas as pd import pepy import binascii import numpy as np from hashlib import md5 import sklearn from tkinter import * from tkinter import ttk from tkinter import filedialog from tensorflow.keras.models import load_model def test(p): exe = {} print("Signature...
Python
386
35.992229
107
/python/test_python3_cli.py~
0.655182
0.439846
Sssssbo/SDCNet
refs/heads/master
import numpy as np import os import torch import torch.nn.functional as F from PIL import Image from torch.autograd import Variable from torchvision import transforms from torch.utils.data import DataLoader import matplotlib.pyplot as plt import pandas as pd from tqdm import tqdm from misc import check_mkdir, AvgMete...
Python
226
45.637169
227
/infer_SDCNet.py
0.54592
0.509962
Sssssbo/SDCNet
refs/heads/master
from .resnext101 import ResNeXt101
Python
1
34
34
/resnext/__init__.py
0.857143
0.685714
Sssssbo/SDCNet
refs/heads/master
import numpy as np import os import pylab as pl #import pydensecrf.densecrf as dcrf class AvgMeter(object): def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 def update(self, val, n=1): self.val = val ...
Python
227
25.356829
110
/misc.py
0.56343
0.531673
Sssssbo/SDCNet
refs/heads/master
from .make_model import ResNet50, ResNet50_BIN, ResNet50_LowIN
Python
1
62
62
/resnet/__init__.py
0.822581
0.725806
Sssssbo/SDCNet
refs/heads/master
from .resnet import ResNet, BasicBlock, Bottleneck import torch from torch import nn from .config import resnet50_path model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', 'resnet50': 'https://downlo...
Python
104
32.740383
78
/resnet/make_model.py
0.586492
0.54175
Sssssbo/SDCNet
refs/heads/master
import os import os.path import torch.utils.data as data from PIL import Image class ImageFolder_joint(data.Dataset): # image and gt should be in the same folder and have same filename except extended name (jpg and png respectively) def __init__(self, label_list, joint_transform=None, transform=None, target_...
Python
125
39.872002
118
/datasets.py
0.623214
0.622627
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
4