text
stringlengths
0
1.05M
meta
dict
__author__ = 'Elahe' import numpy as np import ephem import NightDataGenerator as DataGen import FBDE import time import DBreadwrite as DB import Graphics as GP import os Site = ephem.Observer() Site.lon = -1.2320792 Site.lat = -0.517781017 Site.elevation = 2650 Site.pressure = 0. Site.h...
{ "repo_name": "elahesadatnaghib/feature-based-scheduler", "path": "run.py", "copies": "1", "size": "3160", "license": "mit", "hash": 4516671787232733, "line_mean": 31.9166666667, "line_max": 158, "alpha_frac": 0.6231012658, "autogenerated": false, "ratio": 2.8884826325411335, "config_test": fal...
__author__ = 'Elahe' import ephem import numpy as np import json from numpy import * import sqlite3 as lite from calculations import * import pandas as pd class DataFeed(object): def __init__(self, date, site, custom_episode = False): self.Site = site self.night_id = int(date - ephem.Date('20...
{ "repo_name": "elahesadatnaghib/FB-Scheduler-v2", "path": "FBDE.py", "copies": "1", "size": "24163", "license": "mit", "hash": -3104819615897833000, "line_mean": 43.9126394052, "line_max": 168, "alpha_frac": 0.5309771138, "autogenerated": false, "ratio": 3.4567954220314734, "config_test": false...
__author__ = 'Elahe' import ephem import numpy as np import json from operator import attrgetter from numpy import * import time ''' Constants ''' inf = 1e10 eps = 1e-10 class Data(object): def __init__(self, date, site): self.Date = date self.Site = site ''' Predictable data ''' ...
{ "repo_name": "elahesadatnaghib/feature-based-scheduler", "path": "Heart.py", "copies": "1", "size": "27411", "license": "mit", "hash": 4868526817391133000, "line_mean": 40.2831325301, "line_max": 206, "alpha_frac": 0.5454014812, "autogenerated": false, "ratio": 3.3371073776479183, "config_test...
__author__ = 'Elahe' import ephem import numpy as np import json from operator import attrgetter from numpy import * import time ''' Constants ''' inf = 1e10 eps = 1e-10 #temp variable AllF = np.zeros((4206,7)) class Data(object): def __init__(self, date, site): self.Date = date self.Site =...
{ "repo_name": "elahesadatnaghib/feature-based-scheduler", "path": "FBDE.py", "copies": "1", "size": "27590", "license": "mit", "hash": -5845267681532301000, "line_mean": 40.2421524664, "line_max": 206, "alpha_frac": 0.5458137006, "autogenerated": false, "ratio": 3.3329306595796084, "config_test...
__author__ = 'Elahe' import numpy as np import ephem import NightDataGenerator as DataGen import FBDE import MyDE import time Date = ephem.Date('2016/09/01 12:00:00.00') # times are in UT Site = ephem.Observer() Site.lon = -1.2320792 Site.lat = -0.517781017 Site.elevation = 26...
{ "repo_name": "elahesadatnaghib/feature-based-scheduler", "path": "Training.py", "copies": "1", "size": "1637", "license": "mit", "hash": 8265636860095484000, "line_mean": 24.1846153846, "line_max": 76, "alpha_frac": 0.5467318265, "autogenerated": false, "ratio": 2.7102649006622515, "config_tes...
__author__ = 'Elahe' import sqlite3 as lite import csv import numpy as np import ephem import NightDataGenerator as ndg ''' Connect to the FBDE data base ''' def DBreadNwrite(key, Date, Site, **keyword_parameters): '''**keyword_parameters sessionID ''' if key == 'w': FBDEcon = lite.connect(...
{ "repo_name": "elahesadatnaghib/FB-Scheduler-v2", "path": "MAFdb.py", "copies": "1", "size": "20595", "license": "mit", "hash": 4942014442930101000, "line_mean": 43.8692810458, "line_max": 186, "alpha_frac": 0.4613741199, "autogenerated": false, "ratio": 4.256924348904506, "config_test": true, ...
__author__ = 'Elahe' import sqlite3 as lite import numpy as np import ephem import pandas as pd def update(Schedule): con = lite.connect('FBDE.db') cur = con.cursor() #TODO avoid overwrite t_start = Schedule[0]['ephemDate'] t_end = Schedule[-1]['ephemDate'] N_visits = np.count_nonzero(Sc...
{ "repo_name": "elahesadatnaghib/FB-Scheduler-v2", "path": "UpdateDB.py", "copies": "1", "size": "12429", "license": "mit", "hash": 588887034671112400, "line_mean": 42.6105263158, "line_max": 187, "alpha_frac": 0.4797650656, "autogenerated": false, "ratio": 3.462116991643454, "config_test": fals...
__author__ = 'Elahe' import sqlite3 as lite import numpy as np import ephem ''' Connect to the FBDE data base ''' def DBreadNwrite(key, Date): if key == 'w': FBDEcon = lite.connect('FBDE.db') FBDEcur = FBDEcon.cursor() # avoid overwrite try: FBDEcur.execute('SELECT *...
{ "repo_name": "elahesadatnaghib/feature-based-scheduler", "path": "DBreadwrite.py", "copies": "1", "size": "11137", "license": "mit", "hash": -6482689570904540000, "line_mean": 39.0647482014, "line_max": 194, "alpha_frac": 0.4490437281, "autogenerated": false, "ratio": 3.788095238095238, "confi...
__author__ = 'ELatA' import sys from collada import * import zlib import StringIO import struct def main(): dae_path = swm_path = "" try: dae_path = sys.argv[1] swm_path = sys.argv[2] except: print 'Error: dae or swm path not exist!' sys.exit() if not os.path.exists(swm_...
{ "repo_name": "gastrodia/convert3d", "path": "dae2swmx.py", "copies": "1", "size": "2164", "license": "apache-2.0", "hash": 4112869133408178000, "line_mean": 24.7619047619, "line_max": 49, "alpha_frac": 0.5975046211, "autogenerated": false, "ratio": 2.821382007822686, "config_test": false, "h...
__author__ = ['Eleftheria Chatziargyriou <ele.hatzy@gmail.com>'] __license__ = 'MIT License' import re from cltk.stem.middle_english.stem import affix_stemmer """ The hyphenation/syllabification algorithm is based on the typical syllable structure model of onset/nucleus/coda. An additional problem arises with the di...
{ "repo_name": "TylerKirby/cltk", "path": "cltk/phonology/middle_english/transcription.py", "copies": "1", "size": "10342", "license": "mit", "hash": 214522052587174100, "line_mean": 29.649851632, "line_max": 109, "alpha_frac": 0.5199922548, "autogenerated": false, "ratio": 3.5373287671232876, "...
import time import math from scipy.integrate import ode import numpy as np import matplotlib.pyplot as plt start_time = time.time() def sburstf( x, aval, bval, atval, btval ): if (x > 0.00): y=(atval * (1.00 - math.exp(-x / btval))) else: y=(-(aval / bval) * x * math.exp(x / (bval))) ...
{ "repo_name": "avramidis/Broomhead-etal-2000-model", "path": "broomhead.py", "copies": "1", "size": "2826", "license": "mit", "hash": 7537201419730463000, "line_mean": 21.7903225806, "line_max": 154, "alpha_frac": 0.4437367304, "autogenerated": false, "ratio": 1.9237576582709326, "config_test":...
__author__ = "Elena Dimchenko" from .helpers.randomize import randomize_it from sys import maxsize def clean(group): return Group(id=group.id, name=group.name.strip()) class Group: def __init__(self, name = None, id = None, header = None, ...
{ "repo_name": "alenickwork/python_training", "path": "model/group.py", "copies": "1", "size": "1306", "license": "apache-2.0", "hash": 7623730059233703000, "line_mean": 25.12, "line_max": 103, "alpha_frac": 0.5505359877, "autogenerated": false, "ratio": 3.6177285318559558, "config_test": false,...
__author__ = "Elena Dimchenko" import random from .helpers.randomize import randomize_it from sys import maxsize def clean(contact): return Contact(id=contact.id, firstname=contact.firstname.strip().replace(" "," "), lastname=contact.lastname.strip().replace(" "," ")) clas...
{ "repo_name": "alenickwork/python_training", "path": "model/contact.py", "copies": "1", "size": "5767", "license": "apache-2.0", "hash": 5728932071925258000, "line_mean": 41.7185185185, "line_max": 221, "alpha_frac": 0.5847060864, "autogenerated": false, "ratio": 3.7990777338603428, "config_tes...
__author__ = 'Eleven' # # encoding:UTF-8 # import urllib.request # # url = "http://www.baidu.com" # data = urllib.request.urlopen(url).read() # data = data.decode('UTF-8') # print(data) # print ("ddd") #-*- encoding: utf-8 -*- import urllib import urllib.request import http.cookiejar import os from bs4 import Beautif...
{ "repo_name": "RaulVan/JustPythonCode", "path": "Day3.py", "copies": "1", "size": "1922", "license": "mit", "hash": 7057915263024657000, "line_mean": 21.6746987952, "line_max": 131, "alpha_frac": 0.6115834219, "autogenerated": false, "ratio": 2.65819209039548, "config_test": false, "has_no_ke...
__author__ = 'Elias Haroun' from BinaryTree_ADT.tree.list.ArrayList import * class BinaryTree(object): def __init__(self): self.arrayList = ArrayList() self.size = 0 self.rootIndex = 0 self.lastIndex = 0 def getSize(self): return self.size def isEmpty(self): ...
{ "repo_name": "EliHar/BinaryTree-ADT", "path": "tree/BinaryTree_1.py", "copies": "1", "size": "2858", "license": "mit", "hash": -8848964920868616000, "line_mean": 30.7555555556, "line_max": 66, "alpha_frac": 0.5731280616, "autogenerated": false, "ratio": 3.745740498034076, "config_test": false,...
__author__ = 'Elias Haroun' from List_ADT.list.Node import * class DoublyLinkedList(object): def __init__(self): self.head = None self.tail = None self.size = 0 def isEmpty(self): return self.size == 0 def getSize(self): return self.size def getHead(self): ...
{ "repo_name": "EliHar/List-ADT", "path": "list/DoublyLinkedList.py", "copies": "1", "size": "2112", "license": "mit", "hash": -7164014055762627000, "line_mean": 21.7096774194, "line_max": 65, "alpha_frac": 0.5364583333, "autogenerated": false, "ratio": 3.819168173598553, "config_test": false, ...
__author__ = 'Elias Haroun' from List_ADT.list.Node import * class LinkedList(object): def __init__(self): self.head = None self.size = 0 def isEmpty(self): return self.size == 0 def getSize(self): return self.size def getHead(self): return self.head def...
{ "repo_name": "EliHar/List-ADT", "path": "list/LinkedList.py", "copies": "1", "size": "1757", "license": "mit", "hash": -7584737780992371000, "line_mean": 20.975, "line_max": 65, "alpha_frac": 0.5196357427, "autogenerated": false, "ratio": 3.9394618834080717, "config_test": false, "has_no_key...
__author__ = 'eliashussen' from bs4 import BeautifulSoup import requests import re from alchemyapi import AlchemyAPI import json def sentiment_alchemy(url): alchemyapi = AlchemyAPI() response = alchemyapi.sentiment('url', url) response['usage'] = None if response['status'] == 'OK': print('#...
{ "repo_name": "EHDEV/market_sentimentalism2", "path": "archive/old.py", "copies": "1", "size": "2768", "license": "mit", "hash": 5578127511657212000, "line_mean": 26.4059405941, "line_max": 113, "alpha_frac": 0.5411849711, "autogenerated": false, "ratio": 3.413070283600493, "config_test": false...
__author__ = 'eliashussen' import numpy as np from sklearn import linear_model, svm, tree from sklearn.feature_selection import SelectKBest from sklearn.feature_selection import f_regression def linear_reg(data): # data = etl.prepare_data_for_modeling() stats = {} orig_data = data.values variables =...
{ "repo_name": "EHDEV/market_sentimentalism2", "path": "model.py", "copies": "1", "size": "2137", "license": "mit", "hash": -4450911387598861000, "line_mean": 22.2282608696, "line_max": 99, "alpha_frac": 0.5694899392, "autogenerated": false, "ratio": 3.133431085043988, "config_test": true, "ha...
__author__ = 'eliashussen' import pandas as p import requests as r from StringIO import StringIO import datetime from bs4 import BeautifulSoup import re from alchemyapi import AlchemyAPI import json import numpy as np from flask import request from os import path import csv from collections import defaultdict def ge...
{ "repo_name": "EHDEV/market_sentimentalism2", "path": "etl.py", "copies": "1", "size": "4863", "license": "mit", "hash": 5186188218252991000, "line_mean": 24.7301587302, "line_max": 114, "alpha_frac": 0.5883199671, "autogenerated": false, "ratio": 3.1394448030987734, "config_test": false, "ha...
__author__ = 'elias' class ArrayList(object): def __init__(self): self.size = 0 self.capacity = 0 self.array = [] def getSize(self): return self.size def getCapacity(self): return self.capacity def setCapacity(self, newCapacity): temp = [] for...
{ "repo_name": "EliHar/List-ADT", "path": "list/ArrayList.py", "copies": "2", "size": "1309", "license": "mit", "hash": 8901983829748175000, "line_mean": 23.2592592593, "line_max": 42, "alpha_frac": 0.5309396486, "autogenerated": false, "ratio": 3.9427710843373496, "config_test": false, "has_n...
""" Module to see what calls actually occurred during execution, their arguments and return values, when executing algorithms with complex function call sequences, and especially ones that require recursion. The class :class:`TraceCalls` is called as a decorator :func:`@TraceCalls`. """ import sys from functools impo...
{ "repo_name": "ewan-klein/carneades", "path": "src/carneades/tracecalls.py", "copies": "1", "size": "1922", "license": "apache-2.0", "hash": 6950907871056407000, "line_mean": 35.2830188679, "line_max": 93, "alpha_frac": 0.5998959417, "autogenerated": false, "ratio": 4.03781512605042, "config_te...
__author__ = 'elichai2' import bitcoin import bitcoin.rpc from bitcoin.core import b2lx from bitcoin.wallet import CBitcoinAddress from collections import namedtuple import argparse import transactionTools import sys proxy = bitcoin.rpc.Proxy() def _check_output_address(mytx): print for vout in mytx.vout: ...
{ "repo_name": "elichai/CheckDoubleSpend", "path": "CheckAddress.py", "copies": "1", "size": "2274", "license": "apache-2.0", "hash": 6031263040084728000, "line_mean": 37.5593220339, "line_max": 109, "alpha_frac": 0.6314863676, "autogenerated": false, "ratio": 3.542056074766355, "config_test": f...
__author__ = 'elichai2' import bitcoin from bitcoin.core import (lx, x) import sys def getraw(proxy, mytx): try: mytx = proxy.getrawtransaction(lx(mytx)) except Exception, e: if str(e) == 'Proxy.getrawtransaction(): No information available about transaction (-5)': print "Th...
{ "repo_name": "elichai/CheckDoubleSpend", "path": "transactionTools.py", "copies": "1", "size": "1211", "license": "apache-2.0", "hash": -8080463711857018000, "line_mean": 30.0512820513, "line_max": 107, "alpha_frac": 0.5417010735, "autogenerated": false, "ratio": 4.204861111111111, "config_tes...
__author__ = 'Eli Daian <elidaian@gmail.com>' class SimpleBoard(object): """ Represents a sudoku board. This board is a simple board - a problem or solution board. """ def __init__(self, block_width, block_height, data=None): """ Create a new edsudoku board. ...
{ "repo_name": "liuyonggg/learning_python", "path": "edsudoku-2.0.2/edsudoku/board.py", "copies": "1", "size": "7311", "license": "mit", "hash": 7403779681272874000, "line_mean": 27.3614457831, "line_max": 110, "alpha_frac": 0.5456161948, "autogenerated": false, "ratio": 4.270443925233645, "conf...
#Standard libraries import string class TranslationMixins: """Base class for converting a sequence to protein """ def translate_sequence(self, strand=1, start=0, stop=None): """Translates and sequence in the first frame, forward (default) or reverse. Parameters: _________...
{ "repo_name": "edraizen/hsp_tiler", "path": "hsp_tiler/Sequence.py", "copies": "1", "size": "4225", "license": "bsd-3-clause", "hash": -5240058557968101000, "line_mean": 33.9173553719, "line_max": 133, "alpha_frac": 0.5214201183, "autogenerated": false, "ratio": 3.4631147540983607, "config_test...
#Standard libraries import sys import xml.etree.cElementTree as ET import re from math import exp #Custom libraries from Parser import Parser, Match, Matches class HSP(Match): """Holds information about a given High-scoring Sequence Pair (HSP) returned from BLASTX. """ def __init__(self, hsp, rapsea...
{ "repo_name": "edraizen/hsp_tiler", "path": "hsp_tiler/BlastXMLParser.py", "copies": "1", "size": "6374", "license": "bsd-3-clause", "hash": 2815333321775004000, "line_mean": 33.0855614973, "line_max": 106, "alpha_frac": 0.655632256, "autogenerated": false, "ratio": 3.119921683798336, "config_t...
"""Parser for BLAT PSLX file. BLAT is faster than BLASTX for many cases so it may be an alternative to those who need to correct sequences in a time limit. To get BLAT to work like BLASTX, you must manually convert the contigs into the six frames and rerun blast. There is a program in HSP-Tiler utiliities to do this ...
{ "repo_name": "edraizen/hsp_tiler", "path": "hsp_tiler/BlatPSLXParser.py", "copies": "1", "size": "6228", "license": "bsd-3-clause", "hash": -1834208592463959300, "line_mean": 35.8520710059, "line_max": 128, "alpha_frac": 0.6099871548, "autogenerated": false, "ratio": 3.7182089552238806, "confi...
"""Module to handle Matches from an annotation program such as BLASTX or BLAT Can be used to build parsers for new programs """ #Standard libraries import re #Parse out taxa info regexTaxFilters = {0:re.compile("^.+\[(.+)\]"), #nr 1:re.compile("OS=(\w+\s\s+)") #uniprot } class...
{ "repo_name": "edraizen/hsp_tiler", "path": "hsp_tiler/Parser.py", "copies": "1", "size": "4277", "license": "bsd-3-clause", "hash": 1939719920682945800, "line_mean": 31.9, "line_max": 92, "alpha_frac": 0.6050970306, "autogenerated": false, "ratio": 4.1645569620253164, "config_test": false, "...
#Standard libraries import sys, re import string #Custom libraries from Sequence import DNASequence def read_fasta(inFile, alphabet=None): """Read in fasta file and return sequence objects with the fasta data inFile - a file-like object contianing the fasta data """ #Set up sequence and flags f...
{ "repo_name": "edraizen/hsp_tiler", "path": "hsp_tiler/read_fasta.py", "copies": "1", "size": "1827", "license": "bsd-3-clause", "hash": -9168825153481080000, "line_mean": 28.4677419355, "line_max": 80, "alpha_frac": 0.5769020252, "autogenerated": false, "ratio": 4.238979118329467, "config_test...
import numpy as np import scipy.integrate c_km_per_s = 299792.458 class DistanceCalc(object): def __init__(self,om,ok,ol,wmodel,de_params,h0): ''' om = omega_matter ok = omega curvature ol = omega lambda wmodel= -1 for LCDM(w0=-1), 0 for (w0,wa) parametrisation, 1 for w0,wa...
{ "repo_name": "EliseJ/astroABC", "path": "examples/distance_calc.py", "copies": "1", "size": "2408", "license": "mit", "hash": 6349065084198035000, "line_mean": 30.2727272727, "line_max": 122, "alpha_frac": 0.5240863787, "autogenerated": false, "ratio": 2.693512304250559, "config_test": false, ...
__author__ = 'Eli Sobylak' # import necessary ISBN library to look up on WoldCat.org and Google Books import isbnlib # create variable that takes in ISBN from user isbnInput = raw_input('Please enter an ISBN number (w/o dashes) to check: ') def valid(): # create ten variables to store each number in the ISBN and...
{ "repo_name": "elisobylak/Toolbelt", "path": "isbnInfo.py", "copies": "2", "size": "1979", "license": "mit", "hash": -2783353345247273000, "line_mean": 39.387755102, "line_max": 91, "alpha_frac": 0.6579080344, "autogenerated": false, "ratio": 3.303839732888147, "config_test": false, "has_no_k...
__author__ = 'Elliot' from subprocess import call from platform import system def clear_screen(): if system() == "Windows": call("cls") elif system() == "Darwin" or system() == "Linux": call("clear") # Sets up a multi platform clear screen function for Windows, OS X and Linux def installsamba...
{ "repo_name": "elliot-labs/Ubuntu-Server-Setup-Automation", "path": "Auto Setup.py", "copies": "1", "size": "5716", "license": "unlicense", "hash": 5622999230737364000, "line_mean": 37.1066666667, "line_max": 308, "alpha_frac": 0.6371588523, "autogenerated": false, "ratio": 3.5525170913610937, ...
import os import sys import unicodedata import string import urllib import urllib2 # From: http://glowingpython.blogspot.com/2012/11/text-to-speech-with-correct-intonation.html def parseText(text): #returns a list of sentences with less than 100 caracters toSay = [] punct = [',',':',';','.','?','!'] # pun...
{ "repo_name": "ewdicus/gt_say", "path": "gt_say.py", "copies": "1", "size": "4218", "license": "mit", "hash": 7807089940776925000, "line_mean": 38.4205607477, "line_max": 100, "alpha_frac": 0.6514935989, "autogenerated": false, "ratio": 3.70324846356453, "config_test": false, "has_no_keywords...
__author__ = 'elmas' import json import socket ######################################################################## class json_socket: def __init__(self, addr, socket = None): self.addr = addr self.socket = socket print("Initializing socket with address: ", addr) def send_object(...
{ "repo_name": "mdsalman729/flexpret_project", "path": "emulator/concurrit-poplsyntax/concurrit-poplsyntax/python/jsonservice.py", "copies": "1", "size": "3800", "license": "bsd-3-clause", "hash": -8777873591916433000, "line_mean": 24.1721854305, "line_max": 99, "alpha_frac": 0.5063157895, "autogene...
__author__ = 'Elmira' class MemberHelper: def __init__(self, app): self.app = app def add_new_user(self, member): # add new user wd = self.app.wd wd.find_element_by_link_text("add new").click() wd.find_element_by_name("firstname").click() wd.find_element_by_...
{ "repo_name": "popovsn777/new_training", "path": "fixture/new_member.py", "copies": "1", "size": "3658", "license": "apache-2.0", "hash": -6749233280494154000, "line_mean": 45.3164556962, "line_max": 118, "alpha_frac": 0.6082558775, "autogenerated": false, "ratio": 3.1753472222222223, "config_t...
__author__ = 'Elmira' 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").click() wd.find_element_b...
{ "repo_name": "popovsn777/new_training", "path": "fixture/session.py", "copies": "1", "size": "1440", "license": "apache-2.0", "hash": 828544267389355600, "line_mean": 28.4081632653, "line_max": 73, "alpha_frac": 0.5666666667, "autogenerated": false, "ratio": 3.325635103926097, "config_test": f...
__author__ = 'Elmira' from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def open_group_page(self): print("DEBUG open_group_page1") wd = self.app.wd wd.find_element_by_link_text("groups").click() print("DEBUG open_group_page 2") ...
{ "repo_name": "popovsn777/new_training", "path": "fixture/group.py", "copies": "1", "size": "2812", "license": "apache-2.0", "hash": -9007056299105945000, "line_mean": 29.5652173913, "line_max": 82, "alpha_frac": 0.5800142248, "autogenerated": false, "ratio": 3.5505050505050506, "config_test": ...
__author__ = 'elsabakiu, asmita, megha,kajal' from crowdsourcing import models from rest_framework import serializers from crowdsourcing.serializers.dynamic import DynamicFieldsModelSerializer from crowdsourcing.serializers.template import TemplateItemSerializer from rest_framework.exceptions import ValidationError fr...
{ "repo_name": "saviaga/crowdsource-platform", "path": "crowdsourcing/serializers/task.py", "copies": "1", "size": "3959", "license": "mit", "hash": 2909167283770057700, "line_mean": 40.6842105263, "line_max": 116, "alpha_frac": 0.6736549634, "autogenerated": false, "ratio": 4.1805702217529035, ...
__author__ = 'elsabakiu, asmita, megha,kajal' from crowdsourcing import models from rest_framework import serializers from crowdsourcing.serializers.worker import TaskWorkerSerializer class TaskSerializer(serializers.ModelSerializer): task_workers = TaskWorkerSerializer(many=True, read_only=True) def create(...
{ "repo_name": "ryosuzuki/crowdsource-platform", "path": "crowdsourcing/serializers/task.py", "copies": "2", "size": "1182", "license": "mit", "hash": 4501726788277235700, "line_mean": 32.8, "line_max": 108, "alpha_frac": 0.6734348562, "autogenerated": false, "ratio": 4.0479452054794525, "config...
__author__ = 'elsabakiu, dmorina, asmita, megha,kajal' from crowdsourcing.serializers.task import * from rest_framework import status, viewsets from rest_framework.response import Response from rest_framework.decorators import detail_route, list_route from crowdsourcing.models import Worker,TaskWorker,Module from djan...
{ "repo_name": "ryosuzuki/crowdsource-platform", "path": "crowdsourcing/viewsets/task.py", "copies": "2", "size": "1698", "license": "mit", "hash": -6009392962429661000, "line_mean": 37.6136363636, "line_max": 83, "alpha_frac": 0.7473498233, "autogenerated": false, "ratio": 3.7901785714285716, "...
__author__ = 'elsabakiu, dmorina, neilthemathguy, megha, asmita' from crowdsourcing import models from rest_framework import serializers from crowdsourcing.serializers.template import TemplateItemSerializer from crowdsourcing.serializers.dynamic import DynamicFieldsModelSerializer from rest_framework.exceptions import...
{ "repo_name": "ryosuzuki/crowdsource-platform", "path": "crowdsourcing/serializers/worker.py", "copies": "2", "size": "8045", "license": "mit", "hash": 3688710145697652000, "line_mean": 42.4864864865, "line_max": 170, "alpha_frac": 0.6616532007, "autogenerated": false, "ratio": 4.028542814221332,...
__author__ = ['elsabakiu', 'dmorina', 'neilthemathguy', 'megha'] from crowdsourcing import models from datetime import datetime from rest_framework import serializers import json class WorkerSerializer(serializers.ModelSerializer): class Meta: model = models.Worker class SkillSerializer(seriali...
{ "repo_name": "asmitagupta/crowdsource-platform", "path": "crowdsourcing/serializers/worker.py", "copies": "1", "size": "1872", "license": "mit", "hash": 9176719287234818000, "line_mean": 31.8421052632, "line_max": 100, "alpha_frac": 0.6704059829, "autogenerated": false, "ratio": 4.16, "config_...
__author__ = ['elsabakiu', 'dmorina', 'neilthemathguy', 'megha'] from crowdsourcing import models from rest_framework import serializers class WorkerSerializer(serializers.ModelSerializer): class Meta: model = models.Worker fields = ('profile') read_only_fields = ('profile') class SkillS...
{ "repo_name": "ramcn/demo3", "path": "crowdsourcing/serializers/worker.py", "copies": "3", "size": "1739", "license": "mit", "hash": -2520348897612815000, "line_mean": 37.6666666667, "line_max": 100, "alpha_frac": 0.6762507188, "autogenerated": false, "ratio": 4.053613053613054, "config_test": ...
__author__ = 'elsabakiu, neilthemathguy, dmorina' from rest_framework import status, viewsets from rest_framework.response import Response from crowdsourcing.serializers.project import * from rest_framework.decorators import detail_route, list_route from crowdsourcing.models import Module, Category, Project, Requeste...
{ "repo_name": "jayaneetha/crowdsource-platform", "path": "crowdsourcing/viewsets/project.py", "copies": "6", "size": "3744", "license": "mit", "hash": 6580533223625874000, "line_mean": 40.1538461538, "line_max": 126, "alpha_frac": 0.6947115385, "autogenerated": false, "ratio": 4.451843043995244, ...
__author__ = 'elubin' from collections import defaultdict import logging import re class ProcessManager(object): def __init__(self, vm_socket): self.vm_socket = vm_socket def get_pids(self): agent_pid = self.vm_socket.get_pid() ps_output = self.vm_socket.get_ps() # now filter ...
{ "repo_name": "ecbtln/vm2docker", "path": "chief/ps.py", "copies": "1", "size": "2125", "license": "mit", "hash": -4040395348322825700, "line_mean": 29.8115942029, "line_max": 95, "alpha_frac": 0.5298823529, "autogenerated": false, "ratio": 3.5416666666666665, "config_test": false, "has_no_ke...
__author__ = 'elubin' from constants.agent import EXIT_CMD, GET_DEPS_CMD, GET_FS_CMD, GET_INSTALLED_CMD, GET_BOUND_SOCKETS_CMD, GET_PID_CMD, GET_PROC_CMD, GET_PS_CMD class RPCCommand(object): """ Each subclass will be responsible for handling the behavior of a given RPC command """ COMMAND = None ...
{ "repo_name": "ecbtln/vm2docker", "path": "chief/agent_rpc/rpc.py", "copies": "1", "size": "2903", "license": "mit", "hash": -215977325277735740, "line_mean": 28.3333333333, "line_max": 143, "alpha_frac": 0.637616259, "autogenerated": false, "ratio": 3.922972972972973, "config_test": false, "...
__author__ = 'elubin' from networkx import DiGraph from networkx.algorithms.components.strongly_connected import strongly_connected_component_subgraphs import logging def filter_non_dependencies(nodes, get_deps_func): node_set = set(nodes) G = DiGraph() G.add_nodes_from(nodes) # process the edges bas...
{ "repo_name": "ecbtln/vm2docker", "path": "chief/packagemanager/dependencygraph.py", "copies": "1", "size": "1236", "license": "mit", "hash": 3215502442287721000, "line_mean": 31.5263157895, "line_max": 105, "alpha_frac": 0.6343042071, "autogenerated": false, "ratio": 3.6676557863501484, "confi...
__author__ = 'elubin' import os import glob import logging import subprocess import tempfile import tarfile import re from packagemanager.packagemanager import MultiRootPackageManager from dockerfile import DiffBasedDockerBuild, DockerBuild, DockerFile #from include import RESULTS_LOGGER from utils.utils import rm_rf, ...
{ "repo_name": "ecbtln/vm2docker", "path": "chief/filesystem.py", "copies": "1", "size": "9226", "license": "mit", "hash": 7017838956776410000, "line_mean": 42.3192488263, "line_max": 165, "alpha_frac": 0.593973553, "autogenerated": false, "ratio": 3.788911704312115, "config_test": false, "has...
__author__ = 'elubin' import os import re import shutil import importlib import tarfile import logging def class_for_name(module_name, class_name): # load the module, will raise ImportError if module cannot be loaded m = importlib.import_module(module_name) # get the class, will raise AttributeError if cla...
{ "repo_name": "ecbtln/vm2docker", "path": "chief/utils/utils.py", "copies": "1", "size": "2381", "license": "mit", "hash": 997460096219682200, "line_mean": 27.3452380952, "line_max": 78, "alpha_frac": 0.6232675346, "autogenerated": false, "ratio": 3.663076923076923, "config_test": false, "has...
__author__ = 'elubin' import tempfile import os import logging import json import re import tarfile import subprocess import shutil from include import RESULTS_LOGGER from utils.utils import rm_rf class DockerFile(object): def __init__(self, repo, tag=None): self.repo = repo self.tag = tag ...
{ "repo_name": "ecbtln/vm2docker", "path": "chief/dockerfile.py", "copies": "1", "size": "6475", "license": "mit", "hash": -8607902248414492000, "line_mean": 32.0357142857, "line_max": 140, "alpha_frac": 0.5881081081, "autogenerated": false, "ratio": 3.4718498659517425, "config_test": false, "...
__author__ = 'elubin' import abc import logging import subprocess import tempfile import os from utils.utils import rm_rf, list_all_files_and_folders, generate_regexp from include import RESULTS_LOGGER class FilesystemDiffTool(object): __metaclass__ = abc.ABCMeta def __enter__(self): return self ...
{ "repo_name": "ecbtln/vm2docker", "path": "chief/diff.py", "copies": "1", "size": "5864", "license": "mit", "hash": -5845511480337303000, "line_mean": 42.1176470588, "line_max": 190, "alpha_frac": 0.6493860846, "autogenerated": false, "ratio": 3.595340282035561, "config_test": false, "has_no_...
__author__ = 'elubin' import abc import logging from utils.utils import generate_regexp, rm_rf from dependencygraph import filter_non_dependencies from dockerfile import DockerBuild, DockerFile import constants.agent class PackageManager(object): __metaclass__ = abc.ABCMeta PACKAGE_BLACKLIST = None PACK...
{ "repo_name": "ecbtln/vm2docker", "path": "chief/packagemanager/packagemanager.py", "copies": "1", "size": "8527", "license": "mit", "hash": 274203695886528320, "line_mean": 33.108, "line_max": 138, "alpha_frac": 0.6299988273, "autogenerated": false, "ratio": 3.385073441842001, "config_test": f...
__author__ = 'elubin' import logging import socket from rpc import ExitCommand, RPCCommand from constants.agent import SEND_FILE_HEADER_FMT, DEFAULT_AGENT_PORT from utils.utils import inheritors from utils.ringbuffer import ringbuffer import re import tempfile import os class CommunicationLayer(object): """ ...
{ "repo_name": "ecbtln/vm2docker", "path": "chief/agent_rpc/com_layer.py", "copies": "1", "size": "4276", "license": "mit", "hash": -4183227149329881000, "line_mean": 32.9365079365, "line_max": 118, "alpha_frac": 0.6138914874, "autogenerated": false, "ratio": 4.188050930460333, "config_test": fa...
__author__ = 'e.lyzlov' from fixture.session import SessionHelper from fixture.movie import MovieHelper #from fixture.waiter import WaitHelper from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support.expected_conditions import * class Applica...
{ "repo_name": "Dananas732/php4dvd_lyzlov", "path": "fixture/application.py", "copies": "1", "size": "1224", "license": "apache-2.0", "hash": -4772987031093162000, "line_mean": 31.2368421053, "line_max": 103, "alpha_frac": 0.6429738562, "autogenerated": false, "ratio": 3.558139534883721, "config...
__author__ = 'e.lyzlov' from model.address import add_address from model.group import Group import random def check_for_address(app): if app.address.count() == 0: app.address.create(add_address(firstname="111", middlename="222", lastname="333", nickname="444", title="555", compan...
{ "repo_name": "Dananas732/python", "path": "test/test_add_contact_in_group.py", "copies": "1", "size": "1587", "license": "apache-2.0", "hash": -7475595726057777000, "line_mean": 33.5217391304, "line_max": 125, "alpha_frac": 0.6742281033, "autogenerated": false, "ratio": 1.8937947494033414, "co...
__author__ = 'e.lyzlov' from model.address import add_address from selenium.webdriver.support.select import Select class AddressHelper: def __init__(self, app): self.app = app def create(self, add_address): wd = self.app.wd self.app.open_home_page() wd.find_element_by_link_te...
{ "repo_name": "Dananas732/python", "path": "fixture/address.py", "copies": "1", "size": "7958", "license": "apache-2.0", "hash": 5492429008600784000, "line_mean": 43.9604519774, "line_max": 149, "alpha_frac": 0.6112088464, "autogenerated": false, "ratio": 3.4272179155900084, "config_test": fals...
__author__ = 'e.lyzlov' from model.address import add_address import random import string import os.path import jsonpickle import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of contacts", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n = 5 f = "...
{ "repo_name": "Dananas732/python", "path": "generator/g_contact.py", "copies": "1", "size": "1541", "license": "apache-2.0", "hash": -4695177908236371000, "line_mean": 34.8604651163, "line_max": 177, "alpha_frac": 0.6534717716, "autogenerated": false, "ratio": 3.4168514412416853, "config_test":...
__author__ = 'e.lyzlov' from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def open_groups_page(self): wd = self.app.wd if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0): wd.find_element_by_lin...
{ "repo_name": "Dananas732/python", "path": "fixture/group.py", "copies": "1", "size": "3688", "license": "apache-2.0", "hash": 2451406073887736000, "line_mean": 33.1481481481, "line_max": 100, "alpha_frac": 0.5886659436, "autogenerated": false, "ratio": 3.3711151736745886, "config_test": false,...
__author__ = 'e.lyzlov' from pony.orm import * from datetime import datetime from model.group import Group from model.address import add_address from pymysql.converters import decoders class ORMFixture: db = Database() class ORMGroup(db.Entity): _table_ = 'group_list' id = PrimaryKey(int, col...
{ "repo_name": "Dananas732/python", "path": "fixture/orm.py", "copies": "1", "size": "3191", "license": "apache-2.0", "hash": -240106391329621380, "line_mean": 43.9436619718, "line_max": 131, "alpha_frac": 0.6565340019, "autogenerated": false, "ratio": 3.803337306317044, "config_test": false, ...
__author__ = 'e.lyzlov' from random import randrange from model.address import add_address import re def check_for_address(app): if app.address.count() == 0: app.address.create(add_address(firstname="111", middlename="222", lastname="333", nickname="444", title="555", company="666...
{ "repo_name": "Dananas732/python", "path": "test/test_phones.py", "copies": "1", "size": "1858", "license": "apache-2.0", "hash": -7017759557174140000, "line_mean": 49.2432432432, "line_max": 135, "alpha_frac": 0.6453175457, "autogenerated": false, "ratio": 3.472897196261682, "config_test": fal...
__author__ = 'e.lyzlov' from selenium.webdriver.common.keys import Keys class MovieHelper: def __init__(self, app): self.app = app def add_movie(self, film): wd = self.app.wd self.app.open_add_movie_page() wd.find_element_by_name("name").clear() wd.find_element_by_n...
{ "repo_name": "Dananas732/php4dvd_lyzlov", "path": "fixture/movie.py", "copies": "1", "size": "2365", "license": "apache-2.0", "hash": 6091887612856328000, "line_mean": 36.5555555556, "line_max": 113, "alpha_frac": 0.5835095137, "autogenerated": false, "ratio": 3.1241743725231177, "config_test"...
__author__ = 'e.lyzlov' from sys import maxsize class add_address: def __init__(self, id=None, firstname=None, middlename=None, lastname=None, all_phones_from_nome_page=None, nickname=None, title=None, company=None, address=None, homephone=None, mobilephone=None, ...
{ "repo_name": "Dananas732/python", "path": "model/address.py", "copies": "1", "size": "1455", "license": "apache-2.0", "hash": -8616341148200910000, "line_mean": 37.3157894737, "line_max": 149, "alpha_frac": 0.612371134, "autogenerated": false, "ratio": 3.75, "config_test": false, "has_no_key...
__author__ = 'e.lyzlov' import mysql.connector from model.group import Group from model.address import add_address class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection = ...
{ "repo_name": "Dananas732/python", "path": "fixture/db.py", "copies": "1", "size": "1403", "license": "apache-2.0", "hash": 5629826951884092000, "line_mean": 32.4285714286, "line_max": 116, "alpha_frac": 0.5923022096, "autogenerated": false, "ratio": 4.114369501466276, "config_test": false, "...
__author__ = 'e.lyzlov' 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": "Dananas732/python", "path": "fixture/session.py", "copies": "1", "size": "1458", "license": "apache-2.0", "hash": -857701536100072100, "line_mean": 29.375, "line_max": 82, "alpha_frac": 0.5624142661, "autogenerated": false, "ratio": 3.328767123287671, "config_test": false, "has...
__author__ = 'e.lyzlov' from model.address import add_address import re def check_for_address(app): if app.address.count() == 0: app.address.create(add_address(firstname="111", middlename="222", lastname="333", nickname="444", title="555", company="666", address="777", ...
{ "repo_name": "Dananas732/python", "path": "test/test_all_contacts_data.py", "copies": "1", "size": "1584", "license": "apache-2.0", "hash": -8778346887458897000, "line_mean": 40.7105263158, "line_max": 135, "alpha_frac": 0.5738636364, "autogenerated": false, "ratio": 3.7358490566037736, "confi...
__author__ = 'e.lyzlov' from selenium import webdriver from fixture.session import SessionHelper from fixture.group import GroupHelper from fixture.address import AddressHelper class Application: def __init__(self, browser, base_url): if browser == "firefox": self.wd = webdriver.Firefox() ...
{ "repo_name": "Dananas732/python", "path": "fixture/application.py", "copies": "1", "size": "1148", "license": "apache-2.0", "hash": -8273820427829979000, "line_mean": 26.3333333333, "line_max": 149, "alpha_frac": 0.5940766551, "autogenerated": false, "ratio": 3.9450171821305844, "config_test":...
__author__ = 'e.lyzlov' ''' from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.wait import WebDriverWait class WaitHelper: def __init__(self, app, driver): wd = self.app.wd self.app = app self.wait = WebDriverWait(wd, 30) def wait(self): self.wait...
{ "repo_name": "Dananas732/php4dvd_lyzlov", "path": "fixture/waiter.py", "copies": "1", "size": "1117", "license": "apache-2.0", "hash": -3137200265098053000, "line_mean": 26.2682926829, "line_max": 112, "alpha_frac": 0.5487914056, "autogenerated": false, "ratio": 3.546031746031746, "config_test...
__author__ = 'emalishenko' from fixture.contact import Contact from random import randrange import re def test_name_on_homepage(app): if app.contact.count() == 0: app.contact.create(Contact(firstname = "First Name", middlename = "Middle Name", lastname = "Last Name", nic...
{ "repo_name": "emalishenko/python_training", "path": "test/test_contact_names.py", "copies": "1", "size": "1075", "license": "apache-2.0", "hash": 340180361731825, "line_mean": 38.8148148148, "line_max": 112, "alpha_frac": 0.6586046512, "autogenerated": false, "ratio": 3.5953177257525084, "conf...
__author__ = 'emalishenko' from model.contact import Contact from random import randrange def test_modify_contact_first_name(app): contact = Contact(firstname = "First Name Update") if app.contact.count() == 0: app.contact.create(Contact(firstname = "To be modified", middlename = "To be modified", las...
{ "repo_name": "emalishenko/python_training", "path": "test/test_contact_modify.py", "copies": "1", "size": "2265", "license": "apache-2.0", "hash": 6584902986290702000, "line_mean": 48.2391304348, "line_max": 155, "alpha_frac": 0.6750551876, "autogenerated": false, "ratio": 3.240343347639485, "...
__author__ = 'emalishenko' from model.contact import Contact import re class ContactHelper: def __init__(self, app): self.app = app def create(self, contact): wd = self.app.wd # init contact creation wd.find_element_by_link_text("add new").click() self.fill_contact_fo...
{ "repo_name": "emalishenko/python_training", "path": "fixture/contact.py", "copies": "1", "size": "6616", "license": "apache-2.0", "hash": 7929312497288823000, "line_mean": 41.6838709677, "line_max": 147, "alpha_frac": 0.6005139057, "autogenerated": false, "ratio": 3.601524224278715, "config_te...
__author__ = 'emalishenko' from model.group import Group from random import randrange def test_modify_group_name(app): group = Group(name="To be modified") if app.group.count() == 0: app.group.create(Group(name="New group name")) old_groups = app.group.get_group_list() index = randrange(len(ol...
{ "repo_name": "emalishenko/python_training", "path": "test/test_group_modify.py", "copies": "1", "size": "1315", "license": "apache-2.0", "hash": -279948834611365470, "line_mean": 38.8787878788, "line_max": 97, "alpha_frac": 0.655513308, "autogenerated": false, "ratio": 3.002283105022831, "conf...
__author__ = 'emalishenko' from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def open_groups_page(self): wd = self.app.wd if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0): wd.find_element_by...
{ "repo_name": "emalishenko/python_training", "path": "fixture/group.py", "copies": "1", "size": "3181", "license": "apache-2.0", "hash": 6707447291044027000, "line_mean": 32.8404255319, "line_max": 100, "alpha_frac": 0.5932096825, "autogenerated": false, "ratio": 3.446370530877573, "config_test...
__author__ = 'emalishenko' from sys import maxsize class Contact: def __init__(self, firstname = None, middlename = None, lastname = None, id = None, nick = None, title = None, company = None, address = None, all_phones_from_homepage = None, homephone = None, mobilephone = None,...
{ "repo_name": "emalishenko/python_training", "path": "model/contact.py", "copies": "1", "size": "1620", "license": "apache-2.0", "hash": 5025229820683347000, "line_mean": 34.2173913043, "line_max": 117, "alpha_frac": 0.5833333333, "autogenerated": false, "ratio": 3.9130434782608696, "config_tes...
__author__ = 'emalishenko' import re def test_phones_on_home_page(app): contact_from_homepage = app.contact.get_contact_list()[0] contact_from_editpage = app.contact.get_contact_info_from_edit_page(0) all_phones_from_editpage = [contact_from_editpage.homephone, contact_from_editpage.mobilephone, ...
{ "repo_name": "emalishenko/python_training", "path": "test/test_contact_phones.py", "copies": "1", "size": "1520", "license": "apache-2.0", "hash": 2127509538764673500, "line_mean": 46.5, "line_max": 107, "alpha_frac": 0.6605263158, "autogenerated": false, "ratio": 3.326039387308534, "config_te...
__author__ = 'emalishenko' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_homepage() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find_eleme...
{ "repo_name": "emalishenko/python_training", "path": "fixture/session.py", "copies": "1", "size": "1429", "license": "apache-2.0", "hash": -8222051096013904000, "line_mean": 28.7916666667, "line_max": 73, "alpha_frac": 0.5675297411, "autogenerated": false, "ratio": 3.3782505910165486, "config_t...
__author__ = 'emalishenko' from fixture.contact import Contact from random import randrange import re def test_name_on_homepage(app): if app.contact.count() == 0: app.contact.create(Contact(firstname = "First Name", middlename = "Middle Name", lastname = "Last Name", ni...
{ "repo_name": "emalishenko/python_training", "path": "test/test_contact_emails.py", "copies": "1", "size": "1050", "license": "apache-2.0", "hash": -2691937216017345000, "line_mean": 44.6956521739, "line_max": 121, "alpha_frac": 0.6580952381, "autogenerated": false, "ratio": 3.420195439739414, ...
import machine, ugfx, utime as time wait_for_interrupt = True button_pushed = '' def notice(text, title="SHA2017", close_text="Close", width = 296, height = 128, font="Roboto_Regular12"): """Show a notice which can be closed with button A. The caller is responsible for flushing the display after the user has conf...
{ "repo_name": "SHA2017-badge/micropython-esp32", "path": "esp32/modules/dialogs.py", "copies": "1", "size": "9772", "license": "mit", "hash": 1716423285586186000, "line_mean": 31.6822742475, "line_max": 172, "alpha_frac": 0.7006753991, "autogenerated": false, "ratio": 2.8316430020283976, "confi...
import usocket import ujson import os import time import gc """Usage from http_client import * print(get("http://example.com").raise_for_status().content) post("http://mydomain.co.uk/api/post", urlencoded="SOMETHING").raise_for_status().close() # If response is not consumed you need to close manually # Or, if you pr...
{ "repo_name": "emfcamp/micropython", "path": "stmhal/init-files/lib/http_client.py", "copies": "1", "size": "6250", "license": "mit", "hash": -8200724167162095000, "line_mean": 25.8240343348, "line_max": 146, "alpha_frac": 0.65904, "autogenerated": false, "ratio": 3.044325377496347, "config_tes...
import os import json class Database: """A simple key/value store backed by a json file Keys need to be convertable to str Values can be anything json can store, including a dict Usage: from database import Database with Database() as db: print(db.get("hello", "default")) db....
{ "repo_name": "SHA2017-badge/micropython-esp32", "path": "esp32/modules/database.py", "copies": "1", "size": "2274", "license": "mit", "hash": -2862051718090451500, "line_mean": 26.3975903614, "line_max": 88, "alpha_frac": 0.5694810906, "autogenerated": false, "ratio": 3.9755244755244754, "conf...
import pyb, onboard CONFIG = { "JOY_UP": pyb.Pin.PULL_DOWN, "JOY_DOWN": pyb.Pin.PULL_DOWN, "JOY_RIGHT": pyb.Pin.PULL_DOWN, "JOY_LEFT": pyb.Pin.PULL_DOWN, "JOY_CENTER": pyb.Pin.PULL_DOWN, "BTN_MENU": pyb.Pin.PULL_UP, "BTN_A": pyb.Pin.PULL_UP, "BTN_B": pyb.Pin.PULL_UP } _tilda_pins = {} _tilda_interrupts = {} ...
{ "repo_name": "emfcamp/micropython", "path": "stmhal/init-files/lib/buttons.py", "copies": "1", "size": "3350", "license": "mit", "hash": 2989035389650745000, "line_mean": 26.2357723577, "line_max": 93, "alpha_frac": 0.7095522388, "autogenerated": false, "ratio": 2.8127623845507976, "config_tes...
import network import os import json import pyb import dialogs _nic = None def nic(): global _nic if not _nic: _nic = network.CC3100() return _nic def connection_details(): data = None try: if "wifi.json" in os.listdir(): with open("wifi.json") as f: data = json.loads(f.read()) ...
{ "repo_name": "emfcamp/micropython", "path": "stmhal/init-files/lib/wifi.py", "copies": "1", "size": "4696", "license": "mit", "hash": -5625929109888603000, "line_mean": 29.8947368421, "line_max": 142, "alpha_frac": 0.5119250426, "autogenerated": false, "ratio": 4.15575221238938, "config_test":...
import ugfx import buttons import pyb default_style_badge = ugfx.Style() default_style_badge.set_focus(ugfx.RED) default_style_badge.set_enabled([ugfx.WHITE, ugfx.html_color(0x3C0246), ugfx.GREY, ugfx.RED]) default_style_badge.set_background(ugfx.html_color(0x3C0246)) default_style_dialog = ugfx.Style() default_styl...
{ "repo_name": "emfcamp/micropython", "path": "stmhal/init-files/lib/dialogs.py", "copies": "1", "size": "7031", "license": "mit", "hash": 1651831980449185800, "line_mean": 33.1310679612, "line_max": 162, "alpha_frac": 0.6922201678, "autogenerated": false, "ratio": 2.696969696969697, "config_tes...
__author__ = 'Emilio' import sys, datetime from Gestor import Gestor def menu(): gestor = Gestor() date = datetime.datetime.now() print(date) print('\t1. Mostrar Aplicaciones Gratuitas ') print('\t2. Mostrar Aplicaciones de Pago') print('\t3. Añadir app') print('\t4. Sumar una descarga')...
{ "repo_name": "emilioriosvz/EmilioRiosExamen", "path": "peachestore/Main.py", "copies": "1", "size": "2090", "license": "apache-2.0", "hash": -5449385375871920000, "line_mean": 25.2784810127, "line_max": 95, "alpha_frac": 0.5650289017, "autogenerated": false, "ratio": 3.2037037037037037, "confi...
#---------------------------------------------------------------------------- # Export houdini instance point info to a .csv table #---------------------------------------------------------------------------- import hou def exportInstToCsv(current): path_geo = current.parm('points_inst').eval() path_csv = cu...
{ "repo_name": "FantomeInteractive/houdini_tools", "path": "scripts/python/inst_to_csv.py", "copies": "1", "size": "1402", "license": "mit", "hash": 8951977511751040000, "line_mean": 28.2083333333, "line_max": 77, "alpha_frac": 0.4151212553, "autogenerated": false, "ratio": 3.505, "config_test":...
from django.db import models # Local module import gcsConstants class Image(models.Model): title = models.CharField(max_length=gcsConstants.MAX_MISC_STR_LENGTH) # Who added the image author = models.CharField(max_length=gcsConstants.MAX_MISC_STR_LENGTH) # Could be a local path or a url # Intentionally av...
{ "repo_name": "odeke-em/restAssured", "path": "gcs/models.py", "copies": "1", "size": "4344", "license": "mit", "hash": 8131559314103941000, "line_mean": 31.9090909091, "line_max": 100, "alpha_frac": 0.7479281768, "autogenerated": false, "ratio": 3.4124116260801256, "config_test": false, "has...
from django.db import models # Local module import theBearConstants class Artist(models.Model): name = models.CharField(max_length=theBearConstants.MAX_MISC_STR_LENGTH) uri = models.CharField(max_length=theBearConstants.MAX_MISC_STR_LENGTH, blank=True) extraInfo = models.CharField(max_length=theBearCons...
{ "repo_name": "odeke-em/restAssured", "path": "thebear/models.py", "copies": "1", "size": "1291", "license": "mit", "hash": -3180323725291808000, "line_mean": 36.9705882353, "line_max": 93, "alpha_frac": 0.7273431448, "autogenerated": false, "ratio": 3.388451443569554, "config_test": false, "...
from django.db import models # Local module import uploaderConstants class Blob(models.Model): title = models.CharField(max_length=uploaderConstants.MAX_MISC_STR_LENGTH) author = models.CharField(max_length=uploaderConstants.MAX_MISC_STR_LENGTH) # Could be a local path or a url # Intentionally avoiding Djan...
{ "repo_name": "odeke-em/restAssured", "path": "uploader/models.py", "copies": "1", "size": "1455", "license": "mit", "hash": 8449690729474625000, "line_mean": 43.0909090909, "line_max": 112, "alpha_frac": 0.7683848797, "autogenerated": false, "ratio": 3.523002421307506, "config_test": false, ...
# This project's content links up with the file system and hence the only method that will use # crudAPI will be 'GET'. The rest will involve some heavy lifting with physical files from django.template import RequestContext from django.shortcuts import render_to_response from django.views.decorators.csrf import csrf_...
{ "repo_name": "odeke-em/restAssured", "path": "uploader/views.py", "copies": "1", "size": "5561", "license": "mit", "hash": -8435212414887775000, "line_mean": 37.8881118881, "line_max": 94, "alpha_frac": 0.5912605646, "autogenerated": false, "ratio": 4.716709075487701, "config_test": false, "...
import json import hmac import hashlib from django.http import HttpResponse import django.contrib.auth as djangoAuth from django.core.context_processors import csrf from django.shortcuts import render_to_response from django.views.decorators.csrf import ( csrf_exempt, csrf_protect, ensure_csrf_cookie ) # Set...
{ "repo_name": "odeke-em/restAssured", "path": "auth/views.py", "copies": "1", "size": "11428", "license": "mit", "hash": 8921836835273593000, "line_mean": 32.6117647059, "line_max": 114, "alpha_frac": 0.6729961498, "autogenerated": false, "ratio": 4.151107882310207, "config_test": false, "has...
import sys import time import uuid import random import hashlib from django.db import models import django.contrib.auth as djangoAuth # Local module import authConstants generateUUID = uuid.uuid4 class App(models.Model): meta = models.CharField(max_length=authConstants.MAX_META_LENGTH) name = models.CharFie...
{ "repo_name": "odeke-em/restAssured", "path": "auth/models.py", "copies": "1", "size": "1523", "license": "mit", "hash": 243295617817050050, "line_mean": 33.6136363636, "line_max": 141, "alpha_frac": 0.7209455023, "autogenerated": false, "ratio": 3.6348448687350836, "config_test": false, "has...
__author__ = 'emorway' import numpy as np from ..pakbase import Package from ..utils import Util2d, Util3d, Transient2d class Mt3dUzt(Package): """ MT3D-USGS Unsaturated-Zone Transport package class Parameters ---------- model : model object The model object (of type :class:`flopy.m...
{ "repo_name": "brclark-usgs/flopy", "path": "flopy/mt3d/mtuzt.py", "copies": "2", "size": "28583", "license": "bsd-3-clause", "hash": 5076024531231332000, "line_mean": 41.0957290133, "line_max": 82, "alpha_frac": 0.5044956792, "autogenerated": false, "ratio": 4.018416982988893, "config_test": f...
__author__ = 'emorway' import sys import numpy as np from ..pakbase import Package from ..utils import Util2d, Util3d, read1d, MfList class Mt3dCts(Package): """ MT3D-USGS Contaminant Treatment System package class Parameters ---------- model : model object The model object (of type :class...
{ "repo_name": "bdestombe/flopy-1", "path": "flopy/mt3d/mtcts.py", "copies": "2", "size": "12351", "license": "bsd-3-clause", "hash": 5448712073214507000, "line_mean": 36.8865030675, "line_max": 81, "alpha_frac": 0.5683750304, "autogenerated": false, "ratio": 3.920952380952381, "config_test": fa...
__author__ = 'emorway' import sys import numpy as np from ..pakbase import Package from ..utils import Util2d, MfList class Mt3dSft(Package): """ MT3D-USGS StreamFlow Transport package class Parameters ---------- model : model object The model object (of type :class:`flopy.mt3dms.mt.Mt3...
{ "repo_name": "bdestombe/flopy-1", "path": "flopy/mt3d/mtsft.py", "copies": "2", "size": "26217", "license": "bsd-3-clause", "hash": -6704687982512465000, "line_mean": 39.2101226994, "line_max": 109, "alpha_frac": 0.5551741237, "autogenerated": false, "ratio": 3.9194199431903125, "config_test":...
__author__ = 'emorway' import sys import numpy as np from ..pakbase import Package from ..utils import Util2d, read1d, MfList class Mt3dLkt(Package): """ MT3D-USGS LaKe Transport package class Parameters ---------- model : model object The model object (of type :class:`flopy.mt3dms.mt.M...
{ "repo_name": "brclark-usgs/flopy", "path": "flopy/mt3d/mtlkt.py", "copies": "2", "size": "15983", "license": "bsd-3-clause", "hash": -753751692048062100, "line_mean": 35.9122401848, "line_max": 92, "alpha_frac": 0.5428267534, "autogenerated": false, "ratio": 4.025944584382872, "config_test": f...
__author__ = 'emrecelikten' import json import sys import codecs def load_hangouts_json(filename): with open(filename) as f: return json.load(f) def find_user_id(data, person_name): for state in data['conversation_state']: conversation = state['conversation_state']['conversation'] pa...
{ "repo_name": "emrecelikten/hangouts-extractor", "path": "extract.py", "copies": "1", "size": "2575", "license": "mit", "hash": -7008429111263998000, "line_mean": 32.4545454545, "line_max": 104, "alpha_frac": 0.5491262136, "autogenerated": false, "ratio": 4.087301587301587, "config_test": false...
__author__ = 'Emre Celikten' import numpy as np class HMM: """A data structure that contains the necessary information for an HMM, such as transition probabilities, initial state probabilities, and so on.""" def __init__(self, initial_probabilities, transition_probabilities, observation_probabilities): ...
{ "repo_name": "emrecelikten/hmm-visualization", "path": "hmm.py", "copies": "2", "size": "3518", "license": "mit", "hash": -1376578903547821800, "line_mean": 41.3855421687, "line_max": 113, "alpha_frac": 0.6523592951, "autogenerated": false, "ratio": 4.011402508551882, "config_test": false, "...
__author__ = 'emre' import os import os.path import pickle import sys import numpy as np import pandas as pd import seaborn as sns from scipy.stats import uniform, multivariate_normal from model import io from model.model import Model from model.utils import log_sum from mongo import get_mongo_database_with_auth d...
{ "repo_name": "mmathioudakis/geotopics", "path": "visualization/feature_contribution.py", "copies": "1", "size": "5778", "license": "mit", "hash": -5433648189311522000, "line_mean": 36.512987013, "line_max": 119, "alpha_frac": 0.6319889216, "autogenerated": false, "ratio": 3.617407639323732, "c...
__author__ = 'emre' import unittest from hmm import * import sklearn.hmm import random def generate_observations(num_classes): size = random.randint(5, 30) observations = np.empty(size).astype(int) for t in xrange(size): observations[t] = random.randint(0, num_classes - 1) return observatio...
{ "repo_name": "emrecelikten/emrecelikten.github.io", "path": "hmm-test.py", "copies": "2", "size": "2009", "license": "mit", "hash": 1991992246736527600, "line_mean": 31.9508196721, "line_max": 115, "alpha_frac": 0.5744151319, "autogenerated": false, "ratio": 3.632911392405063, "config_test": t...
__author__ = 'enaghib' import numpy as np import ephem import NightDataGenerator as DataGen import FBDE import time import DBreadwrite as DB import os import matplotlib.pyplot as plt Site = ephem.Observer() Site.lon = -1.2320792 Site.lat = -0.517781017 Site.elevation = 2650 Site.pressure ...
{ "repo_name": "elahesadatnaghib/feature-based-scheduler", "path": "GrayTraining.py", "copies": "1", "size": "2755", "license": "mit", "hash": -2498337537274520600, "line_mean": 27.6979166667, "line_max": 130, "alpha_frac": 0.6076225045, "autogenerated": false, "ratio": 2.8169734151329244, "conf...