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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
deejross/python3-pywbem | lex.py | 1 | 39948 | # -----------------------------------------------------------------------------
# ply: lex.py
#
# Author: David M. Beazley (dave@dabeaz.com)
#
# Copyright (C) 2001-2009, David M. Beazley
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Lice... | lgpl-2.1 | -8,469,962,769,702,211,000 | 37.118321 | 134 | 0.495519 | false | 4.346899 | false | false | false |
4Quant/tensorflow | tensorflow/python/ops/rnn.py | 1 | 21568 | # Copyright 2015 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 a... | apache-2.0 | 5,813,275,549,810,683,000 | 39.314019 | 80 | 0.688335 | false | 3.777233 | false | false | false |
sknepneklab/SAMoS | utils/make_circular_patch.py | 1 | 3349 | # ***************************************************************************
# *
# * Copyright (C) 2013-2016 University of Dundee
# * All rights reserved.
# *
# * This file is part of SAMoS (Soft Active Matter on Surfaces) program.
# *
# * SAMoS is free software; you can redistribute it and/or modify
# * it unde... | gpl-3.0 | 5,762,786,436,947,331,000 | 31.843137 | 106 | 0.622574 | false | 3.229508 | false | false | false |
chrisjrn/registrasion | registrasion/tests/controller_helpers.py | 1 | 2034 | from registrasion.controllers.cart import CartController
from registrasion.controllers.credit_note import CreditNoteController
from registrasion.controllers.invoice import InvoiceController
from registrasion.models import commerce
from django.core.exceptions import ObjectDoesNotExist
class TestingCartController(Cart... | apache-2.0 | -5,205,401,486,481,097,000 | 31.285714 | 79 | 0.652901 | false | 4.421739 | false | false | false |
shfengcj/pyminer | pyminer_setting.py | 1 | 1142 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 23 06:53:32 2015
@author: chaojun
"""
from pyminer_cos_model import lcdm
from pyminer_residual import JLAresiCal, CMBresiCal, BAOresiCal
# Genearl setting
divMax = 15 # for romberg integral
ogh2 = 2.469e-5
JLA_DIR = '/Users/chaojun/Documents/Research/2015/grb/pyc... | gpl-2.0 | -945,975,103,707,670,100 | 18.689655 | 86 | 0.622592 | false | 2.862155 | false | false | false |
priyaganti/rockstor-core | src/rockstor/storageadmin/views/clone_helpers.py | 1 | 2535 | """
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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 la... | gpl-3.0 | -311,084,012,256,732,200 | 42.706897 | 77 | 0.680473 | false | 3.738938 | false | false | false |
lpredova/pybookie | server/sources/footbal_db.py | 1 | 3991 | # coding=utf-8
import json
import os
class FootballDB:
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
groups_file = BASE_DIR + '/sources/groups.json'
wc_history_file = BASE_DIR + '/sources/wc_history'
wc_team_file = BASE_DIR + '/sources/squads/'
top_teams = ['RealMadrid(ESP)', 'Barcelona... | apache-2.0 | -716,865,174,706,552,200 | 29.458015 | 119 | 0.525063 | false | 3.591359 | false | false | false |
flavour/eden | modules/plugins/__init__.py | 5 | 8807 | # -*- coding: utf-8 -*-
import os
import sys
from gluon import current
from gluon.storage import Storage
from s3compat import reload
__all__ = ("PluginLoader",
)
# Name of the plugin directory in modules
PLUGINS = "plugins"
# Module names to ignore when scanning for plugins
IGNORE = ("skeleton", "__ini... | mit | 2,472,458,515,809,089,000 | 29.901754 | 83 | 0.507551 | false | 5.318237 | false | false | false |
bdeak/taskmgr | fabfile/execute/install_package.py | 1 | 2064 | from fabric.api import *
import re
import os.path
import logging
import utils.log
l = logging.getLogger()
l = utils.log.CustomLogAdapter(l, None)
@task(default=True)
def check(input_params, cluster):
""" Install a given version of a given package
Can support multiple backends
input_params para... | gpl-2.0 | -5,122,457,050,969,303,000 | 28.913043 | 106 | 0.637597 | false | 4.007767 | false | false | false |
okolisny/integration_tests | scripts/post_jenkins_result.py | 1 | 2181 | #!/usr/bin/env python2
import json
import os
import os.path
from datetime import datetime
from artifactor.plugins.post_result import test_report
from cfme.utils import read_env
from cfme.utils.path import project_path
from cfme.utils.trackerbot import post_jenkins_result
job_name = os.environ['JOB_NAME']
number = int... | gpl-2.0 | 5,412,878,123,027,363,000 | 34.177419 | 78 | 0.703347 | false | 3.4896 | true | false | false |
lukeolson/clean-latex-to-arxiv | parxiv.py | 1 | 12460 | #! /usr/bin/env python
from __future__ import print_function
import glob
import re
import os
import io
import time
import shutil
import tempfile
import subprocess
import ply.lex
# Python2 FileNotFoundError support
try:
FileNotFoundError
except NameError:
FileNotFoundError = IOError
"""
usage:
python parx... | mit | -5,527,309,183,598,388,000 | 27.190045 | 80 | 0.54374 | false | 3.837388 | false | false | false |
sameenjalal/mavenize-beta | mavenize/apps/item/models.py | 1 | 2128 | from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.core.exceptions import ObjectDoesNotExist
class Item(models.Model):
item_type = models.CharField(max_length=30, default="")
four_star = models.IntegerField(default=0)
three_star = mo... | mit | 1,467,266,724,365,762,000 | 32.25 | 67 | 0.648496 | false | 3.753086 | false | false | false |
mancoast/CPythonPyc_test | fail/314_test_normalization.py | 1 | 3162 | from test.support import run_unittest, open_urlresource
import unittest
import sys
import os
from unicodedata import normalize, unidata_version
TESTDATAFILE = "NormalizationTest.txt"
TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE
if os.path.exists(TESTDATAFILE):
f = ope... | gpl-3.0 | -3,841,246,843,036,727,300 | 29.699029 | 89 | 0.504428 | false | 3.482379 | true | false | false |
kaltura/server | alpha/scripts/utils/apiGrep.py | 1 | 4097 | #!/usr/bin/python
from optparse import OptionParser
import sys
import os
def isLineLogStart(curLine):
if len(curLine) < 20:
return False
if (curLine[4] == '-' and curLine[7] == '-' and curLine[10] == ' ' and
curLine[13] == ':' and curLine[16] == ':'):
return True
return False
d... | agpl-3.0 | 4,614,323,749,777,093,000 | 28.056738 | 95 | 0.672687 | false | 3.27498 | false | false | false |
flgiordano/netcash | +/google-cloud-sdk/lib/surface/sql/instances/patch.py | 1 | 13800 | # Copyright 2013 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... | bsd-3-clause | 5,171,648,414,095,974,000 | 37.547486 | 80 | 0.672681 | false | 4.250077 | false | false | false |
tensorflow/estimator | tensorflow_estimator/python/estimator/canned/dnn_test_fc_v2.py | 1 | 19054 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -8,548,565,812,858,429,000 | 35.293333 | 80 | 0.65031 | false | 3.53769 | true | false | false |
delete/estofadora | estofadora/bills/views.py | 1 | 1602 | from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.core.urlresolvers import reverse
from .forms import BillForm
from .models import Bill
@login_required
def new(request):
context = {}
if r... | mit | 4,154,725,326,265,776,600 | 22.910448 | 64 | 0.644195 | false | 3.423077 | false | false | false |
theepicsnail/SuperBot2 | Core.py | 1 | 5362 | from PluginManager import PluginManager
from PluginDispatcher import PluginDispatcher
from Configuration import ConfigFile
from Util import call
from re import match
from sys import path
from os import getcwd
from Util import dictJoin
from Logging import LogFile
path.append(getcwd())
log = LogFile("Core")
class Cor... | mit | -4,258,690,189,499,016,000 | 29.99422 | 88 | 0.55166 | false | 4.575085 | true | false | false |
ryanpstauffer/market-vis | marketvis/quotes.py | 1 | 5030 | # -*- coding: utf-8 -*-
"""
[Python 2.7 (Mayavi is not yet compatible with Python 3+)]
Created on Wed Dec 16 22:44:15 2015
@author: Ryan Stauffer
https://github.com/ryanpstauffer/market-vis
[This module referenced http://www.theodor.io/scraping-google-finance-data-using-pandas/]
Market Visualization Prototype
Quotes M... | mit | -1,957,792,777,954,780,700 | 35.456522 | 146 | 0.669384 | false | 3.389488 | false | false | false |
caspartse/QQ-Groups-Spider | vendor/pyexcel/constants.py | 1 | 3090 | """
pyexcel.constants
~~~~~~~~~~~~~~~~~~~
Constants appeared in pyexcel
:copyright: (c) 2015-2017 by Onni Software Ltd.
:license: New BSD License
"""
# flake8: noqa
DEFAULT_NA = ''
DEFAULT_NAME = 'pyexcel sheet'
DEFAULT_SHEET_NAME = 'pyexcel_sheet1'
MESSAGE_WARNING = "We do not overwrite files"
M... | mit | 4,937,172,543,752,419,000 | 31.1875 | 90 | 0.680583 | false | 3.39934 | false | false | false |
rarcotvmw/capirca | lib/pcap.py | 1 | 15928 | # Copyright 2015 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 a... | apache-2.0 | 6,208,498,579,205,639,000 | 32.674419 | 80 | 0.604847 | false | 3.881092 | false | false | false |
gmr/infoblox | infoblox/record.py | 1 | 15975 | """
Base Record Object
"""
import logging
from infoblox import exceptions
from infoblox import mapping
LOGGER = logging.getLogger(__name__)
class Record(mapping.Mapping):
"""This object is extended by specific Infoblox record types and implements
the core API behavior of a record class. Attributes that map... | bsd-3-clause | -1,247,889,201,822,977,500 | 32.420502 | 80 | 0.57759 | false | 4.168841 | false | false | false |
aleju/self-driving-truck | lib/plotting.py | 1 | 13772 | """Classes to handle plotting during the training."""
from __future__ import print_function, division
import math
import cPickle as pickle
from collections import OrderedDict
import numpy as np
import matplotlib.pyplot as plt
import time
GROWTH_BY = 500
class History(object):
def __init__(self):
self.line... | mit | 3,102,420,107,428,294,000 | 38.348571 | 149 | 0.548141 | false | 3.368885 | false | false | false |
waile23/todo | models/pduser.py | 1 | 2906 | # -*- coding: utf-8 -*-
from basemodel import *
import md5
import math
import sys
class PDuser(BaseModel):
'''model autocreate by createModel'''
table_name = 'pd_user'
#db_name = 'todo_local'
db_name = web.config.write_db_name
def _format_user(self, row):
if hasattr(row, 'u_logo'):
if not row.u_logo:
... | mit | -6,926,692,520,643,417,000 | 26.415094 | 136 | 0.646249 | false | 2.698236 | false | false | false |
Michal-Fularz/codingame_solutions | codingame_solutions/medium/medium_The_Paranoid_Android.py | 1 | 3099 | __author__ = 'Amin'
# COMPLETED
# PYTHON 3.x
import sys
import math
class Floor:
def __init__(self, width, contains_exit=False, exit_position=-1):
self.width = width
self.__contains_elevator = False
self.__elevator_position = -1
self.__contains_exit = contains_exit
self._... | mit | 7,778,575,852,018,126,000 | 32.322581 | 149 | 0.603743 | false | 3.811808 | false | false | false |
garthylou/Libreosteo | libreosteoweb/api/file_integrator.py | 1 | 19791 | # This file is part of LibreOsteo.
#
# LibreOsteo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# LibreOsteo is distributed ... | gpl-3.0 | 5,506,196,519,202,931,000 | 33.090426 | 95 | 0.539235 | false | 4.314585 | false | false | false |
valsson/MD-MC-Codes-2016 | HarmonicOscillator-MD/HarmonicOscillator-MD-Verlet.py | 1 | 4262 | #! /usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
from DataTools import writeDataToFile
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--time-step',dest='time_step',required=False)
parser.add_argument('--output-file',dest='fn_out',required=False)
args = parser.parse_ar... | mit | 8,504,365,888,325,456,000 | 26.320513 | 125 | 0.638667 | false | 3.159377 | false | false | false |
OCA/business-requirement | business_requirement_sale/models/business_requirement.py | 1 | 1458 | # Copyright 2019 Tecnativa Victor M.M. Torres>
# Copyright 2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class BusinessRequirement(models.Model):
_inherit = 'business.requirement'
sale_order_ids = fields.One2many(
... | agpl-3.0 | -5,606,639,854,425,939,000 | 31.4 | 79 | 0.584362 | false | 3.681818 | false | false | false |
deepmind/open_spiel | open_spiel/python/algorithms/external_sampling_mccfr_test.py | 1 | 4567 | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | apache-2.0 | 8,920,101,350,981,107,000 | 37.70339 | 79 | 0.708123 | false | 3.307024 | true | false | false |
SGenheden/Scripts | Mol/parse_optq.py | 1 | 2134 | # Author: Samuel Genheden samuel.genheden@gmail.com
"""
Program to parse RESP charges and make Gromacs residue template file (.rtp)
Atoms in the PDB file need to be in the same order as in the charge file
The atom types file need to have an atomtype definition on each line
NAME1 TYPE1
NAME2 TYPE2
...
Us... | mit | 8,400,268,021,729,467,000 | 32.34375 | 90 | 0.559044 | false | 3.339593 | false | false | false |
joliva/wiki-appengine | main.py | 1 | 12161 | #!/usr/bin/env python
import cgi, re, os, logging, string
import hmac, random
from datetime import datetime
import webapp2, jinja2
from google.appengine.ext import db
from google.appengine.api import memcache
template_dir = os.path.join(os.path.dirname(__file__), 'templates')
jinja_env = jinja2.Environment(loader = ... | bsd-3-clause | 1,276,170,337,536,588,000 | 25.904867 | 172 | 0.649864 | false | 3.018367 | false | false | false |
psychopy/psychopy | psychopy/hardware/forp.py | 1 | 6704 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""fORP fibre optic (MR-compatible) response devices by CurrentDesigns:
http://www.curdes.... | gpl-3.0 | -6,914,705,715,617,184,000 | 35.835165 | 79 | 0.616945 | false | 4.205772 | false | false | false |
nuchi/httpserver | httpserver.py | 1 | 1065 | #!/usr/bin/env python
import socket
from http_handler import Handler_thread
MAX_CONNECTIONS = 5
class HTTPserver(object):
def __init__(self, localOnly=False, port=80, max_connections=MAX_CONNECTIONS):
self.port = port
self.max_connections = max_connections
if localOnly:
self.hostname = '127.0.0.1'
else:
... | mit | -7,448,993,895,145,337,000 | 24.380952 | 79 | 0.712676 | false | 2.991573 | false | false | false |
elaeon/dsignature | creacion_firma/forms.py | 1 | 3487 | # -*- coding: utf-8 -*-
from django import forms
from django.forms import ModelForm
from creacion_firma.models import FirmarCertificado, NominaSubida, User
import datetime
class UserForm(forms.Form):
nombre = forms.CharField(max_length=150, widget=forms.TextInput(attrs={"style": "width: 400px"}))
correo_elect... | gpl-3.0 | -8,077,302,436,457,668,000 | 34.917526 | 103 | 0.650689 | false | 3.463221 | false | false | false |
mdinacci/rtw | demos/proto2/src/proto2.py | 1 | 15023 | # -*- coding: utf-8-*-
"""
Author: Marco Dinacci <dev@dinointeractive.com>
Copyright © 2008-2009
"""
from pandac.PandaModules import *
loadPrcFile("../res/Config.prc")
#loadPrcFileData("", "want-directtools 1")
#loadPrcFileData("", "want-tk 1")
import direct.directbase.DirectStart
from direct.gui.OnscreenText import... | mit | 6,073,786,822,308,098,000 | 35.28744 | 91 | 0.563174 | false | 3.806893 | false | false | false |
hlzz/dotfiles | graphics/cgal/Documentation/conversion_tools/markup_replacement.py | 1 | 1846 | #!/usr/bin/python2
#replace markup #, ## ,### by \section, \subsection, \subsubsection.
#anchor names are preserved and generated from the section name otherwise
#The script is not perfect and might miss some specific cases
from sys import argv
from os import path
import string
import re
anchors={}
def generate_anc... | bsd-3-clause | -7,124,903,640,389,768,000 | 24.638889 | 90 | 0.591008 | false | 3.041186 | false | false | false |
Aegeaner/spark | python/pyspark/testing/utils.py | 1 | 3566 | #
# 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.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | -146,794,885,754,362,100 | 27.07874 | 97 | 0.668256 | false | 3.623984 | true | false | false |
rahulraj/web_projects | assignment2/src/photogallery/generator/galleryitemfactory.py | 1 | 6059 | import os
import re
import os.path
from iptcinfo import IPTCInfo
from galleryitem import JpegPicture, JpegDirectory, directory_name_to_html_file_name
from ..utils.inject import assign_injectables
def is_jpeg_file(file_name):
"""
Determine if a file is labeled as a JPEG.
Args:
file_name the name of the file.... | mit | -6,736,790,274,765,474,000 | 31.575269 | 84 | 0.674039 | false | 3.952381 | false | false | false |
mjtamlyn/archery-scoring | scores/migrations/0001_initial.py | 1 | 2398 | # -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('entries', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Arrow',
fields=[
('id', models.AutoField(verbose_n... | bsd-3-clause | 7,393,244,661,349,838,000 | 35.892308 | 114 | 0.525855 | false | 4.864097 | false | false | false |
gemrb/gemrb | gemrb/GUIScripts/bg1/ImportFile.py | 1 | 2330 | # GemRB - Infinity Engine Emulator
# Copyright (C) 2003 The GemRB Project
#
# 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 versi... | gpl-2.0 | -4,098,847,976,789,444,000 | 29.657895 | 81 | 0.777682 | false | 3.200549 | false | false | false |
datafolklabs/cement | cement/core/extension.py | 1 | 3997 | """Cement core extensions module."""
import sys
from abc import abstractmethod
from ..core import exc
from ..core.interface import Interface
from ..core.handler import Handler
from ..utils.misc import minimal_logger
LOG = minimal_logger(__name__)
class ExtensionInterface(Interface):
"""
This class defines ... | bsd-3-clause | 2,490,373,445,105,531,400 | 26.565517 | 79 | 0.589192 | false | 4.521493 | false | false | false |
xjw1001001/IGCexpansion | test/Ancestral_reconstruction/PAML/parse reconstructed fasta.py | 1 | 7314 | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 10 08:23:33 2017
@author: xjw1001001
"""
#only when PAML in desktop is available,the yeast version only
from Bio import Seq, SeqIO, AlignIO
from Bio.Phylo.PAML import codeml, baseml
import numpy as np
paralog_list = [['YLR406C', 'YDL075W'],
['YER131W', 'YGL189C'],
['YML... | gpl-3.0 | -1,790,204,341,473,735,700 | 45.592357 | 179 | 0.537462 | false | 2.703882 | false | false | false |
qinjian623/dlnotes | tutorials/tensorflow/mnist_softmax.py | 1 | 2619 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | gpl-3.0 | -4,167,562,545,988,799,000 | 33.012987 | 80 | 0.66323 | false | 3.563265 | false | false | false |
rinigus/osmscout-server | scripts/import/prepare_distribution.py | 1 | 5119 | #!/usr/bin/env python
# This script prepares files before uploading them for distribution
# This has to be run after all imports are finished
import json, pickle, os, stat, shutil
from mapbox_country_pack import world_pack as mapboxgl_world_pack
root_dir = "distribution"
bucket = open("bucket_name", "r").read().stri... | gpl-3.0 | 1,752,026,904,201,722,600 | 33.126667 | 158 | 0.621606 | false | 3.021842 | true | false | false |
jose-caballero/cvmfsreplica | cvmfsreplica/cvmfsreplicaex.py | 1 | 1122 | #! /usr/bin/env python
#
# exception classes for cvmfsreplica project
class ServiceConfigurationFailure(Exception):
"""
Exception to be raised when basic service configuration
cannot be read
"""
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.v... | gpl-3.0 | -3,819,787,098,476,026,400 | 22.87234 | 64 | 0.635472 | false | 4.382813 | true | false | false |
SchulzLab/SOS | install_script.py | 1 | 11581 | #!/usr/bin/env python
import os
from optparse import OptionParser
import subprocess
import sys
#import commands
class install_script():
def __init__(self):
self.prog_installed = []
def obtaining_tar(self, prog, path):
if (prog == 6):
os.chdir(path)
#Before obtaining tha tar file of the corresponding tool,... | mit | 928,657,617,958,597,400 | 36.723127 | 186 | 0.656075 | false | 2.848254 | false | false | false |
spirali/elphie | elphie/textparser.py | 1 | 1946 |
def normalize_tokens(tokens):
# Remove empty texts
tokens = [kv for kv in tokens if kv[0] != "text" or kv[1]]
# Merge lines
i = 1
while i < len(tokens):
token_name, value = tokens[i]
if token_name == "newline" and tokens[i - 1][0] == "newline":
value2 = tokens[i - 1][1]... | bsd-2-clause | 5,328,669,194,339,669,000 | 28.044776 | 78 | 0.482014 | false | 3.907631 | false | false | false |
abacuspix/NFV_project | Build_Web_With_Flask/Building web applications with Flask_Code/chapter08/ex05.py | 1 | 1529 | # coding:utf-8
from flask import Flask, render_template, session, flash
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
# strong secret key!!
app.config['SECRET_KEY'] = '\xa6\xb5\x0e\x7f\xd3}\x0b-\xaa\x03\x03\x82\x10\xbe\x1e0u\x93,{\xd4Z\xa3\x8f'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///e... | mit | -965,825,808,537,951,900 | 24.5 | 104 | 0.59843 | false | 3.120408 | false | false | false |
mozilla/bztools | auto_nag/history.py | 1 | 16781 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from pprint import pprint
from libmozdata.bugzilla import Bugzilla
from auto_nag import logger
class History(object)... | bsd-3-clause | 1,119,390,109,281,556,700 | 38.859857 | 118 | 0.311722 | false | 5.892205 | false | false | false |
econ-ark/HARK | HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py | 1 | 1397 | import copy
from HARK import distribute_params
from HARK.ConsumptionSaving.ConsAggShockModel import (
AggShockConsumerType,
SmallOpenEconomy,
init_cobb_douglas,
)
from HARK.distribution import Uniform
import numpy as np
import unittest
class testSmallOpenEconomy(unittest.TestCase):
def test_small_open... | apache-2.0 | -2,018,076,852,372,516,600 | 32.261905 | 81 | 0.652112 | false | 3.501253 | false | false | false |
reeshupatel/demo | keystone/openstack/common/lockutils.py | 1 | 12121 | # Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | 1,740,347,212,759,408,400 | 30.98153 | 78 | 0.613646 | false | 4.179655 | false | false | false |
Namax0r/resistor-calculator | resistor_calculator.py | 1 | 9566 | #!/usr/bin/env python
# Basic version handling
try:
# Python2
import Tkinter as tk
except ImportError:
# Python3
import tkinter as tk
from tkinter.ttk import Combobox
from tkinter import messagebox
# Small utility that adds dot notation access to dictionary attributes
class dotdict(dict):
__getat... | mit | -1,463,508,674,641,083,400 | 43.259259 | 135 | 0.601255 | false | 3.593985 | false | false | false |
mjasher/gac | GAC/flopy/modflow/mfdrn.py | 1 | 7133 | """
mfdrn module. Contains the ModflowDrn class. Note that the user can access
the ModflowDrn class as `flopy.modflow.ModflowDrn`.
Additional information for this MODFLOW package can be found at the `Online
MODFLOW Guide
<http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?drn.htm>`_.
"""
import... | gpl-2.0 | -3,510,670,181,342,770,700 | 33.311881 | 112 | 0.549418 | false | 4.025395 | false | false | false |
mosen/salt-osx | _modules/deprecated/mac_shadow.py | 1 | 10388 | # -*- coding: utf-8 -*-
'''
Manage Mac OSX local directory passwords and policies.
Note that it is usually better to apply password policies through the creation of a configuration profile.
Tech Notes:
Usually when a password is changed by the system, there's a responsibility to check the hash list and generate hashe... | mit | -2,658,986,317,874,695,000 | 30.383686 | 185 | 0.663939 | false | 3.712652 | false | false | false |
rodrigosurita/GDAd | sdaps/model/questionnaire.py | 1 | 9008 | # -*- coding: utf8 -*-
# SDAPS - Scripts for data acquisition with paper based surveys
# Copyright(C) 2008, Christoph Simon <post@christoph-simon.eu>
# Copyright(C) 2008, Benjamin Berg <benjamin@sipsolutions.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Ge... | gpl-3.0 | 2,867,286,513,674,983,400 | 24.232493 | 83 | 0.559614 | false | 3.594573 | false | false | false |
mornsun/javascratch | src/topcoder.py/LC_330_Patching_Array.py | 1 | 1807 | #!/usr/bin/env python
#coding=utf8
'''
Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be formed by the sum of some elements in the array. Return the minimum number of patches required.
Example 1:
nums = [1, 3], n = 6
Retu... | gpl-2.0 | 8,682,041,023,751,641,000 | 24.111111 | 242 | 0.570559 | false | 3.333948 | false | false | false |
SaltusVita/ReoGrab | Spiders.py | 1 | 6942 | '''
Created on 2 сент. 2016 г.
@author: garet
'''
import urllib.request
import queue
import sqlite3
import re
import json
from urllib.parse import urlparse
from Parser import HtmlPage
import lxml
class BaseSpider:
def __init__(self):
self.urls = QueueUrls()
self.cache = Sqlite... | bsd-3-clause | 2,515,193,081,959,107,000 | 26.430328 | 124 | 0.486666 | false | 3.856031 | false | false | false |
rven/odoo | addons/l10n_ch/models/res_bank.py | 1 | 16379 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import re
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
from odoo.tools.misc import mod10r
from odoo.exceptions import UserError
import werkzeug.urls
ISR_SUBSCRIPTION_CODE = {'CHF... | agpl-3.0 | 1,126,025,373,065,044,900 | 51.16242 | 216 | 0.567251 | false | 3.88036 | false | false | false |
googleapis/googleapis-gen | google/cloud/talent/v4beta1/talent-v4beta1-py/google/cloud/talent_v4beta1/services/completion/transports/grpc.py | 1 | 11561 | # -*- coding: utf-8 -*-
# Copyright 2020 Google 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... | apache-2.0 | 3,560,645,474,204,908,500 | 44.515748 | 91 | 0.607992 | false | 4.817083 | false | false | false |
rldleblanc/ceph-tools | osd_hunter.py | 1 | 6255 | #!/usr/bin/python
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
import argparse
import re
import datetime
import operator
import pprint
import glob
import gzip
slow_threshold = 10 #seconds
# Nothing to change past here
verbose = None
re_slow = re.compile(r'^(\d+-\d+-\d+\s+\d+:\d+:\d+\.\d+)\s+\w+\s+0.*slow.... | lgpl-3.0 | -2,655,373,338,628,918,300 | 37.850932 | 127 | 0.561311 | false | 3.431157 | false | false | false |
santisiri/popego | envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/distutils/cpuinfo.py | 1 | 22466 | #!/usr/bin/env python
"""
cpuinfo
Copyright 2002 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy (BSD style) license. See LICENSE.txt that came with
this distribution for specifics.
NO WARRANTY IS EXP... | bsd-3-clause | -3,900,664,180,430,769,700 | 31.989721 | 85 | 0.54509 | false | 3.277794 | false | false | false |
skim1420/spinnaker | spinbot/event/release_branch_pull_request_handler.py | 1 | 2049 | from .handler import Handler
from .pull_request_event import GetBaseBranch, GetPullRequest, GetTitle, GetRepo
from gh import ReleaseBranchFor, ParseCommitMessage
format_message = ('Features cannot be merged into release branches. The following commits ' +
'are not tagged as one of "{}":\n\n{}\n\n' +
'Read more... | apache-2.0 | -3,984,927,411,745,407,000 | 40.816327 | 133 | 0.627135 | false | 3.96325 | false | false | false |
wjwwood/open-robotics-platform | template.py | 1 | 1949 | #!/usr/bin/env python -OO
# encoding: utf-8
###########
# ORP - Open Robotics Platform
#
# Copyright (c) 2010 John Harrison, William Woodall
#
# 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 Softwa... | mit | 97,687,108,796,476,430 | 29.453125 | 79 | 0.709595 | false | 3.670433 | false | false | false |
Ebag333/Pyfa | eos/effects/subsystembonusgallentedefensivearmoredwarfare.py | 1 | 1528 | # subSystemBonusGallenteDefensiveArmoredWarfare
#
# Used by:
# Subsystem: Proteus Defensive - Warfare Processor
type = "passive"
def handler(fit, src, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Armored Command"), "buffDuration",
src.getModifiedIte... | gpl-3.0 | -8,301,749,523,908,657,000 | 65.434783 | 109 | 0.632199 | false | 3.958549 | false | false | false |
seanbell/opensurfaces | server/normals/views.py | 1 | 9087 | import json
from django.shortcuts import render, get_object_or_404
from django.db.models import F
from django.http import HttpResponse
from django.views.decorators.http import require_POST
from django.core.urlresolvers import reverse
from django.contrib.admin.views.decorators import staff_member_required
from django.v... | mit | -7,393,847,818,757,390,000 | 33.683206 | 86 | 0.646748 | false | 3.684915 | false | false | false |
a25kk/bfa | src/bfa.sitecontent/bfa/sitecontent/widgets/content/video.py | 1 | 4222 | # -*- coding: utf-8 -*-
"""Module providing event filter widget"""
import uuid as uuid_tool
from Acquisition import aq_inner
from Products.Five import BrowserView
from plone import api
from plone.i18n.normalizer import IIDNormalizer
from wildcard.media.behavior import IVideo
from zope.component import queryUtility
cl... | mit | 7,906,045,721,442,587,000 | 29.594203 | 78 | 0.578399 | false | 4.119024 | false | false | false |
lgarren/spack | var/spack/repos/builtin/packages/r-affycomp/package.py | 1 | 1773 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -6,339,694,925,005,970,000 | 45.657895 | 126 | 0.681331 | false | 3.788462 | false | false | false |
CoderDuan/mantaflow | scenes/simpleplume.py | 2 | 1414 | #
# Simple example scene (hello world)
# Simulation of a buoyant smoke density plume (with noise texture as smoke source)
#
#import pdb; pdb.set_trace()
from manta import *
# solver params
res = 64
gs = vec3(res, int(1.5*res), res)
s = FluidSolver(name='main', gridSize = gs)
# prepare grids
flags = s.create(F... | gpl-3.0 | -5,257,533,783,658,418,000 | 24.25 | 96 | 0.701556 | false | 2.529517 | false | false | false |
BaseBot/Triangula | src/python/setup.py | 1 | 1035 | __author__ = 'tom'
from setuptools import setup
# Makes use of the sphinx and sphinx-pypi-upload packages. To build for local development
# use 'python setup.py develop'. To upload a version to pypi use 'python setup.py clean sdist upload'.
# To build docs use 'python setup.py build_sphinx' and to upload docs to pytho... | apache-2.0 | 2,400,253,366,044,438,500 | 40.4 | 102 | 0.689855 | false | 3.415842 | false | false | false |
libAtoms/matscipy | scripts/fracture_mechanics/run_crack_thin_strip.py | 1 | 4618 | #! /usr/bin/env python
# ======================================================================
# matscipy - Python materials science tools
# https://github.com/libAtoms/matscipy
#
# Copyright (2014) James Kermode, King's College London
# Lars Pastewka, Karlsruhe Institute of Technology
#
# This progr... | gpl-2.0 | 7,947,069,792,221,883,000 | 33.721805 | 90 | 0.638372 | false | 3.38315 | false | false | false |
mvaled/sentry | src/sentry/api/endpoints/group_integration_details.py | 1 | 11884 | from __future__ import absolute_import
from django.db import IntegrityError, transaction
from rest_framework.response import Response
from sentry import features
from sentry.api.bases import GroupEndpoint
from sentry.api.serializers import serialize
from sentry.api.serializers.models.integration import IntegrationIs... | bsd-3-clause | -9,031,003,722,667,048,000 | 39.838488 | 100 | 0.61688 | false | 4.654916 | false | false | false |
madmatah/lapurge | lapurge/types.py | 1 | 3448 | # Copyright (c) 2013 Matthieu Huguet
# 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, copy, modify, merge, publish, dist... | mit | 2,537,618,906,637,552,000 | 33.48 | 93 | 0.640371 | false | 4.386768 | false | false | false |
NMGRL/pychron | pychron/ml/tasks/actions.py | 1 | 1114 | # ===============================================================================
# Copyright 2019 Jake Ross
#
# 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... | apache-2.0 | 6,036,008,776,714,166,000 | 45.416667 | 81 | 0.531418 | false | 5.063636 | false | false | false |
rlutz/xorn | src/backend/gnet_bae.py | 1 | 1626 | # gaf.netlist - gEDA Netlist Extraction and Generation
# Copyright (C) 1998-2010 Ales Hvezda
# Copyright (C) 1998-2010 gEDA Contributors (see ChangeLog for details)
# Copyright (C) 2013-2019 Roland Lutz
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | gpl-2.0 | -7,487,250,061,490,648,000 | 39.65 | 77 | 0.674662 | false | 3.338809 | false | false | false |
EvilCult/Video-Downloader | Library/toolClass.py | 1 | 3025 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pycurl
import StringIO
import random
class Tools :
def __init__ (self) :
pass
def getPage (self, url, requestHeader = []) :
resultFormate = StringIO.StringIO()
fakeIp = self.fakeIp()
requestHeader.append('CLIENT-IP:' + fakeIp)
requestHeader.append('X... | gpl-2.0 | -4,087,712,925,453,522,000 | 19.585034 | 66 | 0.495207 | false | 2.33952 | false | false | false |
bpetering/python-pattern-recognition | pattern_recognition.py | 1 | 2300 | def constant(diffs):
val = diffs.pop()
for d in diffs:
if d != val:
return False
return val
def pat1(seq): # consider two elements at a time
diffs = []
for i in xrange(1, len(seq)):
diffs.append( seq[i] - seq[i-1] ) # implicit directionality - factor... | mit | 4,782,913,297,461,526,000 | 28.263158 | 118 | 0.553478 | false | 3.437967 | false | false | false |
okuraoy/mywork | mtlearn/datasets.py | 1 | 2037 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
from sklearn.datasets.base import Bunch
from os.path import join
PATH = "d:\\data"
# class Bunch(dict):
# """Container object for datasets
# Dictionary-like object that exposes its keys as attributes.
#
# See... | apache-2.0 | 4,101,028,020,952,745,000 | 27.1 | 114 | 0.569956 | false | 3.124233 | false | false | false |
Azure/azure-sdk-for-python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domain_registration_provider_operations.py | 1 | 5142 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 2,799,316,774,956,120,600 | 44.504425 | 133 | 0.652859 | false | 4.624101 | false | false | false |
lum4chi/mygensim | models/qlmodel.py | 1 | 1822 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Francesco Lumachi <francesco.lumachi@gmail.com>
from __future__ import division
from gensim import models, utils
import math
class QLModel(models.TfidfModel):
""" Use of models.TfidfModel as base to build Query Likelihood Model (12.9) appeared i... | gpl-3.0 | 2,304,769,948,544,169,700 | 43.341463 | 94 | 0.614199 | false | 3.421846 | false | false | false |
lightbase/LBConverter | lbconverter/config.py | 1 | 4423 |
def set_config():
import ConfigParser
config = ConfigParser.ConfigParser()
config.read('development.ini')
global REST_URL
global OUTPATH
global DEFAULT_OPENOFFICE_PORT
global PIDFILE_PATH
global LOGFILE_PATH
global SUPPORTED_FILES
#---------------------#
# Configuration... | gpl-2.0 | -7,174,447,507,429,265,000 | 28.098684 | 97 | 0.496496 | false | 3.471743 | true | false | false |
jlengrand/Ivolution | ivolution/util/Notifier.py | 1 | 2002 | """
.. module:: Notifier
:platform: Unix, Windows
:synopsis: Implements a simple Observer/Observable pattern for communication between between Facemovie thread and Ivolution GUI
.. moduleauthor:: Julien Lengrand-Lambert <jlengrand@gmail.com>
"""
class Observer():
"""
Implements a simple Observer from t... | bsd-3-clause | -6,127,289,947,069,954,000 | 24.341772 | 130 | 0.51998 | false | 4.478747 | false | false | false |
zcoinofficial/zcoin | src/tor/scripts/codegen/makedesc.py | 1 | 10850 | #!/usr/bin/python
# Copyright 2014-2019, The Tor Project, Inc.
# See LICENSE for license information
# This is a kludgey python script that uses ctypes and openssl to sign
# router descriptors and extrainfo documents and put all the keys in
# the right places. There are examples at the end of the file.
# I've used t... | mit | 6,792,913,120,685,563,000 | 29.911681 | 149 | 0.614194 | false | 3.030726 | false | false | false |
cheral/orange3 | Orange/widgets/utils/plot/owplot.py | 4 | 69148 | '''
#################
Plot (``owplot``)
#################
.. autoclass:: OrangeWidgets.plot.OWPlot
'''
from AnyQt.QtWidgets import \
QGraphicsView, QGraphicsScene, QGraphicsRectItem, QGraphicsTextItem,\
QToolTip, QApplication
from AnyQt.QtGui import QPen, QBrush, QColor, QPainter, QTransform, QPolygonF
fro... | bsd-2-clause | -1,525,150,586,387,520,000 | 35.820021 | 172 | 0.580668 | false | 3.870152 | false | false | false |
lamondlab/sipify | CppHeaderParser-2.7/CppHeaderParser/CppHeaderParser.py | 1 | 114661 | #!/usr/bin/python
#
# Author: Jashua R. Cloutier (contact via https://bitbucket.org/senex)
# Project: http://senexcanis.com/open-source/cppheaderparser/
#
# Copyright (C) 2011, Jashua R. Cloutier
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | apache-2.0 | -2,464,328,562,798,681,000 | 42.713687 | 210 | 0.502629 | false | 4.225109 | false | false | false |
nschaetti/EchoTorch | echotorch/nn/ICACell.py | 1 | 2909 | # -*- coding: utf-8 -*-
#
# File : echotorch/nn/ESN.py
# Description : An Echo State Network module.
# Date : 26th of January, 2018
#
# This file is part of EchoTorch. EchoTorch 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 Sof... | gpl-3.0 | 4,296,446,302,283,977,700 | 24.973214 | 104 | 0.546236 | false | 4.259151 | false | false | false |
hehaichi/django-imagemanagement | imageserver/settings.py | 1 | 3326 | """
Django settings for imageserver project.
Generated by 'django-admin startproject' using Django 1.10.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
impor... | mit | 2,671,746,408,004,011,500 | 25.396825 | 91 | 0.693025 | false | 3.490031 | false | false | false |
pkariz/nnsearch | nnsearch/approx/Annoy.py | 1 | 6165 | from ..baseindex import Index
import numpy as np
import math
from annoy import AnnoyIndex
class Annoy(Index):
"""
AnnoyIndex from annoy package.
"""
def __init__(self):
self.algorithm = "AnnoyIndex"
self.idx_to_vector = {}
self.valid_types = [np.uint8, np.uint16, np.uint32, np... | gpl-3.0 | -3,607,731,220,281,790,000 | 39.827815 | 132 | 0.579238 | false | 4.151515 | false | false | false |
HERA-Team/pyuvdata | pyuvdata/uvbeam/cst_beam.py | 1 | 13336 | # -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""Class for reading beam CST files."""
import re
import warnings
import numpy as np
from .uvbeam import UVBeam
from .. import utils as uvutils
__all__ = ["CSTBeam"]
class CSTBeam(UVB... | bsd-2-clause | 7,236,658,128,043,490,000 | 36.886364 | 88 | 0.540492 | false | 3.811375 | false | false | false |
joaquinlpereyra/ludema | ludema/abstract/actions.py | 1 | 11361 | import random
from functools import wraps
from ludema.abstract.utils import Direction
from ludema.exceptions import (PieceIsNotOnATileError,
PieceIsNotOnThisBoardError,
TileIsEmptyError,
NotGrabbableError)
class Action:
de... | gpl-3.0 | 6,046,794,451,876,565,000 | 35.066667 | 93 | 0.602588 | false | 4.54986 | false | false | false |
lycantropos/cetus | cetus/queries/filters.py | 1 | 2007 | from typing import Optional, Tuple, Any
from cetus.types import (FiltersType,
FilterType)
from cetus.utils import join_str
from .utils import normalize_value
LOGICAL_OPERATORS = {'AND', 'OR'}
INCLUSION_OPERATORS = {'IN', 'NOT IN'}
RANGE_OPERATORS = {'BETWEEN'}
COMPARISON_OPERATORS = {'=', '!... | mit | -6,637,450,050,062,195,000 | 30.857143 | 59 | 0.539113 | false | 3.99006 | false | false | false |
RandallDW/Aruba_plugin | plugins/org.python.pydev/pysrc/_pydevd_bundle/pydevd_referrers.py | 1 | 8832 | from _pydevd_bundle.pydevd_constants import dict_contains
import sys
from _pydevd_bundle import pydevd_xml
from os.path import basename
import traceback
try:
from urllib import quote, quote_plus, unquote, unquote_plus
except:
from urllib.parse import quote, quote_plus, unquote, unquote_plus #@Reimport @Unresol... | epl-1.0 | 8,083,347,202,527,346,000 | 35.8 | 109 | 0.434783 | false | 4.660686 | false | false | false |
adamcaudill/yawast | yawast/external/spinner.py | 1 | 1596 | # From: https://stackoverflow.com/a/39504463
# License: Creative Commons Attribution-Share Alike
# Copyright: Victor Moyseenko
import sys
import threading
import time
class Spinner:
running = False
busy = False
delay = 0.1
@staticmethod
def spinning_cursor():
while 1:
for cur... | mit | -1,195,580,193,516,973,800 | 23.553846 | 66 | 0.537594 | false | 4.26738 | false | false | false |
szaydel/psutil | psutil/_pslinux.py | 1 | 40630 | #!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Linux platform implementation."""
from __future__ import division
import os
import errno
import socket
import struct
import sys... | bsd-3-clause | 5,321,260,057,435,817,000 | 35.53777 | 84 | 0.510066 | false | 3.982552 | false | false | false |
Rdbaker/Mealbound | ceraon/utils.py | 1 | 4801 | # -*- coding: utf-8 -*-
"""Helper utilities and decorators."""
from datetime import timedelta as td
from datetime import tzinfo
from threading import Thread
import requests
from flask import Blueprint, current_app, flash, request
def get_fb_access_token():
"""Get an access token from facebook for graph API calls... | bsd-3-clause | -1,679,549,717,610,896,600 | 32.573427 | 78 | 0.586961 | false | 4.034454 | false | false | false |
ActiveState/code | recipes/Python/577336_Fast_reentrant_optimistic_lock_implemented/recipe-577336.py | 1 | 4351 | from cpython cimport pythread
from cpython.exc cimport PyErr_NoMemory
cdef class FastRLock:
"""Fast, re-entrant locking.
Under uncongested conditions, the lock is never acquired but only
counted. Only when a second thread comes in and notices that the
lock is needed, it acquires the lock and notifies... | mit | 3,017,226,937,884,119,000 | 36.188034 | 85 | 0.638934 | false | 3.864121 | false | false | false |
rodrigofaccioli/drugdesign | virtualscreening/vina/spark/hydrogen_bond_crud.py | 1 | 4480 | from pyspark.sql import SQLContext, Row
from vina_utils import get_ligand_from_receptor_ligand_model
"""
Creates data frame of residue list
sqlCtx - spark SQL context
residue_listRDD - RDD for creating data frame. It had been created by load_file_select_hydrogen_bond function
"""
def create_df_residue_list(sqlCtx,... | apache-2.0 | 4,840,884,905,067,512,000 | 36.647059 | 157 | 0.75692 | false | 3.098202 | false | false | false |
benediktkr/lokun-record | record/sec.py | 1 | 2077 | from random import randint
def compare1toN(str1, strl):
return any([compare(str1, a) for a in strl])
def compare(str1, str2):
return compare_const2(str1, str2)
def compare_const2(str1, str2):
if len(str1) != len(str2):
return False
result = 0
for x, y in zip(str1, str2):
result |... | agpl-3.0 | -8,581,726,397,058,848,000 | 24.329268 | 77 | 0.601348 | false | 3.484899 | false | false | false |
dcrosta/mongo-disco | app/job.py | 1 | 2372 | #!/usr/bin/env python
# encoding: utf-8
'''
File: DiscoJob.py
Author: NYU ITP team
Description: Disco Job Wrapper
'''
from disco.core import Job, result_iterator
from disco.worker.classic.worker import Params
from disco.worker.classic.modutil import locate_modules,find_modules
from mongodb_io import mongodb_output_str... | apache-2.0 | 1,969,891,187,076,187,000 | 32.885714 | 78 | 0.49747 | false | 4.458647 | true | false | false |
ropable/resource_tracking | tracking/migrations/0004_auto_20200102_0914.py | 1 | 1126 | # Generated by Django 2.1.11 on 2020-01-02 01:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tracking', '0003_auto_20190308_1114'),
]
operations = [
migrations.AlterField(
model_name='device',
name='symbol',
... | bsd-3-clause | -3,249,550,416,547,287,600 | 61.555556 | 788 | 0.60746 | false | 3.263768 | false | false | false |
NathanW2/QGIS | tests/src/python/test_qgsfieldformatters.py | 1 | 13493 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for field formatters.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
... | gpl-2.0 | 9,146,336,332,509,080,000 | 49.347015 | 162 | 0.646261 | false | 3.896333 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.