repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rsennrich/nematus | nematus/data_iterator.py | 1 | 8483 | import numpy
import gzip
import shuffle
from util import load_dict
def fopen(filename, mode='r'):
if filename.endswith('.gz'):
return gzip.open(filename, mode)
return open(filename, mode)
class FileWrapper(object):
def __init__(self, fname):
self.pos = 0
self.lines = fopen(fname)... | bsd-3-clause | 621,670,756,834,552,700 | 34.19917 | 112 | 0.497701 | false | 4.205751 | false | false | false |
siso/pyraxshell | pyraxshell/plugins/plugin_servers.py | 1 | 14693 | # -*- coding: utf-8 -*-
# This file is part of pyraxshell.
#
# pyraxshell 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.
#
# pyraxshe... | gpl-3.0 | -716,632,528,795,646,200 | 32.167043 | 80 | 0.474648 | false | 4.401738 | false | false | false |
camshaft/w3spring | W3.sdd/scripts/units.py | 1 | 3344 | import os
import slk
# import mdx
# import blp
assets = './../assets/'
unitData = slk.readSlk(os.path.join(assets, 'War3/Units/UnitData.slk'))
unitAbilitiesData = slk.readSlk(os.path.join(assets, 'War3/Units/UnitAbilities.slk'))
unitBalanceData = slk.readSlk(os.path.join(assets, 'War3/Units/UnitBalance.slk'))
unitWe... | mit | -1,658,234,517,769,717,500 | 30.54717 | 149 | 0.686005 | false | 3.658643 | false | false | false |
ph4r05/PJSIP | pjsip-apps/src/pygui/log.py | 27 | 3628 | # $Id$
#
# pjsua Python GUI Demo
#
# Copyright (C)2013 Teluu Inc. (http://www.teluu.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 2 of the License, or
# (at your option) ... | gpl-2.0 | 3,415,326,807,691,252,000 | 27.566929 | 96 | 0.687155 | false | 2.986008 | true | false | false |
CuriosityLabTAU/physicial_curiosity_big_experiment | game/nao_move.py | 3 | 6245 | # -*- encoding: UTF-8 -*-
import sys
import almath
from naoqi import ALProxy
import rospy
import time
class NaoNode:
def __init__(self):
robotIP = '192.168.0.100'
port = 9559
try:
self.motionProxy = ALProxy("ALMotion", robotIP, port)
self.audioProxy = ALProxy("AL... | apache-2.0 | 2,165,075,680,781,422,600 | 39.558442 | 120 | 0.518815 | false | 3.486879 | false | false | false |
apache/cloudstack-gcestack | gstack/controllers/disks.py | 2 | 3492 | #!/usr/bin/env python
# encoding: utf-8
# 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, Vers... | apache-2.0 | -9,115,261,749,613,545,000 | 35.375 | 89 | 0.694444 | false | 3.875694 | false | false | false |
techtonik/warehouse | warehouse/packaging/tables.py | 1 | 8162 | # Copyright 2013 Donald Stufft
#
# 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, so... | apache-2.0 | 815,266,362,032,863,200 | 26.667797 | 79 | 0.624724 | false | 3.875594 | false | false | false |
jwodder/permutation | test/test_factorial.py | 1 | 1942 | from typing import List, Tuple
import pytest
from permutation import from_factorial_base, to_factorial_base
# <https://oeis.org/A007623>
FACTORIAL = [
(0, [0]),
(1, [1]),
(2, [1, 0]),
(3, [1, 1]),
(4, [2, 0]),
(5, [2, 1]),
(6, [1, 0, 0]),
(7, [1, 0, 1]),
(8, [1, 1, 0]),
(9, [1, ... | mit | 3,769,374,650,167,290,400 | 23.275 | 76 | 0.417611 | false | 2.216895 | true | false | false |
kzkn/fc | fcsite/utils.py | 1 | 6586 | # -*- coding: utf-8 -*-
import re
import time
from datetime import datetime
from flask import request, flash, get_flashed_messages, url_for, g
from BeautifulSoup import BeautifulSoup, Comment
from markdown import markdown
from fcsite import app
#############
# VALIDATIONS
#############
def do_validate(form, validat... | apache-2.0 | -6,040,366,730,247,631,000 | 20.872852 | 85 | 0.570935 | false | 3.126228 | false | false | false |
monsur/cors-python | cors/filters.py | 1 | 6033 | """Defines the filters for processing CORS requests."""
import errors
import logging
from cors import constants
class Filters(object):
def __init__(self, options):
all_filters = {
'allow_credentials': AllowCredentialsFilter(options),
'allow_headers': AllowHeadersFilter(options),... | mit | -1,815,417,302,568,710,700 | 27.323944 | 79 | 0.613459 | false | 4.368573 | false | false | false |
zhouyao1994/incubator-superset | superset/examples/sf_population_polygons.py | 1 | 2088 | # 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 | -8,584,381,531,354,540,000 | 33.8 | 70 | 0.670498 | false | 3.939623 | false | false | false |
mozilla/make.mozilla.org | make_mozilla/projects/models.py | 1 | 4512 | import hashlib
import urllib
from django.utils.safestring import mark_safe
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from django.core.urlresolvers import reverse
from django.db import models
from make_mozilla import tools
from make_mozilla import events
from make_mozilla.c... | bsd-3-clause | 3,145,061,814,565,009,400 | 27.929487 | 87 | 0.624335 | false | 3.903114 | false | false | false |
summerandwinter/wxapppython | spider/step.py | 1 | 1791 | # coding: utf-8
#!/usr/bin/python3
import pymysql
import urllib
import sys
import http.cookiejar
from leancloud import Object
from leancloud import Query
import json
import leancloud
cookie = http.cookiejar.CookieJar() #保存cookie,为登录后访问其它页面做准备
cjhdr = urllib.request.H... | mit | -5,942,587,703,392,306,000 | 27.416667 | 131 | 0.607038 | false | 2.799672 | false | false | false |
andrewhart098/Lean | Algorithm.Python/OptionOpenInterestRegressionAlgorithm.py | 1 | 3514 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Lice... | apache-2.0 | 3,437,610,583,746,770,400 | 47.123288 | 143 | 0.666856 | false | 4.205988 | false | false | false |
CloudBoltSoftware/cloudbolt-forge | blueprints/azure_network_security_group/cit/test_azure_nsg.py | 1 | 4847 | import json
import logging
import re
import time
import uuid
from api.api_samples.python_client.api_client import CloudBoltAPIClient
from api.api_samples.python_client.samples.api_helpers import wait_for_order_completion
from common.methods import set_progress
from accounts.models import Group
from infrastructure.mod... | apache-2.0 | -1,175,928,526,252,098,300 | 31.972789 | 95 | 0.651743 | false | 3.760279 | true | false | false |
iamahuman/angr | angr/knowledge_plugins/cfg/cfg_node.py | 2 | 17304 | import traceback
import logging
from archinfo.arch_soot import SootAddressDescriptor
import archinfo
from ...codenode import BlockNode, HookNode, SyscallNode
from ...engines.successors import SimSuccessors
from ...serializable import Serializable
from ...protos import cfg_pb2
_l = logging.getLogger(__name__)
class... | bsd-2-clause | 5,780,090,391,010,067,000 | 34.531828 | 124 | 0.534732 | false | 4.211244 | false | false | false |
eScatter/cstool | cstool/elf.py | 1 | 3465 | from itertools import takewhile
from warnings import warn
import numpy as np
from cslib import units
class ELF:
"""Handles ELF (Energy Loss Function) files, which consist of two
columns of data: photon energy in eV and the ELF, Im[-1/ε].
The first line contains a list of outer-shell binding energies
t... | apache-2.0 | -5,989,574,866,997,494,000 | 35.463158 | 104 | 0.562933 | false | 3.333975 | false | false | false |
cqychen/quants | quants/loaddata/skyeye_ods_tra_week_k.py | 1 | 2238 | #coding=utf8
import tushare as ts;
import pymysql;
import time as dt
from datashape.coretypes import string
from pandas.io.sql import SQLDatabase
import sqlalchemy
import datetime
from sqlalchemy import create_engine
from pandas.io import sql
import threading
import pandas as pd;
import sys
sys.path.append('../') #添加配... | epl-1.0 | -1,307,587,007,419,172,400 | 34.482759 | 106 | 0.584548 | false | 2.834711 | false | false | false |
gooddata/openstack-nova | nova/cmd/console.py | 2 | 1398 | # Copyright (c) 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | 5,111,145,435,175,372,000 | 30.066667 | 78 | 0.722461 | false | 3.85124 | false | false | false |
menzenski/Razmetka | razmetka/__init__.py | 2 | 1886 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##########
## The 'Razmetka' package, version 0.0.1 (2015-12-11)
##
## Original author: Matthew Menzenski (menzenski@ku.edu)
##
## License: MIT ( http://opensource.org/licenses/MIT )
##
##
### The MIT License (MIT)
###
### Copyright (c) 2015 Matthew Menzenski
### Permissio... | mit | -97,913,614,909,329,280 | 38.291667 | 79 | 0.696182 | false | 3.779559 | false | false | false |
fstagni/DIRAC | WorkloadManagementSystem/Service/MatcherHandler.py | 5 | 5029 | """ The Matcher service provides an XMLRPC interface for matching jobs to pilots
It uses a Matcher and a Limiter object that encapsulated the matching logic.
It connects to JobDB, TaskQueueDB, and PilotAgentsDB.
"""
__RCSID__ = "$Id$"
from DIRAC import gLogger, S_OK, S_ERROR
from DIRAC.Core.Utilities.Thread... | gpl-3.0 | 9,189,056,798,825,894,000 | 34.666667 | 93 | 0.665341 | false | 4.17691 | false | false | false |
agutieda/QuantEcon.py | quantecon/markov/ddp.py | 2 | 31020 | """
Filename: ddp.py
Author: Daisuke Oyama
Module for solving dynamic programs (also known as Markov decision
processes) with finite states and actions.
Discrete Dynamic Programming
----------------------------
A discrete dynamic program consists of the following components:
* finite set of states :math:`S = \{0, ... | bsd-3-clause | -7,072,695,072,091,287,000 | 31.045455 | 79 | 0.53127 | false | 3.698581 | false | false | false |
DESHRAJ/wye | wye/workshops/decorators.py | 4 | 1369 | from wye.base.constants import WorkshopStatus
def validate_action_param(action_map):
def wrapper(func):
def inner(self, user, **kwargs):
response = {'status': False, 'msg': ''}
pk = kwargs.get('pk')
action = kwargs.get('action')
# validate parameters
... | mit | -6,581,908,059,943,143,000 | 32.390244 | 60 | 0.525931 | false | 4.688356 | false | false | false |
ciopper90/DnsReader | dns_core.py | 1 | 10031 | # -*- coding: utf-8 -*-
import dpkt, dpkt.dns
import sys
import socket
import pcap
import subprocess
import csv
import re
from datetime import datetime
from scapy.all import *
import sys
import os
import fcntl
import time
type_table = {} # This is a lookup table for DNS query types
dns_whitelist = []
regexp = ''
#... | apache-2.0 | 4,694,968,026,180,986,000 | 34.985612 | 186 | 0.580768 | false | 3.202305 | false | false | false |
OCA/carrier-delivery | delivery_carrier_label_postlogistics/models/res_config.py | 1 | 15700 | # -*- coding: utf-8 -*-
# Copyright 2013-2017 Yannick Vaucher (Camptocamp SA)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import _, api, exceptions, fields, models
from ..postlogistics.web_service import PostlogisticsWebService
from . company import ResCompany
_logger = l... | agpl-3.0 | 4,158,691,558,610,080,000 | 40.633952 | 79 | 0.565622 | false | 4.433898 | true | false | false |
crazyhottommy/manta | src/demo/runMantaWorkflowDemo.py | 2 | 5417 | #!/usr/bin/env python
#
# Manta - Structural Variant and Indel Caller
# Copyright (c) 2013-2015 Illumina, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, ... | gpl-3.0 | -2,986,218,912,443,799,600 | 29.778409 | 118 | 0.606055 | false | 3.437183 | true | false | false |
kdungs/adventofcode | 2015/python/16.py | 1 | 1242 | import re
import sys
def parse_line(line):
reg = re.compile(r'(\w+): (\d+)')
sue = dict(reg.findall(line))
sue = {k: int(v) for k, v in sue.items()}
sue['name'] = line.partition(':')[0]
return sue
def parse_input(filename):
with open(filename) as f:
return [parse_line(l) for l in f.re... | mit | 5,722,171,253,763,568,000 | 24.875 | 66 | 0.57649 | false | 2.778523 | false | false | false |
mayagraw/Twitter-Scan | frequency.py | 1 | 1985 | import sys
import json
import operator
debug=0
tweets = []
new_term = {}
def printdebug(func,text):
print func,':',text
def load_tweets(tweet_file):
for line in tweet_file:
try:
tweets.append(json.loads(line))
except:
pass
def give_text(tweet):
if 'text' in tweet.keys():
return tweet['text']
else:
... | gpl-3.0 | -3,737,204,813,271,852,000 | 20.813187 | 73 | 0.675567 | false | 2.697011 | false | false | false |
skeggse/boids | tools/pack-shaders.py | 1 | 1194 | #!/usr/bin/env python
from os.path import abspath, basename, join, splitext
from sys import argv
import itertools, subprocess
if len(argv) < 3:
print('usage: pack-shaders.py <c preprocessor command> <output directory> [<source> ...]')
exit(1)
cpp = argv[1][1:].split(' ')
dest = argv[2]
src = itertools.islice(ar... | mit | -2,794,497,672,617,174,000 | 29.615385 | 92 | 0.671692 | false | 2.977556 | false | false | false |
ConservationInternational/ldmp-qgis-plugin | LDMP/plugin.py | 1 | 8742 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
LDMP - A QGIS plugin
This plugin supports monitoring and reporting of land degradation to the UNCCD
and in support of the SDG Land Degradation Neutrality (LDN) target.
-------------... | gpl-2.0 | 4,344,787,290,906,020,400 | 32.883721 | 85 | 0.598376 | false | 4.117758 | false | false | false |
rfleschenberg/django-shop | shop/admin/delivery.py | 1 | 10021 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, url
from django.contrib import admin
from django.core.urlresolvers import reverse
from django.db.models import Sum
from django.forms import models, widgets, ValidationError
from djang... | bsd-3-clause | 5,585,307,190,345,448,000 | 44.343891 | 119 | 0.637062 | false | 4.13749 | false | false | false |
jabbalaci/jabbapylib | jabbapylib/podium/gnome/gnome.py | 1 | 1308 | #!/usr/bin/env python
"""
Working with the Gnome desktop environment.
Some operations are achieved differently under
Gnome 2 and Gnome 3.
This is a dispatcher, you should use this
module because it will call the appropriate
implementation of the operation, depending
on the version of your Gnome session.
# from jabb... | gpl-3.0 | -3,391,656,561,626,527,000 | 26.25 | 96 | 0.624618 | false | 3.939759 | false | false | false |
arrayfire/arrayfire-python | setup.py | 1 | 4514 | #!/usr/bin/env python
#######################################################
# Copyright (c) 2015, ArrayFire
# All rights reserved.
#
# This file is distributed under 3-clause BSD license.
# The complete license agreement can be obtained at:
# http://arrayfire.com/licenses/BSD-3-Clause
###############################... | bsd-3-clause | -236,451,975,829,837,060 | 41.584906 | 119 | 0.602127 | false | 3.435312 | false | false | false |
garywu/exparse | exparse/tags.py | 1 | 2241 | __author__ = 'Work'
from helper import get_all_text, get_all_text_newline, get_all_text_tab
from parser import parse, parse_element, parse_string
img = {'src':'.//@src', 'alt':'.//@alt', 'title':'.//@title'}
a = {'href':'.//@href', 'target':'.//@target', 'text':'text()', 'all_text':{'.':lambda x: get_all_text(x).stri... | mit | 1,898,391,624,411,369,200 | 26.679012 | 115 | 0.56091 | false | 3.178723 | false | false | false |
HackerSpaceMaringa/FutebolRobosArduino | Server/pybt-test.py | 1 | 1230 | #! /usr/bin/python
import os
import serial as s
import time
ADDR = 0
NAME = 1
PORT = 2
devFile = '.dev'
devSerial = {}
devices = []
with open(devFile, 'r+') as fd:
lines = fd.readlines()
for i in range(len(lines)):
lines[i] = lines[i].replace('\n', '')
devLine = lines[i].split(' ')
devic... | gpl-3.0 | -3,434,766,708,102,203,000 | 23.117647 | 82 | 0.578862 | false | 3.098237 | false | false | false |
paulmathews/nova | doc/source/conf.py | 5 | 9773 | # -*- coding: utf-8 -*-
#
# nova documentation build configuration file, created by
# sphinx-quickstart on Sat May 1 15:17:47 2010.
#
# This file is execfile()d with the current directory set to
# its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | apache-2.0 | 4,554,941,798,835,312,600 | 34.028674 | 90 | 0.680548 | false | 3.61963 | true | false | false |
IRC-SPHERE/HyperStream | hyperstream/tools/asset_plate_generator/2016-12-12_v0.1.2.py | 1 | 2899 | # The MIT License (MIT) # Copyright (c) 2014-2017 University of Bristol
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to... | mit | -8,220,259,869,143,802,000 | 50.767857 | 145 | 0.696792 | false | 4.412481 | false | false | false |
EICT/C-BAS | src/plugins/ofed2/osavtwodelegate.py | 1 | 25104 | import eisoil.core.pluginmanager as pm
import eisoil.core.log
import pyrfc3339
import copy
logger=eisoil.core.log.getLogger('ofed')
GSAv2DelegateBase = pm.getService('gsav2delegatebase')
gfed_ex = pm.getService('apiexceptionsv2')
VERSION = '2'
class OSAv2Delegate(GSAv2DelegateBase):
"""
Implements Slice Auth... | bsd-3-clause | -6,932,204,478,167,204,000 | 56.710345 | 185 | 0.626514 | false | 4.174954 | false | false | false |
basnijholt/holoviews | holoviews/plotting/mpl/stats.py | 2 | 9012 | from __future__ import absolute_import, division, unicode_literals
import param
import numpy as np
from ...core.ndmapping import sorted_context
from .chart import AreaPlot, ChartPlot
from .path import PolygonPlot
from .plot import AdjoinedPlot
class DistributionPlot(AreaPlot):
"""
DistributionPlot visualize... | bsd-3-clause | -968,219,761,285,584,400 | 38.526316 | 89 | 0.584776 | false | 3.998225 | false | false | false |
pywbem/pywbemtools | tests/unit/pywbemcli/test_general_options.py | 1 | 51717 | # (C) Copyright 2017 IBM Corp.
# (C) Copyright 2017 Inova Development 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-... | apache-2.0 | 3,847,651,963,122,165,000 | 34.989562 | 140 | 0.532243 | false | 3.905528 | true | false | false |
UC3MSocialRobots/novelty-detection-in-hri | helper files/print_ske.py | 2 | 6623 | import matplotlib.pyplot as plt
import user_data_loader as udl
import pandas as pd
# draw a vector
# retrieved from: http://stackoverflow.com/a/11156353/630598
from matplotlib.patches import FancyArrowPatch
from mpl_toolkits.mplot3d import proj3d
class Arrow3D(FancyArrowPatch):
def __init__(self, xs, ys, zs, *arg... | gpl-3.0 | 2,196,062,893,257,757,400 | 36.213483 | 119 | 0.62132 | false | 2.851055 | false | false | false |
ozamosi/river | river/river_config.py | 1 | 3430 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Example configuration file:
#
# <river>
# <save_dir>/home/username/mediafiles/</save_dir>
# <tmp_dir>/home/username/.cache/</tmp_dir>
# <frequency>900</frequency>
# <torrent_min_port>6881</torrent_min_port>
# <torrent_max_port>6889</torrent_max_port>
# <subscript... | mit | 6,888,649,270,208,728,000 | 42.974359 | 126 | 0.491254 | false | 4.319899 | true | false | false |
lotusronin/KronosEngine | editor/mapedit.py | 1 | 5921 | #!/usr/bin/python
# File: mapedit.py
from gi.repository import Gtk, Gdk, GdkPixbuf
import glob
import os
import objedit
import mapclass
import guimenus
import guisettings
"""
Map Editor To-Do:
[ ] Finish Implementing load() completely
[x] Allow Size change from the settings tab
[ ] Implement a deleteObj() to remove ... | mit | -6,695,502,109,059,992,000 | 30 | 178 | 0.694646 | false | 2.827603 | false | false | false |
ds283/splinter | python/splinter/function.py | 1 | 3024 | # This file is part of the SPLINTER library.
# Copyright (C) 2012 Bjarne Grimstad (bjarne.grimstad@gmail.com).
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from .... | mpl-2.0 | -2,170,392,254,961,193,700 | 34.576471 | 140 | 0.60119 | false | 3.424689 | false | false | false |
mykespb/jupyters | mp-nettemp3-fru-procwords.py | 1 | 2275 |
# coding: utf-8
# Mikhail Kolodin. Project: Internet temperature. 2015-12-15 1.4.1
#
# IPython research for internet temperature. We use now only fontanka.ru website, later other sites and methods will be added.
#
# Version with database recording. Now full archive of headers since 2000.
#
# Here we count good and... | mit | 8,704,815,894,330,187,000 | 16.234848 | 132 | 0.626374 | false | 2.829602 | false | false | false |
e-q/scipy | scipy/fft/tests/test_helper.py | 7 | 9706 | from scipy.fft._helper import next_fast_len, _init_nd_shape_and_axes
from numpy.testing import assert_equal, assert_array_equal
from pytest import raises as assert_raises
import pytest
import numpy as np
import sys
_5_smooth_numbers = [
2, 3, 4, 5, 6, 8, 9, 10,
2 * 3 * 5,
2**3 * 3**5,
2**3 * 3**3 * 5**... | bsd-3-clause | 3,495,092,704,956,647,400 | 31.680135 | 80 | 0.535957 | false | 3.25814 | true | false | false |
kbr/fritzconnection | fritzconnection/cli/fritzcall.py | 1 | 2320 | """
fritzcall.py
Module to inspect the FritzBox phone API.
CLI interface.
This module is part of the FritzConnection package.
https://github.com/kbr/fritzconnection
License: MIT (https://opensource.org/licenses/MIT)
Author: Klaus Bremer
"""
from ..lib.fritzcall import FritzCall
from . utils import get_cli_arguments,... | mit | -589,288,237,450,871,700 | 29.526316 | 70 | 0.590948 | false | 3.636364 | false | false | false |
simontakite/sysadmin | pythonscripts/webprogrammingwithpython/Working Files/Chapter 5/0505 mail.py | 1 | 1639 | import smtplib, imaplib, os
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
def read():
os.system("cls")
mailserver = imaplib.IMAP4_SSL('imap.gmail.com', 993)
username = 'simon.takite'
password = 'Ge6y56yzz'
mailserver.login(username, password)
status, count = mailse... | gpl-2.0 | -9,119,648,874,782,463,000 | 26.779661 | 66 | 0.633923 | false | 3.338086 | false | false | false |
vecnet/om | website/apps/ts_om/models.py | 1 | 7867 | # -*- coding: utf-8 -*-
#
# This file is part of the VecNet OpenMalaria Portal.
# For copyright and licensing information about this package, see the
# NOTICE.txt and LICENSE.txt files in its top-level directory; they are
# available at https://github.com/vecnet/om
#
# This Source Code Form is subject to the terms of t... | mpl-2.0 | 5,669,969,993,864,703,000 | 32.909483 | 122 | 0.671539 | false | 3.705605 | false | false | false |
atosorigin/ansible | test/units/cli/test_galaxy.py | 3 | 59248 | # -*- coding: utf-8 -*-
# (c) 2016, Adrian Likins <alikins@redhat.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at you... | gpl-3.0 | 2,857,005,778,036,833,300 | 42.50698 | 150 | 0.657829 | false | 3.628692 | true | false | false |
ACS-Community/ACS | LGPL/CommonSoftware/acssim/src/Acssim/Widgets/Method.py | 4 | 7014 | # @(#) $Id$
#
# Copyright (C) 2001
# Associated Universities, Inc. Washington DC, USA.
#
# Produced for the ALMA project
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as published by the Free
# Software Foundation; either version ... | lgpl-2.1 | 2,261,335,459,416,939,500 | 40.755952 | 85 | 0.470488 | false | 4.915207 | false | false | false |
mrcyberfighter/PyImaging | PyImaging/PyImaging/Files/infosstatsdialog.py | 1 | 30443 | #!/usr/bin/python
# -*- coding: utf-8 -*-
########################################################################
# #
# PyImaging an image treatment programme with severals effects. #
# And image files mergin capabilities. ... | gpl-3.0 | -4,052,856,531,994,109,000 | 68.825688 | 262 | 0.736458 | false | 3.267117 | false | false | false |
ardi69/pyload-0.4.10 | pyload/plugin/hook/DebridItaliaCom.py | 1 | 1097 | # -*- coding: utf-8 -*-
import re
from pyload.plugin.internal.MultiHook import MultiHook
class DebridItaliaCom(MultiHook):
__name = "DebridItaliaCom"
__type = "hook"
__version = "0.12"
__config = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
... | gpl-3.0 | 6,269,984,672,052,253,000 | 41.192308 | 108 | 0.477666 | false | 3.769759 | false | false | false |
joskid/tiote | tiote/views/start.py | 1 | 6932 | # Create your views here.
import json
from django.http import HttpResponse, HttpResponseRedirect
from django.template import loader, RequestContext, Template
from django.views.decorators.gzip import gzip_page
from django.conf import settings
from tiote import forms, utils, views, sql
@gzip_page
def index(request):
... | mit | -5,306,077,439,099,743,000 | 35.87766 | 139 | 0.595211 | false | 3.840443 | false | false | false |
mikehulluk/morphforge | src/morphforge/traces/operators/op_fixeddt_fixeddt.py | 1 | 4022 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | bsd-2-clause | -8,753,457,356,100,002,000 | 42.717391 | 94 | 0.677524 | false | 3.826832 | false | false | false |
google-research/python-graphs | python_graphs/program_graph_dataclasses.py | 1 | 2074 | # Copyright (C) 2021 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 5,710,017,893,654,058,000 | 24.292683 | 77 | 0.702989 | false | 3.485714 | false | false | false |
pkyad/libreERP | Employee/migrations/0001_initial.py | 2 | 4897 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import Employee.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
... | gpl-2.0 | -3,758,582,242,777,080,300 | 69.971014 | 330 | 0.60874 | false | 3.819813 | false | false | false |
dgouldin/myspaceid-python-sdk | samples/google-app-engine/oauth/consumer.py | 1 | 4219 | import cgi
import os
import logging
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
from google.appengine.api import urlfetch
import gmemsess
import ckeynsecret
from myspace.config.MySpaceError import MySpace... | apache-2.0 | 331,491,002,806,988,300 | 38.961165 | 114 | 0.626215 | false | 3.892066 | false | false | false |
fqez/JdeRobot | src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_graph.py | 18 | 3704 | """
MAVProxy realtime graphing module
uses lib/live_graph.py for display
"""
from pymavlink import mavutil
import re, os, sys
from MAVProxy.modules.lib import live_graph
from MAVProxy.modules.lib import mp_module
class GraphModule(mp_module.MPModule):
def __init__(self, mpstate):
super(GraphModule,... | gpl-3.0 | 2,119,586,600,837,024,800 | 31.208696 | 95 | 0.532397 | false | 3.944622 | false | false | false |
avolkov1/keras_experiments | src/keras_exp/multigpu/_multigpu.py | 1 | 13492 | '''
MODIFIED. Inspiration taken from the ref link below.
ref: https://raw.githubusercontent.com/kuza55/keras-extras/master/utils/multi_gpu.py
The inspirational one carried license:
Apache License
Version 2.0, January 2004
For further info refer to: https://github.com/kuza55/keras-extras
Also used https://githu... | unlicense | 6,721,267,844,913,414,000 | 38.450292 | 132 | 0.624666 | false | 3.906196 | false | false | false |
clay584/trigger_ammo | trigger.backup.all.devices.py | 1 | 5874 | from trigger.netdevices import NetDevices
import os
import pwd
import grp
import subprocess
import socket
from pysnmp.entity.rfc3413.oneliner import cmdgen
from pysnmp.proto import rfc1902
try:
#Pull in SNMP credentials from file
f = open('/etc/trigger/snmp_creds', 'r')
snmpCred = [list(map(str,line.rstrip('\n').s... | mit | -2,242,343,523,460,467,200 | 35.71875 | 176 | 0.678243 | false | 2.825397 | false | false | false |
lababidi/tweepy-streamer | streaming.py | 1 | 2703 | #!/usr/bin/python
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler, Stream
import datetime, os, errno, argparse, json
# grab twitter auth tokens from external file
from tokens import *
import time
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc: # Python >2.... | gpl-2.0 | -7,656,721,977,713,751,000 | 32.37037 | 88 | 0.606733 | false | 3.823197 | false | false | false |
lig/regme | regme/views.py | 1 | 1341 | from django.core.urlresolvers import reverse_lazy
from django.views.generic import FormView, TemplateView
from .forms import UserCreationForm, UserActivationForm
class RegisterView(FormView):
template_name = 'registration/register.html'
form_class = UserCreationForm
success_url = reverse_lazy('registered... | apache-2.0 | -4,384,241,710,902,396,000 | 25.294118 | 69 | 0.695004 | false | 3.756303 | false | false | false |
ForTozs/py3radar | pyradar/comparator/image_comparator.py | 1 | 7146 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2012 - 2013
# Matías Herranz <matiasherranz@gmail.com>
# Joaquín Tita <joaquintita@gmail.com>
#
# https://github.com/PyRadar/pyradar
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#... | lgpl-3.0 | -83,977,080,617,065,710 | 31.472727 | 79 | 0.581187 | false | 3.982163 | false | false | false |
mbauskar/omnitech-demo-erpnext | erpnext/setup/doctype/global_defaults/global_defaults.py | 55 | 2227 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
"""Global Defaults"""
import frappe
import frappe.defaults
from frappe.utils import cint
from frappe.custom.doctype.property_setter.property_setter impo... | agpl-3.0 | 8,889,649,739,319,591,000 | 34.349206 | 101 | 0.715312 | false | 3.199713 | false | false | false |
IBT-FMI/SAMRI | samri/plotting/tests/test_3D.py | 1 | 1477 | def test_stat3D_mask():
import samri.plotting.maps as maps
stat_map = '/usr/share/mouse-brain-templates/dsurqec_200micron_roi-dr.nii'
template = '/usr/share/mouse-brain-templates/dsurqec_40micron_masked.nii'
maps.stat3D(stat_map,
template=template,
save_as="_stat3D_mask.png",
show_plot=False,
threshold=0.... | gpl-3.0 | 869,953,470,516,178,600 | 29.770833 | 125 | 0.72241 | false | 2.359425 | false | false | false |
denisenkom/pytds | src/pytds/tds_types.py | 3 | 82687 | import itertools
import datetime
import decimal
import struct
import re
import uuid
import six
import functools
from io import StringIO, BytesIO
from pytds.tds_base import read_chunks
from . import tds_base
from .collate import ucs2_codec, raw_collation
from . import tz
_flt4_struct = struct.Struct('f')
_flt8_struct... | mit | -7,764,187,280,360,578,000 | 29.590825 | 117 | 0.595329 | false | 3.717272 | false | false | false |
brianshumate/uniweb | share/checksites.py | 1 | 1913 | #!/usr/bin/env python
# encoding: utf-8
"""
Uniweb validator project
checksites.py
Copyright (c) 2009 Brian Shumate
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including... | bsd-2-clause | 1,053,547,896,268,619,900 | 32 | 77 | 0.731835 | false | 3.936214 | false | false | false |
CGATOxford/proj029 | scripts/GSEAPreranked.py | 1 | 7278 | '''
GSEAPrepranked.py
==================
:Author: Nick Ilott
:Release: $Id$
:Date: |today|
:Tags: Python
Purpose
-------
.. Overall purpose and function of the script>
Perform gene set enrichment analysis on a pre-reanked list.
Usage
-----
.. Example use case
Example::
python GSEAPreranked.py
Type::
pyt... | bsd-3-clause | -3,343,443,768,864,656,400 | 29.708861 | 114 | 0.495466 | false | 3.796557 | false | false | false |
xmementoit/practiseSamples | python/notepad/notepad.py | 1 | 2646 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2019 damian <damian@damian-laptop>
#
# Distributed under terms of the MIT license.
"""
Python notepad
"""
from __future__ import print_function
import bisect
from itertools import *
from operator import *
values = [3,6,2,1,7,6,3,5]
pri... | apache-2.0 | -5,751,740,467,697,896,000 | 24.931373 | 99 | 0.423062 | false | 4.013657 | true | false | false |
gustavofonseca/inbox | frontdesk/migrations/0004_auto_20160923_1511.py | 4 | 1063 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-23 18:11
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
dependencies = [
('frontdesk', '0003_packagemember'),
... | bsd-2-clause | 9,019,728,074,120,655,000 | 32.21875 | 168 | 0.617121 | false | 3.937037 | false | false | false |
pviafore/AdventOfCode2016 | day2/challenge2/challenge2.py | 1 | 1339 | def parse_inputs():
with open("day2.txt") as in_file:
return in_file.read().split("\n")
def get_edges():
return [(0, 1), (1, 0), (2, -1), (3, 0), (4, 1), (-1, 2),
(5, 2), (0, 3), (4, 3), (1, 4), (3, 4), (2, 5)]
def is_valid(keypad):
return (keypad["x"], keypad["y"]) not in get_edges()... | mit | -2,855,582,612,999,573,000 | 26.895833 | 74 | 0.460045 | false | 2.662028 | false | false | false |
mongramosjr/best-deals | best_deal_sale/models/best_deal.py | 1 | 10063 | # -*- coding: utf-8 -*-
##############################################################################
#
# Discounts and Coupons Sales
# Authors: Dominador B. Ramos Jr. <mongramosjr@gmail.com>
# Company: 3D2N World (http://www.3d2nworld.com)
#
# Copyright 2016 Dominador B. Ramos Jr.
#
# Licensed under the Apa... | apache-2.0 | 1,821,334,533,951,533,600 | 43.924107 | 134 | 0.607572 | false | 3.661936 | false | false | false |
jjdmol/LOFAR | CEP/Calibration/BBSControl/scripts/tsolverquery.py | 1 | 5911 | #!/opt/local/bin/python
# This is a test python script for the SolverQuery class
#
# File: tSolverQuery.py
# Author: Sven Duscha (duscha@astron.nl)
# Date: 2010/07/21
# Last change 2010/10/06
import os
import sys
import SolverQuery as sq
import pylab as P # needed for histogram test
#*****************... | gpl-3.0 | -2,496,175,787,623,027,000 | 29.469072 | 204 | 0.644561 | false | 3.560843 | false | false | false |
Extent421/bladeBench | software/logReader/explore.py | 1 | 13874 | import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import urlparse
import os
import sys
import time
import json
import math
import numpy
from collections import OrderedDict
import shutil
sys.path.insert(0, os.path.abspath(".."))
from . import logReader
from . import chartBuilder
class handler... | mit | 8,715,062,986,203,211,000 | 31.799054 | 169 | 0.635794 | false | 2.990086 | false | false | false |
panoptes/PEAS | historical-data-fixer/data_preparer.py | 2 | 5614 | #!/usr/bin/python
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | mit | 7,148,282,605,958,867,000 | 32.416667 | 122 | 0.607766 | false | 3.515341 | false | false | false |
fos/fos-legacy | scratch/very_scratch/server/example5/websocketclient.py | 3 | 1808 | #!/usr/bin/env python
import socket
import threading
import config
class WebSocketClient(threading.Thread):
"""
A single connection (client) of the program
"""
def __init__(self, sock, addr, server):
threading.Thread.__init__(self)
self.s = sock
self.addr = addr
self.se... | bsd-3-clause | 2,118,198,909,626,014,000 | 27.25 | 249 | 0.566372 | false | 3.921909 | false | false | false |
chichan01/xbob.measure.idmeasure | setup.py | 1 | 2700 | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Chi ho CHAN <c.chan@surrey.ac.uk>
# Mon Oct 7 16:29 CEST 2013
# This file contains the python (distutils/setuptools) instructions so your
# package can be installed on **any** host system. It defines some basic
# information like the package name for instance, or... | gpl-3.0 | -4,341,993,900,255,617,000 | 39.298507 | 82 | 0.718148 | false | 4.103343 | false | false | false |
dhirajt/CodeChef-solutions | easy/primepalindrome/primepalindrome.py | 1 | 1329 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# started at: Sunday, 01. December 2013 12:58PM
import math
import sys
#import cProfile as profile
def gen_prime(number):
"""
Generates primes upto a number using sieve of
eratosthenes.
"""
primes = range(2, number+1)
for i in xrange(2, int(... | gpl-3.0 | -7,386,511,648,160,287,000 | 25.058824 | 73 | 0.51091 | false | 3.808023 | false | false | false |
windyuuy/opera | chromium/src/third_party/pefile/pefile.py | 5 | 148233 | # -*- coding: Latin-1 -*-
"""pefile, Portable Executable reader module
All the PE file basic structures are available with their default names
as attributes of the instance returned.
Processed elements such as the import table are made available with lowercase
names, to differentiate them from the upper case basic s... | bsd-3-clause | 5,261,396,656,000,430,000 | 36.892127 | 128 | 0.514346 | false | 4.263735 | false | false | false |
rrah/MuxControl | muxControl/devicethread.py | 1 | 2830 | #-------------------------------------------------------------------------------
# Name: devicethread
# Purpose:
#
# Author: Robert Walker
#
# Created: 10/11/2014
# Copyright: (c) Robert Walker 2014
# Licence: <your licence>
#------------------------------------------------------------------------... | gpl-3.0 | 217,750,972,089,941,380 | 35.753247 | 145 | 0.454417 | false | 4.938918 | false | false | false |
bretthandrews/marvin | python/marvin/api/plate.py | 1 | 5367 | #!/usr/bin/env python
# encoding: utf-8
# Created by Brian Cherinka on 2016-05-18 15:08:29
# Licensed under a 3-clause BSD license.
# Revision History:
# Initial Version: 2016-05-18 15:08:29 by Brian Cherinka
# Last Modified On: 2016-05-18 15:08:29 by Brian
from __future__ import print_function
from __futu... | bsd-3-clause | 1,246,993,592,227,162,000 | 32.12963 | 105 | 0.594746 | false | 3.776918 | true | false | false |
clubcapra/Ibex | src/capra_teleop/scripts/teleop.py | 1 | 6430 | #!/usr/bin/env python
PACKAGE_NAME = 'capra_teleop'
import roslib
roslib.load_manifest(PACKAGE_NAME)
import rospy
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Joy
import rospkg
import subprocess
try:
import pygame
pygame.init()
rospack = rospkg.RosPack()
pygame.mixer.music.load(ro... | gpl-3.0 | -7,970,032,375,862,296,000 | 24.927419 | 95 | 0.588647 | false | 3.407525 | false | false | false |
sayan801/indivo_server | indivo/tests/integration/test_modules/utils.py | 4 | 1162 | """
Utils for testing
"""
import copy
from lxml import etree
def assert_403(resp, message=""):
return assert_response_code(resp, 403, message)
def assert_200(resp, message=""):
return assert_response_code(resp, 200, message)
def assert_400(resp, message=""):
return assert_response_code(resp, 400, messa... | gpl-3.0 | 383,852,555,127,842,560 | 26.023256 | 137 | 0.673838 | false | 3.358382 | false | false | false |
RafaelNH/Reproduce-Hoy-et-al-2014 | code/functions.py | 2 | 29304 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------------
# Copyright (c) 2016, Rafael Neto Henriques
#
# Contributors : Rafael Neto Henriques (rafaelnh21@gmail.com)
# -------------------------------------------------------------------------
# References:
... | bsd-3-clause | -970,819,351,479,021,300 | 39.41931 | 79 | 0.584459 | false | 3.796839 | false | false | false |
lepture/flask-turbolinks | setup.py | 1 | 1157 | #!/usr/bin/env python
# coding: utf-8
try:
# python setup.py test
import multiprocessing
except ImportError:
pass
import flask_turbolinks
from setuptools import setup
def fread(filepath):
with open(filepath, 'r') as f:
return f.read()
setup(
name='Flask-Turbolinks',
version=flask_t... | bsd-3-clause | -4,867,184,726,735,464,000 | 25.295455 | 70 | 0.633535 | false | 3.856667 | false | false | false |
ankitshah009/Python_code_writtten_by_me | huff.py | 1 | 6445 | from heapq import heappush, heappop, heapify
from collections import defaultdict
import math
def encode(symb2freq):
"""Huffman encode the given dict mapping symbols to weights"""
heap = [[wt, [sym, ""]] for sym, wt in symb2freq.items()]
heapify(heap)
while len(heap) > 1:
lo = heappop(h... | apache-2.0 | -8,938,774,655,302,034,000 | 29.439024 | 67 | 0.599535 | false | 2.729776 | false | false | false |
NhanNguyenPropolife/demo-python-flask | __init__.py | 1 | 2407 | '''Flask Web Application'''
from flask import Flask, render_template, flash, request, url_for, redirect, session, escape
from custom_form import RegistrationForm, LoginForm
from db_controller import SQLEngine
from db_model import User
from util import encrypt_password
# App config.
DEBUG = True
APP = Flask(__name__)
A... | gpl-3.0 | 541,836,767,572,170,700 | 31.527027 | 96 | 0.611965 | false | 3.920195 | false | false | false |
IndigoDomotics/alexa-hue-bridge | Alexa-Hue Bridge.indigoPlugin/Contents/Server Plugin/discovery_logging.py | 1 | 2688 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#######################
#
# Alexa-Hue Bridge
# Note the "indigo" module is automatically imported and made available inside
# our global name space by the host process. We add it here so that the various
# Python IDEs will not show errors on each usage of the indigo modu... | unlicense | -1,167,595,552,248,957,000 | 37.956522 | 189 | 0.571801 | false | 4.618557 | false | false | false |
coddingtonbear/jirafs | jirafs/commands/clone.py | 1 | 1865 | import os
import re
import shutil
from urllib import parse
from jirafs import exceptions, utils
from jirafs.plugin import CommandPlugin
from jirafs.ticketfolder import TicketFolder
class Command(CommandPlugin):
""" Clone a new ticketfolder for the specified ticket URL"""
MIN_VERSION = "2.0.0"
MAX_VERSIO... | mit | -7,254,651,140,795,435,000 | 28.603175 | 86 | 0.612332 | false | 3.593449 | false | false | false |
Akuli/editor | porcupine/plugins/comment_block.py | 1 | 2428 | """
If you select multiple lines in a Python file and type '#', then all selected
lines are commented out.
A different character is used in other programming languages. This can be
configured with comment_prefix in filetypes.toml.
"""
from __future__ import annotations
import functools
import tkinter
from typing impo... | mit | -8,403,314,642,072,852,000 | 35.238806 | 111 | 0.665157 | false | 3.554905 | false | false | false |
wylee/django-arcutils | arcutils/cas/utils.py | 2 | 3976 | import posixpath
from operator import setitem
from urllib.parse import urlencode, urljoin
from django.core.urlresolvers import reverse
from arcutils.response import get_redirect_location
from arcutils.types.option import Some, Null
from .settings import settings
CAS_NS_MAP = {
'cas': 'http://www.yale.edu/tp/ca... | mit | 3,596,738,491,808,710,000 | 26.804196 | 72 | 0.638833 | false | 3.743879 | false | false | false |
rmed/zoe-tgbot | agents/tgbot/tgbot.py | 1 | 9059 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# zoe-tgbot - https://github.com/rmed/zoe-tgbot
#
# Copyright (c) 2016 Rafael Medina García <rafamedgar@gmail.com>
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation f... | mit | 1,032,375,345,448,187,300 | 33.310606 | 80 | 0.561272 | false | 4.134185 | false | false | false |
DiCarloLab-Delft/PycQED_py3 | pycqed/measurement/distortions/module_distortions.py | 1 | 8923 | """
module for distortion correction
"""
import matplotlib.pyplot as plt
import sys
sys.path.append("D:/Repository/PyCQED_py3")
import pycqed.measurement.kernel_functions_vector as kf
from pycqed.analysis import fitting_models as fit_mods
import numpy as np
from imp import reload
reload(kf)
"""
prepare the kernel to... | mit | -6,216,774,844,552,537,000 | 31.805147 | 88 | 0.629721 | false | 3.062114 | false | false | false |
markhuberty/indianpol | scrape_mplads.py | 1 | 4141 | import mechanize as m
import requests
import re
import unidecode
import time
form_url = 'http://mplads.nic.in/sslapps/mpladsworks/masterrep.ASP'
post_url = 'http://mplads.nic.in/sslapps/mpladsworks/Publicreports.ASP'
# Instantiate a browser, fake it as IE
br = m.Browser()
br.addheaders = [('User-agent',
... | mit | 639,004,090,551,723,800 | 33.22314 | 97 | 0.516059 | false | 3.607143 | false | false | false |
ianstalk/Flexget | flexget/components/estimate_release/estimate_release.py | 3 | 1085 | from loguru import logger
from flexget import plugin
from flexget.event import event
logger = logger.bind(name='est_released')
class EstimateRelease:
"""
Front-end for estimator plugins that estimate release times
for various things (series, movies).
"""
def estimate(self, entry):
"""
... | mit | -5,606,348,487,885,012,000 | 27.552632 | 99 | 0.636866 | false | 4.502075 | false | false | false |
apmzideas/BetterPollBot | src/setup.py | 1 | 4472 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from distutils.core import setup
import py2exe
import time
import os
import subprocess
# print nice messages
def LogPrint(Message, Type = "INFO"):
print("[{DateOfMessage}] - [{TypeOfMessage}] - "
"{Message}".format(
DateOfMessage = time.strftime("%d.%m... | gpl-2.0 | 8,970,473,025,581,707,000 | 34.492063 | 127 | 0.54517 | false | 4.133087 | false | false | false |
mbarbie1/DeepSlice | python/keras_small/test/test_bg_segmentation.py | 1 | 6748 | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 16 08:41:03 2018
@author: mbarbier
"""
""" Clear all variables """
from IPython import get_ipython
get_ipython().magic('reset -sf')
from module_utilities import writeData
from module_data import mergeLabelImage, loadImage, findFiles, convertRegionsToMasks, loadRegionsIm... | apache-2.0 | -4,976,035,132,381,808,000 | 33.433673 | 124 | 0.652638 | false | 3.210276 | false | false | false |
SUSE/azure-sdk-for-python | doc/generate_doc.py | 2 | 5351 | import argparse
import logging
import json
from pathlib import Path
CONFIG_FILE = '../swagger_to_sdk_config.json'
GENERATED_PACKAGES_LIST_FILE = 'autorest_generated_packages.rst'
_LOGGER = logging.getLogger(__name__)
def make_title(title):
"""Create a underlined title with the correct number of =."""
return ... | mit | -954,646,501,061,657,300 | 29.752874 | 123 | 0.603812 | false | 4.014254 | true | false | false |
Jeff-Tian/mybnb | Python27/Lib/distutils/tests/test_upload.py | 1 | 4092 | # -*- encoding: utf8 -*-
"""Tests for distutils.command.upload."""
import os
import unittest
from test.test_support import run_unittest
from distutils.command import upload as upload_mod
from distutils.command.upload import upload
from distutils.core import Distribution
from distutils.errors import DistutilsE... | apache-2.0 | 4,645,441,031,877,934,000 | 27.2 | 82 | 0.600294 | false | 3.816993 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.