repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Phobia0ptik/ThinkStats2 | code/populations.py | 68 | 2609 | """This file contains code used in "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2010 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function
import csv
import logging
import sys
import numpy as np
import pandas
import thinkpl... | gpl-3.0 | -8,179,515,665,237,356,000 | 27.358696 | 79 | 0.662323 | false | 3.392718 | false | false | false |
2gis/vmmaster | tests/unit/test_commands.py | 1 | 16406 | # coding: utf-8
import copy
import json
from mock import Mock, PropertyMock, patch
from tests.helpers import Handler, BaseTestCase, ServerMock, get_free_port, DatabaseMock
from core.exceptions import CreationException, ConnectionError, \
SessionException, TimeoutException
from core.config import setup_config, co... | mit | 3,751,269,141,683,108,000 | 32.413442 | 115 | 0.598501 | false | 3.990757 | true | false | false |
cjworld/WeddingAssist | parties/models.py | 1 | 2468 | from django.db import models
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
class Photo(models.Model):
author = models.ForeignKey(User, related_name='photos')
title = models.CharField(max_length=127, blank=True)
datetime = models.DateTimeField(auto_now_add=True... | mit | 7,828,495,767,830,519,000 | 40.847458 | 156 | 0.677472 | false | 3.51567 | false | false | false |
shearichard/spellsplash | splsplsh_project/spellweb/migrations/0004_auto_20140920_0007.py | 1 | 1789 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('spellweb', '0003_auto_20140920_0006'),
]
operations = [
migrations.CreateModel(
name='Attempt',
fiel... | gpl-3.0 | -4,937,125,536,096,705,000 | 34.078431 | 151 | 0.508664 | false | 4.352798 | false | false | false |
czechmark/neurioToPvoutput | bothTables.py | 1 | 11432 | #!/usr/bin/env python
from lxml import html
from lxml import etree
import requests
import sqlite3
import sys
import cgi
import cgitb
import datetime
import time
import subprocess
# global variables
speriod=(15*60)-1
dbname='/var/www/neuriolog.db'
ip='192.168.13.239'
endPoint='/both_tables.html'
myOption=''
# store ... | gpl-2.0 | -2,662,441,852,015,459,000 | 28.312821 | 167 | 0.595784 | false | 3.554726 | false | false | false |
mailhexu/pyDFTutils | examples/wannier_vasp/BEC_BBB.py | 1 | 2069 | #!/usr/bin/env python
from pyDFTutils.vasp.myvasp import myvasp, default_pps
from pyDFTutils.vasp.vasp_utils import read_efermi
from pyDFTutils.ase_utils.geometry import gen_disped_atoms
from ase.io import read
from pyDFTutils.wannier90.wannier import wannier_input,run_wannier
import os
def calc():
atoms = read(... | lgpl-3.0 | -5,069,794,244,428,673,000 | 22.247191 | 77 | 0.58434 | false | 2.704575 | false | false | false |
angdraug/nova | nova/tests/api/openstack/compute/contrib/test_simple_tenant_usage.py | 3 | 21257 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -7,511,676,056,559,111,000 | 38.437848 | 79 | 0.535306 | false | 4.12197 | true | false | false |
andrewjpage/plasmidtron | plasmidtron/CommandRunner.py | 2 | 1925 | import os
import logging
import subprocess
import shutil
import math
import tempfile
'''Given a list of commands run single threaded or in parallel'''
class CommandRunner:
def __init__(self, output_directory, logger, threads):
self.logger = logger
self.threads = threads
self.output_directory = output_directory... | gpl-3.0 | -8,374,165,883,074,710,000 | 32.77193 | 121 | 0.714805 | false | 3.119935 | false | false | false |
st-tu-dresden/inloop | inloop/grading/copypasta.py | 1 | 5879 | """
Plagiarism detection support using JPlag.
"""
import re
import subprocess
from pathlib import Path
from shutil import copytree
from tempfile import TemporaryDirectory
from typing import Dict, Iterable, Optional, Set
from django.conf import settings
from django.contrib.auth.models import User
from django.db.models... | gpl-3.0 | -2,051,349,845,701,333,000 | 32.403409 | 92 | 0.665079 | false | 3.898541 | false | false | false |
cedriclaunay/gaffer | python/GafferUI/GLWidget.py | 1 | 13941 | ##########################################################################
#
# Copyright (c) 2011, John Haddon. All rights reserved.
# Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... | bsd-3-clause | -7,099,908,822,228,933,000 | 34.473282 | 144 | 0.719748 | false | 3.7176 | false | false | false |
OSSystems/jenkins-job-builder | jenkins_jobs/parser.py | 2 | 16452 | #!/usr/bin/env python
# Copyright (C) 2015 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -5,172,574,663,110,602,000 | 38.835351 | 79 | 0.504194 | false | 4.707296 | true | false | false |
xflows/clowdflows | workflows/management/commands/export_all.py | 2 | 1091 | from unicodedata import category
from django.core.management.base import BaseCommand, CommandError
from workflows.models import Category, AbstractWidget, AbstractInput, AbstractOutput, AbstractOption
from django.core import serializers
from optparse import make_option
import uuid
import os
import sys
from djang... | mit | 8,983,052,174,325,971,000 | 34.433333 | 105 | 0.68011 | false | 4.086142 | false | false | false |
songjmcn/machine_learning | core/kmeans.py | 1 | 3013 | #coding=utf-8
'''
Created on 2014年6月18日
K-means 算法,将数据聚类到K个中心点
距离计算:欧式距离
中心店计算:均值法
@author: sjm
'''
import numpy as np
import random
def Euclid_dist(x,y):
if len(y.shape)==1:
return np.sqrt(np.sum(np.sum((x-y)**2)))
elif len(y.shape)==2:
return np.sqrt(np.sum((x-y)**2,axis=1))
else:
... | gpl-2.0 | -3,712,052,875,470,658,600 | 25.895238 | 80 | 0.555437 | false | 2.665722 | false | false | false |
xopok/xopok-scripts | media/dts2ac3.py | 1 | 4427 | #!/usr/bin/env python
import os
import sys
import re
import time
import subprocess
import tempfile
import xml.dom.minidom as xmldom
ac3fifo = False
def GetText(n):
return n.childNodes.item(0).data
def CreateFifo(suffix='.ac3'):
tfile, tname = tempfile.mkstemp(suffix=suffix)
os.close(tfile)
os.unlink... | mit | 8,234,692,097,620,393,000 | 27.018987 | 143 | 0.527445 | false | 3.286563 | false | false | false |
YuriGural/erpnext | erpnext/setup/doctype/company/delete_company_transactions.py | 15 | 3848 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cint
from frappe import _
from frappe.desk.notifications import clear_notifications
@frappe.whitelist()
def del... | gpl-3.0 | -4,044,735,935,855,092,700 | 37.48 | 119 | 0.695166 | false | 3.378402 | false | false | false |
unicefuganda/uSurvey | survey/forms/question_set.py | 1 | 3532 | from django import forms
from django.core.exceptions import ValidationError
from django.forms import ModelForm
from survey.models import QuestionSetChannel
from survey.models import WebAccess
from survey.models import Batch
def get_question_set_form(model_class):
class QuestionSetForm(ModelForm):
access_... | bsd-3-clause | -2,064,479,342,412,632,000 | 36.574468 | 110 | 0.554643 | false | 4.365884 | false | false | false |
BaptisteLefebvre/pyalp | pyalp/base/constant.py | 1 | 4545 | # Special value
ALP_DEFAULT = 0
ALP_INVALID_ID = 2 ** 32 - 1 # ulong maximum
# Return value
ALP_OK = 0
ALP_NOT_ONLINE = 1001
ALP_NOT_IDLE = 1002
ALP_NOT_AVAILABLE = 1003
ALP_NOT_READY = 1004
ALP_PARM_INVALID = 1005
ALP_ADDR_INVALID = 1006
ALP_MEMORY_FULL = 1007
ALP_SEQ_IN_USE = 1008
ALP_HALTED = 1009
A... | mit | 7,852,411,521,684,727,000 | 23.25 | 115 | 0.692849 | false | 2.15505 | false | false | false |
dashng/netseen | netseen/common/ns_except.py | 3 | 2391 | # Copyright 2015-2017 Cisco Systems, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | -2,226,040,746,375,711,500 | 27.807229 | 79 | 0.673777 | false | 4.403315 | false | false | false |
oVirt/jenkins | stdci_libs/struct_normalizer.py | 1 | 9373 | """struct_normalizer.py - Normalize data structures to a requested schema
Given a nested data structure `struct` it can be normalized into a specified
form like so:
result = normalize_value(ctx, struct, as=list_of(
map_with(
'field1': fallback_option(mandtory(
scalar(type=str, ... | gpl-3.0 | -6,038,026,529,675,170,000 | 37.731405 | 79 | 0.651766 | false | 4.779704 | false | false | false |
Unode/ete | examples/evol/3_branchsite_test.py | 4 | 2423 | #!/usr/bin/python
"""
15 Nov 2010
simple example to mark a tree and compute branch-site test of positive selection
"""
__author__ = "Francois-Jose Serra"
__email__ = "francois@barrabin.org"
__licence__ = "GPLv3"
__version__ = "0.0"
from ete3 import EvolTree
try:
input = raw_input
except NameError:
pass... | gpl-3.0 | -3,492,670,507,625,500,000 | 35.164179 | 126 | 0.662815 | false | 3.243641 | false | false | false |
pathfinder14/OpenSAPM | utils/WENO_method/WENOmethod.py | 1 | 5464 | import numpy as np
'''
du/dt + a du/dx = 0
WENO метод для уравнения переноса
a - параметр перед производной по x
dt - шаг по времени
dx - шаг по координате
u - начальное условие t = 0 (numpy array)
Возвращаемое значение: Следующий слой (numpy array)
'''
def WENOmethod(a, tau, h, u):
# Количество весов: Порядок = 2k... | mit | -8,156,871,276,959,244,000 | 29.11039 | 95 | 0.485979 | false | 1.993978 | false | false | false |
bmbouter/kombu | kombu/tests/async/aws/sqs/test_message.py | 9 | 1174 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from kombu.async.aws.sqs.message import AsyncMessage
from kombu.tests.async.aws.case import AWSCase
from kombu.tests.case import PromiseMock, Mock
from kombu.utils import uuid
class test_AsyncMessage(AWSCase):
def setup(self):
self.queue = ... | bsd-3-clause | -2,800,758,915,447,123,500 | 31.611111 | 78 | 0.660988 | false | 3.579268 | false | false | false |
mozman/ezdxf | src/ezdxf/entities/mleader.py | 1 | 34642 | # Copyright (c) 2018-2021, Manfred Moitzi
# License: MIT License
from typing import TYPE_CHECKING, List, Union, Optional
import copy
import logging
from collections import namedtuple
from ezdxf.lldxf import const
from ezdxf.lldxf.attributes import (
DXFAttr,
DXFAttributes,
DefSubclass,
XType,
group... | mit | -356,234,445,368,242,200 | 35.774947 | 93 | 0.577709 | false | 3.520528 | false | false | false |
davejm/pyfling | pyfling.py | 1 | 4564 | """
@author: David Moodie
"""
import json
import os
import requests
flingAPI = "https://api.superfling.com/api/v2/"
amazonAPI = "http://unii-fling.s3.amazonaws.com/"
class Fling(object):
def __init__(self, bearer):
"""Requires authentication bearer to instantiate"""
#self.bearer = ""
... | mit | 3,062,441,199,841,669,000 | 31.834532 | 119 | 0.530675 | false | 3.759473 | false | false | false |
gagneurlab/concise | docs/autogen.py | 2 | 12495 | # -*- coding: utf-8 -*-
'''
General documentation architecture:
Home
Index
- Getting started
Getting started to concise
Layers
- Preprocessing
Genomic Sequence Preprocessing
RNA Structure Preprocessing
Spline-position Preprocessing
- Data
Encode
Attract
Losses
Metrics
Eval metrics
Optimizer... | mit | -911,624,956,512,092,000 | 26.7051 | 95 | 0.54958 | false | 3.908352 | false | false | false |
jajberni/pcse_web | main/pcse/settings/default_settings.py | 1 | 2765 | # -*- coding: utf-8 -*-
# Copyright (c) 2004-2014 Alterra, Wageningen-UR
# Allard de Wit (allard.dewit@wur.nl), April 2014
"""Settings for PCSE
Default values will be read from the files 'pcse/settings/default_settings.py'
User specific settings are read from '$HOME/.pcse/user_settings.py'. Any
settings defined in use... | apache-2.0 | -1,878,564,587,037,230,300 | 37.943662 | 90 | 0.61736 | false | 4.253846 | false | false | false |
nyirog/feedlink | lib/feedlink/classify.py | 1 | 1665 | from lxml import etree
def classify(fh):
"""
Classify the feed type of the *link*
Args:
fh: url handler
Returns:
feed type: 'atom' or 'rss'
Raises:
UnknownFeedError: if the *link* does not point to a valid feed
"""
feed = fh.read()
for subclass in FeedClassifi... | gpl-2.0 | -4,236,688,970,001,432,600 | 22.785714 | 75 | 0.603003 | false | 4.335938 | false | false | false |
thompsonx/kaira | gui/projectconfig.py | 11 | 1970 | #
# Copyright (C) 2010 Stanislav Bohm
#
# This file is part of Kaira.
#
# Kaira is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License, or
# (at your option) any later versi... | gpl-3.0 | -8,147,209,288,014,349,000 | 29.78125 | 73 | 0.654315 | false | 3.703008 | false | false | false |
vegitron/django-performance-middleware | performance_middleware/middleware.py | 1 | 2842 |
from datetime import datetime
from django.conf import settings
from django.db import connection
import pstats
from cStringIO import StringIO
from random import random
import logging
try:
import cProfile as profile
except ImportError:
import profile
class PerformanceMiddleware(object):
_process_data = {}
... | apache-2.0 | 853,256,153,517,864,800 | 32.046512 | 126 | 0.612949 | false | 4.148905 | false | false | false |
raxenak/borg | src/borg/testsuite/patterns.py | 4 | 16633 | import argparse
import io
import os.path
import sys
import pytest
from ..patterns import PathFullPattern, PathPrefixPattern, FnmatchPattern, ShellPattern, RegexPattern
from ..patterns import load_exclude_file, load_pattern_file
from ..patterns import parse_pattern, PatternMatcher
def check_patterns(files, pattern, ... | bsd-3-clause | -8,637,553,673,178,634,000 | 34.616702 | 112 | 0.57903 | false | 3.288454 | true | false | false |
lucha93/RecFIN-Data-Analysis-Project | predict.py | 1 | 1522 | import sqlite3
import matplotlib.pyplot as plt
from collections import OrderedDict
import numpy as np
# Connect to database
conn = sqlite3.connect('sitedb.sqlite')
cur = conn.cursor()
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
avg_list = []
std_list = []
fo... | mit | -3,463,609,953,121,147,000 | 20.138889 | 70 | 0.65046 | false | 2.757246 | false | false | false |
DESatAPSU/DAWDs | python/plot_spectra_variations.py | 1 | 1955 | #!/usr/bin/env python
#this script plots the a white-dwarf model and its four variations in 1 simga.
#It accepts a text file will the model file names listed.
#Slight modification is required on line 61 to scale the y-axis correctly.
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Read th... | mit | 7,664,172,300,656,599,000 | 24.723684 | 79 | 0.66445 | false | 3.184039 | false | false | false |
ActiveState/code | recipes/Python/577919_Splash_Screen_GTK/recipe-577919.py | 1 | 1518 | import gtk
from time import sleep
class splashScreen():
def __init__(self):
#DONT connect 'destroy' event here!
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title('Your app name')
self.window.set_position(gtk.WIN_POS_CENTER)
main_vbox = gtk.VBox(False, ... | mit | -4,535,005,170,835,478,000 | 33.5 | 85 | 0.593544 | false | 3.350993 | false | false | false |
google/flight-lab | controller/utils/projector_test.py | 1 | 1627 | # Copyright 2018 Flight Lab authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | apache-2.0 | -5,848,118,711,507,224,000 | 25.672131 | 74 | 0.666257 | false | 3.623608 | false | false | false |
akosiorek/attend_infer_repeat | attend_infer_repeat/cell.py | 1 | 7842 | import numpy as np
import sonnet as snt
import tensorflow as tf
from tensorflow.contrib.distributions import Bernoulli, NormalWithSoftplusScale
from modules import SpatialTransformer, ParametrisedGaussian
class AIRCell(snt.RNNCore):
"""RNN cell that implements the core features of Attend, Infer, Repeat, as desc... | gpl-3.0 | -8,653,469,741,491,232,000 | 44.865497 | 120 | 0.623693 | false | 3.866864 | false | false | false |
PymientoProject/acien101 | AudioMixer/VLCControllWithArduino.py | 1 | 8591 | import CustomVLCClass
import serial
import time
import threading
time.sleep(20)
while True:
def inputListener():
inputdata = input('0 to quit the first song, 1 to quit the second song')
if(inputdata == '0'):
if a.mediaplayer.is_playing() :
a.pause()
else:
... | mit | -4,285,258,228,453,292,000 | 26.802589 | 85 | 0.304505 | false | 4.623789 | false | false | false |
verejnedigital/verejne.digital | data/server.py | 1 | 1797 | """Runs the server for backend application `data`."""
import argparse
import json
from paste import httpserver
import webapp2
import status
class MyServer(webapp2.RequestHandler):
"""Abstract request handler, to be subclasses by server hooks."""
def get(self):
"""Implements actual hook logic and re... | apache-2.0 | -5,313,645,500,533,935,000 | 22.96 | 69 | 0.634391 | false | 3.77521 | false | false | false |
ooici/coi-services | ion/services/sa/acquisition/data_acquisition_management_service.py | 1 | 63562 | #!/usr/bin/env python
"""Data Acquisition Management service to keep track of Data Producers, Data Sources and external data agents
and the relationships between them"""
from pyon.agent.agent import ResourceAgentClient
__author__ = 'Maurice Manning, Michael Meisinger'
from collections import deque
import logging
fro... | bsd-2-clause | 4,531,962,079,538,114,000 | 53.700516 | 254 | 0.653095 | false | 4.35088 | true | false | false |
rosenjens/monad | LookAhead/evaluate_timetable.py | 2 | 2302 | import csv
import PyPDF2
import re
import datetime
from datetime import date, timedelta
from fitness import Fitness
from dbConnection import DB
import toolBox
def eval(individual):
''' Evaluates best ind timetable'''
with open('timetable.csv', 'w') as csvfile1:
writer = csv.writer(csvfile1)
w... | apache-2.0 | -8,454,910,139,132,885,000 | 27.775 | 120 | 0.572546 | false | 3.755302 | false | false | false |
sumedhasingla/VTK | Filters/Points/Testing/Python/TestPointInterpolator.py | 1 | 6099 | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Parameters for debugging
res = 1000
# create pipeline
#
pl3d = vtk.vtkMultiBlockPLOT3DReader()
pl3d.SetXYZFileName(VTK_DATA_ROOT + "/Data/combxyz.bin")
pl3d.SetQFileName(VTK_DATA_R... | bsd-3-clause | -1,206,573,601,351,961,000 | 25.517391 | 72 | 0.77898 | false | 3.100661 | false | false | false |
griffinfoster/pulsar-polarization-sims | scripts/tableSlope.py | 1 | 2516 | #!/usr/bin/env python
"""
"""
import os,sys
import numpy as np
import cPickle as pkl
if __name__ == "__main__":
from optparse import OptionParser
o = OptionParser()
o.set_usage('%prog [options] [pklReduceDict.py DICT]')
o.set_description(__doc__)
o.add_option('--snr',dest='snr',default=100,type='... | mit | 6,060,779,592,940,729,000 | 36.552239 | 156 | 0.589825 | false | 3.11772 | false | false | false |
assisi/assisipy-lib | assisipy_utils/examples/exec_sim/demo_deploy/spawn_agents.py | 2 | 2263 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#from math import pi
from assisipy import sim
import argparse
#import random
from assisipy_utils import arena
from assisipy_utils.mgmt import specs
#from assisipy_utils.arena import Transformation
#import yaml
if __name__ == '__main__':
parser = argparse.ArgumentParse... | lgpl-3.0 | 8,941,692,339,584,461,000 | 32.776119 | 85 | 0.539991 | false | 3.47619 | false | false | false |
vlegoff/tsunami | src/secondaires/magie/types/grimoire.py | 1 | 4456 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause | 2,825,652,957,668,951,600 | 37.903509 | 80 | 0.655017 | false | 3.539505 | false | false | false |
nwjs/chromium.src | mojo/public/tools/bindings/pylib/mojom/generate/module.py | 2 | 32893 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This module's classes provide an interface to mojo modules. Modules are
# collections of interfaces and structs to be used by mojo ipc clients and
# server... | bsd-3-clause | -1,952,731,669,021,165,600 | 28.686823 | 80 | 0.659958 | false | 3.692938 | false | false | false |
mattnenterprise/servo | tests/wpt/web-platform-tests/tools/gitignore/gitignore.py | 8 | 4131 | import itertools
import re
import os
end_space = re.compile(r"([^\\]\s)*$")
def fnmatch_translate(pat, path_name=False):
parts = []
seq = False
i = 0
if pat[0] == "/" or path_name:
parts.append("^")
any_char = "[^/]"
if pat[0] == "/":
pat = pat[1:]
else:
... | mpl-2.0 | 3,534,001,207,476,998,700 | 25.824675 | 89 | 0.446139 | false | 4.00679 | false | false | false |
riggsd/davies | davies/pockettopo/__init__.py | 1 | 16239 | """
davies.pockettopo: Module for parsing and working with exported PocketTopo survey data
"""
from __future__ import division
from __future__ import print_function
import re
import codecs
import logging
from datetime import datetime
from collections import OrderedDict, defaultdict
log = logging.getLogger(__name__)
... | mit | 6,452,339,638,069,648,000 | 38.899263 | 151 | 0.573188 | false | 3.66073 | false | false | false |
red-hat-storage/errata-tool | errata_tool/tests/cli/test_main_cli.py | 2 | 1472 | import sys
import pytest
from errata_tool.cli import main
import errata_tool.cli.release
from errata_tool.connector import ErrataConnector
class CallRecorder(object):
def __call__(self, *args):
self.args = args
def test_short_help(monkeypatch):
monkeypatch.setattr(sys, 'argv', ['errata-tool', '-h'])... | mit | -5,617,476,978,478,982,000 | 29.040816 | 71 | 0.675951 | false | 3.360731 | true | false | false |
mx3L/archivczsk | build/plugin/src/gui/poster.py | 1 | 6972 | import Queue
import os
import shutil
import urlparse
import random
from datetime import datetime
from Plugins.Extensions.archivCZSK import log
from Plugins.Extensions.archivCZSK.engine.tools import util
from Plugins.Extensions.archivCZSK.compat import eConnectCallback
from Components.AVSwitch import AVSwitch
from To... | gpl-2.0 | 3,024,275,769,700,276,700 | 37.733333 | 142 | 0.607143 | false | 3.752422 | false | false | false |
QualiSystems/Azure-Shell | package/cloudshell/cp/azure/domain/services/task_waiter.py | 1 | 2523 | from datetime import datetime, timedelta
import time
from cloudshell.cp.azure.common.exceptions.quali_timeout_exception import QualiTimeoutException
class TaskWaiterService(object):
def __init__(self, cancellation_service):
"""
:param cancellation_service: cloudshell.cp.azure.domain.services.com... | apache-2.0 | -7,264,038,260,741,346,000 | 43.263158 | 120 | 0.674594 | false | 4.426316 | false | false | false |
hajicj/muscima | scripts/recode_cropobjects.py | 1 | 9362 | #!/usr/bin/env python
"""This is a script that ensures the specified CropObjectList files are
formatted up-to-date:
* Uses ``<Top>`` and ``<Left>``, not ``<X>`` and ``<Y>``
* Does not use ``<Selected>``
* Does not use ``<MLClassId>``
You can either provide a root directory, individual files, and ``--outdir``,
which t... | mit | 4,823,466,878,793,929,000 | 41.554545 | 93 | 0.537172 | false | 4.228546 | false | false | false |
TheNathanBlack/tell-me-to | app/main/views.py | 1 | 1758 | from flask import render_template
from . import main
@main.route('/')
@main.route('/name/<name>/')
@main.route('/<one>/name/<name>')
@main.route('/<one>/<two>/name/<name>')
@main.route('/<one>/<two>/<three>/name/<name>')
@main.route('/<one>/<two>/<three>/<four>/name/<name>')
@main.route('/<one>/<two>/<three>/<four>/... | mit | -2,252,751,368,226,385,700 | 41.878049 | 100 | 0.57281 | false | 3.167568 | false | false | false |
Eric89GXL/vispy | vispy/color/color_space.py | 1 | 6042 | # -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division # just to be safe...
import numpy as np
###############################################################################
# Ut... | bsd-3-clause | -1,485,538,623,175,610,400 | 32.381215 | 79 | 0.487421 | false | 2.862151 | false | false | false |
txomon/vdsm | vdsm/virt/vmxml.py | 1 | 16526 | #
# Copyright 2008-2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | gpl-2.0 | -1,802,004,618,766,356,000 | 33.429167 | 79 | 0.571463 | false | 4.021903 | false | false | false |
ttm/music | music/core/classes.py | 1 | 5983 | from .. import tables
from .functions import AD, V, W, H_
import numpy as n
H = H_
T = tables.Basic()
V_ = V
n_ = n
def ADV(note_dict={}, adsr_dict={}):
return AD(sonic_vector=V_(**note_dict), **adsr_dict)
class Being:
def __init__(self):
rhythm = [1.] # repetition of one second
rhythm2 = [1/2,... | gpl-3.0 | 1,482,018,997,863,734,500 | 37.10828 | 181 | 0.519639 | false | 3.194341 | false | false | false |
mckinziebrandon/DeepChatModels | chatbot/legacy/legacy_models.py | 1 | 20872 | """Sequence-to-sequence models."""
# EDIT: Modified inheritance strucutre (see _models.py) so these *should* work again.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import numpy as np
import tensorflow as tf
from tensorflow.contrib.legacy_... | mit | -301,686,413,445,935,940 | 54.363395 | 136 | 0.55711 | false | 4.457924 | false | false | false |
sejros/The-Nature-of-Python-Examples | chp04_systems/1 ParticleSystem.py | 1 | 3389 | # coding=utf-8
import random
import numpy as np
import pygame
from numpy import array as vector
WIDTH = 800
HEIGHT = 600
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
mousepos = np.array([WIDTH / 2, HEIGHT / 2])
is_mouse_down = False
is_rmouse_down = False
class Particle:
de... | mit | -4,929,973,109,470,681,000 | 25.271318 | 93 | 0.57185 | false | 3.454638 | false | false | false |
Habu-Kagumba/mini_matlab | mini_matlab/matrix.py | 1 | 2232 | #!/usr/bin/env python
"""Minimal linear algebra operations to matrices."""
import ast
import numpy as np
input_vars = {}
def save_namespace(filename='.workspace.mat'):
"""Save the current workspace."""
namespace_file = open(filename, 'wb')
namespace_file.write(str(input_vars) + '\n')
namespace_file.... | mit | 2,816,978,211,774,502,400 | 26.219512 | 62 | 0.541667 | false | 4.251429 | false | false | false |
tipsybear/actors-simulation | setup.py | 1 | 2859 | #!/usr/bin/env python
# setup
# Setup script for the actors simulation (gvas)
#
# Author: Benjamin Bengfort <bengfort@cs.umd.edu>
# Created: Thu Nov 05 15:13:02 2015 -0500
#
# Copyright (C) 2015 University of Maryland
# For license information, see LICENSE.txt
#
# ID: setup.py [] benjamin@bengfort.com $
"""
Setup s... | mit | -6,837,508,749,406,721,000 | 31.123596 | 101 | 0.562784 | false | 4.119597 | false | false | false |
electric-blue-green/GSCE-Coursework-GTIN | Task 3/Development/1.x/1.0.py | 1 | 2622 | import math, sys, csv, string, os, re
print('GCSE Controlled Assesment A453\nThomas Bass 4869\nTask 2')
database = []
def start(database, orderGtin, orderPos, orderQty, orderName, items):
print('Reading File...')
os.getcwd()
filename = 'task2.csv'
filepath = os.path.join(os.getcwd(), filename)
databas... | apache-2.0 | -418,448,345,392,284,350 | 29.578313 | 75 | 0.570393 | false | 3.448684 | false | false | false |
WojciechMula/sse-popcount | scripts/function_registry.py | 1 | 1232 | import os
import os.path
from codecs import open
from collections import OrderedDict
class FunctionRegistry(object):
def __init__(self):
self.functions = self.__parse_cpp()
def __parse_cpp(self):
root = os.path.dirname(__file__)
src = os.path.join(root, "../function_registry.cpp")
... | bsd-2-clause | 8,276,411,022,167,700,000 | 26.377778 | 66 | 0.456981 | false | 4.529412 | false | false | false |
UB-info/estructura-datos | Entrega/model.py | 1 | 1980 | class User:
def __init__(self, uid, age, gender, country, songs_played):
self.__uid = uid
self.__age = age
self.__gender = gender
self.__country = country
self.__songs_played = songs_played
#print max(so... | mit | 55,605,343,194,227,624 | 36.358491 | 112 | 0.506566 | false | 3.548387 | false | false | false |
aarshayj/easyML | easyML/models_classification.py | 1 | 59771 | #####################################################################
##### IMPORT STANDARD MODULES
#####################################################################
#Python 3 support:
from __future__ import absolute_import, division
from __future__ import print_function, unicode_literals
import pandas as p... | bsd-3-clause | 6,956,967,973,953,770,000 | 39.137646 | 190 | 0.572234 | false | 4.413098 | true | false | false |
cosven/FeelUOwn | feeluown/serializers/model_helpers.py | 1 | 2919 | from feeluown.library import AbstractProvider
from feeluown.models import SongModel, ArtistModel, \
AlbumModel, PlaylistModel, UserModel, SearchModel
from .base import try_cast_model_to_v1
class ModelSerializerMixin:
def _get_items(self, model):
model = try_cast_model_to_v1(model)
# initiali... | gpl-3.0 | 1,014,168,446,928,558,000 | 27.90099 | 77 | 0.571771 | false | 3.933962 | false | false | false |
jhdulaney/fulla | fulla/droplet.py | 1 | 5978 | #
# fulla -- work with Digital Ocean
#
# Copyright (C) 2015 John H. Dulaney <jdulaney@fedoraproject.org>
#
# Licensed under the GNU General Public License Version 2
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free ... | gpl-3.0 | -8,170,448,895,829,790,000 | 28.741294 | 127 | 0.617598 | false | 3.80522 | false | false | false |
noemis-fr/old-custom | e3z_mail_ipbox/sale.py | 1 | 2613 | # -*- coding: utf-8 -*-
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-2013 Elanz (<http://www.openelanz.fr>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foun... | agpl-3.0 | 912,175,386,903,377,700 | 40.47619 | 113 | 0.626483 | false | 3.389105 | false | false | false |
fagusMcFagel/ticketsystem | ticketsystem/ticketsystem/settings_prod.py | 1 | 1414 | """
Django settings for ticketsystem project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
... | mit | -886,011,686,743,345,400 | 24.716981 | 74 | 0.661952 | false | 3.199095 | false | false | false |
auspbro/CodeSnippets | Python/pycode_LXF/crawler_ex6.py | 1 | 1321 | # _*_ coding:utf-8 _*_
import urllib,urllib2
def loadPage(url,filename):
#根据url发送请求,获取服务器响应文件
print '正在下载' + filename
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36'}
request = urllib2.Request(url,headers = hea... | gpl-3.0 | -2,428,953,414,852,437,000 | 31.611111 | 145 | 0.622336 | false | 2.474684 | false | false | false |
kubeflow/xgboost-operator | config/samples/lightgbm-dist/main.py | 1 | 2583 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | apache-2.0 | -6,987,369,922,413,389,000 | 31.2875 | 75 | 0.646535 | false | 3.738061 | false | false | false |
sthirugn/robottelo | tests/foreman/api/test_usergroup.py | 2 | 9960 | """Unit tests for the ``usergroups`` paths.
Each ``APITestCase`` subclass tests a single URL. A full list of URLs to be
tested can be found here:
http://theforeman.org/api/1.11/apidoc/v2/usergroups.html
@Requirement: Usergroup
@CaseAutomation: Automated
@CaseLevel: Acceptance
@CaseComponent: API
@TestType: Functi... | gpl-3.0 | -3,526,521,967,801,218,600 | 32.993174 | 79 | 0.619177 | false | 3.730337 | true | false | false |
StackStorm/st2 | st2client/st2client/models/keyvalue.py | 3 | 1173 | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | 9,167,533,811,843,134,000 | 28.325 | 92 | 0.710997 | false | 3.808442 | false | false | false |
nirajkvinit/flask-headlines | upto_ch4/headlines6.py | 1 | 2953 | import feedparser
import json
import urllib.request
from urllib.parse import quote
from flask import Flask
from flask import render_template
from flask import request
from pprint import pprint
app = Flask(__name__)
RSS_FEEDS = {
'bbc' : 'http://feeds.bbci.co.uk/news/rss.xml',
'cnn' : 'http://rss.cnn.com/rss... | mit | 7,481,833,986,435,559,000 | 28.237624 | 119 | 0.642398 | false | 3.252203 | false | false | false |
junkoda/mockgallib | script/generate_mock.py | 1 | 3535 | """
This script generates a mock/random catalogue from a lightcone
python3 generate_mock.py [--random] <n>
Args:
n: index of lightcone
Options:
--param [=param.json]: parameter file
--random: generate random catalogue
Input:
halo_lightcone/lightcone_<n>.h5
rand_lightcone/lightcone_<... | gpl-3.0 | -5,826,871,821,911,481,000 | 23.548611 | 135 | 0.595191 | false | 2.761719 | false | false | false |
RacingTadpole/cmsplugin-rt | setup.py | 1 | 1454 | import os
from setuptools import setup, find_packages
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name = 'cmsplugin-rt',
version = '0.5.1',
packag... | bsd-3-clause | 7,341,109,183,959,611,000 | 43.060606 | 280 | 0.662999 | false | 3.940379 | false | true | false |
DataViva/dataviva-scripts | scripts/crosswalk/format_raw_data.py | 1 | 1434 | # -*- coding: utf-8 -*-
import os, sys, time, bz2, click
import pandas as pd
import pandas.io.sql as sql
import numpy as np
import itertools
@click.command()
@click.argument('file_path', type=click.Path(exists=True))
@click.option('output_path', '--output', '-o', help='Path to save files to.', type=click.Path(), requi... | mit | -7,191,728,656,972,591,000 | 30.173913 | 133 | 0.577406 | false | 2.9875 | false | false | false |
uskudnik/ggrc-core | src/ggrc/models/track_object_state.py | 2 | 1612 | from sqlalchemy import event
from datetime import datetime
from ggrc import db
from sqlalchemy.ext.declarative import declared_attr
from .mixins import deferred
from ggrc.login import get_current_user_id
from .reflection import PublishOnly
class HasObjectState(object):
_publish_attrs = [
PublishOnly('os_state'... | apache-2.0 | 3,622,604,706,887,073,300 | 28.309091 | 99 | 0.707196 | false | 3.408034 | false | false | false |
netvigator/myPyPacks | pyPacks/String/Eat.py | 2 | 13226 | #!/usr/bin/pythonTest
# -*- coding: utf-8 -*-
#
# string functions Eat
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.... | gpl-2.0 | 1,387,247,632,390,510,300 | 25.507014 | 121 | 0.585362 | false | 3.121548 | true | false | false |
whn09/tensorflow | tensorflow/contrib/kernel_methods/python/kernel_estimators.py | 2 | 13769 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -8,200,934,012,331,352,000 | 39.736686 | 115 | 0.701213 | false | 4.282737 | true | false | false |
Tanganelli/CoAPthon | observelayer.py | 2 | 11065 | import logging
import time
import threading
from coapthon import defines
__author__ = 'Giacomo Tanganelli'
logger = logging.getLogger(__name__)
class ObserveItem(object):
def __init__(self, timestamp, non_counter, allowed, transaction, serv=None):
"""
Data structure for the Observe ... | mit | 3,178,576,142,935,755,000 | 36.420139 | 116 | 0.566109 | false | 4.787971 | false | false | false |
jagg81/translate-toolkit | setup.py | 1 | 17005 | #!/usr/bin/env python
from distutils.core import setup, Extension, Distribution, Command
import distutils.sysconfig
import sys
import os
import os.path
from translate import __version__
from translate import __doc__
try:
import py2exe
build_exe = py2exe.build_exe.py2exe
Distribution = py2exe.Distribution
except ... | gpl-2.0 | -424,227,525,966,133,440 | 41.726131 | 163 | 0.607998 | false | 3.759673 | false | false | false |
fumitoh/modelx | modelx/qtgui/modeltree.py | 1 | 13640 | # Copyright (c) 2017-2021 Fumito Hamamura <fumito.ham@gmail.com>
# This library is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version 3.
#
# This library is distributed in the hope that it will be use... | gpl-3.0 | -8,648,158,871,068,630,000 | 28.846827 | 99 | 0.591569 | false | 4.316456 | false | false | false |
orangeYao/twiOpinion | dustbin/mode.py | 1 | 1144 | def mode():
mode = raw_input(
"The three available classification mode you can select:\n"
+ "1. set all grabed tweets as category 1 and grab category 2 by new (opposite) tag \n"
+ "2. classify grabed tweets by selecting key words \n"
+ "3. classify grabed tweets one b... | mit | 7,105,871,057,704,096,000 | 53.47619 | 147 | 0.588287 | false | 3.931271 | false | false | false |
janezkranjc/clowdflows | workflows/graphs/library.py | 4 | 1143 | import re
def graphs_create_integers(input_dict):
intStr = input_dict['intStr']
intList = []
for i in re.findall(r'\w+', intStr):
try:
intList.append(int(i))
except:
pass
if input_dict['sort'].lower() == "true":
intList.sort()
return {'intList':intLis... | gpl-3.0 | 3,909,127,524,348,086,000 | 21.88 | 65 | 0.5993 | false | 3.495413 | false | false | false |
ViktorBarzin/TechFest | techfest/management/commands/autorefreshserver.py | 1 | 8327 |
from django.contrib.staticfiles.management.commands.runserver import \
Command as RunServerCommand
from django.utils.autoreload import reloader_thread
from http import server as BaseHTTPServer
import threading as thread
import os
import sys
import subprocess
# default port number where we would run the chang... | mit | -7,501,403,048,418,236,000 | 38.464455 | 176 | 0.59241 | false | 4.52063 | false | false | false |
RadicoLabs/DIGITS | tools/test_create_db.py | 1 | 7395 | # Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
import os.path
import tempfile
import shutil
from cStringIO import StringIO
import unittest
import platform
import Queue
from collections import Counter
import shutil
import nose.tools
import mock
import PIL.Image
import numpy as np
from . import c... | bsd-3-clause | 1,129,440,676,417,889,300 | 30.468085 | 90 | 0.556187 | false | 3.61084 | true | false | false |
bashu/fluentcms-forms-builder | fluentcms_forms_builder/content_plugins.py | 1 | 3825 | # -*- coding: utf-8 -*-
from django.conf import settings
try:
from django.core.context_processors import csrf
except ImportError:
from django.template.context_processors import csrf
from django.utils.translation import ugettext_lazy as _
from django.template import RequestContext
from django.shortcuts import ... | apache-2.0 | -6,763,389,801,044,049,000 | 37.25 | 104 | 0.60366 | false | 4.104077 | false | false | false |
jkitchin/scopus | pybliometrics/scopus/serial_title.py | 1 | 7337 | from collections import namedtuple
from pybliometrics.scopus.superclasses import Retrieval
from pybliometrics.scopus.utils import check_parameter_value, get_link
class SerialTitle(Retrieval):
@property
def aggregation_type(self):
"""The type of the source."""
return self._entry['prism:aggrega... | mit | -4,404,568,984,855,321,600 | 33.608491 | 104 | 0.585525 | false | 3.92773 | false | false | false |
ncsulug/ncsulug-website | lug_events/models.py | 1 | 4371 | from django.core.exceptions import ValidationError
from django.db import models
def ncsu_semester(date):
"""
An algorithm for estimating NC State University semester start dates.
* Spring is January 1-May 14.
* Summer is May 15-August 14.
* Fall is August 15-December 31.
"""
if date.month ... | gpl-3.0 | 6,551,252,841,250,338,000 | 39.850467 | 83 | 0.511782 | false | 4.596215 | false | false | false |
bepo13/destiny-stl-generator | src/main.py | 1 | 1203 | import os
from BungieDatabase import BungieDatabase
outputPath = "../stl"
def main():
print("Welcome to the Destiny stl generator")
# Create a Bungie Database object and connect to it
db = BungieDatabase()
db.connect()
if not os.path.exists(outputPath):
print("Creating stl outpu... | mit | 89,564,502,718,134,220 | 26.976744 | 68 | 0.557772 | false | 4.34296 | false | false | false |
ChinaMassClouds/copenstack-server | openstack/src/nova-2014.2/nova/api/openstack/compute/contrib/createserverext.py | 100 | 1156 | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | gpl-2.0 | -591,397,606,980,651,900 | 37.533333 | 78 | 0.679066 | false | 4.070423 | false | false | false |
tkf/rash | rash/daemon.py | 1 | 6617 | # Copyright (C) 2013- Takafumi Arakaki
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed ... | gpl-3.0 | 5,581,733,001,531,351,000 | 34.196809 | 75 | 0.614176 | false | 4.027389 | false | false | false |
li-yuntao/SiliconLives | BasicModels/page_rank.py | 1 | 1448 | # coding: utf-8
import random
import numpy as np
def fake_adjacency_list(node_size):
adjancency_list = {}
for node_src in range(node_size):
adjancency_list[node_src] = []
threshold = random.random()
for node_dst in range(node_size):
p_jump = random.random()
if ... | gpl-3.0 | -1,871,651,116,630,963,000 | 29.166667 | 75 | 0.604972 | false | 3.100642 | false | false | false |
JayVora-SerpentCS/vertical-hotel | hotel/models/hotel.py | 1 | 46745 | # -*- coding: utf-8 -*-
# See LICENSE file for full copyright and licensing details.
import time
import datetime
from odoo.exceptions import UserError, ValidationError
from odoo.osv import expression
from odoo.tools import misc, DEFAULT_SERVER_DATETIME_FORMAT
from odoo import models, fields, api, _
from decimal import... | agpl-3.0 | -5,164,944,052,077,309,000 | 40.07645 | 79 | 0.507413 | false | 4.29681 | false | false | false |
go-bears/rally | samples/plugins/context/context_plugin.py | 2 | 3091 | # Copyright 2013: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -6,515,033,223,136,696,000 | 34.125 | 78 | 0.572307 | false | 4.299026 | true | false | false |
dennybaa/mistral | mistral/db/sqlalchemy/types.py | 1 | 3760 | # -*- coding: utf-8 -*-
#
# Copyright 2013 - Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | -6,777,889,495,756,849,000 | 29.322581 | 77 | 0.645745 | false | 4.321839 | false | false | false |
BD2KGenomics/toil-old | src/toil/batchSystems/mesos/test/__init__.py | 1 | 2292 | from abc import ABCMeta, abstractmethod
import logging
import shutil
import threading
import time
import subprocess
import multiprocessing
log = logging.getLogger(__name__)
class MesosTestSupport(object):
"""
A mixin for test cases that need a running Mesos master and slave on the local host
"""
def ... | mit | 4,546,301,206,306,912,000 | 32.217391 | 117 | 0.59075 | false | 4.071048 | false | false | false |
ecolell/pfamserver | pfamserver/api/v0/pfam.py | 1 | 2139 | from flask_restplus import Resource, abort
from pfamserver.api.v0 import api, schemas
from pfamserver.services import pfam_service
from pfamserver.extensions import cache
from flask import request
from zlib import compress
from base64 import b64encode
ns = api.namespace('pfams', decorators=[
api.response(200, "su... | agpl-3.0 | 22,869,584,441,214,160 | 30.455882 | 96 | 0.665732 | false | 3.363208 | false | false | false |
PhillyPUG/phillypug | settings.py | 1 | 3579 | # Django settings for phillypug project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Jason Stelzer', 'jason.stelzer@gmail.com'),
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postg... | bsd-3-clause | 2,050,719,463,421,289,200 | 34.088235 | 120 | 0.690696 | false | 3.451302 | false | false | false |
madsbuch/GridDispenser | dispenserrun/printrun/printrun/gcoder.py | 1 | 21325 | #!/usr/bin/env python
# This file is copied from GCoder.
#
# GCoder is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GCoder is distr... | gpl-2.0 | -9,158,954,328,203,161,000 | 35.205433 | 154 | 0.516952 | false | 3.82237 | false | false | false |
Weffe/NigelThornberry-Bot | PickleList.py | 1 | 2696 | __author__ = 'Rogelio Negrete - Weffe'
import pickle
import random
import time
from datetime import datetime
class PickleList:
def __init__(self, nameoffile):
self.nameoffile = nameoffile
self.pickle_list = self.load_pickle_list()
def load_pickle_list(self):
with open(self.nameoffile,... | mit | 725,602,132,936,203,400 | 30.717647 | 100 | 0.570475 | false | 3.824113 | false | false | false |
tonningp/spritewalker | assets/space/ch09/space.py | 1 | 3672 | """ space.py
simulate a spacecraft with
no traction at all
"""
import pygame, math
pygame.init()
class Ship(pygame.sprite.Sprite):
def __init__(self, screen):
pygame.sprite.Sprite.__init__(self)
self.screen = screen
self.imageThrust = pygame.image.load("shipThrust.pn... | gpl-3.0 | -5,523,270,527,935,922,000 | 27.869919 | 73 | 0.528322 | false | 3.817048 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.