text stringlengths 0 1.05M | meta dict |
|---|---|
__author__ = 'jond'
import json
import os
from xml.etree import ElementTree as ET
from rdflib import URIRef, Literal, Namespace, RDF
from gmdspconverters import utils
GRITTING = Namespace('http://data.gmdsp.org.uk/id/salford/gritting/')
GRITTING_ONT = Namespace('http://data.gmdsp.org.uk/def/council/gritting/')
def... | {
"repo_name": "GMDSP-Linked-Data/RDF-work-in-progress",
"path": "salford/gmdspconverters/gritting.py",
"copies": "1",
"size": "1525",
"license": "mit",
"hash": -2517389860655763000,
"line_mean": 31.4468085106,
"line_max": 170,
"alpha_frac": 0.571147541,
"autogenerated": false,
"ratio": 3.53828306... |
__author__ = 'jond'
import os
import re
from rdflib import Graph, Namespace
from pyproj import Proj, transform
v84 = Proj(proj="latlong",towgs84="0,0,0",ellps="WGS84")
v36 = Proj(proj="latlong", k=0.9996012717, ellps="airy",
towgs84="446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894")
vgrid = Proj(init=... | {
"repo_name": "GMDSP-Linked-Data/RDF-work-in-progress",
"path": "salford/gmdspconverters/utils.py",
"copies": "1",
"size": "3019",
"license": "mit",
"hash": 5871915690164307000,
"line_mean": 34.1162790698,
"line_max": 94,
"alpha_frac": 0.6717456111,
"autogenerated": false,
"ratio": 2.867046533713... |
__author__ = 'jond'
from PyQt4 import QtCore, QtNetwork
class FakeReply(QtNetwork.QNetworkReply):
"""
The reply class that is used when a url is to be dealt with by the application
and is not to be dealt with by the usual method
"""
def __init__(self, parent, request, operation, dj_respon... | {
"repo_name": "joeyjojo/django_offline",
"path": "src/django_offline/handlers.py",
"copies": "1",
"size": "4186",
"license": "mit",
"hash": 5057578269715849000,
"line_mean": 39.0392156863,
"line_max": 121,
"alpha_frac": 0.6376015289,
"autogenerated": false,
"ratio": 3.967772511848341,
"config_t... |
__author__ = 'jonestj1'
import mbuild as mb
from mbuild.lib.atoms import H
from mbuild.lib.moieties import CH3
from mbuild.lib.moieties import CH2
from mbuild.lib.moieties import Silane
from mbuild.lib.surfaces import Betacristobalite
from mbuild.lib.bulk_materials import AmorphousSilica
class PegMonomer(mb.Compound... | {
"repo_name": "Jonestj1/mbuild",
"path": "mbuild/examples/alkane_monolayer/peg_monolayer.py",
"copies": "1",
"size": "5061",
"license": "mit",
"hash": 9066267070101779000,
"line_mean": 32.2960526316,
"line_max": 97,
"alpha_frac": 0.5558190081,
"autogenerated": false,
"ratio": 3.2525706940874035,
... |
__author__ = 'Joni'
from time import sleep
from datetime import datetime
from boto.emr.step import StreamingStep
from boto.emr.connection import EmrConnection
from boto.emr.instance_group import InstanceGroup
from boto.emr.bootstrap_action import BootstrapAction
#S3_BUCKET = 'eng-serv-2015'
bucket_name = 'eng-serv-... | {
"repo_name": "jfcabral/SE2015",
"path": "deprecated/teste1.py",
"copies": "1",
"size": "2530",
"license": "bsd-3-clause",
"hash": 2151223100689801200,
"line_mean": 35.6811594203,
"line_max": 109,
"alpha_frac": 0.5458498024,
"autogenerated": false,
"ratio": 3.3158584534731324,
"config_test": fa... |
__author__ = 'jon'
# -*- coding: utf-8 -*-
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from environment import *
log = logging.getLogger()
def arg_checker(args, required=None):
if required is None:
return {'status': 'Failure', 'message': 'Required... | {
"repo_name": "jsharris/job_manager",
"path": "libs/helpers.py",
"copies": "1",
"size": "5364",
"license": "mit",
"hash": 2629953516883019300,
"line_mean": 29.1404494382,
"line_max": 230,
"alpha_frac": 0.5309470544,
"autogenerated": false,
"ratio": 3.8813314037626627,
"config_test": false,
"h... |
__author__ = 'Jo'
from enum import Enum
from Direction import Direction
from Terrain import TerrainType
class RampType (Enum):
RAMP_0 = 0
RAMP_1 = 1
RAMP_2 = 2
RAMP_CORNER = 3
RAMP_4 = 4
class ConnectionType (Enum):
Connect = 0
WALL = 1
END = 2
class Ramp:
"""contains more inform... | {
"repo_name": "gaetjen/Blendorf",
"path": "code/Ramp.py",
"copies": "1",
"size": "9210",
"license": "mit",
"hash": -3623910312566562000,
"line_mean": 35.4031620553,
"line_max": 103,
"alpha_frac": 0.5221498371,
"autogenerated": false,
"ratio": 3.453318335208099,
"config_test": false,
"has_no_k... |
__author__ = 'jon'
from database import *
from environment import *
from helpers import email
import logging
log = logging.getLogger()
class Jobs(object):
def __init__(self):
pass
def new(self, ini_file, job_type, email, notify):
env = Environment(ini_file)
db = DBConnect(env)
... | {
"repo_name": "jsharris/job_manager",
"path": "libs/jobs.py",
"copies": "1",
"size": "2870",
"license": "mit",
"hash": -2729814877973569000,
"line_mean": 30.9,
"line_max": 91,
"alpha_frac": 0.5470383275,
"autogenerated": false,
"ratio": 3.632911392405063,
"config_test": false,
"has_no_keyword... |
__author__ = 'jon'
import psycopg2
import logging
from datetime import datetime
log = logging.getLogger()
#
# Class for presenting a simple interface for manipulating postgres
#
class DBConnect(object):
def __init__(self, env, server=None, db=None, dbuser=None, passwd=None):
# need the db parameters fr... | {
"repo_name": "jsharris/job_manager",
"path": "libs/database.py",
"copies": "1",
"size": "12565",
"license": "mit",
"hash": 8426531376723880000,
"line_mean": 37.7808641975,
"line_max": 112,
"alpha_frac": 0.5000397931,
"autogenerated": false,
"ratio": 4.192525859192526,
"config_test": false,
"... |
__author__ = 'jono'
import blob
class World:
def __init__(self):
# Stores all blobs
self.blobs = {}
# Stores the ids of blobs that the player owns
self.player_blobs = []
self.exp = []
def update(self, eats, blobs, removals):
for blob_id in blobs.keys():
... | {
"repo_name": "jonnylin13/agarthon",
"path": "world.py",
"copies": "1",
"size": "1483",
"license": "mit",
"hash": 3173523780281136600,
"line_mean": 30.5531914894,
"line_max": 138,
"alpha_frac": 0.5657451113,
"autogenerated": false,
"ratio": 3.2593406593406593,
"config_test": false,
"has_no_ke... |
__author__ = 'jono'
import pygame
caption = 'Agarthon by jonnylin13'
import world
class GameView:
def __init__(self, agarthon):
pygame.init()
pygame.font.init()
self.resolution = self.width, self.height = 800, 600
self.display = pygame.display.set_mode(self.resolution)
... | {
"repo_name": "jonnylin13/agarthon",
"path": "gameview.py",
"copies": "1",
"size": "2048",
"license": "mit",
"hash": 2521604142270289000,
"line_mean": 23.9756097561,
"line_max": 104,
"alpha_frac": 0.560546875,
"autogenerated": false,
"ratio": 3.4653130287648053,
"config_test": false,
"has_no_... |
__author__ = 'jono'
import session, world, gameview, packet
import constants
c2s_opcodes = {'protocol_handshake':254, 'game_version_handshake':255, 'token':80,
'set_nickname':0, 'spectate':1, 'mouse_move':16, 'split':17, 'q_pressed':18,
'q_released':19, 'eject_mass':21}
s2c_opcodes = {16... | {
"repo_name": "jonnylin13/agarthon",
"path": "client.py",
"copies": "1",
"size": "8431",
"license": "mit",
"hash": 9047901894224415000,
"line_mean": 36.9774774775,
"line_max": 101,
"alpha_frac": 0.580239592,
"autogenerated": false,
"ratio": 3.6215635738831615,
"config_test": false,
"has_no_ke... |
__author__ = 'jono'
import struct
class Packet:
# Little Endian uses prefix <B
def __init__(self, input=bytearray(), output=bytearray()):
self.input = input
self.output = output
# write null terminated utf-16 string
def write_string(self, data):
self.output += struct.pack('<... | {
"repo_name": "jonnylin13/agarthon",
"path": "packet.py",
"copies": "1",
"size": "2913",
"license": "mit",
"hash": 6595140143869184000,
"line_mean": 25.4818181818,
"line_max": 76,
"alpha_frac": 0.5616203227,
"autogenerated": false,
"ratio": 3.7203065134099615,
"config_test": false,
"has_no_ke... |
__author__ = 'jono'
import websocket, threading
class Session:
def __init__(self, agarthon):
self.main = agarthon
self.ip, self.port = self.main.server_info[0].split(':')
self.token = self.main.server_info[1]
self.data_in = []
self.running = False
self.thread = ... | {
"repo_name": "jonnylin13/agarthon",
"path": "session.py",
"copies": "1",
"size": "2692",
"license": "mit",
"hash": -6743491157612783000,
"line_mean": 31.8292682927,
"line_max": 96,
"alpha_frac": 0.5334323923,
"autogenerated": false,
"ratio": 4.3072,
"config_test": false,
"has_no_keywords": f... |
__author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"
from hamcrest.core.base_matcher import BaseMatcher
from hamcrest.core.helpers.hasmethod import hasmethod
from hamcrest.core.helpers.wrap_matcher import wrap_matcher
class MatchingInOrder(object):
def __init... | {
"repo_name": "axbaretto/beam",
"path": "sdks/python/.tox/py27gcp/lib/python2.7/site-packages/hamcrest/library/collection/issequence_containinginorder.py",
"copies": "6",
"size": "3219",
"license": "apache-2.0",
"hash": 3670398232779128000,
"line_mean": 35.5795454545,
"line_max": 98,
"alpha_frac": 0.... |
__author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"
from hamcrest.core.base_matcher import BaseMatcher
import six
def stripspace(string):
result = ''
last_was_space = True
for character in string:
if character.isspace():
if not la... | {
"repo_name": "msabramo/PyHamcrest",
"path": "src/hamcrest/library/text/isequal_ignoring_whitespace.py",
"copies": "6",
"size": "1667",
"license": "bsd-3-clause",
"hash": -8010375042774392000,
"line_mean": 28.2456140351,
"line_max": 79,
"alpha_frac": 0.6478704259,
"autogenerated": false,
"ratio":... |
__author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"
import six
class QuasiDictionary(object):
def items(self):
return QuasiDictionaryItemIterator()
def keys(self):
return QuasiDictionaryKeyIterator()
def values(self):
return... | {
"repo_name": "msabramo/PyHamcrest",
"path": "tests/hamcrest_unit_test/collection/quasidict.py",
"copies": "2",
"size": "1051",
"license": "bsd-3-clause",
"hash": 2717258590528882000,
"line_mean": 21.847826087,
"line_max": 64,
"alpha_frac": 0.6726926736,
"autogenerated": false,
"ratio": 4.0736434... |
__author__ = 'joon'
import numpy as np
import os.path as osp
import random
import scipy
from xml.dom import minidom
def load_pascal_conf(control, conf):
conf['nclasses'] = 20
conf['year'] = '20' + control['test_dataset'][3:5]
conf['testset'] = control['test_dataset'][5:]
conf['imgsetpath'] = osp.join... | {
"repo_name": "coallaoh/GuidedLabelling",
"path": "lib/pascaltools/io.py",
"copies": "1",
"size": "3419",
"license": "mit",
"hash": -1136522080375518600,
"line_mean": 35.7634408602,
"line_max": 113,
"alpha_frac": 0.5656624744,
"autogenerated": false,
"ratio": 3.1628122109158188,
"config_test": ... |
__author__ = 'joon'
import sys
sys.path.insert(0, 'src')
sys.path.insert(0, 'lib')
sys.path.insert(0, 'ResearchTools')
from imports.basic_modules import *
from imports.import_caffe import *
from imports.ResearchTools import *
from imports.libmodules import *
from image.crop import random_crop
def set_preprocessor... | {
"repo_name": "coallaoh/GuidedLabelling",
"path": "lib/caffetools/preprocessor.py",
"copies": "1",
"size": "6848",
"license": "mit",
"hash": 5444467691583023000,
"line_mean": 36.8342541436,
"line_max": 114,
"alpha_frac": 0.5854264019,
"autogenerated": false,
"ratio": 3.3601570166830226,
"config... |
__author__ = 'joon'
import sys
sys.path.insert(0, 'src')
sys.path.insert(0, 'lib')
sys.path.insert(0, 'ResearchTools')
from imports.basic_modules import *
from imports.ResearchTools import *
from imports.libmodules import *
def config_generate(control, conf, EXP_PHASE):
assert (EXP_PHASE == 'guide-generate')
... | {
"repo_name": "coallaoh/GuidedLabelling",
"path": "src/guide_generation/config.py",
"copies": "1",
"size": "2151",
"license": "mit",
"hash": 735242046473096200,
"line_mean": 29.2957746479,
"line_max": 115,
"alpha_frac": 0.6350534635,
"autogenerated": false,
"ratio": 3.2492447129909365,
"config_... |
__author__ = 'joon'
import sys
sys.path.insert(0, 'src')
sys.path.insert(0, 'lib')
sys.path.insert(0, 'ResearchTools')
from imports.import_caffe import *
from caffetools.netblocks import get_learned_param, get_frozen_param, conv_relu, max_pool, conv
param = (get_frozen_param(), get_learned_param())
def vgg_conv1s... | {
"repo_name": "coallaoh/GuidedLabelling",
"path": "src/segmentation/networks.py",
"copies": "1",
"size": "3993",
"license": "mit",
"hash": -3073361940424419000,
"line_mean": 31.4634146341,
"line_max": 115,
"alpha_frac": 0.6065614826,
"autogenerated": false,
"ratio": 2.5547024952015356,
"config_... |
__author__ = 'joon'
import sys
sys.path.insert(0, 'src')
sys.path.insert(0, 'lib')
sys.path.insert(0, 'ResearchTools')
from imports.import_caffe import *
def get_frozen_param():
return [dict(lr_mult=0)] * 2
def get_learned_param():
weight_param = dict(lr_mult=1, decay_mult=1)
bias_param = dict(lr_mul... | {
"repo_name": "coallaoh/GuidedLabelling",
"path": "lib/caffetools/netblocks.py",
"copies": "1",
"size": "3579",
"license": "mit",
"hash": 7313329769763164000,
"line_mean": 33.0857142857,
"line_max": 88,
"alpha_frac": 0.5727856943,
"autogenerated": false,
"ratio": 3.351123595505618,
"config_test... |
__author__ = 'Joost Huizinga'
__version__ = '1.8 (Jun. 27 2019)'
import sys
import os.path
import re
import shlex
import numpy as np
import scikits.bootstrap as bs
import scipy.stats as st
import subprocess as sp
import argparse as ap
import warnings
import io
import random
import quantiles
###################
#### EX... | {
"repo_name": "JoostHuizinga/ea-plotting-scripts",
"path": "createPlotUtils.py",
"copies": "1",
"size": "21616",
"license": "mit",
"hash": -2381026546297445400,
"line_mean": 30.0574712644,
"line_max": 114,
"alpha_frac": 0.5798945226,
"autogenerated": false,
"ratio": 3.625020962602717,
"config_t... |
__author__ = "Jordan Anderson"
__email__ = "jodog59@gmail.com"
from pynq import MMIO
from pynq import PL
class Register(object):
"""This class controls the Registers near the Video PR.
Attributes
----------
index : int
The index of the register, starting from 0.
offset : int
The offset fr... | {
"repo_name": "AEW2015/PYNQ_PR_Overlay",
"path": "python/pynq/board/registers.py",
"copies": "1",
"size": "1397",
"license": "bsd-3-clause",
"hash": -5795992489647891000,
"line_mean": 23.5087719298,
"line_max": 87,
"alpha_frac": 0.5289906943,
"autogenerated": false,
"ratio": 4.157738095238095,
... |
__author__ = 'JORDI-MONTOYA'
from controller.database import DataBase
def menu():
print('\n\n\n')
print('\t=============================')
print('\tBIENVENIDO A BEACHSTORE')
print('\t=============================')
print('\t [1]: Ver todas las apps de la base de datos')
print('\t [2]: Ver las a... | {
"repo_name": "jordi712/PeachStore",
"path": "DOCS/Main.py",
"copies": "1",
"size": "4953",
"license": "mit",
"hash": 5619017272628107000,
"line_mean": 44.5925925926,
"line_max": 110,
"alpha_frac": 0.4365224457,
"autogenerated": false,
"ratio": 3.735204855842185,
"config_test": false,
"has_no... |
__author__ = 'JORDI-MONTOYA'
#!/usr/bin/python
import os.path, random
from datetime import date
class DataBase:
def __init__(self, rutaApps="../database/apps.txt"):
self.rutaUsers = rutaApps
def comprobarApps(self):
"""Comprueba que exista el fichero donde se guardan las apps"""
resu... | {
"repo_name": "jordi712/PeachStore",
"path": "DOCS/controller/database.py",
"copies": "1",
"size": "4120",
"license": "mit",
"hash": 3602672654887332000,
"line_mean": 32.7704918033,
"line_max": 152,
"alpha_frac": 0.4906530711,
"autogenerated": false,
"ratio": 3.508517887563884,
"config_test": f... |
__author__ = 'Jordi Vilaplana'
from pymongo import MongoClient
import detectlanguage
import json
import logging
import time
logging.basicConfig(
filename='emovix_twitter_detectlang.log',
level=logging.WARNING,
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
datefmt='%d-%m-%y %H:%M')
# C... | {
"repo_name": "eMOVIX/emovix-twitter-detectlang",
"path": "emovix-twitter-detectlang.py",
"copies": "1",
"size": "3401",
"license": "apache-2.0",
"hash": 3407581258870281700,
"line_mean": 35.9673913043,
"line_max": 128,
"alpha_frac": 0.5092619818,
"autogenerated": false,
"ratio": 4.73676880222841... |
__author__ = 'Jordi Vilaplana'
import tweepy
import pymongo
from pymongo import MongoClient
import json
import logging
import time
import datetime
logging.basicConfig(filename='emovix_twitter_search.log',level=logging.INFO)
# Configuration parameters
access_token = ""
access_token_secret = ""
consumer_key = ""
consu... | {
"repo_name": "eMOVIX/emovix-twitter-search",
"path": "emovix_twitter_search.py",
"copies": "1",
"size": "4096",
"license": "apache-2.0",
"hash": 2516135334352052000,
"line_mean": 37.641509434,
"line_max": 132,
"alpha_frac": 0.5830078125,
"autogenerated": false,
"ratio": 4.2845188284518825,
"co... |
__author__ = 'JordSti'
from PyQt4 import QtCore
class render_thread(QtCore.QThread):
completed = QtCore.pyqtSignal(object)
def __init__(self, viewport, delay=5000):
QtCore.QThread.__init__(self)
self.viewport = viewport
self.delay = delay
self.__run = True
self.__force... | {
"repo_name": "jordsti/stigame",
"path": "tools/gui-editor/render_thread.py",
"copies": "1",
"size": "1512",
"license": "mit",
"hash": 5788076906369717000,
"line_mean": 21.2352941176,
"line_max": 45,
"alpha_frac": 0.5033068783,
"autogenerated": false,
"ratio": 3.947780678851175,
"config_test": ... |
__author__ = 'JordSti'
from PyQt4 import QtGui, QtCore
from wrapper import *
from render_thread import *
class vp_widget(QtGui.QLabel):
def __init__(self, parent=None):
super(vp_widget, self).__init__(parent)
self.setMinimumSize(400, 400)
self.__pixmap = QtGui.QPixmap()
self.viewp... | {
"repo_name": "jordsti/stigame",
"path": "tools/gui-editor/vp_widget.py",
"copies": "1",
"size": "1558",
"license": "mit",
"hash": -1566464220564922600,
"line_mean": 25.8620689655,
"line_max": 78,
"alpha_frac": 0.5930680359,
"autogenerated": false,
"ratio": 3.462222222222222,
"config_test": fal... |
__author__ = 'JordSti'
from PyQt4 import QtGui, QtCore
import frame_widget
import sprite
import gui
import os
class sprite_widget(QtGui.QScrollArea, gui.Ui_SpriteWidget):
def __init__(self, sprite, parent=None):
super(sprite_widget, self).__init__(parent)
self.setupUi(self)
self.sprite = ... | {
"repo_name": "jordsti/stigame",
"path": "tools/sprite-editor/sprite_widget.py",
"copies": "1",
"size": "6010",
"license": "mit",
"hash": 4349775845120618000,
"line_mean": 31.3172043011,
"line_max": 127,
"alpha_frac": 0.5888519135,
"autogenerated": false,
"ratio": 3.618302227573751,
"config_tes... |
__author__ = 'JordSti'
from PyQt4 import QtGui, QtCore
import gui
import direction_sprite
import frame_widget
class direction_sprite_widget(QtGui.QWidget, gui.Ui_direction_sprite_widget):
def __init__(self, sprite, parent=None):
super(direction_sprite_widget, self).__init__(parent)
self.setupUi(s... | {
"repo_name": "jordsti/stigame",
"path": "tools/sprite-editor/direction_sprite_widget.py",
"copies": "1",
"size": "5876",
"license": "mit",
"hash": -4673088001837518000,
"line_mean": 32.9653179191,
"line_max": 127,
"alpha_frac": 0.6198093941,
"autogenerated": false,
"ratio": 3.7189873417721517,
... |
__author__ = 'JordSti'
from PyQt4 import QtGui, QtCore
import gui
import os
import sprite
import direction_sprite
import direction_sprite_widget
import sprite_widget
import var_file
import resource_file
import resource_file_widget
class main_window(QtGui.QMainWindow, gui.Ui_MainWindow):
def __init__(self, parent=... | {
"repo_name": "jordsti/stigame",
"path": "tools/sprite-editor/main_window.py",
"copies": "1",
"size": "5195",
"license": "mit",
"hash": 7093914146393895000,
"line_mean": 31.8797468354,
"line_max": 199,
"alpha_frac": 0.6071222329,
"autogenerated": false,
"ratio": 3.5679945054945055,
"config_test... |
__author__ = 'JordSti'
from PyQt4 import QtGui, QtCore
import gui
import resource_widget
import resource_file
import os
class resource_file_widget(QtGui.QWidget, gui.Ui_resource_file_widget):
def __init__(self, res_file, parent=None):
super(resource_file_widget, self).__init__(parent)
self.res_fi... | {
"repo_name": "jordsti/stigame",
"path": "tools/sprite-editor/resource_file_widget.py",
"copies": "1",
"size": "2296",
"license": "mit",
"hash": -5053490854868742000,
"line_mean": 26.0235294118,
"line_max": 137,
"alpha_frac": 0.5871080139,
"autogenerated": false,
"ratio": 3.820299500831947,
"co... |
__author__ = 'JordSti'
from PyQt4 import QtGui, QtCore
import gui
class frame_widget(QtGui.QWidget, gui.Ui_frame_widget):
def __init__(self, frame_id, img_data, parent=None):
super(frame_widget, self).__init__(parent)
self.setupUi(self)
self.frame_id = frame_id
self.img_data = img... | {
"repo_name": "jordsti/stigame",
"path": "tools/sprite-editor/frame_widget.py",
"copies": "1",
"size": "1544",
"license": "mit",
"hash": 3778124401754382300,
"line_mean": 29.2941176471,
"line_max": 90,
"alpha_frac": 0.6159326425,
"autogenerated": false,
"ratio": 3.3062098501070665,
"config_test... |
__author__ = 'JordSti'
import ctypes
import os
import sprite
class direction_sprite_header(ctypes.Structure):
_fields_ = [('sprite_name', ctypes.c_char * 64),
('nb_frames', ctypes.c_int32 * 5),
('width', ctypes.c_int32),
('height', ctypes.c_int32)
]
... | {
"repo_name": "jordsti/stigame",
"path": "tools/sprite-editor/direction_sprite.py",
"copies": "1",
"size": "3188",
"license": "mit",
"hash": 2560726267533187600,
"line_mean": 26.9736842105,
"line_max": 53,
"alpha_frac": 0.524153074,
"autogenerated": false,
"ratio": 4.005025125628141,
"config_te... |
__author__ = 'JordSti'
import ctypes
import os
class marker(ctypes.Structure):
_fields_ = [('res_name', ctypes.c_char * 64),
('length', ctypes.c_int32)
]
class resource:
def __init__(self, name="", data=""):
self.name = name
self.data = data
def length... | {
"repo_name": "jordsti/stigame",
"path": "tools/sprite-editor/resource_file.py",
"copies": "1",
"size": "1328",
"license": "mit",
"hash": 7294797062668449000,
"line_mean": 20.7704918033,
"line_max": 54,
"alpha_frac": 0.4759036145,
"autogenerated": false,
"ratio": 3.9058823529411764,
"config_tes... |
__author__ = 'JordSti'
import ctypes
import os
class sprite_header(ctypes.Structure):
_fields_ = [('sprite_name', ctypes.c_char * 64),
('nb_frames', ctypes.c_int32),
('width', ctypes.c_int32),
('height', ctypes.c_int32)]
class sprite_image_marker(ctypes.Structure):
_fields_ = [('lengt... | {
"repo_name": "jordsti/stigame",
"path": "tools/sprite-editor/sprite.py",
"copies": "1",
"size": "3326",
"license": "mit",
"hash": -1215342179146199000,
"line_mean": 22.4225352113,
"line_max": 73,
"alpha_frac": 0.4990980156,
"autogenerated": false,
"ratio": 3.8584686774941996,
"config_test": fa... |
__author__ = 'JordSti'
import os
class var_file:
def __init__(self, path=None):
self.path = path
self.__vars_order = []
self.__vars = {}
if self.path is not None:
self.read()
def read(self):
if self.path is not None and os.path.exists(self.path):
... | {
"repo_name": "jordsti/stigame",
"path": "tools/sprite-editor/var_file.py",
"copies": "1",
"size": "1366",
"license": "mit",
"hash": 2647579075596169700,
"line_mean": 22.1525423729,
"line_max": 90,
"alpha_frac": 0.4787701318,
"autogenerated": false,
"ratio": 3.3317073170731706,
"config_test": f... |
__author__ = "Jorge A. Gomes"
from os import path
import pygame
__all__ = [
"Game",
"Scene",
"resource",
"Vec"
]
def resource(name) -> str:
"""Returns the full path of a file with given name."""
cwd = path.split(__file__)[0]
rd = 'res\\{}'.format(name)
return path.join(cwd, rd)
cla... | {
"repo_name": "overdev/SpaceGame",
"path": "spacegame/core.py",
"copies": "1",
"size": "2398",
"license": "mit",
"hash": 2154525259170733800,
"line_mean": 22.0673076923,
"line_max": 104,
"alpha_frac": 0.5909090909,
"autogenerated": false,
"ratio": 3.9311475409836065,
"config_test": false,
"ha... |
__author__ = 'Jorge A. Gomes'
from spacegame.ui import Dispatcher
from spacegame.ui import Button
from spacegame.ui import BitmapFont
from spacegame.ui import Anchor
from spacegame.geometry import *
from spacegame.core import Scene
from spacegame.core import Display
from spacegame.core import resource
from spacegame.... | {
"repo_name": "overdev/SpaceGame",
"path": "spacegame/scenes.py",
"copies": "1",
"size": "5287",
"license": "mit",
"hash": -1842665979183801600,
"line_mean": 28.2099447514,
"line_max": 89,
"alpha_frac": 0.5530546624,
"autogenerated": false,
"ratio": 3.7023809523809526,
"config_test": false,
"... |
__author__ = 'Jorge A. Gomes'
import math
from collections import namedtuple
__all__ = [
"dot",
"cross",
"hypot",
"angle",
"length",
"normalize",
"perpend_left",
"perpend_right",
"negate",
"radius",
"diameter",
"circunference",
"distance",
"direction",
"le... | {
"repo_name": "overdev/SpaceGame",
"path": "spacegame/geometry.py",
"copies": "1",
"size": "6652",
"license": "mit",
"hash": 8863108165804684000,
"line_mean": 22.3403508772,
"line_max": 92,
"alpha_frac": 0.5118761275,
"autogenerated": false,
"ratio": 2.672559260747288,
"config_test": false,
"... |
__author__ = 'Jorge'
# A Python implementation of Separating Axis Theorem
import pygame
from spacegame.vectors import Vector
from spacegame.geometry import *
__all__ = [
# "AABB" # still deciding whether to add it or not.
"Interval",
"get_axes",
"get_separating_axis"
]
class Interval(object):
... | {
"repo_name": "overdev/SpaceGame",
"path": "spacegame/sat.py",
"copies": "1",
"size": "4688",
"license": "mit",
"hash": -8885006087623978000,
"line_mean": 25.3370786517,
"line_max": 113,
"alpha_frac": 0.5311433447,
"autogenerated": false,
"ratio": 3.1654287643484134,
"config_test": false,
"ha... |
__author__ = 'Jorge'
from enum import Enum
import pygame
import pygame.gfxdraw
import math
from spacegame.geometry import *
from spacegame.vectors import Vector
from spacegame.ui import blend_color
from spacegame.sat import *
# from spacegame.core import resource
__all__ = [
"AssignMode",
"SAT",
"SAT_NO_... | {
"repo_name": "overdev/SpaceGame",
"path": "spacegame/assets.py",
"copies": "1",
"size": "21485",
"license": "mit",
"hash": 1171411087590294500,
"line_mean": 28.6767955801,
"line_max": 130,
"alpha_frac": 0.5438678148,
"autogenerated": false,
"ratio": 3.7345732661220232,
"config_test": false,
... |
__author__ = 'Jorge'
from enum import Enum
import pygame
import pygame.locals as c
from spacegame.core import resource
from spacegame.geometry import Vec
__all__ = [
"BitmapFont",
"blend_color",
"Anchor",
"UIElement",
"Button",
"Switcher",
"List"
]
# BmpFont constants
BMP = 0 # the r... | {
"repo_name": "overdev/SpaceGame",
"path": "spacegame/ui.py",
"copies": "1",
"size": "13918",
"license": "mit",
"hash": -4513088982458219000,
"line_mean": 32.8287841191,
"line_max": 209,
"alpha_frac": 0.537225849,
"autogenerated": false,
"ratio": 3.248272575649273,
"config_test": false,
"has_... |
__author__ = 'Jorge'
import math
import random
__all__ = [
"Vector"
]
class Vector(object):
"""Specialized 2d vector class."""
__slots__ = ('x', 'y')
@classmethod
def zero(cls):
"""Alternative constructor."""
return cls(0.0, 0.0)
@classmethod
def one(cls):
"... | {
"repo_name": "overdev/SpaceGame",
"path": "spacegame/vectors.py",
"copies": "1",
"size": "9449",
"license": "mit",
"hash": 5658116802284803000,
"line_mean": 24.4690026954,
"line_max": 87,
"alpha_frac": 0.5101068896,
"autogenerated": false,
"ratio": 3.5257462686567163,
"config_test": false,
"... |
__author__ = 'Jorge'
import pygame
import pygame.locals as c
from spacegame.geometry import *
from spacegame.vectors import Vector
from spacegame.assets import *
from spacegame.ui import Anchor, BitmapFont
from spacegame.core import resource
__all__ = [
"Actor",
"Room",
"View"
]
class Actor(Polygon):
... | {
"repo_name": "overdev/SpaceGame",
"path": "spacegame/actors.py",
"copies": "1",
"size": "12628",
"license": "mit",
"hash": 2239774356534268200,
"line_mean": 34.1782729805,
"line_max": 116,
"alpha_frac": 0.5355559075,
"autogenerated": false,
"ratio": 3.859413202933985,
"config_test": false,
"... |
__author__ = "Jose Antonio Martin H."
from qtconsole.rich_jupyter_widget import RichIPythonWidget
from qtconsole.inprocess import QtInProcessKernelManager
from PyQt4 import QtGui
class EmbedIPython(RichIPythonWidget):
def __init__(self, **kwarg):
super(RichIPythonWidget, self).__init__()
self.ker... | {
"repo_name": "jamartinh/Orange3-Spark",
"path": "trash/ipythonQT.py",
"copies": "1",
"size": "1821",
"license": "bsd-2-clause",
"hash": -3876209047634272000,
"line_mean": 28.3709677419,
"line_max": 78,
"alpha_frac": 0.6205381658,
"autogenerated": false,
"ratio": 3.5428015564202333,
"config_tes... |
__author__ = "Jose Caballero"
__copyright__ = "2017 Jose Caballero"
__credits__ = []
__license__ = "GPL"
__version__ = "1.1.0"
__maintainer__ = "Jose Caballero"
__email__ = "jcaballero@bnl.gov"
__status__ = "Production"
import logging
import logging.handlers
import traceback
'''
Module to import plugin classes and to... | {
"repo_name": "bnl-sdcc/plugin-manager",
"path": "pluginmanager.py",
"copies": "1",
"size": "5722",
"license": "apache-2.0",
"hash": 7239231817472580000,
"line_mean": 28.4948453608,
"line_max": 92,
"alpha_frac": 0.6244320168,
"autogenerated": false,
"ratio": 4.149383611312546,
"config_test": fa... |
import cv2
import numpy as np
import config
import feature
from multiprocessing.pool import ThreadPool
from timeit import default_timer as timer
# Load datasets
s_data = np.load('atlas_sw.npz')
s_im = s_data['images']
s_label = s_data['labels']
pw_data = np.load('atlas_pw.npz')
pw_im = pw_data['images']
pw_label = pw_... | {
"repo_name": "DeveloperJose/Vision-Rat-Brain",
"path": "feature_matching_v1/similarity.py",
"copies": "1",
"size": "1308",
"license": "mit",
"hash": -3123645394479023000,
"line_mean": 23.2407407407,
"line_max": 57,
"alpha_frac": 0.7033639144,
"autogenerated": false,
"ratio": 2.7024793388429753,
... |
from util_im import imshow_matches
from util_sm import load_sm, norm_sm
from util_sift import precompute_sift, load_sift
import pylab as plt
import numpy as np
precompute_sift('S_BB_V4', 'PW_BB_V4')
s_im, s_label, s_kp, s_des = load_sift('S_BB_V4_SIFT.npz')
pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V4_SIFT.npz'... | {
"repo_name": "DeveloperJose/Vision-Rat-Brain",
"path": "feature_matching_v3/exp_similarity_matrix.py",
"copies": "1",
"size": "2389",
"license": "mit",
"hash": -6566252051233730000,
"line_mean": 28.875,
"line_max": 72,
"alpha_frac": 0.6755964839,
"autogenerated": false,
"ratio": 2.59956474428726... |
import cv2
import numpy as np
import pylab as plt
from multiprocessing.pool import ThreadPool
from timeit import default_timer as timer
from util_sift import load_sift
from util_matching import match_details
INDIVIDUAL = False
np.random.seed(1)
np.set_printoptions(threshold=np.nan, linewidth=1000)
# Default: contrast... | {
"repo_name": "DeveloperJose/Vision-Rat-Brain",
"path": "feature_matching_v3/exp_match_details.py",
"copies": "1",
"size": "7269",
"license": "mit",
"hash": -1314505577065781500,
"line_mean": 41.514619883,
"line_max": 173,
"alpha_frac": 0.6128765993,
"autogenerated": false,
"ratio": 2.67340934166... |
import numpy as np
import cv2
import cProfile
RADIUS = 25 # 25
RADIUS_SQUARED = RADIUS ** 2
SCALE_THRESHOLD = 3 # 3
DISTANCE_THRESHOLD = 200 # 200
RESPONSE_THRESHOLD = 0.01 # 0.01
def perform_match(s_idx):
global s_kp, s_des, pw_kp, pw_des
matches = []
print('s_idx', s_idx)
for pw_idx in range(pw_kp.sh... | {
"repo_name": "DeveloperJose/Vision-Rat-Brain",
"path": "feature_matching_v3/util_matching.py",
"copies": "1",
"size": "4393",
"license": "mit",
"hash": 627425647458147200,
"line_mean": 28.0993377483,
"line_max": 91,
"alpha_frac": 0.5103573868,
"autogenerated": false,
"ratio": 3.0871398453970484,... |
import numpy as np
import os
def load_sm(folder, s_kp, pw_kp):
sm_match = np.zeros((s_kp.shape[0],pw_kp.shape[0]))
sm_metric = np.zeros((s_kp.shape[0],pw_kp.shape[0]))
for sidx in range(sm_match.shape[0]):
path = os.path.join(folder, str(sidx) + '-M.npz')
m = np.load(path)['m']
coun... | {
"repo_name": "DeveloperJose/Vision-Rat-Brain",
"path": "feature_matching_v3/util_sm.py",
"copies": "1",
"size": "1441",
"license": "mit",
"hash": 5709930569478669000,
"line_mean": 33.3095238095,
"line_max": 99,
"alpha_frac": 0.5759888966,
"autogenerated": false,
"ratio": 2.7086466165413534,
"c... |
import numpy as np
import pylab as plt
import cv2
from util_sift import array_to_kp, precompute_sift, load_sift
from util_matching import match
from util_cv import match_to_cv
from util_im import imshow
precompute_sift('S_BB_V4', 'PW_BB_V4')
s_im, s_label, s_kp, s_des = load_sift('S_BB_V4_SIFT.npz')
pw_im, pw_label, ... | {
"repo_name": "DeveloperJose/Vision-Rat-Brain",
"path": "feature_matching_v3/exp_match_individual.py",
"copies": "1",
"size": "1053",
"license": "mit",
"hash": -7552242867465933000,
"line_mean": 34.1333333333,
"line_max": 116,
"alpha_frac": 0.6799620133,
"autogenerated": false,
"ratio": 2.2309322... |
import numpy as np
import pylab as plt
from util_matching import match
from util_sift import precompute_sift, load_sift
precompute_sift('S_BB_V1', 'PW_BB_V1')
s_im, s_label, s_kp, s_des = load_sift('S_BB_V1_SIFT.npz')
pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V1_SIFT.npz')
# =======******* Row Testing [S33 an... | {
"repo_name": "DeveloperJose/Vision-Rat-Brain",
"path": "feature_matching_v3/exp_match_row.py",
"copies": "1",
"size": "1288",
"license": "mit",
"hash": 1545825544984875300,
"line_mean": 29.6904761905,
"line_max": 71,
"alpha_frac": 0.6079192547,
"autogenerated": false,
"ratio": 2.2054794520547945... |
from timeit import default_timer as timer
from PIL import Image
import numpy as np
import os
WIDTH = 240
HEIGHT = 300
WHITE_THRESHOLD = 235
def process_plate(filename, split=False):
im = Image.open(filename).convert("L")
# Split in half if required
if split:
box = (0, 0, im.width // 2, im.height)... | {
"repo_name": "DeveloperJose/Vision-Rat-Brain",
"path": "dataset/bounding.py",
"copies": "1",
"size": "2443",
"license": "mit",
"hash": -6643171055757110000,
"line_mean": 30.7402597403,
"line_max": 96,
"alpha_frac": 0.6217765043,
"autogenerated": false,
"ratio": 3.227212681638045,
"config_test"... |
import argparse, hmac, hashlib, time, json, urllib, urllib2, requests, pytz, elasticsearch, poloinex, uuid, datetime
from time import sleep
ELASTICSEARCH_HOST = "https://search-bitcoins-2sfk7jzreyq3cfjwvia2mj7d4m.us-west-2.es.amazonaws.com/"
def getArgs():
parser = argparse.ArgumentParser(description='BTC elastic ... | {
"repo_name": "currentsea/bitcoinelasticsearch",
"path": "src/poloinextickerconnector.py",
"copies": "2",
"size": "2842",
"license": "mit",
"hash": -6950586552549455000,
"line_mean": 29.5698924731,
"line_max": 116,
"alpha_frac": 0.6710063336,
"autogenerated": false,
"ratio": 2.9359504132231407,
... |
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# cop... | {
"repo_name": "currentsea/bitcoinelasticsearch",
"path": "src/python/pnexdailyvolume.py",
"copies": "2",
"size": "3710",
"license": "mit",
"hash": -8801869893341413000,
"line_mean": 34.3428571429,
"line_max": 116,
"alpha_frac": 0.7156334232,
"autogenerated": false,
"ratio": 3.26297273526825,
"c... |
from autobahn.twisted.websocket import WebSocketClientProtocol
class PoloinexWebsocketProtocol(WebSocketClientProtocol):
def onOpen(self):
self.sendMessage(u"Hello, world!".encode('utf8'))
def onMessage(self, payload, isBinary):
if isBinary:
print("Binary message received: {0} bytes".form... | {
"repo_name": "currentsea/bitcoinelasticsearch",
"path": "src/python/poloinex/poloinex_websocket.py",
"copies": "2",
"size": "3124",
"license": "mit",
"hash": -2759856465451785700,
"line_mean": 34.1123595506,
"line_max": 79,
"alpha_frac": 0.6706145967,
"autogenerated": false,
"ratio": 4.285322359... |
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# cop... | {
"repo_name": "currentsea/bitcoinelasticsearch",
"path": "src/python/kraken-rest.py",
"copies": "2",
"size": "5785",
"license": "mit",
"hash": -8575743131606050000,
"line_mean": 35.6139240506,
"line_max": 129,
"alpha_frac": 0.7196197061,
"autogenerated": false,
"ratio": 3.3170871559633026,
"con... |
__author__ = "Joseph Gomes"
__copyright__ = "Copyright 2017, Stanford University"
__license__ = "MIT"
import sys
from deepchem.models import KerasModel
from deepchem.models.layers import AtomicConvolution
from deepchem.models.losses import L2Loss
from tensorflow.keras.layers import Input, Layer
import numpy as np
im... | {
"repo_name": "lilleswing/deepchem",
"path": "deepchem/models/atomic_conv.py",
"copies": "2",
"size": "12169",
"license": "mit",
"hash": 706767889645979800,
"line_mean": 35.2172619048,
"line_max": 143,
"alpha_frac": 0.5983236092,
"autogenerated": false,
"ratio": 3.237297153498271,
"config_test"... |
__author__ = 'Joseph Korpela'
import time
import os
import cPickle as pickle
class CNV:
"""
Locates Copy Number Variations in a donor genome using a reference genome and short reads from a
high throughput sequencer as input.
"""
def __init__(self, allowable_error, key_size, cnv_key_size, ref_file,... | {
"repo_name": "Joe310/CNV",
"path": "CNV.py",
"copies": "1",
"size": "14760",
"license": "mit",
"hash": -8206974108862329000,
"line_mean": 41.4137931034,
"line_max": 123,
"alpha_frac": 0.5260840108,
"autogenerated": false,
"ratio": 3.8070673200928553,
"config_test": false,
"has_no_keywords": ... |
# Python Imports
import logging
import os
import shutil
# Project imports
import salt
log = logging.getLogger(__name__)
def _check_cabal_bin():
"""
Make sure we have cabal installed.
"""
which_result = __salt__['cmd.which_bin'](['cabal'])
if which_result is None:
raise CommandNotFoundE... | {
"repo_name": "jlisee/gitit-salt",
"path": "salt/roots/extensions/_modules/cabal.py",
"copies": "1",
"size": "5703",
"license": "mit",
"hash": 781162170019398100,
"line_mean": 25.4027777778,
"line_max": 79,
"alpha_frac": 0.5462037524,
"autogenerated": false,
"ratio": 3.93853591160221,
"config_t... |
# Python Imports
import logging
import os
# Project imports
import salt
log = logging.getLogger(__name__)
def __gen_rtag():
"""
Return the location of the refresh tag.
"""
return os.path.join(__opts__['cachedir'], 'cabal_refresh')
def installed(name, version=None, refresh=False, flags=None, user=... | {
"repo_name": "jlisee/gitit-salt",
"path": "salt/roots/extensions/_states/cabal.py",
"copies": "1",
"size": "4617",
"license": "mit",
"hash": 2073685083136086500,
"line_mean": 25.2329545455,
"line_max": 79,
"alpha_frac": 0.5653021442,
"autogenerated": false,
"ratio": 4.0678414096916296,
"config... |
__doc__ = """
Functionality that is very linux specific goes in this module.
"""
# Python Imports
import os
import re
import sys
# Library Imports
from elftools.elf.elffile import ELFFile
from elftools.elf.segments import InterpSegment
# Project Imports
from xpkg import paths
from xpkg import util
def readelf_int... | {
"repo_name": "jlisee/xpkg",
"path": "python/xpkg/linux.py",
"copies": "1",
"size": "2850",
"license": "bsd-3-clause",
"hash": 5913550928403464000,
"line_mean": 25.8867924528,
"line_max": 77,
"alpha_frac": 0.6445614035,
"autogenerated": false,
"ratio": 3.6538461538461537,
"config_test": false,
... |
__doc__ = """Tests for the util module
"""
# Python Imports
import unittest
# Project Imports
from xpkg import util
class UtilTests(unittest.TestCase):
def do_compare(self, a, b, val, strtype):
res = util.compare_versions(a,b)
args = (a, strtype, b)
self.assertEqual(val, res, 'Expected... | {
"repo_name": "jlisee/xpkg",
"path": "python/tests/test_util.py",
"copies": "1",
"size": "6313",
"license": "bsd-3-clause",
"hash": -8475366220420964000,
"line_mean": 27.3094170404,
"line_max": 79,
"alpha_frac": 0.4432124188,
"autogenerated": false,
"ratio": 3.70481220657277,
"config_test": tru... |
# Python Imports
import copy
import fnmatch
import hashlib
import multiprocessing
import os
import re
import string
import subprocess
import sys
import tarfile
import urllib
from contextlib import contextmanager
# Library Imports
import yaml
try:
# Try and use CLoader/CDumper, then use libyaml, and are about 5-... | {
"repo_name": "jlisee/xpkg",
"path": "python/xpkg/util.py",
"copies": "1",
"size": "18058",
"license": "bsd-3-clause",
"hash": 1107660550359530100,
"line_mean": 23.535326087,
"line_max": 93,
"alpha_frac": 0.5763096688,
"autogenerated": false,
"ratio": 4.089221014492754,
"config_test": false,
... |
# Python Imports
import json
import os
import tarfile
from collections import defaultdict
# Project Imports
from xpkg import build
from xpkg import linux
from xpkg import util
from xpkg import paths
xpkg_root_var = 'XPKG_ROOT'
xpkg_tree_var = 'XPKG_TREE'
xpkg_repo_var = 'XPKG_REPO'
xpkg_local_cache_var = 'XPKG_LOCA... | {
"repo_name": "jlisee/xpkg",
"path": "python/xpkg/core.py",
"copies": "1",
"size": "45531",
"license": "bsd-3-clause",
"hash": -845019975643355600,
"line_mean": 29.2934131737,
"line_max": 91,
"alpha_frac": 0.5480222266,
"autogenerated": false,
"ratio": 4.324753039513678,
"config_test": false,
... |
''' @author Joseph Milazzo
@description Upon user locking computer, the script will mute
system (stop audio service). Upon unlocking, script will un-mute
system (restart audio service). This assumes user is using Python 2.7,
Windows, and has Elevated User Rights.
'''
import time
import ctypes
import os
... | {
"repo_name": "majora2007/audio-locker",
"path": "audio-locker.py",
"copies": "1",
"size": "1444",
"license": "mit",
"hash": -7892017397266380000,
"line_mean": 27.88,
"line_max": 80,
"alpha_frac": 0.6232686981,
"autogenerated": false,
"ratio": 3.6556962025316455,
"config_test": false,
"has_no... |
__author__ = "Joseph Mullen"
from personal_web.personalWebsite import app
from flask import render_template, request, flash
from personal_web.forms import queryForm
from personal_web.core.virtuoso import Repository
from examplequeries import examples
'''Page routes'''
@app.route('/')
def index():
return render_t... | {
"repo_name": "JMMull/personalWebsite",
"path": "personalWeb/views/pages.py",
"copies": "1",
"size": "1369",
"license": "mit",
"hash": 8229012468795268000,
"line_mean": 36,
"line_max": 164,
"alpha_frac": 0.6355003652,
"autogenerated": false,
"ratio": 3.6900269541778976,
"config_test": false,
... |
__author__ = "Joseph Mullen"
class examples():
def __init__(self):
self.all = []
self.prefixes = (
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX drenin: <http://drenin.ncl.ac.uk/Terms#>\nPREFIX drugbank: <http://identifiers.org/drugbank#>\nPREFIX uniprot: <http://identi... | {
"repo_name": "JMMull/personalWebsite",
"path": "examplequeries.py",
"copies": "1",
"size": "6507",
"license": "mit",
"hash": -1659621595214743600,
"line_mean": 62.1747572816,
"line_max": 629,
"alpha_frac": 0.4493622253,
"autogenerated": false,
"ratio": 3.787543655413271,
"config_test": false,
... |
__author__ = 'Joseph'
from selenium import webdriver
import unittest
class NewVisitorTest(unittest.TestCase):
def setUp(self):
self._browser = webdriver.Firefox()
self._browser.implicitly_wait(3)
def tearDown(self):
self._browser.quit()
def test_can_read_faq_and_documentation(se... | {
"repo_name": "Joe310/GenomeSimulator",
"path": "genomeapp/functional_tests.py",
"copies": "1",
"size": "2183",
"license": "mit",
"hash": -4115457066850291000,
"line_mean": 34.7868852459,
"line_max": 93,
"alpha_frac": 0.6706367384,
"autogenerated": false,
"ratio": 4.166030534351145,
"config_tes... |
import os,resample,subprocess
class SRS(object):
def __init__(self, filename, binary=None):
self.filename = filename
if binary == None:
if os.name == 'posix':
self.binary = '/usr/bin/srs.py'
elif os.name == 'nt':
self.binary = 'pysrs'
... | {
"repo_name": "dryes/rescepy",
"path": "rescepy/srs.py",
"copies": "2",
"size": "1486",
"license": "mit",
"hash": 3049416158707062000,
"line_mean": 30.6170212766,
"line_max": 144,
"alpha_frac": 0.5363391655,
"autogenerated": false,
"ratio": 3.6067961165048543,
"config_test": false,
"has_no_ke... |
import os,rescene,subprocess
class SRR(object):
def __init__(self, filename, binary=None, rardir=None):
self.filename = filename
if binary == None:
if os.name == 'posix':
self.binary = '/usr/bin/srr.py'
elif os.name == 'nt':
self.binary = 'py... | {
"repo_name": "d2yes/rescepy",
"path": "rescepy/srr.py",
"copies": "2",
"size": "2491",
"license": "mit",
"hash": -3906982507546693600,
"line_mean": 29.3780487805,
"line_max": 135,
"alpha_frac": 0.5335206744,
"autogenerated": false,
"ratio": 3.4501385041551247,
"config_test": false,
"has_no_k... |
__author__ = 'Josh Fass'
''' Implementation of projected gradient descent as described in Appendix A
of "Linear Dimensionality Reduction: Survey, Insights, and Generalizations"
(Cunningham and Ghahramani, 2015, JMLR 16)
'''
def proj_grad_descent(init_point,manifold,obj_func,
convergence_thresho... | {
"repo_name": "choderalab/moldr",
"path": "steepest_descent.py",
"copies": "1",
"size": "1222",
"license": "mit",
"hash": 3155186188666680300,
"line_mean": 24.9361702128,
"line_max": 85,
"alpha_frac": 0.6210008203,
"autogenerated": false,
"ratio": 3.6497005988023954,
"config_test": false,
"ha... |
__author__ = 'Josh Fass'
'''
This is a partial clone of the excellent MATLAB package for constrained
optimization on manifolds, Manopt (www.manopt.org, Nicolas Boumal).
Defines a manifold base class and a Stiefel manifold subclass.
To-dos:
- Implement Grassmann manifold class
- Write tests
'''
import numpy as np
i... | {
"repo_name": "choderalab/moldr",
"path": "manifold_factory.py",
"copies": "1",
"size": "2200",
"license": "mit",
"hash": 3735093933755774500,
"line_mean": 25.5060240964,
"line_max": 76,
"alpha_frac": 0.5959090909,
"autogenerated": false,
"ratio": 3.021978021978022,
"config_test": false,
"has... |
__author__ = "Josh Hartigan"
# www.coderbyte.com is a website I found that contains
# various programming challenges of different difficulties.
# this file holds some of my solutions to the challenges.
# If you're doing the coderbyte challenges yourself, don't
# straight up copy my answers for yourself. There are prob... | {
"repo_name": "joshhartigan/semicircle",
"path": "code/python/coderbyte_challenges.py",
"copies": "1",
"size": "1984",
"license": "bsd-2-clause",
"hash": -3283284335969348600,
"line_mean": 38.64,
"line_max": 95,
"alpha_frac": 0.5812310797,
"autogenerated": false,
"ratio": 3.6433823529411766,
"c... |
__author__ = 'Josh Karpel'
import os
import functools as ft
import multiprocessing as mp
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
#
# mpl_rcParams_update = {
# 'font.family': 'serif',
# 'mathtext.fontset': 'cm',
# 'mathtext.rm': 'serif',
# }
golden_ratio = (np.sqrt(5.0) - 1.0) / 2.0
... | {
"repo_name": "JoshKarpel/math715",
"path": "utils.py",
"copies": "1",
"size": "4540",
"license": "mit",
"hash": 7809145511085105000,
"line_mean": 29.6756756757,
"line_max": 119,
"alpha_frac": 0.6352422907,
"autogenerated": false,
"ratio": 3.2544802867383513,
"config_test": false,
"has_no_key... |
__author__ = 'josh'
from pelican import signals
import os, shutil
import logging
logger = logging.getLogger(__name__)
def direct_copy(pel):
'''
Copies any/all static files in a given directory in the content path unmodified into the main output path.
An example of usage is to inject a .htaccess file into... | {
"repo_name": "XerxesDGreat/i-josh.com",
"path": "plugins/post/post.py",
"copies": "1",
"size": "1436",
"license": "mit",
"hash": -853194461017697400,
"line_mean": 38.9166666667,
"line_max": 118,
"alpha_frac": 0.6559888579,
"autogenerated": false,
"ratio": 3.7690288713910762,
"config_test": fal... |
__author__ = 'josh'
from pelican import signals
import re
from types import *
try:
from html.parser import HTMLParser
except:
from HTMLParser import HTMLParser
def _get_from_meta(article, meta_key, attr):
return article.metadata[meta_key] if meta_key in article.metadata else getattr(article, attr)
class M... | {
"repo_name": "XerxesDGreat/i-josh.com",
"path": "plugins/fb_meta.py",
"copies": "1",
"size": "2261",
"license": "mit",
"hash": 1805451935189630700,
"line_mean": 32.2647058824,
"line_max": 109,
"alpha_frac": 0.6240601504,
"autogenerated": false,
"ratio": 3.6292134831460676,
"config_test": false... |
__author__ = 'Josh'
import os
import urllib
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
vowels = ['a', 'e', 'i', 'o', 'u']
consonants = [x for x in alphabet if x not in vowels]
def join_with_spaces(lst):
#joins togethe... | {
"repo_name": "jweinst1/Tagineer",
"path": "tagineer/__init__.py",
"copies": "1",
"size": "10101",
"license": "mit",
"hash": 7458896801999274000,
"line_mean": 28.4489795918,
"line_max": 153,
"alpha_frac": 0.6292446292,
"autogenerated": false,
"ratio": 2.6449332285938727,
"config_test": false,
... |
__author__ = 'josh'
class Version(object):
def __init__(self, major_version=0, minor_version=0, patch_version=0, label=""):
self.major_version = major_version
self.minor_version = minor_version
self.patch_version = patch_version
self.label = label
def __eq__(self, other):
... | {
"repo_name": "XerxesDGreat/library-app",
"path": "git_updater/models.py",
"copies": "1",
"size": "2477",
"license": "apache-2.0",
"hash": -6571301633040825000,
"line_mean": 31.1818181818,
"line_max": 112,
"alpha_frac": 0.5413807025,
"autogenerated": false,
"ratio": 4.234188034188034,
"config_t... |
__author__ = 'josh'
from django.forms import widgets
from django.utils.safestring import mark_safe
from library.models import Author
import re
class TypeAheadWidget(widgets.Widget):
'''
This provides the backend for a set of input elements used for auto-completion of search terms.
The visible element is ... | {
"repo_name": "XerxesDGreat/library-app",
"path": "library/widgets.py",
"copies": "1",
"size": "2551",
"license": "apache-2.0",
"hash": -4753481717382435000,
"line_mean": 37.6666666667,
"line_max": 132,
"alpha_frac": 0.6091728734,
"autogenerated": false,
"ratio": 4.13452188006483,
"config_test"... |
__author__ = 'josh'
import git_updater
from git_updater.models import Version
import pycurl
from StringIO import StringIO
import json
from library_app import settings
import os
import sys
import shutil
import tarfile
import time
import math
from django.core.management import call_command
import datetime
import pytz
fr... | {
"repo_name": "XerxesDGreat/library-app",
"path": "git_updater/utils.py",
"copies": "1",
"size": "7763",
"license": "apache-2.0",
"hash": -7496109412310597000,
"line_mean": 27.8624535316,
"line_max": 160,
"alpha_frac": 0.6254025506,
"autogenerated": false,
"ratio": 3.525431425976385,
"config_te... |
__author__ = 'Josh'
import os
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
vowels = ['a', 'e', 'i', 'o', 'u']
consonants = [x for x in alphabet if x not in vowels]
def join_with_spaces(lst):
#joins together lists of st... | {
"repo_name": "jweinst1/Tagineer",
"path": "tagineer/POS_tagger.py",
"copies": "1",
"size": "10221",
"license": "mit",
"hash": 7316143509092290000,
"line_mean": 27.8728813559,
"line_max": 153,
"alpha_frac": 0.6232266901,
"autogenerated": false,
"ratio": 2.628182051941373,
"config_test": false,
... |
__author__ = 'Josh'
import requests
from datetime import datetime
from datetime import timedelta
from pyquery.pyquery import PyQuery as pq
result_date = lambda d: d.strftime('%Y-%m-%d')
class FitBitScrapper(object):
def __init__(self, email, password, verbose=False):
self._session = requests.session()
... | {
"repo_name": "joshsee/fitbit-python-scrapper",
"path": "client.py",
"copies": "1",
"size": "1772",
"license": "apache-2.0",
"hash": -728354436907409400,
"line_mean": 34.46,
"line_max": 201,
"alpha_frac": 0.6106094808,
"autogenerated": false,
"ratio": 3.7305263157894735,
"config_test": false,
... |
__author__ = 'josh'
import sys
import urllib3
import socket
import subprocess
import datetime
from time import sleep
import markup
import re
GLO_USE_UPNP = True
GLO_SERVER_ADD = 'beautybysharon.co.uk'
GLO_SERVER_PORT = 21954
PAGEFILE = '/var/www/dt/index.html'
class d_tracker_client(object):
def __init__(self... | {
"repo_name": "joshjh/d-tracker",
"path": "main.py",
"copies": "1",
"size": "7871",
"license": "apache-2.0",
"hash": 6351767805916541000,
"line_mean": 37.3951219512,
"line_max": 118,
"alpha_frac": 0.5421166307,
"autogenerated": false,
"ratio": 3.917869586859134,
"config_test": false,
"has_no_... |
__author__ = 'JoshOY'
import my_sort.bubbleSort as bubbleSort
import my_sort.selectionSort as selectionSort
import my_sort.insertionSort as insertionSort
import my_sort.shellSort as shellSort
import my_sort.quickSort as quickSort
import my_sort.heapSort as heapSort
import my_sort.mergeSort as mergeSort
import my_sort.r... | {
"repo_name": "JoshOY/DataStructureCourseDesign",
"path": "PROB10/run.py",
"copies": "1",
"size": "3610",
"license": "mit",
"hash": -160351527702582850,
"line_mean": 36.2164948454,
"line_max": 106,
"alpha_frac": 0.7263157895,
"autogenerated": false,
"ratio": 3.3333333333333335,
"config_test": f... |
__author__ = "Josh Perry"
def scan_position(wordsearch, x, y, word):
directions = [["up"], ["down"], ["left"], ["right"], ["up", "left"], ["up", "right"], ["down", "left"], ["down", "right"]]
for direction in directions:
res = scan_for_word(wordsearch, x, y, word, direction)
if res:
... | {
"repo_name": "josh-perry/WordsearchSolver",
"path": "main.py",
"copies": "1",
"size": "3722",
"license": "mit",
"hash": 6916307027122424000,
"line_mean": 36.22,
"line_max": 126,
"alpha_frac": 0.3753358409,
"autogenerated": false,
"ratio": 2.5633608815426996,
"config_test": false,
"has_no_key... |
__author__ = "Josh Perry"
import os
import shutil
import urllib2
import zipfile
import rarfile
from bs4 import BeautifulSoup
dumping_directory = "W:\Plugin repo\dump"
def save_file(url, filename):
filename = "out/" + filename
# Check if we already have it
if os.path.isfile(filename + ".zip") or os.pat... | {
"repo_name": "josh-perry/NDSHomebrewDownloader",
"path": "main.py",
"copies": "1",
"size": "3662",
"license": "mit",
"hash": -1846498028312027600,
"line_mean": 28.7723577236,
"line_max": 115,
"alpha_frac": 0.53850355,
"autogenerated": false,
"ratio": 3.7215447154471546,
"config_test": false,
... |
__author__ = 'joshszczesniak'
from tkinter import *
import time
class GUI:
def __init__(self, root):
self.root = root
self.threads = []
self.messagesToSend = []
self.messageBox = Entry(self.root)
self.companionsBox = Listbox(self.root)
self.sendButton = Button(text = ... | {
"repo_name": "desperateSouls/Desperation",
"path": "GUI.py",
"copies": "1",
"size": "3630",
"license": "mit",
"hash": -7019586528403359000,
"line_mean": 33.9038461538,
"line_max": 99,
"alpha_frac": 0.5848484848,
"autogenerated": false,
"ratio": 3.555337904015671,
"config_test": true,
"has_no... |
__author__ = 'josh@thecrazypenguin.com'
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
BookPublisher = db.Table('BookPublisher',
db.Column('id', db.Integer, primary_key=True),
db.Column('bookId', db.Integer, db.ForeignKey('Book.id')),
d... | {
"repo_name": "CrazyPenguin13/RpgBookshelf",
"path": "data_models.py",
"copies": "1",
"size": "3141",
"license": "cc0-1.0",
"hash": 6076848323104809000,
"line_mean": 33.9,
"line_max": 90,
"alpha_frac": 0.6275071633,
"autogenerated": false,
"ratio": 3.5938215102974826,
"config_test": false,
"h... |
"""
CRITICAL MASS FOR A FISSION CHAIN REACTION
---------------------18/9/14---------------------
This program computes the survival fraction, F,
for a rectangular slab of fissionable material. F
is defined as the number of induced fissions per
spontaneous fission. For values of F greater than
1.0, a chain reaction occu... | {
"repo_name": "Josh-G1/psychic-robot",
"path": "Simulation 3.1.py",
"copies": "1",
"size": "4328",
"license": "mit",
"hash": -3540090594149833000,
"line_mean": 30.8235294118,
"line_max": 131,
"alpha_frac": 0.5013863216,
"autogenerated": false,
"ratio": 3.34984520123839,
"config_test": false,
... |
__author__ = 'Joshua Gore'
"""
CRITICAL MASS FOR A FISSION CHAIN REACTION
---------------------18/9/14---------------------
This program computes the survival fraction, F,
for a rectangular slab of fissionable material. F
is defined as the number of induced fissions per
spontaneous fission. For values of F greater than... | {
"repo_name": "Josh-G1/psychic-robot",
"path": "Simulation 4.0.py",
"copies": "1",
"size": "3650",
"license": "mit",
"hash": 3305928470363257000,
"line_mean": 31.3097345133,
"line_max": 87,
"alpha_frac": 0.4906849315,
"autogenerated": false,
"ratio": 3.4795042897998094,
"config_test": false,
... |
import argparse, time, sys
import boto.sqs
from boto.sqs.message import RawMessage
chill = time.sleep(0.2)
sqsconn = boto.sqs.connect_to_region("eu-west-1") # Connects to a specified region
que = sqsconn.get_queue('DummyQueue') # Selecting a SQSQueue
count = 0 # To keep a track of progress
parser = argparse.ArgumentP... | {
"repo_name": "joshua-mothkur/aws-python-scripts",
"path": "PushMessageToSQSQueue.py",
"copies": "1",
"size": "1606",
"license": "mit",
"hash": -7833343133842729000,
"line_mean": 34.6888888889,
"line_max": 116,
"alpha_frac": 0.6550435866,
"autogenerated": false,
"ratio": 3.5219298245614037,
"co... |
__author__ = 'Joshua'
import csv
import re
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
import urllib
def readCSV(filename):
f = open(filename, 'r')
try:
reader = csv.reader(f)
rows = [row for row in reader]
links = []
for ... | {
"repo_name": "JoshDev/ml-final",
"path": "CsvReader.py",
"copies": "1",
"size": "1379",
"license": "mit",
"hash": 6600678738495212000,
"line_mean": 29.6666666667,
"line_max": 110,
"alpha_frac": 0.5707034083,
"autogenerated": false,
"ratio": 3.3228915662650604,
"config_test": false,
"has_no_k... |
__author__ = 'Joshua Zhang'
"""A C/C++ header merging tool """
import os
import re
import argparse
# matching c/c++ #include patterns
pattern_include = r"#.*include.+(\.hpp|\.h)+"
pattern_squote = r"<.+>"
pattern_quote = r'".+"'
pattern_pragma = r"#pragma.+once"
regex_include = re.compile(pattern_include, re.IGNORECA... | {
"repo_name": "ZhreShold/PyGists",
"path": "tools/cpp_header_merger.py",
"copies": "1",
"size": "4547",
"license": "mit",
"hash": 4412565023827506000,
"line_mean": 36.8916666667,
"line_max": 112,
"alpha_frac": 0.5880800528,
"autogenerated": false,
"ratio": 3.7734439834024895,
"config_test": fal... |
import direct.directbase.DirectStart
from panda3d.core import FrameBufferProperties, WindowProperties
from panda3d.core import GraphicsPipe,GraphicsOutput
from panda3d.core import Filename,Texture,Shader
from panda3d.core import RenderState, CardMaker
from panda3d.core import PandaNode,TextNode,NodePath
from panda3d.c... | {
"repo_name": "toontownfunserver/Panda3D-1.9.0",
"path": "samples/Fireflies/Tut-Fireflies.py",
"copies": "3",
"size": "15910",
"license": "bsd-3-clause",
"hash": 4219651702725830700,
"line_mean": 42.4699453552,
"line_max": 122,
"alpha_frac": 0.6597108737,
"autogenerated": false,
"ratio": 3.506722... |
import direct.directbase.DirectStart
from panda3d.core import GraphicsOutput
from panda3d.core import Filename,Texture
from panda3d.core import CardMaker,Vec4
from panda3d.core import NodePath,TextNode
from panda3d.core import AmbientLight,DirectionalLight
from direct.showbase.DirectObject import DirectObject
from dir... | {
"repo_name": "francholi/PandaExamples",
"path": "Motion-Trails/Tut-Motion-Trails.py",
"copies": "3",
"size": "6938",
"license": "mit",
"hash": 5572116482889158000,
"line_mean": 34.2182741117,
"line_max": 83,
"alpha_frac": 0.6367829346,
"autogenerated": false,
"ratio": 3.249648711943794,
"confi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.