text
stringlengths
0
1.05M
meta
dict
from ...externals.six import string_types import os import numpy as np from numpy.testing import assert_allclose from nose.tools import (assert_equal, assert_almost_equal, assert_false, assert_raises, assert_true) import warnings import mne from mne.datasets import sample from mne.io.kit.test...
{ "repo_name": "jaeilepp/eggie", "path": "mne/gui/tests/test_coreg_gui.py", "copies": "2", "size": "5480", "license": "bsd-2-clause", "hash": 3894136701385273000, "line_mean": 31.8143712575, "line_max": 78, "alpha_frac": 0.6620437956, "autogenerated": false, "ratio": 2.860125260960334, "config_t...
import os import os.path as op import re import shutil import sys from unittest import SkipTest import numpy as np from numpy.testing import (assert_allclose, assert_equal, assert_array_almost_equal) import pytest import mne from mne.datasets import testing from mne.io.kit.tests import dat...
{ "repo_name": "adykstra/mne-python", "path": "mne/gui/tests/test_coreg_gui.py", "copies": "1", "size": "11263", "license": "bsd-3-clause", "hash": -682850231390502700, "line_mean": 34.196875, "line_max": 79, "alpha_frac": 0.6428127497, "autogenerated": false, "ratio": 3.0605978260869566, "confi...
import os import os.path as op import re import shutil import numpy as np from numpy.testing import assert_allclose, assert_array_almost_equal import pytest import mne from mne.datasets import testing from mne.io.kit.tests import data_dir as kit_data_dir from mne.surface import dig_mri_distances from mne.transforms ...
{ "repo_name": "pravsripad/mne-python", "path": "mne/gui/tests/test_coreg_gui.py", "copies": "10", "size": "12244", "license": "bsd-3-clause", "hash": -6801095541144068000, "line_mean": 34.8011695906, "line_max": 79, "alpha_frac": 0.6464390722, "autogenerated": false, "ratio": 3.070980687233509, ...
import os from numpy import array from numpy.testing import assert_allclose from nose.tools import assert_equal, assert_false, assert_raises, assert_true from mne.datasets import testing from mne.io.tests import data_dir as fiff_data_dir from mne.utils import (_TempDir, requires_mne, requires_freesurfer, ...
{ "repo_name": "jmontoyam/mne-python", "path": "mne/gui/tests/test_file_traits.py", "copies": "3", "size": "3042", "license": "bsd-3-clause", "hash": 8993606791894419000, "line_mean": 28.25, "line_max": 77, "alpha_frac": 0.6857330703, "autogenerated": false, "ratio": 2.950533462657614, "config_t...
__author__ = 'christianbuia' import binascii def fixed_xor_hexstrings(hexstring1, key): import binascii bytes1=binascii.unhexlify(hexstring1) decoded = "" for byte in bytes1: decoded+=chr(byte^key) return decoded #----------------------------------------------------------------------------...
{ "repo_name": "8u1a/my_matasano_crypto_challenges", "path": "set1/challenge4.py", "copies": "1", "size": "21733", "license": "unlicense", "hash": -5676559763236223000, "line_mean": 55.5989583333, "line_max": 92, "alpha_frac": 0.9484654673, "autogenerated": false, "ratio": 1.8335442504007424, "c...
__author__ = 'christianbuia' from Crypto.Cipher import AES import base64 #----------------------------------------------------------------------------------------------------------------------- def solve_challenge(b64_crypt): ciphertext = base64.decodebytes(bytes(b64_crypt, "ascii")) key="YELLOW SUBMARINE" ...
{ "repo_name": "8u1a/my_matasano_crypto_challenges", "path": "set1/challenge7.py", "copies": "1", "size": "4632", "license": "unlicense", "hash": 7732086924303570000, "line_mean": 53.5058823529, "line_max": 120, "alpha_frac": 0.8784542314, "autogenerated": false, "ratio": 1.5019455252918288, "co...
__author__ = 'christianbuia' from Crypto.Cipher import AES import base64 #----------------------------------------------------------------------------------------------------------------------- def pkcs7_padding(message_bytes, block_size): #message_bytes=bytearray(message_bytes) pad_length = block_size - ...
{ "repo_name": "8u1a/my_matasano_crypto_challenges", "path": "set2/challenge10.py", "copies": "1", "size": "7670", "license": "unlicense", "hash": -1193394356072996900, "line_mean": 41.1483516484, "line_max": 201, "alpha_frac": 0.7374185137, "autogenerated": false, "ratio": 2.038809144072302, "c...
__author__ = 'christianbuia' import binascii import sys import base64 def hamming_distance_two_hexstrings(hexstring1, hexstring2): distance = 0 if len(hexstring1) != len(hexstring2): sys.stderr.write("unexpected: length of compared strings don't match. exiting.\n") return False bytes1 =...
{ "repo_name": "8u1a/my_matasano_crypto_challenges", "path": "set1/challenge6.py", "copies": "1", "size": "9251", "license": "unlicense", "hash": -8180788151263343000, "line_mean": 36.6097560976, "line_max": 137, "alpha_frac": 0.7243541239, "autogenerated": false, "ratio": 2.260752688172043, "co...
__author__ = 'christianbuia' import random from Crypto.Cipher import AES import base64 import sys def pkcs7_padding(message_bytes, block_size): pad_length = block_size - (len(message_bytes) % block_size) if pad_length != block_size: for i in range(0, pad_length): message_bytes += bytes([p...
{ "repo_name": "8u1a/my_matasano_crypto_challenges", "path": "set2/challenge14.py", "copies": "1", "size": "12510", "license": "unlicense", "hash": 2999534932550162000, "line_mean": 41.8424657534, "line_max": 120, "alpha_frac": 0.5486810552, "autogenerated": false, "ratio": 4.262350936967632, "c...
__author__ = 'christianbuia' import random from Crypto.Cipher import AES import base64 def pkcs7_padding(message_bytes, block_size): pad_length = block_size - (len(message_bytes) % block_size) if pad_length != block_size: for i in range(0, pad_length): message_bytes += bytes([pad_length]...
{ "repo_name": "8u1a/my_matasano_crypto_challenges", "path": "set2/challenge12.py", "copies": "1", "size": "6174", "license": "unlicense", "hash": 8266413372059513000, "line_mean": 36.8773006135, "line_max": 120, "alpha_frac": 0.5542597992, "autogenerated": false, "ratio": 4.059171597633136, "co...
__author__ = 'christianbuia' import random from Crypto.Cipher import AES def add_pkcs7_padding(message_bytes, blocksize): pad_length = blocksize - (len(message_bytes) % blocksize) for i in range(0, pad_length): message_bytes += bytes([pad_length]) return message_bytes #------------------------...
{ "repo_name": "8u1a/my_matasano_crypto_challenges", "path": "set2/challenge16.py", "copies": "1", "size": "7366", "license": "unlicense", "hash": 5871478780797363000, "line_mean": 34.9317073171, "line_max": 120, "alpha_frac": 0.5134401303, "autogenerated": false, "ratio": 4.366330764671013, "co...
__author__ = 'christianbuia' import random from Crypto.Cipher import AES def pkcs7_padding(message_bytes, block_size): #message_bytes=bytearray(message_bytes) pad_length = block_size - (len(message_bytes) % block_size) if pad_length != block_size: for i in range(0, pad_length): #mes...
{ "repo_name": "8u1a/my_matasano_crypto_challenges", "path": "set2/challenge11.py", "copies": "1", "size": "5574", "license": "unlicense", "hash": 253493021506220640, "line_mean": 35.9139072848, "line_max": 120, "alpha_frac": 0.5520272695, "autogenerated": false, "ratio": 4.557645134914146, "con...
__author__ = 'christianbuia' import random from Crypto.Cipher import AES def pkcs7_padding(message_bytes, block_size): pad_length = block_size - (len(message_bytes) % block_size) if pad_length != block_size: for i in range(0, pad_length): message_bytes += bytes([pad_length]) return...
{ "repo_name": "8u1a/my_matasano_crypto_challenges", "path": "set2/challenge13.py", "copies": "1", "size": "3792", "license": "unlicense", "hash": -7735995615051276000, "line_mean": 35.4615384615, "line_max": 120, "alpha_frac": 0.4741561181, "autogenerated": false, "ratio": 3.9706806282722513, "...
import numpy from heapq import * def heuristic(a, b): return (b[0] - a[0]) ** 2 + (b[1] - a[1]) ** 2 def astar(array, start, goal): #diagonal movement allowed neighbors = [(0,1),(0,-1),(1,0),(-1,0),(1,1),(1,-1),(-1,1),(-1,-1)] #without diagonal movement #neighbors = [(0,1),(0,-1),(1,0),(-1,0)] ...
{ "repo_name": "OPU-Surveillance-System/monitoring", "path": "master/scripts/planner/astar.py", "copies": "1", "size": "2025", "license": "mit", "hash": 5498926348619165000, "line_mean": 29.223880597, "line_max": 100, "alpha_frac": 0.5180246914, "autogenerated": false, "ratio": 3.5526315789473686,...
import numpy from heapq import * def heuristic(a, b): return (b[0] - a[0]) ** 2 + (b[1] - a[1]) ** 2 def astar(array, start, goal): neighbors = [(0,1),(0,-1),(1,0),(-1,0),(1,1),(1,-1),(-1,1),(-1,-1)] close_set = set() came_from = {} gscore = {start:0} fscore = {start:heuristic(start, goal)...
{ "repo_name": "awwong1/2016-pason-coding-contest", "path": "test_astar.py", "copies": "2", "size": "2483", "license": "mit", "hash": 4436675438566924000, "line_mean": 30.8333333333, "line_max": 100, "alpha_frac": 0.4957712445, "autogenerated": false, "ratio": 2.740618101545254, "config_test": f...
__author__ = 'Christian Christelis <christian@kartoza.com>' __date__ = '06/09/16' __license__ = "GPL" __copyright__ = 'kartoza.com' # coding=utf-8 """Model class for Occupations""" from django.contrib.gis.db import models from feti.models.learning_pathway import LearningPathway class Occupation(models.Model): "...
{ "repo_name": "cchristelis/feti", "path": "django_project/feti/models/occupation.py", "copies": "1", "size": "1032", "license": "bsd-2-clause", "hash": 5154062234953269000, "line_mean": 35.8571428571, "line_max": 74, "alpha_frac": 0.7160852713, "autogenerated": false, "ratio": 3.4285714285714284,...
__author__ = 'Christian Christelis <christian@kartoza.com>' __date__ = '10/04/16' import json from django.contrib import messages from django.http import Http404, HttpResponse from django.views.generic.edit import FormView from healthsites.forms.assessment_form import AssessmentForm from healthsites.utils import heal...
{ "repo_name": "cchristelis/watchkeeper", "path": "django_project/healthsites/views/healthsites_view.py", "copies": "1", "size": "2518", "license": "bsd-2-clause", "hash": 6919746382032427000, "line_mean": 34.9714285714, "line_max": 89, "alpha_frac": 0.6592533757, "autogenerated": false, "ratio": ...
__author__ = 'Christian Christelis <christian@kartoza.com>' __date__ = '10/04/16' import uuid from django import forms from django.contrib.gis.geos import Point from healthsites.models.healthsite import Healthsite from healthsites.tasks.regenerate_cache import regenerate_cache from healthsites.models.assessment import...
{ "repo_name": "cchristelis/watchkeeper", "path": "django_project/healthsites/forms/assessment_form.py", "copies": "1", "size": "5365", "license": "bsd-2-clause", "hash": 1663090584340770800, "line_mean": 41.5793650794, "line_max": 93, "alpha_frac": 0.6096924511, "autogenerated": false, "ratio": 4...
__author__ = 'Christian Christelis <christian@kartoza.com>' __date__ = '15/04/16' import requests from django.core.exceptions import ObjectDoesNotExist from django.core.management.base import BaseCommand from django.contrib.gis.geos import Point from healthsites.models.healthsite import Healthsite import logging l...
{ "repo_name": "cchristelis/watchkeeper", "path": "django_project/healthsites/management/commands/harvest_healthsites.py", "copies": "1", "size": "1983", "license": "bsd-2-clause", "hash": 4282295619999742500, "line_mean": 32.05, "line_max": 74, "alpha_frac": 0.6011094302, "autogenerated": false, ...
__author__ = 'Christian Christelis <christian@kartoza.com>' __date__ = '21/04/16' from django.contrib.gis.db import models from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from healthsites.models.healthsite import Healthsite RESULTOPTIONS = ...
{ "repo_name": "cchristelis/watchkeeper", "path": "django_project/healthsites/models/assessment.py", "copies": "1", "size": "2924", "license": "bsd-2-clause", "hash": 2133044081133322000, "line_mean": 25.1071428571, "line_max": 76, "alpha_frac": 0.6809165527, "autogenerated": false, "ratio": 3.956...
__author__ = 'Christian Kater' from redmine import Redmine import random, string, re, csv, sys config = {} execfile("redmine.conf", config) redmine = Redmine(config['redmine_host'], key=config['redmine_rest_key']) def get_key(login, parent=None): key = re.sub('[^a-z0-9]+', '', login.lower()) if parent: ...
{ "repo_name": "ChKater/redmine-student-administration", "path": "redmine_student_administration.py", "copies": "1", "size": "3261", "license": "apache-2.0", "hash": -6794741228925122000, "line_mean": 32.2857142857, "line_max": 106, "alpha_frac": 0.6360012266, "autogenerated": false, "ratio": 3.55...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' import numpy as np import typing def algae(relative_humidity: typing.List[float], temperature: typing.List[float], material_name, porosity, roughness, total_pore_area): """ UNIVPM Algae Model Currently a dummy function! :param relativ...
{ "repo_name": "thp44/delphin_6_automation", "path": "data_process/algae_script/algae_model.py", "copies": "1", "size": "9472", "license": "mit", "hash": -6754541908867024000, "line_mean": 39.1355932203, "line_max": 119, "alpha_frac": 0.5680954392, "autogenerated": false, "ratio": 3.00602983179942...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS import pandas as pd from delphin_6_automation.database_interactions import mongo_setup from delphin_6_automation.database_interacti...
{ "repo_name": "thp44/delphin_6_automation", "path": "data_process/sample_check/raw_samples.py", "copies": "1", "size": "1132", "license": "mit", "hash": 692229549516555000, "line_mean": 34.375, "line_max": 120, "alpha_frac": 0.5697879859, "autogenerated": false, "ratio": 4.042857142857143, "con...
__author__ = "Christian Kongsgaard" __license__ = "MIT" # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS from datetime import datetime # Modules: import mongoengine # RiBuild Modules: import delphin_6_automation.database_interactions....
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/database_interactions/db_templates/result_raw_entry.py", "copies": "1", "size": "1153", "license": "mit", "hash": -5855873261787005000, "line_mean": 37.4333333333, "line_max": 120, "alpha_frac": 0.6062445794, "autogenerated":...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import copy import scipy.interpolate as ip import numpy as np import datetime # RiBuild Modules from delphin_6_automatio...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/delphin_setup/material_modelling.py", "copies": "1", "size": "7790", "license": "mit", "hash": 4314642199278446000, "line_mean": 59.859375, "line_max": 120, "alpha_frac": 0.5163029525, "autogenerated": false, "ratio": 3.980...
__author__ = 'Christian Kongsgaard' __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import logging import os # RiBuild Modules: # ------------------------------------------------------------------------...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/logging/ribuild_logger.py", "copies": "1", "size": "1475", "license": "mit", "hash": 5566476617321507000, "line_mean": 26.8301886792, "line_max": 120, "alpha_frac": 0.5003389831, "autogenerated": false, "ratio": 4.469696969...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import lxml.etree as et import xmltodict import datetime import os import shutil import bson import typing import numpy ...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/file_parsing/delphin_parser.py", "copies": "1", "size": "21944", "license": "mit", "hash": -4771985528817925000, "line_mean": 34.5080906149, "line_max": 120, "alpha_frac": 0.5464363835, "autogenerated": false, "ratio": 3.52...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import matplotlib.pyplot as plt import numpy as np import os import datetime import matplotlib.dates as mdates import pan...
{ "repo_name": "thp44/delphin_6_automation", "path": "data_process/2d_1d/archieve/relative_humidity.py", "copies": "1", "size": "18433", "license": "mit", "hash": 3284509745293186000, "line_mean": 44.5135802469, "line_max": 120, "alpha_frac": 0.5276406445, "autogenerated": false, "ratio": 3.076781...
__author__ = "Christian Kongsgaard" __license__ = "MIT" # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import mongoengine from datetime import datetime # RiBuild Modules: import delphin_6_automation.database_interactions.d...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/database_interactions/db_templates/delphin_entry.py", "copies": "1", "size": "2678", "license": "mit", "hash": 2654755857897441000, "line_mean": 40.2, "line_max": 120, "alpha_frac": 0.7038834951, "autogenerated": false, "ra...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import mongoengine import delphin_6_automation.database_interactions.database_collections as collections # RiBuild Modu...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/database_interactions/db_templates/normalized_entry.py", "copies": "1", "size": "1415", "license": "mit", "hash": 781766919374139300, "line_mean": 33.512195122, "line_max": 120, "alpha_frac": 0.6070671378, "autogenerated": fa...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import numpy as np from typing import Tuple import bson # RiBuild Modules from delphin_6_automation.logging.ribuild_lo...
{ "repo_name": "thp44/delphin_6_automation", "path": "data_process/normalize_data/algea.py", "copies": "1", "size": "3056", "license": "mit", "hash": 9178973254214587000, "line_mean": 33.7272727273, "line_max": 120, "alpha_frac": 0.6397251309, "autogenerated": false, "ratio": 3.4687854710556185, ...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import os from collections import OrderedDict import typing # RiBuild Modules: import delphin_6_automation.database_int...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/database_interactions/material_interactions.py", "copies": "1", "size": "5860", "license": "mit", "hash": -7142672257858925000, "line_mean": 35.1728395062, "line_max": 120, "alpha_frac": 0.6104095563, "autogenerated": false, ...
__author__ = "Christian Kongsgaard" __license__ = "MIT" # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import os import datetime import time import shutil import typing from mongoengine import Q # RiBuild Modules: from del...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/database_interactions/simulation_interactions.py", "copies": "1", "size": "9558", "license": "mit", "hash": -5774087173877538000, "line_mean": 30.3409836066, "line_max": 120, "alpha_frac": 0.6383134547, "autogenerated": false...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import os import json import pandas as pd import datetime import bson # RiBuild Modules from delphin_6_automation.databa...
{ "repo_name": "thp44/delphin_6_automation", "path": "data_process/validation/upload_data_to_db.py", "copies": "1", "size": "10200", "license": "mit", "hash": 8452626281916862000, "line_mean": 39.6374501992, "line_max": 120, "alpha_frac": 0.5288235294, "autogenerated": false, "ratio": 4.1145623235...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import os import numpy as np import bson # RiBuild Modules: from delphin_6_automation.database_interactions.db_template...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/database_interactions/weather_interactions.py", "copies": "1", "size": "16063", "license": "mit", "hash": 1107403312416815200, "line_mean": 44.1207865169, "line_max": 129, "alpha_frac": 0.5886198095, "autogenerated": false, ...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import os import numpy as np import matplotlib.pyplot as plt import pandas # RiBuild Modules from delphin_6_automation.f...
{ "repo_name": "thp44/delphin_6_automation", "path": "data_process/failed_simulations/process_failed.py", "copies": "1", "size": "1888", "license": "mit", "hash": -4192356046566729700, "line_mean": 28.0461538462, "line_max": 120, "alpha_frac": 0.6038135593, "autogenerated": false, "ratio": 2.90909...
__author__ = "Christian Kongsgaard" __license__ = "MIT" # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import os import yaml import numpy as np # RiBuild Modules: from delphin_6_automation.database_interactions.db_template...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/database_interactions/general_interactions.py", "copies": "1", "size": "8724", "license": "mit", "hash": 6288229648234507000, "line_mean": 32.5538461538, "line_max": 120, "alpha_frac": 0.659215956, "autogenerated": false, "...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import os # RiBuild Modules from delphin_6_automation.database_interactions.db_templates import delphin_entry from delph...
{ "repo_name": "thp44/delphin_6_automation", "path": "data_process/wp6_v2/sim_status.py", "copies": "1", "size": "2116", "license": "mit", "hash": -8618433809592759000, "line_mean": 46.0222222222, "line_max": 120, "alpha_frac": 0.6252362949, "autogenerated": false, "ratio": 3.8194945848375452, "...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import getpass import os import pathlib import pandas as pd # RiBuild Modules from delphin_6_automation.database_intera...
{ "repo_name": "thp44/delphin_6_automation", "path": "data_process/2d_1d/simon/download.py", "copies": "1", "size": "2206", "license": "mit", "hash": -6558662757134022000, "line_mean": 33.46875, "line_max": 128, "alpha_frac": 0.6591115141, "autogenerated": false, "ratio": 3.409582689335394, "con...
__author__ = "Christian Kongsgaard" __license__ = "MIT" __version__ = "0.0.1" # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS from datetime import datetime # Modules: import mongoengine # RiBuild Modules: import delphin_6_automation....
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/database_interactions/db_templates/weather_entry.py", "copies": "1", "size": "1426", "license": "mit", "hash": 2360547615695469000, "line_mean": 36.5263157895, "line_max": 120, "alpha_frac": 0.5778401122, "autogenerated": fal...
__author__ = "Christian Kongsgaard" # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import datetime import os # RiBuild Modules: # ------------------------------------------------------------------------------------------...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/file_parsing/weather_parser.py", "copies": "1", "size": "10581", "license": "mit", "hash": -3527160306274728000, "line_mean": 40.33203125, "line_max": 147, "alpha_frac": 0.4619601172, "autogenerated": false, "ratio": 4.0370...
__author__ = "Christian Kongsgaard, Simon Jørgensen" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import pandas as pd import numpy as np import xmltodict import os from collections import defaultdict im...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/sampling/inputs.py", "copies": "1", "size": "13226", "license": "mit", "hash": -2398966878389577700, "line_mean": 36.5710227273, "line_max": 120, "alpha_frac": 0.5615122873, "autogenerated": false, "ratio": 4.00030248033877...
__author__ = 'Christian Kongsgaard, Thomas Perkov' __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules: import os import platform from pathlib import Path import subprocess import datetime import time import t...
{ "repo_name": "thp44/delphin_6_automation", "path": "delphin_6_automation/backend/simulation_worker.py", "copies": "1", "size": "22905", "license": "mit", "hash": -8713531379235280000, "line_mean": 34.6775700935, "line_max": 121, "alpha_frac": 0.5893036455, "autogenerated": false, "ratio": 3.8016...
__author__ = 'Christian' from DbRequests import DbRequests from scipy.stats import pearsonr import numpy as np import itertools class RecommenderSystem: def __init__(self): self.db = DbRequests() self.blacklist = ['A TripAdvisor Member', 'lass=', 'Posted by a La Quinta traveler', 'Posted by an Ea...
{ "repo_name": "LukasGentele/Graph-based-Hotel-Recommendations", "path": "rs/RecommenderSystem.py", "copies": "1", "size": "17214", "license": "apache-2.0", "hash": 8997820555788160000, "line_mean": 34.1306122449, "line_max": 697, "alpha_frac": 0.5314279075, "autogenerated": false, "ratio": 3.5617...
__author__ = 'christian' import csv import logging from feti.models.campus import Campus as Provider from feti.models.provider import Provider as PrimaryInstitute # logging.basicConfig(filename='provider.log') header = [] original_providers = [] new_providers = [] primary_institutes = [] with open('feti_campus.csv',...
{ "repo_name": "cchristelis/feti", "path": "deployment/setup_data/data_cleanup/refactor_providers.py", "copies": "2", "size": "2833", "license": "bsd-2-clause", "hash": 6131682844907570000, "line_mean": 33.5487804878, "line_max": 79, "alpha_frac": 0.6399576421, "autogenerated": false, "ratio": 3.9...
__author__ = 'christian' import csv import logging from feti.models.provider import Provider as PrimaryInstitute logging.basicConfig(filename='primary_institute.log') header = [] original_primary_institutes = [] new_primary_institutes = [] with open('primary_institution_duplicates.csv', 'r') as csv_file: csv_rea...
{ "repo_name": "cchristelis/feti", "path": "deployment/setup_data/data_cleanup/refactor_primary_institutes.py", "copies": "2", "size": "2332", "license": "bsd-2-clause", "hash": 4491478617309552000, "line_mean": 34.8769230769, "line_max": 89, "alpha_frac": 0.6509433962, "autogenerated": false, "ra...
import numpy as np from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_almost_equal from sklearn.decomposition import FactorAnalysis def test_factor_analysis(): """Test FactorAnalysis ability to recover the data covariance struc...
{ "repo_name": "seckcoder/lang-learn", "path": "python/sklearn/sklearn/decomposition/tests/test_factor_analysis.py", "copies": "2", "size": "1692", "license": "unlicense", "hash": -5542598162930436000, "line_mean": 30.9245283019, "line_max": 75, "alpha_frac": 0.6678486998, "autogenerated": false, ...
import numpy as np from sklearn.utils.testing import assert_warns from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_greater from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_almost_equal from skl...
{ "repo_name": "xyguo/scikit-learn", "path": "sklearn/decomposition/tests/test_factor_analysis.py", "copies": "16", "size": "3203", "license": "bsd-3-clause", "hash": 3558450733467062000, "line_mean": 36.6823529412, "line_max": 76, "alpha_frac": 0.6625039026, "autogenerated": false, "ratio": 3.500...
import warnings import numpy as np from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_greater from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_almost...
{ "repo_name": "B3AU/waveTree", "path": "sklearn/decomposition/tests/test_factor_analysis.py", "copies": "4", "size": "3346", "license": "bsd-3-clause", "hash": -1118620781258024700, "line_mean": 36.1777777778, "line_max": 81, "alpha_frac": 0.6589958159, "autogenerated": false, "ratio": 3.51840168...
import numpy as np from sklearn.utils.testing import assert_warns from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_greater from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_almost_equal from skl...
{ "repo_name": "sonnyhu/scikit-learn", "path": "sklearn/decomposition/tests/test_factor_analysis.py", "copies": "112", "size": "3203", "license": "bsd-3-clause", "hash": -649296008559016400, "line_mean": 36.6823529412, "line_max": 76, "alpha_frac": 0.6625039026, "autogenerated": false, "ratio": 3....
import numpy as np from sklearn.utils.testing import assert_warns from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.exceptions import ConvergenceWarning from sklearn.decomposition import Factor...
{ "repo_name": "chrsrds/scikit-learn", "path": "sklearn/decomposition/tests/test_factor_analysis.py", "copies": "1", "size": "3043", "license": "bsd-3-clause", "hash": -8823553646527459000, "line_mean": 36.1097560976, "line_max": 76, "alpha_frac": 0.6523167926, "autogenerated": false, "ratio": 3.4...
__author__ = ('Christian Osendorfer, osendorf@in.tum.de;' 'Justin S Bayer, bayerj@in.tum.de' 'SUN Yi, yi@idsia.ch') from scipy import random, outer, zeros, ones from pybrain.datasets import SupervisedDataSet, UnsupervisedDataSet from pybrain.supervised.trainers import Trainer from pybrain....
{ "repo_name": "chanderbgoel/pybrain", "path": "pybrain/unsupervised/trainers/rbm.py", "copies": "25", "size": "6716", "license": "bsd-3-clause", "hash": -8331061457445809000, "line_mean": 33.9791666667, "line_max": 86, "alpha_frac": 0.5704288267, "autogenerated": false, "ratio": 3.704357418643133...
__author__ = 'Christian Tamayo' def loopstart(): timetime = [] while True: timething = raw_input('What is your time? Enter time, "done", "remove" or "reset"\n') if timething.upper() == 'DONE': break elif timething.upper() == 'RESET': timetime = [] elif ti...
{ "repo_name": "cjtamayo/time_add", "path": "time_adder.py", "copies": "1", "size": "1537", "license": "mit", "hash": 4997344134605839000, "line_mean": 28.5576923077, "line_max": 93, "alpha_frac": 0.485361093, "autogenerated": false, "ratio": 3.607981220657277, "config_test": false, "has_no_ke...
__author__ = 'Christian Tamayo' def validator(listo): if type(listo) == str: listo = [listo] try: for time in listo: split = time.split(':') assert type(int(split[0])) == int assert type(int(split[1])) == int assert int(split[1]) < 60 ...
{ "repo_name": "cjtamayo/time_add", "path": "timer.py", "copies": "1", "size": "2745", "license": "mit", "hash": 7141247075316666000, "line_mean": 30.6785714286, "line_max": 88, "alpha_frac": 0.4735883424, "autogenerated": false, "ratio": 3.7094594594594597, "config_test": false, "has_no_keywo...
__author__ = 'Christie' # http://www.pythonforbeginners.com/python-on-the-web/parsingjson/ import urllib3 import json import sys # Nick's techniques #'{0} {1}'.format('fist', 'second') #myjsondata = {'name': 'nick', 'school': 'Brooklyn High'} #'{name} went to {school}'.format(**myjsondata) def getSchoolsByProgramHigh...
{ "repo_name": "christieewen/nyc-school-choices", "path": "searchByProgram.py", "copies": "1", "size": "1283", "license": "apache-2.0", "hash": -6266951710301184000, "line_mean": 31.075, "line_max": 266, "alpha_frac": 0.6921278254, "autogenerated": false, "ratio": 2.8259911894273126, "config_tes...
""" Python functions to test the connectivity and performance of the iRODS icommands iput and iget. """ import os import json import subprocess import time from timeit import default_timer as timer import hashlib from tqdm import tqdm import shutil RED = "\033[31m" GREEN = "\033[92m" BLUE = "\033[34m" DEFA...
{ "repo_name": "chStaiger/iRODS_tests", "path": "iRODStestFunctions.py", "copies": "1", "size": "14131", "license": "mit", "hash": 7981208962537639000, "line_mean": 38.5826330532, "line_max": 130, "alpha_frac": 0.6147477178, "autogenerated": false, "ratio": 3.502106567534077, "config_test": true...
__author__ = 'Christof Pieloth' import logging import os from packbacker.errors import ParameterError from packbacker.installer import Installer from packbacker.utils import UtilsUI class Job(object): log = logging.getLogger(__name__) def __init__(self): self._installers = [] def add_installe...
{ "repo_name": "cpieloth/PackBacker", "path": "packbacker/job.py", "copies": "1", "size": "2453", "license": "apache-2.0", "hash": -9005515819418779000, "line_mean": 30.0632911392, "line_max": 99, "alpha_frac": 0.4626987362, "autogenerated": false, "ratio": 4.559479553903346, "config_test": fals...
__author__ = 'Christof Pieloth' import logging import os from packbacker.pluginloader import BaseClassCondition from packbacker.pluginloader import PluginLoader from packbacker.utils import UtilsUI class Installer(object): """Abstract installer with default implementations of pre_install and post_install.""" ...
{ "repo_name": "cpieloth/PackBacker", "path": "packbacker/installer.py", "copies": "1", "size": "3384", "license": "apache-2.0", "hash": 5834774232013646000, "line_mean": 28.9557522124, "line_max": 115, "alpha_frac": 0.6125886525, "autogenerated": false, "ratio": 4.530120481927711, "config_test"...
__author__ = 'Christof Pieloth' import logging import os from packbacker.utils import UtilsUI class Installer(object): """Abstract installer with default implementations of pre_install and post_install.""" def __init__(self, name, label): self.__name = name self.__label = label self...
{ "repo_name": "cpieloth/CppMath", "path": "tools/PackBacker/packbacker/installers/installer.py", "copies": "1", "size": "2604", "license": "apache-2.0", "hash": 1717855819827563000, "line_mean": 28.6022727273, "line_max": 115, "alpha_frac": 0.6059907834, "autogenerated": false, "ratio": 4.5286956...
__author__ = 'Christof Pieloth' import logging import subprocess class Utils: log = logging.getLogger(__name__) @staticmethod def check_program(program, arg): try: subprocess.call([program, arg], stdout=subprocess.PIPE) return True except OSError: Util...
{ "repo_name": "cpieloth/CppMath", "path": "tools/PackBacker/packbacker/utils.py", "copies": "2", "size": "2407", "license": "apache-2.0", "hash": 5665650804013992000, "line_mean": 25.7555555556, "line_max": 67, "alpha_frac": 0.5575405069, "autogenerated": false, "ratio": 4.018363939899833, "con...
__author__ = 'Christof Pieloth' import logging from packbacker.errors import ParameterError from packbacker.installers import installer_prototypes from packbacker.utils import UtilsUI class Job(object): log = logging.getLogger(__name__) def __init__(self): self._installers = [] def add_instal...
{ "repo_name": "cpieloth/CppMath", "path": "tools/PackBacker/packbacker/job.py", "copies": "1", "size": "2389", "license": "apache-2.0", "hash": -683360499102689500, "line_mean": 29.641025641, "line_max": 99, "alpha_frac": 0.4566764337, "autogenerated": false, "ratio": 4.65692007797271, "config_...
__author__ = 'Christof Pieloth' import os from subprocess import call from packbacker.constants import Parameter from packbacker.errors import ParameterError from packbacker.utils import Utils from packbacker.utils import UtilsUI from packbacker.installer import Installer class CxxTest(Installer): """ Downl...
{ "repo_name": "cpieloth/PackBacker", "path": "packbacker/installers/cxxtest.py", "copies": "1", "size": "2512", "license": "apache-2.0", "hash": -2255686142027108400, "line_mean": 29.2771084337, "line_max": 79, "alpha_frac": 0.6277866242, "autogenerated": false, "ratio": 3.806060606060606, "con...
__author__ = 'Christoph Ehlen' import sys import getopt from database import Database from operations import do_anonymization, do_cleanup, do_user_cut, do_blur, do_k_anonymity validOps = ["cleanup", "anonymization", "haircut", "blur", "k_anonymity"] callOps = { "cleanup": lambda db, args: do_cleanup(db), "ano...
{ "repo_name": "Institute-Web-Science-and-Technologies/LiveGovWP1", "path": "server/DbAnonymization/dbops/app.py", "copies": "1", "size": "2511", "license": "mit", "hash": 7152942116458740000, "line_mean": 29.6341463415, "line_max": 89, "alpha_frac": 0.5802469136, "autogenerated": false, "ratio": ...
""" A module to ease the creation of card games in written in python The Card class is the representation of a single card, including it's image and the back image. The Stack class is the representation of a stack of playing cards. To Use: from playingcards import Card from playingcards import Stack """ import os....
{ "repo_name": "ccdale/playingcards", "path": "playingcards.py", "copies": "1", "size": "7319", "license": "mit", "hash": -7293436588681191000, "line_mean": 23.4782608696, "line_max": 118, "alpha_frac": 0.6358792185, "autogenerated": false, "ratio": 3.5702439024390245, "config_test": false, "h...
import os import logging import pandas as pd from math import ceil, pi, exp, log, sqrt from pyproj import Proj import numpy as np from collections import defaultdict logging.basicConfig(format='%(asctime)s\t\t%(message)s', level=logging.DEBUG) # general LHV_DIESEL = 9.9445485 # (kWh/l) lower heating value HOURS_PER...
{ "repo_name": "KTH-dESA/PyOnSSET-jupyter", "path": "onsset.py", "copies": "1", "size": "54327", "license": "mit", "hash": -397660734843026600, "line_mean": 48.9329044118, "line_max": 120, "alpha_frac": 0.5694958308, "autogenerated": false, "ratio": 3.3568339100346023, "config_test": false, "h...
__author__ = 'Christopher Bock' from LoggingClass import LoggingClass class RatioHistogram(LoggingClass): """ A convenience class to make drawing ratio histograms in ROOT (http://root.cern.ch) easier, especially when dealing with many histograms in the same plot at once. You can either add histograms pre...
{ "repo_name": "ChristopherBock/pyUtilityClasses", "path": "UtilityClasses/RatioHistogram.py", "copies": "1", "size": "14298", "license": "mit", "hash": -3061960387643353000, "line_mean": 42.4589665653, "line_max": 180, "alpha_frac": 0.59434886, "autogenerated": false, "ratio": 3.8580679978413386,...
__author__ = 'Christopher Bock' class LoggingClass(object): """ Serves as base class for classes implementing rudimentary logging functions. In case no logger is supplied to the constructor, the output will be printed to the console via the print function. If a logger is supplied it will have to imple...
{ "repo_name": "ChristopherBock/pyUtilityClasses", "path": "UtilityClasses/LoggingClass.py", "copies": "1", "size": "1278", "license": "mit", "hash": 8977156897058103000, "line_mean": 40.2258064516, "line_max": 119, "alpha_frac": 0.6236306729, "autogenerated": false, "ratio": 4.231788079470198, ...
__author__ = 'Christopher Fonnesbeck, fonnesbeck@maths.otago.ac.nz' from pymc.StepMethods import * class TWalk(StepMethod): """ The t-walk is a scale-independent, adaptive MCMC algorithm for arbitrary continuous distributions and correltation structures. The t-walk maintains two independent points in ...
{ "repo_name": "matthew-brett/pymc", "path": "pymc/sandbox/TWalk.py", "copies": "1", "size": "2413", "license": "mit", "hash": 5659422517132439000, "line_mean": 34.4852941176, "line_max": 152, "alpha_frac": 0.6369664318, "autogenerated": false, "ratio": 4.062289562289562, "config_test": false, ...
'''Library to manipulate .srt subtitle files. Currently srtTool can shift subtitles by seconds or change to new frame rates. It also can match film script files to spotted timecodes. PAL uses a frame rate of 25, while NTSC uses a frame rate of 29.97. 35mm videos have a frame rate of 24. But transfer from telecining fo...
{ "repo_name": "henchc/srtTool", "path": "srt-tool/srt-Shift.py", "copies": "1", "size": "4344", "license": "mit", "hash": 55928467688551950, "line_mean": 32.9375, "line_max": 80, "alpha_frac": 0.5080570902, "autogenerated": false, "ratio": 3.208271787296898, "config_test": false, "has_no_keyw...
'''Working product to automatically generate SRT file from script. Intervals are given as user inputs while watching video. Line breaks are determined by a tree parsing algorithm.''' import time from nltk.parse import stanford from nltk import sent_tokenize, Tree from string import punctuation punctuation = punctuat...
{ "repo_name": "henchc/srtTool", "path": "srt-tool/srt-Script2SRT.py", "copies": "1", "size": "4704", "license": "mit", "hash": -7099935273747335000, "line_mean": 25.5762711864, "line_max": 182, "alpha_frac": 0.525297619, "autogenerated": false, "ratio": 3.1934826883910388, "config_test": false,...
# Basic tools import itertools # Scalers from sklearn.preprocessing import StandardScaler from sklearn.preprocessing import Normalizer from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import Binarizer # Feature selection tools from sklearn.feature_selection import SelectKBest, f_classif # U...
{ "repo_name": "JaggedParadigm/pyplearnr", "path": "build/lib/pyplearnr/pipeline_builder.py", "copies": "2", "size": "7784", "license": "apache-2.0", "hash": -2304020637028828700, "line_mean": 34.7064220183, "line_max": 101, "alpha_frac": 0.5381551901, "autogenerated": false, "ratio": 4.8680425265...
import numpy as np # Classification metrics import sklearn.metrics as sklearn_metrics from sklearn.metrics import classification_report class PipelineEvaluator(object): """ Class used to evaluate pipelines """ def get_score(self, y, y_pred, scoring_metric): """ Returns the score give...
{ "repo_name": "JaggedParadigm/pyplearnr", "path": "build/lib/pyplearnr/pipeline_evaluator.py", "copies": "2", "size": "3758", "license": "apache-2.0", "hash": -6960512631214257000, "line_mean": 31.3965517241, "line_max": 92, "alpha_frac": 0.5332623736, "autogenerated": false, "ratio": 4.468489892...
# Python 2/3 compatibility from __future__ import print_function # Basic tools import numpy as np import pandas as pd import random import re # For scikit-learn pipeline cloning from sklearn.base import clone # Graphing import pylab as plt import matplotlib import matplotlib.pyplot as mpl_plt import matplotlib.col...
{ "repo_name": "JaggedParadigm/pyplearnr", "path": "pyplearnr/nested_k_fold_cross_validation.py", "copies": "2", "size": "48375", "license": "apache-2.0", "hash": -7030119948803383000, "line_mean": 39.2789342215, "line_max": 151, "alpha_frac": 0.5459431525, "autogenerated": false, "ratio": 4.29389...
__author__ = 'christopher' from ase.atoms import Atoms import ase.io as aseio from pyiid.calc.calc_1d import Calc1D from pyiid.utils import build_sphere_np import matplotlib.pyplot as plt import time from copy import deepcopy as dc from pyiid.experiments.elasticscatter import ElasticScatter import numpy as np scat =...
{ "repo_name": "CJ-Wright/pyIID", "path": "benchmarks/time_comparison.py", "copies": "1", "size": "4558", "license": "bsd-3-clause", "hash": -593192009839550100, "line_mean": 30.2191780822, "line_max": 126, "alpha_frac": 0.6259324265, "autogenerated": false, "ratio": 2.6954464813719694, "config_...
__author__ = 'christopher' def is_coor_formatted(coor): if "/" in coor: return True else: return False def format_coor(coor): #used to go from 100 64 100 format to 100 S / 100 N format x = coor.split()[0] y = coor.split()[2] z = coor.split()[1] if float(x) > 0: x ...
{ "repo_name": "christopher-roelofs/7dtd-server-manager", "path": "util.py", "copies": "1", "size": "1381", "license": "mit", "hash": 5493508096174041000, "line_mean": 24.1090909091, "line_max": 156, "alpha_frac": 0.5104996379, "autogenerated": false, "ratio": 2.78989898989899, "config_test": fa...
__author__ = 'christopher' import parse import thread import commands import memorydb import playerdb import logger import runtime import event import util def route(line): try: p = parse.parse_log(line) if p.type == "Filtered": pass if p.type == "GMSG": logge...
{ "repo_name": "christopher-roelofs/7dtd-server-manager", "path": "director.py", "copies": "1", "size": "11519", "license": "mit", "hash": -4981774707975874000, "line_mean": 39.1393728223, "line_max": 140, "alpha_frac": 0.4792082646, "autogenerated": false, "ratio": 4.214782290523234, "config_te...
__author__ = 'christopher' global player_array global last_airdrop player_array = [] online_players = [] last_airdrop = "" airdrops= [] import logger class player_object(object): def __init__(self): self.name = "" self.entityid = 0 self.steamid = 0 self.ip= "" self.lastlo...
{ "repo_name": "christopher-roelofs/7dtd-server-manager", "path": "memorydb.py", "copies": "1", "size": "3368", "license": "mit", "hash": 5832777666298886000, "line_mean": 23.7720588235, "line_max": 64, "alpha_frac": 0.5950118765, "autogenerated": false, "ratio": 3.4508196721311477, "config_test...
__author__ = 'christopher' import threading import telnetlib import director import runtime import logger class telnet_connect_telnetlib(threading.Thread): def __init__(self, threadID, name, counter): threading.Thread.__init__(self) self.threadID = threadID self.name = name self...
{ "repo_name": "christopher-roelofs/7dtd-server-manager", "path": "telconn.py", "copies": "1", "size": "1277", "license": "mit", "hash": 4328668558540861000, "line_mean": 24.0392156863, "line_max": 64, "alpha_frac": 0.5293657009, "autogenerated": false, "ratio": 4.092948717948718, "config_test":...
__author__ = 'christopher' from Tkinter import * from ttk import * import memorydb import telconn import threading import logger import event import runtime import time import config selected_player = "" def toggle_verbose(): if verbose_chk.get() == 1: runtime.verbose = True else: runtime...
{ "repo_name": "christopher-roelofs/7dtd-server-manager", "path": "gui.py", "copies": "1", "size": "9881", "license": "mit", "hash": -7036192003446827000, "line_mean": 28.4077380952, "line_max": 115, "alpha_frac": 0.6870762069, "autogenerated": false, "ratio": 2.8410005750431284, "config_test": ...
__author__ = 'christopher' #parses the log and returns a parsed_log object import re import string import memorydb import logger from time import strftime class ParsedLog(object): def __init__(self): self.type = "" self.event = "" self.full_text = "" def parse_log(line): pl = Par...
{ "repo_name": "christopher-roelofs/7dtd-server-manager", "path": "parse.py", "copies": "1", "size": "12491", "license": "mit", "hash": 6345382945512915000, "line_mean": 32.044973545, "line_max": 240, "alpha_frac": 0.4628132255, "autogenerated": false, "ratio": 3.905878674171357, "config_test": ...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import glob import os import cv2 import numpy as np import re import matplotlib.pyplot as plt import matplotlib import time from mpl_toolkits.axes_grid1 import make_axes_locatable from sensor_correction.gp_cpu import ...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/apps/correct_depth.py", "copies": "1", "size": "3179", "license": "bsd-3-clause", "hash": -5414958977407274000, "line_mean": 31.1111111111, "line_max": 111, "alpha_frac": 0.5920100661, "autogenerated": false, "ratio": 3.3855165069...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import glob import os import cv2 import numpy as np import re def model_points(pattern): corners = np.zeros((pattern[0]*pattern[1], 3), dtype=np.float32) for i in range(pattern[1]): for j in range(patt...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/apps/depth_from_pattern.py", "copies": "1", "size": "4335", "license": "bsd-3-clause", "hash": 6990403979453158000, "line_mean": 34.5327868852, "line_max": 144, "alpha_frac": 0.5760092272, "autogenerated": false, "ratio": 3.072289...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import glob import os import numpy as np import matplotlib.pyplot as plt from sensor_correction.utils import sensor_unproject from sensor_correction.gp_cpu import GPRegressor def select_data(temps, poses, all_depths_...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/apps/train.py", "copies": "1", "size": "3582", "license": "bsd-3-clause", "hash": -3197969751457897000, "line_mean": 30.1565217391, "line_max": 142, "alpha_frac": 0.5642099386, "autogenerated": false, "ratio": 3.1896705253784505, ...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import glob import os import numpy as np import re import matplotlib.pyplot as plt import matplotlib from sensor_correction.utils import mask_outliers from sensor_correction.utils import sensor_unproject import seabo...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/apps/plot_statistics.py", "copies": "1", "size": "3208", "license": "bsd-3-clause", "hash": -729235003929808400, "line_mean": 33.4946236559, "line_max": 105, "alpha_frac": 0.6006857855, "autogenerated": false, "ratio": 3.135874877...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import numpy as np import matplotlib.pyplot as plt import seaborn as sn from collections import defaultdict import seaborn as sbn sbn.set_context('paper') sbn.set(font_scale=2) if __name__ == '__main__': import ...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/apps/plot_depth_vs_temperature.py", "copies": "1", "size": "3538", "license": "bsd-3-clause", "hash": 4978591717838028000, "line_mean": 35.8333333333, "line_max": 120, "alpha_frac": 0.5777714932, "autogenerated": false, "ratio": 3...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import numpy as np import pandas as pd import os import matplotlib.pyplot as plt import cv2 def crop(img, border): return img[border[1]:-border[1], border[0]:-border[0]] if __name__ == '__main__': import arg...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/apps/preprocess_depth.py", "copies": "1", "size": "2503", "license": "bsd-3-clause", "hash": 8982445481966697000, "line_mean": 35.2898550725, "line_max": 125, "alpha_frac": 0.5713144227, "autogenerated": false, "ratio": 3.30211081...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import numpy as np import tensorflow as tf from tensorflow.contrib.staging import StagingArea from tensorflow.python.ops import data_flow_ops import time import math from sensor_correction.gp_cpu import GPRegressor f...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/apps/compare_cpu_gpu.py", "copies": "1", "size": "2914", "license": "bsd-3-clause", "hash": 854781091558726800, "line_mean": 32.8953488372, "line_max": 124, "alpha_frac": 0.5868222375, "autogenerated": false, "ratio": 3.3113636363...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import numpy as np import tensorflow as tf class GPRegressorGPU: '''Gaussian Process regressor on GPU. Takes a pre-fitted Gaussian Process regressor (CPU) and prepares a TensorFlow graph for prediction us...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/gp_gpu.py", "copies": "1", "size": "1725", "license": "bsd-3-clause", "hash": 3465722650811564500, "line_mean": 30.3636363636, "line_max": 91, "alpha_frac": 0.5785507246, "autogenerated": false, "ratio": 3.409090909090909, "conf...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import numpy as np from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import RBF, ConstantKernel, WhiteKernel from sklearn.externals import joblib class GPRegressor: ...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/gp_cpu.py", "copies": "1", "size": "5241", "license": "bsd-3-clause", "hash": -1424031738002748000, "line_mean": 32.8129032258, "line_max": 142, "alpha_frac": 0.5956878458, "autogenerated": false, "ratio": 3.6753155680224405, "c...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import pandas as pd import numpy as np import glob import re import os if __name__ == '__main__': import argparse parser = argparse.ArgumentParser(description='Convert raw image files to pandas csv with uniqu...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/apps/create_pandas.py", "copies": "1", "size": "1178", "license": "bsd-3-clause", "hash": 1572360680582106400, "line_mean": 28.45, "line_max": 114, "alpha_frac": 0.5483870968, "autogenerated": false, "ratio": 3.56969696969697, "...
__author__ = 'Christoph Heindl' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' ''' Converts raw caputered 4D data (temperature, axis-position, color, depth) from @gebenh capture tool to a list of unique filenames matching the following pattern <id>_t<temperature>_p<axisposition>_<color|depth...
{ "repo_name": "cheind/rgbd-correction", "path": "sensor_correction/apps/convert.py", "copies": "1", "size": "1598", "license": "bsd-3-clause", "hash": 2787575978822131000, "line_mean": 38, "line_max": 116, "alpha_frac": 0.6464330413, "autogenerated": false, "ratio": 3.451403887688985, "config_t...
__author__ = 'Christoph Jansen, HTW Berlin' from data import CorpusOptions def accuracy(flags): c = correct(flags) w = wrong(flags) if c == 0: return 0 return c / (c + w) def correct(flags): tn, fp, tp, fn = flags return tp + tn def wrong(flags): tn, fp, tp, fn = flags return...
{ "repo_name": "Gnork/confusion-words", "path": "transformation_based_rule_learning/scores.py", "copies": "1", "size": "4072", "license": "mit", "hash": 6662285926998216000, "line_mean": 24.7784810127, "line_max": 83, "alpha_frac": 0.5790766208, "autogenerated": false, "ratio": 3.129900076863951, ...
__author__ = 'Christoph Jansen, HTW Berlin' import copy class TokenOrPOS: def __init__(self, value: str, isToken: bool): self.value = value self.isToken = isToken class Collocations: def __init__(self, check_sequence: [TokenOrPOS], k: int, origin_token: str, replace_token: str): self....
{ "repo_name": "Gnork/confusion-words", "path": "transformation_based_rule_learning/rule_templates.py", "copies": "1", "size": "8572", "license": "mit", "hash": 4163761751442372600, "line_mean": 34.7208333333, "line_max": 184, "alpha_frac": 0.5531964536, "autogenerated": false, "ratio": 3.86997742...
__author__ = 'Christoph Jansen, HTW Berlin' import os import normalization import pickle def export_rule_set(path, rule_set): with open(path, 'wb') as f: pickle.dump(rule_set, f) def import_rule_set(path): with open(path, 'rb') as f: rule_set = pickle.load(f) return rule_set class TSVDat...
{ "repo_name": "Gnork/confusion-words", "path": "transformation_based_rule_learning/io_wrapper.py", "copies": "1", "size": "4741", "license": "mit", "hash": 1325073796735393000, "line_mean": 28.6375, "line_max": 101, "alpha_frac": 0.5498839907, "autogenerated": false, "ratio": 3.7155172413793105, ...
__author__ = 'Christoph Jansen, HTW Berlin' import os import scores from data import CorpusOptions import json def log_exp_settings(log_path, exp_settings): open_log = open(log_path, 'w') data = json.dumps(exp_settings, sort_keys=True) print(data, file=open_log) open_log.close() print(data) class...
{ "repo_name": "Gnork/confusion-words", "path": "transformation_based_rule_learning/logger.py", "copies": "1", "size": "4521", "license": "mit", "hash": -2857388433375327700, "line_mean": 40.1090909091, "line_max": 128, "alpha_frac": 0.5169210352, "autogenerated": false, "ratio": 3.576740506329113...
__author__ = 'Christoph Jansen, HTW Berlin' import theano import theano.tensor as T from theano import dot from theano.tensor.nnet import sigmoid as sigm from theano.tensor import tanh from theano.tensor.nnet import softmax from theano.tensor.nnet import categorical_crossentropy import os import numpy as np from datet...
{ "repo_name": "Gnork/confusion-words", "path": "lstm_word2vec_language_model/__main__.py", "copies": "1", "size": "11014", "license": "mit", "hash": -727890525369080800, "line_mean": 31.9790419162, "line_max": 125, "alpha_frac": 0.5524786635, "autogenerated": false, "ratio": 3.1289772727272727, ...
__author__ = 'Christoph Jansen' import nltk import os from brocas_lm.model import Normalization from brocas_lm.model import NormalizationIter from brocas_lm.model import LanguageModel # create work dir work_dir = os.path.join(os.path.expanduser('~'), 'brocas_models') lm_file = os.path.join(work_dir, 'test_model.bin'...
{ "repo_name": "PandoIO/brocas-lm", "path": "examples/functionality_test.py", "copies": "1", "size": "1663", "license": "mit", "hash": -9420340432076412, "line_mean": 26.7333333333, "line_max": 97, "alpha_frac": 0.7522549609, "autogenerated": false, "ratio": 3.1676190476190476, "config_test": fa...
__author__ = 'Christoph Jansen' import numpy as np import theano import theano.tensor as T from theano import dot from theano.tensor.nnet import sigmoid as sigm from theano.tensor import tanh from theano.tensor.nnet import softmax from theano.tensor.nnet import categorical_crossentropy class _LSTM: de...
{ "repo_name": "PandoIO/brocas-lm", "path": "brocas_lm/_lstm.py", "copies": "1", "size": "5605", "license": "mit", "hash": -8051213868425291000, "line_mean": 39.5333333333, "line_max": 110, "alpha_frac": 0.428367529, "autogenerated": false, "ratio": 3.044541010320478, "config_test": false, "ha...
__author__ = 'Christoph Jansen' import os import pickle import numpy as np import theano from collections import Counter from datetime import datetime from brocas_lm._lstm import _LSTM from gensim.models import Word2Vec class LanguageModel: def __init__(self, verbose=True, ...
{ "repo_name": "PandoIO/brocas-lm", "path": "brocas_lm/model.py", "copies": "1", "size": "10514", "license": "mit", "hash": 6736286323381115000, "line_mean": 36.24, "line_max": 117, "alpha_frac": 0.5389005136, "autogenerated": false, "ratio": 3.8274481252275208, "config_test": false, "has_no_k...
_dtype_str_translation = { 'int': 'i', 'i': 'i', 'float': 'f', 'f': 'f', 'double': 'd', 'd': 'd', 'ui': 'uint', 'uint': 'uint', ...
{ "repo_name": "classner/fertilized-devtools", "path": "binding_generator/TypeTranslations.py", "copies": "2", "size": "3948", "license": "bsd-2-clause", "hash": 2134578903973619500, "line_mean": 50.9473684211, "line_max": 156, "alpha_frac": 0.4295845998, "autogenerated": false, "ratio": 3.7315689...