repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ibagrak/algae | gae/tests/test_i18n.py | 1 | 3855 | import webapp2
import webtest
import unittest2
import copy
import urllib
import logging
from google.appengine.ext import testbed
from google.appengine.ext import db
from webapp2_extras import json
from webapp2_extras.appengine.auth import models as users
import app
import settings
import handlers
import re
from core ... | mit | -3,105,536,637,220,046,300 | 35.367925 | 95 | 0.746304 | false | 3.144372 | true | false | false |
Mr-meet/PythonApplets | spiders_packege/xunlei_girl/PageProcessor.py | 1 | 1671 | from bs4 import BeautifulSoup
import time
from spiders_packege.unit.ResourcesDowmloader import ResourcesDownloader
from spiders_packege.unit.ResourcesProcessor import ResourcesProcessor
class PageProcessor:
def __init__(self):
pass
def dealAllImg(basePath,list,webDriver):
baseDetailUrl='http... | mit | 5,768,753,674,798,561,000 | 36.860465 | 91 | 0.62815 | false | 3.215415 | false | false | false |
d1b/python-nmap-xml-output-parser | nmap_xml_to_sqlite.py | 1 | 4251 | #!/usr/bin/env python
from lxml import etree
import sqlite3
import os
import datetime
from shows_hosts_with_open_port_and_service_desc import parse_opts
__program__ = 'python_convert_nmap_xml_to_sqlite_db'
___author__ = 'dave b. <db@d1b.org>'
__license__ = 'GPL v2'
class nmap_xml_to_sqlite:
def __init__(self, filen... | bsd-2-clause | -8,696,299,061,923,030,000 | 35.025424 | 97 | 0.669019 | false | 3.027778 | false | false | false |
hyphaltip/cndtools | util/genbank2fa.py | 1 | 1140 | #!/usr/bin/env python
# Copyright (c) 2006
# Colin Dewey (University of Wisconsin-Madison)
# cdewey@biostat.wisc.edu
#
# 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 Li... | gpl-2.0 | -2,270,592,912,808,029,700 | 26.142857 | 75 | 0.742982 | false | 3.596215 | false | false | false |
cgrebeld/pymel | maya/app/startup/basic.py | 1 | 4322 | """
This module is always imported during Maya's startup. It is imported from
both the maya.app.startup.batch and maya.app.startup.gui scripts
"""
import atexit
import os.path
import sys
import traceback
import maya
import maya.app
import maya.app.commands
from maya import cmds, utils
def setupScriptPaths():
"""
... | bsd-3-clause | 1,507,193,115,536,711,700 | 36.912281 | 101 | 0.696668 | false | 3.745234 | false | false | false |
loxodes/fairbanks_hackathon_landsat_viewer | landsat_theater.py | 1 | 6073 | # jon klein, jtklein@alaska.edu
# utility to display landsat-8 images for the decision theater north
# created during fairbanks 2015 hackathon
# mit license
import datetime
import time
import subprocess
import pdb
import re
import ast
import os
import argparse
from PIL import Image, ImageDraw, ImageFont
from geopy.g... | mit | 6,940,265,505,476,265,000 | 33.117978 | 135 | 0.65503 | false | 3.61919 | false | false | false |
SweetPalma/Perver | perver.py | 1 | 18147 | #!/usr/bin/python
# coding: utf-8
# Perver - tiny Python 3 server for perverts.
# Check README and LICENSE for details.
from sys import platform as os_platform
from hashlib import sha1 as hash_id
from urllib.parse import unquote
from mimetypes import guess_type
from traceback import format_exc
from functools import wra... | mit | 1,527,089,193,175,442,400 | 25.686765 | 87 | 0.639885 | false | 3.170335 | false | false | false |
maku77/contest | codejam/2014_Round1A/A-ChargingChaos.py | 1 | 2170 | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Contest: Google Code Jam - 2014 Round A [2014-04-26]
# Problem: A. Charging Chaos
# URL: https://code.google.com/codejam/contest/2984486/dashboard
# Author: Masatoshi Ohta
# Strategy:
# 2 つのビット列の xor を取ると、異なる部分が分かることを利用する。
# 初期配置のリスト init[] の 1 つ目 init[0] のビット... | mit | -1,554,268,937,330,754,300 | 28.37931 | 70 | 0.589202 | false | 2.078049 | false | false | false |
MSeifert04/nddata | nddata/nddata/mixins/ndreduce.py | 1 | 16463 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from ...utils.copyutils import do_copy
import numpy as np
from ..nduncertainty_stddev import StdDevUncertainty
from ..nduncertainty_var import ... | bsd-3-clause | 6,610,416,277,689,173,000 | 42.323684 | 79 | 0.586892 | false | 4.213719 | false | false | false |
diophantus7/plugin.video.romwod | resources/lib/wistia.py | 1 | 1879 | import re
import requests
import xbmc
import json
try:
from BeautifulSoup import BeautifulSoup
except ImportError:
from bs4 import BeautifulSoup
_JSON_URL = "http://fast.wistia.com/embed/medias/%s.json"
_IFRAME_URL = "http://fast.wistia.net/embed/iframe/%s"
class ResolveError(Exception):
def _... | gpl-3.0 | 3,844,811,310,062,879,000 | 31.396552 | 102 | 0.548164 | false | 3.662768 | false | false | false |
open-io/oio-swift | tests/unit/common/middleware/test_hashedcontainer.py | 1 | 2935 | # Copyright (C) 2016-2020 OpenIO SAS
#
# 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 writi... | apache-2.0 | 5,798,349,336,250,656,000 | 32.352273 | 85 | 0.643271 | false | 3.596814 | true | false | false |
andreas-h/pybtex | pybtex/style/sorting/invyear_author_title.py | 1 | 2418 | # Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Andrey Golovizin
#
# 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 ... | mit | 2,218,421,661,150,355,000 | 41.421053 | 88 | 0.674938 | false | 4.050251 | false | false | false |
sdiehl/rpygtk | rpygtk/lib/rsession.py | 1 | 16192 | # Copyright 2009-2010 Stephen Diehl
#
# This file is part of RPyGTK and distributed under the terms
# of the GPLv3 license. See the file LICENSE in the RPyGTK
# distribution for full details.
import rpy2.robjects as robjects
from rpy2 import rinterface
import time
import numpy
from ui import prefs
import threading
im... | gpl-3.0 | 519,104,289,013,916,160 | 27.862745 | 112 | 0.573617 | false | 3.826087 | false | false | false |
cechrist/cardoon | cardoon/devices/memductor.py | 1 | 6848 | """
:mod:`memductor` -- Basic (nonlinear) memductor
-----------------------------------------------
.. module:: memductor
.. moduleauthor:: Carlos Christoffersen
"""
import numpy as np
from cardoon.globalVars import const, glVar
import cardoon.circuit as cir
import cppaddev as ad
class Device(cir.Element):
r"""
... | gpl-3.0 | 7,188,436,473,438,162,000 | 32.242718 | 79 | 0.475905 | false | 4.014068 | false | false | false |
Tomographer/tomographer | test/pytest_t_tools_densedm.py | 1 | 1933 | #!/usr/bin/env python
from __future__ import print_function
import re
import numpy as np
import numpy.testing as npt
import logging
logging.basicConfig(level=logging.DEBUG)
import unittest
# import the module
import tomographer.tools.densedm
import tomographer.tools.densedm.mle
import tomographer
import tomographe... | mit | 5,261,438,763,180,251,000 | 27.426471 | 84 | 0.606829 | false | 2.830161 | true | false | false |
unball/strategy | simple_strategy/potential_fields.py | 1 | 3902 | #!/usr/bin/env python
import numpy as np
#Convert vector from cartesian to polar coordinate
#@vector = [x, y]
def cart2polar(vector):
x = vector[0]
y = vector[1]
r = np.sqrt(x*x + y*y)
th = np.arctan2(y, x)
return np.array([r, th])
#Convert vector from polar to cartesian coordinate
#@vector = [r, ... | mit | -7,559,067,572,238,686,000 | 32.350427 | 117 | 0.644541 | false | 3.806829 | false | false | false |
cmpitg/blutkit | blutkit/gui/keycombination.py | 1 | 8206 | #
# Copyright 2013 © Nguyễn Hà Dương (cmpitgATgmailDOTcom)
#
# This file is part of Blutkit.
#
# Blutkit 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) a... | gpl-3.0 | -4,797,116,071,737,052,000 | 30.417625 | 77 | 0.602073 | false | 4.147699 | false | false | false |
mazi-project/back-end | lib/sht11.py | 1 | 1426 | #!/usr/bin/pytho
import sys
import warnings
def help_message():
print ' '
print 'sht11'
print ' --help Displays this usage message '
print ' --detect Displays if the sensor is connected on Raspberry Pi'
print ' -h , --humidity Displ... | mit | -2,510,886,870,512,368,600 | 26.960784 | 97 | 0.570827 | false | 3.347418 | false | false | false |
dvu4/Data-Wrangling-with-MongoDB | Lesson_4_Working_with_MongoDB/23-Using_$in_Operator/find_cars.py | 1 | 1106 | #!/usr/bin/env python
""" Your task is to write a query that will return all cars manufactured by "Ford Motor Company"
that are assembled in Germany, United Kingdom, or Japan.
Please modify only 'in_query' function, as only that will be taken into account.
Your code will be run against a MongoDB instance that we have ... | agpl-3.0 | 656,383,715,339,374,500 | 30.6 | 113 | 0.679928 | false | 3.650165 | false | false | false |
TartuNLP/nazgul | nmtnazgul.py | 1 | 6225 | #!/usr/bin/python3
import sock
import translator
import sys
import html
import json
from time import time
from nltk import sent_tokenize
from constraints import getPolitenessConstraints as getCnstrs
from log import log
# IP and port for the server
MY_IP = '172.17.66.215'
MY_PORT = 12346
supportedStyles = { 'fml'... | mit | -6,915,478,788,811,677,000 | 29.970149 | 145 | 0.667952 | false | 3.670401 | false | false | false |
Flamacue/pretix | src/tests/multidomain/test_urlreverse.py | 2 | 3969 | import pytest
from django.conf import settings
from django.test import override_settings
from django.utils.timezone import now
from tests import assert_num_queries
from pretix.base.models import Event, Organizer
from pretix.multidomain.models import KnownDomain
from pretix.multidomain.urlreverse import build_absolute_... | apache-2.0 | 7,996,995,170,991,871,000 | 32.635593 | 120 | 0.693878 | false | 3.16255 | true | false | false |
xaedes/canopen_301_402 | src/canopen_301_402/datatypes.py | 1 | 7126 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import struct
from canopen_301_402.utils import collect_all_leaf_subclasses
from canopen_301_402.utils import parseIntAutoBase
from canopen_301_402.constants import CanOpenBasicDatatypes
class CanDatatype(object):
def __init__(self):
'''
@summary: a... | mit | -3,884,830,007,540,805,600 | 30.396476 | 90 | 0.621807 | false | 4.254328 | false | false | false |
ccxt/ccxt | examples/py/kraken-fetch-my-trades-pagination.py | 1 | 1540 | # -*- coding: utf-8 -*-
import os
import sys
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root + '/python')
import ccxt # noqa: E402
exchange = ccxt.kraken({
'apiKey': 'YOUR_API_KEY',
'secret': 'YOUR_API_SECRET',
'enableRateLimit': True, # requir... | mit | -830,446,503,497,661,400 | 31.765957 | 106 | 0.596104 | false | 3.39207 | false | false | false |
MadMac/PyTetris | src/main/main.py | 1 | 1650 | import pygame, sys, os, random
from classes import *
from pygame.locals import *
blocksFile = "blocks.txt"
thisBlock = ""
allBlocks = []
boardWidth = 15
boardHeight = 20
gameOver = False
# Make all the blocks which are in file "blocks.txt"
file = open(blocksFile, "r")
while file:
line = file.readline()
if l... | mit | -2,331,694,246,887,766,000 | 23.626866 | 111 | 0.664242 | false | 3.481013 | false | false | false |
openslack/openslack-web | openslack/apps/company/views.py | 1 | 1072 | # encoding:utf-8
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from apps.company.models import Company, Comment
from django.shortcuts import get_object_or_404
from utils.page import paginator_objects
def index(request):
return render_to_response('index.html', {... | apache-2.0 | -7,157,730,011,399,489,000 | 29.285714 | 90 | 0.701887 | false | 3.630137 | false | false | false |
localhuman/neo-python | examples/json-rpc-api-server.py | 1 | 2783 | #!/usr/bin/env python3
"""
This example provides a JSON-RPC API to query blockchain data, implementing `neo.api.JSONRPC.JsonRpcApi`
"""
import argparse
import os
from logzero import logger
from twisted.internet import reactor, task
from neo import __version__
from neo.Core.Blockchain import Blockchain
from neo.Imple... | mit | 3,520,455,970,852,346,400 | 34.227848 | 104 | 0.701761 | false | 3.690981 | true | false | false |
ehua7365/RibbonOperators | TEBD/mpstest8.py | 1 | 5968 | """
mpstest8.py
A test of manipulating matrix product states with numpy.
2014-08-25
"""
import numpy as np
import matplotlib.pyplot as plt
from cmath import *
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
def main():
#test3()
getMPS(randomState(2,5),3).shape
def test3():
""" Test MPS ... | mit | -5,615,611,594,896,353,000 | 31.972376 | 88 | 0.575737 | false | 2.874759 | true | false | false |
PolyCortex/pyMuse | pymuse/signal.py | 1 | 1235 | from dataclasses import dataclass
from threading import Event
from pymuse.utils.stoppablequeue import StoppableQueue
@dataclass
class SignalData():
"""
Dataclass for a signal data point. Event_marker attribute is optional
"""
time: float
values: list
event_marker: list = None
class Signal():... | mit | 1,287,241,640,009,721,900 | 31.5 | 101 | 0.670445 | false | 3.871473 | false | false | false |
abcdef123/stem | stem/response/events.py | 1 | 30484 | import datetime
import re
import StringIO
import stem
import stem.control
import stem.descriptor.router_status_entry
import stem.response
import stem.version
from stem.util import connection, log, str_tools, tor_tools
# Matches keyword=value arguments. This can't be a simple "(.*)=(.*)" pattern
# because some positi... | lgpl-3.0 | -4,938,717,986,826,051,000 | 34.653801 | 164 | 0.673468 | false | 3.723009 | false | false | false |
henriquebastos/fixofx | bin/ofxfix.py | 1 | 9764 | #!/usr/bin/env python
# Copyright 2005-2010 Wesabe, 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 ... | apache-2.0 | -8,566,761,918,685,850,000 | 38.530364 | 87 | 0.643589 | false | 3.836542 | false | false | false |
samdroid-apps/browse | pdfviewer.py | 1 | 21028 | # Copyright (C) 2012, One Laptop Per Child
#
# 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-2.0 | 9,211,314,109,004,162,000 | 33.872305 | 81 | 0.606097 | false | 3.810801 | false | false | false |
gamechanger/dusty | tests/unit/systems/known_hosts/init_test.py | 1 | 2430 | import os
import tempfile
from mock import patch
import dusty.constants
from dusty.systems.known_hosts import ensure_known_hosts
from ....testcases import DustyTestCase
@patch('dusty.systems.known_hosts._get_known_hosts_path')
@patch('dusty.systems.known_hosts.check_output')
class TestKnownHostsSystem(DustyTestCase)... | mit | -5,612,656,755,419,461,000 | 41.631579 | 108 | 0.677366 | false | 3.111396 | true | false | false |
mucow24/statusboard | darksky.py | 1 | 1582 | import time
import urllib2
import json
import sys
Default_Lat = 40.697017
Default_Lon = -73.995267
Request_Url = "https://api.forecast.io/forecast"
def getWeather(key, lat = Default_Lat, lon = Default_Lon):
request = "%s/%s/%s,%s" % (Request_Url, key, lat, lon)
u = urllib2.urlopen(request)
return json.loads(u.... | gpl-2.0 | 5,671,711,468,693,888,000 | 25.366667 | 68 | 0.600506 | false | 2.819964 | false | false | false |
PaddlePaddle/models | PaddleAudio/examples/panns/parse_result.py | 1 | 2990 | # Copyright (c) 2021 PaddlePaddle 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 appli... | apache-2.0 | 3,274,352,965,856,468,500 | 34.595238 | 118 | 0.652508 | false | 3.432836 | false | false | false |
zsiki/realcentroid | realcentroid_dialog.py | 1 | 4135 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
RealCentroidDialog
A QGIS plugin
Create internal point for a polygon layer
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
... | gpl-2.0 | -666,068,943,287,623,000 | 39.539216 | 78 | 0.536397 | false | 4.709567 | false | false | false |
morucci/repoxplorer | repoxplorer/index/__init__.py | 1 | 4623 | # Copyright 2016, Fabien Boucher
#
# 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 ... | apache-2.0 | 8,594,167,975,764,877,000 | 34.561538 | 77 | 0.567597 | false | 3.904561 | false | false | false |
maczniak/emberjs | website_rebase.py | 1 | 3151 | #!/usr/bin/python
#
# The original Ember.js website is under http://emberjs.com/. And translation
# website is under http://maczniak.github.io/emberjs/. Then all absolute urls
# were broken. I failed to search generic html rebase tools, made a simple
# script in Python. It is a specific solution to this problem.
# ... | mit | -3,186,537,805,941,783,600 | 29.892157 | 109 | 0.675341 | false | 2.781112 | false | false | false |
google/glazier | glazier/lib/actions/domain.py | 1 | 1479 | # Copyright 2016 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,751,999,170,932,907,000 | 35.073171 | 74 | 0.721433 | false | 3.660891 | false | false | false |
markgw/jazzparser | lib/nltk/parse/earleychart.py | 1 | 18301 | # -*- coding: utf-8 -*-
# Natural Language Toolkit: An Incremental Earley Chart Parser
#
# Copyright (C) 2001-2010 NLTK Project
# Author: Peter Ljunglöf <peter.ljunglof@heatherleaf.se>
# Rob Speer <rspeer@mit.edu>
# Edward Loper <edloper@gradient.cis.upenn.edu>
# Steven Bird <sb@csse.unimelb.edu... | gpl-3.0 | 8,186,104,699,162,732,000 | 39.939597 | 112 | 0.575847 | false | 4.234151 | false | false | false |
sassoftware/rpath-product-definition | doc/example.py | 1 | 5275 | #
# Copyright (c) SAS Institute 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 w... | apache-2.0 | 2,042,442,910,359,023,400 | 42.595041 | 87 | 0.647583 | false | 3.670842 | false | false | false |
janmtl/drift_qec | drift_qec/A_old.py | 1 | 4165 | """
Exposes the 5 parameter unital channel.
"""
import numpy as np
import scipy as sp
from scipy.linalg import polar
PDIAG = np.zeros((9, 9))
for esi in np.eye(3):
one = np.kron(esi, esi)
PDIAG = PDIAG + np.outer(one, one)
PDIAG = PDIAG.astype(np.int)
FIXEDQ = np.array([[-0.1911, 0.3136, -0.9301],
... | isc | 7,062,491,971,050,405,000 | 29.625 | 76 | 0.507803 | false | 2.654557 | false | false | false |
IECS/MansOS | tools/IDE/src/upload_module.py | 1 | 5090 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2008-2012 the MansOS team. 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,
# ... | mit | 1,440,115,819,273,884,700 | 39.07874 | 77 | 0.654813 | false | 3.669791 | false | false | false |
ajing/clusterVis | LigandsPlot.py | 1 | 2385 | """
Display a list of ligand structures in file
"""
import os
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
from TreeParser import *
from NodeReference import *
IMAGE_DIR = "./Image"
def ReturnFileDir(ligandname):
return os.path.join(IMAGE_DIR, ligandname)
def IndexOfLigands():
infile... | apache-2.0 | 2,718,396,933,683,163,000 | 32.591549 | 115 | 0.630608 | false | 2.849462 | false | false | false |
CiscoSystems/nova-solver-scheduler | nova/tests/scheduler/test_solver_scheduler_host_manager.py | 1 | 7720 | # Copyright (c) 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 ... | apache-2.0 | -4,972,781,149,865,470,000 | 41.888889 | 78 | 0.587565 | false | 3.977331 | true | false | false |
waaaaargh/katzenblog | katzenblog/model.py | 1 | 2234 | from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from katzenblog import db
from katzenblog.util import slugify
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String)
passwordhash = db.Column(db.String)
... | gpl-3.0 | 453,065,405,940,258,600 | 30.464789 | 78 | 0.601164 | false | 3.851724 | false | false | false |
Kwentar/ImageDownloader | Internet.py | 1 | 4529 | import os
import shutil
from threading import Thread
import urllib
import requests
from tqdm import tqdm
class Internet:
@staticmethod
def write_to_failed_image_urls_file(file_name, image_url, failed_image_urls_file):
"""
Check image in file and write it if need
:param file_name: image... | mit | -2,301,983,070,617,782,500 | 38.043103 | 105 | 0.539633 | false | 4.029359 | false | false | false |
annahs/atmos_research | util_migrate_sqlite_table_to_mysql.py | 1 | 2193 | import sys
import os
import numpy as np
import sqlite3
import mysql.connector
#connect to sqlite database
conn = sqlite3.connect('C:/projects/dbs/SP2_data.db')
c = conn.cursor()
#connect to mysql database
cnx = mysql.connector.connect(user='root', password='Suresh15', host='localhost', database='black_carbon')
curs... | mit | 8,911,286,735,066,189,000 | 25.433735 | 338 | 0.670315 | false | 2.323093 | false | false | false |
yeraydiazdiaz/nonrel-blog | django_mongodb_engine/base.py | 1 | 8661 | import copy
import datetime
import decimal
import sys
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.backends.signals import connection_created
from django.db.utils import DatabaseError
from pymongo.collection import Collection
from pymongo.connection import Co... | bsd-3-clause | -4,339,837,880,499,807,000 | 32.700389 | 78 | 0.608013 | false | 4.614278 | false | false | false |
jmesteve/saas3 | openerp/addons_extra/l10n_es_payment_order/remesas.py | 1 | 6715 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2006 ACYSOS S.L.. (http://acysos.com) All Rights Reserved.
# Pedro Tarrafeta <pedro@acysos.com>
#
# Corregido para instalación TinyERP estándar 4.2.... | agpl-3.0 | 5,191,690,641,885,414,000 | 53.422764 | 282 | 0.626681 | false | 3.459432 | false | false | false |
fieldOfView/pyQNodesEditor | qneport.py | 1 | 4898 | # Copyright (c) 2014, ALDO HOEBEN
# Copyright (c) 2012, STANISLAW ADASZEWSKI
#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
# ... | bsd-3-clause | 2,503,830,618,461,107,700 | 28.154762 | 94 | 0.652511 | false | 4.024651 | false | false | false |
norling/metlab | metlab/external.py | 1 | 2186 | #!/usr/bin/env python2.7
import os
import time
import logging
import threading
from subprocess import Popen, PIPE
class External(threading.Thread):
def __init__(self, name="", args = [], log_name = "external", pid = 0, log_level = logging.INFO, wd=None):
threading.Thread.__init__(self)
self.n... | gpl-3.0 | -6,979,680,684,814,166,000 | 35.433333 | 133 | 0.521043 | false | 3.931655 | false | false | false |
kelceydamage/raspi | raspi/sensors/grove/i2c/color.py | 1 | 15702 | import smbus2 as smbus
import time
import math
import RPi.GPIO
"""
## License
The MIT License (MIT)
Copyright (c) 2016 Frederic Aguiard
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 re... | apache-2.0 | 6,583,448,653,865,636,000 | 44.648256 | 120 | 0.626735 | false | 3.449473 | false | false | false |
gbolet/BlenderCacheManager | clearCache.py | 1 | 4262 | bl_info = {
"name": "BVH Cache Manager",
"category": "Render",
"description":"Easily delete cached BVH data!",
"location":"Properties Editor > Render > BVH Cache Manager",
"author":"Gregory Bolet",
"version":"001",
"warning":"Alpha Version"
}
import bpy
import os
import shutil
cacheDirec... | mit | -270,100,889,357,932,200 | 29.442857 | 122 | 0.591272 | false | 4.178431 | false | false | false |
simudream/GeoIP2-python | setup.py | 1 | 1626 | #!/usr/bin/env python
import codecs
import os
import sys
import geoip2
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
packages = ['geoip2']
requirements = [i.strip() for i in ... | apache-2.0 | -3,090,010,712,760,477,700 | 28.563636 | 72 | 0.619311 | false | 3.880668 | false | false | false |
itpubs/reflecting | apps/users/models.py | 1 | 1816 | from django.contrib.auth.models import AbstractUser
from django.db import models
from utils.default_model import random_nick_name
from blog.models import Article
__all__ = [
'UserProfile',
'EmailVerifyCode',
'Message',
'Comment',
'Reply'
]
# Create your models here.
class UserProfile(AbstractUse... | mit | -6,211,186,313,144,723,000 | 28.639344 | 100 | 0.69635 | false | 3.623246 | false | false | false |
dhocker/athomepowerlineserver | commands/delete_device_program.py | 1 | 1356 | #
# Delete a device program
# Copyright © 2020 Dave Hocker
#
# 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, version 3 of the License.
#
# See the LICENSE file for more details.
#
from command... | gpl-3.0 | -1,568,335,787,459,006,700 | 30.511628 | 70 | 0.631734 | false | 4.131098 | false | false | false |
vsoch/docfish | scripts/import/upload_storage.py | 1 | 5156 | #!/usr/bin/env python
# This is an example script to upload data (images, text, metadata) to
# google cloud storage and datastore (for general data)
# Preparation of Pubmed Open Access Data
ftp_base = "ftp://ftp.ncbi.nlm.nih.gov/pub/pmc"
file_list = "ftp://ftp.ncbi.nlm.nih.gov/pub/pmc/oa_file_list.txt"
from glob im... | mit | -8,730,548,330,262,620,000 | 31.427673 | 81 | 0.579519 | false | 3.780059 | false | false | false |
aleroddepaz/python-samples | justanotherchat/chat.py | 1 | 1885 | import os
import json
import random
import logging
import urlparse
import webapp2
from google.appengine.api import channel
from google.appengine.ext import db
from google.appengine.ext.webapp import template
class Client(db.Model):
username = db.StringProperty(required=True)
token = db.StringProperty(require... | mit | -4,153,536,256,127,778,000 | 28.920635 | 69 | 0.632361 | false | 3.846939 | false | false | false |
beeftornado/plex-custom-media-scanner | Scanners/Movies/Tivo Movie Scanner.py | 1 | 5478 | #!/usr/bin/env python
# Copyright (C) 2013 Casey Duquette
#
# 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 late... | gpl-2.0 | -1,551,859,463,111,051,500 | 37.577465 | 180 | 0.529755 | false | 2.833937 | false | false | false |
gorbyo/admin_couchdb | admin_couchdb/couch_set_repl.py | 1 | 2231 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# couch_set_repl.py
#
# Copyright 2013 Oleh Horbachov <gorbyo@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 versio... | gpl-3.0 | -5,853,721,085,586,909,000 | 32.298507 | 105 | 0.670551 | false | 3.718333 | false | false | false |
kjedruczyk/phabricator-tools | py/abd/abdi_processrepoarglist.py | 1 | 16178 | """Process a list of repository arguments."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# abdi_processrepoarglist
#
# Public Functions:
# do
# determine_max_workers_default
# fetch_if_n... | apache-2.0 | -3,659,248,281,344,877,600 | 31.949084 | 79 | 0.580232 | false | 3.901133 | false | false | false |
dmsovetov/pygling | Pygling/Target/Executable.py | 1 | 1531 | #
# The MIT License (MIT)
#
# Copyright (c) 2015 Dmitry Sovetov
#
# https://github.com/dmsovetov
#
# 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 limit... | mit | 8,647,078,688,976,270,000 | 41.555556 | 125 | 0.755715 | false | 4.115591 | false | false | false |
malja/cvut-python | cviceni08/01_trideni_karet.py | 1 | 1202 | import copy
cards = [[0, 'Q'], [2, '6'], [1, 'K'],
[1, '8'], [2, '10'], [2, '4'],
[3, '4'], [0, '4'], [1, '3'],
[2, '5'], [0, 'K'], [3, 'A'],
[1, 'J'], [0, '3'], [0, '9']]
def cardTypeAsInt( card ):
if card[1].isdigit():
return int(card[1])
if card[1] == "J":
... | mit | -2,594,362,512,075,148,000 | 20.818182 | 63 | 0.446667 | false | 3.015075 | false | false | false |
tswicegood/Dolt | dolt/__init__.py | 1 | 8781 | import httplib2
import urllib
try:
import json
except ImportError:
import simplejson as json
try:
from decorator import decorator
except ImportError:
# No decorator package available. Create a no-op "decorator".
def decorator(f):
def decorate(_func):
def inner(*args, **kwargs):... | bsd-3-clause | -1,242,726,497,648,566,800 | 27.237942 | 102 | 0.512015 | false | 4.285505 | false | false | false |
nitheesh/AutoMoveMouse | appind.py | 1 | 6321 | #!/usr/bin/env python
import os
import os.path
import pygtk
pygtk.require('2.0')
import gtk
import time
import subprocess
import threading
import atexit
import commands
import appindicator
from Xlib import display
MaxIdle = 10
lockFile = "/tmp/automouse.lck"
appFile = "/tmp/appfile.lck"
# Touch the signal file on sc... | gpl-2.0 | 8,106,481,789,371,758,000 | 28.820755 | 129 | 0.615567 | false | 3.529313 | false | false | false |
EduPepperPDTesting/pepper2013-testing | lms/djangoapps/sso/sp_metadata.py | 1 | 7015 | from mitxmako.shortcuts import render_to_response
import xmltodict
from django.http import HttpResponse
import json
from django.conf import settings
from collections import defaultdict
import os
from OpenSSL import crypto
import re
from path import path
from permissions.decorators import user_has_perms
BASEDIR = setti... | agpl-3.0 | 8,215,661,476,016,799,000 | 30.886364 | 147 | 0.566358 | false | 3.49005 | false | false | false |
memsharded/conan | .ci/jenkins/pr_tags.py | 1 | 2199 | import argparse
import json
import os
from github import Github
def _get_value(body, tag):
pos = body.lower().find(tag.lower())
if pos != -1:
cl = body[pos + len(tag):].splitlines()[0]
return cl.strip()
return None
def get_tag_from_pr(pr_number, tag):
"""Given a PR number and a tag... | mit | -1,919,777,983,848,685,300 | 27.192308 | 88 | 0.56935 | false | 3.277198 | false | false | false |
yandy/sea | setup.py | 1 | 2143 | import os
import re
import ast
from setuptools import setup, find_packages
_version_re = re.compile(r'__version__\s+=\s+(.*)')
_root = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(_root, 'sea/__init__.py')) as f:
version = str(ast.literal_eval(_version_re.search(
f.read()).group(1)))... | mit | -2,994,986,565,607,564,000 | 28.763889 | 70 | 0.597294 | false | 3.840502 | false | false | false |
dragoon/edX-AI-course | search/util.py | 1 | 29256 | # util.py
# -------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
#
# Attrib... | mit | -1,549,650,670,089,234,400 | 36.945525 | 100 | 0.556262 | false | 3.473759 | false | false | false |
MrHamdulay/myjvm | defaultclassloader.py | 1 | 1741 | from __future__ import absolute_import
import os.path
try:
# let's not use rzipfile for now (it's really really slow in python)
raise Exception
from rpython.rlib.rzipfile import RZipFile
ZipFile = RZipFile
except:
RZipFile = None
from zipfile import ZipFile
from classreader import ClassReader
f... | mit | 1,773,738,263,681,068,000 | 30.089286 | 84 | 0.608271 | false | 4.464103 | false | false | false |
Murali-group/GraphSpace | graphspace/authorization.py | 1 | 3499 | import applications.users as users
import applications.graphs as graphs
from graphspace.exceptions import UserNotAuthorized
from graphspace.utils import get_request_user
class UserRole:
ADMIN = 3
LOGGED_IN = 2
LOGGED_OFF = 1 # When user is not logged in to GraphSpace.
def user_role(request):
"""
Returns the us... | gpl-2.0 | 5,456,867,437,812,151,000 | 44.454545 | 166 | 0.76136 | false | 3.481592 | false | false | false |
moagstar/python-uncompyle6 | uncompyle6/parsers/astnode.py | 1 | 1501 | import sys
from uncompyle6 import PYTHON3
from uncompyle6.scanners.tok import NoneToken
from spark_parser.ast import AST as spark_AST
if PYTHON3:
intern = sys.intern
class AST(spark_AST):
def isNone(self):
"""An AST None token. We can't use regular list comparisons
because AST token offsets mi... | mit | -742,535,194,500,020,400 | 30.93617 | 67 | 0.476349 | false | 4.112329 | false | false | false |
miqui/python-hpOneView | examples/scripts/get-network-set.py | 1 | 3747 | #!/usr/bin/env python
###
# (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP
#
# 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 limita... | mit | 5,146,794,782,429,188,000 | 31.582609 | 79 | 0.655991 | false | 4.024705 | false | false | false |
Renmusxd/RSwarm | bot.py | 1 | 8829 | import numpy
from collections import OrderedDict
class Bot:
ID_NUM = 0
# Populated by GET_NINPUTS
VISION = None
INPUTS = None
NINPUTS = None
# Populated by GET_NACTIONS
ACTIONS = None
NACTIONS = None
VIEW_DIST = 100.0
FOV = 60 # Angular distance from center
VISION_BINS = ... | mit | 7,979,461,654,846,873,000 | 29.236301 | 119 | 0.562691 | false | 3.45693 | false | false | false |
mvaled/sentry | src/sentry/api/endpoints/organization_eventid.py | 1 | 2224 | from __future__ import absolute_import
import six
from rest_framework.response import Response
from sentry import eventstore
from sentry.api.base import DocSection
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.exceptions import ResourceDoesNotExist
from sentry.api.serializers import ... | bsd-3-clause | -6,328,588,570,410,256,000 | 33.75 | 97 | 0.61241 | false | 4.377953 | false | false | false |
unomena/tunobase | tunobase/corporate/company_info/contact/models.py | 1 | 1349 | """
CONTACT APP
This modules sets up the database structure for the contact app.
Classes:
ContactMessage
Functions:
n/a
Created on 23 Oct 2013
@author: michael
"""
from django.db import models
from django.contrib.sites.models import Site
from django.conf import settings
from tunobase.corporate.company_in... | bsd-3-clause | 9,177,308,814,407,269,000 | 23.981481 | 77 | 0.656783 | false | 3.86533 | false | false | false |
sebastienhupin/qxrad | qooxdoo/tool/pylib/ecmascript/frontend/tree.py | 1 | 24785 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
#
# qooxdoo - the new era of web development
#
# http://qooxdoo.org
#
# Copyright:
# 2006-2010 1&1 Internet AG, Germany, http://www.1und1.de
#
# License:
# LGPL: http://www.gnu.org/li... | lgpl-3.0 | -3,710,500,687,276,511,700 | 30.775641 | 186 | 0.553319 | false | 4.414856 | false | false | false |
emc-openstack/storops | storops_test/unity/jh_mock.py | 1 | 1253 | # coding=utf-8
# Copyright (c) 2015 EMC Corporation.
# 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
#
#... | apache-2.0 | -8,038,427,901,715,396,000 | 35.852941 | 78 | 0.667997 | false | 3.642442 | false | false | false |
mdehus/goose-IEC61850-scapy | goose.py | 1 | 5622 | import struct
import binascii
from scapy.all import *
import BER
class ASNType(object):
tag = ''
def __init__(self, data='', length=0):
pass
def unpack(self, data):
raise NotImplemented()
def pack(self, data):
raise NotImplemented()
def __str__(self):
return str... | gpl-2.0 | -9,140,397,460,529,846,000 | 28.129534 | 71 | 0.505692 | false | 3.421789 | false | false | false |
denys-duchier/Scolar | ZopeProducts/exUserFolder/__init__.py | 1 | 3400 | #
# Extensible User Folder
#
# (C) Copyright 2000-2005 The Internet (Aust) Pty Ltd
# ACN: 082 081 472 ABN: 83 082 081 472
# All Rights Reserved
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MER... | gpl-2.0 | -6,918,314,890,740,817,000 | 39 | 88 | 0.717353 | false | 3.859251 | false | false | false |
openworm/PyOpenWorm | post_install.py | 1 | 1749 | from __future__ import absolute_import
from __future__ import print_function
import os, shutil, sys
from sysconfig import get_path
from glob import glob
from pkgutil import get_loader
from subprocess import call
def get_library_location(package):
# get abs path of a package in the library, rather than locally
... | mit | 6,506,810,623,881,900,000 | 38.75 | 76 | 0.699257 | false | 3.293785 | false | false | false |
2013Commons/HUE-SHARK | apps/beeswax/src/beeswax/urls.py | 1 | 3280 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 5,420,627,907,366,661,000 | 50.25 | 120 | 0.685671 | false | 3.340122 | false | false | false |
cuckoo5/soap | Soap_know/handler/formula.py | 1 | 1592 | #coding=utf-8
import tornado.web
import util.config as config
import util.constants as constants
from db.manager import FormulaManager, OilManager
from handler.base import BaseHandler
class FormulaHandler(BaseHandler):
def initialize(self):
self.all_use = constants.use
self.all_difficult_degree ... | gpl-3.0 | 3,997,204,989,561,479,000 | 36.904762 | 114 | 0.645101 | false | 3.423656 | false | false | false |
taolei87/sru | DrQA/drqa/model.py | 1 | 5679 | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import torch
import torch.o... | mit | -4,923,884,610,044,888,000 | 35.171975 | 83 | 0.573693 | false | 3.916552 | false | false | false |
anirudhSK/chromium | tools/perf/measurements/timeline_based_measurement.py | 1 | 4448 | # Copyright 2014 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.
from metrics import timeline as timeline_module
from metrics import timeline_interaction_record as tir_module
from telemetry.page import page_measurement
fro... | bsd-3-clause | 5,216,105,921,857,188,000 | 39.436364 | 80 | 0.74955 | false | 4.172608 | false | false | false |
Sh4kE/fun-with-wiki-science | arxiv_import.py | 1 | 1272 | from bs4 import BeautifulSoup
import urllib
import config as c
from pymongo import MongoClient
client = MongoClient()
db = client.articles.entries
def gen_index(seed=db.count()):
i = seed
while True:
i +=1
yield i
index = gen_index()
def generate_filename(entry, directory = c.ARTICLE_DIR):
authors = [... | mit | 7,861,832,377,089,369,000 | 30.8 | 75 | 0.623428 | false | 3.19598 | false | false | false |
sophron/wifiphisher | wifiphisher/extensions/roguehostapdinfo.py | 1 | 4097 | """
Extension that interacts with roguehostapd to print relevant information. For example,
information regarding automatic association attacks.
"""
from collections import defaultdict
import wifiphisher.common.constants as constants
class Roguehostapdinfo(object):
"""
Handles for printing KARMA attack infor... | gpl-3.0 | -7,268,679,541,904,218,000 | 32.040323 | 107 | 0.569929 | false | 3.846948 | false | false | false |
gdreid/job-salary-prediction | code/vectorization/text_extractor.py | 1 | 6819 | '''
Created on 2016
@author: Graham Reid
Builds a 2-gram vectorizer using scikit learn count vectorizer. Only really
interesting thing here is that I didn't concatenate all of the fields together.
This helps to preserve context.
'''
import random
import pickle
import numpy as np
from sklearn.feature_extraction.text ... | gpl-3.0 | 5,507,033,565,940,186,000 | 35.859459 | 83 | 0.751723 | false | 3.419759 | false | false | false |
baseride/pyZabbixSender | pyZabbixSender/pyZabbixSenderBase.py | 1 | 7074 | # -*- coding: utf-8
# Copyright 2015 Kurt Momberg <kurtqm (at) yahoo(dot)com(dot)ar>
# > Based on work by Klimenko Artyem <aklim007(at)gmail(dot)com>
# >> Based on work by Rob Cherry <zsend(at)lxrb(dot)com>
# >>> Based on work by Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
# License: GNU GPLv2
import struct
imp... | gpl-2.0 | -1,269,972,157,071,972,000 | 37.237838 | 403 | 0.625954 | false | 4.063182 | false | false | false |
tanchao/algo | interviews/zenefits/three_sum.py | 1 | 1745 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'tanchao'
class Solution:
# @param {integer[]} nums
# @return {integer[][]}
def threeSum(self, nums):
res = []
if len(nums) < 3:
return res
nums.sort() # sorted array for value judgement
for i in range... | mit | -540,101,211,688,594,900 | 36.148936 | 89 | 0.373066 | false | 4.604222 | false | false | false |
IPIDataLab/Mongo-IRD-load | python/excell_parse.py | 1 | 9770 | #!/usr/bin/python
from xlrd import cellname
import re
from datetime import datetime
from utils import na_check, split_str_array, get_cell, geocode
#############################
#############################
# This file parses incoming
# excell workbooks to convert
# to JSON object array for input
# into MongoDB.
##... | gpl-2.0 | 8,808,311,664,993,507,000 | 26.521127 | 170 | 0.59304 | false | 2.71842 | false | false | false |
mzhr/snakepig_engine | src/game.py | 1 | 1551 | import pyglet
from pyglet.window import key
from src import world
class GameStates:
MAIN_MENU = 0
GAME_LOAD = 1
GAME_PLAY = 2
GAME_MENU = 3
class Window(pyglet.window.Window):
def __init__(self, *args, **kwargs):
# Initialize window.
super(Window, self).__init__(800, 600, *args, **kwargs)
# Initilize wi... | mit | 319,767,813,804,100,160 | 26.210526 | 57 | 0.711154 | false | 3.005814 | false | false | false |
voidpp/vcp | vcp/system_package_manager_handlers.py | 1 | 3348 | import os
import re
import logging
from subprocess import check_call, check_output, CalledProcessError, PIPE
from abc import ABCMeta, abstractmethod, abstractproperty
import platform
from .exceptions import SystemPackageManagerHandlerException
logger = logging.getLogger(__name__)
def register(name, determiner):
... | mit | -888,727,097,514,618,100 | 28.368421 | 102 | 0.629331 | false | 4.370757 | false | false | false |
srusskih/SublimeBicycleRepair | bike/refactor/inlineVariable.py | 1 | 3533 | from bike.query.findDefinition import findAllPossibleDefinitionsByCoords
from bike.query.findReferences import findReferences
from bike.parsing.parserutils import maskStringsAndRemoveComments, linecontinueRE
from bike.transformer.undo import getUndoStack
from bike.transformer.save import queueFileToSave
from parser imp... | mit | 3,738,141,442,008,807,000 | 36.585106 | 115 | 0.741296 | false | 3.730729 | false | false | false |
jkandasa/integration_tests | cfme/tests/cli/test_appliance_console.py | 1 | 14121 | import pytest
from collections import namedtuple
from wait_for import wait_for
from cfme.utils import os
from cfme.utils.log_validator import LogValidator
from cfme.utils.log import logger
from cfme.utils.conf import hidden
import tempfile
import lxml.etree
import yaml
TimedCommand = namedtuple('TimedCommand', ['comma... | gpl-2.0 | -3,463,984,314,061,797,400 | 48.547368 | 100 | 0.629913 | false | 3.364546 | true | false | false |
MLR-au/esrc-cnex | service/app/config.py | 1 | 3159 |
import os
import sys
import os.path
import ConfigParser
import collections
import traceback
import ast
from pyramid.httpexceptions import HTTPBadRequest
import logging
log = logging.getLogger(__name__)
class ConfigBase:
def __init__(self):
pass
def get(self, section, param, aslist=False):
... | bsd-3-clause | -5,075,897,506,453,778,000 | 32.606383 | 128 | 0.552073 | false | 3.919355 | true | false | false |
wagnerpeer/gitexplorer | gitexplorer/visualizations/punchcard.py | 1 | 3117 | '''
Created on 28.08.2017
@author: Peer
'''
from collections import defaultdict
import datetime
from itertools import chain
import matplotlib.pyplot as plt
from gitexplorer.basics import GitExplorerBase
def draw_punchcard(infos,
xaxis_range=24,
yaxis_range=7,
... | mit | 8,640,303,030,174,708,000 | 27.861111 | 110 | 0.616619 | false | 3.769045 | false | false | false |
jaked122/MUF-highlighting | MufLoad.py | 1 | 17718 | #!/bin/python3
from telnetlib import Telnet
import re
from hashlib import sha512
from typing import *
from time import sleep
from os import stat, path
import yaml
import argparse
import datetime
prognameMatch = re.compile("\(\(\( filename: (.+) \)\)\)")
progDependencyMatch = re.compile("\(\(\( dependsOn: (.+) \)\)\)")... | mit | -9,212,332,200,114,590,000 | 38.112583 | 122 | 0.4943 | false | 4.041515 | false | false | false |
ablifedev/ABLIRC | ABLIRC/install/external_lib/HTSeq/__init__.py | 1 | 39255 | """HTSeq is a package to process high-throughput sequencing data.
See http://www-huber.embl.de/users/anders/HTSeq for documentation.
"""
import itertools, warnings, os, shlex
try:
from _HTSeq import *
except ImportError:
if os.path.isfile( "setup.py" ):
raise ImportError( "Cannot import 'HTSeq' when work... | mit | 5,902,803,634,480,403,000 | 36.890927 | 203 | 0.543472 | false | 3.792387 | false | false | false |
jceipek/Mind-Rush | biofeedback.py | 1 | 7491 | #
# biofeedback.py
#
# Copyright (C)2011 Julian Ceipek and Patrick Varin
#
# Redistribution is permitted under the BSD license. See LICENSE for details.
#
try:
import multiprocessing
except:
raise Exception("Unable to load multiprocessing Python module.")
try:
import serial
except:
raise Exception(""... | bsd-3-clause | -5,254,349,475,841,835,000 | 37.813472 | 89 | 0.536243 | false | 4.427305 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.