repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
abcamus/gadgets | note-editor/parser.py | 1 | 3780 | import platform
'''
This file defines Token class and Lexer class
'''
class Token():
def __init__(self):
self.type = None
self.content = ''
self.s_line = 1
self.s_col = 0
self.e_line = 1
self.e_col = 0
operation_list = ['+', '-', '*', '/']
def isoperator(char):
... | mit | 7,771,372,619,228,204,000 | 27.208955 | 87 | 0.530688 | false | 3.445761 | false | false | false |
offlinehacker/flumotion | flumotion/common/bundleclient.py | 1 | 6795 | # -*- Mode: Python; test-case-name: flumotion.test.test_bundleclient -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com).
# All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General Pu... | gpl-2.0 | 8,944,481,462,258,507,000 | 34.575916 | 79 | 0.590728 | false | 4.403759 | false | false | false |
numansiddique/contrail-controller | src/nodemgr/database_nodemgr/database_event_manager.py | 2 | 11196 | #
# Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
#
from gevent import monkey
monkey.patch_all()
import os
import sys
import socket
import subprocess
import json
import time
import datetime
import platform
import select
import gevent
import ConfigParser
from nodemgr.common.event_manager import EventM... | apache-2.0 | -355,458,862,940,138,200 | 45.845188 | 112 | 0.588335 | false | 3.774781 | false | false | false |
evandempsey/porter2-stemmer | setup.py | 1 | 1536 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', ... | bsd-3-clause | 601,649,328,121,916,300 | 25.947368 | 79 | 0.625 | false | 3.783251 | false | true | false |
spulec/pep8ify | pep8ify/fixes/fix_maximum_line_length.py | 2 | 14923 | from __future__ import unicode_literals
from lib2to3.fixer_base import BaseFix
from lib2to3.fixer_util import LParen, RParen
from lib2to3.pgen2 import token
from lib2to3.pygram import python_symbols as symbols
from lib2to3.pytree import Leaf, Node
from textwrap import TextWrapper
from .utils import (tuplize_comments, ... | apache-2.0 | 1,985,185,718,630,253,600 | 42.634503 | 79 | 0.574683 | false | 3.985844 | true | false | false |
mbkulik/ubuntu-make | umake/frameworks/dart.py | 5 | 3196 | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Canonical
#
# Authors:
# Didier Roche
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; version 3.
#
# This program is distributed in the hope that ... | gpl-3.0 | 1,782,776,611,232,072,000 | 36.162791 | 118 | 0.663329 | false | 3.940814 | false | false | false |
rodrigocava/HANAcalcViewHierarchy | Project_Calc_Views_Hierarchy/calcViewHierarchy.py | 1 | 2792 | # Software licensed by the MIT License of Open Source (https://opensource.org/licenses/MIT)
import pyhdb
import urllib
from http.server import BaseHTTPRequestHandler, HTTPServer
# Change here the connection parameters for your HANA System
host = "0.0.0.0"
port = 30041
user = "USER"
pwsd = "PASSWORD"
# Recursive func... | mit | 6,841,338,584,560,991,000 | 32.650602 | 204 | 0.679799 | false | 3.158371 | false | false | false |
Cynerva/pyipmi | pyipmi/commands/info.py | 2 | 4185 | # Copyright (c) 2012, Calxeda 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and th... | bsd-3-clause | -6,216,887,270,168,991,000 | 40.435644 | 79 | 0.651613 | false | 4.301131 | false | false | false |
xuhaibahmad/PELL | pell/price_notifier/scrapers/MegaComputerScraper.py | 1 | 3847 | import math
import urllib.parse
import requests
from bs4 import BeautifulSoup as bSoup
from utils import utils
class MegaComputerScraper:
# Declare URL and class names to picked
BASE_URL = 'http://www.megacomputer.pk/catalogsearch/result/index/?is_ajax=1&limit=36&q={}'
PRODUCT_PRICE_CLASS_NAME = "old-pr... | gpl-3.0 | -746,995,803,090,889,300 | 41.744444 | 95 | 0.54744 | false | 4.058017 | false | false | false |
lewisc/spark-tk | regression-tests/sparktkregtests/testcases/frames/ecdf_test.py | 13 | 3032 | # vim: set encoding=utf-8
# Copyright (c) 2016 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 require... | apache-2.0 | 8,987,978,931,252,181,000 | 37.363636 | 85 | 0.63304 | false | 3.418981 | true | false | false |
mpurzynski/MozDef | cron/update_geolite_db.py | 2 | 3321 | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# Copyright (c) 2017 Mozilla Corporation
import sys
import requests
import tempfile
import gzip
... | mpl-2.0 | -4,587,281,079,884,816,400 | 36.314607 | 128 | 0.672689 | false | 3.503165 | true | false | false |
nathanielvarona/airflow | airflow/providers/amazon/aws/sensors/glue_crawler.py | 3 | 2635 | #
# 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... | apache-2.0 | -321,722,669,545,936,100 | 39.538462 | 97 | 0.677799 | false | 3.863636 | false | false | false |
juditacs/wikt2dict | wikt2dict/article.py | 1 | 5004 | import re
import logging
from collections import defaultdict
template_re = re.compile(r"\{\{[^\}]*\}\}", re.UNICODE)
default_translation_re = re.compile(
ur"\{\{(t[\u00d8|\-\+])\|([^}]+)\}\}", re.UNICODE)
global_features = ["sourcewc", "article", "has_article"]
# tester method
def uprint(str_):
print str_.enc... | lgpl-3.0 | -2,061,081,859,329,934,600 | 32.583893 | 113 | 0.526179 | false | 3.819847 | false | false | false |
seadsystem/website | seadssite/models.py | 2 | 3066 | from __future__ import print_function
import sys
from functools import partial
from django.contrib.auth.models import User
from django.db import models
from django.core.exceptions import FieldError
'''
error function for adding errors to stdrr
'''
error = partial(print, sys.stderr)
'''
Model Manager for doing table a... | mit | -1,256,448,640,234,698,800 | 35.939759 | 121 | 0.683953 | false | 3.966365 | false | false | false |
USGSDenverPychron/pychron | pychron/hardware/gauges/granville_phillips/pychron_micro_ion_controller.py | 1 | 2366 | # ===============================================================================
# Copyright 2014 Jake Ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | apache-2.0 | -1,608,491,260,895,939,300 | 36.555556 | 94 | 0.562975 | false | 3.923715 | false | false | false |
deo1/deo1 | KaggleTitanic/models/model_2017_09_17_18_25_35-0.9877.py | 1 | 1033 | import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.pipeline import make_pipeline, make_union
from tpot.builtins import StackingEstimator
from sklearn.preprocessing import FunctionTransformer
from copy import copy
# NOTE: Make sure t... | mit | -7,004,613,287,593,911,000 | 40.32 | 122 | 0.775411 | false | 3.650177 | false | false | false |
yfu/tools | fasta_splitter.py | 1 | 1492 | #!/usr/bin/env python
# Read in a fasta file and split it into multiple files
# Author: Yu Fu (yfu at yfu dot me)
import argparse
parser = argparse.ArgumentParser(description='Split a fasta file into multiple files')
parser.add_argument('-p', '--parts', help='The number of (almost) equal parts', required=True)
pars... | gpl-3.0 | 8,845,160,813,846,692,000 | 26.127273 | 101 | 0.63874 | false | 3.243478 | false | false | false |
Ervii/garage-time | pajamas/src/python/twitter/common/java/perfdata/bin/jammystat.py | 14 | 2823 | # ==================================================================================================
# Copyright 2013 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | apache-2.0 | 8,797,133,664,789,124,000 | 23.763158 | 100 | 0.590861 | false | 3.784182 | false | false | false |
Delosari/dazer | bin/user_conf/Delete_IntermediateFiles.py | 1 | 2897 | '''
Created on Dec 16, 2014
@author: delosari
'''
from os import remove
from os.path import isfile
import CodeTools.PlottingManager as plotMan
from PipeLineMethods.ManageFlow import DataToTreat
Pv = plotMan.myPickle()
LogFiles_Extension = ".plot"
CombinedFits = "WHT.fits"
NebularFits = "_Neb.fits... | mit | -6,235,822,879,463,987,000 | 29.1875 | 129 | 0.525026 | false | 4.063114 | false | false | false |
hisen630/my_stock | download_daily_data.py | 1 | 4108 | #!/usr/bin/env python2.7
#coding=utf-8
import logging
import sys
import time
import argparse
import pandas as pd
from pandas import DataFrame,Series
import tushare as ts
import lib.mylog
import lib.utils as utils
import conf.conf as conf
class DailyDataDownloader(object):
def __init__(self,date, interval=10, ... | gpl-2.0 | 6,877,951,573,446,795,000 | 37.754717 | 129 | 0.525803 | false | 4.063304 | false | false | false |
uhef/fs-uae-gles | launcher/fs_uae_launcher/ui/Book.py | 2 | 1326 | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import fs_uae_launcher.fsui as fsui
class Book(fsui.Panel):
def __init__(self, parent):
fsui.Panel.__init__(self, parent)
self.layout = fsui.Vertica... | gpl-2.0 | -5,525,024,875,432,784,000 | 28.466667 | 53 | 0.546757 | false | 4.030395 | false | false | false |
BhallaLab/moose-full | moose-core/tests/python/test_synchan.py | 2 | 3130 | # test_synchan.py ---
#
# Filename: test_synchan.py
# Description:
# Author: Subhasis Ray
# Maintainer:
# Created: Wed Apr 23 12:00:01 2014 (+0530)
# Version:
# Last-Updated:
# By:
# Update #: 0
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
#
#
#
# Change log:
#
#
#
#
# Th... | gpl-2.0 | 5,338,567,939,501,106,000 | 29.096154 | 95 | 0.659105 | false | 3.000959 | false | false | false |
andrewyoung1991/supriya | supriya/tools/synthdeftools/DoneAction.py | 1 | 1041 | # -*- encoding: utf-8 -*-
from supriya.tools.systemtools.Enumeration import Enumeration
class DoneAction(Enumeration):
r'''An enumeration of scsynth UGen "done" actions.
::
>>> from supriya.tools import synthdeftools
>>> synthdeftools.DoneAction(2)
DoneAction.FREE_SYNTH
::
... | mit | 1,936,751,285,137,782,800 | 27.162162 | 61 | 0.667627 | false | 2.790885 | false | false | false |
The-Compiler/qutebrowser | qutebrowser/browser/inspector.py | 1 | 7851 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 | -2,090,504,158,504,276,200 | 33.134783 | 79 | 0.648325 | false | 4.236913 | true | false | false |
glyph/cryptography | setup.py | 1 | 3258 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | apache-2.0 | 5,299,818,349,371,945,000 | 29.448598 | 79 | 0.643033 | false | 4.171575 | false | false | false |
alivecor/tensorflow | tensorflow/contrib/rnn/python/ops/rnn_cell.py | 14 | 89649 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,546,763,614,361,656,000 | 38.440827 | 97 | 0.623654 | false | 3.58381 | false | false | false |
jriehl/numba | numba/typed/typedlist.py | 1 | 9005 |
"""
Python wrapper that connects CPython interpreter to the Numba typed-list.
This is the code that is used when creating typed lists outside of a `@jit`
context and when returning a typed-list from a `@jit` decorated function. It
basically a Python class that has a Numba allocated typed-list under the hood
and uses ... | bsd-2-clause | 2,869,093,582,424,535,000 | 21.179803 | 78 | 0.608329 | false | 3.407113 | false | false | false |
tadek-project/tadek-daemon | src/accessibility/constants.py | 1 | 5948 | ################################################################################
## ##
## This file is a part of TADEK. ##
## ... | gpl-3.0 | 8,102,291,572,339,792,000 | 37.623377 | 80 | 0.457297 | false | 4.792909 | false | false | false |
baku89/Subete-ga-F-ni-naru-ED | golly/export_large.py | 1 | 3439 | from __future__ import division
import golly as g
from PIL import Image
from math import floor, ceil, log
import os
import json
#---------------------------------------------
# settings
exportDir = "/Volumes/MugiRAID1/Works/2015/13_0xff/ca/golly-exported/otca"
# common
# duration = 147 #int( g.get... | mit | -5,444,031,110,624,764,000 | 16.390374 | 74 | 0.52399 | false | 2.566418 | false | false | false |
tempbottle/chillaxd | chillaxd/raft/serverstate.py | 3 | 7641 | # -*- coding: utf-8 -*-
# Copyright Yassine Lamgarchal <lamgarchal.yassine@gmail.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.0
#
# Unless... | apache-2.0 | -6,309,576,981,796,895,000 | 32.809735 | 77 | 0.621777 | false | 3.930556 | false | false | false |
djnugent/GameNet | duel_dqn_cartpole.py | 1 | 2104 | import numpy as np
import gym
from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten
from keras.optimizers import Adam
from rl.agents.dqn import DQNAgent
from rl.policy import BoltzmannQPolicy
from rl.memory import SequentialMemory
ENV_NAME = 'CartPole-v0'
# Get the... | gpl-3.0 | 6,829,196,167,816,234,000 | 36.254545 | 106 | 0.738593 | false | 3.168675 | false | false | false |
indodutch/sim-city-client | simcity/ensemble.py | 2 | 2821 | # SIM-CITY client
#
# Copyright 2015 Netherlands eScience Center, Jan Bot
#
# 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 require... | apache-2.0 | -6,904,070,903,719,162,000 | 33.402439 | 78 | 0.564693 | false | 4.223054 | false | false | false |
sibis-platform/sibis-platform.github.io | pelicanconf.py | 1 | 3272 | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
AUTHOR = "SRI International"
SITENAME = "Scalable Informatics for Biomedical Imaging Studies"
SITESUBTITLE = ""
SITEURL = ""
TIMEZONE = "America/Vancouver"
DEFAULT_LANG = "en"
conda_env = os.environ.get('CONDA_PREFIX'... | apache-2.0 | -3,414,933,232,028,860,000 | 26.266667 | 114 | 0.694377 | false | 2.87522 | false | false | false |
Codeepy/Share.it | foodbank/settings.py | 1 | 2503 | """
Django settings for foodbank project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
i... | apache-2.0 | 7,187,523,240,684,971,000 | 23.31068 | 71 | 0.718738 | false | 3.156368 | false | false | false |
rvanlaar/easy-transifex | src/transifex/transifex/resources/formats/registry.py | 1 | 7208 | # -*- coding: utf-8 -*-
"""
Register the available formats and their capabilities.
"""
import magic
from django.conf import settings
from transifex.txcommon import import_to_python
from transifex.txcommon.log import logger
class _FormatsRegistry(object):
"""Registry class for the formats."""
def __init__(se... | bsd-2-clause | 56,344,700,331,536,184 | 31.178571 | 85 | 0.561182 | false | 4.668394 | false | false | false |
jonathanslenders/python-prompt-toolkit | examples/progress-bar/many-parallel-tasks.py | 1 | 1591 | #!/usr/bin/env python
"""
More complex demonstration of what's possible with the progress bar.
"""
import threading
import time
from prompt_toolkit import HTML
from prompt_toolkit.shortcuts import ProgressBar
def main():
with ProgressBar(
title=HTML("<b>Example of many parallel tasks.</b>"),
bott... | bsd-3-clause | -3,867,059,811,151,878,000 | 33.586957 | 82 | 0.583281 | false | 3.7 | false | false | false |
JoeMido/networking-midonet | midonet/neutron/db/migration/alembic_migration/versions/4105f6d52b82_add_router_service_insertion_tables.py | 2 | 1984 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 Midokura SARL.
# 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.o... | apache-2.0 | 7,861,029,487,135,160,000 | 35.740741 | 78 | 0.690524 | false | 3.574775 | false | false | false |
mtunique/knows | algorithm/std_functions.py | 1 | 2587 | __author__ = 'mt'
# -*- coding: utf-8 -*-
import math
from counts import *
import jieba
import jieba.analyse
from bs4 import BeautifulSoup
def to_string(content, strip=True):
return BeautifulSoup(content).html.body.get_text('\n', strip=strip)
def _cos(x, y):
ans = 0.
len_x = 0
len_y = 0
for i in... | gpl-2.0 | 7,264,268,008,693,762,000 | 25.141414 | 117 | 0.58678 | false | 3.262295 | false | false | false |
isb-cgc/ISB-CGC-Webapp | visualizations/data_request.py | 1 | 6140 | ###
# Copyright 2015-2019, Institute for Systems Biology
#
# 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 la... | apache-2.0 | -5,620,259,480,021,835,000 | 34.697674 | 116 | 0.682899 | false | 2.839963 | false | false | false |
magfest/ubersystem | uber/badge_funcs.py | 1 | 5493 | from uber.models import Attendee
from uber.config import c
def check_range(badge_num, badge_type):
if badge_num is not None:
try:
badge_num = int(badge_num)
except Exception:
return '"{}" is not a valid badge number (should be an integer)'.format(badge_num)
if badg... | agpl-3.0 | 3,580,210,522,217,002,000 | 40.931298 | 118 | 0.631167 | false | 3.562257 | false | false | false |
sweet-st/seedvpn | test/hander.py | 1 | 2274 | import socket
import logging
import AES_Encrypt
import shell
'''
class Hander():
def __init__(self, ip, port):
self.ip = ip
self.port = port
self.fd = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
def login():
pass
'''
class Hander():
def __... | gpl-3.0 | -3,187,089,210,640,430,600 | 28.921053 | 79 | 0.543975 | false | 3.860781 | false | false | false |
inbloom/legacy-projects | lri-b/neorest.py | 2 | 11904 | #!/usr/bin/env python
# Copyright 2012-2013 inBloom, Inc. and its affiliates.
#
# 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 require... | apache-2.0 | 5,365,534,441,605,054,000 | 35.182371 | 185 | 0.572329 | false | 3.876262 | false | false | false |
PetePriority/home-assistant | homeassistant/components/freebox/__init__.py | 1 | 2731 | """
Support for Freebox devices (Freebox v6 and Freebox mini 4K).
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/freebox/
"""
import logging
import socket
import voluptuous as vol
from homeassistant.components.discovery import SERVICE_FREEBOX
from hom... | apache-2.0 | -2,485,271,579,243,107,000 | 29.010989 | 78 | 0.659099 | false | 3.670699 | true | false | false |
prometheus42/MangaLoader | src/data.py | 1 | 2753 |
import logging
logger = logging.getLogger('MangaLoader.data')
# -------------------------------------------------------------------------------------------------
# Manga class
# -------------------------------------------------------------------------------------------------
class Manga(object):
def __init__(... | mit | 675,683,230,206,739,100 | 28.602151 | 99 | 0.432982 | false | 4.705983 | false | false | false |
J08nY/PGPy | pgpy/types.py | 1 | 25555 | """ types.py
"""
from __future__ import division
import abc
import base64
import binascii
import bisect
import codecs
import collections
import operator
import os
import re
import warnings
import weakref
from enum import EnumMeta
from enum import IntEnum
import six
from ._author import __version__
from .decorators... | bsd-3-clause | -3,138,562,924,995,488,000 | 32.892573 | 131 | 0.555469 | false | 4.015556 | false | false | false |
Linaf/Convae-Destin | scripts/feature_extract_test.py | 1 | 1423 | """Feature extraction test"""
import numpy as np;
import sys
import theano;
import theano.tensor as T;
sys.path.append("..")
import scae_destin.datasets as ds;
from scae_destin.convnet import ReLUConvLayer;
from scae_destin.convnet import LCNLayer
n_epochs=1;
batch_size=100;
Xtr, Ytr, Xte, Yte=ds.load_CIFAR10("/ho... | apache-2.0 | -5,373,216,358,462,393,000 | 28.040816 | 91 | 0.61279 | false | 2.779297 | true | true | false |
robisen1/AndroidWifiCracker | services/gps/TestNmea.py | 1 | 5151 | #!/usr/bin/env python
import unittest
import NmeaSentences
import NmeaParser
import datetime
from Utc import Utc
class TestNmeaSentence(unittest.TestCase):
def setUp(self):
self.__nmea = NmeaSentences.NmeaSentence("XYZ")
def test_getType(self):
self.assertEqual(self.__nmea.getTyp... | mit | -4,426,617,892,255,343,000 | 41.933333 | 108 | 0.647835 | false | 2.828666 | true | false | false |
googleapis/python-translate | owlbot.py | 1 | 2125 | # Copyright 2018 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 agreed to in writing, s... | apache-2.0 | -7,526,043,277,117,997,000 | 30.716418 | 95 | 0.582118 | false | 4.126214 | false | false | false |
ngokevin/cyder | cyder/maintain2cyder/printer.py | 1 | 2133 | import sys
"""
A class to print BIND records.
"""
class Printer(object):
def __init__( self, fd=sys.stdout, AJUST1=30, AJUST2=10 ):
self.fd = fd
self.AJUST1 = AJUST1
self.AJUST2 = AJUST2
def print_raw( self, message ):
self.fd.write( message )
def print_rr( self, name, dat... | bsd-3-clause | 8,471,048,928,994,542,000 | 32.328125 | 103 | 0.51805 | false | 2.987395 | false | false | false |
JT5D/Alfred-Popclip-Sublime | Sublime Text 2/SideBarGit/StatusBarBranch.py | 3 | 1240 | import sublime, sublime_plugin
from sidebar.SideBarGit import SideBarGit
from sidebar.SideBarSelection import SideBarSelection
import threading
class Object():
pass
s = sublime.load_settings('SideBarGit.sublime-settings')
class StatusBarBranch(sublime_plugin.EventListener):
def on_load(self, v):
if s.get('statu... | gpl-2.0 | -9,210,344,488,855,552,000 | 27.860465 | 99 | 0.716129 | false | 3.076923 | false | false | false |
karmux/cid | cid/cursor.py | 1 | 1286 | from .locals import get_cid
class CidCursorWrapper(object):
"""
A cursor wrapper that attempts to add a cid comment to each query
"""
def __init__(self, cursor):
self.cursor = cursor
def __getattr__(self, attr):
if attr in self.__dict__:
return self.__dict__[attr]
... | bsd-3-clause | 7,719,256,106,157,359,000 | 27.577778 | 77 | 0.580093 | false | 3.981424 | false | false | false |
oihane/odoo-addons | stock_picking_analytic/models/stock.py | 2 | 1797 | # Copyright (c) 2017 Alfredo de la fuente <alfredodelafuente@avanzosc.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class StockPicking(models.Model):
_inherit = 'stock.picking'
analytic_account_id = fields.Many2one(
comodel_name='account.ana... | agpl-3.0 | 3,870,059,004,579,822,600 | 38.065217 | 78 | 0.60601 | false | 3.594 | false | false | false |
pudo/aleph | services/ingest-file/ingestors/support/pdf.py | 1 | 1838 | import uuid
from pdflib import Document
from followthemoney import model
from normality import collapse_spaces # noqa
from ingestors.support.ocr import OCRSupport
from ingestors.support.convert import DocumentConvertSupport
class PDFSupport(DocumentConvertSupport, OCRSupport):
"""Provides helpers for PDF file c... | mit | 3,929,945,399,312,507,000 | 38.106383 | 78 | 0.638738 | false | 3.837161 | false | false | false |
blockbomb/plover | setup.py | 8 | 1745 | #!/usr/bin/env python2.6
# Copyright (c) 2010 Joshua Harlan Lifton.
# See LICENSE.txt for details.
from distutils.core import setup
from plover import __version__
from plover import __description__
from plover import __long_description__
from plover import __url__
from plover import __download_url__
from plover import... | gpl-2.0 | -7,679,780,743,119,549,000 | 40.547619 | 81 | 0.593123 | false | 4.096244 | false | false | false |
TNT-Samuel/Coding-Projects | DNS Server/Source/Lib/site-packages/idlexlib/extensionManager.py | 4 | 9491 | ## """
## Copyright(C) 2011-2012 The Board of Trustees of the University of Illinois.
## All rights reserved.
##
## Developed by: Roger D. Serwy
## University of Illinois
##
## Permission is hereby granted, free of charge, to any person obtaining
## a copy of this software and ass... | gpl-3.0 | -8,490,886,088,189,031,000 | 34.02214 | 120 | 0.610789 | false | 4.443352 | true | false | false |
blueshed/blueshed-py | src/blueshed/utils/pika_broadcaster.py | 1 | 12533 | '''
Created on 23 Sep 2015
@author: peterb
'''
from pika import adapters
import pika
import logging
import os
class PikaBroadcaster(object):
"""This is an example consumer that will handle unexpected interactions
with RabbitMQ such as channel and connection closures.
If RabbitMQ closes the connection, i... | mit | 3,863,031,073,489,841,000 | 37.804954 | 92 | 0.646533 | false | 4.318746 | false | false | false |
james-nichols/dtrw | viral_penetration/fit_EDTA_sites.py | 1 | 7076 | #!/usr/local/bin/python3
# Libraries are in parent directory
import sys
sys.path.append('../')
import numpy as np
import scipy
import time, csv, math, collections
from dtrw import *
# Local fit functions for a variety of scripts
from fit_functions import *
import mpmath
import scipy.integrate
from mpl_toolkits.mplo... | gpl-2.0 | 5,539,513,225,448,222,000 | 35.663212 | 194 | 0.663228 | false | 2.548073 | false | false | false |
d3str0h4x/C.Y.B.O.R.G | scripts/shellowned.py | 1 | 4885 | #!/usr/bin/python3.5
#-*- coding: utf-8 -*-
# Automação de tarefas em sistemas unix
# Non Comercial Purposes License
# NÂO RETIRAR OS CREDITOS!
# Script Open Source | Autor: d3str0 | Telegram: @phoenix_burning
# Veja mais dos meus scripts no github: https://github.com/d3str0h4x
import time
import os
import subproce... | gpl-3.0 | -4,639,166,577,025,929,000 | 30.732283 | 85 | 0.339206 | false | 2.301542 | false | false | false |
supriyasingh01/github_basics | Internetworking Distributed Project/finalProject/ovs/pox-master/pox/lib/util.py | 4 | 10875 | # Copyright 2011 James McCauley
#
# This file is part of POX.
#
# POX 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.
#
# POX is distri... | cc0-1.0 | -2,835,207,877,191,790,000 | 25.141827 | 93 | 0.597793 | false | 3.323655 | false | false | false |
fgolemo/dataCollector | dataCollector2.py | 2 | 10401 | import csv
import glob
import re
import os
import cPickle as pickle
from featureExtractors.AbsoluteCellCountOriginal import AbsoluteCellCountOriginal
from featureExtractors.RelativeCellCountOriginal import RelativeCellCountOriginal
from featureExtractors.AbsoluteCellCountAlt import AbsoluteCellCountAlt
from featureExtr... | apache-2.0 | -8,523,537,037,601,760,000 | 36.684783 | 139 | 0.63292 | false | 4.24704 | false | false | false |
xaratustrah/iq_suite | iqtools/tiqdata.py | 1 | 10520 | """
Class for IQ Data
TIQ format
Xaratustrah Aug-2015
"""
import os
import logging as log
import numpy as np
import xml.etree.ElementTree as et
from iqtools.iqbase import IQBase
class TIQData(IQBase):
def __init__(self, filename):
super().__init__(filename)
# Additional fields in this subclass... | gpl-2.0 | -1,870,584,986,021,713,000 | 45.140351 | 138 | 0.570817 | false | 3.542088 | false | false | false |
kg-bot/SupyBot | plugins/Darkfallonline/plugin.py | 1 | 5268 | ###
# Copyright (c) 2012, Valentin Lorentz
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditi... | gpl-3.0 | 742,745,633,977,731,500 | 37.173913 | 89 | 0.637054 | false | 4.096423 | false | false | false |
tabango94/PlugAndPlayFirmwareGenerator | app_firmware/views.py | 1 | 17330 | #! /usr/bin/python
# -*- coding: utf-8 -*-
import json, os
from django.shortcuts import redirect
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from app_proyecto.models import Proyecto
from app_firmware.models import Firmware, VersionFirmware
from django.conf import settings
f... | gpl-3.0 | 3,974,226,344,714,469,400 | 42.644836 | 125 | 0.480203 | false | 4.262239 | false | false | false |
tjguk/networkzero | setup.py | 1 | 1317 | #
# Initially copied from:
# https://raw.githubusercontent.com/pypa/sampleproject/master/setup.py
#
from setuptools import setup, find_packages
import os
import codecs
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f... | mit | 3,273,137,443,079,042,600 | 23.388889 | 74 | 0.621868 | false | 3.762857 | false | false | false |
mdietrichc2c/vertical-ngo | logistic_consignee/model/sale_order.py | 1 | 1365 | # -*- coding: utf-8 -*-
#
#
# Author: Yannick Vaucher, Leonardo Pistone
# Copyright 2014-2015 Camptocamp SA
#
# This program 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... | agpl-3.0 | -7,047,719,712,801,923,000 | 33.125 | 77 | 0.650549 | false | 3.866856 | false | false | false |
abdullahalmasum/a2billing-1.9.4-untar | CallBack/callback-daemon-py/callback_daemon/database.py | 2 | 9261 | #!/usr/bin/env python
# vim: set expandtab shiftwidth=4:
'''
* This file is part of A2Billing (http://www.a2billing.net/)
*
* A2Billing, Commercial Open Source Telecom Billing platform,
* powered by Star2billing S.L. <http://www.star2billing.com/>
*
* @copyright Copyright (C) 2004-2009 - Star2billing S.L. ... | agpl-3.0 | 5,660,961,621,840,508,000 | 33.427509 | 165 | 0.579635 | false | 3.732769 | true | false | false |
ActiveState/code | recipes/Python/580658_Function_guards_for_Python_3/recipe-580658.py | 1 | 13853 | #!/usr/bin/env python3
#-*- coding: iso-8859-1 -*-
################################################################################
#
# Function guards for Python 3.
#
# (c) 2016, Dmitry Dvoinikov <dmitry@targeted.org>
# Distributed under MIT license.
#
# Samples:
#
# from funcguard import guard
#
# @guard
# def abs(a,... | mit | -7,951,982,927,786,345,000 | 35.551451 | 107 | 0.593157 | false | 4.217047 | false | false | false |
guildai/guild | guild/ipy.py | 1 | 19332 | # Copyright 2017-2021 TensorHub, 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 writ... | apache-2.0 | 5,983,932,685,837,985,000 | 24.470356 | 88 | 0.600093 | false | 3.459556 | false | false | false |
UMONS-GFA/bdas | parsing/bin_to_influx.py | 1 | 4781 | import glob
import sys
import logging
import datetime
import pandas as pd
from os import path, makedirs, rename
from influxdb import DataFrameClient
from time import gmtime
from parsing import bin_to_df
from bdas.settings import DATABASE, BIN_DIR, PROCESSED_DIR, UNPROCESSED_DIR, LOG_DIR, LOG_FILE, MASK
def bin_to_inf... | gpl-3.0 | -6,081,361,585,220,011,000 | 45.872549 | 120 | 0.53357 | false | 3.779447 | false | false | false |
numirias/firefed | firefed/feature/permissions.py | 1 | 1123 | import attr
from attr import attrib, attrs
from firefed.feature import Feature, formatter
from firefed.output import out
from firefed.util import tabulate
@attrs
class Permissions(Feature):
"""List host permissions (e.g. location sharing).
This feature extracts the stored permissions which the user has gran... | mit | 123,947,964,493,940,500 | 27.075 | 78 | 0.637578 | false | 3.968198 | false | false | false |
OBIGOGIT/etch | binding-python/runtime/src/main/python/etch/binding/support/DefaultValueFactory.py | 2 | 4435 | """
# 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... | apache-2.0 | -6,336,460,698,594,596,000 | 37.565217 | 95 | 0.64938 | false | 3.548 | false | false | false |
sesh/flexx | make/_sphinx.py | 21 | 3982 | """ Tools for Sphinx to build docs and/or websites.
"""
import os
import os.path as op
import sys
import shutil
if sys.version_info[0] < 3:
input = raw_input # noqa
def sh(cmd):
"""Execute command in a subshell, return status code."""
return subprocess.check_call(cmd, shell=True)
def sh2(cmd):
"... | bsd-2-clause | 4,251,001,334,143,003,000 | 30.603175 | 73 | 0.580864 | false | 3.520778 | false | false | false |
paolodedios/pybuilder | src/unittest/python/plugins/python/cram_plugin_tests.py | 3 | 12634 | # -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2020 PyBuilder 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/l... | apache-2.0 | -8,196,437,905,931,931,000 | 44.610108 | 104 | 0.559205 | false | 4.01717 | true | false | false |
google-research/episodic-curiosity | third_party/keras_resnet/models.py | 1 | 12574 | # coding=utf-8
# COPYRIGHT
#
# All contributions by Raghavendra Kotikalapudi:
# Copyright (c) 2016, Raghavendra Kotikalapudi.
# All rights reserved.
#
# All other contributions:
# Copyright (c) 2016, the respective contributors.
# All rights reserved.
#
# Copyright (c) 2018 Google LLC
# All rights reserved.
#
# Each co... | apache-2.0 | -5,892,137,180,987,779,000 | 33.355191 | 80 | 0.672737 | false | 3.744491 | false | false | false |
SuLab/scheduled-bots | scheduled_bots/geneprotein/OrthologBot.py | 1 | 7744 | """
https://bitbucket.org/sulab/wikidatabots/src/4f2e4bdf3d7328eb6fd94cc67af61e194bda0a96/genes/orthologs/human/parseHomologene.py?at=dronetest_DiseaseBot&fileviewer=file-view-default
https://www.wikidata.org/wiki/Q14911732#P684
https://www.wikidata.org/wiki/Q18049645
homologene release 68
https://www.wikidata.org/w... | mit | 1,585,796,242,095,598,600 | 42.751412 | 179 | 0.625646 | false | 3.259259 | false | false | false |
harti768/Watch-my-Pi | create_email_data.py | 1 | 1473 | import send_email
def main():
#Eingabe von Informationen
print("Willkomen bei der Installation von Watch My Pi! \nZum Nutzen der Software benötigt Watch My Pi! ihre E-Mail Adresse und Anmelde Daten \nDiese werden nur lokal gespeichert und kommen an keiner Stellle online. \nACHTUNG: Die Anmelde Daten inbegriffe... | mit | -2,137,441,953,899,311,900 | 42 | 379 | 0.668263 | false | 2.877953 | false | false | false |
h4ck3rm1k3/gcc-ontology | tests/pythoscope_test.py | 1 | 1680 | import sys
sys.path.append("/home/mdupont/experiments/pythoscope/")
sys.path.append("/home/mdupont/experiments/pythoscope/pythoscope")
import pprint
import pythoscope
from pythoscope.store import Project,Function
import sys
sys.path.append("/home/mdupont/experiments/py-loadr-forkr-debugr")
import forkr
# forkr.set_logg... | gpl-3.0 | -5,380,355,806,445,398,000 | 28.473684 | 75 | 0.691667 | false | 3.307087 | true | false | false |
bbc/kamaelia | Sketches/MPS/BugReports/FixTests/Axon/Examples/Handles/TestHandle.py | 6 | 1109 | #!/usr/bin/python
import time
from Axon.background import background
from Kamaelia.UI.Pygame.Text import Textbox, TextDisplayer
from Axon.Handle import Handle
background().start()
try:
import Queue
queue = Queue # Python 3 compatibility change
except ImportError:
# Python 3 compatibility change
import que... | apache-2.0 | 8,626,075,919,318,856,000 | 24.204545 | 58 | 0.533814 | false | 4.047445 | false | false | false |
dwfreed/mitmproxy | mitmproxy/contentviews/protobuf.py | 1 | 1279 | import subprocess
from . import base
class ViewProtobuf(base.View):
"""Human friendly view of protocol buffers
The view uses the protoc compiler to decode the binary
"""
name = "Protocol Buffer"
prompt = ("protobuf", "p")
content_types = [
"application/x-protobuf",
"applicati... | mit | -6,204,324,615,913,677,000 | 27.422222 | 58 | 0.53792 | false | 4.684982 | false | false | false |
openpolis/open_municipio | open_municipio/people/models.py | 1 | 62224 | import datetime # use this only for checking types. use django.utils.datetime_safe for handling actual dates
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.db import models, transaction
from django.db.models import permalink, Q
from django.db... | agpl-3.0 | 937,666,606,277,034,800 | 33.020776 | 171 | 0.618539 | false | 4.017562 | false | false | false |
rh-s/heat | heat/engine/service_software_config.py | 1 | 12137 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | -4,000,311,948,028,636,000 | 40.003378 | 79 | 0.59677 | false | 4.064635 | true | false | false |
tchar/ctypesgen | ctypesgencore/parser/cparser.py | 13 | 6895 | #!/usr/bin/env python
'''
Parse a C source file.
To use, subclass CParser and override its handle_* methods. Then instantiate
the class with a string to parse.
'''
__docformat__ = 'restructuredtext'
import operator
import os.path
import re
import sys
import time
import warnings
import preprocessor
import yacc
imp... | bsd-3-clause | 7,333,108,137,968,191,000 | 32.149038 | 80 | 0.545323 | false | 4.491857 | false | false | false |
macchina-io/macchina.io | platform/JS/V8/v8/tools/sanitizers/sancov_formatter.py | 4 | 15598 | #!/usr/bin/env python
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Script to transform and merge sancov files into human readable json-format.
The script supports three actions:
all: Writes a json... | apache-2.0 | 1,672,534,452,440,716,300 | 33.281319 | 79 | 0.669637 | false | 3.694458 | true | false | false |
nick41496/Beatnik | beatnik/migrations/0011_musicclick.py | 1 | 1054 | # Generated by Django 2.1.5 on 2019-01-22 05:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('beatnik', '0010_musicaccess'),
]
operations = [
migrations.CreateModel(
name='MusicClick',
fields=[
... | gpl-3.0 | -8,645,648,373,081,352,000 | 42.916667 | 212 | 0.593928 | false | 4.053846 | false | false | false |
Marchowes/dyn-python | dyn/tm/task.py | 2 | 3775 | # -*- coding: utf-8 -*-
"""This module contains interfaces for all Task management features of the
REST API
"""
from dyn.compat import force_unicode
from dyn.tm.session import DynectSession
__author__ = 'mhowes'
def get_tasks():
response = DynectSession.get_session().execute('/Task', 'GET',
... | bsd-3-clause | 2,144,039,428,772,708,400 | 26.962963 | 74 | 0.526887 | false | 4.334099 | false | false | false |
BtXin/VirtualIRLab | util/util.py | 1 | 1335 | from flask import current_app
from flask_login import current_user
def allowed_file(filename):
return '.' in filename and filename.rsplit('.', 1)[1].lower() in {'txt', 'toml', 'dat'}
def check_role(role):
if not current_user.is_authenticated or current_user.role != role:
return current_app.login_man... | mit | -4,940,491,134,228,611,000 | 28.666667 | 91 | 0.444195 | false | 3.903509 | false | false | false |
BasementCat/bottle-utils | bottleutils/response.py | 1 | 1563 | import json
import bottle
def JsonResponse(callback):
return JsonResponsePlugin().apply(callback, None)
class JsonResponsePlugin(object):
name = 'JsonResponsePlugin'
api = 2
def apply(self, callback, route):
def wrapper(*args, **kwargs):
try:
out = callback... | mit | 2,757,041,014,070,183,000 | 32.255319 | 110 | 0.513756 | false | 4.665672 | false | false | false |
noironetworks/group-based-policy | gbpservice/neutron/db/migration/alembic_migrations/versions/27583c259fa7_missing_nested.py | 1 | 1638 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | 366,712,495,360,453,060 | 27.736842 | 78 | 0.73138 | false | 3.448421 | false | false | false |
mancoast/CPythonPyc_test | cpython/220_test_marshal.py | 3 | 1227 | from test_support import TestFailed
import marshal
import sys
# XXX Much more needed here.
# Test the full range of Python ints.
n = sys.maxint
while n:
for expected in (-n, n):
s = marshal.dumps(expected)
got = marshal.loads(s)
if expected != got:
raise TestFailed("for int %d,... | gpl-3.0 | 8,361,069,284,016,545,000 | 28.926829 | 75 | 0.563162 | false | 3.436975 | true | false | false |
istb-mia/miapy | miapy/data/extraction/reader.py | 1 | 4397 | import abc
import os
import h5py
import numpy as np
import miapy.data.indexexpression as expr
import miapy.data.definition as df
class Reader(metaclass=abc.ABCMeta):
"""Represents the abstract dataset reader."""
def __init__(self, file_path: str) -> None:
"""Initializes a new instance.
Arg... | apache-2.0 | 2,621,964,073,019,291,600 | 25.172619 | 118 | 0.581533 | false | 4.030247 | false | false | false |
lseek/empdb | employees/search_engine.py | 1 | 6556 | """Module for supporting searching/filtering of department employee lists.
In a logical sense this module implements:
select <fixed_fields> from <model> where <filter_conditions>
where:
- fixed_fields is the fixed list of fields mentioned above
- model is automatically determined by the module
- filter... | gpl-3.0 | 2,330,424,282,408,638,500 | 31.944724 | 81 | 0.622178 | false | 4.151995 | false | false | false |
kennethreitz/pipenv | pipenv/vendor/passa/internals/reporters.py | 1 | 2682 | # -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import resolvelib
from .traces import trace_graph
def print_title(text):
print('\n{:=^84}\n'.format(text))
def print_requirement(r, end='\n'):
print('{:>40}'.format(r.as_line(include_hashes=False)), end=end)
... | mit | -5,291,078,392,013,713,000 | 28.8 | 73 | 0.52088 | false | 4.113497 | false | false | false |
shadowfax-chc/django-natural-key-cache | tests/settings.py | 1 | 1699 | # vim: set et ts=4 sw=4 fileencoding=utf-8:
'''
Django settings for test project
'''
import os
import dj_config_url
from getenv import env
PROJ_ROOT = os.path.dirname(__file__)
SECRET_KEY = 'not_so_secret'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(PROJ... | isc | -4,793,782,855,686,300,000 | 19.46988 | 72 | 0.517363 | false | 3.305447 | true | false | false |
wangfengfighting/Caoliu-master | tt.py | 1 | 1632 | # -*- coding:utf-8 -*-
__author__ = 'Administrator'
# import urllib.request
# path = "D:\\Download"
# url = "http://img.picuphost.com/img/upload/image/20151130/113000016301.jpeg"
# name ="D:\\download\\2.jpeg"
# #保存文件时候注意类型要匹配,如要保存的图片为jpg,则打开的文件的名称必须是jpg格式,否则会产生无效图片
# conn = urllib.request.urlopen(url)
# f = open(name,... | apache-2.0 | 7,013,451,213,521,124,000 | 26.90566 | 98 | 0.7023 | false | 2.167155 | false | true | false |
scallopedllama/bootdreams_linux | bootdreams.py | 1 | 8158 | #!/usr/bin/python2
# Bootdreams python
# Written by Joe Balough (sallopedllama at gmail.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, ... | gpl-3.0 | 1,704,856,972,753,791,500 | 33.863248 | 146 | 0.655798 | false | 3.353062 | false | false | false |
TrampolineRTOS/GTL | build/libpm/python-makefiles/generic_galgas_makefile.py | 1 | 12683 | #! /usr/bin/env python
# -*- coding: UTF-8 -*-
#----------------------------------------------------------------------------------------------------------------------*
import sys, time, os
import makefile, default_build_options
#----------------------------------------------------------------------------------------... | gpl-2.0 | 3,188,628,503,302,512,000 | 47.969112 | 125 | 0.57581 | false | 3.988365 | false | false | false |
huxh10/iSDX | examples/test-sdx/generate_policies.py | 1 | 2878 | #!/usr/bin/env python
# Author:
# Arpit Gupta (arpitg@cs.princeton.edu)
import json
import os
from random import shuffle, randint
import sys
import argparse
def getMatchHash(part, peer_id, count):
return int(1 * part + 1 * peer_id + count)
def generatePoliciesParticipant(part, asn_2_ip, peers, frac, limit_out... | apache-2.0 | -7,312,323,639,624,161,000 | 31.704545 | 136 | 0.59173 | false | 3.393868 | false | false | false |
limafabio/Pythings | Chapter3/3.8/src/binary.py | 1 | 1219 | #!/usr/bin/py
#solved by FabioLima
#
#NameScript: binary.py
#
#Author and Maintaining: Fabio Lima
#
#-----------------------------------
#Description:
#
#
#-----------------------------------
#
#Example:
#
#
#-----------------------------------
#
#History
#
#v1.0 2017/02/08, FabioLima
#
#-------------------------------... | mit | 1,768,685,114,516,813,000 | 20.767857 | 59 | 0.477441 | false | 3.693939 | true | false | false |
wazo-pbx/xivo-tools | visualplan/src/visualplan/analyzer.py | 1 | 3654 | # -*- coding: utf-8 -*-
# Copyright (C) 2013-2014 Avencall
#
# 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 p... | gpl-3.0 | 7,107,767,899,599,299,000 | 37.463158 | 100 | 0.640941 | false | 3.834208 | false | false | false |
fabiencro/knmt | nmt_chainer/utilities/file_infos.py | 1 | 1191 | from __future__ import absolute_import, division, print_function, unicode_literals
import time
import os.path
import hashlib
from nmt_chainer.utilities.argument_parsing_tools import OrderedNamespace
##########################################
# A function to compute the hash of a file
# Taken from http://stackoverflow... | gpl-3.0 | -1,077,444,829,948,523,000 | 33.028571 | 104 | 0.691856 | false | 3.565868 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.