text
stringlengths
0
1.05M
meta
dict
__author__ = 'Gennady Kovalev <gik@bigur.ru>' __copyright__ = '(c) 2016-2019 Development management business group' __licence__ = 'For license information see LICENSE' import collections class Table(object): def __init__(self): self.__numbered = [] self.__named = collections.OrderedDict() de...
{ "repo_name": "belolap/esl", "path": "esl/table.py", "copies": "1", "size": "2111", "license": "bsd-3-clause", "hash": -4973609264553430000, "line_mean": 30.0441176471, "line_max": 69, "alpha_frac": 0.4703931786, "autogenerated": false, "ratio": 4.308163265306122, "config_test": false, "has_n...
__author__ = 'Gennady Kovalev <gik@bigur.ru>' __copyright__ = '(c) 2016-2019 Development management business group' __licence__ = 'For license information see LICENSE' import esl.table import esl.interpreter def next_(obj, key=None): if isinstance(obj, list): keys = range(0, len(obj)) elif isinstance...
{ "repo_name": "belolap/esl", "path": "esl/extensions/basic.py", "copies": "1", "size": "1806", "license": "bsd-3-clause", "hash": -1306890143710572500, "line_mean": 19.5227272727, "line_max": 69, "alpha_frac": 0.5304540421, "autogenerated": false, "ratio": 3.77035490605428, "config_test": false...
__author__ = 'Gennady Kovalev <gik@bigur.ru>' __copyright__ = '(c) 2016-2019 Development management business group' __licence__ = 'For license information see LICENSE' import logging import ply.lex import collections logger = logging.getLogger(__name__) class LexError(Exception): pass class Lexer(object): ...
{ "repo_name": "belolap/esl", "path": "esl/lex.py", "copies": "1", "size": "3788", "license": "bsd-3-clause", "hash": 8709334134499261000, "line_mean": 21.8192771084, "line_max": 69, "alpha_frac": 0.4398099261, "autogenerated": false, "ratio": 3.074675324675325, "config_test": false, "has_no_k...
__author__ = 'Gennady Kovalev <gik@bigur.ru>' __copyright__ = '(c) 2016-2019 Development management business group' __licence__ = 'For license information see LICENSE' import logging import ply.yacc import esl.lex import esl.interpreter logger = logging.getLogger(__name__) class ParseError(Exception): pass c...
{ "repo_name": "belolap/esl", "path": "esl/parse.py", "copies": "1", "size": "13501", "license": "bsd-3-clause", "hash": -7455879611824993000, "line_mean": 29.6145124717, "line_max": 78, "alpha_frac": 0.4848529739, "autogenerated": false, "ratio": 3.0531433740388962, "config_test": false, "has...
__author__ = 'Gennady Kovalev <gik@bigur.ru>' __copyright__ = '(c) 2016-2019 Development management business group' __licence__ = 'For license information see LICENSE' import sys import inspect import logging import traceback import esl.parse import esl.namespace import esl.table import esl.function import esl.extens...
{ "repo_name": "belolap/esl", "path": "esl/interpreter.py", "copies": "1", "size": "23377", "license": "bsd-3-clause", "hash": 7605092459648692000, "line_mean": 27.2672309553, "line_max": 78, "alpha_frac": 0.536467468, "autogenerated": false, "ratio": 4.424947946242665, "config_test": false, "...
__author__ = 'geoffc' from base_service import BaseService from bson.objectid import ObjectId class PrivateMessagingService(BaseService): def __init__(self): super(PrivateMessagingService, self).__init__() self.collection = self.db.private_messages def add_private_message(self, from_user_id, ...
{ "repo_name": "GeoffColburn/hackathon", "path": "api/services/private_messaging.py", "copies": "1", "size": "1183", "license": "mit", "hash": 4398415000408093700, "line_mean": 31.8611111111, "line_max": 90, "alpha_frac": 0.6018596788, "autogenerated": false, "ratio": 3.5740181268882174, "config...
__author__ = 'geoffc' from pymongo import MongoClient from bson.objectid import ObjectId class UserService(object): def __init__(self): self.client = MongoClient('localhost', 27017) self.db = self.client["hack"] self.collection = self.db.users self.default_avatar = '/images/anon.jp...
{ "repo_name": "GeoffColburn/hackathon", "path": "api/services/user_service.py", "copies": "1", "size": "1385", "license": "mit", "hash": 5358209301404166000, "line_mean": 29.1086956522, "line_max": 93, "alpha_frac": 0.6007220217, "autogenerated": false, "ratio": 3.8259668508287294, "config_test...
__author__ = 'geoffc' import cherrypy import os from api.resources.Todo import Todo from api.resources.User import User from api.resources.Project import Project from api.resources.PrivateMessage import PrivateMessage from api.tools.jsonify import jsonify from api.services.user_service import UserService ...
{ "repo_name": "GeoffColburn/hackathon", "path": "server.py", "copies": "1", "size": "3552", "license": "mit", "hash": 5429189499148032000, "line_mean": 25.1297709924, "line_max": 114, "alpha_frac": 0.5472972973, "autogenerated": false, "ratio": 4.073394495412844, "config_test": false, "has_no...
""" AbsoluteImport AbsoluteImport ensures module and package imports always work, from relative or absolute path. Cyclical imports are fine. """ # AbsoluteImport: # # - Get absolute path from the relative path give (or take absolute path) # - Load module, store in absolute path key # - Reload() module is availab...
{ "repo_name": "ghowland/AbsoluteImport", "path": "AbsoluteImport/__init__.py", "copies": "1", "size": "11427", "license": "mit", "hash": -2280681359199598800, "line_mean": 34.3777089783, "line_max": 163, "alpha_frac": 0.6824188326, "autogenerated": false, "ratio": 3.7233626588465296, "config_te...
__author__ = 'Geoff' import cherrypy from BaseResource import BaseResource from ..services.private_messaging import PrivateMessagingService @cherrypy.popargs('id') class PrivateMessage(BaseResource): exposed = True def __init__(self): super(PrivateMessage, self).__init__() self.service = Priv...
{ "repo_name": "GeoffColburn/hackathon", "path": "api/resources/PrivateMessage.py", "copies": "1", "size": "1411", "license": "mit", "hash": 3699624792909589500, "line_mean": 29.6956521739, "line_max": 95, "alpha_frac": 0.616583983, "autogenerated": false, "ratio": 3.554156171284635, "config_tes...
__author__ = 'Geoff' import cherrypy from BaseResource import BaseResource from ..services.project_service import ProjectService @cherrypy.popargs('id') class Project(BaseResource): exposed = True def __init__(self): super(Project, self).__init__() self.service = ProjectService() def GET...
{ "repo_name": "GeoffColburn/hackathon", "path": "api/resources/Project.py", "copies": "1", "size": "1189", "license": "mit", "hash": 8190478402118055000, "line_mean": 27.3333333333, "line_max": 81, "alpha_frac": 0.5853658537, "autogenerated": false, "ratio": 3.6925465838509317, "config_test": f...
__author__ = 'Geoffrey Cheung' # coding: utf-8 from os import listdir, remove from os.path import isfile, join, split from hashlib import md5, sha1 from fileobj import fileObject fileList = [] sortedList = [] debug = False path = '' debug_path = "C:\Users\Geoffrey&Gillian\Desktop\Test Folder" def isSameFile(pth1, pt...
{ "repo_name": "kahogeoff/Repeated-Remover", "path": "src/core.py", "copies": "1", "size": "1285", "license": "mit", "hash": 6277386360892339000, "line_mean": 24.7, "line_max": 87, "alpha_frac": 0.6140077821, "autogenerated": false, "ratio": 3.390501319261214, "config_test": false, "has_no_key...
from flask import Flask, jsonify, render_template import utorrentclient from datetime import timedelta from Maraschino import app from maraschino.tools import * @app.route('/xhr/utorrent/') @requires_auth def xhr_utorrent(): # initialize empty list, which will be later populated with listing # of active torr...
{ "repo_name": "Sir-Henry-Curtis/Ironworks", "path": "builtinPlugins/utorrent.py", "copies": "3", "size": "1484", "license": "mit", "hash": -3300557465311749600, "line_mean": 31.2608695652, "line_max": 183, "alpha_frac": 0.6819407008, "autogenerated": false, "ratio": 3.71, "config_test": false, ...
from flask import Flask, jsonify, render_template import utorrentclient from datetime import timedelta from Maraschino import app from maraschino.tools import * def app_link(): utorrent_ip = get_setting_value('utorrent_ip') utorrent_port = get_setting_value('utorrent_port') return 'http://%s:%s/gui/...
{ "repo_name": "mrkipling/maraschino", "path": "modules/utorrent.py", "copies": "7", "size": "1706", "license": "mit", "hash": -3135164485168709000, "line_mean": 30.5925925926, "line_max": 183, "alpha_frac": 0.6723329426, "autogenerated": false, "ratio": 3.5765199161425576, "config_test": false,...
from flask import Flask, jsonify, render_template import transmissionrpc from datetime import timedelta from maraschino.tools import * from maraschino import app, logger def log_exception(e): logger.log('Transmission :: EXCEPTION -- %s' % e, 'DEBUG') @app.route('/xhr/transmission') @app.route('/xhr/transmissio...
{ "repo_name": "Sir-Henry-Curtis/Ironworks", "path": "builtinPlugins/transmission.py", "copies": "3", "size": "2476", "license": "mit", "hash": 2343884801659196400, "line_mean": 31.5921052632, "line_max": 97, "alpha_frac": 0.6134894992, "autogenerated": false, "ratio": 4.085808580858086, "config...
from flask import render_template import transmissionrpc from datetime import timedelta from maraschino.tools import * from maraschino import app, logger def log_exception(e): logger.log('Transmission :: EXCEPTION -- %s' % e, 'DEBUG') @app.route('/xhr/transmission/') @requires_auth def xhr_transmission(): ...
{ "repo_name": "gugahoi/maraschino", "path": "modules/transmission.py", "copies": "2", "size": "2760", "license": "mit", "hash": 6340905745066760000, "line_mean": 31.4823529412, "line_max": 97, "alpha_frac": 0.6086956522, "autogenerated": false, "ratio": 3.9884393063583814, "config_test": false,...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2012-2013, The Pilot Program" __license__ = "MIT" import sys import gzip def get_distance(dataPointX, centroidX): # Calculate Euclidean distance. return abs(centroidX - dataPointX) # ---------------------------------------------------------------...
{ "repo_name": "georgeha/k-means-map-reduce", "path": "mapper.py", "copies": "1", "size": "3667", "license": "mit", "hash": 2335637900316963000, "line_mean": 38.8586956522, "line_max": 138, "alpha_frac": 0.540223616, "autogenerated": false, "ratio": 3.8969181721572794, "config_test": false, "h...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2012-2013, The Pilot Program" __license__ = "MIT" import sys import os import radical.pilot as rp import time import gzip """ DESCRIPTION: mpk-means For every task A_n (mapper) is started """ # READ: The RADICAL-Pilot documentation: # http://radi...
{ "repo_name": "georgeha/k-means-map-reduce", "path": "mpk-k-means.py", "copies": "1", "size": "10115", "license": "mit", "hash": -6877901781456490000, "line_mean": 40.1178861789, "line_max": 156, "alpha_frac": 0.5338606031, "autogenerated": false, "ratio": 4.302424500212675, "config_test": fals...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2012-2013, The Pilot Program" __license__ = "MIT" import os, sys, math from random import randint def get_distance(dataPointX, dataPointY, centroidX, centroidY): # Calculate Euclidean distance. return math.sqrt(math.pow((centroidY - ...
{ "repo_name": "georgeha/k-means-version_2", "path": "clustering_the_elements.py", "copies": "1", "size": "3073", "license": "mit", "hash": 4079706036017667000, "line_mean": 37.9113924051, "line_max": 126, "alpha_frac": 0.4920273349, "autogenerated": false, "ratio": 4.011749347258486, "config_te...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2012-2013, The Pilot Project" __license__ = "MIT" """ A Mandelbrot Fractal Generator Using Pilot Job This is an example of mandelbrot Fracatl Generator using the capabilities of Pilot Job API. It requires the Python Image Library (PIL...
{ "repo_name": "georgeha/mandelbrot", "path": "mandel_with_txt_files/mandelbrot_pilot_cores.py", "copies": "1", "size": "8079", "license": "mit", "hash": -7257832465514424000, "line_mean": 36.4027777778, "line_max": 129, "alpha_frac": 0.5822502785, "autogenerated": false, "ratio": 3.71961325966850...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2012-2013, The Pilot Project" __license__ = "MIT" """ A Mandelbrot Fractal Generator Using Pilot Job This is an example of mandelbrot Fracatl Generator using the capabilities of Pilot Job API. It requires the Python Image Library (PIL) which c...
{ "repo_name": "georgeha/mandelbrot", "path": "mandelbrot_core/mandelbrot_pilot_cores.py", "copies": "1", "size": "7097", "license": "mit", "hash": -8474553532810824000, "line_mean": 32.63507109, "line_max": 125, "alpha_frac": 0.6492884317, "autogenerated": false, "ratio": 3.1997294860234446, "c...
_author__ = "George Chantzialexiou" __copyright__ = "Copyright 2012-2013, The Pilot Project" __license__ = "MIT" import os, sys, radical.pilot, math # , multiprocessing from random import randint import time """ This is a simple impementation of k-means algorithm using the Radical-Pilot API. """ #...
{ "repo_name": "georgeha/k-means-version_2", "path": "k-means.py", "copies": "1", "size": "14529", "license": "mit", "hash": -6673368029195136000, "line_mean": 40.8703170029, "line_max": 143, "alpha_frac": 0.5224034689, "autogenerated": false, "ratio": 3.926756756756757, "config_test": false, ...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2012-2013, The Pilot Project" __license__ = "MIT" """ This is an implementation of mandelbrot using the Pilot Job API. It requires the Python Image Library (PIL) which can be easily installed with 'easy_install PIL'. Also, it requires ...
{ "repo_name": "georgeha/mandelbrot", "path": "mandelbrot_CUs/mandelbrot_pilot.py", "copies": "1", "size": "7077", "license": "mit", "hash": 3818461902787658000, "line_mean": 32.3820754717, "line_max": 132, "alpha_frac": 0.6398191324, "autogenerated": false, "ratio": 3.183535762483131, "config_t...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2013-2014, http://radical.rutgers.edu" __license__ = "MIT" import sys import numpy as np def get_distance(dataPoint, centroid): # Calculate Euclidean distance. return np.sqrt(sum((dataPoint - centroid) ** 2)) # -----------------------------------...
{ "repo_name": "georgeha/k-means", "path": "mapper.py", "copies": "1", "size": "3402", "license": "mit", "hash": -242271411132627400, "line_mean": 33.7142857143, "line_max": 110, "alpha_frac": 0.5631981188, "autogenerated": false, "ratio": 3.677837837837838, "config_test": false, "has_no_keywo...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2013-2014, http://radical.rutgers.edu" __license__ = "MIT" import sys import os import radical.pilot as rp import time import copy import numpy as np SHARED_INPUT_FILE = 'dataset.in' MY_STAGING_AREA = 'staging:///' """ DESCRIPTION: k-means For every ta...
{ "repo_name": "georgeha/k-means", "path": "k-means.py", "copies": "1", "size": "11326", "license": "mit", "hash": 1484047892875371300, "line_mean": 38.0551724138, "line_max": 147, "alpha_frac": 0.5384072047, "autogenerated": false, "ratio": 4.2356020942408374, "config_test": false, "has_no_ke...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2014, The RADICAL Group" __license__ = "MIT" import os import sys import radical.pilot as rp import math import time """ This is a simple implementation of k-means algorithm using the RADICAl-Pilot API. """ #-----------------------------------...
{ "repo_name": "JensTimmerman/radical.pilot", "path": "examples/kmeans/k-means.py", "copies": "1", "size": "13441", "license": "mit", "hash": -34198953843149576, "line_mean": 36.9689265537, "line_max": 149, "alpha_frac": 0.5426679563, "autogenerated": false, "ratio": 3.9404866608032836, "config_...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2014, The RADICAL Group" __license__ = "MIT" import os, sys, math def get_distance(dataPointX, dataPointY, centroidX, centroidY): # Calculate Euclidean distance. return math.sqrt(math.pow((centroidY - dataPointY), 2) + math.pow((centroidX -...
{ "repo_name": "JensTimmerman/radical.pilot", "path": "examples/kmeans/finding_the_new_centroids.py", "copies": "1", "size": "2480", "license": "mit", "hash": -8944830847040610000, "line_mean": 29.6172839506, "line_max": 103, "alpha_frac": 0.5197580645, "autogenerated": false, "ratio": 3.663220088...
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2014, The RADICAL Group" __license__ = "MIT" import sys import random #------------------------------------------------------------------------------ if __name__ == "__main__": args = sys.argv[1:] if len(args) < 1: print "Usage: py...
{ "repo_name": "JensTimmerman/radical.pilot", "path": "examples/kmeans/creating_dataset.py", "copies": "1", "size": "1077", "license": "mit", "hash": 8037210338955297000, "line_mean": 25.925, "line_max": 94, "alpha_frac": 0.4986072423, "autogenerated": false, "ratio": 3.902173913043478, "config_...
""" Module for parsing URLs in chat or on demand """ import re import requests from googl import Googl from bs4 import BeautifulSoup from logsetup import strip_colors from basemodule import BaseModule, BaseCommandContext regex = re.compile(""" ^( # Starts with htt...
{ "repo_name": "nickraptis/fidibot", "path": "src/modules/urlparser.py", "copies": "1", "size": "4271", "license": "bsd-2-clause", "hash": 1521417699070951000, "line_mean": 30.8731343284, "line_max": 77, "alpha_frac": 0.5350035121, "autogenerated": false, "ratio": 3.918348623853211, "config_test...
import argparse, sys from fluff.commands.heatmap import heatmap from fluff.commands.bandplot import bandplot from fluff.commands.profile import profile from fluff.color import DEFAULT_COLORS from fluff.config import * from fluff.fluffio import * def parse_cmds(): description = """ fluff v{0} """.format(F...
{ "repo_name": "simonvh/fluff", "path": "fluff/parse.py", "copies": "1", "size": "15495", "license": "mit", "hash": 5542916492649729000, "line_mean": 40.9918699187, "line_max": 116, "alpha_frac": 0.4472410455, "autogenerated": false, "ratio": 5.027579493835172, "config_test": false, "has_no_ke...
__author__ = 'george' import os import sys import pysam ### External imports ### import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties import numpy as np from scipy.stats import scoreatpercentile ### My imports ### from fluff.color import parse_colors from fluff.fluffio import load_read_...
{ "repo_name": "simonvh/fluff", "path": "fluff/commands/bandplot.py", "copies": "1", "size": "6167", "license": "mit", "hash": -713243253681510800, "line_mean": 39.3071895425, "line_max": 157, "alpha_frac": 0.5751580996, "autogenerated": false, "ratio": 3.598016336056009, "config_test": false, ...
__author__ = 'george' import os import sys import pysam ### My imports ### from fluff.color import parse_colors from fluff.plot import profile_screenshot from fluff.util import process_groups def profile(args): interval = args.interval datafiles = [x.strip() for x in args.datafiles] annotation = args.ann...
{ "repo_name": "simonvh/fluff", "path": "fluff/commands/profile.py", "copies": "1", "size": "2024", "license": "mit", "hash": -1896981853410439200, "line_mean": 32.7333333333, "line_max": 107, "alpha_frac": 0.5662055336, "autogenerated": false, "ratio": 4.225469728601253, "config_test": false, ...
__author__ = 'George' SMART_WATER_BUTTON_MAC = '74:75:48:2e:2b:4c' HEFTY_BUTTON_MAC = '74:c2:46:4f:56:d8' GILETTE_BUTTON_MAC = '74:c2:46:84:ab:8e' from scapy.all import * from actions import * from database import * buttonAddresses = [button.macAddress for button in Button.select()] def arp_display(pkt): if pkt[A...
{ "repo_name": "FireEater64/DashBroker", "path": "dashbroker.py", "copies": "1", "size": "1168", "license": "mit", "hash": 9083564017544630000, "line_mean": 33.3529411765, "line_max": 108, "alpha_frac": 0.6900684932, "autogenerated": false, "ratio": 2.9346733668341707, "config_test": false, "h...
__author__ = 'George Oblapenko' __license__ = "GPLv3" """ Everything is serialized and stored in string columns """ import sqlite3 from json import loads, dumps def create_db(db_data: dict): conn = sqlite3.connect(db_data['db_path']) c = conn.cursor() sql_string = 'CREATE TABLE ' + db_data['table_name'] ...
{ "repo_name": "Kunstmord/krakenous", "path": "krakenous/backend_sqlite.py", "copies": "1", "size": "5035", "license": "mit", "hash": -2984214910022787000, "line_mean": 31.4838709677, "line_max": 100, "alpha_frac": 0.5851042701, "autogenerated": false, "ratio": 3.334437086092715, "config_test": ...
__author__ = 'George Oblapenko' __license__ = "GPLv3" """ The structure is {id: {'feature1': feature1, ...}, ...} """ import shelve def open_db(db_data: dict, writeback: bool=False) -> dict: """ open the db for reading, return everything in a dict """ return {'db': shelve.open(db_data['db_path'], wri...
{ "repo_name": "Kunstmord/krakenous", "path": "krakenous/backend_shelve.py", "copies": "1", "size": "3780", "license": "mit", "hash": -139085527151305460, "line_mean": 27.6363636364, "line_max": 97, "alpha_frac": 0.5775132275, "autogenerated": false, "ratio": 3.2755632582322356, "config_test": f...
__author__ = 'georgeoblapenko' from rest_framework import serializers from abandoned.models import Author, Reason, Tag, Project, Language class BaseProjectSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ('id', 'name', 'link', 'upvotes') class BaseAuthorSerializer(s...
{ "repo_name": "Kunstmord/abandoned", "path": "abandoned/serializers.py", "copies": "1", "size": "2072", "license": "mit", "hash": -8900844864139869000, "line_mean": 25.9220779221, "line_max": 119, "alpha_frac": 0.6703667954, "autogenerated": false, "ratio": 4.17741935483871, "config_test": fals...
__author__ = 'George Oblapenko, Viktor Evstratov' __license__ = "GPLv3" from krakenous.errors import * import os.path from json import dumps class DataSet(object): def __init__(self, **kwargs): """ :param kwargs: Parameters need to connect to the database. The ``backend`` parameter specifies the ...
{ "repo_name": "Kunstmord/krakenous", "path": "krakenous/dataset.py", "copies": "1", "size": "18871", "license": "mit", "hash": 7062138514705600000, "line_mean": 48.6631578947, "line_max": 121, "alpha_frac": 0.5653648455, "autogenerated": false, "ratio": 4.046097770154374, "config_test": false, ...
__author__ = 'George Oblapenko, Viktor Evstratov' __license__ = "GPLv3" """ Various pre-rolled functions to ease common operations - extracting data from csv files or files in a folder, sync/dump/copy datasets """ from csv import reader from os.path import join, isfile import numpy as np from os import walk from kraken...
{ "repo_name": "Kunstmord/krakenous", "path": "krakenous/prerolled.py", "copies": "1", "size": "8099", "license": "mit", "hash": -755131192073956200, "line_mean": 46.9289940828, "line_max": 120, "alpha_frac": 0.624891962, "autogenerated": false, "ratio": 3.8005631159080244, "config_test": false,...
__author__ = "Georges Goetz" __email__ = "ggoetz@stanford.edu" __status__ = "Prototype" from cfsite.apps.crawlers.gdcrawl import GdocsCrawler from cfsite.apps.events.models import Event, Category from cfsite.apps.crawlers.deduplication import SimpleDeduplicator class GdocsCrawlerController: """ GdocsCrawlerContr...
{ "repo_name": "susanctu/Crazyfish-Public", "path": "cfsite/apps/crawlers/controllers.py", "copies": "1", "size": "6706", "license": "mit", "hash": 8605568204761102000, "line_mean": 40.91875, "line_max": 79, "alpha_frac": 0.6200417537, "autogenerated": false, "ratio": 4.079075425790754, "config_...
__author__ = "Georges Goetz" __email__ = "ggoetz@stanford.edu" __status__ = "Prototype" from django.contrib import admin from django.contrib.admin import SimpleListFilter from cfsite.apps.events.models import Event, Location, Category class LocationAdmin(admin.ModelAdmin): """ LocationAdmin ---------- Ba...
{ "repo_name": "susanctu/Crazyfish-Public", "path": "cfsite/apps/events/admin.py", "copies": "1", "size": "2912", "license": "mit", "hash": 6821206817712581000, "line_mean": 29.6526315789, "line_max": 80, "alpha_frac": 0.6301510989, "autogenerated": false, "ratio": 4.301329394387001, "config_tes...
__author__ = "Georges Goetz" __email__ = "ggoetz@stanford.edu" __status__ = "Prototype" import datetime, math from django.shortcuts import render from django.http import HttpResponseRedirect from cfsite.apps.events.models import Location, Category, Event, CF_CATEGORIES from cfsite.apps.events.forms import SearchForm f...
{ "repo_name": "susanctu/Crazyfish-Public", "path": "cfsite/apps/events/views.py", "copies": "1", "size": "21924", "license": "mit", "hash": -8419293062083762000, "line_mean": 34.4184168013, "line_max": 91, "alpha_frac": 0.5857051633, "autogenerated": false, "ratio": 3.692152239811384, "config_t...
__author__ = 'Georges Goetz' __email__ = "ggoetz@stanford.edu" __status__ = "Prototype" import datetime from cfsite.apps.events.models import Event class SimpleDeduplicator: """ SimpleDeduplicator ---------- SimpleDeduplicator does simple de-duplication by looking for exact matches for events in the e...
{ "repo_name": "susanctu/Crazyfish-Public", "path": "cfsite/apps/crawlers/deduplication.py", "copies": "1", "size": "3443", "license": "mit", "hash": -566158356776291800, "line_mean": 34.8645833333, "line_max": 96, "alpha_frac": 0.6212605286, "autogenerated": false, "ratio": 4.031615925058548, "...
__author__ = "Georges Goetz" __email__ = "ggoetz@stanford.edu" __status__ = "Prototype" import datetime from django.db import models from django.core.exceptions import ValidationError # the crazyfish categories ART = 'arts & culture' CLASS = 'classes & workshop' CONF = 'conference' FAM = 'family' SPORT = 'sport' MUSI...
{ "repo_name": "susanctu/Crazyfish-Public", "path": "cfsite/apps/events/models.py", "copies": "1", "size": "12704", "license": "mit", "hash": -8751016268075820000, "line_mean": 36.0379008746, "line_max": 80, "alpha_frac": 0.6298016373, "autogenerated": false, "ratio": 4.355159410353102, "config_...
__author__ = "Georges Goetz" __email__ = "ggoetz@stanford.edu" __status__ = "Prototype" import gspread from cfsite.apps.events.models import Event, Location, Category from django.core.exceptions import ValidationError # TODO: figure out how to securely connect to the spreadsheet # Username and password in the code is...
{ "repo_name": "susanctu/Crazyfish-Public", "path": "cfsite/apps/crawlers/gdcrawl.py", "copies": "1", "size": "17165", "license": "mit", "hash": 3106076356666432000, "line_mean": 36.3965141612, "line_max": 101, "alpha_frac": 0.5834547043, "autogenerated": false, "ratio": 4.130173243503369, "conf...
__author__ = "Georges Goetz" __email__ = "ggoetz@stanford.edu" __status__ = "Prototype" import pytz from datetime import datetime from django import forms from cfsite.apps.events.models import Category, Location class SearchForm(forms.Form): """ SearchForm ---------- A class which handles user search dat...
{ "repo_name": "susanctu/Crazyfish-Public", "path": "cfsite/apps/events/forms.py", "copies": "1", "size": "5420", "license": "mit", "hash": 1630426087755676400, "line_mean": 32.0487804878, "line_max": 109, "alpha_frac": 0.6175276753, "autogenerated": false, "ratio": 4.471947194719472, "config_te...
__author__ = 'georgevanburgh' from databaseAccess import * import redisBroker import spotipy from redisBroker import RedisBroker from twilioBroker import TwilioBroker from playlistUtils import PlaylistUtils class SmsBroker(): def __init__(self): self.mySpotipy = spotipy.Spotify() self.twilioBroke...
{ "repo_name": "prakharbahuguna/PyPlyServer", "path": "src/smsBroker.py", "copies": "1", "size": "6106", "license": "mit", "hash": -8633836039673070000, "line_mean": 39.1710526316, "line_max": 138, "alpha_frac": 0.6459220439, "autogenerated": false, "ratio": 4.10073875083949, "config_test": fals...
__author__ = 'georgevanburgh' import json from redis import Redis from databaseAccess import * class RedisBroker: topicName = "party" def __init__(self): self.redisClient = Redis(host="redis92559-pyply.j.layershift.co.uk", password="O3KcaI9RRj") def partyTogglePause(self, partyId): me...
{ "repo_name": "prakharbahuguna/PyPlyServer", "path": "src/redisBroker.py", "copies": "1", "size": "1101", "license": "mit", "hash": 3757454497032783400, "line_mean": 28.7837837838, "line_max": 109, "alpha_frac": 0.6675749319, "autogenerated": false, "ratio": 3.540192926045016, "config_test": fa...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from collections import defaultdict from reveal_user_annotation.text.clean_text import clean_document from reveal_user_annotation.text.text_util import reduce_list_of_bags_of_words def clean_twitter_list(twitter_list, sent_tokenize, _treebank...
{ "repo_name": "MKLab-ITI/reveal-user-annotation", "path": "reveal_user_annotation/twitter/clean_twitter_list.py", "copies": "1", "size": "6415", "license": "apache-2.0", "hash": 1770363774246986000, "line_mean": 55.2719298246, "line_max": 143, "alpha_frac": 0.551208106, "autogenerated": false, "r...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from collections import deque import numpy as np from reveal_graph_embedding.eps_randomwalk.push import pagerank_limit_push from reveal_graph_embedding.eps_randomwalk.push import pagerank_lazy_push from reveal_graph_embedding.eps_randomwalk.push import cumulative_pag...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/eps_randomwalk/similarity.py", "copies": "1", "size": "9150", "license": "apache-2.0", "hash": 246414637663764670, "line_mean": 40.2162162162, "line_max": 120, "alpha_frac": 0.4643715847, "autogenerated": false, "ra...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from dateutil import parser as duparser import calendar # import datetime ######################################################################################################################## # Reddit author features. #############################################...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/reveal-popularity-prediction/reveal_popularity_prediction/features/author.py", "copies": "1", "size": "10270", "license": "apache-2.0", "hash": -6597080007978971000, "line_mean": 31.5, "line_max": 120, "alpha_frac": 0.69...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from io import StringIO import xml.etree.cElementTree as etree def document_generator(source_file_path_list): for file_path in source_file_path_list: with open(file_path, "r", encoding="iso-8859-1") as f: # Remove .html entities. ...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/discussion/slashdot.py", "copies": "1", "size": "1892", "license": "apache-2.0", "hash": -790954836902392300, "line_mean": 24.5675675676, "line_max": 81, "alpha_frac": 0.6390063425, "autogenerated": false, "...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from news_popularity_prediction.features.common import update_feature_value from news_popularity_prediction.features.basic import update_max_depth, update_ave_depth,\ update_max_width, update_ave_width, update_max_depth_max_width_ratio, update_depth_width_ratio_av...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/features/basic_wrappers.py", "copies": "1", "size": "2728", "license": "apache-2.0", "hash": 809705538265929700, "line_mean": 52.4901960784, "line_max": 112, "alpha_frac": 0.6418621701, "autogenerated": false,...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from news_popularity_prediction.features.common import update_feature_value from news_popularity_prediction.features.branching import update_hirsch_index, update_wiener_index, update_randic_index def update_branching_hirsch_index(feature_array, i, j, intermediate_di...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/features/branching_wrappers.py", "copies": "1", "size": "1421", "license": "apache-2.0", "hash": -8401985070075916000, "line_mean": 49.75, "line_max": 119, "alpha_frac": 0.663617171, "autogenerated": false, ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from news_popularity_prediction.features.common import update_feature_value from news_popularity_prediction.features.temporal import update_first_half_time_difference_mean,\ update_last_half_time_difference_mean, update_time_difference_std, update_timestamp_range ...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/features/temporal_wrappers.py", "copies": "1", "size": "1423", "license": "apache-2.0", "hash": 7263172238257490000, "line_mean": 53.7307692308, "line_max": 118, "alpha_frac": 0.7505270555, "autogenerated": fa...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from news_popularity_prediction.features.common import update_feature_value from news_popularity_prediction.features.user_graph import update_user_count_eponymous,\ update_user_count_estimated, update_user_hirsch_eponymous,\ update_graph_outdegree_entropy, upd...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/features/user_graph_wrappers.py", "copies": "1", "size": "4220", "license": "apache-2.0", "hash": -7367903151866513000, "line_mean": 64.9375, "line_max": 136, "alpha_frac": 0.6528436019, "autogenerated": false...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from news_popularity_prediction.learning.single_experiment import DiscussionModellingExperiment def reddit_news_experiments(data_folder): EXPERIMENT_CONSTRUCTION_TYPE = dict() EXPERIMENT_CONSTRUCTION_TYPE["add_branching_features"] = False EXPERIMENT_CONS...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/entry_points/snow_2016_workshop/experiment_configurations.py", "copies": "1", "size": "39038", "license": "apache-2.0", "hash": 4907162746229361000, "line_mean": 49.5019404916, "line_max": 105, "alpha_frac": 0.5...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from reveal_popularity_prediction.common.config_package import get_threads_number from reveal_popularity_prediction.reveal.utility import make_time_window_filter, safe_establish_mongo_connection,\ process_tweets_and_extract_urls, collect_social_context, form_graph...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/reveal-popularity-prediction/reveal_popularity_prediction/reveal/integration.py", "copies": "1", "size": "6660", "license": "apache-2.0", "hash": -6090459146896161000, "line_mean": 57.9380530973, "line_max": 120, "alpha_...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from reveal_popularity_prediction.features import comment_tree from reveal_popularity_prediction.features import user_graph from reveal_popularity_prediction.features import temporal from reveal_popularity_prediction.features import author def wrapper_comment_count(...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/reveal-popularity-prediction/reveal_popularity_prediction/features/wrappers.py", "copies": "1", "size": "9591", "license": "apache-2.0", "hash": 7883678094850239000, "line_mean": 38.3073770492, "line_max": 158, "alpha_fr...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from reveal_user_annotation.common.config_package import get_package_path from reveal_user_annotation.common.datarw import get_file_row_generator def get_topic_set(file_path): """ Opens one of the topic set resource files and returns a set of topics. - ...
{ "repo_name": "MKLab-ITI/reveal-user-annotation", "path": "reveal_user_annotation/twitter/manage_resources.py", "copies": "1", "size": "3845", "license": "apache-2.0", "hash": 6783256295000493000, "line_mean": 30.5163934426, "line_max": 122, "alpha_frac": 0.6564369311, "autogenerated": false, "ra...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from reveal_user_annotation.common.config_package import get_threads_number from reveal_user_annotation.rabbitmq.rabbitmq_util import establish_rabbitmq_connection, simple_notification,\ rabbitmq_server_service from reveal_user_classification.reveal.utility impor...
{ "repo_name": "MKLab-ITI/reveal-user-classification", "path": "reveal_user_classification/reveal/integration.py", "copies": "1", "size": "13827", "license": "apache-2.0", "hash": 1458931532717646000, "line_mean": 51.5741444867, "line_max": 131, "alpha_frac": 0.4201923772, "autogenerated": false, ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from reveal_user_classification.preprocess.insight.insight_curation_util import make_folder_paths,\ get_number_of_nodes, preprocess_graph_data, preprocess_feature_data, make_implicit_graphs, make_labelling def preprocess_insight_curation_dataset(insight_curation...
{ "repo_name": "MKLab-ITI/reveal-user-classification", "path": "reveal_user_classification/preprocess/insight/preprocess_curation_datasets.py", "copies": "2", "size": "2951", "license": "apache-2.0", "hash": -7766280402403424000, "line_mean": 46.5967741935, "line_max": 120, "alpha_frac": 0.4947475432,...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from reveal_user_classification.preprocess.insight.insight_multiview_util import make_folder_paths,\ get_number_of_nodes, preprocess_graph_data, preprocess_feature_data, make_implicit_graphs, make_labelling def preprocess_insight_multiview_dataset(insight_curati...
{ "repo_name": "VinACE/reveal-user-classification", "path": "reveal_user_classification/preprocess/insight/preprocess_multiview_datasets.py", "copies": "2", "size": "2925", "license": "apache-2.0", "hash": 4241139143204977000, "line_mean": 45.4285714286, "line_max": 120, "alpha_frac": 0.4823931624, ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from setuptools import setup # from setuptools.extension import Extension # try: # from Cython.Distutils import build_ext # except ImportError: # USE_CYTHON = False # else: # USE_CYTHON = True # import numpy # C_OPT_FLAG = "-O3" def readme(): with op...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "setup.py", "copies": "1", "size": "6333", "license": "apache-2.0", "hash": 3265258471354980400, "line_mean": 55.0442477876, "line_max": 119, "alpha_frac": 0.5791883783, "autogenerated": false, "ratio": 3.863941427699817, "config_test": ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from setuptools import setup def readme(): with open("README.md") as f: return f.read() setup( name='reveal-user-classification', version='0.1.17', author='Georgios Rizos', author_email='georgerizos@iti.gr', packages=['reveal_user_c...
{ "repo_name": "VinACE/reveal-user-classification", "path": "setup.py", "copies": "1", "size": "2211", "license": "apache-2.0", "hash": 6340050837410684000, "line_mean": 44.1224489796, "line_max": 159, "alpha_frac": 0.6558118498, "autogenerated": false, "ratio": 4.243761996161228, "config_test":...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from setuptools import setup def readme(): with open("README.md") as f: return f.read() setup( name='news-popularity-prediction', version='0.1.2', author='Georgios Rizos', author_email='georgerizos@iti.gr', packages=['news_popularity...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "setup.py", "copies": "1", "size": "1783", "license": "apache-2.0", "hash": 5932918811597418000, "line_mean": 40.4651162791, "line_max": 132, "alpha_frac": 0.6438586652, "autogenerated": false, "ratio": 4.215130023640662, "config_tes...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' from setuptools import setup def readme(): with open("README.md") as f: return f.read() setup( name='reveal-user-annotation', version='0.2.2', author='Georgios Rizos', author_email='georgerizos@iti.gr', packages=['reveal_user_annotat...
{ "repo_name": "MKLab-ITI/reveal-user-annotation", "path": "setup.py", "copies": "1", "size": "2168", "license": "apache-2.0", "hash": -1376004872240288300, "line_mean": 42.36, "line_max": 132, "alpha_frac": 0.6365313653, "autogenerated": false, "ratio": 4, "config_test": false, "has_no_keywor...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import argparse import os from multiprocessing import Pool from functools import partial import json from reveal_user_annotation.common.config_package import get_threads_number from reveal_user_annotation.common.datarw import load_pickle from reveal_user_annotation.t...
{ "repo_name": "MKLab-ITI/reveal-user-annotation", "path": "reveal_user_annotation/entry_points/extract_twitter_list_keywords.py", "copies": "1", "size": "3577", "license": "apache-2.0", "hash": -543575825798104400, "line_mean": 42.6219512195, "line_max": 135, "alpha_frac": 0.6116857702, "autogenera...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import argparse from reveal_user_classification.preprocess.snow.snow_2014_graph_dataset_util import process_tweet_collection,\ make_directory_tree, weakly_connected_graph, make_implicit_graphs, make_annotation from reveal_user_annotation.mongo.store_snow_data imp...
{ "repo_name": "VinACE/reveal-user-classification", "path": "reveal_user_classification/preprocess/snow/make_snow_2014_graph_dataset.py", "copies": "2", "size": "4762", "license": "apache-2.0", "hash": 1006696371892292100, "line_mean": 56.3734939759, "line_max": 125, "alpha_frac": 0.6593868123, "aut...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import argparse import scipy.sparse as spsp from reveal_graph_embedding.common import get_threads_number from reveal_graph_embedding.datautil.datarw import read_adjacency_matrix, write_features from reveal_graph_embedding.embedding.arcte.arcte import arcte def mai...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/entry_points/arcte.py", "copies": "1", "size": "3882", "license": "apache-2.0", "hash": 5518647278580490000, "line_mean": 45.2142857143, "line_max": 120, "alpha_frac": 0.5350334879, "autogenerated": false, "ratio": ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import collections import numpy as np import nltk def combine_word_list(word_list): """ Combine word list into a bag-of-words. Input: - word_list: This is a python list of strings. Output: - bag_of_words: This is the corresponding multi-set or ba...
{ "repo_name": "MKLab-ITI/reveal-user-annotation", "path": "reveal_user_annotation/text/text_util.py", "copies": "1", "size": "5084", "license": "apache-2.0", "hash": -1312210842806488300, "line_mean": 35.8333333333, "line_max": 164, "alpha_frac": 0.644698013, "autogenerated": false, "ratio": 3.66...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import collections import numpy as np import scipy.sparse as spsp from news_popularity_prediction.features.common import update_feature_value, replicate_feature_value from news_popularity_prediction.features.intermediate import update_branching_randic_graph,\ up...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/discussion/features.py", "copies": "1", "size": "27771", "license": "apache-2.0", "hash": -8045712025739214000, "line_mean": 53.6673228346, "line_max": 125, "alpha_frac": 0.541176047, "autogenerated": false, ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import copy import networkx as nx import community import numpy as np import scipy.sparse as sparse import scipy.sparse.linalg as spla from reveal_graph_embedding.embedding.laplacian import get_normalized_laplacian def mroc(adjacency_matrix, alpha): """ Ext...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/embedding/competing_methods.py", "copies": "1", "size": "13396", "license": "apache-2.0", "hash": -95830354708380180, "line_mean": 36.9490084986, "line_max": 124, "alpha_frac": 0.6105553897, "autogenerated": false, ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import datetime from dateutil import parser as duparser from urllib.parse import urlparse import numpy as np from reveal_popularity_prediction.builder.targets import ci_lower_bound def extract_author_metadata(document): author_metadata = document["author_metad...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/reveal-popularity-prediction/reveal_popularity_prediction/builder/collect/youtube/extract.py", "copies": "1", "size": "6821", "license": "apache-2.0", "hash": -498243017749565760, "line_mean": 37.3202247191, "line_max": 12...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import datetime from praw.helpers import flatten_tree def fetch_discussion(reddit_handler, url): """ Fetches the full discussion under a submission and stores it as a .json file. """ ###################################################################...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/reveal-popularity-prediction/reveal_popularity_prediction/builder/collect/reddit/discussion_collector.py", "copies": "1", "size": "1122", "license": "apache-2.0", "hash": 8879757409125543000, "line_mean": 36.4, "line_max":...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import datetime import time from oauth2client.tools import argparser from googleapiclient.errors import HttpError from youtube_discussion_collector.auth_new import get_authenticated_service from youtube_discussion_collector.collect import get_video_metadata, get_all...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/youtube-discussion-collector/youtube_discussion_collector/entry_points/collect_youtube_discussion.py", "copies": "1", "size": "2814", "license": "apache-2.0", "hash": 7608043736570145000, "line_mean": 38.0833333333, "line_...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import gc import numpy as np from scipy import sparse as spsp from reveal_graph_embedding.common import get_file_row_generator from reveal_graph_embedding.datautil.insight_datautil.insight_read_data import scipy_sparse_to_csv,\ read_adjacency_matrix from reveal_g...
{ "repo_name": "MKLab-ITI/reveal-user-classification", "path": "reveal_user_classification/preprocess/insight/insight_curation_util.py", "copies": "2", "size": "10289", "license": "apache-2.0", "hash": -962308171004014300, "line_mean": 42.050209205, "line_max": 125, "alpha_frac": 0.6094858587, "auto...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import gc import os import json from multiprocessing import Pool from functools import partial import numpy as np import scipy.sparse as spsp import networkx as nx from reveal_user_annotation.common.config_package import get_threads_number from reveal_user_annotation...
{ "repo_name": "MKLab-ITI/reveal-user-classification", "path": "reveal_user_classification/preprocess/snow/snow_2014_graph_dataset_util.py", "copies": "2", "size": "26162", "license": "apache-2.0", "hash": 5906065123967049000, "line_mean": 53.617954071, "line_max": 254, "alpha_frac": 0.5831740693, "...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import heapq import collections import numpy as np import scipy.sparse as spsp from reveal_popularity_prediction.builder.collect.youtube import extract as youtube_extract from reveal_popularity_prediction.builder.collect.reddit import extract as reddit_extract def...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/reveal-popularity-prediction/reveal_popularity_prediction/builder/build_graphs.py", "copies": "1", "size": "22165", "license": "apache-2.0", "hash": 3775587093076856000, "line_mean": 42.5461689587, "line_max": 120, "alph...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import itertools from itertools import islice, zip_longest import numpy as np def grouper(iterable, n, pad_value=None): """ Returns a generator of n-length chunks of an input iterable, with appropriate padding at the end. Example: grouper(3, 'abcdefg',...
{ "repo_name": "MKLab-ITI/reveal-user-annotation", "path": "reveal_user_annotation/text/map_data.py", "copies": "1", "size": "1687", "license": "apache-2.0", "hash": -606543571179536600, "line_mean": 28.0862068966, "line_max": 101, "alpha_frac": 0.6271487848, "autogenerated": false, "ratio": 3.428...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import json import datetime import numpy as np import scipy.sparse as spsp from scipy.stats import rankdata from news_popularity_prediction.discussion.reddit import document_generator, get_post_url, get_post_title,\ calculate_targets, comment_generator, extract_...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/visualization/make_vizualization_json.py", "copies": "1", "size": "29002", "license": "apache-2.0", "hash": -1510998095263392000, "line_mean": 48.6609589041, "line_max": 248, "alpha_frac": 0.598820771, "autoge...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import json import resource import sys resource.setrlimit(resource.RLIMIT_STACK, (2**29, -1)) sys.setrecursionlimit(10**6) import praw from reveal_popularity_prediction.builder.collect.reddit.reddit_util import login from reveal_popularity_prediction.builder.collect...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/reveal-popularity-prediction/reveal_popularity_prediction/builder/collect/reddit/social_context.py", "copies": "1", "size": "1877", "license": "apache-2.0", "hash": 7625203952909292000, "line_mean": 30.2833333333, "line_ma...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import json import time import resource import sys resource.setrlimit(resource.RLIMIT_STACK, (2**29, -1)) sys.setrecursionlimit(10**6) from oauth2client.tools import argparser from googleapiclient.errors import HttpError from youtube_discussion_collector.auth_new im...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/youtube-discussion-collector/youtube_discussion_collector/entry_points/get_social_context_json_string.py", "copies": "1", "size": "3561", "license": "apache-2.0", "hash": 4206937247753720000, "line_mean": 41.9036144578, "l...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import json import numpy as np from news_popularity_prediction.discussion.targets import ci_lower_bound def document_generator(source_file_path_list): file_counter = 0 document_counter = 0 for file_path in source_file_path_list: file_end = Fal...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/discussion/reddit.py", "copies": "1", "size": "5173", "license": "apache-2.0", "hash": -7532877170292594000, "line_mean": 29.4294117647, "line_max": 126, "alpha_frac": 0.5151749468, "autogenerated": false, "...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import json def document_generator(source_file_path_list): document_counter = 0 for file_path in source_file_path_list: with open(file_path, "r") as batch_file: for file_row in batch_file: clean_file_row = file_row.strip(...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/discussion/anonymized.py", "copies": "1", "size": "1715", "license": "apache-2.0", "hash": 3126807402999354400, "line_mean": 22.1756756757, "line_max": 88, "alpha_frac": 0.6233236152, "autogenerated": false, ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import multiprocessing as mp import itertools import numpy as np import scipy.sparse as sparse from reveal_graph_embedding.common import get_threads_number from reveal_graph_embedding.eps_randomwalk.transition import get_natural_random_walk_matrix from reveal_graph_e...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/embedding/arcte/arcte.py", "copies": "1", "size": "31089", "license": "apache-2.0", "hash": -4349601350105960000, "line_mean": 44.1875, "line_max": 126, "alpha_frac": 0.5750265367, "autogenerated": false, "ratio": 4...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import multiprocessing as mp import itertools import time import numpy as np import scipy.sparse as spsp import networkx as nx import networkx.algorithms.components as nxalgcom from pymongo import ASCENDING from reveal_user_annotation.text.clean_text import clean_do...
{ "repo_name": "MKLab-ITI/reveal-user-annotation", "path": "reveal_user_annotation/mongo/preprocess_data.py", "copies": "1", "size": "38688", "license": "apache-2.0", "hash": 8982759260109491000, "line_mean": 46.8811881188, "line_max": 164, "alpha_frac": 0.5525227461, "autogenerated": false, "rati...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np from scipy.sparse import issparse from sklearn.preprocessing import normalize from sklearn.utils.validation import check_array from sklearn.utils.extmath import safe_sparse_dot from sklearn.preprocessing import LabelBinarizer def chi2_contingency_...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/embedding/community_weighting.py", "copies": "1", "size": "4862", "license": "apache-2.0", "hash": 5107299913212408000, "line_mean": 34.75, "line_max": 135, "alpha_frac": 0.6110654052, "autogenerated": false, "ratio...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np from scipy.sparse import issparse from reveal_graph_embedding.common import load_pickle, store_pickle def read_features(method_name, path): sparse_feature_method_set = set() sparse_feature_method_set.update(["lapple", ...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/datautil/feature_rw_util.py", "copies": "1", "size": "1887", "license": "apache-2.0", "hash": 465582679657471550, "line_mean": 25.5774647887, "line_max": 67, "alpha_frac": 0.5092739799, "autogenerated": false, "rati...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np from sklearn.kernel_approximation import AdditiveChi2Sampler from sklearn.preprocessing import normalize, scale def normalize_community_features(features): """ This performs TF-IDF-like normalization of community embedding features. I...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/embedding/common.py", "copies": "1", "size": "2711", "license": "apache-2.0", "hash": -2455812329798093000, "line_mean": 32.4691358025, "line_max": 120, "alpha_frac": 0.6761342678, "autogenerated": false, "ratio": 3...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np import numpy.linalg as npla import scipy as sp import scipy.sparse as spsp import scipy.sparse.linalg as spla import networkx as nx from networkx.algorithms.link_analysis import pagerank_scipy from reveal_graph_embedding.eps_randomwalk.transition i...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/embedding/implicit.py", "copies": "1", "size": "18204", "license": "apache-2.0", "hash": 139986600674726180, "line_mean": 48.2, "line_max": 202, "alpha_frac": 0.6465062624, "autogenerated": false, "ratio": 4.0435362...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np import scipy.sparse as sparse import ctypes as c import multiprocessing as mp def get_label_based_random_walk_matrix(adjacency_matrix, labelled_nodes, label_absorption_probability): """ Returns the label-absorbing random walk transition pr...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/eps_randomwalk/transition.py", "copies": "1", "size": "4482", "license": "apache-2.0", "hash": -6583358189759707000, "line_mean": 44.2727272727, "line_max": 159, "alpha_frac": 0.6773761714, "autogenerated": false, "...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np import scipy.sparse as sparse from reveal_graph_embedding.common import get_file_row_generator def read_adjacency_matrix(file_path, separator): """ Reads an edge list in csv format and returns the adjacency matrix in SciPy Sparse COOrdina...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/datautil/asu_datautil/asu_read_data.py", "copies": "1", "size": "3506", "license": "apache-2.0", "hash": 7739011533472357000, "line_mean": 33.0388349515, "line_max": 118, "alpha_frac": 0.6597261837, "autogenerated": f...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np import scipy.sparse as spsp from collections import defaultdict from reveal_graph_embedding.common import get_file_row_generator def read_adjacency_matrix(file_path, separator, numbering="matlab"): """ Reads an edge list in csv format and...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/datautil/snow_datautil/snow_read_data.py", "copies": "1", "size": "6993", "license": "apache-2.0", "hash": 9121931460106166000, "line_mean": 31.375, "line_max": 134, "alpha_frac": 0.5923065923, "autogenerated": false,...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np import scipy.sparse as spsp from sklearn.decomposition import TruncatedSVD from annoy import AnnoyIndex def make_text_graph(user_lemma_matrix, dimensionality, metric, number_of_estimators, number_of_neighbors): user_lemma_matrix_tfidf = augmen...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/embedding/text_graph.py", "copies": "1", "size": "3432", "license": "apache-2.0", "hash": 6628167248275306000, "line_mean": 38.8953488372, "line_max": 164, "alpha_frac": 0.6470416788, "autogenerated": false, "ratio"...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np import scipy.sparse as spsp from reveal_graph_embedding.common import get_file_row_generator def read_adjacency_matrix(file_path, separator, numbering="matlab"): """ Reads an edge list in csv format and returns the adjacency matrix in Sci...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/datautil/insight_datautil/insight_read_data.py", "copies": "1", "size": "5679", "license": "apache-2.0", "hash": -3107044730087050000, "line_mean": 31.6379310345, "line_max": 118, "alpha_frac": 0.5942947702, "autogene...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np import scipy.sparse as spsp from reveal_graph_embedding.embedding.implicit import get_implicit_combinatorial_adjacency_matrix,\ get_implicit_directed_adjacency_matrix def get_unnormalized_laplacian(adjacency_matrix): # Calculate diagonal ...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/embedding/laplacian.py", "copies": "1", "size": "2602", "license": "apache-2.0", "hash": -4674284847818926000, "line_mean": 33.7066666667, "line_max": 116, "alpha_frac": 0.7355880092, "autogenerated": false, "ratio"...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np import scipy.sparse as spsp from reveal_user_annotation.common.datarw import get_file_row_generator def read_oslom_features(oslom_folder, number_of_nodes): oslom_path = oslom_folder + "/tp" number_of_levels = 0 while True: ...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/datautil/read_exotic_features.py", "copies": "1", "size": "5345", "license": "apache-2.0", "hash": -5791575413045564000, "line_mean": 28.8603351955, "line_max": 93, "alpha_frac": 0.5861552853, "autogenerated": false, ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np import scipy.sparse as spsp def get_binary_graph(graph): graph = spsp.coo_matrix(graph) binary_graph = spsp.coo_matrix((np.ones_like(graph.data, dtype=np.float64), ...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "reveal_fp7_module/reveal-popularity-prediction/reveal_popularity_prediction/features/common.py", "copies": "1", "size": "1894", "license": "apache-2.0", "hash": 6208719307469095000, "line_mean": 32.2280701754, "line_max": 89, "alpha_frac"...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np from news_popularity_prediction.datautil.feature_rw import h5load_from, get_kth_row def fill_X_handcrafted_k_actual(dataset_k, h5_store_files, h5_keys, ...
{ "repo_name": "MKLab-ITI/news-popularity-prediction", "path": "news_popularity_prediction/learning/concatenate_features.py", "copies": "1", "size": "3738", "license": "apache-2.0", "hash": -4484682567731281000, "line_mean": 41.9655172414, "line_max": 126, "alpha_frac": 0.4432851792, "autogenerated"...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import numpy as np from reveal_graph_embedding.common import get_threads_number from reveal_graph_embedding.experiments.utility import run_experiment ####################################################################################################################...
{ "repo_name": "MKLab-ITI/reveal-graph-embedding", "path": "reveal_graph_embedding/experiments/demo.py", "copies": "1", "size": "3853", "license": "apache-2.0", "hash": -3191426867047894000, "line_mean": 44.3294117647, "line_max": 120, "alpha_frac": 0.6005709836, "autogenerated": false, "ratio": 4...