index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
21,873
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/testing.py
# ๋„ค์ด๋ฒ„ ์ฃผ์‹ import csv, codecs import urllib import datetime import time import base64 from bs4 import BeautifulSoup import matplotlib.pyplot as plt import requests with codecs.open("jinhyun.csv","w", encoding='euc-kr') as fp: # ํŒŒ์ผ ์ž…์ถœ๋ ฅ ๋Œ€์‹  ๋ฐฉ์ง€ ์˜ค๋ฅ˜ ํšจ๊ณผ ํƒ์›” writer = csv.writer(fp, delimiter=",", quotechar='"') # writer๋ฅผ ์„ ์–ธํ•˜๊ณ ...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,874
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/blogview.py
from .models import state1 class blogView(): def __init__(self): self.a = 0 def blog_all_query(self, ID): query = state1.objects.filter(login_id=ID) return query
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,875
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/urls.py
from django.conf.urls import url from . import views from django.contrib.auth import views as auth_views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^tests', views.tests, name='tests'), url(r'^navertest/$', views.navertest, name='navertest'), url(r'^product',views.product, name='product...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,876
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/views.py
# Create your views here. from django.shortcuts import render from bs4 import BeautifulSoup from django.http import JsonResponse from django.http import HttpResponse from operator import eq from django.db.models import Q from .models import state1,title,KBS,SBS,MBC,JTBC,YTN,dailyEconomy,moneyToday,eDaily,seoulEconomy...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,877
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/migrations/0012_auto_20190203_1930.py
# Generated by Django 2.1.2 on 2019-02-03 10:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('agri_crawler', '0011_word'), ] operations = [ migrations.AddField( model_name='word', name='user_id', fi...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,878
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/migrations/0009_auto_20190201_1648.py
# Generated by Django 2.1.2 on 2019-02-01 07:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('agri_crawler', '0008_naver_nickname'), ] operations = [ migrations.AddField( model_name='koreaeconomy', name='nickna...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,879
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/models.py
# Create your models here. from djongo import models from django import forms from django.contrib.auth.models import User def min_length_3_validator(value): if len(value) < 3: raise forms.ValidationError('3๊ธ€์ž ์ด์ƒ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”') class Signup(models.Model): ID = models.CharField(max_length=100) password = mo...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,880
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/news.py
from bs4 import BeautifulSoup import requests, threading import time from .models import title, state1, KBS,SBS,MBC,JTBC,YTN, dailyEconomy, moneyToday, eDaily, seoulEconomy, koreaEconomy,Emoticon,news_count class news_crawler(threading.Thread): def __init__(self,keyword, sd, ed, ID,media,t,b,d,k,e,c,l,number): ...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,881
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/example_python/gensim.py
from gensim.models import Word2Vec from konlpy.tag import Twitter file = open("output.txt", "r", encoding="utf-8") line = file.read() lines = line.split("\r\n") results = [] twitter = Twitter() for line in lines: r = [] malist = twitter.pos(line, norm=True, stem=True) for (word, pumsa) in malist: ...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,882
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/migrations/0015_blog_count_news_count_twitter_count.py
# Generated by Django 2.1.2 on 2019-02-13 04:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('agri_crawler', '0014_remove_state1_total_count'), ] operations = [ migrations.CreateModel( name='blog_count', fields...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,883
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/GL_ModelCreator.py
''' ๋ชจ๋ธ ์ƒ์„ฑ ๋ชจ๋“ˆ Model Creating Module created by Good_Learning date : 2018-08-21 ๋ชจ๋ธ์„ ์ƒ์„ฑํ•˜๋Š” ๋ถ€๋ถ„์„ ๋งก๋Š”๋‹ค. RNN ์ค‘ LSTM์˜ ์ „๋ฐ˜์ ์ธ ๊ณ„์ธต๊ด€๊ณ„์™€ ๊ตฌ์กฐ, ํ•™์Šต๊ณผ์ •์„ ์—ฌ๊ธฐ์„œ ๊ฒฐ์ •ํ•œ๋‹ค. ''' from sklearn.metrics import mean_squared_error from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM, Dropout from keras.callba...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,884
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/Analysis.py
import math, sys from konlpy.tag import Twitter class BayesianFilter: """ ๋ฒ ์ด์ง€์•ˆ ํ•„ํ„ฐ """ def __init__(self): self.words= set() # ์ถœํ˜„ํ•œ ๋‹จ์–ด ๊ธฐ๋ก self.word_dict = {} # ์นดํ…Œ๊ณ ๋ฆฌ๋งˆ๋‹ค์˜ ์ถœํ˜„ ํšŸ์ˆ˜ ๊ธฐ๋ก self.category_dict = {} #์นดํ…Œ๊ณ ๋ฆฌ ์ถœํ˜„ ํšŸ์ˆ˜ ๊ธฐ๋ก self.word_count={} #๊ฐ๊ฐ์˜ ์›Œ๋“œ ์นด์šดํŠธ ๊ธฐ๋ก def split(self, text): ...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,885
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/example_python/practice_bayes.py
import math,sys from konlpy.tag import Twitter class Bayes: def __init__(self): self.words = set() #,์ถœํ˜„ํ•œ ๋‹จ์–ด ๊ธฐ๋ก self.word_dict = {} # ์นดํ…Œ๊ณ ๋ฆฌ๋งˆ๋‹ค ์ถœํ˜„ ํšŸ์ˆ˜ ๊ธฐ๋ก self.category_list = {} # ์นดํ…Œ๊ณ ๋ฆฌ ์ถœํ˜„ ํšŸ์ˆ˜ ๊ธฐ๋ก # ํ˜•ํƒœ์†Œ ๋ถ„์„ํ•˜๊ธฐ def split(self, text): results = [] twitter = Twitter() mal...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,886
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/daum_comment.py
from selenium import webdriver from bs4 import BeautifulSoup from selenium.webdriver.common.keys import Keys driver = webdriver.Chrome('C:/Users/thdwlsgus0/Desktop/chromedriver_win32/chromedriver.exe') #driver = webdriver.PhantomJS('C:/Users/thdwlsgus0/Desktop/phantomjs-2.1.1-windows/phantomjs-2.1.1-windows/bin/phanto...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,887
thdwlsgus0/vegetable_crawler
refs/heads/master
/agriculture/agriculture/agri_crawler/signup.py
# ์„๋นˆ์ด ์†Œ์Šค ํšŒ์›๊ฐ€์ž… ๋ถ€๋ถ„ from .models import Signup from django.shortcuts import render class signUp(): def __init__(self): self.result= 0 def get(self): return render(request, 'vegetable/signup.html', {}) def post(self, ID, password, email): person_info = Signup() person_info.ID = ...
{"/agriculture/agriculture/agri_crawler/daum_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/forms.py": ["/agriculture/agriculture/agri_crawler/models.py"], "/agriculture/agriculture/agri_crawler/naver_blog.py": ["/agriculture/agriculture/agri_crawler/models.py"], "...
21,900
Krupali0609/SSW567_HW04-1
refs/heads/main
/HW_04_test.py
import unittest from HW_04 import get_repo class TestgetRepo(unittest.TestCase): def test_repo(self): expected = ['User: HeliPatel98', 'Repository: helloworld Number of commits: 2', 'Repository: SSW-567 Number of commits: 2', 'Repository: SSW-695_...
{"/HW_04_test.py": ["/HW_04.py"]}
21,901
Krupali0609/SSW567_HW04-1
refs/heads/main
/HW_04.py
import requests import json def get_repo(user_name = 'HeliPatel98'): output = [] url = 'https://api.github.com/users/{}/repos'.format(user_name) resq = requests.get(url) repos = json.loads(resq.text) output.append('User: {}'.format(user_name)) try: repos[0]['name'] except(TypeError...
{"/HW_04_test.py": ["/HW_04.py"]}
21,902
andriisoroka/restapi
refs/heads/master
/app/api/users.py
from flask_restful import Resource,reqparse from app.jsoongia import Serializer, relationships from flask import request class UserSerializer(Serializer): ref = 'id' type = 'user' attributes = ['name','email','password'] mass = [ {"id":1,"name":"Andrii Soroka","email":'andrii_soroka@ukr.net',"passwor...
{"/app/api/users.py": ["/app/jsoongia/__init__.py"], "/app/router.py": ["/app/__init__.py", "/app/api/users.py"]}
21,903
andriisoroka/restapi
refs/heads/master
/app/__init__.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS from flask_restful import reqparse, abort, Api, Resource app = Flask(__name__) db = SQLAlchemy(app) CORS(app) app.config.from_object('config') api = Api(app) class User(db.Model): id = db.Column(db.Integer, primary_key=Tru...
{"/app/api/users.py": ["/app/jsoongia/__init__.py"], "/app/router.py": ["/app/__init__.py", "/app/api/users.py"]}
21,904
andriisoroka/restapi
refs/heads/master
/app/jsoongia/__init__.py
from .import relationships from .serializers import Serializer
{"/app/api/users.py": ["/app/jsoongia/__init__.py"], "/app/router.py": ["/app/__init__.py", "/app/api/users.py"]}
21,905
andriisoroka/restapi
refs/heads/master
/app/router.py
from app import api from app.api.users import User,UserList api.add_resource(User,'/api/users/<int:id>') api.add_resource(UserList,'/api/users')
{"/app/api/users.py": ["/app/jsoongia/__init__.py"], "/app/router.py": ["/app/__init__.py", "/app/api/users.py"]}
21,906
andriisoroka/restapi
refs/heads/master
/config.py
SQLALCHEMY_DATABASE_URI = "mysql://root:123456@homepc/library"
{"/app/api/users.py": ["/app/jsoongia/__init__.py"], "/app/router.py": ["/app/__init__.py", "/app/api/users.py"]}
21,914
CallThemHunter/AzulAI
refs/heads/master
/Engine/Elements/bag.py
from __future__ import annotations from typing import List, Dict import random class Bag: def __init__(self, tile_types: List[int], tile_count: List[int]): self.tiles: Dict[int, int] = {} for (i, j) in zip(tile_types, tile_count): self.tiles[i] = j def is_empty(self): retu...
{"/Engine/Elements/factory.py": ["/Engine/Elements/bag.py", "/Engine/Elements/center.py"], "/Engine/GameLoop.py": ["/Engine/Player/player.py", "/Engine/Elements/bag.py", "/Engine/Elements/board.py", "/Engine/Elements/center.py", "/Engine/Elements/discard.py", "/Engine/Elements/factory.py"], "/Engine/Elements/board.py":...
21,915
CallThemHunter/AzulAI
refs/heads/master
/Engine/Elements/factory.py
from typing import List from Engine.Elements.bag import Bag from Engine.Elements.center import Center class Factory: def __init__(self, center: Center): self.center = center self.tiles: List[int] = [] def is_empty(self) -> bool: return self.tiles == [] def fill_factory(self, bag:...
{"/Engine/Elements/factory.py": ["/Engine/Elements/bag.py", "/Engine/Elements/center.py"], "/Engine/GameLoop.py": ["/Engine/Player/player.py", "/Engine/Elements/bag.py", "/Engine/Elements/board.py", "/Engine/Elements/center.py", "/Engine/Elements/discard.py", "/Engine/Elements/factory.py"], "/Engine/Elements/board.py":...
21,916
CallThemHunter/AzulAI
refs/heads/master
/Engine/GameLoop.py
from Engine.Player.player import Player from Engine.Elements.bag import Bag from Engine.Elements.board import Board from Engine.Elements.center import Center from Engine.Elements.discard import Discard from Engine.Elements.factory import Factory PlayerCount = int default_bag = { 0: 20, 1: 20, 2: 20, 3:...
{"/Engine/Elements/factory.py": ["/Engine/Elements/bag.py", "/Engine/Elements/center.py"], "/Engine/GameLoop.py": ["/Engine/Player/player.py", "/Engine/Elements/bag.py", "/Engine/Elements/board.py", "/Engine/Elements/center.py", "/Engine/Elements/discard.py", "/Engine/Elements/factory.py"], "/Engine/Elements/board.py":...
21,917
CallThemHunter/AzulAI
refs/heads/master
/Engine/Elements/center.py
class Center: has_starting_tile = True def __init__(self): self.tiles = [] def is_empty(self): return self.tiles == [] def add_tile(self, tile_type: int): self.tiles += [tile_type] def claim_tile(self, color): ret = [] remaining = [] for tile in re...
{"/Engine/Elements/factory.py": ["/Engine/Elements/bag.py", "/Engine/Elements/center.py"], "/Engine/GameLoop.py": ["/Engine/Player/player.py", "/Engine/Elements/bag.py", "/Engine/Elements/board.py", "/Engine/Elements/center.py", "/Engine/Elements/discard.py", "/Engine/Elements/factory.py"], "/Engine/Elements/board.py":...
21,918
CallThemHunter/AzulAI
refs/heads/master
/Engine/Elements/board.py
from typing import List, Dict from Engine.Elements.bag import Bag # 0: Blue # 1: Yellow # 2: Red # 3: Black # 4: Cyan def bag_from_dict(tile_dict: Dict[int, int]): return Bag(list(tile_dict.keys()), list(tile_dict.values())) class Board: end_game_condition_met = False rows: List[int] = [0, 0, 0, 0, 0]...
{"/Engine/Elements/factory.py": ["/Engine/Elements/bag.py", "/Engine/Elements/center.py"], "/Engine/GameLoop.py": ["/Engine/Player/player.py", "/Engine/Elements/bag.py", "/Engine/Elements/board.py", "/Engine/Elements/center.py", "/Engine/Elements/discard.py", "/Engine/Elements/factory.py"], "/Engine/Elements/board.py":...
21,919
CallThemHunter/AzulAI
refs/heads/master
/Engine/Player/ScoringApp.py
import wx from Engine.Elements.board import Board class AzulScoringApp(wx.Frame): board = Board() score = 0 def __init__(self, parent, title): wx.Frame.__init__(self, parent, title=title, size=(400, 300)) self.main_sizer = wx.BoxSizer(wx.VERTICAL) self.score_sizer = wx.BoxSizer(w...
{"/Engine/Elements/factory.py": ["/Engine/Elements/bag.py", "/Engine/Elements/center.py"], "/Engine/GameLoop.py": ["/Engine/Player/player.py", "/Engine/Elements/bag.py", "/Engine/Elements/board.py", "/Engine/Elements/center.py", "/Engine/Elements/discard.py", "/Engine/Elements/factory.py"], "/Engine/Elements/board.py":...
21,920
CallThemHunter/AzulAI
refs/heads/master
/Engine/Elements/discard.py
from Engine.Elements.bag import Bag class Discard(Bag): def __init__(self, bag: Bag): super(Discard, self).__init__(list(bag.tiles.keys()), [0]*len(bag.tiles))
{"/Engine/Elements/factory.py": ["/Engine/Elements/bag.py", "/Engine/Elements/center.py"], "/Engine/GameLoop.py": ["/Engine/Player/player.py", "/Engine/Elements/bag.py", "/Engine/Elements/board.py", "/Engine/Elements/center.py", "/Engine/Elements/discard.py", "/Engine/Elements/factory.py"], "/Engine/Elements/board.py":...
21,921
CallThemHunter/AzulAI
refs/heads/master
/Engine/Player/player.py
from __future__ import annotations from Engine.Elements.board import Board from Engine.Elements.center import Center from Engine.Elements.discard import Discard from Engine.Elements.factory import Factory from typing import List, Union class Player: has_starting_marker = False def __init__(self, player_id: i...
{"/Engine/Elements/factory.py": ["/Engine/Elements/bag.py", "/Engine/Elements/center.py"], "/Engine/GameLoop.py": ["/Engine/Player/player.py", "/Engine/Elements/bag.py", "/Engine/Elements/board.py", "/Engine/Elements/center.py", "/Engine/Elements/discard.py", "/Engine/Elements/factory.py"], "/Engine/Elements/board.py":...
21,923
Parseluni/tree-practice
refs/heads/master
/tests/test_binary_search_tree.py
import pytest from binary_search_tree.tree import Tree @pytest.fixture() def empty_tree() -> Tree(): return Tree() @pytest.fixture() def tree_with_nodes(empty_tree) -> Tree(): empty_tree.add(5, "Peter") empty_tree.add(3, "Paul") empty_tree.add(1, "Mary") empty_tree.add(10, "Karla") empty_tree...
{"/tests/test_binary_search_tree.py": ["/binary_search_tree/tree.py"]}
21,924
Parseluni/tree-practice
refs/heads/master
/binary_search_tree/tree.py
class TreeNode: def __init__(self, key, val = None): if val == None: val = key self.key = key self.value = val self.left = None self.right = None class Tree: def __init__(self): self.root = None # Time Complexity: O(log n) *if balanced # Sp...
{"/tests/test_binary_search_tree.py": ["/binary_search_tree/tree.py"]}
21,977
zyh88/PMU
refs/heads/master
/GAN_MULTI_LSTM_PMU.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.da...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,978
zyh88/PMU
refs/heads/master
/loading_data.py
import numpy as np import pandas as pd import matplotlib.pyplot as plt #%matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.datasets import mnist from...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,979
zyh88/PMU
refs/heads/master
/model event detection accuracy.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.da...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,980
zyh88/PMU
refs/heads/master
/plot paper figures.py
import numpy as np import pandas as pd import matplotlib.pyplot as plt #%matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.datasets import mnist from...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,981
zyh88/PMU
refs/heads/master
/GAN_LSTM_PMU.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import keras from keras.layers import Dense, Dropout, Input,Embedding, Flatten from keras.models import Model,Sequential from keras.datasets import mnist from tqdm import tqdm from keras.layers.advanced_ac...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,982
zyh88/PMU
refs/heads/master
/Threshold.py
import numpy as np import pandas as pd import matplotlib.pyplot as plt #%matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.datasets import mnist from...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,983
zyh88/PMU
refs/heads/master
/GAN and AED.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Activation,Embedding, LSTM, Reshape, CuDNNLSTM, UpSampling2D,Conv2D,Flatten,MaxPooling2D fr...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,984
zyh88/PMU
refs/heads/master
/1225_event_extraction_9_features.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.da...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,985
zyh88/PMU
refs/heads/master
/testPMU1224datasorting.py
# -*- coding: utf-8 -*- """ Created on Tue Jun 25 12:26:15 2019 @author: hamed """ import numpy as np import tensorflow as tf import pandas as pd import os import pickle import matplotlib.pyplot as plt import operator import math import natsort from scipy.io import loadmat from math import ceil #%% # ================...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,986
zyh88/PMU
refs/heads/master
/image.py
window_data=j13[0][323438*20-4000:323438*20+4600] #%% window_median=np.median(window_data) #%% def mad_find(window_size,window_data,eps): # window_size=100 shift=int(window_size/2) # shift=0 data_size=window_data.shape[0] moving_median=[] MAD=[] upperbound=[] lowerbound=[] shift_m...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,987
zyh88/PMU
refs/heads/master
/3 phase v i theta separately.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.da...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,988
zyh88/PMU
refs/heads/master
/PV_GAN_MULTI_LSTM_PMU_dl_data.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense,Activation, Flatten,Dropout, Input, Embedding, LSTM, MaxPooling2D, Reshape, CuDNNLSTM,Conv2DTranspose, Conv2...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,989
zyh88/PMU
refs/heads/master
/GAN_MULTI_LSTM_PMU_twolayer.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.da...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,990
zyh88/PMU
refs/heads/master
/PMU data.py
# -*- coding: utf-8 -*- """ Created on Tue Jun 25 12:26:15 2019 @author: hamed """ import numpy as np import tensorflow as tf import pandas as pd import os import pickle import matplotlib.pyplot as plt import operator import math #%% # ============================================================================= # ==...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,991
zyh88/PMU
refs/heads/master
/one item training.py
# -*- coding: utf-8 -*- """ Created on Sun Oct 20 15:06:42 2019 @author: hamed """ mean=0 while mean!=4: rnd={} for i in range(epochnum): rnd[i]=np.random.randint(low=0,high=N,size=batch_size) # show(rnd[i]) generator= create_generator() discriminator= create_discriminator() ...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,992
zyh88/PMU
refs/heads/master
/last_clustering.py
import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.datasets import mnist from ...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,993
zyh88/PMU
refs/heads/master
/clustering.py
import numpy as np import pandas as pd import matplotlib.pyplot as plt #%matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.datasets import mnist from...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,994
zyh88/PMU
refs/heads/master
/SaveDifferentTypesOfLoad.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.da...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,995
zyh88/PMU
refs/heads/master
/new clustering.py
import numpy as np import pandas as pd import matplotlib.pyplot as plt #%matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.datasets import mnist from...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,996
zyh88/PMU
refs/heads/master
/just test.py
# -*- coding: utf-8 -*- """ Created on Mon Sep 9 14:50:30 2019 @author: hamed """ Index(['Unnamed: 0', 'L1Mag', 'L2Mag', 'L3Mag', 'L1Ang', 'L2Ang', 'L3Ang', 'C1Mag', 'C2Mag', 'C3Mag', 'C1Ang', 'C2Ang', 'C3Ang', 'PA', 'PB', 'PC', 'QA', 'QB', 'QC'], dtype='object') #%% dir='data/Armin_Data/July_03...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,997
zyh88/PMU
refs/heads/master
/testGANtoStatisticmodel.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.da...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,998
zyh88/PMU
refs/heads/master
/journal paper images.py
#%% # ============================================================================= # ============================================================================= # ============================================================================= # # # save heatmap to show correlation between features # ==================...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
21,999
zyh88/PMU
refs/heads/master
/pv pmu data cleaning with features as column.py
# -*- coding: utf-8 -*- """ Created on Tue Jun 25 12:26:15 2019 @author: hamed """ import numpy as np import tensorflow as tf import pandas as pd import os import pickle as pkl import matplotlib.pyplot as plt import operator import math #%% # ==========================================================================...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
22,000
zyh88/PMU
refs/heads/master
/test_GAN_Clasiffication.py
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import os #os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import keras from keras.layers import Dense, Dropout, Input, Embedding, LSTM, Reshape, CuDNNLSTM from keras.models import Model,Sequential from keras.da...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
22,001
zyh88/PMU
refs/heads/master
/pv pmu data cleaning.py
# -*- coding: utf-8 -*- """ Created on Tue Jun 25 12:26:15 2019 @author: hamed """ import numpy as np import tensorflow as tf import pandas as pd import os import pickle as pkl import matplotlib.pyplot as plt import operator import math #%% # ===========================================================================...
{"/plot paper figures.py": ["/loading_data.py"], "/Threshold.py": ["/loading_data.py"], "/clustering.py": ["/loading_data.py"], "/new clustering.py": ["/loading_data.py"]}
22,028
Wadwadw/Weather-bot
refs/heads/master
/tele_bot.py
from aiogram import Bot, Dispatcher, executor, types import logging import parce API_TOKEN = '#######################' logging.basicConfig(level=logging.INFO) bot = Bot(token=API_TOKEN) dp = Dispatcher(bot) @dp.message_handler(commands=['start']) async def send_welcome(message: types.Message): await message....
{"/tele_bot.py": ["/parce.py"]}
22,029
Wadwadw/Weather-bot
refs/heads/master
/parce.py
import requests as re import bs4 def parce(city='ะฟะฐะฒะปะพะณั€ะฐะด'): URL = 'https://sinoptik.ua/ะฟะพะณะพะดะฐ-' + city page = re.get(URL) wth = bs4.BeautifulSoup(page.text, "html.parser") description = [div['title'] for div in wth.find_all('div', title=True)] result = [f'ะŸะพะณะพะดะฐ ะฒ ะณะพั€ะพะดะต {city} ะฝะฐ 7 ะดะฝะตะน\n'] ...
{"/tele_bot.py": ["/parce.py"]}
22,069
louzounlab/SubGraphs
refs/heads/master
/model_runner.py
import math import time import os from random import shuffle import matplotlib.pyplot as plt import numpy as np import torch import torch.optim as optim import nni import logging import networkx as nx from loggers import EmptyLogger, CSVLogger, PrintLogger, FileLogger, multi_logger from model import GCN, GatNet from pr...
{"/model_runner.py": ["/pre_peocess.py"]}
22,070
louzounlab/SubGraphs
refs/heads/master
/pre_peocess.py
import networkx as nx import pickle import numpy as np import os # dataSetName = "PubMed" # num_classes = 3 # avarage_deg = 4.496018664096972 'DataSets: ' \ 'dataSetName = "cora"; num_classes = 7; avarage_deg = 3.8980797636632203' \ 'dataSetName = "CiteSeer"; num_classes = 6; avarage_deg = 2.7363991584009617' \ 'd...
{"/model_runner.py": ["/pre_peocess.py"]}
22,072
zirconium-n/OFE
refs/heads/master
/OFE/OFE_Panels.py
Panel_Name = ['Void', 'Neutral', 'Check', 'Encounter', 'Draw', 'Bonus', 'Drop', 'Warp', 'Draw_2', 'Bonus_2', 'Drop_2', 'Deck', 'Encounter_2', 'Move', 'Move_2', 'WarpMove', 'WarpMove_2', 'Snow', 'Ice', 'Heal', 'Heal_2','Boss','Damage','Damage_2'] Panel_Int = [0,1,2,3,4,5,6,7,8,9,10,18,20,21,22,23,24,25,26,27,28,31,32,...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,073
zirconium-n/OFE
refs/heads/master
/OFE/OFE_Graphics.py
import os from PIL import Image class OFE_Graphics: def __init__(self, zoom_list, path): #ๅˆๅง‹ๅŒ– self.zoom_list = zoom_list #ๅฐ†path็›ฎๅฝ•ไธ‹ๆ‰€ๆœ‰ๆ–‡ไปถ๏ผˆไธๅŒ…ๅซๅ…ถไธ‹็บง็›ฎๅฝ•๏ผ‰๏ผŒ่‹ฅ่ƒฝๆ‰“ๅผ€๏ผŒๅ…จ้ƒจๅญ˜ๅ…ฅใ€‚ print('[Loading images...]') self.img_o_dict = {} bad_img = [] for file_name in os.listdir(path): try: img = Image.open(path + '/' + file_...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,074
zirconium-n/OFE
refs/heads/master
/OFE/OFE_Canvas.py
#OFE_Canvas import sys, os import copy from PyQt5 import QtGui, QtWidgets, QtCore from PIL import Image from PIL.ImageQt import ImageQt from OFE.OFE_Field import OFE_Field from OFE.OFE_Image import OFE_Image from OFE import Panel_Int, Panel_Name, Button_Brush_Int #ๆ น็›ฎๅฝ• path0 = os.path.dirname(__file__) #ๆŒ‰็…งlist[y][x]ๅˆถ...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,075
zirconium-n/OFE
refs/heads/master
/OFE/__init__.py
from .OFE_Panels import Panel_Int, Panel_Name, Button_Brush_Int from .OFE_Field import OFE_Field from .OFE_Buttoms import ButtonWindow from .OFE_Status import StatusWindow from .OFE_Canvas import Canvas_Tab from .OFE_Files import OFE_Upload, OFE_New, OFE_Files from .OFE_Graphics import OFE_Graphics
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,076
zirconium-n/OFE
refs/heads/master
/setup.py
from setuptools import setup setup(name='OrangeFieldEditor', version='0.1.4', description='100% Orange Field Editor', url='https://github.com/zirconium-n/OFE', author='lhw & sgk', license='MIT', packages=['OFE'], install_requires=[ 'PyQt5', 'pillow' ...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,077
zirconium-n/OFE
refs/heads/master
/OFE/OFE_Image.py
#OFE_Image from PIL import Image import sys, os from OFE import Panel_Int, Panel_Name import time #ๆ น็›ฎๅฝ• path0 = os.path.dirname(__file__) ##ๅˆๅง‹ๅŠ ่ฝฝๅ›พ็‰‡ # ๅ›พ็‰‡ๆ˜ ๅฐ„่กจ Panel_Dict = {} for i, id in enumerate(Panel_Int): Panel_Dict[id] = Panel_Name[i] Arrow_Name = ['Left', 'Up', 'Right', 'Down'] class OFE_Image(): def __i...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,078
zirconium-n/OFE
refs/heads/master
/OFE/OFE_Buttoms.py
#OFE_Buttoms import sys, os from PIL import Image from PIL.ImageQt import ImageQt from PyQt5 import QtGui, QtWidgets, QtCore from OFE import Panel_Int, Panel_Name #ๆ น็›ฎๅฝ• path0 = os.path.dirname(os.path.realpath(sys.argv[0])) #ๅ›พ็‰‡ๆ ผๅผ่ฝฌๆข def ICON(img): ImgQt = ImageQt(img) pixmap = QtGui.QPixmap.fromImage(ImgQt) icon = Qt...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,079
zirconium-n/OFE
refs/heads/master
/OFE/OFE_Files.py
import sys, os import zipfile from PIL import Image from PIL.ImageQt import ImageQt from PyQt5 import QtWidgets, QtCore, QtGui from OFE.OFE_Field import OFE_Field from OFE.OFE_Image import OFE_Image import tempfile import shutil #็งป้™คpakไธญ็š„ๆŒ‡ๅฎšๆ–‡ไปถ def remove_from_zip(zipfname, *filenames): tempdir = tempfile.mkdtemp() t...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,080
zirconium-n/OFE
refs/heads/master
/OFE/OFE_Field.py
#OFE_Field import struct import math class OFE_Field: def __init__(self, order = None, parameter = None): self.data = None #ๆ–ฐๅปบ if order == 'new': X, Y = parameter self.data = [] for j in range(Y): self.data.append([]) for i in range(X): self.data[j].append([0,0]) #ไปŽๆ–‡ไปถ่ฏปๅ– if order...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,081
zirconium-n/OFE
refs/heads/master
/OFE/OFE_Status.py
from PyQt5 import QtGui, QtWidgets, QtCore class StatusWindow(QtWidgets.QWidget): def __init__(self, parent = None): QtWidgets.QWidget.__init__(self, parent) #ๅˆๅง‹ๅŒ– self.Status = {} #ๅˆๅง‹ๅ‚ๆ•ฐ self.Status['History_Len'] = 0 self.Status['History_Pos'] = 1 self.Status['Last_Action'] = 'None' self.Status['Se...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,082
zirconium-n/OFE
refs/heads/master
/OFE/OFE_main.py
import sys, os import re, struct from PyQt5 import QtGui, QtWidgets, QtCore from PIL import Image from PIL.ImageQt import ImageQt from OFE.OFE_Field import OFE_Field from OFE import ButtonWindow from OFE import StatusWindow from OFE import Canvas_Tab from OFE import OFE_Upload, OFE_New, OFE_Files from OFE.OFE_Graphics...
{"/OFE/OFE_Canvas.py": ["/OFE/OFE_Field.py", "/OFE/OFE_Image.py", "/OFE/__init__.py"], "/OFE/__init__.py": ["/OFE/OFE_Panels.py", "/OFE/OFE_Field.py", "/OFE/OFE_Buttoms.py", "/OFE/OFE_Status.py", "/OFE/OFE_Canvas.py", "/OFE/OFE_Files.py", "/OFE/OFE_Graphics.py"], "/OFE/OFE_Image.py": ["/OFE/__init__.py"], "/OFE/OFE_But...
22,099
dschien/shareapp
refs/heads/master
/api/models.py
from django.db import models from django.contrib.auth.models import User from django_extensions.db.models import TimeStampedModel class UserProfile(models.Model): """ """ user = models.OneToOneField(User, verbose_name="django authentication user", related_name='user_profile') peers = models.ForeignKe...
{"/api/views.py": ["/api/models.py"], "/shareapp/urls.py": ["/api/models.py"], "/api/tests.py": ["/api/models.py"]}
22,100
dschien/shareapp
refs/heads/master
/shareapp/local_settings_template.py
import sys __author__ = 'schien' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'shareapp', 'USER': 'shareapp', 'HOST': 'localhost', 'PORT': '', 'PASSWORD': '', } } # disable south for testing SOUTH_TESTS_MIGRATE = False # To disable m...
{"/api/views.py": ["/api/models.py"], "/shareapp/urls.py": ["/api/models.py"], "/api/tests.py": ["/api/models.py"]}
22,101
dschien/shareapp
refs/heads/master
/api/views.py
import json from django.contrib.auth.models import User from django.http import HttpResponse # Create your views here. from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions import AllowAny from api.models import Item, Transaction @api_view(['POST']) # @authentication_cl...
{"/api/views.py": ["/api/models.py"], "/shareapp/urls.py": ["/api/models.py"], "/api/tests.py": ["/api/models.py"]}
22,102
dschien/shareapp
refs/heads/master
/shareapp/urls.py
# from django.conf.urls.defaults import url, patterns, include from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User, Group from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic import TemplateView from rest_framew...
{"/api/views.py": ["/api/models.py"], "/shareapp/urls.py": ["/api/models.py"], "/api/tests.py": ["/api/models.py"]}
22,103
dschien/shareapp
refs/heads/master
/api/tests.py
from django.test import TestCase from rest_framework.test import APITestCase from django.core.urlresolvers import reverse # Create your tests here. from api.models import Item class ShareappTests(APITestCase): """ API functions for app login """ fixtures = ['test_data.json'] def test_anon_logging...
{"/api/views.py": ["/api/models.py"], "/shareapp/urls.py": ["/api/models.py"], "/api/tests.py": ["/api/models.py"]}
22,108
xiaolin1529/pythonspider
refs/heads/master
/demoSpider/items.py
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy class DemospiderItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass class HuanQiuItem(scrapy.It...
{"/demoSpider/spiders/demo_Spider.py": ["/demoSpider/items.py"]}
22,109
xiaolin1529/pythonspider
refs/heads/master
/demoSpider/spiders/demo_Spider.py
import scrapy as scrapy import json from demoSpider.items import HuanQiuItem class demo_Spider(scrapy.Spider): name = 'demo_Spider1' allowed_domains = ['china.huanqiu.com'] start_urls = ['https://china.huanqiu.com/api/list2?node=/e3pmh1nnq/e7tl4e309&offset=0&limit=25'] # ่‡ชๅฎšไน‰้…็ฝฎๆ–‡ไปถ custom_settings ...
{"/demoSpider/spiders/demo_Spider.py": ["/demoSpider/items.py"]}
22,110
xiaolin1529/pythonspider
refs/heads/master
/demoSpider/pipelines.py
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html import pymysql from twisted.enterprise import adbapi import settings class DemospiderPipeline(object): def process_item...
{"/demoSpider/spiders/demo_Spider.py": ["/demoSpider/items.py"]}
22,124
mawei1191546352/Commerce-Full-Stack-Web-App-using-Django
refs/heads/master
/auctions/views.py
from django.utils import timezone from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login, logout from django.db import IntegrityError from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from...
{"/auctions/views.py": ["/auctions/models.py"], "/auctions/admin.py": ["/auctions/models.py"]}
22,125
mawei1191546352/Commerce-Full-Stack-Web-App-using-Django
refs/heads/master
/auctions/admin.py
from django.contrib import admin # Register your models here. from .models import Listing, Bids, Comments admin.site.register(Listing) admin.site.register(Bids) admin.site.register(Comments)
{"/auctions/views.py": ["/auctions/models.py"], "/auctions/admin.py": ["/auctions/models.py"]}
22,126
mawei1191546352/Commerce-Full-Stack-Web-App-using-Django
refs/heads/master
/auctions/migrations/0002_auto_20210201_0447.py
# Generated by Django 3.1.5 on 2021-02-01 04:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auctions', '0001_initial'), ] operations = [ migrations.AlterField( model_name='bids', name='offer', fie...
{"/auctions/views.py": ["/auctions/models.py"], "/auctions/admin.py": ["/auctions/models.py"]}
22,127
mawei1191546352/Commerce-Full-Stack-Web-App-using-Django
refs/heads/master
/auctions/urls.py
from django.urls import path from . import views urlpatterns = [ path("", views.index, name="index"), path("landing", views.landing_page, name="landing"), path("login", views.login_view, name="login"), path("logout", views.logout_view, name="logout"), path("register", views.register, name="registe...
{"/auctions/views.py": ["/auctions/models.py"], "/auctions/admin.py": ["/auctions/models.py"]}
22,128
mawei1191546352/Commerce-Full-Stack-Web-App-using-Django
refs/heads/master
/auctions/models.py
from django.contrib.auth.models import AbstractUser from django.db import models class User(AbstractUser): pass class Listing(models.Model): title = models.CharField(max_length=50) description = models.TextField(max_length=1000) size = models.CharField(max_length=10, blank=True) price = models.Po...
{"/auctions/views.py": ["/auctions/models.py"], "/auctions/admin.py": ["/auctions/models.py"]}
22,131
Casey-S/CS1
refs/heads/master
/Gradebook/oop_classroom.py
from oop_students import Student class Classroom(Student): # Start of classroom class. def __init__(self, class_name, teacher_name): # Create class with class name, teacher name, and roster array. self.class_name = class_name self.teacher_name = teacher_name self.roster = {} ...
{"/test_hangman.py": ["/hangman.py"]}
22,132
Casey-S/CS1
refs/heads/master
/pythonIO/pythonIO.py
f = open('example.txt') text = f.read() f.close() # Automatically close text file once done with open('example.txt', 'w') as f: f.write("Test words") with open('example.txt') as f: text = f.read() print(text) with open("example.txt", 'a') as f: f.write('line 1 \n') f.write('line 2 \n') with op...
{"/test_hangman.py": ["/hangman.py"]}
22,133
Casey-S/CS1
refs/heads/master
/pythonIO/sales_data.py
with open('sales_data.txt') as f: index = 0 for index, line in enumerate(f): index += 1 print(index) with open('sales_data.txt') as f: feb_list = [] for index, line in enumerate(f): slash_pos = line.index('/') if line[slash_pos - 1] is "2" and line[slash_pos - 2] is not "1": ...
{"/test_hangman.py": ["/hangman.py"]}
22,134
Casey-S/CS1
refs/heads/master
/Gradebook/oop_students.py
class Student(object): # Start of student class def __init__(self, name, ID): # Create student object with name and ID, create assignments dict. self.name = name self.ID = ID self.assignments = {} def add_assignment(self, assignment_name, score): # Add student assig...
{"/test_hangman.py": ["/hangman.py"]}
22,135
Casey-S/CS1
refs/heads/master
/Gradebook/test_students.py
from oop_students import Student def setup_student(): # Create a new student entry. student = Student("Jeffrey Lebowski", 42) return student def setup_student_assignments(): # Add assignments to new student entry. student = setup_student() student.assignments = {"Retrieve Rug": 0, "Bowl": 70...
{"/test_hangman.py": ["/hangman.py"]}
22,136
Casey-S/CS1
refs/heads/master
/oop_test.py
# Implement the Animal superclass here class Animal(object): population = 0 def __init__(self, name): Animal.population += 1 self.name = name @classmethod def populationCount(cls): return population def sleep(self): print("%s sleeps for 8 hours" % self.name) d...
{"/test_hangman.py": ["/hangman.py"]}
22,137
Casey-S/CS1
refs/heads/master
/fizzbuzz.py
def fizzbuzz(): user_number = input("Enter a number: ") if user_number % 3 == 0: print("fizz") if user_number % 5 == 0: print("buzz") if user_number % 3 != 0 and user_number % 5 != 0: print(user_number) fizzbuzz()
{"/test_hangman.py": ["/hangman.py"]}
22,138
Casey-S/CS1
refs/heads/master
/roulette.py
# Build a working roulette game. At minimum, this script should # Complete one round of roulette - but if you're up to the challenge, # feel free to build a full command line interface through which import random random.seed(random) bank_account = 1000 # bet_amount = 0 bet_color = None bet_number = None green = [0,...
{"/test_hangman.py": ["/hangman.py"]}
22,139
Casey-S/CS1
refs/heads/master
/hangman.py
import random def loadWord(): ''' Opens words.txt file as variable f. Saves read lines to variable wordsList, then removes spaces from words. Chooses a random word from wordsList and saves it as variable secretWord, then returns it. ''' f = open('words.txt', 'r') wordsList = f.readline...
{"/test_hangman.py": ["/hangman.py"]}
22,140
Casey-S/CS1
refs/heads/master
/Gradebook/test_classroom.py
from oop_classroom import Classroom def setup_classroom(): classroom = Classroom("CS1", "Yo Mamma") return classroom def test_add_student_to_roster(): classroom = setup_classroom() classroom.add_student("Test Student", 22) assert classroom.roster == {"Test Student": 22}
{"/test_hangman.py": ["/hangman.py"]}
22,141
Casey-S/CS1
refs/heads/master
/pythonIO/nasa_api.py
import requests start_date = '2017-10-21' end_date = '2017-10-22' nasa_response = requests.get('https://api.nasa.gov/neo/rest/v1/feed?start_date={}&end_date={}&api_key=DEMO_KEY'.format(start_date, end_date)) print(nasa_response.text)
{"/test_hangman.py": ["/hangman.py"]}
22,142
Casey-S/CS1
refs/heads/master
/test_hangman.py
import hangman import pytest ''' def isWordGuessed(secretWord, correctGuesses): secretWord: string, the random word the user is trying to guess. This is selected on line 9. correctGuesses: list of letters that have been guessed correctly so far. returns: boolean, True if all letters of secretWord are ...
{"/test_hangman.py": ["/hangman.py"]}
22,143
Casey-S/CS1
refs/heads/master
/algo.py
# beginning_number = input("Enter beginning number: ") # ending_number = input("Enter ending number: ") # def is_palindrome(input_string): # split_str = list(input_string) # # if "" in split_str: # print("Space") # if split_str[0] == split_str[-1] and split_str[1] == split_str[-2]: # print...
{"/test_hangman.py": ["/hangman.py"]}
22,148
megaturbo/timbreuse
refs/heads/master
/timbreuse.py
from flask import Flask, \ render_template from flask_sqlalchemy import SQLAlchemy from config import DevelopmentConfig as Config from flask.ext.login import LoginManager from flask import Flask, session, request, flash, url_for, redirect, render_template, abort, g from flask.ext.login import login_user, logout_user,...
{"/timbreuse.py": ["/models.py"], "/models.py": ["/timbreuse.py"]}
22,149
megaturbo/timbreuse
refs/heads/master
/models.py
from timbreuse import db from werkzeug.security import generate_password_hash, \ check_password_hash class User(db.Model): id = db.Column(db.Integer , primary_key=True) username = db.Column('username', db.String(20), unique=True , index=True) pw_hash = db.Column('pw_hash' , db.String(66)) current...
{"/timbreuse.py": ["/models.py"], "/models.py": ["/timbreuse.py"]}