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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Transkribus/TWI-edit | views.py | 1 | 16936 | #imports of python modules
import json
import sys
import re
import random
from xml.etree import ElementTree
#Imports of django modules
from django.http import HttpResponse
from django.http import JsonResponse
from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.utils import tra... | gpl-3.0 | 4,320,347,720,505,138,000 | 58.633803 | 237 | 0.606991 | false | 4.061391 | false | false | false |
RobLoach/lutris | lutris/util/wineprefix.py | 1 | 2815 | import os
from lutris.util.wineregistry import WineRegistry
from lutris.util.log import logger
from lutris.util import joypad
class WinePrefixManager:
"""Class to allow modification of Wine prefixes without the use of Wine"""
hkcu_prefix = "HKEY_CURRENT_USER"
def __init__(self, path):
self.path =... | gpl-3.0 | 4,930,818,353,654,908,000 | 35.558442 | 88 | 0.593961 | false | 3.595147 | false | false | false |
gamesun/MyTerm-for-YellowStone | appInfo.py | 1 | 1742 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2013, gamesun
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyr... | bsd-3-clause | -5,196,408,145,172,072,000 | 42.55 | 80 | 0.762342 | false | 4.127962 | false | false | false |
thinker0/aurproxy | tellapart/aurproxy/metrics/publisher.py | 1 | 6667 | # Copyright 2015 TellApart, 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 writi... | apache-2.0 | 4,870,028,771,380,186,000 | 29.865741 | 117 | 0.646468 | false | 4.02111 | false | false | false |
HeavenMin/PlantImageRecognition | Dataset Process/Delete_Anaything_Not_Flower.py | 1 | 2191 |
"""
AUTHOR : Lang
PURPOSE : Multi Self Deep Learning
"""
__author__ = 'Lang'
import tensorflow as tf, sys
import os
# change this as you see fit
graph_path_temple = sys.argv[1]
label_path_temple = sys.argv[2]
graph_path = os.path.abspath(graph_path_temple)
label_path = os.path.abspath(label_path_temple)
# Loa... | apache-2.0 | -2,854,865,646,833,656,000 | 30.753623 | 91 | 0.572798 | false | 3.713559 | false | false | false |
mojolab/LivingData | tools/gdocstest.py | 1 | 1443 | #!/usr/bin/python
import httplib2
import pprint
from apiclient.discovery import build
from apiclient.http import MediaFileUpload
from oauth2client.client import OAuth2WebServerFlow
# Copy your credentials from the APIs Console
CLIENT_ID = "110041408722.apps.googleusercontent.com"
CLIENT_SECRET = "IGeDmFs_w1mieqQ_s9... | apache-2.0 | 7,104,577,775,863,679,000 | 30.369565 | 79 | 0.763687 | false | 3.199557 | false | false | false |
colour-science/colour-demosaicing | colour_demosaicing/bayer/demosaicing/menon2007.py | 1 | 10345 | # -*- coding: utf-8 -*-
"""
DDFAPD - Menon (2007) Bayer CFA Demosaicing
===========================================
*Bayer* CFA (Colour Filter Array) DDFAPD - *Menon (2007)* demosaicing.
References
----------
- :cite:`Menon2007c` : Menon, D., Andriani, S., & Calvagno, G. (2007).
Demosaicing With Directional Fil... | bsd-3-clause | -7,104,833,143,231,050,000 | 27.03523 | 79 | 0.487385 | false | 2.434691 | false | false | false |
reubano/swutils | manage.py | 1 | 2288 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" A script to manage development tasks """
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
from os import path as p
from manager import Manager
from subprocess import call
manager = Manager()
BASEDIR = p.di... | mit | -581,464,328,525,125,900 | 21.653465 | 78 | 0.645542 | false | 3.477204 | false | false | false |
bstroebl/QGIS | python/plugins/GdalTools/tools/dialogSRS.py | 1 | 2128 | # -*- coding: utf-8 -*-
"""
***************************************************************************
dialogSRS.py
---------------------
Date : June 2010
Copyright : (C) 2010 by Giuseppe Sucameli
Email : brush dot tyler at gmail dot com
******************... | gpl-2.0 | 715,995,025,839,427,600 | 33.885246 | 80 | 0.522086 | false | 4.387629 | false | false | false |
alaeddine10/ggrc-core | src/ggrc/fulltext/mysql.py | 1 | 1158 |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By:
# Maintained By:
from ggrc import db
from sqlalchemy import event
from sqlalchemy.sql.expression import text
from sqlalchemy.schema import DDL
fro... | apache-2.0 | 8,088,862,217,565,668,000 | 30.324324 | 78 | 0.722798 | false | 3.436202 | false | false | false |
PythonMid/pymidweb | pythonmid/apps/community/migrations/0006_auto_20150624_2211.py | 1 | 1137 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import pythonmid.apps.community.models
class Migration(migrations.Migration):
dependencies = [
('community', '0005_sponsor_level'),
]
operations = [
migrations.AlterField(
... | gpl-2.0 | 3,638,746,908,936,171,000 | 31.485714 | 127 | 0.593668 | false | 4.031915 | false | false | false |
anushreejangid/csmpe-main | csmpe/core_plugins/csm_install_operations/ios_xe/pre_activate.py | 1 | 8907 | # =============================================================================
#
# Copyright (c) 2016, Cisco Systems
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source ... | bsd-2-clause | 3,346,183,386,358,608,000 | 41.822115 | 113 | 0.589536 | false | 4.223329 | false | false | false |
jonmorehouse/vimhub | lib/issue.py | 1 | 8147 | import utils
import config
import re
import git
import copy
import comment_list
import webbrowser
import github
try:
import vim
except ImportError as e:
vim = False
i_hash = {} # hash individual issues
class Issue:
defaults = {
"title": "",
"assignee": "",
"milestone": "",
... | mit | 8,800,810,227,783,466,000 | 30.824219 | 162 | 0.527924 | false | 3.90369 | false | false | false |
UofS-CTLE/Projtrack3 | ctleweb/d2lstat/views.py | 1 | 1924 | from django.shortcuts import render
from .d2lstat import process_file, calculateVirtualClassroomStats, facultyNotUsingD2LCalculation
from .forms import UploadFileForm, VirtualClassroomUsageForm, FacultyNotUsingD2LForm
def index(request):
if request.method == 'POST':
process_file(request.FILES['usage'].te... | gpl-3.0 | 1,134,818,794,261,291,500 | 48.333333 | 100 | 0.650208 | false | 4.008333 | false | false | false |
bverdu/onDemand | gui/widgets.py | 1 | 15338 | # encoding: utf-8
'''
Created on 29 mai 2015
@author: Bertrand Verdu
'''
from __future__ import print_function
import os
from kivy.clock import Clock
from kivy.core.window import Window
# from kivy.graphics.transformation import Matrix
from kivy.loader import Loader
from kivy.metrics import dp
from kivy.properties... | agpl-3.0 | 1,037,562,344,166,610,300 | 29.923387 | 79 | 0.548703 | false | 3.816372 | false | false | false |
Salamek/reader | reader/read.py | 1 | 1502 | from acr122l import acr122l
import time
acr122l = acr122l()
true = True
def read_card():
global true
true = False
key = [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]
print acr122l.TAG_Authenticate(0x00, key)
print 'Starting read data'
readed = acr122l.TAG_Read(0x01)
if readed:
acr122l.LCD_Clear()
acr122l.LED_control... | gpl-3.0 | -4,102,813,253,444,852,700 | 19.861111 | 68 | 0.654461 | false | 2.208824 | false | false | false |
leandrotoledo/python-telegram-bot | telegram/payment/precheckoutquery.py | 2 | 5229 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2021
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | lgpl-3.0 | -7,302,558,104,083,430,000 | 36.35 | 98 | 0.634921 | false | 3.982483 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/enums/types/payment_mode.py | 1 | 1182 | # -*- 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 | -7,034,423,592,130,008,000 | 28.55 | 74 | 0.680203 | false | 3.966443 | false | false | false |
dchaplinsky/pep.org.ua | pepdb/tasks/management/commands/export_foreign_companies.py | 1 | 2271 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import xlsxwriter
from django.core.management.base import BaseCommand
from tasks.models import BeneficiariesMatching
class Command(BaseCommand):
help = ('Exports the list of foreign companies from declarations of PEPs '
'which aren\'t ye... | mit | -8,220,127,339,190,007,000 | 30.541667 | 82 | 0.484808 | false | 4.22905 | false | false | false |
simplegeo/authorize | authorize/gen_xml.py | 1 | 17930 | # -*- encoding: utf-8 -*-
import re
import decimal
from xml.etree.cElementTree import fromstring, tostring
from xml.etree.cElementTree import Element, iselement
from authorize import responses
API_SCHEMA = 'https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd'
API_SCHEMA_NS = "AnetApi/xml/v1/schema/AnetApiSchem... | mit | 7,084,245,678,588,358,000 | 30.236934 | 102 | 0.566481 | false | 3.686266 | false | false | false |
singingwolfboy/flask-dance | flask_dance/contrib/gitlab.py | 1 | 4319 | from flask_dance.consumer import OAuth2ConsumerBlueprint
from flask_dance.consumer.requests import OAuth2Session
from functools import partial
from flask.globals import LocalProxy, _lookup_app_object
from flask import _app_ctx_stack as stack
__maintainer__ = "Justin Georgeson <jgeorgeson@lopht.net>"
class NoVerify... | mit | -1,558,331,981,668,643,000 | 38.990741 | 92 | 0.659875 | false | 4.148895 | false | false | false |
badbytes/pymeg | pdf2py/update_data_header.py | 1 | 2127 | # update_data_header.py
#
# Copyright 2010 dan collins <danc@badbytes.net>
#
# 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
# ... | gpl-3.0 | -5,053,035,822,500,065,000 | 47.340909 | 129 | 0.684532 | false | 3.57479 | false | false | false |
google/revisiting-self-supervised | self_supervision/patch_utils.py | 1 | 12719 | #!/usr/bin/python
#
# Copyright 2019 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 ag... | apache-2.0 | 1,947,931,036,470,123,300 | 33.008021 | 80 | 0.652174 | false | 3.483703 | false | false | false |
DevynCJohnson/Pybooster | pylib/code_interpreter.py | 1 | 5388 | #!/usr/bin/env python3
# -*- coding: utf-8; Mode: Python; indent-tabs-mode: nil; tab-width: 4 -*-
# vim: set fileencoding=utf-8 filetype=python syntax=python.doxygen fileformat=unix tabstop=4 expandtab :
# kate: encoding utf-8; bom off; syntax python; indent-mode python; eol unix; replace-tabs off; indent-width 4; tab-... | lgpl-3.0 | 9,036,564,200,472,079,000 | 27.209424 | 150 | 0.627506 | false | 3.332096 | false | false | false |
dcluna/screenkey | setup.py | 1 | 1475 | #!/usr/bin/env python
from setuptools import setup
setup(name='screenkey', version='0.5',
description='A screencast tool to display keys',
author='Pablo Seminario',
author_email='pabluk@gmail.com',
maintainer='Yuri D\'Elia',
maintainer_email='wavexx@thregr.org',
license='GPLv3+',
... | gpl-3.0 | -1,585,662,621,625,723,100 | 39.972222 | 96 | 0.583051 | false | 4.325513 | false | false | false |
ryfeus/lambda-packs | Opencv_pil/source36/numpy/core/tests/test_shape_base.py | 1 | 24251 | from __future__ import division, absolute_import, print_function
import pytest
import sys
import numpy as np
from numpy.core import (
array, arange, atleast_1d, atleast_2d, atleast_3d, block, vstack, hstack,
newaxis, concatenate, stack
)
from numpy.core.shape_base import (_block_dispatcher, _block_setup,
... | mit | -6,761,586,550,664,110,000 | 33.545584 | 87 | 0.478619 | false | 3.208653 | true | false | false |
auvsi-suas/interop | server/auvsi_suas/views/odlcs.py | 1 | 16208 | """Odlcs view."""
from PIL import Image
import io
import json
import logging
import os
import os.path
import re
from auvsi_suas.models.gps_position import GpsPosition
from auvsi_suas.models.mission_config import MissionConfig
from auvsi_suas.models.odlc import Odlc
from auvsi_suas.proto import interop_admin_api_pb2
fro... | apache-2.0 | -4,131,356,739,532,436,000 | 34.234783 | 80 | 0.627159 | false | 3.744917 | false | false | false |
CoinEXchange/CoinX | coindb/db.py | 1 | 2156 | import peewee
from peewee import *
DEBUG = True
db = MySQLDatabase(None)
class COINModel(Model):
class Meta:
database = db
class Order(COINModel):
class Meta:
db_table = 'order'
## CREATE TABLE `order` (
## `address` varchar(40) NOT NULL DEFAULT '',
## `btc_address` varchar(40) DE... | gpl-2.0 | -7,011,038,118,931,080,000 | 31.179104 | 72 | 0.673469 | false | 3.32716 | false | false | false |
dbroudy/django-apollo | apollo/views.py | 1 | 2271 | from django.contrib.sites.models import get_current_site
from django.http import HttpResponse, HttpResponseNotAllowed, HttpResponseBadRequest
from django.shortcuts import render, get_object_or_404
import json
import re
from apollo.models import Page, Button, Survey, SurveyAnswer, Answer
from apollo.forms import SurveyF... | mit | 8,743,457,726,549,913,000 | 27.3875 | 84 | 0.646852 | false | 3.52093 | false | false | false |
spiralx/mypy | mypy/spiralx/rest.py | 1 | 1666 | #! python3
import logging
import requests
import re
from urllib.parse import urlsplit, urlunsplit, urljoin
_logger = logging.getLogger("spiralx.rest")
_logger.setLevel(logging.DEBUG)
# -------------------------------------------------------------
_has_scheme = lambda u: re.match(r"(?:https?:)?//", u) is not None... | mit | 7,442,002,649,318,131,000 | 23.865672 | 110 | 0.528812 | false | 4.014458 | false | false | false |
chinapnr/fish_base | fishbase/fish_crypt.py | 1 | 7173 | # coding=utf-8
"""
``fish_crypt`` 包含的是一些加密、编码数据的函数,比如 MD5、SHA256 的计算。
原来这些方法属于 fish_common 模块, 因 fish_common 过于杂乱,故重新进行分类整理。
"""
# 2019.01.21 v1.1.6 created by Hu Jun
import hashlib
import hmac
import base64
# 2018.5.8 edit by David Yi, edit from Jia Chunying,#19026
# 2018.6.12 edit by Hu Jun, edit from Jia Chuny... | mit | 3,705,349,012,075,000,300 | 26.469828 | 96 | 0.555625 | false | 2.562525 | true | false | false |
mirestrepo/voxels-at-lems | bvpl/bvpl_octree/PCA/release/reconstruction_error/compute_pca_error_scene.py | 1 | 5454 | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 14, 2011
@author:Isabel Restrepo
Compuets PCA reconstruction error. Each block is processed in a separate thread.
This script assumes that the pca basis has been computed as gone by extract_pca_kernels.py
"""
import os;
import bvpl_octree_batch
import multiprocessing
imp... | bsd-2-clause | -1,480,236,010,235,916,800 | 32.060606 | 92 | 0.623029 | false | 3.301453 | false | false | false |
SKIRT/PTS | evolve/core/utils.py | 1 | 11501 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 | -2,755,724,891,698,071,600 | 24.612472 | 112 | 0.453565 | false | 4.440154 | false | false | false |
aetilley/revscoring | setup.py | 1 | 1234 | import os
from setuptools import find_packages, setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def requirements(fname):
return [line.strip()
for line in open(os.path.join(os.path.dirname(__file__), fname))]
setup(
name="revscoring",
version="0... | mit | -5,696,906,683,495,392,000 | 29.85 | 77 | 0.60859 | false | 4.14094 | false | false | false |
PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/test_conv2d_op.py | 1 | 35379 | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 | -7,622,533,692,147,087,000 | 34.27318 | 81 | 0.578027 | false | 3.215104 | true | false | false |
mizdebsk/javapackages | java-utils/maven_depmap.py | 1 | 11246 | #
# Copyright (c) 2014, Red Hat, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions a... | bsd-3-clause | -2,782,331,628,701,944,000 | 34.701587 | 156 | 0.649475 | false | 3.87259 | false | false | false |
jonathonwalz/ansible | lib/ansible/modules/cloud/amazon/ec2_group.py | 2 | 23019 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible
#
# Ansible 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 | -2,607,996,531,438,057,500 | 35.422468 | 157 | 0.58039 | false | 3.937564 | false | false | false |
Torrib/gradestats | grades/migrations/0001_initial.py | 1 | 2914 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-03-28 17:10
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | apache-2.0 | 7,684,794,871,829,306,000 | 46 | 114 | 0.563143 | false | 4.408472 | false | false | false |
chslion/raspy | raspytasks/rcsocket/socket.py | 1 | 8753 | # -*- coding: utf-8 -*-
import random
from raspysystem.raspycollection import RasPyCollection
from raspysystem.raspysamplelogger import RasPySampleLogger
from raspysystem.raspyenergymeter import RasPyEnergyMeter
from raspysystem.raspytask import RasPySimpleTask
from rcswitch import SwitchTypeB
class Socket(object):
... | gpl-3.0 | 6,210,325,488,518,129,000 | 27.235484 | 86 | 0.534902 | false | 4.146376 | false | false | false |
haje01/mersoz | mersoz/merge.py | 1 | 1768 | import os
import re
import codecs
from optparse import OptionParser
import ConfigParser
from StringIO import StringIO
def main():
parser = OptionParser("Usage: %prog [options] cfgpath cfgsect "
"catalog-path")
(options, args) = parser.parse_args()
if len(args) < 3:
parser... | mit | -994,023,040,797,049,200 | 31.740741 | 72 | 0.516968 | false | 3.860262 | false | false | false |
karstenw/nodebox-pyobjc | examples/Extended Application/matplotlib/examples/misc/tight_bbox_test.py | 1 | 1357 | """
===============
Tight Bbox Test
===============
"""
from __future__ import print_function
import matplotlib.pyplot as plt
import numpy as np
# nodebox section
if __name__ == '__builtin__':
# were in nodebox
import os
import tempfile
W = 800
inset = 20
size(W, 600)
plt.cla()
plt.clf... | mit | -3,163,077,550,626,046,000 | 24.12963 | 82 | 0.560796 | false | 3.098174 | false | false | false |
harshavardhana/minio-py | setup.py | 1 | 2454 | # Minio Python Library for Amazon S3 Compatible Cloud Storage, (C) 2015 Minio, 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
#
# Unle... | apache-2.0 | 3,117,691,991,688,107,500 | 28.214286 | 89 | 0.639364 | false | 3.729483 | false | false | false |
nicolacimmino/LoP-RAN | LoPAccessPoint/MacroIP.py | 1 | 2793 | # MacroIP is part of MacroIP Core. Provides Access to IP services through simple
# textual macros.
# Copyright (C) 2014 Nicola Cimmino
#
# 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... | gpl-3.0 | -7,017,552,991,264,904,000 | 32.662651 | 80 | 0.723595 | false | 3.385455 | false | false | false |
MicroPyramid/Django-CRM | teams/api_views.py | 1 | 8866 | from django.contrib.sites.shortcuts import get_current_site
from django.core.exceptions import PermissionDenied
from django.db.models import Q
from teams import swagger_params
from teams.models import Teams
from teams.tasks import update_team_users, remove_users
from teams.serializer import TeamsSerializer, TeamCreateS... | mit | -466,532,188,539,851,400 | 35.636364 | 85 | 0.538236 | false | 4.395637 | false | false | false |
CaliOpen/CaliOpen | src/backend/interfaces/REST/py.server/caliopen_api/message/message.py | 1 | 4304 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import logging
from cornice.resource import resource, view
from pyramid.response import Response
from caliopen_main.message.objects.message import Message as ObjectMessage
from caliopen_main.message.core import RawMessag... | gpl-3.0 | -7,047,381,982,959,401,000 | 35.474576 | 80 | 0.62895 | false | 4.369543 | false | false | false |
cloud-ark/cloudark | server/gcloud_handler.py | 1 | 4809 | import ast
from os.path import expanduser
from stevedore import extension
from common import common_functions
from common import fm_logger
from dbmodule.objects import app as app_db
from dbmodule.objects import environment as env_db
from server.server_plugins.gcloud import gcloud_helper
home_dir = expanduser("~")
A... | apache-2.0 | -7,426,348,535,844,958,000 | 36.578125 | 100 | 0.614681 | false | 3.657034 | false | false | false |
kiruto/Weixin-Article-Spider | storage/sqlite_storage.py | 1 | 6856 | # -*- coding: utf-8 -*-
import hashlib
import json
import re
import sqlite3
import time
import datetime
import common
from storage import db
version = '1.0'
class SQLiteStorage:
def __init__(self):
self._connect = sqlite3.connect(db)
self._connect.text_factory = str
self._create_table()... | gpl-3.0 | -1,672,044,169,058,816,300 | 30.774648 | 110 | 0.531324 | false | 3.787353 | false | false | false |
havencruise/django-utils | templatetags/fieldset_form.py | 1 | 1863 | from django import template
register = template.Library()
@register.filter('get_form_field')
def get_form_field(form, field):
return form[field]
@register.inclusion_tag('form_as_fieldset.html')
def form_as_fieldset_fields(form, fieldsets=None):
"""
Render the form as a fieldset form.
Example usage ... | mit | -6,858,266,544,679,391,000 | 24.534247 | 83 | 0.531938 | false | 3.825462 | false | false | false |
codycollier/booster | test/test_appserver_create_webdav.py | 1 | 5138 | #!/usr/bin/env python
import time
import unittest
import boostertest
class TestAppserverCreateWebdav(boostertest.BoosterTestCase):
""" Test the appserver-create-webdav action """
def setUp(self):
""" Set the action and other commonly used fixture data """
self.params = {}
self.para... | apache-2.0 | -315,975,134,436,366,100 | 43.293103 | 114 | 0.619502 | false | 3.910198 | true | false | false |
rickerc/cinder_audit | cinder/tests/keymgr/mock_key_mgr.py | 1 | 4301 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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 L... | apache-2.0 | 2,807,719,877,161,916,400 | 33.685484 | 78 | 0.662404 | false | 4.271102 | false | false | false |
lingtools/lingtools | lingtools/util/datamanager.py | 1 | 1638 | """
Functions for managing data.
"""
# Copyright 2011-2013 Constantine Lignos
#
# 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 re... | apache-2.0 | 6,173,010,345,642,779,000 | 30.5 | 98 | 0.686813 | false | 3.956522 | false | false | false |
AmritaLonkar/trunk | SU2_PY/SU2/run/adaptation.py | 2 | 1063 |
import os, sys, shutil, copy
from .. import io as su2io
from .. import mesh as su2mesh
from decompose import decompose as su2decomp
def adaptation ( config , kind='' ):
# local copy
konfig = copy.deepcopy(config)
# check kind
if kind: konfig['KIND_ADAPT'] = kind
kind = konfig.get('KIN... | gpl-2.0 | -1,794,196,554,823,683,300 | 20.714286 | 71 | 0.597366 | false | 3.396166 | false | false | false |
jmgc/myhdl-numeric | myhdl/_extractHierarchy.py | 1 | 15467 | # This file is part of the myhdl library, a Python package for using
# Python as a Hardware Description Language.
#
# Copyright (C) 2003-2008 Jan Decaluwe
#
# The myhdl 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 t... | lgpl-2.1 | 2,900,433,588,535,602,000 | 31.022774 | 79 | 0.498222 | false | 4.115753 | false | false | false |
tseaver/google-cloud-python | bigquery/samples/query_script.py | 1 | 2249 | # Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -3,223,353,715,176,114,000 | 31.594203 | 92 | 0.665185 | false | 3.805415 | false | false | false |
fhinkel/TweetOptimizer | python/flask_API.py | 1 | 3540 | # -*- coding: utf-8 -*-
'''
Created on Sep 29, 2014
@author: tim
'''
from flask import Flask
from flask import request
from flask import Response
from flask.ext.cors import CORS
from relation_calculator import Relation_Calculator
import sys
import json
import re
from crossdomain import crossdomain
http_regex = re.com... | mit | 6,966,130,194,898,723,000 | 30.247788 | 224 | 0.622096 | false | 3.39097 | false | false | false |
TzuChieh/Photon-v2 | BlenderAddon/PhotonBlend/bmodule/material.py | 1 | 5390 | from ..utility import settings
from . import ui
from . import common
from . import node
import sys
import bpy
class PhMaterialHeaderPanel(bpy.types.Panel):
bl_label = ""
bl_context = "material"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_options = {"HIDE_HEADER"}
COMPATIBLE_ENGINE... | mit | 7,535,028,260,935,148,000 | 25.165049 | 114 | 0.682004 | false | 2.98615 | false | false | false |
inyaka/catalog | context_processors.py | 1 | 1986 | from django.utils.text import capfirst
from django.db.models import get_models
from django.utils.safestring import mark_safe
from django.contrib.admin import ModelAdmin
# get_models returns all the models, but there are
# some which we would like to ignore
IGNORE_MODELS = (
"sites",
"sessions",
"admin",
... | gpl-3.0 | 3,297,654,345,102,705,000 | 34.482143 | 91 | 0.549345 | false | 3.91716 | false | false | false |
comodojo/rpcserver | docs/source/conf.py | 1 | 5364 | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | mit | 525,443,802,569,360,100 | 28.96648 | 87 | 0.655108 | false | 3.909621 | true | false | false |
motord/elbowgrease | settings.py | 1 | 2021 | import logging
import tornado
import tornado.template
import os
from tornado.options import define, options
# import environment
# import logconfig
# Make filepaths relative to settings.
path = lambda root,*a: os.path.join(root, *a)
ROOT = os.path.dirname(os.path.abspath(__file__))
define("port", default=8888, help=... | mit | 4,620,776,737,570,405,000 | 27.069444 | 79 | 0.711529 | false | 3.346026 | true | false | false |
iosonofabio/haplotree | src/treeviewer.py | 1 | 16230 | # vim: fdm=marker
'''
author: Fabio Zanini
date: 08/12/14
content: Plot tree of haplotypes.
'''
# Modules
from __future__ import print_function
import os
import argparse
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# Functions
def tree_from_json(json_file):
'''Convert JS... | mit | -1,316,847,662,179,091,000 | 34.986696 | 92 | 0.567344 | false | 3.867048 | false | false | false |
GuLinux/PlanetaryImager | scripting_client/planetaryimager/network/driver_protocol.py | 1 | 3043 | from .protocol import *
import PyQt5
class Camera:
def __init__(self, camera_dict):
self.name = camera_dict['n']
self.address = camera_dict['a']
def __str__(self):
return '{} [{}]'.format(self.name, self.address)
def __repr__(self):
return self.__str__()
@protocol(area=... | gpl-3.0 | 8,043,753,285,607,263,000 | 41.263889 | 155 | 0.683536 | false | 3.891304 | false | false | false |
bioinf-jku/SNNs | figure1/utils.py | 1 | 4576 | # -*- coding: utf-8 -*-
'''
Tensorflow Implementation of the Scaled ELU function and Dropout
'''
import numbers
import numpy as np
import tensorflow as tf
from tensorflow.contrib import layers
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_shape
from tensorflow.python.frame... | gpl-3.0 | -7,715,505,530,584,231,000 | 34.75 | 126 | 0.621941 | false | 3.42003 | false | false | false |
elin-moco/metrics | metrics/etl/management/commands/load.py | 1 | 1229 | from django.core.management.base import BaseCommand
from metrics.etl.tools import related_posts_extract, fx_extract, log_extract, pd_transform, main_extract, moztech_extract, mozblog_extract, newsletter_extract, moztech_load, browser_survey_extract
from metrics.settings import LOG_PATH
class Command(BaseCommand):
... | bsd-3-clause | 2,593,122,512,009,476,600 | 36.242424 | 196 | 0.567128 | false | 3.735562 | false | false | false |
briandorsey/partisci | clients/python/pypartisci.py | 1 | 1390 | import httplib
import json
import time
import random
import socket
__version__ = "1.0"
def serialize(app, ver, host, instance):
update = dict(
app=app,
ver=ver,
host=host,
instance=instance)
data = json.dumps(update)
return data
def send_u... | bsd-2-clause | 4,227,259,765,084,404,000 | 24.272727 | 59 | 0.558993 | false | 3.706667 | false | false | false |
SFPD/rlreloaded | 3rdparty/climin/cg.py | 1 | 10960 | # -*- coding: utf-8 -*-
"""Module containing functionality for conjugate gradients.
Conjugate gradients is motivated from a first order Taylor expansion of the
objective:
.. math::
f(\\theta_t + \\alpha_t d_t) \\approx f(\\theta_t) + \\alpha_td_t^Tf'(\\theta_t).
To locally decrease the objective, it is optimal t... | mit | 1,880,162,668,656,026,400 | 33.25 | 84 | 0.610584 | false | 4.12185 | false | false | false |
gjcarneiro/pybindgen | pybindgen/typehandlers/codesink.py | 1 | 4693 | """
Objects that receive generated C/C++ code lines, reindents them, and
writes them to a file, memory, or another code sink object.
"""
import sys
PY3 = (sys.version_info[0] >= 3)
if PY3:
string_types = str,
else:
string_types = basestring,
DEBUG = 0
if DEBUG:
import traceback
import sys
class Code... | lgpl-2.1 | -1,145,504,394,182,056,200 | 29.474026 | 86 | 0.568506 | false | 4.131162 | false | false | false |
maljac/odoo-addons | project_task_desc_html/__openerp__.py | 1 | 1587 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | agpl-3.0 | -3,380,056,052,953,167,000 | 31.387755 | 78 | 0.561437 | false | 4.122078 | false | false | false |
aswolf/xmeos | xmeos/models/compress.py | 1 | 34752 | # -*- coding: utf-8 -*-
# from __future__ import absolute_import, print_function, division
from future.utils import with_metaclass
import numpy as np
import scipy as sp
from abc import ABCMeta, abstractmethod
from scipy import integrate
import scipy.interpolate as interpolate
from . import core
__all__ = ['CompressEo... | mit | 6,094,169,553,511,042,000 | 32.871345 | 107 | 0.512978 | false | 2.98198 | false | false | false |
pointhi/searx | searx/plugins/tracker_url_remover.py | 1 | 1397 | '''
searx is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
searx is distributed in the hope that it will be useful,
but WITHOUT ANY WA... | agpl-3.0 | -4,441,933,707,822,547,500 | 30.75 | 87 | 0.688618 | false | 3.775676 | false | false | false |
teagles/teagles-pc | 24/24.py | 1 | 3371 | #!/usr/bin/env python
# http://butter:fly@www.pythonchallenge.com/pc/hex/ambiguity.html
import os
import sys
import Image
import requests
import collections
import ImageDraw
IMAGE_URL = 'http://butter:fly@www.pythonchallenge.com/pc/hex/maze.png'
FNAME = '24/maze.png'
Point = collections.namedtuple('Point', ['x', 'y']... | mit | 9,179,901,707,781,394,000 | 30.801887 | 73 | 0.5221 | false | 3.468107 | false | false | false |
MJB47/Jokusoramame | joku/cogs/mod.py | 1 | 13299 | """
Non-generic moderation cog.
"""
import asyncio
import collections
import random
import discord
from discord.ext import commands
from joku.cogs._common import Cog
from joku.core import checks
from joku.core.bot import Context
from joku.core.checks import mod_command, bot_has_permissions
from joku.core.utils import... | mit | -5,663,790,421,347,314,000 | 36.78125 | 119 | 0.560117 | false | 4.119888 | false | false | false |
Godley/Music-Library | implementation/primaries/GUI/PlaylistDialog.py | 1 | 2929 | from PyQt4 import QtCore, QtGui, uic
import os
from implementation.primaries.GUI.helpers import get_base_dir
from implementation.primaries.GUI import themedWindow
class PlaylistDialog(QtGui.QDialog, themedWindow.ThemedWindow):
def __init__(self, app, theme, themes, design_folder):
QtGui.QDialog.__init__... | gpl-2.0 | -3,475,940,596,530,879,000 | 36.075949 | 112 | 0.637078 | false | 3.915775 | false | false | false |
bks/veusz | veusz/dialogs/export.py | 1 | 18397 | # Copyright (C) 2014 Jeremy S. Sanders
# Email: Jeremy Sanders <jeremy@jeremysanders.net>
#
# 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
# ... | gpl-2.0 | 8,928,892,009,857,449,000 | 36.931959 | 81 | 0.585802 | false | 4.144402 | false | false | false |
hakii27/PythonVersionMaster | Results/OneDimDot/MCTDHF/w=05/DensityPlot.py | 1 | 1339 | infile = open("DensityCC_w=05_L=10.txt",'r')
infile2 = open("DensityFCI_w=05_N=2_L=6_t=10.txt",'r')
infile3 = open("DensityCCSD_w=05_N=2_L=6_t=10.txt",'r')
densityCC_HF = []
densityFCI = []
densityCC2 = []
infile.next()
infile.next()
infile2.next()
infile2.next()
infile3.next()
infile3.next()
for line in infi... | lgpl-3.0 | 7,361,011,529,086,168,000 | 20.612903 | 75 | 0.655713 | false | 2.300687 | false | false | false |
Azure/azure-sdk-for-python | sdk/servicebus/azure-servicebus/tests/servicebus_preparer.py | 1 | 25718 | import functools
import hashlib
import os
import time
from collections import namedtuple
from azure.mgmt.servicebus import ServiceBusManagementClient
from azure.mgmt.servicebus.models import SBQueue, SBSubscription, AccessRights
from azure_devtools.scenario_tests.exceptions import AzureTestError
from devtools_testut... | mit | 2,745,185,431,363,098,600 | 49.826087 | 177 | 0.562291 | false | 4.771429 | true | false | false |
vprusso/npa_nonlocal | npa_nonlocal/util.py | 1 | 2230 | # -*- coding: utf-8 -*-
'''
#------------------------------------------------------------------------------
# Name: util.py
# Purpose: Various utility functions for npa_nonlocal.
#
# Author: Vincent Russo (vrusso@cs.uwaterloo.ca)
#
# Created: 1/13/2015
# Copyright: (c) Vincent Russo 2015
# Licence... | gpl-2.0 | -4,372,464,292,768,497,000 | 25.547619 | 79 | 0.541256 | false | 3.722871 | false | false | false |
Strassengezwitscher/Strassengezwitscher | crowdgezwitscher/events/views.py | 1 | 1531 | from django.contrib.auth.mixins import PermissionRequiredMixin
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.edit import DeleteView
from django.urls import reverse_lazy
from extra_views import CreateWithInlinesView, UpdateWithInlinesView
fro... | mit | -7,796,877,386,715,528,000 | 30.895833 | 68 | 0.758981 | false | 3.997389 | false | false | false |
hryamzik/ansible | lib/ansible/module_utils/network/cnos/cnos_devicerules.py | 1 | 91032 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by
# Ansible still belong to the author of the module, and may assign their
# own license to the complete wo... | gpl-3.0 | 5,255,834,514,839,444,000 | 51.650087 | 80 | 0.625945 | false | 3.310616 | false | false | false |
codepongo/cook | script/cook.py | 1 | 4343 | #coding:utf-8
import datetime
import sys
import os
sys.path.append(os.path.dirname(__file__))
import shutil
import web
import markdown2
perpage = 5
try:
import conf
path = conf.path
css_path = conf.csspath
web.config.debug=conf.debug
domain = conf.domain
suffix = conf.suffix
except:
icopath ... | unlicense | 2,263,865,417,661,544,200 | 32.666667 | 155 | 0.519226 | false | 3.601161 | false | false | false |
akretion/odoo | addons/mrp/report/mrp_report_bom_structure.py | 2 | 12989 | # -*- coding: utf-8 -*-
import json
from odoo import api, models, _
from odoo.tools import float_round
class ReportBomStructure(models.AbstractModel):
_name = 'report.mrp.report_bom_structure'
_description = 'BOM Structure Report'
@api.model
def _get_report_values(self, docids, data=None):
d... | agpl-3.0 | 8,412,093,710,462,063,000 | 49.344961 | 195 | 0.553314 | false | 3.756217 | false | false | false |
serzans/wagtail | wagtail/wagtailadmin/edit_handlers.py | 1 | 26782 | from __future__ import unicode_literals
import copy
from modelcluster.forms import ClusterForm, ClusterFormMetaclass
from django.db import models
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.utils.six import text_type
from django import forms
from djan... | bsd-3-clause | -5,252,673,871,227,266,000 | 33.073791 | 115 | 0.631581 | false | 4.217638 | false | false | false |
birknilson/oyster | src/oyster.py | 1 | 27361 | # -*- coding: utf-8 -*-
"""
Oyster
~~~~~
**A Python parser of shell commands.**
This module strives to support commands executed within the sh, bash
and zsh shells alike. An important limitation to mention is that Oyster
does not support parsing of scripted commands, i.e:
for i in... | mit | -4,775,107,700,802,405,000 | 32.164848 | 87 | 0.588173 | false | 4.413065 | false | false | false |
Ronnasayd/Ifuzzy2py | test_gauss.py | 1 | 2012 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Copyright 2017 Ronnasayd Machado <ronnasayd@hotmail.com>
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.... | apache-2.0 | -5,231,015,777,263,714,000 | 21.606742 | 72 | 0.73161 | false | 2.741144 | false | false | false |
Wyn10/Cnchi | cnchi/misc/keyboard_names.py | 1 | 9010 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#
# keyboard_names.py
#
# Copyright © 2013-2016 Antergos
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at you... | gpl-3.0 | 5,801,357,571,530,852,000 | 34.329412 | 88 | 0.545233 | false | 4.670295 | true | false | false |
hwjworld/xiaodun-platform | cms/djangoapps/contentstore/views/checklist.py | 1 | 5604 | import json
import copy
from util.json_request import JsonResponse
from django.http import HttpResponseBadRequest
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_http_methods
from django_future.csrf import ensure_csrf_cookie
from edxmako.shortcuts import rende... | agpl-3.0 | -7,421,149,964,564,552,000 | 42.107692 | 125 | 0.662384 | false | 4.419558 | false | false | false |
Stanford-Online/edx-analytics-dashboard | analytics_dashboard/courses/urls.py | 1 | 7466 | # pylint: disable=no-value-for-parameter
from django.conf import settings
from django.conf.urls import url, include
from courses import views
from courses.views import (
course_summaries,
csv,
enrollment,
engagement,
performance,
learners,
)
CONTENT_ID_PATTERN = r'(?P<content_id>(?:i4x://?[^/]... | agpl-3.0 | 7,305,463,706,066,446,000 | 52.328571 | 120 | 0.682561 | false | 3.694211 | false | false | false |
nojhan/ereshkigal | tunnelmon.py | 1 | 26267 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Ereshkigal is an AutoSSH tunnel monitor
# It gives a curses user interface to monitor existing SSH tunnel that are managed with autossh.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... | gpl-3.0 | -8,461,380,079,873,353,000 | 33.924202 | 169 | 0.545025 | false | 3.791396 | true | false | false |
greatguy45/webcrawler | selenium_dropdown_control.py | 1 | 1594 | from selenium import webdriver
import requests
from bs4 import BeautifulSoup
page = requests.get("https://www.se.gob.ar/datosupstream/graf_prod_x_pozo.php?gas=1&ejecutar=1&vienede=&idpozo=")
soup = BeautifulSoup(page.content, 'html.parser')
#get all the year options
year=soup.find("select",{"name":"anio"})
year_optio... | gpl-3.0 | -3,977,733,957,514,390,500 | 33.652174 | 113 | 0.723965 | false | 2.796491 | false | false | false |
dpgaspar/Flask-AppBuilder | examples/simpleform/config.py | 1 | 3697 | import os
from flask_appbuilder.security.manager import (
AUTH_OID,
AUTH_REMOTE_USER,
AUTH_DB,
AUTH_LDAP,
AUTH_OAUTH,
)
basedir = os.path.abspath(os.path.dirname(__file__))
# Your App secret key
SECRET_KEY = "\2\1thisismyscretkey\1\2\e\y\y\h"
# The SQLAlchemy connection string.
SQLALCHEMY_DATABAS... | bsd-3-clause | -7,382,459,781,208,628,000 | 32.306306 | 96 | 0.603192 | false | 3.257269 | false | false | false |
mganeva/mantid | scripts/Reflectometry/isis_reflectometry/settings.py | 1 | 2193 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 | -1,148,494,473,465,273,000 | 33.809524 | 132 | 0.620155 | false | 4.145558 | false | false | false |
krzjoa/sciquence | sciquence/representation/sax.py | 1 | 3735 | # -*- coding: utf-8 -*-
# Krzysztof Joachimiak 2017
# sciquence: Time series & sequences in Python
#
# Symbolic Aggregate Approximation
# Author: Krzysztof Joachimiak
#
# License: MIT
import numpy as np
import scipy.stats
from sklearn.preprocessing import scale, StandardScaler
from paa import paa
from operator import... | mit | 257,375,761,614,011,420 | 24.236486 | 89 | 0.638554 | false | 3.647461 | false | false | false |
luster/oldnyc | generate_static_site.py | 1 | 5564 | #!/usr/bin/env python
'''Generate a static version of oldnyc.org consisting entirely of JSON.'''
import chardet
from collections import defaultdict, OrderedDict
import csv
import json
import record
import re
from distutils.dir_util import copy_tree
from shutil import copyfile
import subprocess
import sys
import time
i... | apache-2.0 | -9,218,727,179,228,314,000 | 32.721212 | 96 | 0.612689 | false | 3.103179 | false | false | false |
VisualComputingInstitute/TrackR-CNN | datasets/Mapillary/Mapillary_instance.py | 1 | 1930 | from datasets.Loader import register_dataset
from datasets.Mapillary.MapillaryLike_instance import MapillaryLikeInstanceDataset
from datasets.util.Util import username
DEFAULT_PATH = "/fastwork/" + username() + "/mywork/data/mapillary/"
NAME = "mapillary_instance"
@register_dataset("mapillary_instance_full", resolut... | mit | 4,730,217,750,433,129,000 | 46.073171 | 119 | 0.691192 | false | 3.509091 | false | false | false |
evamy/learning_to_see | VAProject/eyes.py | 1 | 1174 |
"""
@author: Antriksh Agarwal
Version 0: 04/29/2018
"""
import cv2
import numpy as np
from utils import *
import time
eyeCascade = cv2.CascadeClassifier('models/eyes.xml')
def detect_eyes(image):
image = cv2.resize(image, (0, 0), fx=4, fy=4)
# start = time.time()
eyes = eyeCascade.detectMulti... | gpl-3.0 | 7,997,997,112,329,743,000 | 21.576923 | 73 | 0.539182 | false | 2.863415 | false | false | false |
avr-aics-riken/SURFACE | glsl/sexps.py | 1 | 4142 | # coding=utf-8
#
# Copyright © 2011 Intel Corporation
#
# 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, me... | bsd-2-clause | 3,785,125,142,359,206,000 | 33.798319 | 82 | 0.612171 | false | 3.757713 | false | false | false |
nischalsheth/contrail-controller | src/config/common/utils.py | 1 | 6932 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2015 Juniper Networks
# 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 ... | apache-2.0 | 4,898,338,699,762,080,000 | 27.285714 | 89 | 0.622655 | false | 3.505311 | false | false | false |
chop-dbhi/varify-data-warehouse | vdw/variants/migrations/0004_auto__chg_field_evs_aa_ac_alt__chg_field_evs_ea_ac_alt__chg_field_evs_.py | 1 | 18632 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'EVS.aa_ac_alt'
db.alter_column('evs', 'aa_ac_alt', self.gf('django.db.models.fields.Char... | bsd-2-clause | -7,884,365,182,716,240,000 | 75.04898 | 192 | 0.543581 | false | 3.461267 | false | false | false |
dkrisman/Traipse | mercurial/portable_hgweb/wsgicgi.py | 1 | 2280 | # hgweb/wsgicgi.py - CGI->WSGI translator
#
# Copyright 2006 Eric Hopper <hopper@omnifarious.org>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
#
# This was originally copied from the public domain code at
# http://w... | gpl-2.0 | 6,717,463,400,556,089,000 | 31.571429 | 73 | 0.605263 | false | 3.819095 | false | false | false |
blxlrsmb/myap.ml | apml-client/pack.py | 1 | 1076 | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: pack.py
# Date: Sat Jun 06 16:35:44 2015 +0800
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
from collections import defaultdict
class EventPacker(object):
""" Only record and pack result in a time interval"""
def __init__(self):
self.key_cnt = defaul... | mit | 7,399,868,955,988,437,000 | 25.243902 | 57 | 0.557621 | false | 3.539474 | false | false | false |
cooljeanius/emacs | build-aux/vcstocl/vcs_git.py | 1 | 6308 | # Git repo support.
# Copyright (C) 2019-2020 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later ve... | gpl-3.0 | -7,940,138,127,483,870,000 | 37.699387 | 84 | 0.527267 | false | 3.922886 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.