text
stringlengths
0
1.05M
meta
dict
import re import copy import time import threading import warnings import numpy as np from ..io.constants import FIFF from ..io.meas_info import Info from ..utils import logger from ..externals.FieldTrip import Client as FtClient def _buffer_recv_worker(ft_client): """Worker thread that constantl...
{ "repo_name": "jaeilepp/eggie", "path": "mne/realtime/fieldtrip_client.py", "copies": "1", "size": "9853", "license": "bsd-2-clause", "hash": 1552418185138221000, "line_mean": 31.2871621622, "line_max": 79, "alpha_frac": 0.5231909063, "autogenerated": false, "ratio": 4.394736842105263, "config_...
__author__ = 'main' from sqlalchemy import create_engine, Column, Integer, String, Enum, ForeignKey from sqlalchemy.orm import scoped_session, sessionmaker, backref, relationship from sqlalchemy.ext.declarative import declarative_base from server.config import svrcfg engine = create_engine(svrcfg['SQLALCHEMY_DATAB...
{ "repo_name": "x1angli/pyDDNS", "path": "server/models.py", "copies": "2", "size": "2385", "license": "mit", "hash": -7818988257596129000, "line_mean": 27.3928571429, "line_max": 134, "alpha_frac": 0.6054507338, "autogenerated": false, "ratio": 3.3686440677966103, "config_test": false, "has_n...
__author__ = 'MaitreyaBuddha' from .MFade import MFade from .MScale import MScale from .MCircularReveal import MCircularReveal from MBase import * import time animation_thread = MAnimationThread() animation_thread.start() class MAnimator: def animate(self): """ Initializing all the required va...
{ "repo_name": "samvidmistry/PyMaterial", "path": "MAnimations/MAnimator.py", "copies": "2", "size": "2645", "license": "mit", "hash": 4173102364369777700, "line_mean": 33.3506493506, "line_max": 132, "alpha_frac": 0.5633270321, "autogenerated": false, "ratio": 4.379139072847682, "config_test": ...
__author__ = 'MaitreyaBuddha' from PySide.QtCore import * from PySide.QtGui import * from MComponents.MShape import MShape from MUtilities import MColors class OuterRing(MShape): def __init__(self): MShape.__init__(self) self.max_width = 16 self.max_height = 16 self.width = 16 ...
{ "repo_name": "GelaniNijraj/PyMaterial", "path": "MComponents/MRadioButton.py", "copies": "2", "size": "3194", "license": "mit", "hash": -4120107457872038400, "line_mean": 31.2626262626, "line_max": 98, "alpha_frac": 0.5770194114, "autogenerated": false, "ratio": 3.6882217090069283, "config_tes...
__author__ = 'MaitreyaBuddha' from PySide.QtGui import * from PySide.QtCore import * from MComponents.MShape import MShape from MUtilities import MColors class MRippleShape(MShape): def __init__(self): MShape.__init__(self) self.max_width = 100 self.max_height = 100 self.width = ...
{ "repo_name": "samvidmistry/PyMaterial", "path": "MUtilities/MRipple.py", "copies": "2", "size": "2126", "license": "mit", "hash": 3175835108430236700, "line_mean": 30.2647058824, "line_max": 77, "alpha_frac": 0.5818438382, "autogenerated": false, "ratio": 3.490968801313629, "config_test": fals...
__author__ = 'MaitreyaBuddha' from PySide.QtGui import QWidget, QGridLayout, QApplication from PySide.QtCore import QMargins from MAnimations.MAnimator import MAnimator class MShape(QWidget, MAnimator): def __init__(self): QWidget.__init__(self) self.__x = 0 self.__y = 0 self.__e...
{ "repo_name": "samvidmistry/PyMaterial", "path": "MComponents/MShape.py", "copies": "1", "size": "4590", "license": "mit", "hash": 7382964878168506000, "line_mean": 22.2994923858, "line_max": 76, "alpha_frac": 0.5738562092, "autogenerated": false, "ratio": 3.8701517706576727, "config_test": fal...
__author__ = "MaitreyaBuddha" import abc from PySide.QtCore import Signal, QObject class MAnimate(QObject): # Various signals which will be emitted from inside the animate function # in the subclass start_signal = Signal() pause_signal = Signal() end_signal = Signal() resume_signal = Signal(...
{ "repo_name": "GelaniNijraj/PyMaterial", "path": "MAnimations/MAnimate.py", "copies": "1", "size": "6347", "license": "mit", "hash": -7274040955286104000, "line_mean": 26.2403433476, "line_max": 85, "alpha_frac": 0.6042224673, "autogenerated": false, "ratio": 4.605950653120464, "config_test": f...
__author__ = 'MaitreyaBuddha' import time from PySide.QtGui import QApplication from PySide.QtCore import QPoint, QPointF from MAnimations.MAnimate import MAnimate class MScale(MAnimate): """ Can be used to scale an MShape object to desired size. (Does not handle children). Requires target to be a ...
{ "repo_name": "GelaniNijraj/PyMaterial", "path": "MAnimations/MScale.py", "copies": "2", "size": "4786", "license": "mit", "hash": -460441881794536700, "line_mean": 38.8833333333, "line_max": 82, "alpha_frac": 0.469912244, "autogenerated": false, "ratio": 4.824596774193548, "config_test": false...
__author__ = 'majid' import os from os import path import sys __all__ = ["RecordLinkage.tfidf"] # sys.path.append(os.path.join(os.path.dirname(__file__), ".")) print(os.path.dirname(__file__)) sys.path.append(os.path.dirname(__file__)) from EntityResolution.tfidf import * # from RecordLinker import * # from Toolk...
{ "repo_name": "usc-isi-i2/dig-entity-resolution", "path": "EntityResolution/EntityResolution/__init__.py", "copies": "1", "size": "1190", "license": "apache-2.0", "hash": -6068491362238568000, "line_mean": 26.6744186047, "line_max": 63, "alpha_frac": 0.6974789916, "autogenerated": false, "ratio":...
__author__ = 'Majisto' from datetime import datetime import os import sys import tkinter as tk from tkinter import filedialog import yaml import requests twofactor_list = [] class Member(yaml.YAMLObject): yaml_tag = "Member" def __init__(self, login, id_number, full_name, two_factor, email): ...
{ "repo_name": "OSCI-WG/Extract_GitHub_Info", "path": "extract_github_info.py", "copies": "1", "size": "11303", "license": "apache-2.0", "hash": 634766874006573400, "line_mean": 40.34082397, "line_max": 174, "alpha_frac": 0.6009908874, "autogenerated": false, "ratio": 3.782797858099063, "config_...
__author__ = 'Majisto' import sys import os import tkinter as tk from tkinter import filedialog import yaml from openpyxl import Workbook class Member(yaml.YAMLObject): yaml_tag = "Member" def __init__(self, login, id_number, full_name, two_factor, email): self.login = login self.fu...
{ "repo_name": "OSCI-WG/Extract_GitHub_Info", "path": "yaml_parse.py", "copies": "1", "size": "2296", "license": "apache-2.0", "hash": 6585613919278715000, "line_mean": 28.2368421053, "line_max": 94, "alpha_frac": 0.5535714286, "autogenerated": false, "ratio": 3.5652173913043477, "config_test": ...
__author__ = 'makarenok' from model.group import Group from model.contact import Contact from timeit import timeit def test_group_list(app, db): print(timeit(lambda: app.group.get_group_list(), number=1)) def clean(group): return Group(id=group.id, name=group.name.strip()) print(timeit(lambda: ma...
{ "repo_name": "ek-makarenok/my_homework_1_1", "path": "test/test_db_matches_ui.py", "copies": "1", "size": "1070", "license": "apache-2.0", "hash": -2015678015733173000, "line_mean": 43.625, "line_max": 116, "alpha_frac": 0.685046729, "autogenerated": false, "ratio": 3.1750741839762613, "config...
__author__ = 'makarenok' import mysql.connector from model.group import Group from model.contact import Contact class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection = mys...
{ "repo_name": "ek-makarenok/my_homework_1_1", "path": "fixture/db.py", "copies": "1", "size": "1814", "license": "apache-2.0", "hash": 7632546004947337000, "line_mean": 36.8125, "line_max": 120, "alpha_frac": 0.5633958104, "autogenerated": false, "ratio": 4.0311111111111115, "config_test": fals...
__author__ = 'makarenok' from model.contact import Contact import re class ContactHelper: def __init__(self, app): self.app = app def change_field_value(self, field_name, text): wd = self.app.wd if text is not None: wd.find_element_by_name(field_name).click() ...
{ "repo_name": "ek-makarenok/my_homework_1_1", "path": "fixture/contact.py", "copies": "1", "size": "8065", "license": "apache-2.0", "hash": -8328741643772909000, "line_mean": 40.358974359, "line_max": 120, "alpha_frac": 0.5992560446, "autogenerated": false, "ratio": 3.512630662020906, "config_t...
__author__ = 'makarenok' from model.group import Group import random def test_modify_group_name(app, db, check_ui): if app.group.count() == 0: app.group.create(Group(name="test")) old_groups = db.get_group_list() group = random.choice(old_groups) new_group = Group(name="New group") new_gr...
{ "repo_name": "ek-makarenok/my_homework_1_1", "path": "test/test_modify_group.py", "copies": "1", "size": "1144", "license": "apache-2.0", "hash": 4747870387807741000, "line_mean": 33.6666666667, "line_max": 113, "alpha_frac": 0.6416083916, "autogenerated": false, "ratio": 2.9183673469387754, "...
__author__ = 'makarenok' # from random import randrange from model.contact import Contact import re def test_info_on_home_page(app, db): contacts_ui = sorted(app.contact.get_contact_list(), key=Contact.id_or_max) contacts_db = sorted(db.get_contact_list(), key=Contact.id_or_max) print(contacts_ui) pr...
{ "repo_name": "ek-makarenok/my_homework_1_1", "path": "test/test_info_contact_home_page.py", "copies": "1", "size": "2131", "license": "apache-2.0", "hash": 1602697375673617700, "line_mean": 47.4545454545, "line_max": 118, "alpha_frac": 0.6963866729, "autogenerated": false, "ratio": 3.11549707602...
__author__ = 'makarenok' import re def test_phones_on_home_page(app): contact_from_home_page = app.contact.get_contact_list()[0] contact_from_edit_page = app.contact.get_contact_info_from_edit_page(0) assert contact_from_home_page.all_phones_from_home_page == merge_phones_like_on_home_page(contact_from_e...
{ "repo_name": "ek-makarenok/my_homework_1_1", "path": "test/test_phones.py", "copies": "1", "size": "1244", "license": "apache-2.0", "hash": -3859628736229369300, "line_mean": 41.8965517241, "line_max": 126, "alpha_frac": 0.6696141479, "autogenerated": false, "ratio": 3.282321899736148, "config...
__author__ = 'makarenok' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find_element...
{ "repo_name": "ek-makarenok/my_homework_1_1", "path": "fixture/session.py", "copies": "1", "size": "1430", "license": "apache-2.0", "hash": -2046742136301268200, "line_mean": 29.4255319149, "line_max": 73, "alpha_frac": 0.5657342657, "autogenerated": false, "ratio": 3.356807511737089, "config_t...
__author__ = 'makarenok' from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def open_groups_page(self): wd = self.app.wd if self.check_url_group_page(): wd.find_element_by_link_text("groups").click() def change_field_value(self,...
{ "repo_name": "ek-makarenok/my_homework_1_1", "path": "fixture/group.py", "copies": "1", "size": "4853", "license": "apache-2.0", "hash": -7920565820666089000, "line_mean": 33.4184397163, "line_max": 103, "alpha_frac": 0.5909746549, "autogenerated": false, "ratio": 3.4296819787985866, "config_t...
__author__ = 'makarenok' from sys import maxsize class Contact: def __init__(self, firstname=None, middlename=None, lastname=None, nickname=None, title=None, id=None, company=None, address=None, homephone=None, mobilephone=None, workphone=None, secondaryphone=None, email=None, ...
{ "repo_name": "ek-makarenok/my_homework_1_1", "path": "model/contact.py", "copies": "1", "size": "1617", "license": "apache-2.0", "hash": -7905059623367696000, "line_mean": 38.4390243902, "line_max": 119, "alpha_frac": 0.6258503401, "autogenerated": false, "ratio": 3.7002288329519453, "config_t...
__author__ = 'MAKJANG_DRAMA' import pygame pygame.init() #setting_information display_width = 800 display_height = 600 game_display = pygame.display.set_mode((display_width,display_height)) pygame.display.set_caption('본격! 육성, 나만의 틀린그림찾기!') intro_img = pygame.image.load('0.png').convert() icon_img = pygame.image.loa...
{ "repo_name": "saintdragon2/python-3-lecture-2015", "path": "civil_mid_mid/aa/foryou.py", "copies": "1", "size": "6738", "license": "mit", "hash": -6251617081743458000, "line_mean": 22.9097744361, "line_max": 101, "alpha_frac": 0.6378930818, "autogenerated": false, "ratio": 2.2795698924731185, ...
__author__ = 'MAKJANG_DRAMA' import pygame, sys, time, math from pygame.locals import * pygame.init() #setting_information display_width = 800 display_height = 600 sscore = 0 Life = 100 # glocken = pygame.mixer.Sound('glocken.wav') pygame.mixer.music.load('music.mp3') # mixer.music.set_volume(0.4) pygame.mixer.mus...
{ "repo_name": "saintdragon2/python-3-lecture-2015", "path": "civil_mid_final/막장드라마조/foryou.py", "copies": "1", "size": "22264", "license": "mit", "hash": 2294756330758269000, "line_mean": 23.6488636364, "line_max": 103, "alpha_frac": 0.6041032734, "autogenerated": false, "ratio": 2.45112442083851...
__author__ = 'makov' import numpy import scipy.ndimage def SSIM(x,y): def cov(x,y): return scipy.ndimage.measurements.mean(x*y)-\ scipy.ndimage.measurements.mean(x)*scipy.ndimage.measurements.mean(y) import scipy.ndimage sigma_x=scipy.ndimage.measurements.variance(x) sigma_y=scip...
{ "repo_name": "buzmakov/tomography_scripts", "path": "tomo/yaivan/vsirt/notebook_VSIRT/ssim.py", "copies": "1", "size": "1328", "license": "mit", "hash": -9125808387058651000, "line_mean": 38.0882352941, "line_max": 93, "alpha_frac": 0.6332831325, "autogenerated": false, "ratio": 2.71574642126789...
__author__ = 'mamad' import redis import threading from pymongo import MongoClient from pymongo import database from bson.objectid import ObjectId import gridfs import time import sys import json import numpy as np import cv import cv2 PEACH_CHANNEL_FACE_DETECT = 'peach-detect-face-jobs' PEACH_CHANNEL_JOB_DONE = 'pe...
{ "repo_name": "masgari/peach", "path": "face-engine/main/engine.py", "copies": "1", "size": "5677", "license": "apache-2.0", "hash": -432347379203262200, "line_mean": 31.632183908, "line_max": 119, "alpha_frac": 0.585344372, "autogenerated": false, "ratio": 3.6863636363636365, "config_test": fa...
__author__ = 'mammothbane' from datetime import datetime import codecs import os import hashlib import logging import requests from scrapy.contrib.spiders import CrawlSpider from bs4 import BeautifulSoup import delebot from delebot.items import LuaClass, LuaMethod build_date = datetime.now() HASHFILE = 'log/hash.tx...
{ "repo_name": "mammothbane/deLebot", "path": "delebot/spiders/ApiSpider.py", "copies": "1", "size": "5068", "license": "mit", "hash": -4365134813581326000, "line_mean": 41.2333333333, "line_max": 136, "alpha_frac": 0.5297947908, "autogenerated": false, "ratio": 3.6992700729927006, "config_test"...
__author__ = 'manabchetia' import matplotlib.pyplot as plt # Make sure that caffe is on the python path: # caffe_root = '../' # this file is expected to be in {caffe_root}/examples import sys # sys.path.insert(0, caffe_root + 'python') sys.path.append("/Users/manabchetia/Downloads/caffe/python/") import caffe # Set...
{ "repo_name": "manmax31/MaterialRecognition", "path": "src/Others/Tutorial1.py", "copies": "1", "size": "1174", "license": "apache-2.0", "hash": 2684970013684837000, "line_mean": 36.8709677419, "line_max": 106, "alpha_frac": 0.6942078365, "autogenerated": false, "ratio": 3.2252747252747254, "co...
__author__ = 'manabchetia' ''' This script augments data by random rotation ''' from os import listdir, makedirs from os.path import join, exists from PIL import Image import random import numpy as np import cv2 SCALE = '384' DTD_DIR = "/srv/datasets/Materials/DTD/dtd-r1.0.1/dtd/" IMG_DIR = join(DTD_DIR, 'images')...
{ "repo_name": "manmax31/MaterialRecognition", "path": "src/python/preprocess/dtd/augment_images.py", "copies": "1", "size": "2902", "license": "apache-2.0", "hash": 7913632158356207000, "line_mean": 34.3902439024, "line_max": 118, "alpha_frac": 0.6085458305, "autogenerated": false, "ratio": 3.418...
__author__ = 'manabchetia' ''' This script creates a new dataset based on SCALE = 256 or 384 or [256:512] ''' from os import listdir, makedirs from os.path import join, exists import random import numpy as np import cv2 SCALE = '256_512' DTD_DIR = "/srv/datasets/Materials/DTD/dtd-r1.0.1/dtd/" IMG_DIR = join(DTD_DIR...
{ "repo_name": "manmax31/MaterialRecognition", "path": "src/python/preprocess/dtd/scale_images.py", "copies": "1", "size": "2961", "license": "apache-2.0", "hash": 7452602755886397000, "line_mean": 33.0344827586, "line_max": 118, "alpha_frac": 0.611279973, "autogenerated": false, "ratio": 3.403448...
__author__ = 'manabchetia' ''' This script creates the DTD dataset based on train.txt, test.txt and validate.txt ''' from os import listdir, makedirs from os.path import join, exists import shutil import errno from pprint import pprint # DTD_DIR = "/Users/manabchetia/Documents/PyCharm/MaterialRecognition/data/dtd" DTD...
{ "repo_name": "manmax31/MaterialRecognition", "path": "src/python/preprocess/dtd/create_dataset.py", "copies": "1", "size": "3059", "license": "apache-2.0", "hash": 8065288489533328000, "line_mean": 34.1609195402, "line_max": 118, "alpha_frac": 0.5518143184, "autogenerated": false, "ratio": 3.406...
__author__ = 'manabchetia' ''' This script creates the train.txt, test.txt and val.txt required for LMDB creation Contents of the files: [pathToImage classOfImage] ''' from os import listdir from os.path import join MINC_DIR = '/srv/datasets/Materials/OpenSurfaces' # MINC_DIR = '/Users/manabchetia/Documents/PyCharm/M...
{ "repo_name": "manmax31/MaterialRecognition", "path": "src/python/preprocess/minc/create_train_val_test_file.py", "copies": "1", "size": "1911", "license": "apache-2.0", "hash": 2306040786597385000, "line_mean": 49.2894736842, "line_max": 120, "alpha_frac": 0.6462585034, "autogenerated": false, "...
__author__ = 'manabchetia' ''' This script extracts patches from images from train.txt, categories.txt and validate.txt ''' from os import listdir, makedirs from os.path import join, exists import shutil import errno import cv2 import pandas as pd MINC_DIR = '../../../data/MINC/' CATEGORIES_FILE = join(MINC_DIR, 'mi...
{ "repo_name": "manmax31/MaterialRecognition", "path": "src/python/preprocess/minc/extract_patches.py", "copies": "1", "size": "4022", "license": "apache-2.0", "hash": 7296040714195387000, "line_mean": 30.421875, "line_max": 119, "alpha_frac": 0.5713575336, "autogenerated": false, "ratio": 3.42881...
__author__ = 'mandeepa' import requests import json from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.util import ngrams import re import uuid url="https://otter.topsy.com/search.json?q=nepal earthquake&&mintime=1429786838&maxtime=1430996448&offset=10" def tokenize(content): stop_...
{ "repo_name": "should-i-go/should-i-go", "path": "support_files/gettweets.py", "copies": "1", "size": "1733", "license": "mit", "hash": 6826013353004795000, "line_mean": 35.8936170213, "line_max": 138, "alpha_frac": 0.6480092325, "autogenerated": false, "ratio": 3.1001788908765655, "config_test...
__author__ = 'mangate' import numpy as np import cPickle from collections import defaultdict import re import pandas as pd import os.path from process_data_common import load_bin_vec, add_unknown_words, get_W def build_data_cv(data_folder, cv=10, clean_string=True): """ Loads data and split into 10 folds. ...
{ "repo_name": "mangate/ConvNetSent", "path": "process_data_subj.py", "copies": "1", "size": "3164", "license": "mit", "hash": -2684964631472341500, "line_mean": 32.3157894737, "line_max": 82, "alpha_frac": 0.5524652339, "autogenerated": false, "ratio": 3.2318692543411642, "config_test": false, ...
__author__ = 'mangate' import numpy as np import cPickle from collections import defaultdict import re import pandas as pd import os.path import glob from process_data_common import load_bin_vec, add_unknown_words, get_W def load_dataset(): x = [] y = [] for i, filename in enumerate(glob.iglob('data/opi/...
{ "repo_name": "mangate/ConvNetSent", "path": "process_data_opi.py", "copies": "1", "size": "3860", "license": "mit", "hash": 2729881380250939000, "line_mean": 32.275862069, "line_max": 113, "alpha_frac": 0.529015544, "autogenerated": false, "ratio": 3.120452708164915, "config_test": false, "h...
__author__ = 'mangate' import numpy as np import cPickle from collections import defaultdict import re import pandas as pd import os.path from process_data_common import load_bin_vec, add_unknown_words, get_W classes = { 'NUM': 0, 'LOC': 1, 'HUM': 2, 'DESC': 3, 'ENTY': 4, 'ABBR': 5 } def...
{ "repo_name": "mangate/ConvNetSent", "path": "process_data_trec.py", "copies": "1", "size": "4799", "license": "mit", "hash": 4080930482394432000, "line_mean": 30.1623376623, "line_max": 113, "alpha_frac": 0.5113565326, "autogenerated": false, "ratio": 3.153088042049934, "config_test": true, ...
__author__ = 'mangate' import cPickle from model import Model import process_data_mr import process_data_tweets import process_data_sst1 import process_data_sst2 import process_data_subj import process_data_trec import process_data_politeness2 import process_data_opi import process_data_irony import tensorflow as tf ...
{ "repo_name": "mangate/ConvNetSent", "path": "sentence_convnet_final.py", "copies": "1", "size": "2966", "license": "mit", "hash": -2598596480557785600, "line_mean": 25.4821428571, "line_max": 118, "alpha_frac": 0.6716115981, "autogenerated": false, "ratio": 2.9512437810945276, "config_test": f...
import re import os import ConfigParser import logging # When reading in a JSON file into a dictionary, the elements are read in as unicode. # This function converts it to the strings def json_convert_unicode_to_string(unicode_dict): if isinstance(unicode_dict, dict): return {json_convert_unicode_to_string(key):...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/utils/misc.py", "copies": "1", "size": "2909", "license": "bsd-3-clause", "hash": -5615641513873964000, "line_mean": 29.3020833333, "line_max": 154, "alpha_frac": 0.6730835339, "autogenerated": false, "ratio": 2.7417530631479736, "config_...
import sys import os import Queue import BaseDevice #import httplib import requests import time import json import logging from pkg.utils.debug import debug_mesg from pkg.utils.misc import json_convert_unicode_to_string class Vera(BaseDevice.Device): def __init__(self, id, params): super(Vera,self).__init__("Vera...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/Vera.py", "copies": "1", "size": "3167", "license": "bsd-3-clause", "hash": -8625961203967477000, "line_mean": 31.6597938144, "line_max": 112, "alpha_frac": 0.6378275971, "autogenerated": false, "ratio": 2.8352730528200536, "confi...
import sys import os import Queue import BaseDevice import ModbusDevice import time import logging from pkg.utils.debug import debug_mesg class EatonIQ260(ModbusDevice.TCPModbusDevice): def __init__(self, id, params): modbus_addr = 1 modbus_func = 3 # some more Eaton specific information self.reg_addr = 999...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/EatonIQ260.py", "copies": "1", "size": "2592", "license": "bsd-3-clause", "hash": -4842420977716216000, "line_mean": 30.6219512195, "line_max": 117, "alpha_frac": 0.6277006173, "autogenerated": false, "ratio": 2.793103448275862, "...
import sys import os import Queue import BaseDevice import ModbusDevice import time import logging from pkg.utils.debug import debug_mesg class VerisE30A042(ModbusDevice.TCPModbusDevice): def __init__(self, id, params): modbus_addr = 1 modbus_func = 3 # some more Veris specific information self.max_meter_co...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/VerisE30A042.py", "copies": "1", "size": "2793", "license": "bsd-3-clause", "hash": -2522607367884020700, "line_mean": 27.5102040816, "line_max": 96, "alpha_frac": 0.6709631221, "autogenerated": false, "ratio": 2.7902097902097904, ...
import sys import os import Queue import BaseDevice import time #import httplib import requests import xml.dom.minidom import logging from pkg.utils.debug import debug_mesg class eGaugeHTTP(BaseDevice.Device): def __init__(self, id, params): super(eGaugeHTTP,self).__init__("eGaugeHTTP", id, params) self.i=0 if...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/eGaugeHTTP.py", "copies": "1", "size": "2501", "license": "bsd-3-clause", "hash": -441794069148321340, "line_mean": 30.275, "line_max": 106, "alpha_frac": 0.6661335466, "autogenerated": false, "ratio": 2.8323895809739525, "config_...
import sys import os import Queue import BaseDevice import time import logging from pkg.utils.debug import debug_mesg from pysnmp.entity.rfc3413.oneliner import cmdgen class Raritan(BaseDevice.Device): def __init__(self, id, params): super(Raritan,self).__init__("Raritan", id, params) self.i = 0 if 'usernam...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/Raritan.py", "copies": "1", "size": "4882", "license": "bsd-3-clause", "hash": -8521130174861613000, "line_mean": 38.6991869919, "line_max": 117, "alpha_frac": 0.6015977059, "autogenerated": false, "ratio": 2.0223695111847557, "co...
import sys import os import Queue import BaseService import calendar import iso8601 import logging from pkg.utils.debug import debug_mesg class Stdout(BaseService.Service): def __init__(self, id, params): super(Stdout,self).__init__("Stdout", id, params) debug_mesg("Created Stdout Service with id: "+id) def p...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/services/Stdout.py", "copies": "1", "size": "1161", "license": "bsd-3-clause", "hash": 8504393401166492000, "line_mean": 22.7142857143, "line_max": 179, "alpha_frac": 0.5951765719, "autogenerated": false, "ratio": 2.5404814004376366, "con...
import sys import os import Queue import BaseService import calendar import iso8601 import time import logging from pkg.utils.debug import debug_mesg class File(BaseService.Service): def __init__(self, id, params): super(File,self).__init__("File", id, params) self.folder = params.get('folder',"sam_out") self....
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/services/File.py", "copies": "1", "size": "2522", "license": "bsd-3-clause", "hash": -8825518253288401000, "line_mean": 26.1290322581, "line_max": 123, "alpha_frac": 0.6324345757, "autogenerated": false, "ratio": 2.6519453207150367, "conf...
import sys import os import Queue import BaseService import time import json import math import random import re import threading, Queue import requests from urlparse import urlparse import logging import calendar import iso8601 from datetime import datetime from pkg.utils.misc import match_and_replace, match_and_r...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/services/Xively.py", "copies": "1", "size": "17501", "license": "bsd-3-clause", "hash": -8490498017485099000, "line_mean": 37.047826087, "line_max": 144, "alpha_frac": 0.6729329753, "autogenerated": false, "ratio": 2.973326537546721, "con...
import sys import os import time import Queue import BaseDevice import socket import signal #import httplib import requests import xml.dom.minidom import logging from pkg.utils.debug import debug_mesg class TED5000(BaseDevice.Device): def __init__(self, id, params): super(TED5000,self).__init__("TED5000", id, para...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/TED5000.py", "copies": "1", "size": "2765", "license": "bsd-3-clause", "hash": -1358987258139337700, "line_mean": 29.3956043956, "line_max": 117, "alpha_frac": 0.6585895118, "autogenerated": false, "ratio": 2.8214285714285716, "co...
import sys import os import time import Queue import BaseDevice import socket import signal import logging from pkg.utils.debug import debug_mesg class Shenitech(BaseDevice.Device): def __init__(self, id, params): super(Shenitech,self).__init__("Shenitech", id, params) self.decription = "Shenitech_STUF200H" if...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/Shenitech.py", "copies": "1", "size": "1821", "license": "bsd-3-clause", "hash": 4437096179752611300, "line_mean": 26.1940298507, "line_max": 93, "alpha_frac": 0.6551345415, "autogenerated": false, "ratio": 2.827639751552795, "con...
import sys import os import time import Queue import BaseDevice import socket import signal import struct import socket import logging from pkg.utils.debug import debug_mesg from pkg.utils import crc16 class TCPModbusDevice(BaseDevice.Device): def __init__(self, type, id, mbaddr, mbfunc, params): super(TCPModbusD...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/ModbusDevice.py", "copies": "1", "size": "3301", "license": "bsd-3-clause", "hash": 2454339946798953500, "line_mean": 27.2222222222, "line_max": 126, "alpha_frac": 0.6879733414, "autogenerated": false, "ratio": 3.0850467289719625, ...
import threading, Queue import logging from pkg.utils.debug import debug_mesg class Service(threading.Thread): def __init__(self, type, id, params): threading.Thread.__init__(self) self.type = type self.id = id self.params = params #print("service %s:%s params = "%(self.type,self.id)), #print(params) ...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/services/BaseService.py", "copies": "1", "size": "3433", "license": "bsd-3-clause", "hash": -8837089733813465000, "line_mean": 38.9302325581, "line_max": 215, "alpha_frac": 0.6845324789, "autogenerated": false, "ratio": 3.0488454706927177, ...
import threading, Queue import time import logging from pkg.utils.debug import debug_mesg from pkg.utils.misc import is_valid_host class Device(threading.Thread): def __init__(self, type, id, params): threading.Thread.__init__(self) self.type = type self.id = id self.params = params self.outputqueues = [...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/BaseDevice.py", "copies": "1", "size": "2317", "license": "bsd-3-clause", "hash": 518789140871935040, "line_mean": 25.3409090909, "line_max": 89, "alpha_frac": 0.6568839016, "autogenerated": false, "ratio": 2.9781491002570695, "co...
# read 10.0.0.228 analogInput 196608 presentValue import sys import os import time import Queue import BaseDevice import socket import signal import struct import socket import logging from pkg.utils.debug import debug_mesg from pkg.utils import crc16 import logging from ConfigParser import ConfigParser from bacp...
{ "repo_name": "nesl/SensorActuatorManager", "path": "pkg/devices/BacnetDevice.py", "copies": "1", "size": "9647", "license": "bsd-3-clause", "hash": -3725927353681027600, "line_mean": 32.4965277778, "line_max": 133, "alpha_frac": 0.6344977713, "autogenerated": false, "ratio": 3.843426294820717, ...
__author__ = 'Manuel Belmadani' __copyright__ = 'Copyright 2017, The Pavlidis Lab., Michael Smith Laboratories, University of British Columbia' __credits__ = ['Manuel Belmadani'] __license__ = 'LGPL' __version__ = '1.0.1' __maintainer__ = 'Manuel Belmadani' __email__ = 'manuel.belmadani@msl.ubc.ca' __status__ = 'Produc...
{ "repo_name": "ppavlidis/rnaseq-pipeline", "path": "rnaseq_pipeline/miniml_utils.py", "copies": "1", "size": "2093", "license": "unlicense", "hash": -7766736416724125000, "line_mean": 37.0545454545, "line_max": 111, "alpha_frac": 0.6612517917, "autogenerated": false, "ratio": 3.306477093206951, ...
__author__ = "Manuel Escriche <mev@tid.es>" from flask import Blueprint, render_template, abort, request, redirect, url_for, flash from flask_login import login_required from kernel.Backlog import BacklogFactory, LocalBacklogFactory from kernel.Reporter import ToolReporter from kernel import agileCalendar from . import...
{ "repo_name": "flopezag/fiware-backlog", "path": "app/tools/views.py", "copies": "1", "size": "2563", "license": "apache-2.0", "hash": -2059149366562916600, "line_mean": 40.3387096774, "line_max": 90, "alpha_frac": 0.7331252439, "autogenerated": false, "ratio": 3.7858197932053175, "config_test"...
__author__ = "Manuel Escriche <mev@tid.es>" import time from operator import attrgetter from flask import Blueprint, render_template, abort, request, redirect, url_for, flash from flask_login import login_required from flask_wtf import FlaskForm from wtforms import SelectField from kconfig import agileCalendar, helpde...
{ "repo_name": "flopezag/fiware-backlog", "path": "app/helpdesk/views.py", "copies": "1", "size": "10991", "license": "apache-2.0", "hash": 8652649555022621000, "line_mean": 38.535971223, "line_max": 103, "alpha_frac": 0.6292421072, "autogenerated": false, "ratio": 4.0707407407407405, "config_te...
__author__ = "Manuel Escriche <mev@tid.es>" from datetime import date, datetime from kconfig import settings, agileCalendar, helpdeskCompBookByKey, accountsDeskBookByKey class LinkedIssue: def __init__(self, item): super().__init__() _type = [key for key in ('inwardIssue', 'outwardIssue') if ke...
{ "repo_name": "flopezag/fiware-backlog", "path": "kernel/NM_Issue.py", "copies": "1", "size": "6894", "license": "apache-2.0", "hash": -2458032810144142000, "line_mean": 29.64, "line_max": 123, "alpha_frac": 0.5992167102, "autogenerated": false, "ratio": 3.8665171060011216, "config_test": false...
__author__ = "Manuel Escriche <mev@tid.es>" import base64, certifi, requests from kconfig import settings class ConnectionToJIRA(Exception): pass class Connector: url_api = { 'session': '/rest/auth/1/session', 'project': '/rest/api/latest/project', 'component': '/rest/api/latest/co...
{ "repo_name": "flopezag/fiware-backlog", "path": "kernel/Connector.py", "copies": "1", "size": "7607", "license": "apache-2.0", "hash": -4782980505535604000, "line_mean": 34.2175925926, "line_max": 108, "alpha_frac": 0.5702642303, "autogenerated": false, "ratio": 4.094187298170075, "config_test...
__author__ = "Manuel Escriche <mev@tid.es>" import logging from operator import attrgetter from flask import render_template,request, redirect, url_for, flash from flask_login import login_required from kconfig import agileCalendar from kernel.IssuesList import IssuesList, IssuesFactory from . import urgent @urgent.r...
{ "repo_name": "flopezag/fiware-backlog", "path": "app/urgent/views.py", "copies": "1", "size": "4749", "license": "apache-2.0", "hash": -7141009669725696000, "line_mean": 40.6578947368, "line_max": 99, "alpha_frac": 0.7129922089, "autogenerated": false, "ratio": 3.6141552511415527, "config_test...
__author__ = "Manuel Escriche <mev@tid.es>" import os from collections import OrderedDict from xml.etree import ElementTree as ET from kernel.Connector import Connector class Node: def __init__(self, node): self.name = node.get('name') tagsList = [child.tag for child in node] self.support...
{ "repo_name": "flopezag/fiware-backlog", "path": "kconfig/NodesBook.py", "copies": "1", "size": "1820", "license": "apache-2.0", "hash": 4864698382667297000, "line_mean": 33.3396226415, "line_max": 107, "alpha_frac": 0.6263736264, "autogenerated": false, "ratio": 3.6693548387096775, "config_tes...
__author__ = "Manuel Escriche <mev@tid.es>" import os from collections import OrderedDict from xml.etree import ElementTree as ET from kconfig import enablersBookByName, toolsBookByName, workingGroupsBookByName, \ coordinationBook, helpdeskCompBookByName, accountsDeskBookByName, labCompBook, labNodesBook class ...
{ "repo_name": "flopezag/fiware-backlog", "path": "kconfig/TTrackerBook.py", "copies": "1", "size": "11646", "license": "apache-2.0", "hash": -1056666429499603000, "line_mean": 37.4356435644, "line_max": 131, "alpha_frac": 0.6321483771, "autogenerated": false, "ratio": 3.927824620573356, "config...
__author__ = "Manuel Escriche <mev@tid.es>" import os from xml.etree import ElementTree as ET class Server: def __init__(self, server): tagsList = [child.tag for child in server] self.name = server.get('name') self.domain = server.find('domain').text self.username = server.find('us...
{ "repo_name": "flopezag/fiware-backlog", "path": "kconfig/Settings.py", "copies": "1", "size": "1162", "license": "apache-2.0", "hash": 6293649527272123000, "line_mean": 34.2121212121, "line_max": 88, "alpha_frac": 0.6058519793, "autogenerated": false, "ratio": 3.4790419161676644, "config_test"...
__author__ = "Manuel Escriche <mev@tid.es>" import os, pickle, base64, requests from datetime import datetime from kconfig import trackersBook, trackersBookByKey from kconfig import tComponentsBook from kernel.Jira import JIRA class DataEngine: class DataObject: def __init__(self, name, storage): ...
{ "repo_name": "flopezag/fiware-backlog", "path": "kernel/DataFactory.py", "copies": "1", "size": "5015", "license": "apache-2.0", "hash": -1899843574491660500, "line_mean": 32.8851351351, "line_max": 90, "alpha_frac": 0.5812562313, "autogenerated": false, "ratio": 3.9928343949044587, "config_te...
__author__ = "Manuel Escriche <mev@tid.es>" import statistics from datetime import date, datetime from itertools import accumulate from collections import Counter from . import calendar as FWcalendar from kconfig import tComponentsBook from kconfig import tHelpDeskNodesBook class ChannelDeskReporter: def __init_...
{ "repo_name": "flopezag/fiware-backlog", "path": "kernel/Desk.py", "copies": "1", "size": "14118", "license": "apache-2.0", "hash": 513867507001532500, "line_mean": 35.861618799, "line_max": 129, "alpha_frac": 0.5590735232, "autogenerated": false, "ratio": 3.932590529247911, "config_test": fals...
__author__ = 'Manuel Escriche' from flask import render_template, redirect, url_for, request from flask_login import login_required, login_url, login_user, logout_user from .Users import User, LoginForm from app import login_manager from . import auth @auth.route('/login', methods=['GET', 'POST']) def login(): er...
{ "repo_name": "flopezag/fiware-backlog", "path": "app/auth/views.py", "copies": "1", "size": "1148", "license": "apache-2.0", "hash": 2976489785412877000, "line_mean": 30.027027027, "line_max": 74, "alpha_frac": 0.612369338, "autogenerated": false, "ratio": 3.763934426229508, "config_test": fal...
__author__ = 'Manuel Escriche' from kernel.NM_Issue import AccountRequest, AccountProvision from kconfig.TTrackerBook import accountsDeskBookByName from kernel.NM_Aggregates import _Deck from kernel.Recorder import Recorder from kernel.NM_HelpDeskReporter import DeckReporter from kernel.DataBoard import Data _IssueTy...
{ "repo_name": "flopezag/fiware-backlog", "path": "kernel/NM_AccountsDeskReporter.py", "copies": "1", "size": "3874", "license": "apache-2.0", "hash": -2608286842148534300, "line_mean": 40.6559139785, "line_max": 131, "alpha_frac": 0.6587506453, "autogenerated": false, "ratio": 3.953061224489796, ...
__author__ = 'Manuel' from pyparsing import * class InterpreterException(Exception): pass class IntParse: def parse_command(self, cmd_str): assert_dl = Literal("/assert ") + Word(printables) loadfile = Literal("/script ") + dblQuotedString + StringEnd() quit = Literal("/quit") + Strin...
{ "repo_name": "saltzm/yadi", "path": "yadi/interpreter/interpreter_parse.py", "copies": "1", "size": "1031", "license": "bsd-3-clause", "hash": -2437056911196765000, "line_mean": 35.8214285714, "line_max": 75, "alpha_frac": 0.5965082444, "autogenerated": false, "ratio": 3.70863309352518, "confi...
__author__ = 'Manuel' import unittest import os import time from gitFunctions import Commiter, Initializer from configuration import Builder import shell import configuration from tests import testhelper class GitFunctionsTestCase(unittest.TestCase): def setUp(self): self.cwd = os.getcwd() def tea...
{ "repo_name": "jacobilsoe/rtc2git", "path": "tests/test_gitFunctions.py", "copies": "1", "size": "11507", "license": "mit", "hash": -3268955815061773300, "line_mean": 49.2489082969, "line_max": 142, "alpha_frac": 0.6862779178, "autogenerated": false, "ratio": 4.015003489183531, "config_test": t...
from kivy.uix.anchorlayout import AnchorLayout from kivy.uix.widget import Widget from kivy.uix.behaviors import ButtonBehavior from kivy.vector import Vector from kivy.graphics import Color, Rectangle, Ellipse from kivy.graphics.instructions import InstructionGroup from kivy.lang import Builder from kivy.properties ...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv_for_eetop/valle_libs/components/labels.py", "copies": "1", "size": "3294", "license": "apache-2.0", "hash": 45281842426692250, "line_mean": 32.9587628866, "line_max": 99, "alpha_frac": 0.6399514268, "autogenerated": false, "ratio": 3.5495689655172415, ...
from django.conf.urls import url, include from . import views app_name = "conta" GASTOS = [ url(r"^gastos/$", views.gastos, name="gastos"), url(r"^elegir_cuenta/$", views.elegir_cuenta, name="elegir_cuenta"), url(r"^gastos/(?P<id>-?\d*)/$", views.gastos, name="gastos"), url(r"^lista_gastos/$", views.l...
{ "repo_name": "vallemrv/tpvB3", "path": "cloud/contabilidad/urls.py", "copies": "1", "size": "4043", "license": "apache-2.0", "hash": 2956174831967435300, "line_mean": 48.3048780488, "line_max": 98, "alpha_frac": 0.6492703438, "autogenerated": false, "ratio": 2.3894799054373523, "config_test": ...
import sys import os try: reload(sys) sys.setdefaultencoding('UTF8') except: from importlib import reload reload(sys) BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = os.path.dirname(BASE_DIR) os.chdir(BASE_DIR) sys.path.append(ROOT_DIR) sys.path.insert(0, os.path.join(ROOT_DIR, "valle...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv_for_eetop/tpv/syncdb.py", "copies": "1", "size": "3798", "license": "apache-2.0", "hash": -4683235378824188000, "line_mean": 29.6290322581, "line_max": 97, "alpha_frac": 0.5239599789, "autogenerated": false, "ratio": 3.20777027027027, "config_test": ...
import config import json from kivy.storage.jsonstore import JsonStore from models.db import Clases, Productos, Ingredientes, ClasesPreguntas, Preguntas from valleorm.qson import QSonSender, QSon class ClasesSender(QSonSender): db_name = "clases" url = config.URL_SERVER+"/simpleapi/" token = "" def ...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv/syncdb.py", "copies": "1", "size": "3439", "license": "apache-2.0", "hash": 6609983594417911000, "line_mean": 31.1401869159, "line_max": 97, "alpha_frac": 0.5167199767, "autogenerated": false, "ratio": 3.2110177404295053, "config_test": false, "has...
import config from valle_libs.valleorm.qson import * from models.db import * from datetime import datetime from kivy.storage.jsonstore import JsonStore import time import json import os path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) url_db = os.path.join(path, "db", "sync.json") db = JsonStore(u...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv/syncdb_send.py", "copies": "1", "size": "3027", "license": "apache-2.0", "hash": -6224701597228180000, "line_mean": 27.5566037736, "line_max": 83, "alpha_frac": 0.5771390816, "autogenerated": false, "ratio": 2.8556603773584905, "config_test": false, ...
# Register your models here. from django.contrib import admin from django.apps import apps from .models import * class PreguntasInline(admin.TabularInline): model = Preguntas @admin.register(ClasesPreguntas) class ClasePreguntasAdmin(admin.ModelAdmin): list_display = ('nombre', "preguntas") inlines = [ ...
{ "repo_name": "vallemrv/tpvB3", "path": "cloud/clases/admin.py", "copies": "1", "size": "1302", "license": "apache-2.0", "hash": -5498291756331074000, "line_mean": 25.04, "line_max": 81, "alpha_frac": 0.6927803379, "autogenerated": false, "ratio": 3.1148325358851676, "config_test": false, "ha...
import os try: exists = unichr(0xf090) except Exception as e: unichr = lambda s: chr(s) PATH_RES = os.path.join(os.path.dirname(__file__), "res") PATH_FONT = os.path.join(PATH_RES, "fonts") PATH_ICON = os.path.join(PATH_RES, "icon") PATH_IMG = os.path.join(PATH_RES, "img") FONT_AWESOME = os.path.join(PATH_FO...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv_for_eetop/valle_libs/components/resources.py", "copies": "1", "size": "1636", "license": "apache-2.0", "hash": -4954918704398337000, "line_mean": 27.2068965517, "line_max": 65, "alpha_frac": 0.706601467, "autogenerated": false, "ratio": 2.2596685082872...
import os try: FA_ENTER = unichr(0xf090) except Exception as e: unichr = lambda s: chr(s) PATH_RES = os.path.join(os.path.dirname(__file__), "res") PATH_FONT = os.path.join(PATH_RES, "fonts") PATH_ICON = os.path.join(PATH_RES, "icon") PATH_IMG = os.path.join(PATH_RES, "img") FONT_AWESOME = os.path.join(PATH_...
{ "repo_name": "vallemrv/tpvB3", "path": "receptor/valle_libs/components/resources.py", "copies": "1", "size": "1611", "license": "apache-2.0", "hash": -5319469967549727000, "line_mean": 27.2631578947, "line_max": 65, "alpha_frac": 0.7057728119, "autogenerated": false, "ratio": 2.2531468531468533,...
from django.db.models import Sum from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import csrf_exempt from ventas.models import Arqueos, Conteo, Gastos, PedidosExtra, Pedidos from tokenapi.http import JsonResponse, JsonError import json @l...
{ "repo_name": "vallemrv/tpvB3", "path": "cloud/ventas/views/arqueos.py", "copies": "1", "size": "3733", "license": "apache-2.0", "hash": -6624520711027647000, "line_mean": 37.8854166667, "line_max": 100, "alpha_frac": 0.5371015269, "autogenerated": false, "ratio": 3.2832014072119615, "config_te...
from kivy.uix.anchorlayout import AnchorLayout from kivy.lang import Builder from kivy.properties import StringProperty, ListProperty, NumericProperty from kivy.utils import get_color_from_hex Builder.load_string(''' #:import get_color kivy.utils.get_color_from_hex <ValleListView>: list: _listado scroll: _sc...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv_for_eetop/valle_libs/components/listview.py", "copies": "1", "size": "1446", "license": "apache-2.0", "hash": -7333104066121305000, "line_mean": 25.2909090909, "line_max": 73, "alpha_frac": 0.6182572614, "autogenerated": false, "ratio": 3.4103773584905...
from kivy.uix.anchorlayout import AnchorLayout from kivy.uix.boxlayout import BoxLayout from kivy.storage.jsonstore import JsonStore from kivy.properties import (StringProperty, NumericProperty, ObjectProperty) from kivy.lang import Builder from components.botoncolor import ButtonColor im...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv_for_eetop/valle_libs/components/vteclado.py", "copies": "2", "size": "3022", "license": "apache-2.0", "hash": -6019282844379614000, "line_mean": 31.1489361702, "line_max": 73, "alpha_frac": 0.5413633355, "autogenerated": false, "ratio": 3.5763313609467...
from kivy.uix.modalview import ModalView from kivy.uix.button import Button from kivy.properties import ObjectProperty, StringProperty, ListProperty from kivy.lang import Builder Builder.load_file("view/sugerencias.kv") class Sugerencias(ModalView): onExit = ObjectProperty(None, allownone=True) content = Ob...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv_for_eetop/tpv/modals/sugerencias.py", "copies": "1", "size": "1333", "license": "apache-2.0", "hash": -1997025267807960000, "line_mean": 28.6222222222, "line_max": 72, "alpha_frac": 0.6466616654, "autogenerated": false, "ratio": 3.2354368932038833, "...
from __future__ import unicode_literals from django.db import models # Create your models here. class Pedidos(models.Model): fecha = models.DateTimeField(auto_now_add=True) modo_pago = models.CharField(max_length=50) para_llevar = models.CharField(max_length=50) num_avisador = models.CharField(max_...
{ "repo_name": "vallemrv/tpvB3", "path": "cloud/ventas/models.py", "copies": "1", "size": "6100", "license": "apache-2.0", "hash": -5537097329556747000, "line_mean": 42.8848920863, "line_max": 106, "alpha_frac": 0.6701639344, "autogenerated": false, "ratio": 3.1589849818746765, "config_test": fa...
# Register your models here. from django.contrib import admin from django.apps import apps from .models import * @admin.register(Arqueos) class ArqueosAdmin(admin.ModelAdmin): list_display = ('fecha', 'caja_dia', "efectivo", "tarjeta", "cambio", "descuadre") fields = ('caja_dia', "efectivo", "tarjeta", "ca...
{ "repo_name": "vallemrv/tpvB3", "path": "cloud/ventas/admin.py", "copies": "1", "size": "1307", "license": "apache-2.0", "hash": -4355528728192864000, "line_mean": 27.4130434783, "line_max": 92, "alpha_frac": 0.6824789594, "autogenerated": false, "ratio": 2.8725274725274725, "config_test": fals...
from valleorm import models class Gastos(models.Model): des = models.CharField(max_length=100) gasto = models.DecimalField(max_digits=20, decimal_places=2) modify = models.DateTimeField(auto_now=True) class Conteo(models.Model): can = models.IntegerField() tipo = models.DecimalField(max_digits...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv/models/db/arqueos.py", "copies": "1", "size": "1834", "license": "apache-2.0", "hash": 6324866436577960000, "line_mean": 41.6511627907, "line_max": 91, "alpha_frac": 0.7328244275, "autogenerated": false, "ratio": 3.1137521222410864, "config_test": fa...
from kivy.uix.relativelayout import RelativeLayout from kivy.uix.floatlayout import FloatLayout from kivy.properties import (StringProperty, ListProperty, NumericProperty, ObjectProperty, DictProperty) from kivy.animation import Animation from kivy.lang import Builder import components.res...
{ "repo_name": "vallemrv/tpvB3", "path": "receptor/valle_libs/components/pagenavigations.py", "copies": "2", "size": "3118", "license": "apache-2.0", "hash": 1133843800251685900, "line_mean": 28.6952380952, "line_max": 98, "alpha_frac": 0.6090442591, "autogenerated": false, "ratio": 3.555302166476...
from kivy.uix.anchorlayout import AnchorLayout from kivy.lang import Builder from kivy.properties import ObjectProperty, ListProperty, NumericProperty from kivy.clock import Clock from random import shuffle Builder.load_string(''' #:import Botonera components.botonera.Botonera #:import res components.resources <Passwo...
{ "repo_name": "vallemrv/tpvB3", "path": "receptor/valle_libs/components/password.py", "copies": "2", "size": "3776", "license": "apache-2.0", "hash": 471803589606268350, "line_mean": 31.2735042735, "line_max": 75, "alpha_frac": 0.5129766949, "autogenerated": false, "ratio": 3.486611265004617, "...
from kivy.uix.relativelayout import RelativeLayout from kivy.uix.anchorlayout import AnchorLayout from kivy.uix.boxlayout import BoxLayout from kivy.uix.behaviors import ButtonBehavior from kivy.properties import (StringProperty, ObjectProperty, OptionProperty, ListProperty, DictProperty, ...
{ "repo_name": "vallemrv/tpvB3", "path": "tpv_for_eetop/valle_libs/components/inputform.py", "copies": "2", "size": "7342", "license": "apache-2.0", "hash": 7771454752415136000, "line_mean": 29.9789029536, "line_max": 99, "alpha_frac": 0.5957504767, "autogenerated": false, "ratio": 3.8846560846560...
from kivy.uix.anchorlayout import AnchorLayout from kivy.properties import BooleanProperty, NumericProperty from kivy.animation import Animation from kivy.lang import Builder Builder.load_string(''' #:import res components.resources <Spin>: spin_label: _spin_label anchor_x: 'center' anchor_x: 'center' ...
{ "repo_name": "vallemrv/tpvB3", "path": "receptor/valle_libs/components/spin.py", "copies": "2", "size": "2042", "license": "apache-2.0", "hash": 8959395006907362000, "line_mean": 23.6024096386, "line_max": 60, "alpha_frac": 0.5577864838, "autogenerated": false, "ratio": 3.4090150250417364, "co...
__author__ = "Manuel Sanchez del Rio" __contact__ = "srio@esrf.eu" __copyright__ = "ESRF, 2014-2017" # try: # raise Exception("use local srundplug") # from orangecontrib.xoppy.util import srundplug # except: import srundplug from srundplug_examples import get_beamline import numpy from coll...
{ "repo_name": "srio/shadow3-scripts", "path": "srundplug_test_convolution.py", "copies": "1", "size": "2807", "license": "mit", "hash": -8472971857795985000, "line_mean": 26.9381443299, "line_max": 120, "alpha_frac": 0.5179907374, "autogenerated": false, "ratio": 3.5219573400250943, "config_tes...
def calculate_change(due,paid): # final changes finalChanges=[] # available change units in cents availableChanges=[10000,5000,1000,500,200,100,50,20,10] # money change supports up to cents only if (int(due*100)%10)!=0 or (int(paid*100)%10)!=0 : print("wrong amount found in'due amount' or 'paid amount', " +"...
{ "repo_name": "Maple0/Algorithm", "path": "python/money-change.py", "copies": "1", "size": "1335", "license": "mit", "hash": 9199382199510425000, "line_mean": 36.1111111111, "line_max": 76, "alpha_frac": 0.7220973783, "autogenerated": false, "ratio": 3.2720588235294117, "config_test": false, ...
#Giving a string, move the first n numbers of characters(0 to n) to the end of the string. #For example, a given string "abcdefg", move the first 2 characters "ab" to the end of the string #so that the output is "cdefgab" def reverse_string_left(string,n): length=len(string) if n <=0 or length ==0 or n>length: r...
{ "repo_name": "Maple0/Algorithm", "path": "python/reverse-string.py", "copies": "1", "size": "1311", "license": "mit", "hash": 4861334257702468000, "line_mean": 29.511627907, "line_max": 97, "alpha_frac": 0.7124332571, "autogenerated": false, "ratio": 2.795309168443497, "config_test": false, ...
class Node: def __init__(self, data=None,next=None): self.data = data self.next = None def get_data(self): return self.data class SinglyLinkedList: def __init__(self): self.root = None self.last = None def get_root_node(self): return self.root def get_last_node(self): return self.last def searc...
{ "repo_name": "Maple0/Algorithm", "path": "python/singly-linked-list.py", "copies": "1", "size": "1519", "license": "mit", "hash": -750356956966902900, "line_mean": 19.2533333333, "line_max": 41, "alpha_frac": 0.6899275839, "autogenerated": false, "ratio": 2.766848816029144, "config_test": fals...
# Given two strings: string A and string B , assume the length of string B is less than string A. # write a algorithm to check if string A contains string B #For example: string A is "A","B","C","D" and string B is "B","C","D" then the string A contains the string B import hashlib # time complexity is bad O(n*m) de...
{ "repo_name": "Maple0/Algorithm", "path": "python/string-contains.py", "copies": "1", "size": "1454", "license": "mit", "hash": 1795093175872773400, "line_mean": 25.9444444444, "line_max": 111, "alpha_frac": 0.6561210454, "autogenerated": false, "ratio": 2.658135283363803, "config_test": false,...
class Interval(object): def __init__(self, s=0, e=0): self.start = s self.end = e class Merge_ResultSet(object): def __init__(self,is_modified,merged_numbers): self.is_modified = is_modified self.merged_numbers = merged_numbers class Solution(object): def inner_merge(self,numbers): is_modif...
{ "repo_name": "Maple0/Algorithm", "path": "leetcode/merge-overlapping-intervals.py", "copies": "1", "size": "1961", "license": "mit", "hash": 4184162891011567600, "line_mean": 28.7272727273, "line_max": 77, "alpha_frac": 0.6185619582, "autogenerated": false, "ratio": 3.1731391585760518, "config...
#Given a binary tree, return the level order traversal of its nodes' values. #(ie, from left to right, level by level). #For example: #Given binary tree [3,9,20,null,null,15,7], # 3 # / \ # 9 20 # / \ # 15 7 #return its level order traversal as: #[ # [3], # [9,20], # [15,7] #] # Definition for a bi...
{ "repo_name": "Maple0/Algorithm", "path": "leetcode/binary-tree-level-order-traversal.py", "copies": "1", "size": "1374", "license": "mit", "hash": 8422260152001111000, "line_mean": 18.0972222222, "line_max": 77, "alpha_frac": 0.5502183406, "autogenerated": false, "ratio": 2.775757575757576, "c...
"""Author map Revision ID: 4e30ce4623dc Revises: b7b578784a8a Create Date: 2019-11-17 21:25:50.920593 """ # revision identifiers, used by Alembic. revision = "4e30ce4623dc" down_revision = "b7b578784a8a" from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(): #...
{ "repo_name": "DBeath/flask-feedrsub", "path": "migrations/versions/4e30ce4623dc_author_map.py", "copies": "1", "size": "2663", "license": "mit", "hash": -8102243609410183000, "line_mean": 37.5942028986, "line_max": 82, "alpha_frac": 0.6308674427, "autogenerated": false, "ratio": 3.27552275522755...
__author__ = 'marakeby' from pylearn2.training_algorithms.sgd import SGD from pylearn2.costs.autoencoder import MeanSquaredReconstructionError from pylearn2.termination_criteria import EpochCounter from pylearn2.train import Train class SGDTrainer(): def __init__(self, cost=MeanSquaredReconstructionError()): ...
{ "repo_name": "marakeby/udl", "path": "udl/pylearni/trainers/SGDTrainer.py", "copies": "1", "size": "1224", "license": "bsd-2-clause", "hash": 6369250881813370000, "line_mean": 35, "line_max": 83, "alpha_frac": 0.6299019608, "autogenerated": false, "ratio": 4.135135135135135, "config_test": fal...
__author__ = 'Marc-Andre Gardner' import datetime def formatData(name, birth, job, salary): """ Rend les parametres d'entree conformes a certaines specifications. Retourne aussi un identifiant unique compose des diverses informations :param name: :param birth: :param job: :param s...
{ "repo_name": "Quebec-Python/atelierdebug", "path": "pycharmDemo/demo1.py", "copies": "1", "size": "2600", "license": "mit", "hash": 8943499240721295000, "line_mean": 35.1111111111, "line_max": 98, "alpha_frac": 0.6661538462, "autogenerated": false, "ratio": 3.182374541003672, "config_test": fa...
__author__ = 'Marc-Andre Gardner' import pickle def getData(): return pickle.load(open('dataprofile.pkl', 'rb')) class CorrespondanceChecker: def __init__(self, compList): self.compData = set(compList) self.reset() def reset(self): self.presenceData = [] self.countFound ...
{ "repo_name": "Quebec-Python/atelierdebug", "path": "pycharmDemo/demo_profile1.py", "copies": "1", "size": "1199", "license": "mit", "hash": -3644440604275018000, "line_mean": 14.7894736842, "line_max": 81, "alpha_frac": 0.5846538782, "autogenerated": false, "ratio": 3.8184713375796178, "config...
__author__ = 'marcel' import imaplib import email import tempfile, xlrd import keyring def getAttachmentsInEmail(mail): if mail.get_content_maintype() != 'multipart': return for part in mail.walk(): if part.get_filename() is not None: return part.get_payload(decode=True) user = '...
{ "repo_name": "marcelst/metro-menu", "path": "menu.py", "copies": "1", "size": "2240", "license": "apache-2.0", "hash": 2421008807649297400, "line_mean": 32.4328358209, "line_max": 116, "alpha_frac": 0.6495535714, "autogenerated": false, "ratio": 3.1818181818181817, "config_test": false, "has...
from conans import ConanFile, CMake, tools import os import sys import shutil class GbenchmarkConan(ConanFile): name = 'GBenchmark' version = '1.3.0' license = 'MIT Licence' url = 'https://github.com/iblis-ms/conan_gbenchmark' description = 'Conan.io support for Google Benchmark' settings = ['...
{ "repo_name": "iblis-ms/conan_gbenchmark", "path": "conanfile.py", "copies": "1", "size": "2604", "license": "mit", "hash": 5334343354158772000, "line_mean": 38.4545454545, "line_max": 104, "alpha_frac": 0.6006144393, "autogenerated": false, "ratio": 3.364341085271318, "config_test": false, "...
__author__ = 'marcman' from data.components.player import Player from data.components.paper import Paper from pygame.locals import * from data.stages import Stages from data.components.infobar import Infobar class Tilemap(object): def __init__(self): self.player = Player() self.paper = Paper() ...
{ "repo_name": "marcelh89/BowAndArrow-python", "path": "data/tilemap.py", "copies": "1", "size": "1921", "license": "mit", "hash": -1044677473069576600, "line_mean": 28.1212121212, "line_max": 116, "alpha_frac": 0.5663716814, "autogenerated": false, "ratio": 4.140086206896552, "config_test": fal...
__author__ = 'marcman' from pygame.sprite import * class Infobar(Sprite): def __init__(self, score, stage, stagetext, arrowcount): Sprite.__init__(self) self.image = pygame.image.load("./resources/graphics/infobar.png") self.image = pygame.transform.scale(self.image, (800, 30)) se...
{ "repo_name": "marcelh89/BowAndArrow-python", "path": "data/components/infobar.py", "copies": "1", "size": "1229", "license": "mit", "hash": -8250505946991616000, "line_mean": 37.4375, "line_max": 87, "alpha_frac": 0.6151342555, "autogenerated": false, "ratio": 3.3856749311294765, "config_test"...