index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
5,489
damian-villarreal/CoinsApi
refs/heads/main
/app/__init__.py
from flask import Flask from config import Config from flask_mongoengine import MongoEngine from flask_login import LoginManager from flask_restful import Api from flask_cors import CORS app = Flask(__name__) app.config.from_object(Config) api = Api(app) login = LoginManager(app) db = MongoEngine(app) CORS(app) from...
{"/app/__init__.py": ["/config.py"], "/app/routes.py": ["/app/__init__.py", "/app/resources.py"], "/app/models.py": ["/app/__init__.py"], "/app/resources.py": ["/app/models.py"]}
5,490
damian-villarreal/CoinsApi
refs/heads/main
/app/routes.py
from werkzeug.utils import redirect from app import api from .resources import * api.add_resource(Home, '/') api.add_resource(Redirect, '/redirect') api.add_resource(CoinsApi, '/api/coins') api.add_resource(CoinApi, '/api/coin/<id>','/api/coin') api.add_resource(UsersApi, '/api/users') api.add_resource(UserApi, '/a...
{"/app/__init__.py": ["/config.py"], "/app/routes.py": ["/app/__init__.py", "/app/resources.py"], "/app/models.py": ["/app/__init__.py"], "/app/resources.py": ["/app/models.py"]}
5,491
damian-villarreal/CoinsApi
refs/heads/main
/app/models.py
from app import db import datetime from flask_bcrypt import generate_password_hash, check_password_hash from flask_login import UserMixin from app import login class User(UserMixin, db.Document): email = db.EmailField(required=True, unique=True) password = db.StringField(required=True, min_length=6) ro...
{"/app/__init__.py": ["/config.py"], "/app/routes.py": ["/app/__init__.py", "/app/resources.py"], "/app/models.py": ["/app/__init__.py"], "/app/resources.py": ["/app/models.py"]}
5,492
damian-villarreal/CoinsApi
refs/heads/main
/app/resources.py
from flask_login.utils import login_required from flask_restful import Resource from flask import Response, request, jsonify, redirect, url_for from flask_login import current_user, login_user, logout_user from werkzeug.utils import redirect from .models import Coin, Account, User, Transaction class Home(Resource): ...
{"/app/__init__.py": ["/config.py"], "/app/routes.py": ["/app/__init__.py", "/app/resources.py"], "/app/models.py": ["/app/__init__.py"], "/app/resources.py": ["/app/models.py"]}
5,493
damian-villarreal/CoinsApi
refs/heads/main
/config.py
import os class Config(object): SECRET_KEY = 'MbXCJXAW9PHIMJnYc87E9yT_T-Bxbd6zDpuKWg' MONGODB_SETTINGS = {'host': 'mongodb+srv://admin:root@coins.zw6ys.mongodb.net/Coins?retryWrites=true&w=majority'} JSON_SORT_KEYS = False
{"/app/__init__.py": ["/config.py"], "/app/routes.py": ["/app/__init__.py", "/app/resources.py"], "/app/models.py": ["/app/__init__.py"], "/app/resources.py": ["/app/models.py"]}
5,494
RALF34/McGyver_Game
refs/heads/master
/classes_and_methods.py
"""classes for McGyver game""" import pygame import random from pygame.locals import * from constants import * class Labyrinth : def __init__(self, code_file): self.code_file = code_file self.position_tools = {'ether':(0,0), 'tube':(0,0), 'needle':(0,0)} def display_game(self,position_mcgyver,screen): """M...
{"/classes_and_methods.py": ["/constants.py"], "/McGyver_game.py": ["/classes.py", "/constants.py"], "/classes.py": ["/constants.py"]}
5,495
RALF34/McGyver_Game
refs/heads/master
/Labyrinth _game.py
"""classes for McGyver game""" import pygame, random from pygame.locals import * from constantes import * class Labyrinth : def __init__(self, code_file): self.code_file = code_file self.position_tools = ((0,0),(0,0),(0,0)) def display_laby(self): """Method to display the labyrinth""" pygame.init() sc...
{"/classes_and_methods.py": ["/constants.py"], "/McGyver_game.py": ["/classes.py", "/constants.py"], "/classes.py": ["/constants.py"]}
5,496
RALF34/McGyver_Game
refs/heads/master
/McGyver_game.py
""" Game "Trapped in the labyrinthe" McGyver has to collect three objects and reach the exit of the labyrinthe Python script Fichiers : ,McGyver_game.py, classes.py, constants.py, struct_laby.txt """ import pygame from pygame.locals import * from classes import * from constants import * pygame.init() screen = py...
{"/classes_and_methods.py": ["/constants.py"], "/McGyver_game.py": ["/classes.py", "/constants.py"], "/classes.py": ["/constants.py"]}
5,497
RALF34/McGyver_Game
refs/heads/master
/classes.py
"""classes for McGyver game""" import pygame import random from pygame.locals import * from constants import * class Labyrinth: def __init__(self, code_file): """File coding the structure of the labyrinth """ self.code_file = code_file """Dictionnary containing the three objects as keys ...
{"/classes_and_methods.py": ["/constants.py"], "/McGyver_game.py": ["/classes.py", "/constants.py"], "/classes.py": ["/constants.py"]}
5,498
RALF34/McGyver_Game
refs/heads/master
/constants.py
nbr_cells_on_board = 15 lenght_cell = 45
{"/classes_and_methods.py": ["/constants.py"], "/McGyver_game.py": ["/classes.py", "/constants.py"], "/classes.py": ["/constants.py"]}
5,499
dera1992/biosec
refs/heads/main
/home/models.py
from django.db import models from simple_history.models import HistoricalRecords # Create your models here. # the model for the operation is created here. class Employee(models.Model): id=models.AutoField(primary_key=True) name=models.CharField(max_length=255) phone=models.CharField(max_length=255) ag...
{"/home/views.py": ["/home/models.py", "/home/serializers.py"], "/home/serializers.py": ["/home/models.py"]}
5,500
dera1992/biosec
refs/heads/main
/home/urls.py
from django.urls import path, include from rest_framework import routers from . import views app_name = 'home' router=routers.DefaultRouter() router.register("employee",views.EmployeeViewset,basename="employee") urlpatterns = [ path('api/',include(router.urls)), path('api/archive/<str:pk>', views.archive, n...
{"/home/views.py": ["/home/models.py", "/home/serializers.py"], "/home/serializers.py": ["/home/models.py"]}
5,501
dera1992/biosec
refs/heads/main
/home/views.py
from rest_framework import viewsets, generics from rest_framework.response import Response from rest_framework.generics import get_object_or_404 from home.models import Employee from home.serializers import EmployeeSerializer from rest_framework.decorators import api_view #Employee Class Base Viewset for create,r...
{"/home/views.py": ["/home/models.py", "/home/serializers.py"], "/home/serializers.py": ["/home/models.py"]}
5,502
dera1992/biosec
refs/heads/main
/home/migrations/0004_auto_20210407_0410.py
# Generated by Django 3.2 on 2021-04-07 03:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0003_historicalemployee'), ] operations = [ migrations.AddField( model_name='employee', name='email', ...
{"/home/views.py": ["/home/models.py", "/home/serializers.py"], "/home/serializers.py": ["/home/models.py"]}
5,503
dera1992/biosec
refs/heads/main
/home/serializers.py
from rest_framework import serializers from home.models import Employee #The employee serializer is done here for json generation class EmployeeSerializer(serializers.ModelSerializer): class Meta: model=Employee fields="__all__"
{"/home/views.py": ["/home/models.py", "/home/serializers.py"], "/home/serializers.py": ["/home/models.py"]}
5,504
dera1992/biosec
refs/heads/main
/home/migrations/0005_auto_20210407_0427.py
# Generated by Django 3.2 on 2021-04-07 03:27 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('home', '0004_auto_20210407_0410'), ] operations = [ migrations.RemoveField( model_name='employee', name='joining_date', ...
{"/home/views.py": ["/home/models.py", "/home/serializers.py"], "/home/serializers.py": ["/home/models.py"]}
5,505
leighsix/CompetitionPycharm
refs/heads/master
/InterconnectedDynamics.py
import numpy as np import networkx as nx import Setting_Simulation_Value import OpinionDynamics import DecisionDynamics import MakingPandas import InterconnectedLayerModeling import matplotlib import time matplotlib.use("Agg") class InterconnectedDynamics: def __init__(self): self.opinion = OpinionDynamic...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,506
leighsix/CompetitionPycharm
refs/heads/master
/AnalysisDB.py
import Setting_Simulation_Value import sqlalchemy import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib from sympy import * import SelectDB import seaborn as sns from mpl_toolkits.mplot3d.axes3d import * matplotlib.use("TkAgg") class AnalysisDB: def __init__(self): self....
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,507
leighsix/CompetitionPycharm
refs/heads/master
/Layer_B_Modeling.py
import networkx as nx import numpy as np import pandas as pd import random import Setting_Simulation_Value import math ## B layer : B, B_edges class Layer_B_Modeling: def __init__(self, setting): self.B_edges = self.B_layer_config(setting) self.B_node_info = self.making_node_info() self.G_...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,508
leighsix/CompetitionPycharm
refs/heads/master
/OpinionDynamics.py
import random import Setting_Simulation_Value import InterconnectedLayerModeling import time import math import networkx as nx import numpy as np class OpinionDynamics: def __init__(self): self.A_COUNT = 0 def A_layer_dynamics(self, setting, inter_layer, gamma): # A_layer 다이내믹스, 감마 적용 및 설득/타협 알고리즘 적...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,509
leighsix/CompetitionPycharm
refs/heads/master
/DB_Management.py
import mysql.connector class DB_Management: def drop_duplicate_row(self, setting): creating_intermediate_table = (''' CREATE TABLE %s_copy LIKE %s;''' % (setting.table, setting.table)) insert_to_intermediate_table = (''' INSERT INTO %s_copy ...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,510
leighsix/CompetitionPycharm
refs/heads/master
/Interconnected_Network_Visualization.py
from pymnet import * import matplotlib.pyplot as plt import Setting_Simulation_Value import InterconnectedLayerModeling from mpl_toolkits.mplot3d.axes3d import * import matplotlib.animation as animation from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.image import imread ...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,511
leighsix/CompetitionPycharm
refs/heads/master
/RepeatDynamics.py
import numpy as np import Setting_Simulation_Value import InterconnectedDynamics import InterconnectedLayerModeling import MakingPandas import time class RepeatDynamics: def __init__(self): self.inter_dynamics = InterconnectedDynamics.InterconnectedDynamics() self.mp = MakingPandas.MakingPandas() ...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,512
leighsix/CompetitionPycharm
refs/heads/master
/MyWindow.py
import sys from pymnet import * import InterconnectedLayerModeling from Setting_Simulation_Value import * import Layer_A_Modeling import Layer_B_Modeling import Changing_Variable import Visualization import Interconnected_Network_Visualization import DB_Management import SelectDB import seaborn as sns import pandas as ...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,513
leighsix/CompetitionPycharm
refs/heads/master
/MakingPandas.py
import pandas as pd import numpy as np import InterconnectedLayerModeling import Setting_Simulation_Value class MakingPandas: def making_dataframe_per_step(self, setting, value_array): columns = ['gamma', 'beta', 'prob_beta', 'persuasion', 'compromise', 'A_plus', 'A_minus', 'B_plus', 'B...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,514
leighsix/CompetitionPycharm
refs/heads/master
/UsingGPU.py
import math from numba import vectorize, cuda import numpy as np from numba import guvectorize @vectorize(['float32(float32, float32)', 'float64(float64, float64)'], target='cuda') def gpu_sincos(x, y): return math.sin(x) * math.cos(y) result = gpu_sincos(3.0, 4.0) print(result) @guvectorize(..., target='cuda...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,515
leighsix/CompetitionPycharm
refs/heads/master
/InterconnectedLayerModeling.py
import networkx as nx import numpy as np import pandas as pd import random import matplotlib.pyplot as plt import matplotlib import Setting_Simulation_Value matplotlib.use("TkAgg") class InterconnectedLayerModeling: def __init__(self, setting): A_edges_array = self.A_layer_config(setting) self.A_ed...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,516
leighsix/CompetitionPycharm
refs/heads/master
/VisualizationNew.py
import SelectDB import numpy as np import Setting_Simulation_Value import matplotlib.pyplot as plt import matplotlib import seaborn as sns import pandas as pd from sympy import * from matplotlib import cycler from mpl_toolkits.mplot3d.axes3d import * from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as F...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,517
leighsix/CompetitionPycharm
refs/heads/master
/MakingMovie.py
import Setting_Simulation_Value import Interconnected_Network_Visualization import numpy as np from IPython.display import display, HTML import matplotlib.pyplot as plt from matplotlib import animation from mpl_toolkits.mplot3d.axes3d import * from sympy import * import Layer_A_Modeling import Layer_B_Modeling class ...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,518
leighsix/CompetitionPycharm
refs/heads/master
/DecisionDynamics.py
import random import time import numpy as np import Setting_Simulation_Value import InterconnectedLayerModeling import networkx as nx class DecisionDynamics: def __init__(self): self.B_COUNT = 0 def B_layer_dynamics(self, setting, inter_layer, beta): # B_layer 다이내믹스, 베타 적용 및 언어데스 알고리즘 적용 prob...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,519
leighsix/CompetitionPycharm
refs/heads/master
/UI.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:\Users\Purple\CompetingLayer\mainwindow.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(s...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,520
leighsix/CompetitionPycharm
refs/heads/master
/Layer_A_Modeling.py
import networkx as nx import numpy as np import pandas as pd import random import math import Setting_Simulation_Value ## A layer Modeling : A, A_edges, AB_edges, AB_neighbor class Layer_A_Modeling(): def __init__(self, setting): # network : 1 = random regular graph 2 = barabasi-albert graph A_e...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,521
leighsix/CompetitionPycharm
refs/heads/master
/Setting_Simulation_Value.py
import numpy as np import math import random class Setting_Simulation_Value: def __init__(self): self.database = 'paper_revised_data' # 'competition renew_competition' self.table = 'simulation_table4' self.MODEL = 'BA-BA' #'RR(2)-RR(5), 'BA-BA', 'BA-RR(5)', 'RR(5)-BA', 'RR(10)-BA' ...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,522
leighsix/CompetitionPycharm
refs/heads/master
/Visualization.py
import SelectDB import numpy as np import Setting_Simulation_Value import matplotlib.pyplot as plt import matplotlib import seaborn as sns import pandas as pd from sympy import * from mpl_toolkits.mplot3d.axes3d import * from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from numba import ...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,523
leighsix/CompetitionPycharm
refs/heads/master
/Changing_Variable.py
import Setting_Simulation_Value import RepeatDynamics import sqlalchemy from multiprocessing import Pool from concurrent import futures from tqdm import tqdm class Changing_Variable: def __init__(self): self.repeat_dynamics = RepeatDynamics.RepeatDynamics() def many_execute_for_simulation(self, sett...
{"/InterconnectedDynamics.py": ["/Setting_Simulation_Value.py", "/OpinionDynamics.py", "/DecisionDynamics.py", "/MakingPandas.py", "/InterconnectedLayerModeling.py"], "/AnalysisDB.py": ["/Setting_Simulation_Value.py"], "/Layer_B_Modeling.py": ["/Setting_Simulation_Value.py"], "/OpinionDynamics.py": ["/Setting_Simulatio...
5,527
pratham-pay/Dockertest
refs/heads/master
/main_code.py
import json import pandas as pd from datetime import datetime import re import numpy as np VALID_ACCOUNT_TYPES = { 123: "Personal Loan" } def parse(json_obj): out_dict = {} for customer_id, account_list in json_obj.items(): out_list = [] if account_list: account_list = json.l...
{"/api_code.py": ["/main_code.py"]}
5,528
pratham-pay/Dockertest
refs/heads/master
/api_code.py
import flask from flask import request from main_code import parse app= flask.Flask(__name__) app.config["DEBUG"]=True @app.route('/', methods=['POST', 'GET']) def api_method(): if request.is_json: return parse(request.get_json()) else: print(request) return "Input not right" app.run...
{"/api_code.py": ["/main_code.py"]}
5,529
peulsilva/fourth_sail
refs/heads/main
/utils.py
def exists(char, array): for element in array: if element.char == char: element.addCounter() return True return False def printArray(array): for element in array: print("Letter: "+ element.char+ " Count: ", element.count)
{"/main.py": ["/CharObject.py", "/utils.py"]}
5,530
peulsilva/fourth_sail
refs/heads/main
/CharObject.py
class CharObject: def __init__(self, char): self.char = char self.count = 1 def addCounter(self): self.count+=1
{"/main.py": ["/CharObject.py", "/utils.py"]}
5,531
peulsilva/fourth_sail
refs/heads/main
/main.py
# Given an array which may contain duplicates, print all elements and their frequencies in descending order. # Your code solution should be sent to the result printed. from CharObject import CharObject from utils import exists, printArray sep= ' ' fileName= "textFile.txt" file = open(fileName,"r") line = file.read...
{"/main.py": ["/CharObject.py", "/utils.py"]}
5,533
pranavg000/Social-Network-Django
refs/heads/master
/Social Network/core/forms.py
from django.contrib.auth.models import User from django import forms from .models import Profile,Post,Comment class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput) email = forms.EmailField(max_length=254, help_text='Required field') class Meta: model = User fields = ['username'...
{"/Social Network/core/forms.py": ["/Social Network/core/models.py"], "/Social Network/core/views.py": ["/Social Network/core/forms.py", "/Social Network/core/models.py"], "/Social Network/core/admin.py": ["/Social Network/core/models.py"]}
5,534
pranavg000/Social-Network-Django
refs/heads/master
/Social Network/core/views.py
from django.shortcuts import render,redirect from django.views import generic from django.views.generic import View from django.views.generic.edit import CreateView,UpdateView,DeleteView from .forms import UserForm,UpdateUserForm,UpdateProfileForm,CreatePost,CreateComment from django.http import HttpResponse from djan...
{"/Social Network/core/forms.py": ["/Social Network/core/models.py"], "/Social Network/core/views.py": ["/Social Network/core/forms.py", "/Social Network/core/models.py"], "/Social Network/core/admin.py": ["/Social Network/core/models.py"]}
5,535
pranavg000/Social-Network-Django
refs/heads/master
/Social Network/core/models.py
from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User, on_delete= models.CASCADE) profile_photo = models.FileField(default='default.jpg', upload_to='profile_photos') status_info = models.CharField(default="Enter status", max_length=10...
{"/Social Network/core/forms.py": ["/Social Network/core/models.py"], "/Social Network/core/views.py": ["/Social Network/core/forms.py", "/Social Network/core/models.py"], "/Social Network/core/admin.py": ["/Social Network/core/models.py"]}
5,536
pranavg000/Social-Network-Django
refs/heads/master
/Social Network/core/admin.py
from django.contrib import admin from .models import Profile,Following,Follower,Post,Comment admin.site.register(Profile) admin.site.register(Follower) admin.site.register(Following) admin.site.register(Post) admin.site.register(Comment)
{"/Social Network/core/forms.py": ["/Social Network/core/models.py"], "/Social Network/core/views.py": ["/Social Network/core/forms.py", "/Social Network/core/models.py"], "/Social Network/core/admin.py": ["/Social Network/core/models.py"]}
5,537
pranavg000/Social-Network-Django
refs/heads/master
/Social Network/SocialNetwork/urls.py
from django.contrib import admin from django.urls import path,include from django.contrib.auth import views as auth_views from core import views as user_views from django.contrib.auth.decorators import login_required from django.conf import settings from django.conf.urls.static import static from django.conf.urls impor...
{"/Social Network/core/forms.py": ["/Social Network/core/models.py"], "/Social Network/core/views.py": ["/Social Network/core/forms.py", "/Social Network/core/models.py"], "/Social Network/core/admin.py": ["/Social Network/core/models.py"]}
5,538
pranavg000/Social-Network-Django
refs/heads/master
/Social Network/core/migrations/0001_initial.py
# Generated by Django 2.1.5 on 2019-03-03 06:29 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
{"/Social Network/core/forms.py": ["/Social Network/core/models.py"], "/Social Network/core/views.py": ["/Social Network/core/forms.py", "/Social Network/core/models.py"], "/Social Network/core/admin.py": ["/Social Network/core/models.py"]}
5,544
viraatdas/Deep-tic-tac-toe
refs/heads/master
/Games.py
import numpy as np class Game: def __init__(self,num_rows, num_cols, action_space, obs_space): self.num_rows = num_rows self.num_cols = num_cols self.action_space = action_space self.obs_space = obs_space def board2array(self): new_board = np.zeros(self....
{"/gui.py": ["/main.py", "/const.py"], "/nn.py": ["/const.py"], "/const.py": ["/Games.py", "/File_storage.py"], "/main.py": ["/File_storage.py", "/nn.py", "/Games.py", "/const.py", "/gui.py"]}
5,545
viraatdas/Deep-tic-tac-toe
refs/heads/master
/gui.py
from tkinter import * from main import * import const class tile(Button): def __init__(self,id,mainframe): self.name = str(id) super().__init__(mainframe, text = " ", height = 3, width = 7, ...
{"/gui.py": ["/main.py", "/const.py"], "/nn.py": ["/const.py"], "/const.py": ["/Games.py", "/File_storage.py"], "/main.py": ["/File_storage.py", "/nn.py", "/Games.py", "/const.py", "/gui.py"]}
5,546
viraatdas/Deep-tic-tac-toe
refs/heads/master
/File_storage.py
import os import pickle def save_mct(mct): mct_filename = "mct.txt" with open(mct_filename, "wb") as fp: #Pickling pickle.dump(mct, fp) print("Monte Carlo Tree saved correctly") def load_mct(): mct_filename = "mct.txt" if os.path.isfile(mct_filename): # load existing ...
{"/gui.py": ["/main.py", "/const.py"], "/nn.py": ["/const.py"], "/const.py": ["/Games.py", "/File_storage.py"], "/main.py": ["/File_storage.py", "/nn.py", "/Games.py", "/const.py", "/gui.py"]}
5,547
viraatdas/Deep-tic-tac-toe
refs/heads/master
/nn.py
""" Neural network Made by Lorenzo Mambretti """ import tensorflow as tf from tensorflow import keras print("tensorflow: ",tf.__version__) import numpy as np import random import const class NN: """ INPUT LAYER 27 neurons """ x = tf.placeholder(tf.float32,[None, 27], name=...
{"/gui.py": ["/main.py", "/const.py"], "/nn.py": ["/const.py"], "/const.py": ["/Games.py", "/File_storage.py"], "/main.py": ["/File_storage.py", "/nn.py", "/Games.py", "/const.py", "/gui.py"]}
5,548
viraatdas/Deep-tic-tac-toe
refs/heads/master
/const.py
import os from Games import TicTacToe from File_storage import * EPSILON = 0.1 SANITY_CHECK = True cwd = os.getcwd() cwd = cwd + '\\tensorflow_logs' def init(): # create game global game game = TicTacToe() # initialize Monte Carlo tree global mct mct = load_mct() if mct =...
{"/gui.py": ["/main.py", "/const.py"], "/nn.py": ["/const.py"], "/const.py": ["/Games.py", "/File_storage.py"], "/main.py": ["/File_storage.py", "/nn.py", "/Games.py", "/const.py", "/gui.py"]}
5,549
viraatdas/Deep-tic-tac-toe
refs/heads/master
/dd_ttt.py
""" Self-learning Tic Tac Toe Made by Lorenzo Mambretti and Hariharan Sezhiyan """ import random import numpy as np import tensorflow as tf import time import datetime class State: board = np.zeros((3,3)) terminal = False def is_valid(action, state): if state.board[int(np.floor(action / 3))][action % 3] !...
{"/gui.py": ["/main.py", "/const.py"], "/nn.py": ["/const.py"], "/const.py": ["/Games.py", "/File_storage.py"], "/main.py": ["/File_storage.py", "/nn.py", "/Games.py", "/const.py", "/gui.py"]}
5,550
viraatdas/Deep-tic-tac-toe
refs/heads/master
/main.py
""" Self-learning Tic Tac Toe Made by Lorenzo Mambretti Last Update: 8/10/2018 11:38 AM (Lorenzo) """ import random import numpy as np import progressbar from File_storage import * from nn import NN from Games import * import const import math import tensorflow as tf import argparse class Node: ...
{"/gui.py": ["/main.py", "/const.py"], "/nn.py": ["/const.py"], "/const.py": ["/Games.py", "/File_storage.py"], "/main.py": ["/File_storage.py", "/nn.py", "/Games.py", "/const.py", "/gui.py"]}
5,551
viraatdas/Deep-tic-tac-toe
refs/heads/master
/ttt.py
""" Self-learning Tic Tac Toe Made by Lorenzo Mambretti and Hariharan Sezhiyan """ import random import numpy as np import tensorflow as tf class State: board = np.zeros((3,3)) terminal = False def is_valid(action, state): if state.board[int(np.floor(action / 3))][action % 3] != 0: return False ...
{"/gui.py": ["/main.py", "/const.py"], "/nn.py": ["/const.py"], "/const.py": ["/Games.py", "/File_storage.py"], "/main.py": ["/File_storage.py", "/nn.py", "/Games.py", "/const.py", "/gui.py"]}
5,563
ZhouYii/NE_Recognizer
refs/heads/master
/state.py
from document import Document from helper import * from os import listdir import pickle import re from NE_Recognizer import NE_Recognizer from nltk import word_tokenize from os.path import isfile, join class State : def __init__(self) : self.corpus = [] #self.add_corpus("text_extracted") se...
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,564
ZhouYii/NE_Recognizer
refs/heads/master
/load.py
import pickle ner = pickle.load(open("ne_r.pickle", "rb")) print ner
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,565
ZhouYii/NE_Recognizer
refs/heads/master
/nameentity.py
from helper import * from scorable import Scorable class NameEntity(Scorable) : def __init__(self, tok_tuple, is_seed=False) : Scorable.__init__(self) self.name = tok_tuple self.mined_rules = None def init_seed(self, type) : self.is_seed = True self.total = 1 ...
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,566
ZhouYii/NE_Recognizer
refs/heads/master
/RuleFactory.py
''' Rule Factory Singleton ''' from rule import Rule def make_rule() : r = Rule() return r
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,567
ZhouYii/NE_Recognizer
refs/heads/master
/state2.py
''' Implementation of State singleton ''' import ConfigParser from os import listdir from helper import * import re import RuleFactory from document import Document from nameentity import NameEntity from os.path import isfile, join import pickle from nltk import word_tokenize cfg = ConfigParser.ConfigParser() cfg.rea...
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,568
ZhouYii/NE_Recognizer
refs/heads/master
/ner_old.py
from os import listdir #from textblob import TextBlob import re from os.path import isfile, join INPUT = "Raw" LABELS = ["PER", "LOC", "ORG"] #PARAMETERS prom_thresh = 0.5 #To check if a rule is promoted or not CORPUS = [] #DICTIONARIES PER_DICT = [] ORG_DICT = [] LOC_DICT = [] #PROMOTED RULES RULES = [] #CANDIDATE R...
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,569
ZhouYii/NE_Recognizer
refs/heads/master
/scorable.py
from helper import * class Scorable : def __init__(self) : self.is_seed = False self.dictionary = dict() # Max : (max score, type responsible) self.max_type = None self.max_stale = True self.total = 0.0 for t in get_types() : self.dictionary[t] =...
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,570
ZhouYii/NE_Recognizer
refs/heads/master
/rule.py
from helper import * import state2 from scorable import * class Rule(Scorable) : def __init__(self, fwd=None, rev=None) : ''' Sets all parameters to None, to distinguish between never-set and set-to-empty ''' Scorable.__init__(self) self.found_by = set() self.fwd_window = f...
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,571
ZhouYii/NE_Recognizer
refs/heads/master
/run.py
import state2 def mine_rules() : result_set = set() for doc in state2.corpus : for ne in state2.promoted_ne : ne_obj = state2.get_ne_object(ne) if ne_obj != None and ne_obj.mined_rules != None: #Calculation already been done precomputed_rules = [r ...
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,572
ZhouYii/NE_Recognizer
refs/heads/master
/main.py
def print_log(promote_set,dic) : for item in promote_set : print str(item) +" purity:" + str(dic[item].get_max_score())+ " type :" + \ str(dic[item].get_type()) for type in dic[item].dictionary.keys() : print "type:"+str(type) +" : " +str(dic[item].dictionary[type]) ...
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,573
ZhouYii/NE_Recognizer
refs/heads/master
/controller.py
from state import State class Controller : def __init__(self) : self.state = State() def find_rules_tok(self) : for doc in self.state.corpus : for ne in self.state.ne.keys() : candidates = doc.find_rules(ne) ''' prune rules ...
{"/nameentity.py": ["/scorable.py"], "/RuleFactory.py": ["/rule.py"], "/rule.py": ["/state2.py", "/scorable.py"], "/controller.py": ["/state.py"]}
5,578
DandinPower/CryptoAI
refs/heads/main
/ann.py
import keras import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.preprocessing import LabelEncoder, OneHotEncoder from sklearn.compose import ColumnTransformer from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from price import GetData ...
{"/ann.py": ["/price.py"]}
5,579
DandinPower/CryptoAI
refs/heads/main
/price.py
import numpy as np import pandas as pd from binance.client import Client import plotly.graph_objects as go api_key = "hbOfUeQs7wRpllIrZfbXgxRMNudnWybfoyE4MOhtO2nU2iuHta5A21TxHpapWRSY" api_secret = "Zhb9OuU8g3zUmUmabxxZwdL9AGT21eOBTPR7VsUmNUrNxzzO3GvMSuZvNP6BIhxf" client = Client(api_key, api_secret) # 用自己創立的Key,Secret...
{"/ann.py": ["/price.py"]}
5,614
YongminK/gauss-blur-py
refs/heads/master
/design.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'form.ui', # licensing of 'form.ui' applies. # # Created: Sun Apr 7 02:51:25 2019 # by: pyside2-uic running on PySide2 5.12.1 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, QtGui, QtWidgets class...
{"/main.py": ["/design.py"]}
5,615
YongminK/gauss-blur-py
refs/heads/master
/main.py
import numpy as np import cv2 import matplotlib.pyplot as plt import sys from PySide2 import QtWidgets from PySide2.QtWidgets import QLabel from PySide2.QtWidgets import QTableWidget, QTableWidgetItem from PySide2.QtCore import QTranslator import design import os import time img_name = 'test.bmp' img = cv2.imread(im...
{"/main.py": ["/design.py"]}
5,628
meteFANS/metview-python
refs/heads/master
/examples/UC-07-bufr-pandas.py
""" Metview Python use case UC-07-pandas. The Analyst compute simple differences between observations and analysis and use pandas to perform further computations BUFR version - BUFR is not tabular or gridded, but we can use Metview Python framework to extract a particular parameter to a tabular format (geopoints) --...
{"/examples/UC-07-bufr-pandas.py": ["/metview/__init__.py"], "/examples/UC-01.py": ["/metview/__init__.py"], "/examples/UC-04-grib.py": ["/metview/__init__.py"], "/examples/UC-03-bufr.py": ["/metview/__init__.py"], "/metview/__main__.py": ["/metview/__init__.py"], "/examples/UC-07-bufr.py": ["/metview/__init__.py"]}
5,629
meteFANS/metview-python
refs/heads/master
/examples/UC-01.py
""" Metview Python use case UC-01. The Analyst produces plots and files for the Product user -------------------------------------------------------------------------------- 1. Analyst creates plots and files thanks to his Python applications and scripts that benefits from the underlying tools of the framework ---...
{"/examples/UC-07-bufr-pandas.py": ["/metview/__init__.py"], "/examples/UC-01.py": ["/metview/__init__.py"], "/examples/UC-04-grib.py": ["/metview/__init__.py"], "/examples/UC-03-bufr.py": ["/metview/__init__.py"], "/metview/__main__.py": ["/metview/__init__.py"], "/examples/UC-07-bufr.py": ["/metview/__init__.py"]}
5,630
meteFANS/metview-python
refs/heads/master
/examples/UC-04-grib.py
""" Metview Python use case UC-04. The Analyst retrieves, for a given time interval, the values of two parameters and combines their values on the same map -------------------------------------------------------------------------------- 1. Analyst retrieves, for a given time interval, the values of two chosen para...
{"/examples/UC-07-bufr-pandas.py": ["/metview/__init__.py"], "/examples/UC-01.py": ["/metview/__init__.py"], "/examples/UC-04-grib.py": ["/metview/__init__.py"], "/examples/UC-03-bufr.py": ["/metview/__init__.py"], "/metview/__main__.py": ["/metview/__init__.py"], "/examples/UC-07-bufr.py": ["/metview/__init__.py"]}
5,631
meteFANS/metview-python
refs/heads/master
/examples/UC-03-bufr.py
""" Metview Python use case The Python analyst reads some BUFR data and plots it in various ways -------------------------------------------------------------------------------- 1. Python analyst reads BUFR data and plots it using the default style ---------------------------------------------------------------------...
{"/examples/UC-07-bufr-pandas.py": ["/metview/__init__.py"], "/examples/UC-01.py": ["/metview/__init__.py"], "/examples/UC-04-grib.py": ["/metview/__init__.py"], "/examples/UC-03-bufr.py": ["/metview/__init__.py"], "/metview/__main__.py": ["/metview/__init__.py"], "/examples/UC-07-bufr.py": ["/metview/__init__.py"]}
5,632
meteFANS/metview-python
refs/heads/master
/metview/__main__.py
# # Copyright 2017-2019 B-Open Solutions srl. # Copyright 2017-2019 European Centre for Medium-Range Weather Forecasts (ECMWF). # # 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://ww...
{"/examples/UC-07-bufr-pandas.py": ["/metview/__init__.py"], "/examples/UC-01.py": ["/metview/__init__.py"], "/examples/UC-04-grib.py": ["/metview/__init__.py"], "/examples/UC-03-bufr.py": ["/metview/__init__.py"], "/metview/__main__.py": ["/metview/__init__.py"], "/examples/UC-07-bufr.py": ["/metview/__init__.py"]}
5,633
meteFANS/metview-python
refs/heads/master
/examples/seaIce_CO2_correlation.py
# ============================================================================== # Authors: ralf mueller, stephan siemen # # # Plan is to create a plot similar to the scatter plot for co2 concentration and # september minimum of sea ice extent # # reference: # https://www.mpg.de/10579957/W004_Environment_climate_062-...
{"/examples/UC-07-bufr-pandas.py": ["/metview/__init__.py"], "/examples/UC-01.py": ["/metview/__init__.py"], "/examples/UC-04-grib.py": ["/metview/__init__.py"], "/examples/UC-03-bufr.py": ["/metview/__init__.py"], "/metview/__main__.py": ["/metview/__init__.py"], "/examples/UC-07-bufr.py": ["/metview/__init__.py"]}
5,634
meteFANS/metview-python
refs/heads/master
/metview/__init__.py
# # Copyright 2017-2019 B-Open Solutions srl. # Copyright 2017-2019 European Centre for Medium-Range Weather Forecasts (ECMWF). # # 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://ww...
{"/examples/UC-07-bufr-pandas.py": ["/metview/__init__.py"], "/examples/UC-01.py": ["/metview/__init__.py"], "/examples/UC-04-grib.py": ["/metview/__init__.py"], "/examples/UC-03-bufr.py": ["/metview/__init__.py"], "/metview/__main__.py": ["/metview/__init__.py"], "/examples/UC-07-bufr.py": ["/metview/__init__.py"]}
5,635
meteFANS/metview-python
refs/heads/master
/metview/bindings.py
# # Copyright 2017-2019 B-Open Solutions srl. # Copyright 2017-2019 European Centre for Medium-Range Weather Forecasts (ECMWF). # # 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://ww...
{"/examples/UC-07-bufr-pandas.py": ["/metview/__init__.py"], "/examples/UC-01.py": ["/metview/__init__.py"], "/examples/UC-04-grib.py": ["/metview/__init__.py"], "/examples/UC-03-bufr.py": ["/metview/__init__.py"], "/metview/__main__.py": ["/metview/__init__.py"], "/examples/UC-07-bufr.py": ["/metview/__init__.py"]}
5,636
meteFANS/metview-python
refs/heads/master
/examples/UC-07-bufr.py
""" Metview Python use case UC-07. The Analyst compute simple differences between observations and analysis and plot the values BUFR version - BUFR is not tabular or gridded, but we can use Metview Python framework to extract a particular parameter to a tabular format (geopoints) ------------------------------------...
{"/examples/UC-07-bufr-pandas.py": ["/metview/__init__.py"], "/examples/UC-01.py": ["/metview/__init__.py"], "/examples/UC-04-grib.py": ["/metview/__init__.py"], "/examples/UC-03-bufr.py": ["/metview/__init__.py"], "/metview/__main__.py": ["/metview/__init__.py"], "/examples/UC-07-bufr.py": ["/metview/__init__.py"]}
5,658
GregLahaye/wikipedia-game
refs/heads/master
/game.py
import wikipedia def search(root, target): root = wikipedia.check(root) target = wikipedia.check(target) if root and target: if root != target: visited = set([root]) queue = [[root]] found = False print("Finding the shortest route from '{}...
{"/game.py": ["/wikipedia.py"]}
5,659
GregLahaye/wikipedia-game
refs/heads/master
/wikipedia.py
import requests def random(num=1): params = { "format": "json", "action": "query", "generator": "random", "grnnamespace": "0", "grnlimit": num } r = s.get(API_URL, params=params) response = r.json() titles = [item[...
{"/game.py": ["/wikipedia.py"]}
5,660
shrirangbagdi/LogParser
refs/heads/master
/PatternFour.py
import re from datetime import datetime #"[2020-07-07T18:42:01.735] [INFO] ngui - com.unraveldata.ngui.topx.enabled :true" class PatternFour: def __init__(self, line): self.line = line def IsPatternFour(self): try: time_stamp = self.line[1:24] message_type = self.line[...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,661
shrirangbagdi/LogParser
refs/heads/master
/S3BucketParser/S3BucketParser.py
import json import os import boto3 from S3BucketParser.BucketFolderParser import BucketFolderParser s3_object = boto3.resource('s3', aws_access_key_id="****", aws_secret_access_key="****") class S3BucketParser: def __init__(self, bucketName): self.bucketName = bucketName ...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,662
shrirangbagdi/LogParser
refs/heads/master
/LambdaAWSFunction/log_parser.py
import os import boto3 from LambdaAWSFunction.message import message class Log_Parser: def __init__(self): pass def parse_file(self, event): s3 = boto3.resource("s3") file_obj = event["Records"][0] bucket_name = str(file_obj['s3']['bucket']['name']) file_name = str(f...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,663
shrirangbagdi/LogParser
refs/heads/master
/LogParser.py
import json import sys import os from FileParser import FileParser from FolderParser import FolderParser class LogParser: def __init__(self, propertyFile): self.propertyFile = propertyFile self.parseSpecificDate = False def GetSource(self): try: property_file = open(self....
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,664
shrirangbagdi/LogParser
refs/heads/master
/S3BucketParser.py
import json import os import boto3 from BucketFolderParser import BucketFolderParser class S3BucketParser: def __init__(self, bucketName): self.bucketName = bucketName def Parser(self): bucket = self.findBucket() if not bucket: print("Bucket not found!") else: ...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,665
shrirangbagdi/LogParser
refs/heads/master
/LambdaAWSFunction/LambdaFunction.py
import boto3 import json import os from LambdaAWSFunction.log_parser import Log_Parser def lambda_handler(event, context): s3 = boto3.client('s3') bucket = 'ouput-bucket' log = Log_Parser() messages = log.parse_file(event) if messages: file_name = str(event["Records"][0]['s3']['object']...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,666
shrirangbagdi/LogParser
refs/heads/master
/FolderParser.py
import os import boto3 from FileParser import FileParser class FolderParser: def __init__(self, sourcePathway, destinationPathway, startDate=0, endDate=0, pattern=""): self.sourcePathway = sourcePathway self.destinationPathway = destinationPathway self.startDate = startDate self.e...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,667
shrirangbagdi/LogParser
refs/heads/master
/BucketFileParser.py
import boto3 from PatternFour import PatternFour from PatternOne import PatternOne from PatternThree import PatternThree class BucketFileParser: def __init__(self, caseID, fileObject): self.caseID = caseID self.fileObject = fileObject def generateMessages(self): list_of_messages = []...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,668
shrirangbagdi/LogParser
refs/heads/master
/PatternThree.py
#Pattern3="[2020-05-11T16:54:33,500][WARN ][o.e.m.j.JvmGcMonitorService] [unravel_s_1] [gc][1126797] overhead, spent [709ms] collecting in the last [1.2s]" import re from datetime import datetime class PatternThree: def __init__(self, line): self.line = line def IsPatternThree(self): try: ...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,669
shrirangbagdi/LogParser
refs/heads/master
/BucketFolderParser.py
import bz2 import gzip import os import zipfile from io import BytesIO import boto3 from boto3 import s3 from BucketFileParser import BucketFileParser class BucketFolderParser: def __init__(self, obj): self.obj = obj def parseBucketFolder(self): directory = self.obj.key print(direct...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,670
shrirangbagdi/LogParser
refs/heads/master
/Parser.py
import json import re class Parser: def __init__(self, logfile): self.logfile = logfile def ParseFile(self): list_of_warnings = [] log_file = open(self.logfile, 'r') previous_type = "" warning = {} first_iteration = True first_phrase = 0 second_...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,671
shrirangbagdi/LogParser
refs/heads/master
/PatternOne.py
import re from datetime import datetime class PatternOne: def __init__(self, line): self.line = line def IsPatternOne(self): try: time_stamp = self.line[0:23] message_type = self.line.split()[2] return self.IsCorrectTimeStamp(time_stamp) and self.IsCorrectT...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,672
shrirangbagdi/LogParser
refs/heads/master
/FileParser.py
import json import os import re from datetime import datetime from PatternFour import PatternFour from PatternOne import PatternOne from PatternThree import PatternThree class FileParser: def __init__(self, logfile, destinationPathway, dateStart=0, dateEnd=0, pattern=""): self.logfile = logfile ...
{"/LogParser.py": ["/FileParser.py", "/FolderParser.py"], "/S3BucketParser.py": ["/BucketFolderParser.py"], "/LambdaAWSFunction/LambdaFunction.py": ["/LambdaAWSFunction/log_parser.py"], "/FolderParser.py": ["/FileParser.py"], "/BucketFileParser.py": ["/PatternFour.py", "/PatternOne.py", "/PatternThree.py"], "/BucketFol...
5,684
raysmith619/sudoku
refs/heads/master
/src/sudoku.py
# sudoko.py """ This is a program to solve, and someday create, Sudoku puzzles It was adapted from the Perl program sudoku.pl To ease the adaption process the original variable, function and file names, where possible, have been preserved. The Trace.pm module use has been replaced by the select_trace.py module. """ ...
{"/src/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/sudoku_subs.py": ["/sudoku_globals.py"], "/puzzle/SudokuPly.py": ["/sudoku_globals.py"], "/puzzle/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/SudokuBoard.py": ["/sudoku_globals.py"], "/sudoku_subs.py": ["/sudoku_globals.py"]}
5,685
raysmith619/sudoku
refs/heads/master
/puzzle/sudoku_subs.py
# sudoku_subs.py # Top level subs for sudoku.py # imported to workaround the lack of forward referencing subroutines import sys import os from tkinter import filedialog from tkinter import * import time import argparse from math import * from select_trace import SlTrace from select_error import SelectError ...
{"/src/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/sudoku_subs.py": ["/sudoku_globals.py"], "/puzzle/SudokuPly.py": ["/sudoku_globals.py"], "/puzzle/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/SudokuBoard.py": ["/sudoku_globals.py"], "/sudoku_subs.py": ["/sudoku_globals.py"]}
5,686
raysmith619/sudoku
refs/heads/master
/puzzle/sudoku_vals.py
#sudoku_vals.py # Adapted from SudokuData.pm with just values ################# ## sudokuVals ## ################# from select_trace import SlTrace from select_error import SelectError EMPTY = 0 # Empty cell def class CellDesc: """ Cell description """ def __init__(self, row=None...
{"/src/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/sudoku_subs.py": ["/sudoku_globals.py"], "/puzzle/SudokuPly.py": ["/sudoku_globals.py"], "/puzzle/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/SudokuBoard.py": ["/sudoku_globals.py"], "/sudoku_subs.py": ["/sudoku_globals.py"]}
5,687
raysmith619/sudoku
refs/heads/master
/time_example.py
import timeit start = timeit.timeit() print("hello") end = timeit.timeit() print(end - start)
{"/src/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/sudoku_subs.py": ["/sudoku_globals.py"], "/puzzle/SudokuPly.py": ["/sudoku_globals.py"], "/puzzle/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/SudokuBoard.py": ["/sudoku_globals.py"], "/sudoku_subs.py": ["/sudoku_globals.py"]}
5,688
raysmith619/sudoku
refs/heads/master
/src/SudokuData.py
#SudokuData.py # Adapted from SudokuData.pm ################# ## sudokuData ## ################# import re import copy from random import randint from select_trace import SlTrace from select_error import SelectError from sudoku_vals import SudokuVals, CellDesc base=None """ Marker difinition """ clas...
{"/src/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/sudoku_subs.py": ["/sudoku_globals.py"], "/puzzle/SudokuPly.py": ["/sudoku_globals.py"], "/puzzle/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/SudokuBoard.py": ["/sudoku_globals.py"], "/sudoku_subs.py": ["/sudoku_globals.py"]}
5,689
raysmith619/sudoku
refs/heads/master
/sudoku_globals.py
# sudoku_globals.py """ Program Globals We might restucture the program to avoid this at a later date but to push ahead with most of the structure intqct we have these global variables """ from select_trace import SlTrace from resource_group import ResourceGroup from select_control import SelectControl def in...
{"/src/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/sudoku_subs.py": ["/sudoku_globals.py"], "/puzzle/SudokuPly.py": ["/sudoku_globals.py"], "/puzzle/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/SudokuBoard.py": ["/sudoku_globals.py"], "/sudoku_subs.py": ["/sudoku_globals.py"]}
5,690
raysmith619/sudoku
refs/heads/master
/puzzle/SudokuPuzzle.py
#SudokuPuzzle.py # Adapted from SudokuData.py ################# ## sudokuPuzzle ## ################# from select_error import SelectError from SudokuData import SudokuData class SudokuPuzzle(SudokuData): def __init__(self, desc=None, file_name=None, **kwargs): """ :description: Description ...
{"/src/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/sudoku_subs.py": ["/sudoku_globals.py"], "/puzzle/SudokuPly.py": ["/sudoku_globals.py"], "/puzzle/sudoku.py": ["/sudoku_subs.py", "/sudoku_globals.py"], "/puzzle/SudokuBoard.py": ["/sudoku_globals.py"], "/sudoku_subs.py": ["/sudoku_globals.py"]}