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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
iandees/all-the-places | locations/spiders/pizzaranch.py | 1 | 3924 | import scrapy
import re
from locations.items import GeojsonPointItem
import json
class CVSSpider(scrapy.Spider):
name = "pizzaranch"
allowed_domains = ["pizzaranch.com"]
download_delay = 0.5
start_urls = (
'https://pizzaranch.com/locations',
)
def parse_times(self, times):
if ti... | mit | -6,156,751,004,344,614,000 | 44.627907 | 202 | 0.568552 | false | 3.619926 | false | false | false |
thegricean/sinking-marbles | models/wonky_world/scripts/parseResults.py | 1 | 4158 | import csv
import itertools
import random
import ast
import sys
#usage
# python parseResults.py results.txt
fname = '../results/model_results/'+sys.argv[1]
file_names = [fname]
itemfile = open("items.txt")
items = [" ".join(l.rstrip().split()) for l in itemfile.readlines()]
itemfile.close()
print items
lines = []... | mit | -4,322,104,831,348,527,600 | 32.264 | 457 | 0.64911 | false | 2.633312 | false | false | false |
mdrasmus/argweaver | argweaver/emit.py | 1 | 4373 | #
# HMM emission related functions
#
from math import exp, log
#=============================================================================
def parsimony_ancestral_seq(tree, seqs, pos):
"""Calculates ancestral sequence for a local tree using parsimony"""
ancestral = {}
sets = {}
# do unweight pa... | mit | -7,273,805,090,329,823,000 | 28.952055 | 78 | 0.430597 | false | 3.789428 | false | false | false |
ragnraok/MonoReader | monoweb/mono/api/objects.py | 1 | 2368 | """
API object specification and correspond methods
"""
def fill_list_article_object(article_id, title, site, updated, cover_url, is_fav):
"""
list article object:
{
article_id: article_id,
title: title,
site: site_title,
updated: YYYY-MM-DD,
... | mit | -4,820,680,407,312,486,000 | 28.974684 | 90 | 0.549831 | false | 3.72327 | false | false | false |
Fuzion24/mitmproxy | libmproxy/console/flowview.py | 1 | 22322 | from __future__ import absolute_import
import os
import sys
import urwid
from netlib import odict
from . import common, grideditor, contentview, signals, searchable, tabs
from . import flowdetailview
from .. import utils, controller
from ..protocol.http import HTTPRequest, HTTPResponse, CONTENT_MISSING, decoded
class... | mit | 8,710,828,440,068,676,000 | 33.131498 | 90 | 0.457307 | false | 4.37429 | false | false | false |
sternshus/arelle2.7 | svr-2.7/arelle/ValidateVersReport.py | 1 | 44336 | u'''
Created on Nov 9, 2010
@author: Mark V Systems Limited
(c) Copyright 2010 Mark V Systems Limited, All rights reserved.
'''
from arelle import ModelVersObject, XbrlConst, ValidateXbrl, ModelDocument
from arelle.ModelValue import qname
conceptAttributeEventAttributes = {
u"conceptAttributeDelete"... | apache-2.0 | 4,493,540,456,087,069,000 | 80.107407 | 177 | 0.541276 | false | 5.044487 | false | false | false |
weinbe58/QuSpin | tests/higher_spin_test.py | 1 | 2498 | import sys,os
qspin_path = os.path.join(os.getcwd(),"../")
sys.path.insert(0,qspin_path)
from quspin.operators import hamiltonian
from quspin.basis import spin_basis_1d
import numpy as np
from itertools import product
try:
from functools import reduce
except ImportError:
pass
dtypes = [(np.float32,np.complex64),(... | bsd-3-clause | -688,366,178,981,138,300 | 36.848485 | 143 | 0.552842 | false | 1.914176 | false | false | false |
MehnaazAsad/ECO_Globular_Clusters | src/data/mods_prelim_checks_2/Exp_fil2.py | 1 | 6614 | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 19 17:36:35 2017
@author: asadm2
"""
### DESCRIPTION
#This script carries out an exposure time check and an "at least 2 filters"
#check
import pandas as pd
import numpy as np
def expfil2(objname,revtxt):
"""
This function carries out an exposure time check an... | mit | -8,252,784,929,073,507,000 | 37.453488 | 80 | 0.51648 | false | 3.220058 | false | false | false |
beiko-lab/gengis | bin/Lib/site-packages/numpy/distutils/tests/test_fcompiler_intel.py | 1 | 1161 | from numpy.testing import *
import numpy.distutils.fcompiler
intel_32bit_version_strings = [
("Intel(R) Fortran Intel(R) 32-bit Compiler Professional for applications"\
"running on Intel(R) 32, Version 11.1", '11.1'),
]
intel_64bit_version_strings = [
("Intel(R) Fortran IA-64 Compiler Professi... | gpl-3.0 | 4,528,753,986,483,240,000 | 32.147059 | 79 | 0.641688 | false | 3.56135 | true | false | false |
docusign/docusign-python-client | docusign_esign/models/payment_details.py | 1 | 17416 | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | mit | 576,533,233,708,825,000 | 30.267504 | 415 | 0.605018 | false | 4.121155 | false | false | false |
django-bmf/django-bmf | djangobmf/pagination.py | 2 | 3352 | #!/usr/bin/python
# ex:set fileencoding=utf-8:
from __future__ import unicode_literals
from django.core.paginator import Paginator
from django.core.paginator import InvalidPage
from django.template import Context
from django.template import loader
from django.utils import six
from django.utils.translation import uget... | bsd-3-clause | -7,896,100,331,072,318,000 | 31.230769 | 72 | 0.598449 | false | 4.163975 | false | false | false |
BoGoEngine/bogo-osx | main.py | 1 | 1638 | #!/usr/bin/env python
from Cocoa import *
from InputMethodKit import *
from itertools import takewhile
import bogo
class BogoController(IMKInputController):
def __init__(self):
# Cocoa doesn't call this method at all
self.reset()
self.initialized = True
def reset(self):
self.composing_string = ""
self.r... | gpl-3.0 | 5,871,501,967,262,425,000 | 21.75 | 70 | 0.663004 | false | 3.230769 | false | false | false |
ibaidev/gplib | gplib/covariance_functions/white_noise.py | 1 | 4027 | # -*- coding: utf-8 -*-
#
# Copyright 2018 Ibai Roman
#
# This file is part of GPlib.
#
# GPlib 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 ... | gpl-3.0 | -4,278,698,062,277,995,000 | 31.216 | 78 | 0.593991 | false | 3.809839 | false | false | false |
elastacloud/libcloud | libcloud/compute/drivers/libvirt_driver.py | 1 | 10168 | # 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 use ... | apache-2.0 | 3,972,654,172,272,321,500 | 29.443114 | 79 | 0.590382 | false | 4.199917 | false | false | false |
srkukarni/heron | heron/tools/cli/src/python/restart.py | 1 | 2128 | # Copyright 2016 Twitter. 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 agree... | apache-2.0 | -3,431,443,403,372,592,000 | 30.761194 | 98 | 0.705357 | false | 3.505766 | false | false | false |
Muon/s3o-tools | s3o-optimize.py | 1 | 3528 | #!/usr/bin/env python
from s3o import S3O
from optparse import OptionParser
from glob import glob
import vertex_cache
def recursively_optimize_pieces(piece):
optimize_piece(piece)
for child in piece.children:
recursively_optimize_pieces(child)
def chunks(l, n):
""" Yield successive n-sized chun... | mit | -5,973,406,678,418,618,000 | 29.413793 | 77 | 0.571995 | false | 3.793548 | false | false | false |
pywinauto/pywinauto | examples/notepad_slow.py | 1 | 9097 | # GUI Application automation and testing library
# Copyright (C) 2006-2018 Mark Mc Mahon and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or with... | bsd-3-clause | 718,532,393,781,119,500 | 34.388 | 95 | 0.665714 | false | 3.713061 | true | false | false |
brguez/TEIBA | src/python/retrotransposition_eventTypes.chart.py | 1 | 14275 | #!/usr/bin/env python
#coding: utf-8
def header(string):
"""
Display header
"""
timeInfo = time.strftime("%Y-%m-%d %H:%M")
print '\n', timeInfo, "****", string, "****"
def info(string):
"""
Display basic information
"""
timeInfo = time.strftime("%Y-%m-%d %H:%M")
print ... | gpl-3.0 | 7,796,183,208,989,563,000 | 33.589806 | 332 | 0.633359 | false | 3.264834 | false | false | false |
davidwilson-85/easymap | graphic_output/Pillow-4.2.1/Tests/test_file_gimpgradient.py | 1 | 2789 | from helper import unittest, PillowTestCase
from PIL import GimpGradientFile
class TestImage(PillowTestCase):
def test_linear_pos_le_middle(self):
# Arrange
middle = 0.5
pos = 0.25
# Act
ret = GimpGradientFile.linear(middle, pos)
# Assert
self.assertEqua... | gpl-3.0 | -5,356,480,336,562,170,000 | 21.312 | 62 | 0.564001 | false | 3.67942 | true | false | false |
irl/gajim | src/common/contacts.py | 1 | 32063 | # -*- coding:utf-8 -*-
## src/common/contacts.py
##
## Copyright (C) 2006 Dimitur Kirov <dkirov AT gmail.com>
## Travis Shirk <travis AT pobox.com>
## Nikos Kouremenos <kourem AT gmail.com>
## Copyright (C) 2006-2014 Yann Leboulanger <asterix AT lagaule.org>
## ... | gpl-3.0 | -6,566,727,521,522,041,000 | 36.282558 | 96 | 0.588747 | false | 3.980509 | false | false | false |
davelab6/telaro | src/dash2/words/telaro/fileparse.py | 1 | 10711 | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# calc.py
#
# A simple calculator with variables. This is from O'Reilly's
# "Lex and Yacc", p. 63.
#
# Class-based example contributed to PLY by David McNab
# --------------------------------------------------------... | gpl-3.0 | 5,159,091,096,856,290,000 | 28.105978 | 101 | 0.469051 | false | 3.332607 | false | false | false |
RoyGunhooYoon/mcb | mcb.py | 1 | 3638 | #!/usr/bin/python3
import shelve
import sys
import pyperclip
print('\nWelcome to mcb!\n')
print('Type help to see manual\n')
while True:
args = input('>').split()
commands = ['help', 'list', 'load', 'save', 'quit', 'delete', 'show']
command = args[0]
mcb_shelve = shelve.open('mcb')
if command ... | bsd-3-clause | 1,446,098,040,609,851,400 | 38.11828 | 104 | 0.474711 | false | 4.780552 | false | false | false |
R-daneel-olivaw/CPET | module1/probes/Pobe.py | 1 | 7811 | '''
Created on Feb 25, 2015
@author: Akshat
'''
import psutil
from module1.ds.procRecord import ProcRecord
from time import sleep
import csv
import os, platform, subprocess, re
from subprocess import check_output
import copy
class ProcessProbe:
PROCNAME = None
p_map = {}
k_list = [... | lgpl-3.0 | -7,484,567,214,915,481,000 | 31.238298 | 118 | 0.428882 | false | 4.291758 | false | false | false |
joaormatos/anaconda | mmfparser/player/extensions/kcclock.py | 1 | 26527 | # Copyright (c) Mathias Kaerlev 2012.
# This file is part of Anaconda.
# Anaconda 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.
# ... | gpl-3.0 | 847,755,223,363,182,600 | 25.876393 | 80 | 0.580541 | false | 3.927598 | false | false | false |
aarontuor/cpp | safekit/graph_training_utils.py | 1 | 5196 | """
Utilities for training the parameters of tensorflow computational graphs.
"""
import tensorflow as tf
import sys
import math
OPTIMIZERS = {'grad': tf.train.GradientDescentOptimizer, 'adam': tf.train.AdamOptimizer}
class EarlyStop:
"""
A class for determining when to stop a training while loop by a bad co... | mit | 1,544,231,019,683,145,700 | 39.913386 | 118 | 0.613934 | false | 4.210697 | false | false | false |
ThomasMcVay/MediaApp | AppCoreX/__init__.py | 1 | 1275 | #===============================================================================
# @Author: Madison Aster
# @ModuleDescription:
# @License:
# MediaApp Library - Python Package framework for developing robust Media
# Applications with Qt Library
# Copyright (C) 2013 Madison Aster
# ... | lgpl-2.1 | 5,790,089,494,029,108,000 | 47.115385 | 83 | 0.614902 | false | 4.442509 | false | false | false |
xiaxia47/Python-learning | spiders/downloadpic.py | 1 | 1376 | import os
from urllib.request import urlretrieve
from urllib.request import urlopen
from bs4 import BeautifulSoup
def getAbsoluteUrl(baseUrl, source):
if source.startswith("http://www."):
url= "http://" + source[11:]
elif source.startswith("http://"):
url = source
elif source.star... | gpl-3.0 | 7,759,273,243,587,410,000 | 31.560976 | 75 | 0.65625 | false | 3.708895 | false | false | false |
rshk/python-pcapng | pcapng/flags.py | 1 | 5513 | """
Module to wrap an integer in bitwise flag/field accessors.
"""
from collections import OrderedDict
from collections.abc import Iterable
from pcapng._compat import namedtuple
class FlagBase(object):
"""\
Base class for flag types to be used in a Flags object.
Handles the bitwise math so subclasses do... | apache-2.0 | 8,224,031,001,209,343,000 | 27.127551 | 87 | 0.534736 | false | 4.170197 | false | false | false |
roaet/quark | quark/db/migration/alembic/versions/79b768afed65_rename_tenant_id_indexes.py | 1 | 6050 | """rename tenant id indexes
Revision ID: 79b768afed65
Revises: 271cce54e15b
Create Date: 2015-05-20 21:39:19.348638
"""
# revision identifiers, used by Alembic.
revision = '79b768afed65'
down_revision = '271cce54e15b'
from alembic import op
import sqlalchemy as sa
from neutron.api.v2 import attributes as attr
_I... | apache-2.0 | -3,824,265,833,923,501,600 | 27.403756 | 69 | 0.546612 | false | 3.519488 | false | false | false |
pykiki/PyKI | tests/test_check_key_cert.py | 1 | 2012 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from OpenSSL import crypto, SSL
from os import path
'''
PyKI - PKI openssl for managing TLS certificates
Copyright (C) 2016 MAIBACH ALAIN
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Li... | gpl-3.0 | -7,313,299,838,045,761,000 | 32.533333 | 93 | 0.687873 | false | 3.505226 | false | false | false |
cherbib/fofix | src/GuitarScene.py | 1 | 323592 | #####################################################################
# -*- coding: iso-8859-1 -*- #
# #
# Frets on Fire #
# Copyright (C) 2006 Sami Kyöstil? ... | gpl-2.0 | 3,266,319,482,678,174,000 | 46.720395 | 411 | 0.613254 | false | 3.407236 | false | false | false |
michaelhidalgo/7WCSQ | Tools/SQLMap/sqlmap/lib/techniques/brute/use.py | 1 | 10676 | #!/usr/bin/env python
"""
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import time
from lib.core.common import clearConsoleLine
from lib.core.common import dataToStdout
from lib.core.common import filterListValue
from lib.core.common import getF... | apache-2.0 | -1,944,711,308,653,261,800 | 38.25 | 167 | 0.65474 | false | 3.736787 | false | false | false |
theCatWisel/ThreatExchange | pytx/pytx/threat_descriptor.py | 1 | 1324 | from .common import Common
from .vocabulary import ThreatDescriptor as td
from .vocabulary import ThreatExchange as t
class ThreatDescriptor(Common):
_URL = t.URL + t.VERSION + t.THREAT_DESCRIPTORS
_DETAILS = t.URL + t.VERSION
_RELATED = t.URL + t.VERSION
_fields = [
td.ADDED_ON,
td.... | bsd-3-clause | -7,972,141,957,186,459,000 | 20.015873 | 51 | 0.522659 | false | 3.293532 | false | false | false |
cayetanobv/QGIS-Plugin-MBTiles2img | mbtiles2img.py | 1 | 9872 | """
/***************************************************************************
MBTiles2img
A QGIS plugin
This plugin takes an mbtiles file and split it apart into a folder hierarchy
of individual image tile files.
-------------------
begin : 2014-12-09
... | gpl-2.0 | 6,449,369,633,904,403,000 | 33.15917 | 105 | 0.571212 | false | 4.432869 | false | false | false |
chjdev/euler | python/problem28.py | 1 | 1182 | # Number spiral diagonals
#
# Problem 28
#
# Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:
#
# 21 22 23 24 25
# 20 7 8 9 10
# 19 6 1 2 11
# 18 5 4 3 12
# 17 16 15 14 13
#
# It can be verified that the sum of the numbers on the diagonals is 101... | bsd-2-clause | 7,553,869,055,711,668,000 | 22.176471 | 115 | 0.584602 | false | 2.686364 | false | false | false |
liushuaikobe/yixin | lib/yixin.py | 1 | 10990 | # -*- coding: utf-8 -*-
import hashlib
import time
import simplejson
from xml.etree import ElementTree as etree
from xml.etree.ElementTree import Element, SubElement, ElementTree
import utils
import log
import constant
import messagebuilder
class YiXin(object):
'''
Main class of this lib.
'''
def __init__(self, ... | mit | -6,823,000,264,583,889,000 | 30.489971 | 136 | 0.602821 | false | 3.250518 | false | false | false |
atupal/ccrawler | request/baseRequestHandler.py | 1 | 5371 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
baseRequestHandler.py
~~~~~~~~~~~~~~~~~~~~~
Base request handler
"""
import gevent
from gevent import monkey
monkey.patch_all()
import requests
import logging
import os
import socket
import time
import json
from requests import ConnectionError
from random... | mit | 4,501,589,908,298,685,400 | 29.174157 | 89 | 0.508658 | false | 4.14749 | false | false | false |
dshulyak/solar | solar/solar/core/handlers/ansible_template.py | 1 | 1892 | # -*- coding: utf-8 -*-
from fabric import api as fabric_api
from fabric.state import env
import os
from solar.core.log import log
from solar.core.handlers.base import TempFileHandler
from solar import errors
# otherwise fabric will sys.exit(1) in case of errors
env.warn_only = True
class AnsibleTemplate(TempFileHa... | apache-2.0 | -6,704,512,065,824,343,000 | 38.416667 | 127 | 0.641121 | false | 3.549719 | false | false | false |
psykzz/flask-admin | flask_admin/contrib/sqla/view.py | 1 | 29504 | import logging
from sqlalchemy.orm.attributes import InstrumentedAttribute
from sqlalchemy.orm import joinedload
from sqlalchemy.sql.expression import desc
from sqlalchemy import Column, Boolean, func, or_
from sqlalchemy.exc import IntegrityError
from flask import flash
from flask.ext.admin._compat import string_ty... | bsd-3-clause | 28,792,571,841,860,910 | 31.529217 | 120 | 0.532436 | false | 4.72442 | false | false | false |
twitter/pants | src/python/pants/backend/native/subsystems/native_build_settings.py | 1 | 1424 | # coding=utf-8
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from pants.build_graph.mirrored_target_option_mixin import MirroredTargetOptionMixin
from... | apache-2.0 | 2,196,205,430,313,482,000 | 44.935484 | 100 | 0.728933 | false | 4.151603 | false | false | false |
602p/mps-punctuality | app/oauth.py | 1 | 2807 | from flask import Flask, redirect, url_for, session, request, jsonify, flash
from flask_oauthlib.client import OAuth
from flask_login import login_user
import json
from . import util
from . import app, db
from . import models
oauth = OAuth(app)
google = oauth.remote_app(
'google',
consumer_key=app.config.get(... | gpl-3.0 | 1,188,039,750,926,177,800 | 45.8 | 119 | 0.615604 | false | 4.068116 | false | false | false |
tomchristie/django-rest-framework | rest_framework/compat.py | 4 | 4387 | """
The `compat` module provides support for backwards compatibility with older
versions of Django/Python, and compatibility wrappers around optional packages.
"""
from django.conf import settings
from django.views.generic import View
def unicode_http_header(value):
# Coerce HTTP header value to unicode.
if i... | bsd-2-clause | -7,791,166,050,184,486,000 | 26.591195 | 101 | 0.644404 | false | 4.010055 | false | false | false |
mwalli/spark-cloudant | sql-cloudant/examples/python/CloudantDFOption.py | 2 | 2848 | #
# 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 | 5,622,174,105,918,317,000 | 39.112676 | 83 | 0.716994 | false | 3.456311 | false | false | false |
marble/Toolchain_RenderDocumentation | 36-Get-ready-for-publishing/run_01-Treat-pdf-folder.py | 1 | 4291 | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
from __future__ import absolute_import
import os
import tct
import sys
params = tct.readjson(sys.argv[1])
binabspath = sys.argv[2]
facts = tct.readjson(params['factsfile'])
milestones = tct.readjson(params['milestonesfile'])
reason = ''
resul... | mit | 8,712,881,131,675,113,000 | 27.798658 | 94 | 0.543696 | false | 3.760736 | false | false | false |
keon/algorithms | algorithms/matrix/crout_matrix_decomposition.py | 1 | 1286 | """
Crout matrix decomposition is used to find two matrices that, when multiplied
give our input matrix, so L * U = A.
L stands for lower and L has non-zero elements only on diagonal and below.
U stands for upper and U has non-zero elements only on diagonal and above.
This can for example be used to solve systems of l... | mit | -7,678,984,974,903,344,000 | 26.361702 | 77 | 0.517107 | false | 2.59798 | false | false | false |
nine/webcam | annotate.py | 1 | 1085 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from datetime import datetime
from wand.image import Image
from wand.drawing import Drawing
from wand.color import Color
def readStdinBinary():
return sys.stdin.buffer.read()
def main():
img_binary = readStdinBinary()
with Drawing() as draw:
with I... | gpl-3.0 | 8,877,753,994,074,388,000 | 24.186047 | 121 | 0.617729 | false | 3 | false | false | false |
punchagan/zulip | zerver/lib/markdown/__init__.py | 1 | 105624 | # Zulip's main Markdown implementation. See docs/subsystems/markdown.md for
# detailed documentation on our Markdown syntax.
import datetime
import functools
import html
import logging
import re
import time
import urllib
import urllib.parse
from collections import defaultdict, deque
from dataclasses import dataclass
f... | apache-2.0 | -5,365,257,474,454,156,000 | 38.076582 | 160 | 0.587632 | false | 3.962188 | false | false | false |
jiangdexiang/awesome-python-webapp | www/transwarp/db.py | 1 | 8617 | #!/usr/bin/env python
#-*-coding:utf8-*-
__author__ = 'jiangdexiang'
__version__ = '1.0'
__all__ = ['__author__', '__version__']
'''
Database operation module
'''
import threading
import time
import uuid
import functools
import logging
class Dict(dict):
"""
Simple dict but support access as x.y style.
... | gpl-2.0 | 7,174,816,158,842,612,000 | 23.413598 | 118 | 0.559011 | false | 3.812832 | false | false | false |
fabteam1/komsukomsuhuhu | komsukomsuhuu/profiles/forms.py | 1 | 2012 | from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import UserCreationForm
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User
from profiles.models import CustomUser, UserLocation
class LoginForm(forms.Form):
username = f... | mit | 8,524,575,782,871,746,000 | 25.473684 | 84 | 0.657555 | false | 4.471111 | false | false | false |
induane/stomp.py3 | stomp/connect.py | 1 | 38302 | import math
import random
import re
import socket
import sys
import threading
import time
import types
import xml.dom.minidom
import errno
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
protocols = frozenset([
'PROTOCOL_SSLv3',
'PROTOCOL_TLSv1_2',
'PROTOCOL_TLSv1_1... | apache-2.0 | -1,741,751,368,077,238,500 | 36.698819 | 137 | 0.534593 | false | 4.661312 | false | false | false |
mode89/snn | izhikevich/da.py | 1 | 3623 | import matplotlib.pyplot as plt
import numpy
import random
random.seed(0)
T = 100000
N = 1000
Ne = int(N * 0.8)
Ni = N - Ne
M = int(N * 0.1)
D = 20
a = numpy.concatenate((
0.02 * numpy.ones(Ne),
0.1 * numpy.ones(Ni)
))
d = numpy.concatenate((
8 * numpy.ones(Ne),
2 * numpy.ones(Ni)
))
# generate pos... | mit | 6,536,851,437,615,077,000 | 21.226994 | 73 | 0.553133 | false | 2.567682 | false | false | false |
bellhops/TapeDeck | tapedeck/deck/models.py | 1 | 1249 | import os
from binascii import hexlify
from django.db import models
def _createId():
return hexlify(os.urandom(8))
class Deck(models.Model):
hash = models.CharField(max_length=256, primary_key=True, default=_createId)
branch = models.ForeignKey('branch.Branch', on_delete=models.CASCADE)
version = mo... | mit | -3,008,835,626,457,854,500 | 39.290323 | 119 | 0.669335 | false | 3.866873 | false | false | false |
qualitio/qualitio | qualitio/settings.py | 1 | 5111 | import os
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Admin Qualitio', 'admin@qualitio.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(PROJECT_PATH, 'data.sqlit... | gpl-3.0 | -5,309,156,436,536,011,000 | 24.683417 | 85 | 0.638231 | false | 3.411883 | false | true | false |
nrupatunga/PY-GOTURN | goturn/loader/loader_imagenet.py | 1 | 5893 | # Date: Nrupatunga: Tuesday 04 July 2017
# Email: nrupatunga@whodat.com
# Name: Nrupatunga
# Description: loading Imagenet dataset
from __future__ import print_function
import os
import cv2
import glob
from annotation import annotation
import xml.etree.ElementTree as ET
from ..logger.logger import setup_logger
from ..... | mit | -4,537,307,078,829,376,500 | 36.535032 | 186 | 0.614628 | false | 3.63093 | false | false | false |
taschetto/computationalMethods | apoio/parse_svg.py | 1 | 1979 | import xml.etree.ElementTree as etree
import re
import sys
__author__ = 'Ramon Costi Fernandes <ramon.fernandes@acad.pucrs.br>'
SVG_namespace = "http://www.w3.org/2000/svg"
SVG_fname = ''
OUTPUT_fname = 'output.txt'
coordinates_list = []
output_list = []
#Instrucoes de uso.
def usage():
print("Como executar:\n"... | mit | -5,315,818,081,049,413,000 | 25.756757 | 86 | 0.610915 | false | 3.111635 | false | false | false |
nextcloud/appstore | nextcloudappstore/api/v1/serializers.py | 1 | 5412 | from django.contrib.auth import get_user_model
from parler_rest.fields import TranslatedFieldsField
from parler_rest.serializers import TranslatableModelSerializer
from rest_framework import serializers
from rest_framework.fields import SerializerMethodField, DateTimeField
from nextcloudappstore.core.models import Php... | agpl-3.0 | -6,720,910,243,370,764,000 | 34.84106 | 79 | 0.683666 | false | 4.221529 | false | false | false |
pomma89/Dessert | Dessert.Benchmarks/Common.py | 1 | 2245 | #
# Common.py
#
# Author(s):
# Alessio Parma <alessio.parma@gmail.com>
#
# Copyright (c) 2012-2016 Alessio Parma <alessio.parma@gmail.com>
#
# 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... | mit | -4,538,445,810,943,743,500 | 30.591549 | 79 | 0.712885 | false | 3.853952 | false | false | false |
google/clif | clif/python/proto.py | 1 | 5489 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | -3,793,998,925,067,095,000 | 32.469512 | 80 | 0.638914 | false | 3.585238 | false | false | false |
khchine5/book | lino_book/projects/homeworkschool/fixtures/demo.py | 1 | 1546 | # -*- coding: UTF-8 -*-
# Copyright 2012-2013 Luc Saffre
# License: BSD (see file COPYING for details)
from lino.utils.instantiator import Instantiator, i2d
from django.utils.translation import ugettext_lazy as _
from lino.api import dd
def objects():
#~ slot = Instantiator('courses.Slot','name start_time en... | bsd-2-clause | 4,543,015,073,316,322,000 | 36.560976 | 84 | 0.529221 | false | 3.188406 | false | false | false |
s0lst1c3/eaphammer | local/hostapd-eaphammer/tests/hwsim/test_radius.py | 1 | 70562 | # RADIUS tests
# Copyright (c) 2013-2016, Jouni Malinen <j@w1.fi>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
from remotehost import remote_compatible
import binascii
import hashlib
import hmac
import logging
logger = logging.getLogger()
import os
import sele... | gpl-3.0 | -3,032,000,768,132,133,000 | 41.920925 | 108 | 0.593733 | false | 3.437856 | true | false | false |
OpenEntityMap/oem-client-anidb | examples/anidb_example.py | 1 | 2245 | from __future__ import print_function
import logging
logging.basicConfig(level=logging.DEBUG)
from oem import OemClient
from oem.media.show.identifier import EpisodeIdentifier
log = logging.getLogger(__name__)
def run():
# Initialize client
client = OemClient(['anidb'], 'package')
#
# Basic
#
... | bsd-3-clause | 7,731,758,222,099,678,000 | 34.634921 | 93 | 0.621381 | false | 2.915584 | false | false | false |
mdmintz/SeleniumBase | examples/raw_parameter_script.py | 1 | 3034 | """ The main purpose of this file is to demonstrate running SeleniumBase
scripts without the use of Pytest by calling the script directly
with Python or from a Python interactive interpreter. Based on
whether relative imports work or don't, the script can autodetect
how this file was run. With pure Pyth... | mit | 8,546,046,157,528,285,000 | 33.477273 | 75 | 0.678972 | false | 3.816352 | true | false | false |
jfecroft/DOS | data/alkalis/jfec_k2/rovib.py | 1 | 1600 | import subprocess
import numpy as np
import os
import numpy.ma as ma
import re
from tempfile import mkstemp, mkdtemp
import shutil
import scipy.constants
#########################################
#replace will search through a file for a specific word an then replace that line
def replace(file, pattern, subst):
p... | mit | 8,721,651,068,161,395,000 | 30.372549 | 111 | 0.646875 | false | 3.305785 | false | false | false |
seleniumbase/SeleniumBase | examples/test_hack_search.py | 1 | 1313 | """ Testing the "self.set_attribute()" and "self.set_attributes()" methods
to modify a Google search into becoming a Bing search.
set_attribute() -> Modifies the attribute of the first matching element.
set_attributes() -> Modifies the attribute of all matching elements. """
from seleniumbase import BaseCa... | mit | 5,558,656,236,004,526,000 | 49.5 | 79 | 0.657273 | false | 3.698592 | false | false | false |
campadrenalin/EJTP-lib-python | setup.py | 1 | 3110 | #!/usr/bin/env python
from setuptools import setup
long_desc = '''
Encrypted JSON Transport Protocol
---------------------------------
EJTP is an overlay protocol that allows the pluggable use of underlying transports, such as UDP, TCP, HTTP, IRC, Email and carrier pigeon to provide a cryptographically secure netwo... | lgpl-3.0 | 5,118,365,220,916,456,000 | 39.38961 | 427 | 0.671704 | false | 3.715651 | false | false | false |
juliakreger/bifrost | playbooks/roles/ironic-install/files/parse_zuul_changes.py | 1 | 2325 | #!/usr/bin/env python
# (c) 2015, Hewlett-Packard Development Company, L.P.
#
# This module 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 ver... | apache-2.0 | -3,221,562,445,962,822,000 | 37.75 | 78 | 0.581505 | false | 3.824013 | false | false | false |
threedliams/CallbackBot | src/api/base.py | 1 | 10608 | import json
import os
#TODO: handle unicode better instead of just ignoring it
from unidecode import unidecode
from abc import ABC, abstractmethod
import src.util.callbackUtil
import src.data.messages
import src.data.polls
class API(ABC):
def __init__(self, token):
self.apiName = ""
self.client... | mit | -6,713,889,131,034,812,000 | 30.954819 | 134 | 0.523284 | false | 4.85048 | false | false | false |
tantexian/sps-2014-12-4 | sps/openstack/common/policy.py | 1 | 21606 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012 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-2.0 | 9,064,018,407,252,972,000 | 26.7 | 78 | 0.594048 | false | 4.255663 | false | false | false |
codecakes/algorithms_monk | search/numof_occurence_sorted.py | 1 | 1383 | def firstOccur(arr, N, x):
lastmid = lefti = mid = 0
righti = N-1
while lefti<righti:
mid = (lefti+righti)/2
if lastmid == mid:
mid += 1
if mid == righti:
return righti
if arr[mid] >= x:
righti = mid
else:
lefti = mid
... | mit | 6,805,885,785,412,038,000 | 25.596154 | 97 | 0.52133 | false | 3.019651 | false | false | false |
freelan-developers/teapot | teapot/path.py | 1 | 5726 | """
A teapot path-handling class.
"""
import os
import stat
import shutil
import errno
from contextlib import contextmanager
from functools import wraps
from teapot.log import LOGGER
from teapot.log import Highlight as hl
def from_user_path(path):
"""
Perform all variables substitutions from the specified ... | mit | 7,732,962,308,856,751,000 | 23.470085 | 91 | 0.580685 | false | 3.908532 | false | false | false |
rsepassi/tensor2tensor | tensor2tensor/data_generators/translate_enmk.py | 1 | 2362 | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | -664,401,956,210,390,800 | 33.231884 | 118 | 0.738781 | false | 3.473529 | false | false | false |
Larpon/DeadAscend | sbin/translation.py | 1 | 1945 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
from __future__ import print_function
import os
import re
import sys
import json
import argparse
import fileinput
def translation_qml(file_path):
j = json.load(open(file_path))
layers = j['layers']
qml_out = """import QtQuick 2.0
/*
* Auto-generated by sbi... | mit | 3,238,838,331,313,436,700 | 24.933333 | 95 | 0.548586 | false | 3.747592 | false | false | false |
mattrobenolt/invoke | integration/main.py | 1 | 4239 | import os
import sys
from spec import Spec, trap, eq_, skip, ok_
from invoke import run
from invoke._version import __version__
from invoke.platform import WINDOWS
def _output_eq(cmd, expected):
return eq_(run(cmd, hide=True).stdout, expected)
class Main(Spec):
def setup(self):
# Enter integration... | bsd-2-clause | 6,658,644,813,651,164,000 | 30.87218 | 79 | 0.557915 | false | 3.623077 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/operations/_express_route_cross_connections_operations.py | 1 | 43844 | # 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,148,993,289,227,831,800 | 51.257449 | 277 | 0.653043 | false | 4.291699 | true | false | false |
jolyonb/edx-platform | common/djangoapps/microsite_configuration/migrations/0001_initial.py | 1 | 5579 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import django.db.models.deletion
import django.utils.timezone
import jsonfield.fields
import model_utils.fields
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
depend... | agpl-3.0 | -6,011,930,392,601,583,000 | 51.140187 | 186 | 0.589353 | false | 4.318111 | false | false | false |
mbohlool/client-python | kubernetes/client/apis/apis_api.py | 1 | 4259 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
im... | apache-2.0 | -4,531,586,328,895,382,000 | 33.346774 | 119 | 0.540268 | false | 4.685369 | false | false | false |
raphaelvalentin/Utils | spectre/syntax/analyse.py | 1 | 10005 | import os
from spectre.syntax import Instance, common
from string import *
import numpy as np
__all__ = ['Noise', 'Xf', 'Ac', 'Dc', 'Sweep', 'MonteCarlo', 'Sp', 'Transient', 'Pss' ]
class values(list):
def __init__(self, it):
if isinstance(it, (list, np.ndarray)):
list.__init__(self, it)
else... | gpl-2.0 | 4,857,034,511,372,369,000 | 39.836735 | 152 | 0.50015 | false | 3.659473 | false | false | false |
google-research/ssl_detection | third_party/tensorpack/tensorpack/input_source/input_source.py | 1 | 25606 | # -*- coding: utf-8 -*-
# File: input_source.py
import threading
from contextlib import contextmanager
from itertools import chain
import tensorflow as tf
from ..compat import tfv1
from ..callbacks.base import Callback, CallbackFactory
from ..callbacks.graph import RunOp
from ..dataflow import DataFlow, MapData, Rep... | apache-2.0 | 7,025,043,686,877,972,000 | 36.218023 | 118 | 0.582012 | false | 4.073497 | false | false | false |
r3n0us/irhelper | modules/cmds/vol_pslist_module.py | 1 | 23357 | import re
import collections
import json
import sys
sys.path.append(sys.path[0]+"/../../")
from modules.utils.helper import *
from modules.db import DBops as dbops
##TODO remove sqlite and create dbops
import sqlite3
result = {'status': True, 'message': '', 'cmd_results': '', 'errors': []}
def vol_pslist(project):... | gpl-3.0 | 8,066,239,497,995,908,000 | 39.550347 | 258 | 0.518046 | false | 3.958143 | false | false | false |
jim-cooley/abletonremotescripts | remote-scripts/samples/Twister Ableton Script v1.2.2/Twister/Twister.py | 1 | 78676 | from __future__ import with_statement
import Live
import time
import math
import sys
from _Framework.ButtonElement import ButtonElement # Class representing a button a the controller
from _Framework.ButtonMatrixElement import ButtonMatrixElement # Class representing a 2-dimensional set of buttons
from _Framework.Chann... | apache-2.0 | -6,756,718,938,802,655,000 | 51.451333 | 368 | 0.711958 | false | 3.259155 | false | false | false |
zenwarr/microhex | src/hex/struct.py | 1 | 1291 | class AbstractDataType(object):
def __init__(self, name):
self.name = name
self.fixedSize = True
def parse(self, cursor):
"""Should return Value structure"""
raise NotImplementedError()
class Integer(AbstractDataType):
def __init__(self, binary_format, signed=True):
... | mit | -4,922,127,411,357,640,000 | 22.053571 | 65 | 0.630519 | false | 4.260726 | false | false | false |
bitmazk/django-multilingual-news | multilingual_news/south_migrations/0014_auto__add_field_newsentry_author_user.py | 1 | 15887 | # flake8: noqa
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
no_dry_run = True
def forwards(self, orm):
# Adding field 'NewsEntry.author_user'
... | mit | 4,539,886,842,019,949,000 | 83.957219 | 218 | 0.563102 | false | 3.603311 | false | false | false |
gabberthomson/fm_finpy | ois_products.py | 1 | 4520 | from date_conventions import *
class OvernightIndexSwap:
''' We define the product by its:
- startDate
- endDate
- floatingLegNominal: the nominal used to compute the flows of the floating leg:
if positive the flows are received, negative paid
- fixedLegDates: the union of the start and end d... | mit | -8,323,141,087,552,210,000 | 46.578947 | 120 | 0.685619 | false | 3.735537 | false | false | false |
lichengshuang/createvhost | python/others/others/scan.py | 1 | 2273 | #!/usr/bin/python
#-*- coding:utf-8 -*-
import nmap
import re
import mytools as tool
import sys
from multiprocessing import Pool
from functools import partial
reload(sys)
sys.setdefaultencoding('utf8')
def nmScan(host,portrange,whitelist):
p = re.compile("^(\d*)\-(\d*)$")
# if type(hostlist) != list:
# h... | apache-2.0 | -457,130,135,378,470,200 | 36.982456 | 349 | 0.553349 | false | 3.045007 | false | false | false |
ubuntunux/PyEngine3D | PyEngine3D/Render/RenderInfo.py | 1 | 2991 | import math
from PyEngine3D.Utilities import *
def always_pass(*args):
return False
def cone_sphere_culling_actor(camera, actor):
to_actor = actor.transform.pos - camera.transform.pos
dist = length(to_actor)
if 0.0 < dist:
to_actor /= dist
rad = math.acos(np.dot(to_actor, -camera.tran... | bsd-2-clause | 8,852,743,141,399,126,000 | 37.844156 | 191 | 0.647944 | false | 3.522968 | false | false | false |
MarkusHackspacher/unknown-horizons | horizons/gui/tabs/tabwidget.py | 1 | 5897 | # ###################################################
# Copyright (C) 2008-2017 The Unknown Horizons Team
# team@unknown-horizons.org
# This file is part of Unknown Horizons.
#
# Unknown Horizons is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 | 8,626,222,870,787,321,000 | 37.542484 | 114 | 0.709852 | false | 3.39298 | false | false | false |
brclark-usgs/flopy | flopy/utils/reference.py | 1 | 57544 | """
Module spatial referencing for flopy model objects
"""
import sys
import os
import numpy as np
import warnings
class SpatialReference(object):
"""
a class to locate a structured model grid in x-y space
Parameters
----------
delr : numpy ndarray
the model discretiza... | bsd-3-clause | 7,134,044,055,945,005,000 | 32.212842 | 94 | 0.501373 | false | 4.018997 | false | false | false |
privacyidea/privacyideaadm | privacyideautils/commands/audit.py | 1 | 2377 | # -*- coding: utf-8 -*-
#
# 2020-04-13 Cornelius Kölbel <cornelius.koelbel@netknights.it>
# migrate to click
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# License as published by the Free Software Foundation; either
# v... | agpl-3.0 | 7,420,498,847,606,918,000 | 32.942857 | 87 | 0.631313 | false | 3.741732 | false | false | false |
arikpoz/deep-visualization-toolbox | run_webui.py | 1 | 1847 | #! /usr/bin/env python
import os
import thread
from live_vis import LiveVis
from bindings import bindings
try:
import settings
except:
print '\nError importing settings.py. Check the error message below for more information.'
print "If you haven't already, you'll want to open the settings_model_selector.py... | mit | 5,724,847,422,443,700,000 | 25.768116 | 103 | 0.644288 | false | 3.382784 | false | false | false |
smtpinc/sendapi-python | lib/smtpcom/sendapi/api.py | 1 | 2905 | from smtpcom.sendapi.send import SendAPI
from smtpcom.sendapi.report import ReportAPI
from smtpcom.sendapi.campaign import CampaignAPI
from smtpcom.sendapi.template import TemplateAPI
class API(object):
def __init__(self, content_type='json'):
self.__report = ReportAPI(content_type)
self.__templat... | mit | 8,842,121,755,625,203,000 | 34.864198 | 74 | 0.657143 | false | 3.573186 | false | false | false |
mabotech/mabo.io | py/vision/vision24/vision_crop2.py | 1 | 6011 |
import time
import socket
import gevent
import numpy as np
import sys
import cv2
from load_config import LoadConfig
import cvlib
conf = LoadConfig("config.toml").config
"""
def match():
img = cv2.imread("box_in_scene2.png")#sys.argv[1])
temp = cv2.imread("box4.png")#sys.argv[2])
try:
dist = ... | mit | -8,267,754,926,154,588,000 | 25.955157 | 91 | 0.414241 | false | 3.540047 | false | false | false |
camilonova/sentry | src/sentry/utils/http.py | 1 | 3666 | """
sentry.utils.http
~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import six
import urllib
from django.conf import settings
from urlparse import urlparse, urljoin
def absolute_u... | bsd-3-clause | 5,602,243,267,741,755,000 | 26.358209 | 101 | 0.619749 | false | 3.980456 | false | false | false |
sauli6692/ibc-server | core/models/user.py | 1 | 2164 | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.base_user import BaseUserManager, AbstractBaseUser
from django.utils.translation import ugettext_lazy as _
from .mixins.log_fields import LogFieldsMixin
class UserManager(Ba... | mit | -6,175,051,724,267,287,000 | 29.055556 | 84 | 0.635397 | false | 4.098485 | false | false | false |
relic7/prodimages | python/pm_update_photodate_andmultistyles.py | 1 | 8394 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys, re, csv
def update_pm_photodate(colorstyle):
import subprocess
update_url = 'http://dmzimage01.l3.bluefly.com:8080/photo/{0}'.format(colorstyle)
subprocess.call([
"curl",
'-d',
"sample_image=Y",
'-d',
"photographed_date=now"... | mit | 3,212,388,557,149,291,500 | 33.979167 | 114 | 0.546938 | false | 3.565845 | false | false | false |
baklanovp/pystella | tests/test_band.py | 1 | 8215 | import unittest
import numpy as np
import pystella.rf.band as band
from pystella.rf.rad_func import Flux2MagAB, MagAB2Flux
from pystella.util.phys_var import phys
__author__ = 'bakl'
class BandTests(unittest.TestCase):
def test_load_names(self):
bands = band.band_load_names()
self.assertTrue(len(... | mit | 4,692,399,836,042,024,000 | 45.676136 | 119 | 0.546683 | false | 2.809508 | true | false | false |
dceresoli/ce-espresso | test-suite/testcode/bin/testcode.py | 1 | 32042 | #!/usr/bin/env python2
'''testcode [options] [action1 [action2...]]
testcode is a simple framework for comparing output from (principally numeric)
programs to previous output to reveal regression errors or miscompilation.
Run a set of actions on a set of tests.
Available actions:
compare compare set ... | gpl-2.0 | 2,921,529,414,655,211,000 | 38.803727 | 91 | 0.610324 | false | 3.946059 | true | false | false |
Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/pyshared/orca/scripts/toolkits/WebKitGtk/script.py | 1 | 18079 | # Orca
#
# Copyright (C) 2010-2011 The Orca Team
#
# Author: Joanmarie Diggs <joanmarie.diggs@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the Lice... | gpl-3.0 | 4,101,551,143,108,722,000 | 33.969052 | 79 | 0.61176 | false | 4.330299 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v6/resources/types/search_term_view.py | 1 | 2117 | # -*- 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 o... | apache-2.0 | 4,458,826,763,105,366,500 | 33.145161 | 109 | 0.68871 | false | 3.957009 | false | false | false |
gr1d99/shopping-list | shopping_app/views.py | 1 | 12925 | """This module contains all necessary views to power up shopping list web application"""
import time
import main
from flask import flash, redirect, render_template, request, session, url_for
from flask.views import View
from .db.shopping_list.shopping import ShoppingList
from .forms import (CreateShoppingItemForm, Cr... | mit | 3,321,740,856,181,348,400 | 32.926509 | 96 | 0.554894 | false | 4.237705 | false | false | false |
overfl0/Bulletproof-Arma-Launcher | src/utils/filecache.py | 1 | 1887 | # Bulletproof Arma Launcher
# Copyright (C) 2017 Lukasz Taczuk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# b... | gpl-3.0 | -3,351,975,119,354,723,300 | 23.506494 | 78 | 0.670906 | false | 3.843177 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.