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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cheungpat/sqlalchemy-utils | sqlalchemy_utils/types/currency.py | 1 | 2037 | babel = None
try:
import babel
except ImportError:
pass
import six
from sqlalchemy import types
from sqlalchemy_utils import ImproperlyConfigured
from sqlalchemy_utils.primitives import Currency
from .scalar_coercible import ScalarCoercible
class CurrencyType(types.TypeDecorator, ScalarCoercible):
"""
... | bsd-3-clause | -8,878,608,680,686,917,000 | 24.4625 | 79 | 0.621993 | false | 4.140244 | false | false | false |
pycarolinas/pycarolinas_org | fabfile.py | 1 | 1362 | import os
import re
import datetime
import string
import json
from fabric.contrib.project import rsync_project
from fabric.contrib.files import upload_template
from fabric.api import local, run, sudo
from fabric.state import env
from fabric.context_managers import cd
dev_conf = json.load(open('dev_conf.json'))
env.ho... | mit | -4,509,938,444,805,112,300 | 28.608696 | 162 | 0.727606 | false | 3 | false | false | false |
Plasmatium/google-python-exercises | basic/solution/mimic.py | 1 | 2998 | #!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
"""Mimic pyquick exercise -- optional extra exercise.
Google's Python Class
Read in the ... | apache-2.0 | 8,982,271,780,434,043,000 | 29.282828 | 78 | 0.693796 | false | 3.418472 | false | false | false |
jmwenda/hypermap | hypermap/aggregator/tests/test_warper.py | 1 | 1877 | # -*- coding: utf-8 -*-
"""
Tests for the WMS Service Type.
"""
import unittest
from httmock import with_httmock
import mocks.warper
from aggregator.models import Service
class TestWarper(unittest.TestCase):
@with_httmock(mocks.warper.resource_get)
def test_create_wms_service(self):
# create the ... | mit | -4,989,812,792,306,742,000 | 31.362069 | 93 | 0.623868 | false | 3.64466 | true | false | false |
mingot/detectme_server | detectme/detectors/migrations/0003_auto__add_field_detector_training_log.py | 1 | 8577 | # -*- coding: 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):
# Adding field 'Detector.training_log'
db.add_column(u'detectors_detector', 'training_log',
... | mit | 324,546,438,016,698,240 | 72.316239 | 187 | 0.558237 | false | 3.714595 | false | false | false |
bionet/ted.python | demos/iaf_delay_demo.py | 1 | 3443 | #!/usr/bin/env python
"""
Demos of MIMO time encoding and decoding algorithms that use IAF
neurons with delays.
"""
# Copyright (c) 2009-2015, Lev Givon
# All rights reserved.
# Distributed under the terms of the BSD license:
# http://www.opensource.org/licenses/bsd-license
import numpy as np
# Set matplotlib backe... | bsd-3-clause | 3,058,591,314,712,588,300 | 29.469027 | 78 | 0.600349 | false | 2.883585 | false | false | false |
groboclown/whimbrel | installer/whimbrel/install/util/termcolor.py | 1 | 8654 | """
A Windows and ANSII coloring library.
"""
from sys import stdout
__ALL__ = ['out', 'outln']
VERSION = (1, 0, 0)
try:
# Colors text in console mode application (win32).
# Uses ctypes and Win32 methods SetConsoleTextAttribute and
# GetConsoleScreenBufferInfo.
#
# source: https://www.burgaud.com... | apache-2.0 | 5,236,865,429,722,387,000 | 28.435374 | 86 | 0.547608 | false | 4.017642 | false | false | false |
JohnDMcMaster/uvscada | nuc/gscsv.py | 1 | 1553 | #!/usr/bin/env python
import time
import argparse
import json
from uvscada.nuc import pulser
from uvscada.nuc import alsa_util
def cap(jf):
def jput(j):
jf.write(json.dumps(j, sort_keys=True) + '\n')
print 'Configuring ALSA'
asrc = alsa_util.ALSASrc()
print 'looping'
# 400 w/o, 7300... | bsd-2-clause | -2,728,910,544,904,184,000 | 28.865385 | 85 | 0.576304 | false | 3.22869 | false | false | false |
davivcgarcia/python-dcc-ufrj | Exercicios - Lista Paulo Roma/Lista 1/ex4.py | 1 | 1158 | #! /usr/bin/env python
# coding: utf-8
#
# 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 version.
#
# This program... | gpl-3.0 | -2,848,325,380,548,143,600 | 30.972222 | 74 | 0.677672 | false | 3.153425 | false | false | false |
suutari/shoop | shuup/admin/modules/orders/json_order_creator.py | 1 | 15127 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from copy import deepcopy
... | agpl-3.0 | -941,524,889,362,125,800 | 38.703412 | 116 | 0.601111 | false | 4.163776 | false | false | false |
pyrocko/pyrocko | src/ext/pyavl-1.12/setup.py | 1 | 2116 | # http://pyrocko.org - GPLv3
#
# The Pyrocko Developers, 21st Century
# ---|P------/S----------~Lg----------
# file: setup.py
from distutils.core import setup, Extension
import sys
__VERSION__ = "1.12_1"
laius = """This small C package is comprised of an independent set of
routines dedicated to manipulating AVL tree... | gpl-3.0 | -1,963,531,965,556,900,400 | 32.0625 | 73 | 0.68242 | false | 3.526667 | false | false | false |
huggingface/transformers | src/transformers/pipelines/base.py | 1 | 30282 | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | 8,440,981,556,735,697,000 | 37.477764 | 137 | 0.613665 | false | 4.354616 | true | false | false |
sha-red/django-shared-utils | shared/utils/management/commands/fix_proxymodel_permissions.py | 1 | 1509 | # -*- coding: utf-8 -*-
"""Add permissions for proxy model.
This is needed because of the bug https://code.djangoproject.com/ticket/11154
in Django (as of 1.6, it's not fixed).
When a permission is created for a proxy model, it actually creates if for it's
base model app_label (eg: for "article" instead of "about", ... | mit | 2,577,458,159,359,952,400 | 34.093023 | 79 | 0.664016 | false | 4.122951 | false | false | false |
linkinwong/word2vec | src/crf-paper-script/preprocessor9_complete_ngram.py | 1 | 8544 | # coding: utf-8
__author__ = 'linlin'
import os
import logging
import re
import pdb
import string
logger = logging.getLogger(__name__)
################################################################
root_dir = '/home/linlin/time/0903_classify_false_start/1003_raw_features/'
separator = '\t\t'
#######################... | apache-2.0 | -2,062,712,346,878,222,600 | 32.620553 | 110 | 0.533388 | false | 3.414693 | false | false | false |
espona/ckanext-package_converter | ckanext/package_converter/model/scheming_resource_converter.py | 1 | 9800 | import collections
import json
from logging import getLogger
from ckan.lib.helpers import url_for
from ckan.common import config
from ckanext.package_converter.model.metadata_format import MetadataFormats
from ckanext.package_converter.model.scheming_converter import Datacite43SchemingConverter
from xmltodict import u... | agpl-3.0 | -4,915,734,971,167,741,000 | 56.309942 | 120 | 0.522143 | false | 4.505747 | false | false | false |
opennode/nodeconductor-assembly-waldur | src/waldur_slurm/base.py | 1 | 5476 | import abc
import logging
import subprocess # noqa: S404
from django.utils.functional import cached_property
from .structures import Quotas
logger = logging.getLogger(__name__)
class BatchError(Exception):
pass
class BaseBatchClient(metaclass=abc.ABCMeta):
def __init__(self, hostname, key_path, username... | mit | 5,122,500,161,127,197,000 | 25.843137 | 102 | 0.557524 | false | 4.506996 | false | false | false |
mahabs/nitro | nssrc/com/citrix/netscaler/nitro/resource/config/ns/nsversion.py | 1 | 2841 | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | apache-2.0 | 9,031,897,375,595,689,000 | 27.69697 | 111 | 0.696586 | false | 3.452005 | false | false | false |
hakujyo/chessplaying_robot | matchpicture.py | 1 | 1381 |
import cv2
import numpy as np
import time
from matplotlib import pyplot as plt
x = 0
y = 0
def makematchpicture(Grayurl):
img = cv2.imread(Grayurl, 0)
img2 = img.copy()
template = cv2.imread('test.png', 0)
w, h = template.shape[::-1]
methods = ['cv2.TM_SQDIFF']
for me... | gpl-3.0 | 3,895,924,439,547,048,000 | 27.804348 | 73 | 0.547046 | false | 3.087838 | false | false | false |
GoogleCloudPlatform/ml-on-gcp | tutorials/sklearn/hpsearch/gke_parallel.py | 1 | 16248 | # Copyright 2017, Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -32,083,320,555,209,584 | 35.927273 | 163 | 0.586595 | false | 4.000985 | false | false | false |
RayRuizhiLiao/ITK_4D | Examples/RegistrationITKv3/ImageRegistration3.py | 1 | 4570 | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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
#
# ... | apache-2.0 | -8,696,359,384,806,764,000 | 27.869281 | 88 | 0.715317 | false | 3.595594 | false | false | false |
HaloWang/SwiftFFNN | UseTF.py | 1 | 1374 | import json as json
import numpy as np
import tensorflow as tf
with open('data.json') as data_file:
data = json.load(data_file)
x = tf.placeholder(tf.float32, [None, 3])
W = tf.Variable(tf.zeros([3, 1]))
b = tf.Variable(tf.zeros([1]))
y = tf.nn.softmax(tf.matmul(x, W) + b)
y_ = tf.placeholder("float", [None, 1... | mit | -1,653,505,655,851,942,000 | 26.48 | 85 | 0.678311 | false | 2.84472 | false | false | false |
okolisny/integration_tests | cfme/web_ui/__init__.py | 1 | 143810 | """Provides a number of objects to help with managing certain elements in the CFME UI.
Specifically there are two categories of objects, organizational and elemental.
* **Organizational**
* :py:class:`Region`
* :py:mod:`cfme.web_ui.menu`
* **Elemental**
* :py:class:`AngularCalendarInput`
* :py:class:`Angu... | gpl-2.0 | 137,997,576,260,013,500 | 33.59466 | 103 | 0.573597 | false | 4.000278 | false | false | false |
diego-d5000/MisValesMd | env/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/introspection.py | 1 | 4641 | from django.contrib.gis.gdal import OGRGeomType
from django.db.backends.postgresql_psycopg2.introspection import \
DatabaseIntrospection
class GeoIntrospectionError(Exception):
pass
class PostGISIntrospection(DatabaseIntrospection):
# Reverse dictionary for PostGIS geometry types not populated... | mit | -7,231,171,851,057,337,000 | 40.577982 | 95 | 0.563887 | false | 4.769784 | false | false | false |
emdodds/LCAversions | timing.py | 1 | 3230 | #This file will time various versions of LCA
from __future__ import division
import numpy as np
import sklearn.preprocessing as skp
from timeit import default_timer as timer
from LCAnumpy import lca as lcan
from LCAfortran import lca as lcaf
from LCAnumbaprog import lca as lcag
def main():
"""Profiles various ver... | mit | -9,159,149,339,073,999,000 | 28.907407 | 117 | 0.586997 | false | 3.236473 | false | false | false |
stcioc/localdocindex | python/scrape_iasi.py | 1 | 5682 | # -------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: Stefan
#
# Created: 30.07.2017
# Copyright: (c) Stefan 2017
# Licence: <your licence>
# --------------------------------------------------------------------------... | mit | -447,915,198,326,569,400 | 33.748428 | 161 | 0.557198 | false | 3.607619 | false | false | false |
driftyco/ionitron-issues | tasks/github_issue_submit.py | 1 | 8606 | import github_api
import util
from config.config import CONFIG_VARS as cvar
from datetime import datetime, timedelta
def flag_if_submitted_through_github(repo_username, repo_id, issue):
return False # temporarily disabling ionitron
"""
Flags any issue that is submitted through github's UI, and not the Io... | mit | -6,871,149,245,831,520,000 | 36.585153 | 276 | 0.635603 | false | 3.66057 | false | false | false |
Dunkas12/BeepBoopBot | lib/youtube_dl/extractor/go.py | 1 | 6977 | # coding: utf-8
from __future__ import unicode_literals
import re
from .adobepass import AdobePassIE
from ..utils import (
int_or_none,
determine_ext,
parse_age_limit,
urlencode_postdata,
ExtractorError,
)
class GoIE(AdobePassIE):
_SITE_INFO = {
'abc': {
'brand': '001',
... | gpl-3.0 | 7,284,084,372,982,987,000 | 39.32948 | 161 | 0.457933 | false | 3.85896 | false | false | false |
xmnlab/minilab | arch/socket_arch/util.py | 1 | 2721 | # -*- coding: utf-8 -*-
from __future__ import print_function
from collections import defaultdict
def extract_devices(sensors):
_DEVICE = defaultdict(dict)
for sensors_group in sensors:
if not sensors[sensors_group]['acquisition_mode']:
continue
# analog channels
for item ... | gpl-3.0 | 4,599,358,786,626,185,700 | 32.592593 | 79 | 0.502021 | false | 4.573109 | false | false | false |
wathen/PhD | MHD/FEniCS/MHD/Stabilised/Precond/MHDstabtest.py | 1 | 11477 | #!/usr/bin/python
# interpolate scalar gradient onto nedelec space
from dolfin import *
import petsc4py
import sys
petsc4py.init(sys.argv)
from petsc4py import PETSc
Print = PETSc.Sys.Print
# from MatrixOperations import *
import numpy as np
#import matplotlib.pylab as plt
import PETScIO as IO
import common
import ... | mit | -7,340,128,029,880,071,000 | 31.979885 | 168 | 0.626906 | false | 2.490668 | false | false | false |
timlinux/inasafe | safe/gui/gui_utilities.py | 1 | 2330 | # coding=utf-8
"""GUI utilities for the dock and the multi Exposure Tool."""
from PyQt4.QtCore import Qt
from qgis.core import QgsMapLayerRegistry
from safe.utilities.i18n import tr
def layer_from_combo(combo):
"""Get the QgsMapLayer currently selected in a combo.
Obtain QgsMapLayer id from the userrole o... | gpl-3.0 | -2,640,115,686,903,604,700 | 31.361111 | 77 | 0.672103 | false | 4.010327 | false | false | false |
krig/jamaendo | jamaui/ossohelper.py | 1 | 4468 | # ossohelper.py - Helper to osso functions
#
# Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
#
# This file is part of carman-python.
# Modified for inclusion in Panucci (June 2009).
#
# carman-python is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Li... | gpl-3.0 | -6,015,379,975,474,483,000 | 31.143885 | 79 | 0.596016 | false | 3.729549 | false | false | false |
matmodlab/matmodlab2 | matmodlab2/ext_helpers/build_ext.py | 1 | 9765 | #!/usr/bin/env python
import os
import re
import sys
import glob
import shutil
import logging
import tempfile
from argparse import ArgumentParser
from subprocess import Popen, STDOUT
from contextlib import contextmanager
from matmodlab2.core.logio import get_logger
from matmodlab2.core.environ import environ
from matm... | bsd-3-clause | -2,366,992,133,191,876,600 | 33.02439 | 123 | 0.619662 | false | 3.518919 | false | false | false |
prescott66/Cnchi | src/encfs.py | 1 | 3865 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# encfs.py
#
# Copyright 2013 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 2 of the License, or
# (at your opti... | gpl-3.0 | -6,783,151,214,010,890,000 | 36.892157 | 102 | 0.663648 | false | 3.168033 | false | false | false |
hack-shack/rorbuild | pyBuilder/MoFileReaderBuilder.py | 1 | 5567 | # MoFileReaderBuilder.py
# Last modified by : terpsichorean, 2014-03-31
# RoR target version : 0.4.0.7
# OS X target version : 10.9.2
# Win32 target version : n/a
# Win64 target version : n/a
# Description : Builds MoFileReader.
# RoR :
# documentation : none on RoR site.
# documentation req... | gpl-3.0 | 2,047,684,479,248,826,000 | 44.008264 | 175 | 0.569786 | false | 3.748822 | true | false | false |
NERC-CEH/jules-jasmin | majic/joj/utils/general_controller_helper.py | 1 | 5711 | """
# Majic
# Copyright (C) 2014 CEH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This pr... | gpl-2.0 | -2,567,025,911,908,129,000 | 35.851613 | 117 | 0.625985 | false | 4.030346 | true | false | false |
DerekRies/starmadepy | starmadepy/starmade.py | 1 | 16611 | import json
import binascii
import copy
import pkgutil
from bisect import bisect_left
from utils import tuple_add, tuple_sub, plural, bits, split_every_nchars
from binary import BinaryStream, BitPacker
"""
Starmade.py is a collection of various helpers for manipulating Starmade data
"""
# items-complete.json has th... | mit | 7,166,825,139,453,585,000 | 33.038934 | 79 | 0.569562 | false | 3.904795 | false | false | false |
freedomhui/cinder | cinder/version.py | 1 | 1193 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack 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
... | apache-2.0 | 8,558,772,972,088,632,000 | 30.394737 | 78 | 0.699078 | false | 3.763407 | false | false | false |
cercisanat/cercisanat.com | cerci_admin/management/commands/epub.py | 1 | 7038 | #!/usr/bin/env python
#coding:utf-8
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.template import Context
from django.template.loader import get_template
from cerci_issue.models import Issue
import os
import shutil
from bs4 import BeautifulSoup
from djang... | gpl-3.0 | -2,813,511,705,482,807,300 | 42.714286 | 104 | 0.578147 | false | 4.010256 | false | false | false |
Bismarrck/pymatgen | pymatgen/io/zeopp.py | 1 | 23655 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals, print_function
<<<<<<< HEAD
"""
Module implementing classes and functions to use Zeo++.
Zeo++ can be obtained from http://www.maciejharanczyk.info/Zeopp/
"""
... | mit | 8,012,744,464,591,307,000 | 36.135008 | 81 | 0.582752 | false | 3.415884 | false | false | false |
LiorAbitbol/vmwvro | vmwvro/clients.py | 1 | 1707 | """
VMware vRealize Client implementation and supporting objects.
Copyright (c) 2017, Lior P. Abitbol <liorabitbol@gmail.com>
"""
import logging
import requests
from .config import URL_GET_WORKFLOW_BY_ID
from .utils import format_url, is_json
from .workflows import Workflow
class Client:
def __i... | mit | 1,919,795,720,727,053,300 | 26.932203 | 96 | 0.556532 | false | 4.310606 | false | false | false |
barsnadcat/evegant | ItemStackGraphic.py | 1 | 1772 |
from PyQt5.QtCore import QPointF, QRect, QRectF, QSize, QSizeF, Qt
from PyQt5.QtWidgets import QGraphicsItem, QGraphicsPixmapItem
from PyQt5.QtGui import QFontMetricsF, QFont
class InputGraphic(QGraphicsItem):
def __init__(self, aItemStack, aParent, aPos, aToolkitTypes):
super().__init__(aParent)
self.setPos(aP... | gpl-3.0 | 6,923,136,905,170,005,000 | 29.568966 | 90 | 0.730813 | false | 2.794953 | false | false | false |
pytroll/satpy | satpy/tests/reader_tests/test_viirs_compact.py | 1 | 121654 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2019 Satpy developers
#
# This file is part of satpy.
#
# satpy 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 Licens... | gpl-3.0 | -7,021,463,102,585,446,000 | 47.97504 | 201 | 0.266806 | false | 4.799921 | false | false | false |
TheGrimJam/fictiongen | fictiongen_app/markov_functions/views.py | 1 | 1132 | from django.shortcuts import render
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.views.decorators.csrf import csrf_exempt
from django.template import RequestContext
import markov_functions.mk_functions as ma
from core import development_tools as log
from mark... | lgpl-3.0 | -2,273,507,408,531,493,400 | 39.925926 | 90 | 0.715548 | false | 4.192593 | false | false | false |
googleapis/googleapis-gen | google/cloud/dialogflow/cx/v3beta1/dialogflow-cx-v3beta1-py/google/cloud/dialogflowcx_v3beta1/types/security_settings.py | 1 | 8909 | # -*- 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 | 8,159,482,049,782,885,000 | 32.111524 | 136 | 0.642079 | false | 4.409406 | false | false | false |
adrxbmc/adrxbmc.repository | plugin.audio.googlemusic/gmusicapi/utils/utils.py | 1 | 17273 | # -*- coding: utf-8 -*-
"""Utility functions used across api code."""
import errno
import functools
import inspect
import logging
import os
import re
import subprocess
import time
import traceback
import warnings
from decorator import decorator
try:
from google.protobuf.descriptor import FieldDescriptor
#Map... | gpl-2.0 | -8,116,702,483,677,432,000 | 30.405455 | 100 | 0.600706 | false | 4.02634 | false | false | false |
City-of-Bloomington/green-rental | scripts/convert-columbia.py | 2 | 16593 | #!/usr/bin/env python
"""
#
# By: Charles Brandt [code at charlesbrandt dot com]
# On: *2013.12.17 20:44:16
# License: GPLv3
# Requires:
#
# geopy
# Description:
Columbia provides lat/long coordinates with addresses, so import should be simpler.
"""
import os, sys, codecs, re, time
import csv
#import unicodecsv
... | agpl-3.0 | 8,687,614,417,980,200,000 | 36.371622 | 148 | 0.487796 | false | 4.222137 | false | false | false |
Snuggle/hypixel.py | hypixel.py | 1 | 14054 | """ Simple Hypixel-API in Python, by Snuggle | 2017-09-30 to 2018-06-14 """
__version__ = '0.8.0'
# pylint: disable=C0103
# TODO: Add more comments. Explain what's happening!
# TODO: Add API-usage stat-tracking. Like a counter of the number of requests and how many per minute etc.
from random import choice
from time i... | mit | 1,250,720,892,829,467,600 | 36.678284 | 148 | 0.595347 | false | 4.238239 | false | false | false |
AdaptivePELE/AdaptivePELE | AdaptivePELE/freeEnergies/prepareMSMFolders.py | 1 | 3916 | from __future__ import absolute_import, division, print_function, unicode_literals
import glob
import os
import shutil
class Constants():
def __init__(self, trajs_path=None):
self.trajFolder = "allTrajs"
if trajs_path is not None:
self.trajFolder = os.path.join(trajs_path, self.trajFol... | mit | -1,821,340,976,296,350,200 | 37.019417 | 146 | 0.698672 | false | 3.722433 | false | false | false |
openmaraude/APITaxi | APITaxi_models2/migrations/versions/20210614_13:57:26_5b8d8ca36aeb_new_revision.py | 1 | 3206 | """New revision
Revision ID: 5b8d8ca36aeb
Revises: 5d164bbb4813
Create Date: 2021-06-14 13:57:26.772630
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '5b8d8ca36aeb'
down_revision = '5d164bbb4813'
branch_labels = None
depends_on = None
def upgrade():
con... | agpl-3.0 | 8,408,152,668,629,320,000 | 39.582278 | 95 | 0.569869 | false | 4.251989 | false | false | false |
ajrichards/htsint | htsint/tools/ExpressionLib.py | 1 | 4968 | #!/usr/bin/env python
"""
tools for expression and count based tasks
"""
import os,sys,csv,gc,re
import numpy as np
def read_RSEM_counts_files(geneFilePath,isoformFilePath):
"""
read the RSEM counts files into a matrix
"""
if not os.path.exists(geneFilePath):
raise Exception("Cannot find ge... | bsd-3-clause | -1,213,594,637,747,343,600 | 27.883721 | 115 | 0.605072 | false | 3.471698 | false | false | false |
Eric-Matthews/Explore_RPG | d_verb_commands.py | 1 | 3001 | from d_toolbox import *
import d_help
# Holds the verb commands to be called by the game.
# Each command must be in the VERB BANK as well as have a function which uses the exact same name.
# The main game can pass NONE to the functions. Depending on the command this may or may not be valid input.
# All must re... | gpl-3.0 | 8,461,055,582,772,697,000 | 35.5375 | 115 | 0.66078 | false | 2.95665 | false | false | false |
bbfamily/abu | abupy/SlippageBu/ABuSlippageBuyBase.py | 1 | 4976 | # -*- encoding:utf-8 -*-
"""
日内滑点买入价格决策基础模块:暂时迁移简单实现方式,符合回测需求,如迁移实盘模块
需添加日内择时策略,通过日内分钟k线,实现日内分钟k线择时,更微观的
实现日内择时滑点功能,不考虑大资金的冲击成本及系统外的大幅滑点
"""
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from abc import ABCMeta, abstractmethod
import functools... | gpl-3.0 | 1,950,365,726,494,072,000 | 31.448598 | 111 | 0.591302 | false | 1.643161 | false | false | false |
mtwharmby/assorted-scripts | PythonPlayground/mergeHDFs.py | 1 | 6095 | '''
Created on 4 Jul 2016
@author: wnm24546
'''
import glob, os, re, sys
import h5py
import numpy as np
############################################
## EDIT LINES BELOW HERE ###################
############################################
#Give the directory path the files are and... (all values between ' or ")
wor... | gpl-2.0 | 7,628,204,537,460,579,000 | 35.945455 | 139 | 0.601148 | false | 3.638806 | false | false | false |
bnbowman/HlaTools | src/pbhla/io/SamIO.py | 1 | 5513 | from collections import namedtuple
entry = namedtuple('entry', 'qname flag rname pos mapq cigar rnext pnext tlen seq qual')
VALID_HD_TAGS = ['VN', 'SO']
VALID_SQ_TAGS = ['SN', 'LN', 'AS', 'M5', 'SP', 'UR']
REQUIRED_HD_TAGS = ['VN']
REQUIRED_SQ_TAGS = ['SN', 'LN']
class SamHeader( object ):
def __init__(self, l... | bsd-3-clause | 4,897,226,491,460,510,000 | 24.761682 | 88 | 0.552875 | false | 3.890614 | false | false | false |
frashpikass/mvp-osm | mvp.py | 1 | 34109 | # -*- coding: utf-8 -*-
"""
Created on Sun Jul 24 5:26:00 2016
@author: Francesco Piazza
@author: Maurizio Napolitano
MIT License
"""
# NOTE: the SRID of the input DB is 4326
# NOTE: the SRID of the output DB is 3857
### Imports
import ConfigParser
import numpy as np
import os
import scipy as sc
import scipy.cluster... | mit | -8,127,420,920,717,677,000 | 38.341407 | 119 | 0.519335 | false | 4.125423 | true | false | false |
Grunny/zap-cli | zapcli/cli.py | 1 | 11868 | """
ZAP CLI.
"""
import sys
import click
from zapcli import __version__
from zapcli import helpers
from zapcli.commands.context import context_group
from zapcli.commands.policies import policies_group
from zapcli.commands.scanners import scanner_group
from zapcli.commands.scripts import scripts_group
from zapcli.com... | mit | -8,610,406,788,646,297,000 | 40.788732 | 120 | 0.656387 | false | 3.59201 | false | false | false |
MiniSEC/GRR_clone | lib/rdfvalues/structs.py | 1 | 55661 | #!/usr/bin/env python
"""Semantic Protobufs are serialization agnostic, rich data types."""
import copy
import cStringIO
import json
import logging
import struct
from google.protobuf import text_format
from grr.lib import rdfvalue
from grr.lib import registry
from grr.lib import type_info
from grr.lib import utils
... | apache-2.0 | 7,757,022,768,187,491,000 | 30.026198 | 80 | 0.665978 | false | 3.958256 | false | false | false |
sdispater/pendulum | tests/tz/zoneinfo/test_posix_timezone.py | 1 | 1969 | from pendulum.tz.zoneinfo.posix_timezone import JPosixTransition
from pendulum.tz.zoneinfo.posix_timezone import MPosixTransition
from pendulum.tz.zoneinfo.posix_timezone import posix_spec
def test_posix_spec_m():
spec = "CET-1CEST,M3.5.0,M10.5.0/3"
tz = posix_spec(spec)
assert tz.std_abbr == "CET"
a... | mit | -4,709,097,366,466,081,000 | 29.292308 | 64 | 0.651092 | false | 2.965361 | false | false | false |
flynx/pli | doc/style.py | 1 | 12070 | #=======================================================================
__version__ = '''0.1.00'''
__sub_version__ = '''20080920022138'''
__copyright__ = '''(c) Alex A. Naanou 2003-2007'''
#-----------------------------------------------------------------------
__doc__ = '''
this module is to document the ... | bsd-3-clause | -6,924,110,043,845,298,000 | 34.575758 | 98 | 0.510025 | false | 4.967078 | false | false | false |
brunobell/elasticsearch-py | example/queries.py | 1 | 2797 | #!/usr/bin/env python
from __future__ import print_function
import logging
from dateutil.parser import parse as parse_date
from elasticsearch import Elasticsearch
def print_search_stats(results):
print('=' * 80)
print('Total %d found in %dms' % (results['hits']['total'], results['took']))
print('-' * 80)... | apache-2.0 | 283,234,526,146,128,860 | 24.427273 | 98 | 0.527351 | false | 3.675427 | false | false | false |
felipenaselva/felipe.repository | script.module.placenta/lib/resources/lib/sources/en/icouchtuner.py | 1 | 4264 | # -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @tantrumdev wrote this file. As long as you retain this notice you
# can do whatever you want wit... | gpl-2.0 | -104,094,057,217,636,030 | 42.969072 | 156 | 0.52228 | false | 4.076482 | false | false | false |
MRCIEU/melodi | browser/views.py | 1 | 51244 | import sys
import gzip
import time
import numpy
import json
import time
import logging
import operator
import config
import csv
import StringIO
import subprocess
import HTMLParser
#from py2neo import Graph, Path, Node, Relationship,authenticate
from scipy import stats
from django.shortcuts import render_to_response
f... | mit | 3,754,276,648,151,506,000 | 31.660293 | 260 | 0.636153 | false | 2.639403 | false | false | false |
catmaid/catpy | setup.py | 1 | 1825 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import runpy
from setuptools import setup
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "README.rst")) as readme_file:
readme = readme_file.read()
with open(os.path.join(here, "HISTORY.rst")) as history_file:
history = h... | mit | -2,733,525,583,101,903,000 | 28.918033 | 72 | 0.631233 | false | 3.39851 | true | false | false |
raffienficiaud/django_mturk_minimalistic | boto1/management/commands/retrieve_results.py | 1 | 7604 | from django.core.management.base import BaseCommand, CommandError
from django.core.urlresolvers import reverse
from boto1.models import Image, Hit, Result
from optparse import make_option
import boto
import boto.mturk
import boto.mturk.connection
from .create_hits import get_connection
import json
import time, d... | mit | 2,301,703,823,339,876,600 | 29.789474 | 134 | 0.647028 | false | 3.685894 | false | false | false |
KingOfBanana/SocialNetworkAI | db/basic_db.py | 1 | 1468 | # -*-coding:utf-8 -*-
from sqlalchemy import create_engine, MetaData
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from config.conf import get_db_args
# for proxy database
from config.conf import get_proxy_db_args
# end
def get_engine():
args = get_db_args()
c... | mit | -2,402,291,857,328,042,500 | 34.829268 | 116 | 0.613079 | false | 3.470449 | false | false | false |
sirk390/coinpy | coinpy-lib/src/coinpy/lib/vm/opcode_impl/arithmetic.py | 1 | 5830 | from coinpy.lib.vm.stack_valtype import cast_to_number, valtype_from_number
from coinpy.lib.vm.opcode_impl.flow import op_verify
import functools
def arithmetic_op(vm, func, arity):
if len(vm.stack) < arity:
raise Exception("Not enought arguments")
args = [cast_to_number(vm.stack.pop()) for _ in range... | lgpl-3.0 | 7,772,921,792,784,396,000 | 25.743119 | 80 | 0.545798 | false | 2.794823 | false | false | false |
LighthouseHPC/lighthouse | src/LAPACK341/computational_inverse/database_check.py | 1 | 1628 | import csv
import os
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
lighthousedir = os.path.dirname(os.path.dirname(parentdir))
os.sys.path.insert(0,parentdir)
f_database = csv.reader(open(lighthousedir+'/Dlighthouse/Computational/dataBase/le_invert.csv'))
databaseRoutines = []
for line in f... | mit | -835,230,158,127,480,400 | 25.274194 | 104 | 0.672604 | false | 3.179688 | false | false | false |
ros2/demos | quality_of_service_demo/rclpy/quality_of_service_demo_py/message_lost_listener.py | 1 | 2648 | # Copyright 2020 Open Source Robotics Foundation, 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... | apache-2.0 | 8,270,700,819,787,666,000 | 33.842105 | 88 | 0.67145 | false | 4.223285 | false | false | false |
tomvansteijn/xsb | xsboringen/geffiles.py | 1 | 13932 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Tom van Steijn, Royal HaskoningDHV
from xsboringen.borehole import Borehole, Segment, Vertical
from xsboringen.cpt import CPT
from xsboringen import utils
from collections import defaultdict, namedtuple
from pathlib import Path
import textwrap
import logging
import os
... | gpl-3.0 | 3,781,907,062,404,658,700 | 31.027586 | 86 | 0.50567 | false | 4.244973 | false | false | false |
surik00/ESP8266 | Bedroom (2 chips, 4 strips)/alarm.py | 1 | 2909 | import time
import logging
import datetime
import paho.mqtt.client as mqtt
from apscheduler.schedulers.background import BlockingScheduler
logging.basicConfig(format=u'%(filename)s [LINE:%(lineno)d]#%(levelname)-8s [%(asctime)s] %(message)s',
level=logging.WARNING, filename='./alarm.log')
BROKER... | gpl-3.0 | -5,868,073,514,299,785,000 | 34.048193 | 151 | 0.610519 | false | 3.475508 | false | false | false |
alexpotter1/Neutron_msm8974_d802 | build/buildDaemon.py | 1 | 22175 | #!/usr/bin/env python3
'''
Build Daemon for the Neutron compilation process.
Designed to run on Debian (Linux) enviroments; this will fail on other OSes.
Copyright Alex Potter 2015.
'''
import sys
import subprocess
import time
import datetime
import os
import sqlite3
import threading
import re
import itertools
impor... | gpl-2.0 | 260,694,615,312,053,120 | 48.277778 | 312 | 0.554453 | false | 3.865261 | false | false | false |
keithasaurus/django_fun_views | tests/patterns/test_redirect.py | 1 | 1473 | from fun_views.patterns.redirect import redirect_view_pattern
from tests.utils.defaults_for_tests import (default_query_string,
default_response, default_url)
def this_get_url():
return default_url
def this_get_query_string():
return default_query_string
def tes... | mit | 5,001,551,975,581,874,000 | 37.763158 | 87 | 0.501697 | false | 5.027304 | false | false | false |
inmagik/django-multi-gtfs | multigtfs/models/feed_info.py | 1 | 2310 | #
# Copyright 2012-2014 John Whitlock
#
# 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 writ... | apache-2.0 | -7,563,938,476,831,033,000 | 33.477612 | 74 | 0.663203 | false | 3.862876 | false | false | false |
fredericojordan/chess | gui.py | 1 | 11862 | '''
Created on 2 de set de 2016
@author: fvj
'''
import pygame, chess
from random import choice
from traceback import format_exc
from sys import stderr
from time import strftime
from copy import deepcopy
pygame.init()
SQUARE_SIDE = 50
AI_SEARCH_DEPTH = 2
RED_CHECK = (240, 150, 150)
WHITE ... | mit | -4,019,113,260,679,411,700 | 45.071429 | 125 | 0.599309 | false | 3.214634 | false | false | false |
kernc/orange3-text | orangecontrib/text/lda.py | 1 | 3585 | import numpy as np
from gensim import corpora, models, matutils
from Orange.data.table import Table
from Orange.data.domain import Domain, ContinuousVariable, StringVariable
from orangecontrib.text.topics import Topics
def chunk_list(l, num):
num = min(len(l), num)
avg = len(l) / float(num)
out = []
l... | bsd-2-clause | 2,362,877,309,063,393,300 | 32.504673 | 90 | 0.55788 | false | 3.621212 | false | false | false |
matrix-org/synapse | synapse/storage/schema/main/delta/31/pushers.py | 1 | 2740 | # Copyright 2016 OpenMarket Ltd
#
# 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 writin... | apache-2.0 | 8,931,685,205,888,015,000 | 30.860465 | 76 | 0.606934 | false | 3.925501 | false | false | false |
qilicun/python | python2/ecl_local.py | 1 | 2993 | import os
import socket
import sys
import ert.job_queue.driver as driver
#################################################################
# Only a quite few of the Linux computers in Statoil are proper LSF
# nodes, in the sense that they can talk directly to the LSF
# demons. When using LSF from a computer which is n... | gpl-3.0 | -7,270,796,649,879,760,000 | 40.569444 | 88 | 0.625459 | false | 3.663403 | false | false | false |
mitodl/open-discussions | course_catalog/migrations/0060_contentfile_moverawjson.py | 1 | 3152 | # Generated by Django 2.2.9 on 2020-02-13 14:43
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [("course_catalog", "0059_remove_deprecated_offered_by")]
operations = [
migrat... | bsd-3-clause | -7,594,405,783,349,896,000 | 38.4 | 88 | 0.465102 | false | 4.775758 | false | false | false |
eviljeff/zamboni | mkt/lookup/views.py | 1 | 22456 | import json
import uuid
from datetime import datetime, timedelta
from django.conf import settings
from django.contrib import messages
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db import connection
from django.db.models import Count, Q, Sum
from djang... | bsd-3-clause | -2,779,730,549,008,845,300 | 38.396491 | 79 | 0.605094 | false | 3.834045 | false | false | false |
jianajavier/pnc-cli | pnc_cli/swagger_client/apis/products_api.py | 1 | 15858 | # coding: utf-8
"""
ProductsApi.py
Copyright 2015 SmartBear Software
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 ... | apache-2.0 | 1,099,622,853,851,888,500 | 33.929515 | 103 | 0.507756 | false | 5.137026 | true | false | false |
ina-foss/ID-Fits | lib/datasets/lfw.py | 1 | 6348 | # ID-Fits
# Copyright (c) 2015 Institut National de l'Audiovisuel, INA, All rights reserved.
#
# 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 3.0 of the License, or (at... | lgpl-3.0 | -6,367,440,375,545,659,000 | 26.480519 | 88 | 0.59373 | false | 3.65879 | false | false | false |
n2o/guhema | products/admin.py | 1 | 4627 | from django.contrib import admin
from django.contrib.flatpages.models import FlatPage
from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from modeltranslation.admin import TranslationAdmin
from pagedown.widgets import AdminPagedownWidget
f... | mit | 7,575,249,779,729,761,000 | 35.706349 | 155 | 0.626811 | false | 3.301213 | false | false | false |
NervanaSystems/coach | rl_coach/orchestrators/kubernetes_orchestrator.py | 1 | 19633 | #
# Copyright (c) 2017 Intel Corporation
#
# 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... | apache-2.0 | -2,720,742,902,227,571,000 | 39.817048 | 136 | 0.576173 | false | 4.112484 | true | false | false |
lantip/aws-filemanager | cloud_browser/tests/tests_views.py | 1 | 2226 | """Cloud browser views.py tests."""
from django.test import TestCase
import mock
from cloud_browser.cloud import errors
from cloud_browser.cloud.base import CloudContainer
from cloud_browser.common import ROOT
from cloud_browser import views
class TestBrowserRedirect(TestCase):
"""Tests for browser_redirect."""... | mit | -6,664,280,687,060,989,000 | 42.647059 | 78 | 0.608715 | false | 4.305609 | true | false | false |
tonioo/modoboa | modoboa/admin/models/mailbox.py | 1 | 12828 | # -*- coding: utf-8 -*-
"""Models related to mailboxes management."""
from __future__ import unicode_literals
import os
import pwd
from reversion import revisions as reversion
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models import Q
from django.db.model... | isc | -8,243,152,318,968,370,000 | 31.72449 | 79 | 0.588634 | false | 4.162232 | false | false | false |
sxjscience/tvm | python/tvm/relay/transform/memory_alloc.py | 1 | 14547 | # 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 u... | apache-2.0 | -187,480,350,309,768,800 | 36.882813 | 100 | 0.59813 | false | 3.752128 | false | false | false |
RENCI/xDCIShare | hs_geo_raster_resource/migrations/0001_initial.py | 1 | 7533 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import hs_core.models
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
('pages', '__first__'),
migrations.swappable_d... | bsd-3-clause | -2,520,419,331,241,645,000 | 60.745902 | 250 | 0.609584 | false | 4.289863 | false | false | false |
jhavstad/model_runner | src/Dnd.py | 1 | 31407 | """Drag-and-drop support for Tkinter.
This is very preliminary. I currently only support dnd *within* one
application, between different windows (or within the same window).
I an trying to make this as generic as possible -- not dependent on
the use of a particular widget or icon type, etc. I also hope that
this wi... | gpl-2.0 | 8,886,849,832,114,287,000 | 34.731513 | 144 | 0.614258 | false | 3.616235 | false | false | false |
STIXProject/python-stix | stix/ttp/behavior.py | 1 | 2251 | # Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
# mixbox
from mixbox import fields
# stix
import stix
import stix.bindings.ttp as ttp_binding
from .malware_instance import MalwareInstance, MalwareInstanceFactory
from .exploit import Exploit
from .attack_pattern... | bsd-3-clause | 6,403,979,115,881,606,000 | 34.730159 | 154 | 0.727677 | false | 3.384962 | false | false | false |
balopat/pyquil | pyquil/quilbase.py | 1 | 22078 | #!/usr/bin/python
##############################################################################
# Copyright 2016-2017 Rigetti Computing
#
# 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 ... | apache-2.0 | 1,625,788,238,896,269,800 | 27.897906 | 100 | 0.579264 | false | 4.147661 | false | false | false |
mcflugen/dakota-experiments | dakota_utils/convert.py | 1 | 1595 | #! /usr/bin/env python
#
# Dakota utility programs for converting output.
#
# Mark Piper (mark.piper@colorado.edu)
import shutil
from subprocess import check_call, CalledProcessError
from .read import get_names
def has_interface_column(tab_file):
'''
Returns True if the tabular output file has the v6.1 'inte... | mit | 5,199,411,763,182,056,000 | 26.033898 | 76 | 0.618182 | false | 3.69213 | false | false | false |
mdales/django-oauth | views.py | 1 | 7170 | from __future__ import absolute_import
import cgi
import logging
import urllib
import urlparse
from django.conf import settings
from django.http import (HttpResponse, HttpResponseRedirect,
HttpResponseNotAllowed, HttpResponseBadRequest)
from django.utils.translation import ugettext as _
from... | bsd-3-clause | 5,926,247,509,342,452,000 | 36.936508 | 114 | 0.628591 | false | 4.439628 | false | false | false |
thunderhoser/GewitterGefahr | gewittergefahr/deep_learning/data_augmentation.py | 1 | 10404 | """Augments image dataset by shifting, rotating, or adding Gaussian noise."""
import numpy
from scipy.ndimage.interpolation import rotate as scipy_rotate
from gewittergefahr.gg_utils import error_checking
from gewittergefahr.deep_learning import deep_learning_utils as dl_utils
PADDING_VALUE = 0.
MIN_ABSOLUTE_ROTATION... | mit | -2,660,933,531,477,397,000 | 36.695652 | 80 | 0.688774 | false | 3.385617 | false | false | false |
sssilver/angler | rod/rod/model/lesson.py | 1 | 1292 | import sqlalchemy.types
import sqlalchemy.schema
import sqlalchemy.orm
import rod.model
class Lesson(rod.model.db.Model, rod.model.PersistentMixin):
__tablename__ = 'lesson'
id = sqlalchemy.schema.Column(sqlalchemy.types.Integer, primary_key=True)
time = sqlalchemy.schema.Column(sqlalchemy.types.DateTim... | bsd-3-clause | 8,059,350,905,018,114,000 | 33 | 77 | 0.51548 | false | 4.820896 | false | false | false |
aarora79/sb_study | common/utils.py | 1 | 12780 | # -*- coding: utf-8 -*-
import os
import string
import json
import pandas as pd
import numpy as np
from scipy.stats.stats import pearsonr
from dateutil.parser import parse
from common import globals as glob
SPECIAL_CHARS = string.punctuation.replace("_", "")
SPECIAL_CHARS = string.punctuation.replace("-", "")
SPECIAL_... | mit | 3,349,361,493,153,902,600 | 41.73913 | 129 | 0.582799 | false | 3.649814 | false | false | false |
serge-sans-paille/pythran | pythran/tests/cases/sobelfilter.py | 1 | 2118 | #skip.runas import Image; im = Image.open("Scribus.gif"); image_list = list(im.getdata()); cols, rows = im.size; res = range(len(image_list)); sobelFilter(image_list, res, cols, rows)
#runas cols = 100; rows = 100 ;image_list=[x%10+y%20 for x in range(cols) for y in range(rows)]; sobelFilter(image_list, cols, rows)
#be... | bsd-3-clause | 6,285,914,057,603,005,000 | 49.428571 | 183 | 0.520774 | false | 2.991525 | false | false | false |
stuartsale/BibShorts | bibshorts/__init__.py | 1 | 3454 | from __future__ import print_function
import requests # for working with remote resources
import re # regular expresions
import os
class bib_entry:
def __init__(self, bibtex_in):
"""
Initialise the object with its arxiv reference number
"""
self.bibtex = b... | bsd-3-clause | -3,439,400,351,898,363,400 | 29.034783 | 83 | 0.458888 | false | 3.997685 | false | false | false |
Mhynlo/SickRage | sickbeard/providers/cpasbien.py | 1 | 4616 | # coding=utf-8
# Author: Guillaume Serre <guillaume.serre@gmail.com>
#
# URL: https://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage 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 v... | gpl-3.0 | -5,184,486,897,737,168,000 | 42.140187 | 150 | 0.543761 | false | 4.056239 | false | false | false |
ProfHoekstra/bluesky | plugins/example.py | 1 | 3455 | """ BlueSky plugin template. The text you put here will be visible
in BlueSky as the description of your plugin. """
from random import randint
import numpy as np
# Import the global bluesky objects. Uncomment the ones you need
from bluesky import core, stack, traf #, settings, navdb, sim, scr, tools
### Initiali... | gpl-3.0 | 8,750,351,373,721,328,000 | 46.328767 | 112 | 0.684515 | false | 4.152644 | false | false | false |
bdcht/amoco | amoco/arch/x86/utils.py | 1 | 4777 | # -*- coding: utf-8 -*-
# This code is part of Amoco
# Copyright (C) 2014 Axel Tillequin (bdcht3@gmail.com)
# published under GPLv2 license
# spec_xxx files are providers for instruction objects.
from amoco.arch.x86 import env
from amoco.arch.core import *
# for ia32 arch we want some specialized 'modrm' format
# ... | gpl-2.0 | 6,701,555,174,954,964,000 | 26.454023 | 78 | 0.494871 | false | 2.877711 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.