text
stringlengths
0
1.05M
meta
dict
# Enthought library imports. from traits.api import Instance, Enum from traitsui.api import View, Group, Item from tvtk.api import tvtk # Local imports from mayavi.filters.filter_base import FilterBase from mayavi.core.pipeline_info import PipelineInfo ###############################################################...
{ "repo_name": "alexandreleroux/mayavi", "path": "mayavi/filters/extract_vector_components.py", "copies": "3", "size": "2661", "license": "bsd-3-clause", "hash": 2465321701829392000, "line_mean": 35.4520547945, "line_max": 78, "alpha_frac": 0.5129650507, "autogenerated": false, "ratio": 5.12716763...
__author__ = 'Varun Nayyar' __doc__ = \ """ This file is to be modified by users to provide their own Voice Activity Detection (VAD) functions. I.e. not all frames will have speech present and it is common to remove these frames in many situations These functions can be used in most base functions by p...
{ "repo_name": "nayyarv/python_speech_features", "path": "VoiceActivityDetection.py", "copies": "1", "size": "1390", "license": "mit", "hash": -3132795463345365000, "line_mean": 38.7142857143, "line_max": 107, "alpha_frac": 0.7223021583, "autogenerated": false, "ratio": 4.237804878048781, "confi...
__author__ = 'Varun Nayyar' import numpy as np from matplotlib import pyplot as plt def main(): pass def adaptive(): if (i-1)%50 ==0: #Update Step sizes n = i/50 delta_n = min(0.01, 1/np.sqrt(n)) exp_deltan = np.exp(delta_n) #acceptance probabilities meanAccPr...
{ "repo_name": "nayyarv/MonteGMM", "path": "BayesGMM/adaptiveMCMC.py", "copies": "1", "size": "2035", "license": "mit", "hash": -293227597269516740, "line_mean": 23.8292682927, "line_max": 96, "alpha_frac": 0.5695331695, "autogenerated": false, "ratio": 3.6600719424460433, "config_test": false, ...
__author__ = 'Varun Nayyar' import numpy as np from scipy.stats import norm from RobustLikelihoodClass import Likelihood from Utils.MFCCArrayGen import SadCorpus def weightProp2(currWeights): numMixtures = len(currWeights) # print numMixtures tempWeights = np.zeros(numMixtures + 1) tempWeights[1:-1]...
{ "repo_name": "nayyarv/MonteGMM", "path": "BayesGMM/MCMC.py", "copies": "1", "size": "8800", "license": "mit", "hash": -7508575404451181000, "line_mean": 33.9246031746, "line_max": 119, "alpha_frac": 0.6039772727, "autogenerated": false, "ratio": 3.5555555555555554, "config_test": false, "has...
__author__ = 'Varun Nayyar' import numpy as np from sklearn.mixture import GMM from sklearn.metrics import confusion_matrix from Utils.MFCCArrayGen import getCorpus, getIndiviudalData, speakers, getFullCorpus from RobustLikelihoodClass import Likelihood emotions = ["Bored", "Happy", "HotAnger", "Neutral", "Sad"] ...
{ "repo_name": "nayyarv/MonteGMM", "path": "ExamplesComparisons/EMcomparison.py", "copies": "1", "size": "3244", "license": "mit", "hash": -5948687211831064000, "line_mean": 25.5901639344, "line_max": 115, "alpha_frac": 0.6149815043, "autogenerated": false, "ratio": 3.340885684860968, "config_te...
__author__ = 'Varun Nayyar' import numpy as np import os import cPickle emotions = ["Neutral", "Sad", "Bored", "Happy", "HotAnger"] speakers = ["CC1", "CL1", "GG1", "JG1", "MF1", "MK1", "MM1"] ExtractedMFCCs = "../MFCCData" def main(): MFCCFiles = os.listdir(ExtractedMFCCs) try: MFCCFiles.remove(...
{ "repo_name": "nayyarv/MonteGMM", "path": "Utils/MFCCArrayGen.py", "copies": "1", "size": "3987", "license": "mit", "hash": 6625415080792346000, "line_mean": 26.3082191781, "line_max": 94, "alpha_frac": 0.6177577126, "autogenerated": false, "ratio": 3.3252710592160133, "config_test": false, "...
import sys import os from os.path import expanduser #prepare imports #import the etree module from lxml import etree #import om_ch_translate class from the api to use for the fs field names #from foam.api.legacyexpedientapi import om_ch_translate #import some utility functions from flowspaceutils of the legacy optin ...
{ "repo_name": "ict-felix/stack", "path": "ofam/src/src/foam/ethzlegacyoptinstuff/api_exp_to_rspecv3/expdatatogeniv3rspec.py", "copies": "3", "size": "12115", "license": "apache-2.0", "hash": -2788664624668002000, "line_mean": 46.140077821, "line_max": 222, "alpha_frac": 0.7006190673, "autogenerated...
#prepare imports #import the etree module from lxml import etree #import om_ch_translate class from the api to use for the fs field names from foam.api.legacyexpedientapi import om_ch_translate #import some utility functions from flowspaceutils of the legacy optin manager from foam.ethzlegacyoptinstuff.legacyoptin.flo...
{ "repo_name": "dana-i2cat/felix", "path": "optin_manager/src/python/openflow/optin_manager/sfa/tests/to_openflow_rspec.py", "copies": "4", "size": "9823", "license": "apache-2.0", "hash": 2587519944402505000, "line_mean": 46.6844660194, "line_max": 221, "alpha_frac": 0.7127150565, "autogenerated": ...
__author__ = 'Vasiliy Solovey <miltador@yandex.ua>' import collections import os import sys from psutil import virtual_memory PORT = os.environ.get('AP_PORT') HOST = os.environ.get('AP_HOST') HANDSHAKE = os.environ.get('AP_HANDSHAKE') Result = collections.namedtuple('Result', 'id,result,error') # Set of methods tha...
{ "repo_name": "miltador/cheapstream", "path": "mods/python27/android.py", "copies": "1", "size": "1896", "license": "bsd-3-clause", "hash": 21569889269100492, "line_mean": 19.9555555556, "line_max": 64, "alpha_frac": 0.7051961824, "autogenerated": false, "ratio": 3.662135922330097, "config_test...
__author__ = 'Vbabey' import numpy as np def identify(input): X_input =[] #print('Input :'+input) values=str.split(input, ",") #print(values) if(len(values)==5): array=list(map(float, values)) #print(array) X_input.append(array) #print(X_input) ...
{ "repo_name": "vibhatha/digitalocean_6", "path": "scripts/svmalgo.py", "copies": "11", "size": "5316", "license": "mit", "hash": -1782296600301653800, "line_mean": 70.8378378378, "line_max": 354, "alpha_frac": 0.5357411588, "autogenerated": false, "ratio": 1.9019677996422182, "config_test": fal...
__author__ = 'vcaen' class Item(object): def __init__(self, title, short_desc, desc, picture): self.title = title self.short_desc = short_desc self.desc = desc self.picture = picture class Work(Item): def __init__(self, title, short_desc, desc, date_begin, date_end, company...
{ "repo_name": "vcaen/personalwebsite", "path": "app/models/cv.py", "copies": "1", "size": "1044", "license": "cc0-1.0", "hash": -1247796582069969200, "line_mean": 25.7692307692, "line_max": 108, "alpha_frac": 0.5852490421, "autogenerated": false, "ratio": 3.663157894736842, "config_test": false...
__author__ = 'vden' from model.contact import Contact from random import randrange def test_modify_first_contact_home(app): if app.contact.count() == 0: app.contact.create(Contact(firstname="test")) old_contacts = app.contact.get_contact_list() index = randrange(len(old_contacts)) contact = Co...
{ "repo_name": "vdenPython/python_training", "path": "test/test_modify_contact.py", "copies": "1", "size": "1096", "license": "apache-2.0", "hash": -6733695486632330000, "line_mean": 39.5925925926, "line_max": 101, "alpha_frac": 0.6998175182, "autogenerated": false, "ratio": 3.3212121212121213, ...
__author__ = 'vden' from pony.orm import * from datetime import datetime from model.group import Group from model.contact import Contact from pymysql.converters import decoders class ORMFixture: db = Database() class ORMGroup(db.Entity): _table_ = 'group_list' id = PrimaryKey(int, column='g...
{ "repo_name": "vdenPython/python_training", "path": "fixture/orm.py", "copies": "1", "size": "2493", "license": "apache-2.0", "hash": -1650733112628412000, "line_mean": 38.5714285714, "line_max": 126, "alpha_frac": 0.6666666667, "autogenerated": false, "ratio": 3.666176470588235, "config_test":...
__author__ = 'vden' 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 = mysql.co...
{ "repo_name": "vdenPython/python_training", "path": "fixture/db.py", "copies": "1", "size": "1782", "license": "apache-2.0", "hash": -4522222217245245000, "line_mean": 33.2692307692, "line_max": 108, "alpha_frac": 0.5538720539, "autogenerated": false, "ratio": 4.304347826086956, "config_test": ...
__author__ = 'vdowling' # Standard imports import json import sys import argparse # 3rd party imports import requests # Local imports class NaturalLanguageClassifierInstance(object): """ Class that wraps the functionality associated with a single NLC instance. You can use this instead of command line P...
{ "repo_name": "mkaufmann1/Lightning", "path": "python/nlc.py", "copies": "2", "size": "7223", "license": "apache-2.0", "hash": 9164456207409806000, "line_mean": 40.9941860465, "line_max": 153, "alpha_frac": 0.5919977849, "autogenerated": false, "ratio": 4.369630973986691, "config_test": false, ...
import numpy as np import time from tkinter import * # Constants (SI) SUN_MASS = 1.98855e30 MERCUR_MASS = 3.3011e23 MERCUR_SPEED = 47.362e3 MERCUR_DIST_SUN = 6.98169e10 VENUS_MASS = 4.8675e24 VENUS_SPEED = 35.02e3 VENUS_DIST_SUN = 1.08208e11 EARTH_MASS = 5.97237e24 EARTH_SPEED = 29.78e3 EARTH_DIST_SUN = 1.496e11 MAR...
{ "repo_name": "vegardbotnen/GravitySimulator", "path": "GravitySimulator.py", "copies": "1", "size": "4579", "license": "mit", "hash": 4911529897442251000, "line_mean": 25.9352941176, "line_max": 107, "alpha_frac": 0.5367984276, "autogenerated": false, "ratio": 3.1820708825573316, "config_test"...
from PySide.QtGui import * from PySide.QtCore import * class Factorial(QObject): xChanged = Signal(int) def __init__(self): super(Factorial, self).__init__() self.xval = -1 self.facval = 1 def getX(self): return self.xval def setX(self, x): if self.xval == x: ...
{ "repo_name": "Southpaw-TACTIC/Team", "path": "src/python/Lib/site-packages/PySide/examples/state-machine/factstates.py", "copies": "1", "size": "2140", "license": "epl-1.0", "hash": 7466069879777966000, "line_mean": 29.1408450704, "line_max": 84, "alpha_frac": 0.6327102804, "autogenerated": false,...
from PySide.QtGui import * from PySide.QtCore import * class LightWidget(QWidget): def __init__(self, colour): super(LightWidget, self).__init__() self.colour = colour self.onVal = False def isOn(self): return self.onVal def setOn(self, on): if self.onVal == on: ...
{ "repo_name": "Southpaw-TACTIC/Team", "path": "src/python/Lib/site-packages/PySide/examples/state-machine/trafficlight.py", "copies": "1", "size": "3443", "license": "epl-1.0", "hash": 8261809994334654000, "line_mean": 34.1326530612, "line_max": 96, "alpha_frac": 0.6697647401, "autogenerated": fals...
from PySide.QtGui import * from PySide.QtCore import * class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init__() button = QPushButton(self) button.setGeometry(QRect(100, 100, 100, 100)) machine = QStateMachine(self) s1 = QState() s1.assi...
{ "repo_name": "Southpaw-TACTIC/Team", "path": "src/python/Lib/site-packages/PySide/examples/state-machine/eventtrans.py", "copies": "1", "size": "1534", "license": "epl-1.0", "hash": -2647270877287093000, "line_mean": 28.5, "line_max": 79, "alpha_frac": 0.6551499348, "autogenerated": false, "rati...
from PySide.QtGui import * from PySide.QtCore import * class MovementTransition(QEventTransition): def __init__(self, window): super(MovementTransition, self).__init__(window, QEvent.KeyPress) self.window = window def eventTest(self, event): if event.type() == QEvent.StateMachineWrappe...
{ "repo_name": "Southpaw-TACTIC/Team", "path": "src/python/Lib/site-packages/PySide/examples/state-machine/rogue.py", "copies": "1", "size": "5405", "license": "epl-1.0", "hash": 8726849197979079000, "line_mean": 32.5714285714, "line_max": 91, "alpha_frac": 0.5617021277, "autogenerated": false, "r...
from PySide.QtGui import * from PySide.QtCore import * class PingEvent(QEvent): def __init__(self): super(PingEvent, self).__init__(QEvent.Type(QEvent.User+2)) class PongEvent(QEvent): def __init__(self): super(PongEvent, self).__init__(QEvent.Type(QEvent.User+3)) class Pinger(QState): de...
{ "repo_name": "Southpaw-TACTIC/Team", "path": "src/python/Lib/site-packages/PySide/examples/state-machine/pingpong.py", "copies": "1", "size": "1552", "license": "epl-1.0", "hash": -5515793269636201000, "line_mean": 26.7142857143, "line_max": 67, "alpha_frac": 0.6430412371, "autogenerated": false, ...
__author__ = 'Vernon' import os import operator import time def size_of(num, suffix='B'): """ Generates human readable file sizes. Accepts a value then returns a human readable file size in a string variable """ for unit in ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z']: if abs(num) < 1024.0: ...
{ "repo_name": "redeuxx/vidDB", "path": "viddb/dirfuncs.py", "copies": "1", "size": "2937", "license": "mit", "hash": 4580518149987558400, "line_mean": 32.0112359551, "line_max": 117, "alpha_frac": 0.5025536261, "autogenerated": false, "ratio": 3.884920634920635, "config_test": false, "has_no_...
__author__ = 'Vernon Wenberg III' import tkinter as tk import os import tkinter.messagebox import tkinter.filedialog import tkinter.simpledialog from tkinter import ttk import subprocess import sys import viddb.dbfuncs import viddb.dirfuncs class Options(object): """ Stores the directory sort option that ha...
{ "repo_name": "redeuxx/vidDB", "path": "vidDB.py", "copies": "1", "size": "11432", "license": "mit", "hash": 7144223096349208000, "line_mean": 41.1881918819, "line_max": 119, "alpha_frac": 0.5984954514, "autogenerated": false, "ratio": 3.8465679676985194, "config_test": true, "has_no_keywords...
__author__ = 'Veronica' from serial import Serial, SerialException from src.controller.controller import Controller import sys class Dispositivo(): def __init__(self): self.controller = Controller() self.porta = self.escolhaPorta() def escolhaPorta(self): MAX_PORTAS = 10 # numero maxi...
{ "repo_name": "Veronicka/INPE_Projetos", "path": "Elisa/src/model/device.py", "copies": "1", "size": "1842", "license": "mit", "hash": -8566526843655375000, "line_mean": 27.3384615385, "line_max": 116, "alpha_frac": 0.4918566775, "autogenerated": false, "ratio": 3.877894736842105, "config_test"...
__author__ = 'Veronica' from src.model.frameGenerator import GeradorPacote from src.model.generatedFrames import PacotesGerados from src.model.frameSend import EnviarPacote from src.model.frameListener import RecebedorPacote from src.controller.controller import Controller class ExperimentoElisa(object): def __i...
{ "repo_name": "Veronicka/INPE_Projetos", "path": "Elisa/src/model/elisaExperiment.py", "copies": "1", "size": "2481", "license": "mit", "hash": 3988832606116652500, "line_mean": 36.0298507463, "line_max": 74, "alpha_frac": 0.6166868198, "autogenerated": false, "ratio": 3.2730870712401057, "conf...
__author__ = 'Veronica' from threading import Thread from frame import Pacote from time import sleep class GeradorPacote(): def __init__ (self, pacotesGerados): self.varredura = 0x0 self.__pacotesGerados = pacotesGerados self.__ok = True self.__tempo = 0x0 def iniciarThread(se...
{ "repo_name": "Veronicka/INPE_Projetos", "path": "Elisa/src/model/frameGenerator.py", "copies": "1", "size": "4677", "license": "mit", "hash": 7278665615225084000, "line_mean": 38.9743589744, "line_max": 122, "alpha_frac": 0.5189223861, "autogenerated": false, "ratio": 2.646859083191851, "confi...
__author__ = 'Veronica' from threading import Thread from src.controller.controller import Controller class RecebedorPacote(): def __init__(self, dispositivo): self.__dispositivo = dispositivo self.__controller = Controller() self.__lista = [] self.__ok = True def iniciarThrea...
{ "repo_name": "Veronicka/INPE_Projetos", "path": "Elisa/src/model/frameListener.py", "copies": "1", "size": "1027", "license": "mit", "hash": 1010258283297367600, "line_mean": 26.0263157895, "line_max": 57, "alpha_frac": 0.553067186, "autogenerated": false, "ratio": 3.8178438661710037, "config_...
__author__ = 'VestalNetSciHigh' import matplotlib.pyplot as plt import networkx as nx import settings import time import os start_time = time.time() # load graph.graphml G = nx.read_graphml(open(settings.OUTPUT + "\\graph.graphml")) # Generate graph types GRAPH_TYPES = [["draw_spring", nx.spring_layout(G)], ...
{ "repo_name": "VestalNetSciHigh/store", "path": "code/draw_graph.py", "copies": "1", "size": "1136", "license": "mit", "hash": -6131439086463369000, "line_mean": 28.1538461538, "line_max": 107, "alpha_frac": 0.6346830986, "autogenerated": false, "ratio": 2.8542713567839195, "config_test": false...
__author__ = 'VestalNetSciHigh' """ Set all distances below a threshold to 0 Then, may also set non-zero distances to 1 SEE Configurable Constants below """ import time from numpy import loadtxt import os import settings import datetime start_time = time.time() print "Started: " + datetime.datetime.fromtimestamp(sta...
{ "repo_name": "VestalNetSciHigh/store", "path": "code/set_threshold.py", "copies": "1", "size": "2332", "license": "mit", "hash": -8855262147655334000, "line_mean": 35.453125, "line_max": 116, "alpha_frac": 0.672813036, "autogenerated": false, "ratio": 3.340974212034384, "config_test": false, ...
__author__ = 'VestalNetSciHigh' # Output a .graphml file from data from numpy import loadtxt import networkx as nx import settings import time import csv import datetime DATATYPE = "clipped" # May use: "clipped" | "real", referring to whether or not a threshold was used start_time = time.time() print "Started: " +...
{ "repo_name": "VestalNetSciHigh/store", "path": "code/write_graph.py", "copies": "1", "size": "1398", "license": "mit", "hash": -7954745485654897000, "line_mean": 32.3095238095, "line_max": 126, "alpha_frac": 0.7067238913, "autogenerated": false, "ratio": 3.2740046838407495, "config_test": fals...
__author__ = 'VestalNetSciHigh' """ Read in data (and array of distance metrics) and calculate various stats """ import time # from numpy import loadtxt import numpy import settings import datetime start_time = time.time() print "Started: " + datetime.datetime.fromtimestamp(start_time).strftime('%Y-%m-%d %H:%M:%S') ...
{ "repo_name": "VestalNetSciHigh/store", "path": "code/calculate_stats.py", "copies": "1", "size": "2356", "license": "mit", "hash": 6028480832328390000, "line_mean": 35.828125, "line_max": 97, "alpha_frac": 0.701188455, "autogenerated": false, "ratio": 3.327683615819209, "config_test": false, ...
__author__ = 'VestalNetSciHigh' """ Read in data via a .csv file, verify data integrity, calculate distance metrics for each element, and output """ from sklearn.feature_extraction import DictVectorizer from sklearn.neighbors import DistanceMetric import settings import time import csv import copy import datetime st...
{ "repo_name": "VestalNetSciHigh/store", "path": "code/parseCSV.py", "copies": "1", "size": "2886", "license": "mit", "hash": -7004019235805807000, "line_mean": 31.7954545455, "line_max": 122, "alpha_frac": 0.7016632017, "autogenerated": false, "ratio": 3.4153846153846152, "config_test": false, ...
__author__ = 'VestalNetSciHigh' """ Setup global constants and define functions """ import os from numpy import savetxt import itertools import collections # path to data directory, target file (csv file, without extension), output directory PATH = "..\\data" TARGET = "NetSci-Data-15w04f" OUTPUT = "..\\output\\" + T...
{ "repo_name": "VestalNetSciHigh/store", "path": "code/settings.py", "copies": "1", "size": "7178", "license": "mit", "hash": 6716236678124485000, "line_mean": 43.5900621118, "line_max": 150, "alpha_frac": 0.6264976317, "autogenerated": false, "ratio": 3.985563575791227, "config_test": false, ...
__author__ = 'vg' import io import dircache import sys, os #default path base_dir = os.path.dirname('C:\\c-list\\country\\icu\\') s = dircache.listdir(base_dir) #creating country code list our_codes = io.open('our_codes.txt', mode='r',encoding='utf8').readlines() code_list = [] for k in our_codes: code_list.ap...
{ "repo_name": "HaideiGV/country-list", "path": "crawl.py", "copies": "1", "size": "1601", "license": "mit", "hash": -6698264514552264000, "line_mean": 24.4285714286, "line_max": 81, "alpha_frac": 0.5921299188, "autogenerated": false, "ratio": 2.6506622516556293, "config_test": false, "has_no_...
__author__ = 'vialette' class ItemEvent(object): REQUEST_ADD_ITEM = 0 START_ADD_ITEM = 1 END_ADD_ITEM = 2 def __init__(self, event_type, timestamp, item): self._event_type = event_type self._timestamp = timestamp self._item = item @property def event_type(self): ...
{ "repo_name": "vialette/ultrastorage", "path": "ultrastorage/itemevent/itemevent.py", "copies": "1", "size": "1312", "license": "mit", "hash": -312736889901415700, "line_mean": 26.3541666667, "line_max": 108, "alpha_frac": 0.5708841463, "autogenerated": false, "ratio": 4.036923076923077, "confi...
__author__ = 'vialette' from .transfertimemanager import TransferTimeManager # Attached Resource Computer NETwork (ARCNET) def ARCNET_2(): return TransferTimeManager(bps=2e+06) def ARCNET_4(): return TransferTimeManager(bps=4e+06) # Token ring def TokenRing_4(): return TransferTimeManager(bps=4e+06) ...
{ "repo_name": "vialette/ultrastorage", "path": "ultrastorage/storagesystem/transfertimemanager/network.py", "copies": "1", "size": "1178", "license": "mit", "hash": -3910292129344598000, "line_mean": 18.9830508475, "line_max": 52, "alpha_frac": 0.7368421053, "autogenerated": false, "ratio": 2.887...
__author__ = 'vialette' # non-reconfigurable simulator import ultrastorage.simulator.nonreconfigurable as nonreconfigurable # insertion politics import ultrastorage.inserter as inserter # storage system import ultrastorage.storagesystem as storagesystem # item generator import ultrastorage.itemgenerator as itemgene...
{ "repo_name": "vialette/ultrastorage", "path": "test.py", "copies": "1", "size": "2410", "license": "mit", "hash": -7003023891064072000, "line_mean": 33.9420289855, "line_max": 99, "alpha_frac": 0.679253112, "autogenerated": false, "ratio": 4.140893470790378, "config_test": false, "has_no_key...
from frequent_words import computingFrequencies from frequent_words import patternToNumber from frequent_words import numberToPattern workingDir = "/Users/mli/Projects/DNA-analysis-tools/fixture/" filename = "clump_finding_test.txt" #filename = "sample.txt" #this is the E. coli genome # This function outpus all distinc...
{ "repo_name": "vickylihorst/genome-toolkit", "path": "clump_finding.py", "copies": "1", "size": "2489", "license": "mit", "hash": -4219952709509020700, "line_mean": 45.9622641509, "line_max": 197, "alpha_frac": 0.7304138208, "autogenerated": false, "ratio": 3.1951219512195124, "config_test": fa...
from frequent_words_with_mismatches import computingFrequenciesWithMismatches from reverse_complement_string import reverseComplementString from frequent_words import numberToPattern filename = "frequent_words_with_mismatches_test.txt" # use the same file as frequentWordsWithMismatches() # This functions finds the mo...
{ "repo_name": "vickylihorst/genome-toolkit", "path": "frequent_words_with_mismatches_and_reverse_complements.py", "copies": "1", "size": "1695", "license": "mit", "hash": -8567809718950892000, "line_mean": 47.4285714286, "line_max": 154, "alpha_frac": 0.7899705015, "autogenerated": false, "ratio"...
from hamming_distance import hammingDistance from frequent_words import patternToNumber from frequent_words import numberToPattern filename = "frequent_words_with_mismatches_test.txt" # The function frequentWordsWithMismatches() finds the most frequent k-mers with mismatches in a string # The input is a string, and i...
{ "repo_name": "vickylihorst/genome-toolkit", "path": "frequent_words_with_mismatches.py", "copies": "1", "size": "3409", "license": "mit", "hash": 7014744442962781000, "line_mean": 46.3611111111, "line_max": 199, "alpha_frac": 0.7509533588, "autogenerated": false, "ratio": 3.4714867617107945, "...
from pattern_count import patternCount from collections import deque filename = "frequent_words_test.txt" #filename = "pattern_to_number_test.txt" # The format of the file is: DNA in the first line, and the k-mer integer in the second line. # This function creates the algorithm for finding the most frequent k-mers in...
{ "repo_name": "vickylihorst/genome-toolkit", "path": "frequent_words.py", "copies": "1", "size": "5878", "license": "mit", "hash": -1359642224216972500, "line_mean": 37.1688311688, "line_max": 166, "alpha_frac": 0.7119768629, "autogenerated": false, "ratio": 3.134933333333333, "config_test": fa...
from collections import deque filename = "reverse_complement_string_test.txt" # This function finds the reverse complement of a DNA string. # For example, if the input is AAAACCCGGT, then its reverse complement string is ACCGGGTTTT. def reverseComplementString(text): reverseDeque = deque() # use a double-ended queu...
{ "repo_name": "vickylihorst/genome-toolkit", "path": "reverse_complement_string.py", "copies": "1", "size": "1119", "license": "mit", "hash": 269070265258677340, "line_mean": 35.1290322581, "line_max": 110, "alpha_frac": 0.7113494191, "autogenerated": false, "ratio": 3.262390670553936, "config_...
from hamming_distance import hammingDistance filename = "approximate_pattern_match_test.txt" #fileName = "approximate_pattern_match_sample.txt" # The function approximatePatternMatch() takes pattern, text, and an integer d, and outputs the total count and all starting positions where pattern appears as a substring o...
{ "repo_name": "vickylihorst/genome-toolkit", "path": "approximate_pattern_match.py", "copies": "1", "size": "1352", "license": "mit", "hash": 7696186288767373000, "line_mean": 47.3214285714, "line_max": 205, "alpha_frac": 0.7551775148, "autogenerated": false, "ratio": 3.557894736842105, "config...
__author__ = 'Victoria' from src.common.Observable import * from src.game.AttackSpell import * from random import * class HeroState(object): def __init__(self, name): self._name = name super(HeroState, self).__init__() def north(self): pass def south(self): pass def attack(self): pass ...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/SimpleGame.py", "copies": "1", "size": "6900", "license": "mit", "hash": 1104034239575384800, "line_mean": 28.8701298701, "line_max": 97, "alpha_frac": 0.555942029, "autogenerated": false, "ratio": 3.6997319034852545, "config_test"...
__author__ = 'Victoria' #from src.game.Creature import * from src.common.Observable import * from src.game.Room2 import * from src.game.StatePattern4 import * from random import * class Monster(Observable, Observer, Room): def __init__(self, name): super(Monster, self).__init__() self._name = name ...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/Monsters2.py", "copies": "1", "size": "2335", "license": "mit", "hash": -6602802785072861000, "line_mean": 26.4705882353, "line_max": 67, "alpha_frac": 0.5717344754, "autogenerated": false, "ratio": 3.718152866242038, "config_test"...
__author__ = 'Victoria' class Attributes(object): def attributes(self): pass class Strength(Attributes): def attributes(self): print ("I have strength") class Constistution(Attributes): def attributes(self): print ("I have constitution ") class Dexteritiy(Attributes): def att...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/Attributes.py", "copies": "1", "size": "1183", "license": "mit", "hash": 1065260972494637800, "line_mean": 24.7391304348, "line_max": 50, "alpha_frac": 0.628909552, "autogenerated": false, "ratio": 3.9565217391304346, "config_test"...
__author__ = 'Victoria' class Room(object): def __init__(self, value, link=None): self.value = value self.link = link def linkTo(self, room): self.link = room def printAll(self): print (self.value) if self.link is not None: self.link.printAll() def...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/roomVisit.py", "copies": "1", "size": "3506", "license": "mit", "hash": 1206388041523473000, "line_mean": 19.5029239766, "line_max": 80, "alpha_frac": 0.5402167712, "autogenerated": false, "ratio": 3.21651376146789, "config_test": ...
__author__ = 'Victoria' #Decorator Pattern in Characters class BarDecorators(Barbarian): pass class ImageBarDecorator(BarDecorators): def __init__(self, decorated, picFile): self.decorated = decorated self.picFile = picFile super(ImageBarDecorator, self).__init__(self.decorated.canvas, ...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/Decorators.py", "copies": "1", "size": "1582", "license": "mit", "hash": 6530124870586385000, "line_mean": 50.0322580645, "line_max": 148, "alpha_frac": 0.6472819216, "autogenerated": false, "ratio": 4.346153846153846, "config_test...
__author__ = 'Victoria' from src.common.Locations import distance from src.common.Observable import * def collides(collidable1, collidable2): '''detects if two collidables have collided''' if not isinstance(collidable1, GameCollidable): raise TypeError("Attempting to collide a non-collidable, argument...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/Common/GameWorld.py", "copies": "1", "size": "6112", "license": "mit", "hash": 2906397265397351400, "line_mean": 34.5406976744, "line_max": 110, "alpha_frac": 0.663776178, "autogenerated": false, "ratio": 4.138117806364252, "config_test...
__author__ = 'Victoria' from src.common.Observable import * from src.game.AttackSpell import * from src.game.Room2 import * from src.game.StatePattern4 import * from src.game.Monsters2 import * from random import * class Hero(Observable,Observer, AttackSpell): def __init__(self, name): super(Hero, self)._...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/Heros3.py", "copies": "1", "size": "3416", "license": "mit", "hash": 6872956318934404000, "line_mean": 30.3486238532, "line_max": 97, "alpha_frac": 0.5395199063, "autogenerated": false, "ratio": 3.935483870967742, "config_test": fa...
__author__ = 'Victoria' from src.common.Observable import * from src.game.AttackSpell import * #rom src.game.Room2 import * from src.game.StatePattern4 import * from src.game.Monsters2 import * from random import * class Hero(Observable,Observer, AttackSpell): def __init__(self, name): super(Hero, self)._...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/Heros2.py", "copies": "1", "size": "4317", "license": "mit", "hash": -5151901909697191000, "line_mean": 30.0647482014, "line_max": 97, "alpha_frac": 0.5425063702, "autogenerated": false, "ratio": 3.917422867513612, "config_test": f...
__author__ = 'Victoria' from src.game.AttackSpell import * from src.game.AttackWeapon import * class HeroState(object): def __init__(self): super(HeroState, self).__init__() self._state = ' ' def changeState(self): print ("changing state to %s" % self._state) class AttackState(HeroSt...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/StatePattern3.py", "copies": "1", "size": "1264", "license": "mit", "hash": 5013758365864517000, "line_mean": 24.7959183673, "line_max": 53, "alpha_frac": 0.5759493671, "autogenerated": false, "ratio": 3.5706214689265536, "config_t...
__author__ = 'Victoria' #from src.game.Creature import * from src.game.Heroes import * from src.game.Monsters import * hero = Hero('hero') monst = Monster('monst') monst.addObserver(monst) monst.addObserver(monst) hero.Display() monst.Display() Commands = { 'north' : Creatures.north, 'south' : Creatures.so...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "script/Driver.py", "copies": "1", "size": "1412", "license": "mit", "hash": 7414697470526127000, "line_mean": 23.7894736842, "line_max": 75, "alpha_frac": 0.5934844193, "autogenerated": false, "ratio": 3.1588366890380315, "config_test": fal...
__author__ = 'Victoria' from src.game.Creature import * from src.game.Monsters import * from src.game.Attributes import * from src.game.StatePattern3 import * from random import* class Hero(Creatures, Observable, Observer, GameAttributes, HeroState): attackState = None roamState = None runState = None ...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/Heros.py", "copies": "1", "size": "5717", "license": "mit", "hash": -2275339293042197200, "line_mean": 35.6474358974, "line_max": 101, "alpha_frac": 0.5217771559, "autogenerated": false, "ratio": 4.069039145907474, "config_test": f...
__author__ = 'Victoria' import math # Useful heading constants DOWN=math.pi/float(2) UP=(3*math.pi)/float(2) LEFT=float(math.pi) RIGHT=0.0 def distance(loc1,loc2): '''Computes the distance between two Locations''' return math.sqrt((loc1.x-loc2.x)**2+(loc1.y-loc2.y)**2) class Location: '''Represents some...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/Common/Locations.py", "copies": "1", "size": "2063", "license": "mit", "hash": 7210117295920390000, "line_mean": 25.4615384615, "line_max": 126, "alpha_frac": 0.5942801745, "autogenerated": false, "ratio": 3.1787365177195688, "config_te...
__author__ = 'Victoria' import random class Inventory: """An inventory of weapons and spells""" def __init__(self, animal_factory=None): self.pet_factory = animal_factory def showInventory(self): inventory = self.pet_factory.get_pet() print ("This is a lovely", inventory) ...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/AbstractFactory.py", "copies": "1", "size": "1199", "license": "mit", "hash": -6265267239454866000, "line_mean": 21.2222222222, "line_max": 54, "alpha_frac": 0.612176814, "autogenerated": false, "ratio": 3.4355300859598854, "config...
__author__ = 'Victoria' #This works just fine by it's self, but I tried and failed to have this #implemented so that when the character moves if the monster is in a certain radius #this should pop up to the user so that user can use an attack. This brought up #the issue of getting the button box to pop up in the canva...
{ "repo_name": "victorianorton/SimpleRPGGame", "path": "src/game/AttackInventory.py", "copies": "1", "size": "4657", "license": "mit", "hash": -4075786188915883500, "line_mean": 30.6870748299, "line_max": 97, "alpha_frac": 0.5842817264, "autogenerated": false, "ratio": 3.5441400304414, "config_t...
__author__ = 'victor, kelvinguu' from unittest import TestCase from stanza.monitoring.trigger import ThresholdTrigger, SlopeTrigger, PatienceTrigger class TestEarlyStopping(TestCase): def test_threshold(self): e = ThresholdTrigger(min_threshold=-10, max_threshold=2) for val in xrange(-10, 3): ...
{ "repo_name": "arunchaganty/presidential-debates", "path": "third-party/stanza/test/unit_tests/monitoring/test_trigger.py", "copies": "3", "size": "1067", "license": "mit", "hash": -5352211105957707000, "line_mean": 31.3333333333, "line_max": 85, "alpha_frac": 0.611059044, "autogenerated": false, ...
_author_ = "Victor M" import random import Player import Message """Rock paper scissors player""" class RPSPlayerSwitcharoo(Player.Player): def __init__(self): # Call super class constructor Player.Player.__init__(self) self.strategy = RPSOppositeStrategy() self.reset() def re...
{ "repo_name": "PaulieC/sprint1_Council_b", "path": "RPSPlayerSwitcharoo.py", "copies": "2", "size": "5033", "license": "apache-2.0", "hash": -6394513194724312000, "line_mean": 32.5533333333, "line_max": 119, "alpha_frac": 0.6141466322, "autogenerated": false, "ratio": 3.9505494505494507, "confi...
_author_ = "Victor M" import random import Player import Message """Rock paper scissors player""" class VMPlayer(Player.Player): def __init__(self): # Call super class constructor Player.Player.__init__(self) self.strategy = RPSOppositeStrategy() self.reset() def reset(self): ...
{ "repo_name": "geebzter/game-framework", "path": "VMPlayer.py", "copies": "1", "size": "5017", "license": "apache-2.0", "hash": 5673497651622167000, "line_mean": 32.4466666667, "line_max": 119, "alpha_frac": 0.6133147299, "autogenerated": false, "ratio": 3.962875197472354, "config_test": false,...
__author__ = 'victor' from collections import Counter import cPickle as pkl import numpy as np import sys from pprint import pformat import os from dependency import NoPathException from utils import np_softmax class Example(dict): def __init__(self, *args, **kwargs): super(Example, self).__init__(*args,...
{ "repo_name": "vzhong/sent2rel", "path": "data/dataset.py", "copies": "1", "size": "7006", "license": "mit", "hash": -4965288944472387000, "line_mean": 33.1756097561, "line_max": 104, "alpha_frac": 0.5628033114, "autogenerated": false, "ratio": 3.772751750134626, "config_test": false, "has_no...
__author__ = 'victor' from collections import Counter class Vocab(object): def __init__(self, unk=''): self.word2index = {} self.index2word = [] self.counts = Counter() self.unk = unk if self.unk: self.add(self.unk) def clear_counts(self): self.cou...
{ "repo_name": "vzhong/pystacks", "path": "pystacks/utils/text/vocab.py", "copies": "1", "size": "1426", "license": "mit", "hash": 6674909690133125000, "line_mean": 24.9272727273, "line_max": 71, "alpha_frac": 0.5561009818, "autogenerated": false, "ratio": 3.5297029702970297, "config_test": fals...
__author__ = 'victor' from dataset import Example import csv import os mydir = os.path.dirname(os.path.abspath(__file__)) rawdir = os.path.join(mydir, 'raw') class DatasetAdaptor(object): keep = ['dependency', 'words', 'lemmas', 'pos', 'ner', 'subject_begin', 'subject_end', 'subject', 'subject_ner', '...
{ "repo_name": "vzhong/sent2rel", "path": "data/adaptors.py", "copies": "1", "size": "8276", "license": "mit", "hash": -8629413037340881000, "line_mean": 38.7884615385, "line_max": 120, "alpha_frac": 0.5743112615, "autogenerated": false, "ratio": 3.4526491447642886, "config_test": false, "has_...
__author__ = 'victor' from dataset import Example, Vocab import numpy as np from copy import deepcopy from dependency import NoPathException, DependencyParse class Featurizer(object): def __init__(self, **vocab_kwargs): self.vocab = { 'rel': vocab_kwargs.get('rel', Vocab()), 'ner'...
{ "repo_name": "vzhong/sent2rel", "path": "data/featurizers.py", "copies": "1", "size": "9064", "license": "mit", "hash": 4878884647860805000, "line_mean": 39.1061946903, "line_max": 135, "alpha_frac": 0.5660856134, "autogenerated": false, "ratio": 3.5939730372720065, "config_test": false, "ha...
__author__ = 'victor' import csv import os import numpy as np from theano import tensor as T, shared from keras.objectives import categorical_crossentropy class TypeCheckAdaptor(object): def __init__(self, fname, vocab): from theano import shared self.vocab = vocab self.valid_types = self....
{ "repo_name": "vzhong/sent2rel", "path": "data/typecheck.py", "copies": "1", "size": "2431", "license": "mit", "hash": 8216635256685950000, "line_mean": 41.649122807, "line_max": 117, "alpha_frac": 0.5828877005, "autogenerated": false, "ratio": 3.32103825136612, "config_test": false, "has_no_...
__author__ = 'victor' import json from pprint import pprint from matplotlib import pylab as P import numpy as np class Monitor(object): """ Abstraction to monitor a stream of data On creation, the file log is rewritten if it exists :ivar name: name of the monitor :ivar log_file: string path to the log...
{ "repo_name": "vzhong/pystacks", "path": "pystacks/utils/logging.py", "copies": "1", "size": "3916", "license": "mit", "hash": 378793594382969540, "line_mean": 31.0983606557, "line_max": 102, "alpha_frac": 0.565628192, "autogenerated": false, "ratio": 3.861932938856016, "config_test": false, ...
__author__ = 'victor' import numpy as np import theano from theano import tensor as T from theano.tensor.extra_ops import to_one_hot from blocks.initialization import * from blocks.bricks.lookup import LookupTable from blocks.bricks.recurrent import LSTM from blocks.bricks import * from blocks.bricks.cost import Catego...
{ "repo_name": "vzhong/semeval", "path": "model.py", "copies": "1", "size": "3352", "license": "mit", "hash": 869264511693719000, "line_mean": 31.5436893204, "line_max": 92, "alpha_frac": 0.540274463, "autogenerated": false, "ratio": 3.0062780269058296, "config_test": false, "has_no_keywords":...
__author__ = 'victor' import numpy as np class Initializer(object): def fill(self, shape): raise NotImplementedError() class Xavier(Initializer): def fill(self, shape): n_in, n_out = shape bound = np.sqrt(6. / (n_in + n_out)) return np.random.uniform(-bound, bound, shape) ...
{ "repo_name": "vzhong/pystacks", "path": "pystacks/initializer.py", "copies": "1", "size": "1376", "license": "mit", "hash": -1235387895149306000, "line_mean": 20.8412698413, "line_max": 116, "alpha_frac": 0.6126453488, "autogenerated": false, "ratio": 3.574025974025974, "config_test": false, ...
__author__ = 'victor' import os import stanza import requests import logging def get_from_url(url): """ :param url: url to download from :return: return the content at the url """ return requests.get(url).content def get_data_or_download(dir_name, file_name, url='', size='unknown'): """Retur...
{ "repo_name": "arunchaganty/aeschines", "path": "third-party/stanza/stanza/util/resource.py", "copies": "3", "size": "1271", "license": "mit", "hash": 2336484871970318000, "line_mean": 35.3142857143, "line_max": 124, "alpha_frac": 0.6632572777, "autogenerated": false, "ratio": 3.716374269005848, ...
__author__ = 'victor' import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as P from sklearn.metrics import confusion_matrix from collections import Counter import numpy as np def get_sorted_labels(targs, vocab): counter = Counter(targs) order = [i for i, count in counter.most_common()] labels...
{ "repo_name": "vzhong/sent2rel", "path": "plot_utils.py", "copies": "1", "size": "3719", "license": "mit", "hash": 4589454877257159700, "line_mean": 37.7395833333, "line_max": 119, "alpha_frac": 0.6114546921, "autogenerated": false, "ratio": 3.4403330249768733, "config_test": false, "has_no_k...
__author__ = 'Victor' import time from rubik_solver.Enums import Color import rubik_solver.FaceCube as FaceCube import rubik_solver.CoordCube as CoordCube from rubik_solver.CubieCube import DupedEdge class DupedFacelet(Exception): pass class NoSolution(Exception): pass class SolverTimeoutError(Exception...
{ "repo_name": "Wiston999/python-rubik", "path": "rubik_solver/Solver/Kociemba/Search.py", "copies": "1", "size": "14418", "license": "mit", "hash": -6068008348547223000, "line_mean": 40.6705202312, "line_max": 134, "alpha_frac": 0.4515882924, "autogenerated": false, "ratio": 3.9094360086767894, ...
__author__ = 'victor' import unittest from data.featurizers import * class TestFeaturizer(object): words = ['yesterday', ',', 'Steph', 'Curry', 'had', 'curry', 'for', 'dinner'] ner = ['DATE', 'O', 'PERSON', 'PERSON', 'O', 'O', 'O', 'O'] pos = ['NN', ',', 'NNP', 'NNP', 'VBD', 'NN', 'IN', 'NN'] dep = [...
{ "repo_name": "vzhong/sent2rel", "path": "tests/test_featurizers.py", "copies": "1", "size": "3119", "license": "mit", "hash": -6744439673398555000, "line_mean": 49.3225806452, "line_max": 131, "alpha_frac": 0.6072459122, "autogenerated": false, "ratio": 3.1441532258064515, "config_test": true,...
__author__ = "Victor Varvariuc <victor.varvariuc@gmail.com>" from datetime import datetime as DateTime, date as Date from decimal import Decimal import copy import dbw from dbw import Nil from . import adapters, models class Expression(): """Expression - pair of operands and operation on them. """ sort ...
{ "repo_name": "warvariuc/dbw", "path": "dbw/model_fields.py", "copies": "1", "size": "20936", "license": "bsd-3-clause", "hash": -4765340334404126000, "line_mean": 39.4951644101, "line_max": 100, "alpha_frac": 0.5732231563, "autogenerated": false, "ratio": 4.361666666666666, "config_test": fals...
__author__ = "Victor Varvariuc <victor.varvariuc@gmail.com>" import inspect from datetime import datetime as DateTime, date as Date from decimal import Decimal from collections import OrderedDict import dbw class ModelAttrInfo(): """Information about an attribute of a Model class. """ def __init__(self,...
{ "repo_name": "warvariuc/dbw", "path": "dbw/models.py", "copies": "1", "size": "13492", "license": "bsd-3-clause", "hash": -4565994387542167000, "line_mean": 38.2209302326, "line_max": 100, "alpha_frac": 0.5788615476, "autogenerated": false, "ratio": 4.33408287825249, "config_test": false, "h...
__author__ = "Victor Varvariuc <victor.varvariuc@gmail.com>" import os import sys import html from pkgutil import iter_modules from PyQt4 import QtCore, QtGui, uic from PyKDE4 import kdecore import mykde def walk_modules(path): """Loads a module and all its submodules from a the given module path and returns t...
{ "repo_name": "warvariuc/mykde", "path": "mykde/main.py", "copies": "1", "size": "6434", "license": "bsd-3-clause", "hash": 7913205633744604000, "line_mean": 35.5568181818, "line_max": 98, "alpha_frac": 0.6317998135, "autogenerated": false, "ratio": 3.825208085612366, "config_test": false, "h...
__author__ = 'Victor Varvariuc <victor.varvariuc@gmail.com>' import unittest import os from datetime import date as Date, datetime as DateTime from decimal import Decimal import dbw class PostgresqlAdapterTest(unittest.TestCase): @classmethod def setUpClass(cls): db_url = os.environ.get('POSTGRESQL...
{ "repo_name": "warvariuc/dbw", "path": "dbw/tests/test_postgres_adapter.py", "copies": "1", "size": "10416", "license": "bsd-3-clause", "hash": -3824323147989534700, "line_mean": 40.7429718876, "line_max": 99, "alpha_frac": 0.5616701943, "autogenerated": false, "ratio": 3.7755176171449327, "con...
__author__ = 'Victor Varvaryuk <victor.varvariuc@gmail.com>' import os import xml.etree.ElementTree as ET class NodeMismatchError(Exception): """ """ def restore_namespaces(func): """Remember the registered namespaces before calling the decorated function and restore them after the call. """ ...
{ "repo_name": "warvariuc/mykde", "path": "mykde/xml_tree_merge.py", "copies": "1", "size": "3342", "license": "bsd-3-clause", "hash": 1770214992979611400, "line_mean": 36.9772727273, "line_max": 99, "alpha_frac": 0.5840813884, "autogenerated": false, "ratio": 3.806378132118451, "config_test": f...
__author__ = 'videl' import datetime class frtz(datetime.tzinfo): DST_OFFSET = datetime.timedelta(hours=+1) # In the US, DST starts at 2 am (standard time) on the last Sunday in March, # which is the first Sunday on or after March 25. DSTSTART = datetime.datetime(1, 3, 25, 2) # and ends at 3 am (D...
{ "repo_name": "Videl/absentees-blackboard", "path": "frtz.py", "copies": "1", "size": "1190", "license": "mit", "hash": 6989644341889026000, "line_mean": 33, "line_max": 82, "alpha_frac": 0.625210084, "autogenerated": false, "ratio": 3.296398891966759, "config_test": false, "has_no_keywords":...
__author__ = 'videl' from model.ADECommunicator import * import logging import re def get_lessons_of_groups(groups, all_lessons): """ Get the lessons that a list of groups have. """ users_lessons = dict() # Filter all the lessons of one user for lesson in all_lessons: #logging.error(l...
{ "repo_name": "Videl/absentees-blackboard", "path": "util.py", "copies": "1", "size": "3280", "license": "mit", "hash": 9110378846065780000, "line_mean": 25.248, "line_max": 75, "alpha_frac": 0.5777439024, "autogenerated": false, "ratio": 3.5574837310195226, "config_test": false, "has_no_keyw...
__author__ = 'vid' from lmfit import minimize, Parameters, Parameter, report_fit import numpy as np # create data to be fitted x = np.linspace(0, 15, 301) data = (5. * np.sin(2 * x - 0.1) * np.exp(-x * x * 0.025) + np.random.normal(size=len(x), scale=0.2) ) # define objective function: returns the array to be...
{ "repo_name": "Ossada/DLS-UVVis", "path": "testlmfit.py", "copies": "1", "size": "1175", "license": "mit", "hash": -1811104484267496700, "line_mean": 24.5434782609, "line_max": 68, "alpha_frac": 0.6442553191, "autogenerated": false, "ratio": 3.0283505154639174, "config_test": false, "has_no_k...
__author__ = 'vid' from tkinter import filedialog import matplotlib.pyplot as plt from matplotlib.patches import * import os pot = filedialog.askdirectory(initialdir='/media/vid/DLS DATA/') seznam = os.listdir(pot) di = {} temperatura = [] absor = [] print(seznam) for a in seznam: if a[-4:] == '.txt': k...
{ "repo_name": "Ossada/DLS-UVVis", "path": "uvvis_ris.py", "copies": "1", "size": "2838", "license": "mit", "hash": 1874582810710025000, "line_mean": 26.2980769231, "line_max": 92, "alpha_frac": 0.5007047216, "autogenerated": false, "ratio": 2.697718631178707, "config_test": false, "has_no_key...
__author__ = 'vid' import matplotlib.pyplot as plt from matplotlib.patches import * import tkinter.filedialog as tk import os def beri(poti): tempe = [] time = [] with open(poti, encoding='windows-1250') as file: for line in file: temp = line.strip().split(' ') if '' in tem...
{ "repo_name": "Ossada/DLS-UVVis", "path": "risanje.py", "copies": "1", "size": "1027", "license": "mit", "hash": 3722949020329367000, "line_mean": 22.3409090909, "line_max": 57, "alpha_frac": 0.5477582846, "autogenerated": false, "ratio": 3.2264150943396226, "config_test": false, "has_no_keyw...
__author__ = 'vid' import matplotlib.pyplot as plt from tkinter import filedialog import os pot = filedialog.askdirectory(initialdir='/media/vid/DLS Data/VidS/Uv vis/') seznam = os.listdir(pot) di = {} temperatura = [] absor = [] print(seznam) for a in seznam: if a[-4:] == '.CSV': key = a.split('.')[0] ...
{ "repo_name": "Ossada/DLS-UVVis", "path": "risanje_stopnica.py", "copies": "1", "size": "2219", "license": "mit", "hash": -2751923766507024000, "line_mean": 25.4166666667, "line_max": 92, "alpha_frac": 0.484220018, "autogenerated": false, "ratio": 2.731527093596059, "config_test": false, "has...
__author__ = 'vid' import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons fig, ax = plt.subplots() plt.subplots_adjust(left=0.25, bottom=0.25) t = np.arange(0.0, 1.0, 0.001) a0 = 5 f0 = 3 s = a0*np.sin(2*np.pi*f0*t) l, = plt.plot(t,s, lw=2, color='red') plt.axis(...
{ "repo_name": "Ossada/DLS-UVVis", "path": "slider.py", "copies": "1", "size": "1207", "license": "mit", "hash": -4220746048095953400, "line_mean": 26.4545454545, "line_max": 68, "alpha_frac": 0.6512013256, "autogenerated": false, "ratio": 2.3166986564299425, "config_test": false, "has_no_keyw...
__author__ = 'vid' import os import csv import natsort from tkinter import filedialog import copy pot = filedialog.askdirectory(initialdir='/media/vid/DLS Data/VidS/Uv vis/seq4Amod3 0.5mM/0.2 inkrement') seznam = os.listdir(pot) seznam = natsort.natsorted(seznam) ime1 = 'OHL' print(ime1) # print(seznam) j = 0 temp = ...
{ "repo_name": "Ossada/DLS-UVVis", "path": "lepljenje.py", "copies": "1", "size": "1726", "license": "mit", "hash": 3754448304778722000, "line_mean": 22.6575342466, "line_max": 105, "alpha_frac": 0.4536500579, "autogenerated": false, "ratio": 3.143897996357013, "config_test": false, "has_no_ke...
__author__ = 'vid' import os import numpy as np import lmfit as lm import matplotlib.pyplot as plt from matplotlib.patches import * import natsort import tkinter.filedialog as tk def beri(poti): lagtime = [] corr = [] with open(poti, encoding='windows-1250') as file: for i in range(33): ...
{ "repo_name": "Ossada/DLS-UVVis", "path": "fitDLS.py", "copies": "1", "size": "4722", "license": "mit", "hash": -531374900566865900, "line_mean": 28.1481481481, "line_max": 113, "alpha_frac": 0.5251006143, "autogenerated": false, "ratio": 2.686966420034149, "config_test": false, "has_no_keywo...
__author__ = 'vid' import sys import serial from datetime import datetime import time import numpy as np import matplotlib.pyplot as plt def pretvorba(x): # Funkcija pretvori upornost v temperaturo r0 = 100.00 # Parametri so za pt100 sondo v območju od 0 do 661°C a = 3.90830 * 10 ** (-3) b = -5.77500 ...
{ "repo_name": "Ossada/DLS-UVVis", "path": "termo.py", "copies": "1", "size": "2572", "license": "mit", "hash": 3788198392063791000, "line_mean": 24.8383838384, "line_max": 90, "alpha_frac": 0.6100899492, "autogenerated": false, "ratio": 2.492202729044834, "config_test": false, "has_no_keyword...
__author__ = 'vid' import natsort import tkinter.filedialog as tk import os import matplotlib.pyplot as plt def beriInt(poti): intensity1 = [] intensity2 = [] time = [] with open(poti, encoding='windows-1250') as file: for line in file: temp = line.strip().split('\t') ...
{ "repo_name": "Ossada/DLS-UVVis", "path": "Intensity_rate.py", "copies": "1", "size": "3011", "license": "mit", "hash": 3646683360959847400, "line_mean": 24.7264957265, "line_max": 95, "alpha_frac": 0.5463609172, "autogenerated": false, "ratio": 2.898843930635838, "config_test": false, "has_n...
__author__ = 'viirus' from rest_framework.generics import RetrieveAPIView, ListAPIView, CreateAPIView from rest_framework.views import APIView, Response from .models import TallyUser from .serializers import PublicTallyListSerializer, TallySerializer, BalanceSerializer from datetime import datetime class PublicTallyA...
{ "repo_name": "vIiRuS/Tallyr", "path": "tally_sheet/api.py", "copies": "1", "size": "2064", "license": "mit", "hash": -5106084455491229000, "line_mean": 36.5272727273, "line_max": 86, "alpha_frac": 0.6177325581, "autogenerated": false, "ratio": 4.363636363636363, "config_test": false, "has_no...
__author__ = 'viirus' from rest_framework.serializers import ModelSerializer, SerializerMethodField, Serializer, SlugRelatedField, FloatField from .models import Tally, Item, TallyUser from django.db.models import Count class ItemSerializer(ModelSerializer): class Meta: model = Item class PublicTallySe...
{ "repo_name": "vIiRuS/Tallyr", "path": "tally_sheet/serializers.py", "copies": "1", "size": "1649", "license": "mit", "hash": -6290735176152066000, "line_mean": 27.9298245614, "line_max": 119, "alpha_frac": 0.6634323833, "autogenerated": false, "ratio": 3.852803738317757, "config_test": false, ...
__author__ = 'Vijaysrinivas Rajagopal' from datetime import datetime import os class ChatStruct: """ Small class structure to help Kommand.getchatresponse() """ __slots__ = ['index', 'time', 'playername', "type", "message", "noner", "all"] def __init__(self): self.index = None se...
{ "repo_name": "MedicAlert/py4f", "path": "Chatter.py", "copies": "1", "size": "2537", "license": "mit", "hash": 2214455519078889000, "line_mean": 35.7826086957, "line_max": 120, "alpha_frac": 0.5313362239, "autogenerated": false, "ratio": 3.714494875549048, "config_test": false, "has_no_keywo...
__author__ = 'Vijaysrinivas Rajagopal' from p4youtside import * from ClientFace import * from RCONBase import * #racial, religious, and more! Brought to you by the letter T, S, and A! class Profiling: """ Used for grabbing extraneous player information from Player Profile Pages for later use. IMPORTANT NO...
{ "repo_name": "MedicAlert/py4f", "path": "PlayerFace.py", "copies": "1", "size": "3457", "license": "mit", "hash": -3208494856513166000, "line_mean": 37.4111111111, "line_max": 114, "alpha_frac": 0.5953138559, "autogenerated": false, "ratio": 3.6466244725738397, "config_test": false, "has_no_...
__author__ = 'Vijaysrinivas Rajagopal' from RCONBase import TCPBARE from Chatter import* import ClientFace import datetime import threading, time, difflib class PlayerStruc: """ Class is used for reference when storing information given by the command bf2cc pl. """ __slots__ = ['index', 'playername'...
{ "repo_name": "MedicAlert/py4f", "path": "Kommands.py", "copies": "1", "size": "31585", "license": "mit", "hash": -1590993304773915100, "line_mean": 29.1969407266, "line_max": 134, "alpha_frac": 0.5899319297, "autogenerated": false, "ratio": 3.729484000472311, "config_test": false, "has_no_ke...
__author__ = 'Vijaysrinivas Rajagopal' import socket, hashlib class TCPBARE: """ Basic setup for a TCP connection to an RCON-enabled server. Supported bases => BF2, BFH, BFP4F(Main), BF2142 """ def __init__(self, IP, PORT, BUFFER, RCONPW, SERVER = socket.socket(socket.AF_INET, socket.SOCK_STREA...
{ "repo_name": "MedicAlert/py4f", "path": "RCONBase.py", "copies": "1", "size": "4270", "license": "mit", "hash": -1476574346393184500, "line_mean": 34.5916666667, "line_max": 120, "alpha_frac": 0.5826697892, "autogenerated": false, "ratio": 4.326241134751773, "config_test": false, "has_no_key...
__author__ = 'Vijaysrinivas Rajagopal' import urllib.request, urllib.error, json class GrabSource: """ Grabs needed files (usually in JSON format) for processing and compiling during runtime """ def __init__(self): self.rawdata = "" self.jsondata = None def sourcegrab(self, url):...
{ "repo_name": "MedicAlert/py4f", "path": "p4youtside.py", "copies": "1", "size": "1792", "license": "mit", "hash": 7114934637549169000, "line_mean": 32.2037037037, "line_max": 111, "alpha_frac": 0.5848214286, "autogenerated": false, "ratio": 4.157772621809745, "config_test": false, "has_no_ke...
from pyVim.connect import SmartConnect, Disconnect from pyVmomi import vim import atexit import ssl import sys import argparse import getpass # Script to confirm whether EVC cluster is patched or not for Spectre vulenerability. def get_args(): """ Get arguments from CLI """ parser = argparse.ArgumentParser( ...
{ "repo_name": "vThinkBeyondVM/vThinkBVM-scripts", "path": "pyVmomi vSphere python SDK/is_evc_cluster_patched.py", "copies": "1", "size": "3565", "license": "mit", "hash": 2975647998988774000, "line_mean": 29.4700854701, "line_max": 140, "alpha_frac": 0.64628331, "autogenerated": false, "ratio": 3...
#TODO: Some additional formatting and null check pending but that is not a blocker to run this script import requests import json import ssl import atexit import sys import argparse import getpass from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(Inse...
{ "repo_name": "vThinkBeyondVM/vThinkBVM-scripts", "path": "vCenter REST APIs using Python/vsphere_with_k8s/configure_supervisor_cluster.py", "copies": "1", "size": "8691", "license": "mit", "hash": 7648435032979726000, "line_mean": 34.618852459, "line_max": 168, "alpha_frac": 0.5856633299, "autogen...
import requests import json import ssl import atexit import sys import argparse import getpass from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) s=requests.Session() s.verify=False def get_args(): """ Get arguments from ...
{ "repo_name": "vThinkBeyondVM/vThinkBVM-scripts", "path": "vCenter REST APIs using Python/vsphere_with_k8s/create_namespace.py", "copies": "1", "size": "5496", "license": "mit", "hash": 737119923830149900, "line_mean": 31.7142857143, "line_max": 131, "alpha_frac": 0.5933406114, "autogenerated": fal...
from pyVim.connect import SmartConnect, Disconnect from pyVmomi import vim import atexit import ssl import sys import time #Script to check whether EVC can be enabled on cluster with given EVCMode s=ssl.SSLContext(ssl.PROTOCOL_TLSv1) s.verify_mode=ssl.CERT_NONE si= SmartConnect(host="10.160.50.60", user="Administra...
{ "repo_name": "vThinkBeyondVM/vThinkBVM-scripts", "path": "pyVmomi vSphere python SDK/CheckConfigureEvcMode.py", "copies": "1", "size": "2151", "license": "mit", "hash": -8258736312138886000, "line_mean": 36.7368421053, "line_max": 138, "alpha_frac": 0.6657368666, "autogenerated": false, "ratio":...
from pyVim.connect import SmartConnect, Disconnect from pyVmomi import vim import atexit import ssl import sys #Script to enable EVC on cluster s=ssl.SSLContext(ssl.PROTOCOL_TLSv1) s.verify_mode=ssl.CERT_NONE si= SmartConnect(host="10.160.50.60", user="Administrator@vsphere.local", pwd="VMware#12",sslContext=s) cont...
{ "repo_name": "vThinkBeyondVM/vThinkBVM-scripts", "path": "pyVmomi vSphere python SDK/enableEVC.py", "copies": "1", "size": "1704", "license": "mit", "hash": -3549425227470977500, "line_mean": 34.5, "line_max": 138, "alpha_frac": 0.6848591549, "autogenerated": false, "ratio": 3.4918032786885247, ...