index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
22,674
HadrienRenaud/simple-calculator-kata
refs/heads/master
/calculator.py
import re from logger import ILogger, IWebserver class Calculator: @staticmethod def add(inputs: str): if len(inputs) == 0: ILogger.write(0) return 0 else: delimiters = r'[,\n]' if re.match(r'^//.+$', inputs.split('\n')[0]): deli...
{"/test_calculator.py": ["/calculator.py"], "/calculator.py": ["/logger.py"]}
22,684
farazmazhar/Tweet-miner-py
refs/heads/master
/executioner.py
# -*- coding: utf-8 -*- """ Created on Sat Feb 10 18:23:50 2018 @author: faraz """ import tweepy from tweepy import OAuthHandler import json import argparse import urllib.request import os import operator from collections import Counter from nltk.corpus import stopwords import string import streamListener as sl imp...
{"/executioner.py": ["/streamListener.py"]}
22,685
farazmazhar/Tweet-miner-py
refs/heads/master
/streamListener.py
# -*- coding: utf-8 -*- """ Created on Sat Feb 10 18:58:45 2018 @author: faraz Reference: https://marcobonzanini.com/2015/03/02/mining-twitter-data-with-python-part-1/ """ from tweepy import Stream from tweepy.streaming import StreamListener class MyListener(StreamListener): def on_data(self, data): ...
{"/executioner.py": ["/streamListener.py"]}
22,692
ljm625/p4-srv6-usid
refs/heads/master
/mininet/topo-6r.py
#!/usr/bin/python # Copyright 2019-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
{"/mininet/topo-6r.py": ["/mininet/topo.py"]}
22,693
ljm625/p4-srv6-usid
refs/heads/master
/mininet/topo.py
#!/usr/bin/python # Copyright 2019-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
{"/mininet/topo-6r.py": ["/mininet/topo.py"]}
22,694
ljm625/p4-srv6-usid
refs/heads/master
/mininet/ipv6_sr.py
#!/usr/bin/python from mininet.topo import Topo from mininet.net import Mininet from mininet.node import Node from mininet.log import setLogLevel, info from mininet.cli import CLI class IPv6Node( Node ): def config( self, ipv6, ipv6_gw=None, **params ): super( IPv6Node, self).config( **params ) s...
{"/mininet/topo-6r.py": ["/mininet/topo.py"]}
22,695
ljm625/p4-srv6-usid
refs/heads/master
/mininet/host6.py
# Copyright 2019-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
{"/mininet/topo-6r.py": ["/mininet/topo.py"]}
22,768
enanablancaynumeros/company_test_1
refs/heads/master
/api/setup.py
from setuptools import setup, find_packages setup( name="api", # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html version="1.0.0", include_package_...
{"/test_roman_calculator.py": ["/api/roman_api/roman_calculator.py"], "/api/roman_api/app.py": ["/api/roman_api/roman_calculator.py"]}
22,769
enanablancaynumeros/company_test_1
refs/heads/master
/api/roman_api/roman_calculator.py
import ast import operator class InvalidRomanInput(Exception): pass class InvalidCalculatorInput(Exception): pass roman_int_map = {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000} def char_to_int(char: str) -> int: try: return roman_int_map[char] except KeyError as e: ...
{"/test_roman_calculator.py": ["/api/roman_api/roman_calculator.py"], "/api/roman_api/app.py": ["/api/roman_api/roman_calculator.py"]}
22,770
enanablancaynumeros/company_test_1
refs/heads/master
/test_roman_calculator.py
import pytest from api.roman_api.roman_calculator import ( roman_to_int, InvalidRomanInput, InvalidCalculatorInput, int_to_roman, roman_calculator, ) @pytest.mark.parametrize( "roman_text,expected", [ ("I", 1), ("III", 3), ("IV", 4), ("VI", 6), ("XI...
{"/test_roman_calculator.py": ["/api/roman_api/roman_calculator.py"], "/api/roman_api/app.py": ["/api/roman_api/roman_calculator.py"]}
22,771
enanablancaynumeros/company_test_1
refs/heads/master
/api/roman_api/app.py
import os from flask import Flask, render_template, request, flash from flask_wtf import FlaskForm from flask_bootstrap import Bootstrap from wtforms import SubmitField, StringField from .roman_calculator import roman_calculator, InvalidCalculatorInput app = Flask(__name__) bootstrap = Bootstrap(app) app.config["SE...
{"/test_roman_calculator.py": ["/api/roman_api/roman_calculator.py"], "/api/roman_api/app.py": ["/api/roman_api/roman_calculator.py"]}
22,779
undera/customfunctions
refs/heads/master
/calculatefn.py
import logging from graphite.render.datalib import TimeSeries from graphite.render import functions def centered_mov_avg(requestContext, seriesList, windowSize): windowInterval = None if isinstance(windowSize, basestring): delta = functions.parseTimeOffset(windowSize) windowInterval = abs(del...
{"/__init__.py": ["/calculatefn.py", "/seglinr.py"]}
22,780
undera/customfunctions
refs/heads/master
/__init__.py
import logging from graphite.render.functions import SeriesFunctions import calculatefn import seglinr SeriesFunctions['segLinReg'] = seglinr.seg_lin_reg SeriesFunctions['segLinRegAuto'] = seglinr.seg_lin_reg_auto SeriesFunctions['centeredMovingAverage'] = calculatefn.centered_mov_avg SeriesFunctions['percentileOfE...
{"/__init__.py": ["/calculatefn.py", "/seglinr.py"]}
22,781
undera/customfunctions
refs/heads/master
/seglinr.py
import logging import seglinreg def seg_lin_reg(request_context, series_list, segment_count=3): """ Graphs the segmented linear regression requires python-numpy python-scipy segmentCount must be > 2 """ for series in series_list: series.name = "segLinReg(%s,%s)" % (series.name, se...
{"/__init__.py": ["/calculatefn.py", "/seglinr.py"]}
22,783
terrytsan/OccupancyDetection
refs/heads/master
/Body.py
class Body: def __init__(self, id, location): # History of the body's locations [x,y] of centroid self.visited = [] # Current location of the body self.location = location self.ID = id # Represents the current direction of the body (0 is out of train) (out is down the screen) self.direction = 0 sel...
{"/ObjectTrackerTest.py": ["/BodyTracker.py"], "/BodyTracker.py": ["/Body.py"], "/ObjectDetection.py": ["/BodyTracker.py", "/Body.py"]}
22,784
terrytsan/OccupancyDetection
refs/heads/master
/ObjectTrackerTest.py
# This is used to test the ObjectTracker class import cv2 import numpy as np from BodyTracker import BodyTracker obTrack = BodyTracker() # rectangles = [] rectangles = [[300, 200, 50, 50], [104, 190, 50, 50], [600, 300, 50, 50]] objects = obTrack.update(rectangles) rectangles = [[0, 220, 50, 50], [600, 320, 50, 50],...
{"/ObjectTrackerTest.py": ["/BodyTracker.py"], "/BodyTracker.py": ["/Body.py"], "/ObjectDetection.py": ["/BodyTracker.py", "/Body.py"]}
22,785
terrytsan/OccupancyDetection
refs/heads/master
/BodyTracker.py
# A body tracker keeps track of a set of rectangles it is given, assigning unique IDs to each one # update the tracker with some new rectangles and it will return a dictionary of bodies from scipy.spatial import distance as dist import numpy as np from Body import Body import logging # Logging configuration logger = lo...
{"/ObjectTrackerTest.py": ["/BodyTracker.py"], "/BodyTracker.py": ["/Body.py"], "/ObjectDetection.py": ["/BodyTracker.py", "/Body.py"]}
22,786
terrytsan/OccupancyDetection
refs/heads/master
/ObjectDetection.py
import logging import cv2 import numpy as np from BodyTracker import BodyTracker from Body import Body # constants video = "example_01.mp4" #video = "marbles5.mp4" videoScaleFactor = 0.4 # videoScaleFactor = 1 # minimum area of contour before they are considered minArea = 800 # Toggle writing output to file writeToFil...
{"/ObjectTrackerTest.py": ["/BodyTracker.py"], "/BodyTracker.py": ["/Body.py"], "/ObjectDetection.py": ["/BodyTracker.py", "/Body.py"]}
22,796
SteveMitto/instagram
refs/heads/master
/insta/migrations/0010_auto_20191011_1826.py
# Generated by Django 2.2.5 on 2019-10-11 15:26 from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('insta', '0009_auto_20191011_1638'), ] operations = [ ...
{"/insta/views.py": ["/insta/models.py", "/insta/forms.py"], "/insta/admin.py": ["/insta/models.py"], "/insta/forms.py": ["/insta/models.py"]}
22,797
SteveMitto/instagram
refs/heads/master
/insta/migrations/0005_auto_20191011_1434.py
# Generated by Django 2.2.5 on 2019-10-11 11:34 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('insta', '0004_comment_image_like'), ] operations = [ migrations.RemoveField( model_name='image', name='profile', ), ...
{"/insta/views.py": ["/insta/models.py", "/insta/forms.py"], "/insta/admin.py": ["/insta/models.py"], "/insta/forms.py": ["/insta/models.py"]}
22,798
SteveMitto/instagram
refs/heads/master
/insta/views.py
from django.shortcuts import render,redirect,get_object_or_404 from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import Image,Like,Comment,Profile,Tags,Follow from django.http import JsonResponse from .forms import UpdateProfile,UpdateProfilePhoto,PostImage ...
{"/insta/views.py": ["/insta/models.py", "/insta/forms.py"], "/insta/admin.py": ["/insta/models.py"], "/insta/forms.py": ["/insta/models.py"]}
22,799
SteveMitto/instagram
refs/heads/master
/insta/models.py
from django.db import models as md from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Tags(md.Model): tag = md.TextField() def __str__(self): return f'{self.tag}' class Meta: ordering=['tag'] class Image(md...
{"/insta/views.py": ["/insta/models.py", "/insta/forms.py"], "/insta/admin.py": ["/insta/models.py"], "/insta/forms.py": ["/insta/models.py"]}
22,800
SteveMitto/instagram
refs/heads/master
/insta/urls.py
from django.urls import path from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('',views.home ,name='home'), path('signup/',views.signup,name='signup'), path('<username>' , views.profile, name='profile'), path('unfollow/', views.unfollow)...
{"/insta/views.py": ["/insta/models.py", "/insta/forms.py"], "/insta/admin.py": ["/insta/models.py"], "/insta/forms.py": ["/insta/models.py"]}
22,801
SteveMitto/instagram
refs/heads/master
/insta/migrations/0011_auto_20191011_1828.py
# Generated by Django 2.2.5 on 2019-10-11 15:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('insta', '0010_auto_20191011_1826'), ] operations = [ migrations.AlterField( model_name='profile', name='profile_pic'...
{"/insta/views.py": ["/insta/models.py", "/insta/forms.py"], "/insta/admin.py": ["/insta/models.py"], "/insta/forms.py": ["/insta/models.py"]}
22,802
SteveMitto/instagram
refs/heads/master
/insta/admin.py
from django.contrib import admin from .models import Image,Like,Comment,Profile,Tags,Follow # Register your models here. admin.site.register(Image) admin.site.register(Profile) admin.site.register(Comment) admin.site.register(Tags) admin.site.register(Follow) admin.site.register(Like)
{"/insta/views.py": ["/insta/models.py", "/insta/forms.py"], "/insta/admin.py": ["/insta/models.py"], "/insta/forms.py": ["/insta/models.py"]}
22,803
SteveMitto/instagram
refs/heads/master
/insta/forms.py
from django.forms import ModelForm from django.utils.translation import gettext_lazy as _ from .models import Profile,Image class UpdateProfile(ModelForm): class Meta: model = Profile fields = ['name','bio','website'] class UpdateProfilePhoto(ModelForm): class Meta: model=Profile ...
{"/insta/views.py": ["/insta/models.py", "/insta/forms.py"], "/insta/admin.py": ["/insta/models.py"], "/insta/forms.py": ["/insta/models.py"]}
22,804
SteveMitto/instagram
refs/heads/master
/insta/migrations/0012_auto_20191012_1809.py
# Generated by Django 2.2.5 on 2019-10-12 15:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('insta', '0011_auto_20191011_1828'), ] operations = [ migrations.AddField( model_name='profile', name='website', ...
{"/insta/views.py": ["/insta/models.py", "/insta/forms.py"], "/insta/admin.py": ["/insta/models.py"], "/insta/forms.py": ["/insta/models.py"]}
22,805
banditti99/leaguepedia_util
refs/heads/master
/esports_site.py
from extended_site import GamepediaSite ALL_ESPORTS_WIKIS = ['lol', 'halo', 'smite', 'vg', 'rl', 'pubg', 'fortnite', 'apexlegends', 'fifa', 'gears', 'nba2k', 'paladins', 'siege', 'default-loadout', 'commons', 'teamfighttactics'] def get_wiki(wiki): if wiki in ['lol', 'teamfighttactics'] or wiki not in AL...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,806
banditti99/leaguepedia_util
refs/heads/master
/top_schedule_refresh.py
from log_into_wiki import * wikis = [ 'lol', 'cod-esports' ] to_purges = { 'lol' : ['League of Legends Esports Wiki', 'Match History Index'], 'cod-esports' : ['Call of Duty Esports Wiki'] } to_blank_edit = ['Project:Top Schedule', 'Project:Matches Section/Matches', 'Project:Matches Section/Results'] to_blan...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,807
banditti99/leaguepedia_util
refs/heads/master
/patrol_namespaces.py
import log_into_wiki namespaces = ['User:', 'Predictions:'] site_names = ['lol', 'cod-esports'] interval = 10 def do_we_patrol(revision): return [_ for _ in namespaces if revision['title'].startswith(_)] for site_name in site_names: site = log_into_wiki.login('me', site_name) site.patrol_recent(interval, do_we_pa...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,808
banditti99/leaguepedia_util
refs/heads/master
/refresh_teamnames_cron.py
from log_into_wiki import * import luacache_refresh, datetime site = login('me', 'lol') now = datetime.datetime.utcnow() then = now - datetime.timedelta(minutes=1) revisions = site.api('query', list="recentchanges", rcstart = now.isoformat(), rcend = then.isoformat(), rcprop = 'title', ...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,809
banditti99/leaguepedia_util
refs/heads/master
/touch.py
from log_into_wiki import * import time limit = -1 site = login('me','cavesofqud') t = site.pages["Template:Item Page"] pages = t.embeddedin() c = site.categories['Pages with script errors'] pages = site.allpages(namespace=0) startat_page = 'Burrowing Claws' passed_startat = False lmt = 0 #for p in c: for p in pag...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,810
banditti99/leaguepedia_util
refs/heads/master
/!!scratch.py
from log_into_wiki import * import mwparserfromhell site = login('me', 'lol') # Set wiki summary = '|sub=Yes |trainee=Yes & take out of |status=' # Set summary limit = -1 startat_page = None print(startat_page) # startat_page = 'asdf' this_template = site.pages['Template:RCInfo'] # Set template pages = this_templa...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,811
banditti99/leaguepedia_util
refs/heads/master
/sprites_cachebreak.py
from log_into_wiki import * import re site = login('me', 'lol') summary = 'Bot Edit - Automatically Forcing Sprite Cache Update' url_re_start = r'.*(\/.\/..\/)' url_re_end = r'(\?version=\w*)\".*' css_page_list = ['MediaWiki:Common.css', 'MediaWiki:Mobile.css'] category_result = site.api('query', list = 'categorymemb...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,812
banditti99/leaguepedia_util
refs/heads/master
/lol_archive_compare.py
from esports_site import EsportsSite archive = EsportsSite('me', 'lol-archive') live = EsportsSite('me', 'lol') pages = [] for page in archive.allpages(namespace=0): pages.append((page.name, live.pages[page.name].exists)) text = [] for p in pages: text.append('{}\t{}'.format(p[0], str(p[1]))) with open('archive...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,813
banditti99/leaguepedia_util
refs/heads/master
/blank_edit_players_from_league.py
from log_into_wiki import * limit = -1 site = login('me','lol') with open('pages.txt', encoding="utf-8") as f: tournaments = f.readlines() pages = set() for tournament in tournaments: response = site.api('cargoquery', tables = 'ScoreboardPlayer', where = 'OverviewPage="%s"' % tournament.strip().replace('_', '...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,814
banditti99/leaguepedia_util
refs/heads/master
/rune sprite.py
import urllib.request, time, sprite_creator, io, os from log_into_wiki import * SUFFIX = '' SPRITE_NAME = 'SmiteRole' IMAGE_DIR = 'Sprites/' + SPRITE_NAME + ' Images' TEAM_DATA_FILE_LOCATION = SPRITE_NAME + 'Sprite' + SUFFIX + '.txt' FILE_TYPE = 'png' limit = -1 startat = None site = login('me', 'smite-esports') site...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,815
banditti99/leaguepedia_util
refs/heads/master
/disambig_creation.py
import re, threading, mwparserfromhell from log_into_wiki import * ################################################################################################# original_name = 'Awaker' irl_name = "Kentaro Hanaoka" new_name = '{} ({})'.format(original_name, irl_name.strip()) init_move = True blank_edit = False li...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,816
banditti99/leaguepedia_util
refs/heads/master
/default_loadout.py
import datetime from time import mktime from log_into_wiki import * loadout = login('me', 'spyro') # Set wiki target = login('me', 'wikisandbox') summary = 'Backing up spyro' # Set summary startat_namespace = None print(startat_namespace) startat_namespace = 274 startat_page = None print(startat_page) startat_pag...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,817
banditti99/leaguepedia_util
refs/heads/master
/fortnite_auto_new_players.py
from log_into_wiki import * import mwparserfromhell limit = -1 site = login('bot', 'fortnite-esports') summary = 'Automatically create player pages for Power Rankings' result = site.api('cargoquery', tables = 'TournamentResults=TR,TournamentResults__RosterLinks=RL,_pageData=PD', join_on = 'TR._ID=RL._rowI...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,818
banditti99/leaguepedia_util
refs/heads/master
/extended_site.py
import mwclient, datetime class ExtendedSite(mwclient.Site): def cargoquery(self, **kwargs): response = self.api('cargoquery', **kwargs) ret = [] for item in response['cargoquery']: ret.append(item['title']) return ret def cargo_pagelist(self, fields=None, limit="max", page_pattern = "%s", **kwargs): ...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,819
banditti99/leaguepedia_util
refs/heads/master
/log_into_wiki.py
import re, urllib.request, io from esports_site import EsportsSite from PIL import Image, ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True def login(user, wiki, timeout = 30): return EsportsSite(user, wiki) def log_into_fandom(user, wiki): if user == 'me': password = open('password_fandom.txt').read().strip() ...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,820
banditti99/leaguepedia_util
refs/heads/master
/match_schedule_hash.py
import datetime import mwparserfromhell from log_into_wiki import * ERROR_LOCATION = 'Maintenance:MatchSchedule Ordering Errors' ERROR_TEAMS_TEXT = 'Team 1 - {}; Team 2: {}' def get_append_hash(hash, res): tl = mwparserfromhell.nodes.Template(name='MSHash') tl.add('hash', hash) tl.add('team1', res['Team1']) tl.ad...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,821
banditti99/leaguepedia_util
refs/heads/master
/luacache_refresh.py
import re def teamnames(site): prefix_text = site.pages['Module:Team'].text() processed = prefix_text.replace('\n','') prefix = re.match(r".*PREFIX = '(.+?)'.*", processed)[1] site.api( action='parse', text='{{#invoke:CacheUtil|resetAll|Teamnames|module=Team|f=teamlinkname|prefix=' + prefix + '}}' )
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,822
banditti99/leaguepedia_util
refs/heads/master
/weekly_utils_main.py
# weekly is a lie, this runs twice-daily import mwparserfromhell, datetime import weekly_utils as utils from esports_site import EsportsSite import scrape_runes, luacache_refresh from template_list import * site = EsportsSite('me','lol') limit = -1 site.standard_name_redirects() # Blank edit pages we need to blank...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,823
banditti99/leaguepedia_util
refs/heads/master
/scrape_runes_run.py
import scrape_runes from log_into_wiki import * site = login('me','lol') # Set wiki pages = ['Data:LPL/2019 Season/Spring Season', 'Data:LPL/2019 Season/Spring Season/2'] #pages = ['Data:OPL/2019 Season/Split 1/2'] #scrape_runes.scrape(site, pages, False) scrape_runes.scrapeLPL(site, pages, False)
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,824
banditti99/leaguepedia_util
refs/heads/master
/extended_page.py
import mwclient.page class ExtendedPage(mwclient.page.Page): def __init__(self, page): super().__init__(page.site, page.name, info=page._info) self.base_title = self.page_title.split('/')[0] self.base_name = self.name.split('/')[0] @staticmethod def extend_pages(page_gen): for page in page_gen: yield(E...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,825
banditti99/leaguepedia_util
refs/heads/master
/fortnite_player_blank_edit.py
import log_into_wiki from extended_page import ExtendedPage site = log_into_wiki.login('bot', 'fortnite-esports') rc = site.recentchanges_by_interval(12 * 60, toponly=1) data_pages = [] for p in rc: if p['title'].startswith('Data:'): data_pages.append(p['title']) where = ' OR '.join(['TR._pageName="%s"' % _ for...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,826
banditti99/leaguepedia_util
refs/heads/master
/yearly_stats_pages.py
from extended_site import GamepediaSite from extended_page import ExtendedPage site = GamepediaSite('me', 'lol') create_text = """{{PlayerTabsHeader}} {{PlayerYearStats}}""" overview_create_text = """{{PlayerTabsHeader}} {{CareerPlayerStats}}""" redirect_text = '#redirect[[%s]]' summary= "Automatically discovering...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,827
banditti99/leaguepedia_util
refs/heads/master
/download_images_from_list.py
from log_into_wiki import * import os limit = -1 site = login('bot', 'lol') LOC = 'Sprites/' + 'League Images' with open('pages.txt', encoding="utf-8") as f: pages = f.readlines() for page in pages: page = page.strip() if os.path.isfile(LOC + '/' + page) or os.path.isfile(LOC + '/' + page.replace(' ','_')): pa...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,828
banditti99/leaguepedia_util
refs/heads/master
/weekly_utils.py
import dateutil.parser, pytz, re, datetime, mwparserfromhell from log_into_wiki import * site = login('me','lol') typo_find = ['favourite','quater','partecipate','Portugese', 'Regelations'] typo_replace = ['favorite','quarter','participate','Portuguese', 'Relegations'] def typoFixes(text): i = 0 while i < len(typo...
{"/esports_site.py": ["/extended_site.py"], "/top_schedule_refresh.py": ["/log_into_wiki.py"], "/patrol_namespaces.py": ["/log_into_wiki.py"], "/refresh_teamnames_cron.py": ["/log_into_wiki.py", "/luacache_refresh.py"], "/touch.py": ["/log_into_wiki.py"], "/!!scratch.py": ["/log_into_wiki.py"], "/sprites_cachebreak.py"...
22,833
Kavyeah/tkinter-interface
refs/heads/master
/compressgu.py
from tkinter import * import re root = Tk() root.geometry("1200x6000") root.title("Compress your file") lblInfo =Label(root, font = ('helvetica', 50, 'bold'), text = "COMPRESS YOUR FILE", fg = "Black", bd = 10, anchor='w') lblInfo.grid(row = 0, column = 0) filename = StringVar() ...
{"/index.py": ["/compressgu.py", "/decompressgu.py", "/encryptgu.py"]}
22,834
Kavyeah/tkinter-interface
refs/heads/master
/index.py
# import tkinter module from tkinter import * # creating root object root = Tk() # defining size of window root.geometry("1200x6000") # setting up the title of window root.title("Message Encryption and Decryption") Tops = Frame(root, width = 1600, relief = SUNKEN) Tops.pack(side = TOP) f1 = Frame(root, width =...
{"/index.py": ["/compressgu.py", "/decompressgu.py", "/encryptgu.py"]}
22,835
Kavyeah/tkinter-interface
refs/heads/master
/encryptgu.py
from tkinter import * import subprocess root = Tk() root.geometry("1200x6000") root.title("Encryption") lblInfo = Label(root, font = ('helvetica', 50, 'bold'), text = "ENCRYPT YOUR FILE", fg = "Black", bd = 10, anchor='w') lblInfo.grid(row = 0, column = 0) f...
{"/index.py": ["/compressgu.py", "/decompressgu.py", "/encryptgu.py"]}
22,836
Kavyeah/tkinter-interface
refs/heads/master
/decompressgu.py
from tkinter import * from shlex import split import subprocess root = Tk() root.geometry("1200x6000") root.title("Decompress your file") lblInfo = Label(root, font = ('helvetica', 50, 'bold'), text = "DECOMPRESS YOUR FILE", fg = "Black", bd = 10, anchor='w') ...
{"/index.py": ["/compressgu.py", "/decompressgu.py", "/encryptgu.py"]}
22,837
standroidbeta/CS-Build-Week-2
refs/heads/master
/direct_path.py
import json import requests from decouple import config from utils import Queue from time import sleep from player import Player from operations import Operations player = Player() ops = Operations() api_key = config('STAN_KEY') with open("room_conns.txt", "r") as conns: room_conn = json.loads(conns.read()) # { ...
{"/direct_path.py": ["/operations.py"]}
22,838
standroidbeta/CS-Build-Week-2
refs/heads/master
/mapper.py
import requests from time import sleep import json from utils import Queue from decouple import config api_key = config('STAN_KEY') def initialize_room(): room_data = [] start_room = { "room_id": 0, "title": "A brightly lit room", "description": """ You are standing in the cen...
{"/direct_path.py": ["/operations.py"]}
22,839
standroidbeta/CS-Build-Week-2
refs/heads/master
/operations.py
import requests from time import sleep import json import hashlib import random from decouple import config api_key = config('STAN_KEY') url = "https://lambda-treasure-hunt.herokuapp.com/api/adv/init/" class Operations: def __init__(self): self.current_room = {} self.wait = None def init_pla...
{"/direct_path.py": ["/operations.py"]}
22,881
oxovu/point_clouds_optimization
refs/heads/master
/main.py
import optimizations import comparison import pcl from time import time def main(): cloud = pcl.load('data/milk.pcd') cloud1 = pcl.load('data/milk.pcd') cloud2 = pcl.load('data/milk.pcd') # print('org') # print('dist = ', comparison.c2c_distance(cloud, cloud)) # print('size = ', comparison.c2...
{"/main.py": ["/optimizations.py", "/comparison.py"], "/triang.py": ["/plotXYZ.py"]}
22,882
oxovu/point_clouds_optimization
refs/heads/master
/rand.py
import pcl import pcl.pcl_visualization import numpy as np import random def main(): cloud = pcl.load('data/lamppost.pcd') # параметры step = 2 # размер вокселя относительно облака rand_param = cloud.size // 2 # сколько точек отфильтровать arr = cloud.to_array().transpose() x_min = ar...
{"/main.py": ["/optimizations.py", "/comparison.py"], "/triang.py": ["/plotXYZ.py"]}
22,883
oxovu/point_clouds_optimization
refs/heads/master
/sor.py
import numpy as np import pcl import random def main(): cloud = pcl.load('data/lamppost.pcd') # удаление точек с большим колличеством соседей sor = cloud.make_statistical_outlier_filter() # колличество соседей sor.set_mean_k(1) # радиус поиска соседей sor.set_std_dev_mul_thresh(0.1) s...
{"/main.py": ["/optimizations.py", "/comparison.py"], "/triang.py": ["/plotXYZ.py"]}
22,884
oxovu/point_clouds_optimization
refs/heads/master
/visualization.py
import pcl import pcl.pcl_visualization def main(): viewer = pcl.pcl_visualization.PCLVisualizering() cloud = pcl.load('data/lamppost.pcd') while 1: # Visualizing pointcloud viewer.AddPointCloud(cloud, b'scene_cloud', 0) viewer.SpinOnce() viewer.RemovePointCloud(b'scene_c...
{"/main.py": ["/optimizations.py", "/comparison.py"], "/triang.py": ["/plotXYZ.py"]}
22,885
oxovu/point_clouds_optimization
refs/heads/master
/plotXYZ.py
import pcl import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt def main(): cloud = pcl.load('data/lamppost.pcd') shape = cloud.to_array().transpose() fig = plt.figure() ax = fig.add_subplot(1, 1, 1, projection='3d') x = shape[0] y = shape[1] z = sh...
{"/main.py": ["/optimizations.py", "/comparison.py"], "/triang.py": ["/plotXYZ.py"]}
22,886
oxovu/point_clouds_optimization
refs/heads/master
/voxel.py
import pcl def main(): cloud = pcl.load('data/lamppost.pcd') # аппроксимация внутри каждого вокселя voxel = cloud.make_voxel_grid_filter() # размеры вокселя voxel.set_leaf_size(0.045, 0.045, 0.045) cloud_filtered = voxel.filter() pcl.save(cloud_filtered, 'data/lamppost_vox.pcd') pri...
{"/main.py": ["/optimizations.py", "/comparison.py"], "/triang.py": ["/plotXYZ.py"]}
22,887
oxovu/point_clouds_optimization
refs/heads/master
/triang.py
from scipy.spatial import Delaunay import numpy as np import matplotlib.pyplot as plt import pcl from mpl_toolkits.mplot3d import Axes3D from plotXYZ import plot_bounds def main(): # оптимизированное облако cloud1 = pcl.load('data/lamppost2.pcd') # начальное облако cloud2 = pcl.load('data/lamppost.pcd...
{"/main.py": ["/optimizations.py", "/comparison.py"], "/triang.py": ["/plotXYZ.py"]}
22,888
oxovu/point_clouds_optimization
refs/heads/master
/optimizations.py
import pcl import numpy as np import random def voxel(cloud, x, y, z): voxel = cloud.make_voxel_grid_filter() # размеры вокселя voxel.set_leaf_size(x, y, z) cloud_filtered = voxel.filter() return cloud_filtered def sor(cloud, k, thresh): # удаление точек с большим колличеством соседей so...
{"/main.py": ["/optimizations.py", "/comparison.py"], "/triang.py": ["/plotXYZ.py"]}
22,889
oxovu/point_clouds_optimization
refs/heads/master
/comparison.py
from scipy.spatial import Delaunay import numpy as np import matplotlib.pyplot as plt import pcl def c2c_distance(cloud1, cloud2): points1 = cloud1.to_array() points2 = cloud2.to_array() # построение триангуляции tri = Delaunay(points1) distance = 0.0 i = 0 # подсчет общего расстояния ...
{"/main.py": ["/optimizations.py", "/comparison.py"], "/triang.py": ["/plotXYZ.py"]}
22,896
unexpector/JanusVRandom
refs/heads/master
/hello/views.py
from django.shortcuts import render from django.http import HttpResponse from hello.models import RandomSites, ObjectLibrary, Rooms from random import randint from hello.forms import ObjectForm from hello.utils import newobject, makeobject, imgur # Create your views here. def index(request): namepicked = "Random ...
{"/hello/forms.py": ["/hello/models.py"], "/hello/admin.py": ["/hello/models.py"]}
22,897
unexpector/JanusVRandom
refs/heads/master
/hello/forms.py
from django import forms from hello.models import ObjectLibrary, RandomSites class ObjectForm(forms.ModelForm): objectname = forms.CharField(max_length=128, help_text="Please enter the object name") idseed= forms.CharField(max_length=128, help_text="Please enter the ID Seed") src = forms.CharField(max_leng...
{"/hello/forms.py": ["/hello/models.py"], "/hello/admin.py": ["/hello/models.py"]}
22,898
unexpector/JanusVRandom
refs/heads/master
/hello/models.py
from django.db import models # Create your models here. class Rooms(models.Model): name = models.CharField(max_length=128, unique=True) localasset = models.CharField(max_length=128) col = models.CharField(max_length=128) def __unicode__(self): #For Python 2, use __str__ on Python 3 return sel...
{"/hello/forms.py": ["/hello/models.py"], "/hello/admin.py": ["/hello/models.py"]}
22,899
unexpector/JanusVRandom
refs/heads/master
/hello/utils.py
from random import randint import urllib2 import json class makeobject(object): def __init__(self, name): self.name = name self.position = [] # creates a new location list self.newobjx = 1 self.newobjy= 1 self.newobjz= 1 def add_co_ords(self, location): self...
{"/hello/forms.py": ["/hello/models.py"], "/hello/admin.py": ["/hello/models.py"]}
22,900
unexpector/JanusVRandom
refs/heads/master
/hello/admin.py
from django.contrib import admin from hello.models import Rooms, RandomSites, ObjectLibrary class RandomSitesAdmin(admin.ModelAdmin): list_display = ('sitename', 'src') # Register your models here. admin.site.register(Rooms) admin.site.register(RandomSites, RandomSitesAdmin) admin.site.register(ObjectLibrary)
{"/hello/forms.py": ["/hello/models.py"], "/hello/admin.py": ["/hello/models.py"]}
22,901
unexpector/JanusVRandom
refs/heads/master
/populate.py
import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gettingstarted.settings') from hello.models import RandomSites def populate(): add_randomsite(sitename="Random Wordpress", src="http://en.blog.wordpress.com/next/") add_randomsite(sitename="Random Wikipedia", src="http://en.wikipedia...
{"/hello/forms.py": ["/hello/models.py"], "/hello/admin.py": ["/hello/models.py"]}
22,906
huntzhan/GeekCMS
refs/heads/master
/tests/cases/project/themes/test_theme1/plugin.py
from geekcms import protocol class TestPlugin(protocol.BasePlugin): plugin = 'a' def run(self): pass _TEST_DOC = """ Usage: geekcms testcmd -a -b <c> <d> """ class TestCLI(protocol.BaseExtendedProcedure): plugin = 'test_cli' def get_command_and_explanation(self): return 'tes...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,907
huntzhan/GeekCMS
refs/heads/master
/tests/load_tests.py
import os.path import unittest def additional_tests(): loader = unittest.defaultTestLoader start_dir = os.getcwd() suites = loader.discover(start_dir) return suites
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,908
huntzhan/GeekCMS
refs/heads/master
/tests/test_parser.py
import unittest import os import re import configparser from collections import defaultdict from geekcms.parser.simple_lex import lexer from geekcms.parser.simple_yacc import parser from geekcms.protocol import PluginIndex from geekcms.sequence_analyze import SequenceParser class PLYTest(unittest.TestCase): def...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,909
huntzhan/GeekCMS
refs/heads/master
/tests/test_doc.py
import unittest from docopt import docopt from geekcms.doc_construct import DocConstructor from geekcms.protocol import BaseExtendedProcedure class DocConstructorTest(unittest.TestCase): def test_doc_not_in_project(self): doc = DocConstructor.get_doc_not_in_project() argv = ['startproject', 'de...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,910
huntzhan/GeekCMS
refs/heads/master
/tests/test_loadup.py
""" Test Plan. SettingsProcedure test_run: ... PluginProcedure test_run: ... """ import os import unittest from geekcms.loadup import (SettingsProcedure, PluginProcedure) from geekcms.utils import (ShareData, ProjectSettings, ThemeSettings) from geekcms.protocol import (PluginRegister, Plu...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,911
huntzhan/GeekCMS
refs/heads/master
/geekcms/parser/utils.py
class PluginRel: def __init__(self, is_left_rel, degree): self.is_left_rel = is_left_rel self.degree = degree def __repr__(self): return 'PluginRel({}, {})'.format(self.is_left_rel, self.degree) class PluginExpr: HEAD = 'HEAD' TAIL = 'TAIL' def __init__(self, *, ...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,912
huntzhan/GeekCMS
refs/heads/master
/geekcms/interface.py
import os from docopt import docopt from .utils import (PathResolver, check_cwd_is_project) from .doc_construct import DocConstructor from .loadup import (SettingsProcedure, PluginProcedure) from .protocol import (PluginRegister, BaseResource, BaseProduct, BaseMessage) from .download_theme import download_theme __v...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,913
huntzhan/GeekCMS
refs/heads/master
/geekcms/parser/simple_yacc.py
import os from ply import yacc from .simple_lex import tokens from .utils import PluginRel from .utils import PluginExpr from .utils import ErrorCollector def p_start(p): '''start : NEWLINE lines end | lines end''' if len(p) == 4: lines = p[2] end = p[3] elif len(p) == 3: ...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,914
huntzhan/GeekCMS
refs/heads/master
/geekcms/download_theme.py
import re import os import urllib.parse import subprocess from .utils import PathResolver, PathResolverContextManager _SVN_URL = 'https://github.com/haoxun/GeekCMS-Themes/trunk/' def download_theme(theme_name, path): svn_url = urllib.parse.urljoin( _SVN_URL, re.sub(r'\s', '', theme_name), ...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,915
huntzhan/GeekCMS
refs/heads/master
/geekcms/doc_construct.py
import os _DOC_TEMPLATE_IN_PROJECT = """ Usage: geekcms <command> [<args>...] Avaliable Commands: run Default procedure. {0} """ _DOC_TEMPLATE_NOT_IN_PROJECT = """ Usage: geekcms startproject <template_name> """ _NEWLINE = os.linesep class DocConstructor: @classmethod def _get_explanation...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,916
huntzhan/GeekCMS
refs/heads/master
/geekcms/protocol.py
from collections import UserDict from collections import OrderedDict from collections import abc from functools import partial from functools import wraps from inspect import signature from inspect import Parameter import types class _UniqueKeyDict(dict): def __setitem__(self, key, val): if key in self: ...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,917
huntzhan/GeekCMS
refs/heads/master
/tests/test_main.py
import os import sys import unittest import shutil from geekcms.interface import (_not_in_project, _in_project) from geekcms.utils import (PathResolver, ShareData, ThemeSettings, ProjectSettings) from geekcms.protocol import PluginRegister class TestCLI(unittest.TestCase): def setUp(...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,918
huntzhan/GeekCMS
refs/heads/master
/geekcms/loadup.py
import os import importlib from collections import OrderedDict from .utils import (SettingsLoader, ProjectSettings, ThemeSettings, ShareData, PathResolver, SysPathContextManager) from .protocol import PluginRegister from .sequence_analyze import SequenceParser class SettingsProcedure: @clas...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,919
huntzhan/GeekCMS
refs/heads/master
/tests/cases/project/themes/test_theme2/plugin.py
from geekcms import protocol class TestPlugin(protocol.BasePlugin): plugin = 'b' def run(self): pass
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,920
huntzhan/GeekCMS
refs/heads/master
/tests/test_protocol.py
""" Test Plan. PluginIndex: test_unique: make sure plugin index is hashable and its uniqueness. BaseResource, BaseProduct, BaseMessage, _BaseAsset: test_init: these class can not be initialized. test_access_manager_from_instance: manager can not be accessed from instance. Manager:...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,921
huntzhan/GeekCMS
refs/heads/master
/geekcms/utils.py
""" This package implements tools that can facilitates theme development. """ import os import re import sys import configparser from collections import abc from functools import wraps from .protocol import PluginRegister class SettingsLoader: PROJECT_GLOBAL = 'global' def __init__(self, path, name=None)...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,922
huntzhan/GeekCMS
refs/heads/master
/geekcms/parser/simple_lex.py
import os import re from ply import lex from .utils import ErrorCollector tokens = ( 'IDENTIFIER', 'LEFT_OP', 'RIGHT_OP', 'DEGREE', 'NEWLINE', ) plugin_name = r'[^\d\W]\w*' full_name = r'({0}\.)?{0}'.format(plugin_name) t_IDENTIFIER = full_name t_LEFT_OP = r'<<' t_RIGHT_OP = r'>>' t_DEGREE = r'...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,923
huntzhan/GeekCMS
refs/heads/master
/geekcms/sequence_analyze.py
""" Syntax: start : NEWLINE lines end | lines end end : plugin_expr | empty lines : lines line_atom | empty line_atom : plugin_expr NEWLINE plugin_expr : plugin_name relation plugin_name | plugin_name relation...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,924
huntzhan/GeekCMS
refs/heads/master
/tests/test_utils.py
""" Test Plan. SettingsLoader: test_init: 1. with name. 2. without name. test_not_found: initialize loader with file not existed, expect failure. _SearchData, ShareData, ProjectSettings, ThemeSettings: test_search_with_prefix: 1. theme prefix(i.e. 'theme.variable'). ...
{"/tests/test_parser.py": ["/geekcms/parser/simple_lex.py", "/geekcms/parser/simple_yacc.py", "/geekcms/protocol.py", "/geekcms/sequence_analyze.py"], "/tests/test_doc.py": ["/geekcms/doc_construct.py", "/geekcms/protocol.py"], "/tests/test_loadup.py": ["/geekcms/loadup.py", "/geekcms/utils.py", "/geekcms/protocol.py"]...
22,928
EMAT31530/ai-group-project-football-analysis-team
refs/heads/master
/Aiproject.py
import csv import os from sklearn.naive_bayes import BernoulliNB from sklearn.preprocessing import StandardScaler from sklearn.metrics import accuracy_score from sklearn.neighbors import KNeighborsClassifier from sklearn.linear_model import LogisticRegression from data_scrapy import scrapy_data # Read csv...
{"/Aiproject.py": ["/data_scrapy.py"]}
22,929
EMAT31530/ai-group-project-football-analysis-team
refs/heads/master
/data_scrapy.py
import requests from requests.exceptions import RequestException import json import csv import time import random # Get page content def get_page(match_url, headers): try: response = requests.get(match_url, headers=headers) response.encoding = 'utf-8' if response.status_code == ...
{"/Aiproject.py": ["/data_scrapy.py"]}
22,930
EMAT31530/ai-group-project-football-analysis-team
refs/heads/master
/data_draft1.py
import requests from requests.exceptions import RequestException import json import csv import time import random # 获取页面内容 def get_page(match_url, headers): try: response = requests.get(match_url, headers=headers) response.encoding = 'utf-8' if response.status_code == 200: ...
{"/Aiproject.py": ["/data_scrapy.py"]}
22,931
kaefee/Agustin-Codazzi-Project
refs/heads/main
/callbacks.py
import base64 import datetime import io import pandas as pd #basic libraries from dash.dependencies import Input, Output, State from flask_caching import Cache import dash import dash_html_components as html import dash_bootstrap_components as dbc from apps.utils.utils_getdata import get_data from apps.utils.utils_pivo...
{"/callbacks.py": ["/apps/utils/utils_getdata.py", "/apps/utils/utils_plots.py", "/apps/utils/utils_filters.py"], "/apps/utils/utils_filters.py": ["/apps/utils/utils_getdata.py"], "/apps/home/layout_home.py": ["/apps/utils/utils_getdata.py"]}
22,932
kaefee/Agustin-Codazzi-Project
refs/heads/main
/apps/utils/utils_getdata.py
import pandas as pd import unidecode def get_data(column_name): df=pd.read_csv("Data3.csv", usecols =column_name , low_memory = True) return df def standarised_string(x): no_accents = unidecode.unidecode(x) return no_accents.replace("_"," ").lower().capitalize()
{"/callbacks.py": ["/apps/utils/utils_getdata.py", "/apps/utils/utils_plots.py", "/apps/utils/utils_filters.py"], "/apps/utils/utils_filters.py": ["/apps/utils/utils_getdata.py"], "/apps/home/layout_home.py": ["/apps/utils/utils_getdata.py"]}
22,933
kaefee/Agustin-Codazzi-Project
refs/heads/main
/apps/utils/utils_cardskpi.py
import dash_bootstrap_components as dbc def Card_total(datos): lista_observaciones = [ dbc.ListGroupItemHeading("Numero de Observaciones",style={"font-size":"1.3em"}), dbc.ListGroupItemText(datos, style={"font-size":"2.5em","align":"right"},id="carta_datos") ] ...
{"/callbacks.py": ["/apps/utils/utils_getdata.py", "/apps/utils/utils_plots.py", "/apps/utils/utils_filters.py"], "/apps/utils/utils_filters.py": ["/apps/utils/utils_getdata.py"], "/apps/home/layout_home.py": ["/apps/utils/utils_getdata.py"]}
22,934
kaefee/Agustin-Codazzi-Project
refs/heads/main
/apps/main/main_nav.py
import dash_bootstrap_components as dbc import dash_html_components as html from dash.dependencies import Input, Output, State from app import app IGAC_LOGO = "https://www.igac.gov.co/sites/igac.gov.co/files/igac-logo.png" github_logo="https://github.com/jamontanac/Tesis_Master/raw/master/GitHub_logo.png" correlation...
{"/callbacks.py": ["/apps/utils/utils_getdata.py", "/apps/utils/utils_plots.py", "/apps/utils/utils_filters.py"], "/apps/utils/utils_filters.py": ["/apps/utils/utils_getdata.py"], "/apps/home/layout_home.py": ["/apps/utils/utils_getdata.py"]}
22,935
kaefee/Agustin-Codazzi-Project
refs/heads/main
/apps/utils/utils_filters.py
import dash_html_components as html import dash_bootstrap_components as dbc import dash_core_components as dcc from apps.utils.utils_getdata import standarised_string def make_options_filters(data): return [{"label":x,"value":x} for x in data] def make_filters(df): card_of_filters = dbc.Card([ dbc.Ca...
{"/callbacks.py": ["/apps/utils/utils_getdata.py", "/apps/utils/utils_plots.py", "/apps/utils/utils_filters.py"], "/apps/utils/utils_filters.py": ["/apps/utils/utils_getdata.py"], "/apps/home/layout_home.py": ["/apps/utils/utils_getdata.py"]}