repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
oyajiro/l2bot | hf/summon.py | 1 | 2046 | import pyautogui, win32api, win32con, ctypes, autoit
from PIL import ImageOps, Image, ImageGrab
from numpy import *
import os
import time
import cv2
import random
from Bot import *
def main():
bot = Bot()
print bot.title
autoit.win_wait(bot.title, 5)
counter = 0
poitonUse = 0
cycle = True
... | artistic-2.0 | 5,049,899,790,833,278,000 | 29.088235 | 109 | 0.472141 | false | 3.415693 | false | false | false |
flyinactor91/AVWX-Engine | avwx/parsing/core.py | 1 | 16833 | """
Contains the core parsing and indent functions of avwx
"""
# pylint: disable=redefined-builtin
# stdlib
import datetime as dt
from calendar import monthrange
from copy import copy
from typing import List, Tuple
# library
from dateutil.relativedelta import relativedelta
# module
from avwx.static.core import (
... | mit | -8,660,489,207,002,912,000 | 28.898757 | 92 | 0.540308 | false | 3.567825 | false | false | false |
mmktomato/zenmai-bts | test/zenmai_test_utils.py | 1 | 2119 | """Utilities of test case class."""
import uuid
from contextlib import contextmanager
from . import ctx
from web.models.issue import Issue
from web.models.comment import Comment
from web.models.attached_file import AttachedFile
from web.models.user import User
def create_issue(subject=None, comments=None, state_id=1)... | mit | 6,357,490,482,258,823,000 | 24.841463 | 89 | 0.633318 | false | 3.659758 | false | false | false |
reo7sp/vk-text-likeness | vk_text_likeness/users_data.py | 1 | 10261 | import os
import random
import traceback
from collections import defaultdict
from datetime import date
import time
import pickle
import vk_api
from vk_text_likeness.lda_maker import LdaMaker
from vk_text_likeness.tools import cache_by_entity_id
from vk_text_likeness.logs import log_method_begin, log_method_end
clas... | apache-2.0 | 8,707,272,348,462,577,000 | 34.382759 | 153 | 0.524218 | false | 3.910442 | false | false | false |
vindeka/gate | gate/process/modules/fileinfo.py | 1 | 1518 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Vindeka, 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 requi... | apache-2.0 | -2,603,452,877,647,780,400 | 26.6 | 82 | 0.662714 | false | 3.843038 | false | false | false |
nrcharles/poplar | doc/case2/case.py | 1 | 1383 | """Single reliablity domain with discrete loads."""
import sys
sys.path.insert(0, '../../')
import logging
from caelum import eere
import poplar.environment as env
env.set_weather(eere.EPWdata('418830'))
logging.basicConfig(level=logging.WARNING)
from poplar.devices import Gateway
from poplar.storage import IdealStora... | agpl-3.0 | 2,270,577,890,393,988,000 | 26.117647 | 62 | 0.683297 | false | 3.208817 | false | false | false |
bmihelac/django-cookie-consent | cookie_consent/cache.py | 1 | 1081 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from cookie_consent.conf import settings
try:
from django.core.cache import get_cache
cache = get_cache(settings.COOKIE_CONSENT_CACHE_BACKEND)
except ImportError:
from django.core.cache import caches
cache = caches[settings.COOKIE_CONSENT_C... | bsd-2-clause | -8,385,552,924,845,782,000 | 26.025 | 60 | 0.681776 | false | 3.603333 | false | false | false |
brianmoose/civet | ci/recipe/RecipeCreator.py | 1 | 20399 |
# Copyright 2016 Battelle Energy Alliance, 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 or agr... | apache-2.0 | 6,159,137,908,449,885,000 | 45.361364 | 123 | 0.596941 | false | 4.0798 | true | false | false |
EMSTrack/WebServerAndClient | emstrack/management/commands/bootstrap.py | 1 | 1879 | from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.db import DEFAULT_DB_ALIAS
class Command(BaseCommand):
help = 'Create admin user'
def handle(self, *args, **options):
if options['verbosity... | bsd-3-clause | -8,378,157,750,521,151,000 | 31.964912 | 101 | 0.590208 | false | 4.549637 | false | false | false |
solsword/dunyazad | old/tasks/tell_story.py | 1 | 1320 | def run(self):
bind = {
"story_node": ans.Pr("story_node", ans.Vr("Node")),
"node_option": ans.Pr("at", ans.Vr("Node"), ans.Pr("option",ans.Vr("Opt"))),
}
# TODO: Auto list here
setups = [
"setup_roc_attack",
"setup_being_robbed",
]
subtask(
self,
'setup'
)
yield tn.TaskStatus.... | mit | 6,586,859,142,778,142,000 | 26.5 | 80 | 0.57803 | false | 3.341772 | false | false | false |
nolanzandi/webapp-public | webapp/apps/taxbrain/migrations/0057_auto_20150303_1525.py | 3 | 3777 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('taxbrain', '0056_auto_20150303_1519'),
]
operations = [
migrations.RenameField(
model_name='taxsaveinputs',
... | mit | -4,248,645,990,277,064,000 | 34.632075 | 73 | 0.564999 | false | 4.065662 | false | false | false |
LaurentClaessens/phystricks | src/BoundingBox.py | 1 | 8287 | # -*- coding: utf8 -*-
###########################################################################
# This is part of the module phystricks
#
# phystricks 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... | gpl-3.0 | 1,024,019,750,050,542,700 | 39.228155 | 119 | 0.612405 | false | 3.596788 | false | false | false |
ajribeiro/baseball | static/assets/makejson.py | 1 | 1506 | import string
import os
import json
f = open('baseball3.csv','r')
fj = open('baseball3.json','w')
header = f.readline()
columns = header.split(',')
for i in range(len(columns)): columns[i] = columns[i].replace("\"",'')
#set up all of the indices
allplayers = []
for line in f:
c = line.split(',')
for i in ... | bsd-3-clause | -8,401,428,325,151,577,000 | 22.546875 | 93 | 0.511952 | false | 2.743169 | false | false | false |
faush01/plugin.video.embycon | resources/lib/custom_nodes.py | 1 | 11887 | import os
import json
import xbmc
import xbmcgui
import xbmcaddon
import xbmcvfs
from .datamanager import DataManager
from .simple_logging import SimpleLogging
log = SimpleLogging(__name__)
'''
&reload=$INFO[Window(Home).Property(plugin.video.embycon-embycon_widget_reload)]
Node types :
Resume ({server}/emby/Use... | gpl-2.0 | 229,194,425,707,655,840 | 36.498423 | 254 | 0.583074 | false | 3.74158 | false | false | false |
imprazaguy/bluetool | test/ts/TP_CCO_BV-09-C.py | 1 | 1929 | # TP/CCO/BV-09-C [LE Set Data Length]
#
# Verify that the IUT correctly handles the LE Set Data Legnth Command
import bluetool
from bluetool.core import HCICoordinator, HCIWorker, LEHelper
import bluetool.bluez as bluez
import bluetool.error as bterr
from bluetool.utils import bytes2str
CONN_TIMEOUT_MS = 10000
clas... | mit | 9,103,560,230,241,608,000 | 26.169014 | 75 | 0.635562 | false | 3.275042 | true | false | false |
nigelsmall/shortwave | shortwave/connection.py | 1 | 2829 | #!/usr/bin/env python
# coding: utf-8
# Copyright 2011-2016, Nigel Small
#
# 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 require... | apache-2.0 | 3,843,425,769,866,213,000 | 28.46875 | 99 | 0.579357 | false | 4.286364 | false | false | false |
olafhauk/mne-python | examples/inverse/plot_dics_source_power.py | 9 | 4130 | """
.. _ex-inverse-source-power:
==========================================
Compute source power using DICS beamformer
==========================================
Compute a Dynamic Imaging of Coherent Sources (DICS) :footcite:`GrossEtAl2001`
filter from single-trial activity to estimate source power across a frequency... | bsd-3-clause | 4,424,176,779,474,138,000 | 40.3 | 79 | 0.594189 | false | 3.720721 | false | false | false |
kizniche/Mycodo | mycodo/tests/manual_tests/test_i2c_TCA9548A.py | 1 | 1815 | #!/usr/bin/python
# coding=utf-8
#
# Select address and channel of TCA9548A I2C multiplexer
# I2C Address: 0xYY, where YY can be 70 through 77
# Multiplexer Channel: 1 - 8
# sudo ./multiplexer_channel.py ADDRESS CHANNEL
# Example: sudo ./multiplexer_channel.py 70 1
import os
import sys
import time
import argparse
fro... | gpl-3.0 | 1,398,351,549,843,279,400 | 29.25 | 82 | 0.590083 | false | 3.386194 | false | false | false |
rajeeja/uecp | scripts/geojsontocad.py | 1 | 5399 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 15 18:27:44 2016
#This file creates utm coordinates from geojson
@author: rajeevjain
"""
import sys
import utm
import math
import geojson
import json
from pprint import pprint
import os
vcount = 0
scount = 0
xmin = -1e8
xmax = 1e8
ymin = -1e8
ymax... | lgpl-3.0 | 9,034,271,380,936,534,000 | 30.028736 | 134 | 0.543064 | false | 2.905813 | false | false | false |
keisuke-umezawa/chainer | chainermn/extensions/allreduce_persistent.py | 2 | 1615 | import chainer
import chainer.training.extension
def _namedpersistents(model):
assert isinstance(model, chainer.Link)
for lname, link in model.namedlinks():
for pname in link._persistent:
yield lname + '/' + pname, link.__dict__[pname]
class AllreducePersistent(chainer.training.extensio... | mit | 4,301,404,599,490,959,000 | 33.361702 | 74 | 0.690402 | false | 4.627507 | false | false | false |
CG-F16-24-Rutgers/steersuite-rutgers | steerstats/tools/getUniParametersFromCSV.py | 8 | 2210 |
import matplotlib
from pylab import *
import csv
from matplotlib.backends.backend_pdf import PdfPages
import sys
from os import listdir
from os.path import isfile, join
import os
sys.path.append('../')
from util import saveMatrixToCVSDict
def cvsToDict(reader):
d = {}
rows=[]
keys=[]
for row in reader... | gpl-3.0 | -8,461,477,093,822,742,000 | 26.6375 | 111 | 0.564253 | false | 3.274074 | false | false | false |
JamesStudd/PythonRPG | Data/menu.py | 1 | 3185 | import pygame as pg
import os
from Data.spritesheet_functions import SpriteSheet
from Data.images import *
from Data.level_classes import *
from Data.player_related import *
import Data.eztext
pg.init()
class Menu():
font_name = pg.font.SysFont('Terminal', 22, True, False)
txtbx = Data.eztext.Input(maxlength=... | mit | -4,669,227,183,521,442,000 | 31.171717 | 77 | 0.550706 | false | 3.823529 | false | false | false |
CUFCTL/DLBD | face-detection-code/object_detection/protos/multiscale_anchor_generator_pb2.py | 1 | 4540 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/multiscale_anchor_generator.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from... | mit | 726,884,721,790,200,200 | 42.653846 | 466 | 0.738106 | false | 3.297023 | false | true | false |
wonjunetai/pulse | preprocess/reference_genome.py | 1 | 1499 | import pickle
from preprocess.preprocess_helpers import load_sequence
from helpers.normalize_unicode_data import normalize_unicode_data
class ReferenceGenome(object):
def __init__(self):
self.chromosomes_dict = {}
self.chromosomes = {'1': '', '2': '', '3': '', '4': '', '5': '',
... | mit | -8,111,859,331,653,852,000 | 38.447368 | 89 | 0.57505 | false | 3.535377 | false | false | false |
bozzzzo/quark | quarkc/test/emit/expected/py/urlencode/urlencode_md/__init__.py | 1 | 1672 | from quark_runtime import *
import quark.reflect
class quark_List_quark_String_(quark.reflect.Class):
def _init(self):
quark.reflect.Class._init(self)
def __init__(self):
super(quark_List_quark_String_, self).__init__(u"quark.List<quark.String>");
(self).name = u"quark.List"
... | apache-2.0 | -699,476,387,149,021,600 | 24.333333 | 108 | 0.5939 | false | 3.304348 | false | false | false |
rouxcode/django-cms-plugins | cmsplugins/headers/models.py | 1 | 2039 | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from cmsplugins.baseplugin.models import BasePlugin
from filer.fields.image import FilerImageField
from . import conf
@python_2_... | mit | 3,449,750,103,153,503,000 | 25.828947 | 76 | 0.562531 | false | 4.086172 | false | false | false |
mdevaev/emonoda | emonoda/plugins/clients/ktorrent.py | 1 | 4975 | """
Emonoda -- A set of tools to organize and manage your torrents
Copyright (C) 2015 Devaev Maxim <mdevaev@gmail.com>
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 vers... | gpl-3.0 | -7,158,284,358,199,093,000 | 32.843537 | 124 | 0.629347 | false | 3.847641 | false | false | false |
VisTrails/VisTrails | vistrails/db/versions/v0_9_1/domain/workflow.py | 2 | 6925 | ###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | bsd-3-clause | -7,672,796,516,228,947,000 | 42.012422 | 79 | 0.578051 | false | 3.991354 | false | false | false |
kaashif/spacerogue | spacerogue/player.py | 1 | 10015 | import random
from spacerogue.thing import Ship, Space, Debris, Nebula
from spacerogue.items import Weapon, Item
class Player(Ship):
def __init__(self):
self.description = 'Your spaceship'
self.pos = None
self.map_scope = 'system'
self.universe = None
self.resources = {'rock': 0, 'metal': 0, 'dirt':
0, ... | bsd-2-clause | -7,892,361,648,904,902,000 | 31.728758 | 75 | 0.662207 | false | 2.817159 | false | false | false |
priyawadhwa/runtimes-common | ftl/php/layer_builder.py | 1 | 4150 | # Copyright 2017 Google 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 ag... | apache-2.0 | -2,766,263,252,726,290,000 | 37.785047 | 79 | 0.597108 | false | 3.918791 | false | false | false |
relic7/prodimages | python/download_server_imgs_byPOorStyleList.py | 2 | 6322 | #!/usr/bin/env python
import os, sys, re, csv
def sqlQuery_GetStyleVendor_ByPO(ponum):
import sqlalchemy
orcl_engine = sqlalchemy.create_engine('oracle+cx_oracle://prod_team_ro:9thfl00r@borac101-vip.l3.bluefly.com:1521/bfyprd11')
#orcl_engine = sqlalchemy.create_engine('oracle+cx_oracle://jbragato:Blu3f!y... | mit | -6,647,394,731,972,767,000 | 32.099476 | 366 | 0.5764 | false | 3.172102 | false | false | false |
team-hdnet/hdnet | hdnet/sampling.py | 1 | 20900 | # -*- coding: utf-8 -*-
# This file is part of the hdnet package
# Copyright 2014 the authors, see file AUTHORS.
# Licensed under the GPLv3, see file LICENSE for details
"""
hdnet.sampling
~~~~~~~~~~~~~~
Some simple routines for sampling from certain distributions.
"""
from __future__ import print_funct... | gpl-3.0 | 785,420,767,388,440,000 | 29.202312 | 121 | 0.587273 | false | 3.431292 | false | false | false |
orionzhou/robin | formats/anchor.py | 1 | 1371 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import os.path as op
import sys
import argparse
from jcvi.formats.base import LineFile, must_open
from jcvi.compara.synteny import AnchorFile
def ndigit(num):
if num < 1:
print("no digits: %g" % num)
sys.exit(1)
digit = 0
while num >=... | gpl-2.0 | -7,819,117,991,185,642,000 | 24.867925 | 78 | 0.589351 | false | 3.470886 | false | false | false |
le9i0nx/ansible | lib/ansible/plugins/callback/hipchat.py | 4 | 8118 | # (C) 2014, Matt Martz <matt@sivel.net>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
callback: hipchat
callback_type: notificat... | gpl-3.0 | 4,750,267,879,093,031,000 | 34.605263 | 108 | 0.572308 | false | 4.040816 | false | false | false |
alex/changes | changes/models/jobphase.py | 1 | 2078 | import uuid
from datetime import datetime
from sqlalchemy import Column, String, DateTime, ForeignKey
from sqlalchemy.orm import relationship, backref
from sqlalchemy.schema import UniqueConstraint
from changes.config import db
from changes.constants import Status, Result
from changes.db.types.enum import Enum
from c... | apache-2.0 | -922,000,869,538,150,100 | 36.781818 | 91 | 0.6718 | false | 4.066536 | false | false | false |
chirilo/kitsune | kitsune/twitter/__init__.py | 19 | 2972 | import logging
from django import http
from django.conf import settings
from twython import Twython
log = logging.getLogger('k')
PREFIX = 'custcare_'
REDIRECT_NAME = PREFIX + 'redirect'
REQUEST_KEY_NAME = PREFIX + 'request_key'
REQUEST_SECRET_NAME = PREFIX + 'request_secret'
MAX_AGE = 3600
def url(request, over... | bsd-3-clause | -3,136,574,052,342,443,500 | 26.775701 | 68 | 0.617093 | false | 3.715 | false | false | false |
guicord/django | tutorial/mysite/mysite/settings.py | 1 | 2682 | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths in... | mit | -135,164,419,192,742,160 | 25.554455 | 71 | 0.690529 | false | 3.425287 | false | false | false |
ButterFlyDevs/StudentsManagementSystem | SMS-Back-End/apigms/api/apigms_api.py | 1 | 1236 | from flask import Flask
from flask.ext.cors import CORS, cross_origin
from google.appengine.api import modules
import requests_toolbelt.adapters.appengine
# Use the App Engine Requests adapter. This makes sure that Requests uses URLFetch.
requests_toolbelt.adapters.appengine.monkeypatch()
app = Flask(__name__)
cors ... | gpl-3.0 | -5,401,297,075,357,118,000 | 27.090909 | 83 | 0.743528 | false | 3.322581 | false | false | false |
vi3k6i5/flashtext | setup.py | 1 | 1454 | from setuptools import setup, Command
import subprocess
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call(['py.test'])
raise SystemExit(errno)
name = 'flashtext'
versio... | mit | 12,474,112,431,322,932 | 24.508772 | 61 | 0.607978 | false | 3.972678 | false | false | false |
abhinandanramesh/Data-Warehousing-Using-Google-Cloud-Platform | model.py | 1 | 1260 | from google.appengine.ext import db
class BatteryInfoDB(db.Model):
Voltage = db.StringProperty(required=True)
Temperature = db.StringProperty(required=True)
Timestamp = db.DateTimeProperty(required=True)
Status = db.StringProperty(required=True)
Type = db.StringProperty(required=True)
Plugged = db.StringProper... | apache-2.0 | -2,657,916,301,500,903,400 | 38.375 | 50 | 0.788889 | false | 3.519553 | false | false | false |
kim135797531/opencog-python-blending | examples/python/conceptual_blending/networks/paul_sally/paul_sally.py | 1 | 5707 | from examples.python.conceptual_blending.networks.base_network import *
from examples.python.conceptual_blending.networks.network_util import \
make_link_all, rand_tv, make_sti_all
from opencog.type_constructors import *
__author__ = 'DongMin Kim'
# Paul & Sally example in the book 'The Way We Think'
# It is a s... | agpl-3.0 | -7,422,565,535,371,947,000 | 28.879581 | 78 | 0.520764 | false | 3.717915 | false | false | false |
louisq/staticguru | static_analysis_runner/post_build_runner.py | 1 | 6879 | """
The MIT License (MIT)
Copyright (c) 2016-2017 Louis-Philippe Querel l_querel@encs.concordia.ca
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitatio... | mit | 6,306,691,854,708,378,000 | 34.458763 | 126 | 0.653147 | false | 3.904086 | false | false | false |
wxgeo/geophar | wxgeometrie/sympy/physics/hep/gamma_matrices.py | 13 | 24161 | """
Module to handle gamma matrices expressed as tensor objects.
Examples
========
>>> from sympy.physics.hep.gamma_matrices import GammaMatrix as G, LorentzIndex
>>> from sympy.tensor.tensor import tensor_indices
>>> i = tensor_indices('i', LorentzIndex)
>>> G(i)
GammaMatrix(i)
N... | gpl-2.0 | -8,760,879,651,245,692,000 | 32.791608 | 180 | 0.572824 | false | 3.582061 | false | false | false |
JTarball/tetherbox | docker/app/app/backend/project/views/mixins.py | 4 | 27933 | import warnings
import logging
import six
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import redirect_to_login
from django.core import serializers
from django.core.exceptions import Imprope... | isc | 491,954,087,055,775,400 | 36.696356 | 206 | 0.604088 | false | 4.263929 | false | false | false |
monitorlegislativo/timeline-projetos | scripts/tramita.py | 1 | 3514 | import json
from datetime import datetime
import pyes, pprint
def ementa():
print 'Getting ementas...'
ementa_raw = open('../raw/projetos.txt', 'r')
ementas = {}
for a in ementa_raw.readlines()[2:]:
try:
b = a.split('#')
if len(a.split('#')) == 7:
pl = b[0] + '-' + b[1] + '-' + ''.join(b[2].split('/')... | mit | -1,943,029,920,402,369,300 | 25.824427 | 114 | 0.577689 | false | 2.383989 | false | false | false |
irgangla/pntools | pntools/algorithm/lpo_transitive.py | 1 | 2631 | from pntools import partialorder
from pntools.partialorder import LPO, Event, Arc
def transitive_closure(lpo):
incidence = incidence_matrix(lpo)
minimal = minimal_event_ids(lpo)
for event_id in minimal:
recursive_add_transitive_arcs(incidence, event_id)
matrix, event_ids = incidence
inva... | mit | 316,538,053,194,756,540 | 24.794118 | 73 | 0.578107 | false | 3.33038 | false | false | false |
lucidlylogicole/scope | plugins/filebrowser/scope_plugin.py | 1 | 1667 | from . import filebrowser
from PyQt4 import QtGui, QtCore
class Plugin(object):
title = 'Files'
location = 'left'
widget = None # The widget for the plugin (set at loadWidget)
def __init__(self,parent=None):
self.parent = parent
def load(self):
'''Called when loading the ... | gpl-3.0 | -6,104,120,630,875,428,000 | 38.690476 | 101 | 0.661668 | false | 3.600432 | false | false | false |
gregorianzhang/truedns | truedns6.py | 1 | 11770 | #/usr/bin/python
#-*- coding:utf-8 -*-
import SocketServer
import threading
import dnslib
import os
import sys
import socket,asyncore
import time
import struct
from Queue import Queue
from threading import Thread
import collections
import pickle
queue=Queue(5000)
#cache={}
global n
n=0
class hijacking(Thread):
... | gpl-2.0 | 7,660,186,266,513,539,000 | 29.413437 | 110 | 0.485641 | false | 3.555891 | false | false | false |
jzitelli/three.py | examples/pool_table.py | 1 | 17118 | import sys
import os.path
import json
from copy import deepcopy
import numpy as np
from flask import Blueprint, Markup, render_template, request
from flask_app import WebVRConfig, get_overlay_content
from three import *
INCH2METER = 0.0254
FT2METER = INCH2METER / 12
blueprint = Blueprint(__name__, __name__)
@blue... | mit | -1,657,817,351,933,195,300 | 51.189024 | 142 | 0.529092 | false | 3.541167 | false | false | false |
0jpq0/kbengine | kbe/tools/server/pycluster/cluster_controller.py | 1 | 18845 | # -*- coding: utf-8 -*-
import socket
import sys
import os
import struct
import traceback
import select
import getpass
import time
host = '' # Bind to all interfaces
MachineInterface_onFindInterfaceAddr = 1
MachineInterface_startserver = 2
MachineInterface_stopserver = 3
MachineInterface_onQueryAllInterfaceInfos = ... | lgpl-3.0 | -430,717,126,731,990,660 | 24.806052 | 121 | 0.628591 | false | 2.8634 | false | false | false |
hoechenberger/psychopy | psychopy/app/pavlovia_ui/functions.py | 1 | 6196 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2018 Jonathan Peirce
# Distributed under the terms of the GNU General Public License (GPL).
from __future__ import absolute_import, print_function
import os
import wx
from ._base import PavloviaMiniBrowser
from psychopy.pro... | gpl-3.0 | 492,526,972,920,384,960 | 33.614525 | 88 | 0.64929 | false | 3.56707 | false | false | false |
hakancelik96/coogger | core/cooggerapp/migrations/0004_auto_20190831_1243.py | 1 | 1792 | # Generated by Django 2.0.12 on 2019-08-31 09:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("cooggerapp", "0003_userprofile_title")]
operations = [
migrations.RenameField(
model_name="reportmodel", old_name="date", new_name="created"... | mit | 5,869,616,178,905,610,000 | 32.185185 | 82 | 0.508929 | false | 4.765957 | false | false | false |
jannon/django-allauth-api | tests/test_allauth_api.py | 1 | 25642 | from __future__ import absolute_import
import json
import re
import io
import base64
from datetime import timedelta
from email.mime.image import MIMEImage
from django import get_version
from django.utils.timezone import now
from django.test.utils import override_settings
from django.test import TestCase
from django.co... | bsd-2-clause | -245,970,044,642,092,260 | 34.077975 | 272 | 0.631893 | false | 3.949176 | true | false | false |
JayP3/pumpkin-pi | pumpkin-pi/sense_movement.py | 1 | 1171 | #!/usr/bin/env/python
import RPi.GPIO as GPIO
import blink
import time, os, random
from sys import exit
LEFT_LED = 24
RIGHT_LED = 23
PIR_POWER = 17
PIR_OUT = 4
GPIO.setmode(GPIO.BCM)
GPIO.setup(PIR_OUT, GPIO.IN)
GPIO.setup(PIR_POWER, GPIO.OUT)
GPIO.setup(LEFT_LED, GPIO.OUT)
GPIO.setup(RIGHT_LED, GPIO.OUT)
GPIO.o... | gpl-2.0 | -37,193,359,881,553,290 | 20.685185 | 70 | 0.550811 | false | 3.156334 | false | false | false |
Eficent/odoo-operating-unit | account_operating_unit/reports/account_balance.py | 1 | 5700 | # -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L. -
# Jordi Ballester Alomar
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import time
from openerp.report import report_sxw
from openerp.addons.account.report.common_report_header import \
common_report_header... | agpl-3.0 | 6,070,313,210,595,984,000 | 42.838462 | 236 | 0.544306 | false | 3.779178 | false | false | false |
cms-externals/sherpa | MODEL/UFO/c_variable.py | 1 | 3344 | from copy import deepcopy
from py_to_cpp import c_string_from_num
from ufo_exception import ufo_exception
class c_variable(object):
def __init__(self, string, pre=1.0):
self._prefac = pre
self._string = string
def __mul__(self, other):
if isinstance(other, c_variable):
... | gpl-3.0 | -1,026,717,173,462,303,000 | 32.44 | 109 | 0.529306 | false | 3.68688 | false | false | false |
HKuz/Test_Code | Graphs/graphs.py | 1 | 3032 | #!/usr/local/bin/python
# edX Intro to Computational Thinking and Data Science
# Graphs lecture code
class Node(object):
"""Creates a node for a graph"""
def __init__(self, name):
"""Assumes name is a string"""
self.name = name
def getName(self):
return self.name
def __str__... | mit | -4,903,119,621,166,774,000 | 25.831858 | 72 | 0.584763 | false | 3.465143 | false | false | false |
chibbargroup/CentralRepository | Phylogeny Scripts/construction_zone.py | 2 | 5460 | from os.path import isfile, isdir, join
from os import mkdir, listdir
from Bio import Entrez
import pandas as pd
import sys
### Always tell NCBI your email; change when used by a different user
Entrez.email = 'john.hayes@usask.ca'
#Parses through the blast results table and pulls out the GB accession numbers; functio... | mit | -7,070,376,897,283,766,000 | 40.363636 | 121 | 0.721429 | false | 3.045176 | false | false | false |
zeffii/B3D_F2GP | resources.py | 1 | 1201 | import bpy
import bmesh
triangulate = bmesh.ops.triangulate
def get_mesh(obj):
mesh_settings = (bpy.context.scene, False, 'PREVIEW')
data = obj.to_mesh(*mesh_settings)
bm = bmesh.new()
bm.from_mesh(data)
triangulate(bm, faces=bm.faces[:], quad_method=0, ngon_method=0)
return bm
def get_laye... | gpl-3.0 | -1,814,804,507,757,726,500 | 23.02 | 68 | 0.589509 | false | 3.0025 | false | false | false |
BridgeCityBicycleCoop/workstand | bikeshop/urls.py | 1 | 1820 | """bikeshop URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | mit | 4,666,077,995,227,646,000 | 34 | 81 | 0.715934 | false | 3.479924 | false | false | false |
VirusTotal/msticpy | msticpy/data/azure_data.py | 1 | 24295 | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Uses th... | mit | -4,228,764,137,741,932,000 | 35.315396 | 94 | 0.566495 | false | 4.720225 | true | false | false |
tiagocoutinho/PyTango | setup.py | 2 | 17510 | # ------------------------------------------------------------------------------
# This file is part of PyTango (http://pytango.rtfd.io)
#
# Copyright 2006-2012 CELLS / ALBA Synchrotron, Bellaterra, Spain
# Copyright 2013-2014 European Synchrotron Radiation Facility, Grenoble, France
#
# Distributed under the terms of ... | lgpl-3.0 | 1,241,340,706,975,258,600 | 28.982877 | 80 | 0.584466 | false | 3.751875 | true | false | false |
csyhuang/hn2016_falwa | hn2016_falwa/oopinterface.py | 1 | 39949 | import numpy as np
import warnings
from scipy.interpolate import interp1d
from hn2016_falwa import utilities
from hn2016_falwa.constant import *
from interpolate_fields import interpolate_fields
from compute_reference_states import compute_reference_states
from compute_lwa_and_barotropic_fluxes import compute_lwa_and_... | mit | 1,409,692,193,836,604,700 | 43.836139 | 127 | 0.590703 | false | 3.596417 | false | false | false |
Amoki/Amoki-Music | music/migrations/0009_auto_20150427_2038.py | 1 | 1506 | from __future__ import unicode_literals
from django.db import models, migrations
def set_urls(apps, schema_editor):
# We can't import the Person model directly as it may be a newer
# version than this migration expects. We use the historical version.
Music = apps.get_model("music", "Music")
Temporary... | mit | 3,457,734,497,183,027,700 | 31.042553 | 79 | 0.599602 | false | 4.07027 | false | false | false |
thuydang/djagazin | wsgi/djagazin/djagazin/settings.py | 1 | 7404 | # -*- coding: utf-8 -*-
import os
gettext = lambda s: s
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
CMS_LANGUAGES = {
1: [
{
'code': 'en',
'name': gettext('English'),
'fal... | bsd-2-clause | 4,063,488,934,742,585,000 | 27.259542 | 315 | 0.693814 | false | 3.137288 | false | false | false |
alexrudy/Zeeko | zeeko/utils/setup_package.py | 1 | 1472 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import glob
import os
import copy
from zeeko._build_helpers import get_utils_extension_args, get_zmq_extension_args, _generate_cython_extensions, pxd, h, get_package_data
from astropy_helpers import setup_helpers
utilities = [pxd("..utils.rc"),
... | bsd-3-clause | 5,465,094,608,939,885,000 | 31.733333 | 136 | 0.60462 | false | 3.564165 | false | false | false |
adamrp/qiita | qiita_pet/handlers/stats.py | 1 | 3011 | from __future__ import division
from random import choice
from moi import r_client
from tornado.gen import coroutine, Task
from qiita_core.util import execute_as_transaction
from qiita_db.util import get_count
from qiita_db.study import Study
from qiita_db.util import get_lat_longs
from .base_handlers import BaseHan... | bsd-3-clause | 7,411,990,810,406,746,000 | 36.6375 | 79 | 0.588509 | false | 3.865212 | false | false | false |
anchore/anchore-engine | anchore_engine/services/policy_engine/engine/policy/gates/packages.py | 1 | 11916 | import enum
from anchore_engine.services.policy_engine.engine.policy.gate import BaseTrigger, Gate
from anchore_engine.services.policy_engine.engine.policy.params import (
NameVersionStringListParameter,
CommaDelimitedStringListParameter,
EnumCommaDelimStringListParameter,
EnumStringParameter,
TypeV... | apache-2.0 | 8,991,123,644,024,246,000 | 36.471698 | 238 | 0.546912 | false | 4.532522 | false | false | false |
volkhin/ycmd | ycmd/tests/javascript/subcommands_test.py | 3 | 16005 | # Copyright (C) 2015 ycmd contributors
# encoding: utf-8
#
# This file is part of ycmd.
#
# ycmd 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... | gpl-3.0 | 2,846,786,196,838,676,000 | 30.167641 | 80 | 0.544437 | false | 3.830618 | true | false | false |
nortikin/sverchok | old_nodes/quaternion_out.py | 2 | 7169 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 distrib... | gpl-3.0 | -1,811,252,036,081,988,900 | 35.764103 | 92 | 0.605105 | false | 3.620707 | false | false | false |
openprocurement/openprocurement.auctions.dgf | openprocurement/auctions/dgf/utils.py | 1 | 3820 | # -*- coding: utf-8 -*-
from logging import getLogger
from pkg_resources import get_distribution
from openprocurement.auctions.core.plugins.contracting.base.utils import (
check_auction_status
)
from openprocurement.auctions.core.utils import (
TZ,
check_complaint_status,
cleanup_bids_for_cancelled_lot... | apache-2.0 | -6,858,408,186,413,946,000 | 40.978022 | 147 | 0.656021 | false | 3.634634 | false | false | false |
jokkebk/livecoding | Euler11-15/p11.py | 1 | 1795 | nums = ["08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08",
"49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00",
"81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65",
"52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91",
"22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80... | mit | 7,363,370,920,048,890,000 | 42.780488 | 70 | 0.578273 | false | 2.791602 | false | false | false |
mF2C/COMPSs | tests/sources/python/2_inheritance/src/modules/otherclasses_same_name.py | 1 | 1719 | """
PyCOMPSs Testbench derived Classes with the same names
======================================================
"""
# Imports
from pycompss.api.task import task
from .myclass import myClass
from .myclass import inheritedClassWithOverride
class inheritedClass(myClass):
pass
class inheritedClassWithOverride(myCl... | apache-2.0 | -3,654,090,295,750,444,000 | 25.045455 | 76 | 0.586387 | false | 3.634249 | false | false | false |
dignityinside/bible | usr/share/bible/bible_shift.py | 1 | 5671 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from xml.etree.ElementTree import ElementTree
class BibleShift:
"""
Класс для конвертирования места в Писании (номер главы и стиха)
из Синодального перевода в англоязычные и наоборот.
Для этого вызывается метод класса convert:
convert(int book_num, int... | gpl-3.0 | 8,761,403,111,899,394,000 | 36.492647 | 120 | 0.498137 | false | 2.780262 | false | false | false |
vanessa-bell/hd-kiosk-v2 | main/events.py | 1 | 1377 | import flask
from datetime import date, datetime, timedelta
import requests
import ssl
import config
import requests_toolbelt
if config.DEVELOPMENT:
requests_toolbelt.adapters.__path__.append('./lib/requests_toolbelt/adapters')
else:
requests_toolbelt.adapters.__path__.append('lib.zip/requests_toolbelt/adapters... | mit | 5,926,430,628,302,240,000 | 25.5 | 83 | 0.687001 | false | 3 | false | false | false |
deepfield/ibis | ibis/pandas/execution/tests/test_arrays.py | 1 | 6305 | import operator
import pandas as pd
import pandas.util.testing as tm
import pytest
import ibis
from ibis.common import IbisTypeError
def test_array_length(t, df):
expr = t.projection([
t.array_of_float64.length().name('array_of_float64_length'),
t.array_of_int64.length().name('array_of_int64_le... | apache-2.0 | 4,850,733,139,778,046,000 | 27.659091 | 79 | 0.589691 | false | 3.278731 | true | false | false |
mcepl/rope | ropetest/objectinfertest.py | 3 | 14552 | try:
import unittest2 as unittest
except ImportError:
import unittest
import rope.base.project
import rope.base.builtins
from rope.base import libutils
from ropetest import testutils
class ObjectInferTest(unittest.TestCase):
def setUp(self):
super(ObjectInferTest, self).setUp()
self.proj... | lgpl-3.0 | 7,395,421,817,239,705,000 | 42.568862 | 78 | 0.554082 | false | 3.228039 | true | false | false |
nddsg/TreeDecomps | xplodnTree/core/will_prod_rules_fire.py | 1 | 1922 | import os
import pickle
import pandas as pd
import probabilistic_cfg as pcfg
from utils import Info
from PHRG import grow
def probe_stacked_prs_likelihood_tofire(df, fname="", nbr_nodes=0):
Info("probe stacked prs likelihood tofire")
g = pcfg.Grammar('S')
df = df[['rnbr', 'lhs', 'rhs', 'prob']] # ToDo: need to drop... | mit | 4,243,676,801,469,758,500 | 26.070423 | 92 | 0.655567 | false | 2.492866 | false | false | false |
torfuspolymorphus/service | runtests.py | 2 | 1780 | #!/usr/bin/env python
# Copyright (c) 2014-2018 Florian Brucker (www.florianbrucker.de)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation th... | mit | 958,116,377,438,434,000 | 34.6 | 79 | 0.698315 | false | 3.795309 | false | false | false |
jwilk/pydiatra | tests/test_tags.py | 1 | 2989 | # encoding=UTF-8
# Copyright © 2013-2017 Jakub Wilk <jwilk@jwilk.net>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the “Software”), to deal
# in the Software without restriction, including without limitation the rights
# to use,... | mit | -5,967,958,953,565,087,000 | 34.47619 | 112 | 0.659732 | false | 3.568862 | false | false | false |
DLR-SC/prov-db-connector | examples/bundle_example.py | 1 | 1058 | from prov.model import ProvDocument
from provdbconnector import ProvDb
from provdbconnector.db_adapters.in_memory import SimpleInMemoryAdapter
prov_api = ProvDb(adapter=SimpleInMemoryAdapter, auth_info=None)
# create the prov document
prov_document = ProvDocument()
prov_document.add_namespace("ex", "http://example.co... | apache-2.0 | 6,522,541,446,289,424,000 | 23.045455 | 71 | 0.714556 | false | 2.762402 | false | true | false |
mantidproject/mantid | qt/applications/workbench/workbench/utils/windowfinder.py | 3 | 2244 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from... | gpl-3.0 | -4,572,868,537,491,545,000 | 35.193548 | 120 | 0.701426 | false | 3.98579 | false | false | false |
TommiHelander/quabro | pgu/gui/widget.py | 3 | 11434 | """This modules defines the Widget class, which is the base of the PGU widget
hierarchy."""
import pygame
from . import pguglobals
from . import style
class SignalCallback:
# The function to call
func = None
# The parameters to pass to the function (as a list)
params = None
class Widget(object):
... | gpl-3.0 | -8,505,903,034,520,612,000 | 31.951009 | 92 | 0.546178 | false | 4.56083 | false | false | false |
bhermansyah/DRR-datacenter | scripts/misc-boedy1996/getSettlementInspectorDetail.py | 1 | 15237 | import os,sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE","geonode.settings")
import csv
from django.db import connection, connections
from geodb.models import AfgFldzonea100KRiskLandcoverPop, AfgLndcrva, AfgAdmbndaAdm1, AfgAdmbndaAdm2, AfgFldzonea100KRiskMitigatedAreas, AfgAvsa, Forcastedvalue, AfgShedaLvl4, dist... | gpl-3.0 | -7,959,024,333,119,199,000 | 47.839744 | 491 | 0.678743 | false | 2.728689 | false | false | false |
abadger/stellarmagnate | magnate/utils/attrs.py | 1 | 6593 | # Stellar Magnate - A space-themed commodity trading game
# Copyright (C) 2016-2017 Toshio Kuratomi <toshio@fedoraproject.org>
#
# 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 Foundation, either ver... | agpl-3.0 | -2,496,549,824,674,571,300 | 38.244048 | 108 | 0.676323 | false | 4.351815 | false | false | false |
williezh/linuxtools | test/test_wordcounter.py | 1 | 1109 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division, unicode_literals
import os, sys
from unittest import TestCase, main
from collections import Counter
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0,parentdir)
from wordcounter imp... | mit | 1,899,919,966,672,312,800 | 33.34375 | 79 | 0.55687 | false | 3.167147 | false | false | false |
linusyang/barrelfish | tools/harness/siteconfig/eth.py | 1 | 1921 | ##########################################################################
# Copyright (c) 2009, ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092... | mit | -1,427,221,084,085,669,400 | 41.688889 | 79 | 0.652264 | false | 3.118506 | false | false | false |
sampsyo/beets | beetsplug/deezer.py | 6 | 8615 | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2019, Rahul Ahuja.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the ... | mit | 641,568,256,280,580,100 | 35.974249 | 79 | 0.581892 | false | 3.971876 | false | false | false |
simon-weber/Mirror-MediaMonkey-to-Google-Music | sync2gm/mpconf.py | 1 | 3083 | from collections import namedtuple
class GMSyncError(Exception):
"""Base class for any error originating during syncing."""
pass
class LocalOutdated(Exception):
"""Raised when a handler expects to find local information, but does not.
This usually signals that the service is attempting to update a r... | bsd-3-clause | -2,323,146,387,910,319,000 | 37.5375 | 134 | 0.689588 | false | 3.768949 | false | false | false |
Servir-Mekong/SurfaceWaterTool | lib/google/auth/crypt/es256.py | 1 | 5658 | # Copyright 2017 Google 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 required by applicable law or agreed to in writing,... | gpl-3.0 | 5,167,440,150,424,444,000 | 34.3625 | 83 | 0.658713 | false | 3.970526 | false | false | false |
cherry-hyx/hjb-test | mq/mem_t2.py | 1 | 2214 | #!/usr/bin/env python
# encoding: utf-8
"""
@version: v1.0.1
@author: cherry
@license: Apache Licence
@contact: hjb.123@163.com
@site: http://www.phpgao.com
@software: PyCharm
@project: untitled
@file: mem_t.py
@time: 2016-08-05 14:49
"""
# noinspection PyUnresolvedReferences
import redis
import datetime
import tim... | artistic-2.0 | 8,315,947,750,021,202,000 | 24.036585 | 128 | 0.605263 | false | 2.505495 | false | false | false |
jakobzhao/wbcrawler3 | backup/multithreading.py | 1 | 3788 | # !/usr/bin/python
# -*- coding: utf-8 -*-
import threading
import sqlite3
import sys
import os
#import ssl, socket
from pyquery import PyQuery as pq
reload(sys)
sys.setdefaultencoding('utf-8')
num = 20
headers = {
"User-Agent" : "Mozilla/5.3 (X11; U; FreeBSD i386; en-US; rv:1.8.1.14) Gecko/20080609 Firefo... | mit | -4,884,052,839,508,659,000 | 32.45045 | 366 | 0.552802 | false | 2.861989 | false | false | false |
Ecotrust/hnfp | hnfp/views.py | 1 | 21100 | from django.shortcuts import render, redirect, HttpResponseRedirect
# Create your views here.
from django.http import HttpResponse, JsonResponse
from django.template import loader
from django.urls import reverse_lazy
from django.contrib.auth import get_user_model, authenticate
from django.contrib.auth import login as a... | isc | -5,318,408,815,645,400,000 | 38.886578 | 197 | 0.633033 | false | 3.819696 | false | false | false |
tanghaibao/goatools | goatools/anno/init/reader_genetogo.py | 1 | 6203 | """Read an NCBI gene2go GO Association File and store the data in a Python object.
Annotations available from NCBI:
ftp://ftp.ncbi.nih.gov/gene/DATA/gene2go.gz
"""
import sys
import collections as cx
import timeit
import datetime
__copyright__ = "Copyright (C) 2016-present, DV Klopfenstein, H Tang. All ... | bsd-2-clause | 1,334,527,570,020,874,500 | 42.683099 | 111 | 0.518298 | false | 3.550658 | false | false | false |
raeeschachar/edx-e2e-mirror | regression/pages/studio/studio_home.py | 1 | 2009 | """
Dashboard page for Studio
"""
from edxapp_acceptance.pages.studio.index import DashboardPage
from bok_choy.promise import BrokenPromise
from regression.pages.studio import BASE_URL
from regression.pages.lms import BASE_URL_LMS
class DashboardPageExtended(DashboardPage):
"""
This class is an extended class... | agpl-3.0 | -7,495,516,683,454,046,000 | 30.390625 | 78 | 0.598805 | false | 3.863462 | false | false | false |
balajirrao/PyChaitin | chaitin.py | 1 | 1654 | import itertools
import fol
from fol import Exists, Variable, Conjunction, AtomicFormula, Implies, Constant
from time import sleep
from multiprocessing import Pool
pool = Pool(processes=1)
def output_f(p, n, y):
"""Predicate determining if a program p outputs y in less than or equal to n steps"""
r... | mit | 3,632,922,105,826,002,400 | 28.666667 | 112 | 0.55925 | false | 3.431535 | false | false | false |
diagramsoftware/bank-payment | account_banking_sepa_direct_debit/models/account_banking_mandate.py | 3 | 4317 | # -*- coding: utf-8 -*-
# © 2013 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api, exceptions, _
from datetime import datetime
from dateutil.relatived... | agpl-3.0 | 6,092,234,469,815,222,000 | 41.303922 | 78 | 0.554114 | false | 3.912058 | false | false | false |
mavrix93/LightCurvesClassifier | lcc/stars_processing/utilities/sax.py | 1 | 8047 |
from lcc.utils.data_analysis import to_PAA, normalize
import numpy as np
class SAX(object):
"""
This class manages symbolic representation of data series via
Symbolic Aggregate approXimation method. It translates
series of data to a words, which can then be compared with other
such words in sym... | mit | 3,337,967,995,484,697,000 | 32.390041 | 91 | 0.488754 | false | 3.403976 | false | false | false |
yafraorg/yafra-archive | yafra-python/server/run.py | 1 | 1438 | # -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. ... | apache-2.0 | -408,204,956,349,340,200 | 34.95 | 81 | 0.632823 | false | 3.939726 | false | false | false |
stephen-allison/pibot | distance_sensor.py | 1 | 1879 | import RPi.GPIO as GPIO
import time
def measureDistance():
# Set trigger to False (Low)
GPIO.output(pinTrigger, False)
# Allow module to settle
time.sleep(0.5)
# Send 10us pulse to trigger
GPIO.output(pinTrigger, True)
time.sleep(0.00001)
GPIO.output(pinTrigger, False)
# Start the ... | cc0-1.0 | -7,804,772,577,364,671,000 | 29.306452 | 156 | 0.629058 | false | 3.922756 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.