repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
googleapis/googleapis-gen | google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/resources/types/keyword_plan_campaign_keyword.py | 1 | 2588 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 3,933,835,017,101,767,700 | 28.409091 | 95 | 0.63949 | false | 4.187702 | false | false | false |
ayrokid/yowsup | send.py | 1 | 1165 | from yowsup.demos import sendclient
#import logging #tampilan log khusus centos os
import MySQLdb
import MySQLdb.cursors
db = MySQLdb.connect(host="localhost", # your host, usually localhost
user="root", # your username
passwd="root", # your password
db="push",
cursorclass=MySQLdb.cursors.DictCursor) # name of the data... | gpl-3.0 | -5,198,567,450,660,308,000 | 28.125 | 96 | 0.670386 | false | 3.28169 | false | false | false |
trou/gdb-x86-sysutils | intel_sys_structs.py | 1 | 6572 | # Copyright 2015 - Raphaël Rigo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | gpl-2.0 | 5,077,701,676,599,962,000 | 34.907104 | 251 | 0.455943 | false | 3.238541 | false | false | false |
goerz/LPBS | LPBS/Config.py | 1 | 9634 | # -*- coding: utf-8 -*-
############################################################################
# Copyright (C) 2015 by Michael Goerz #
# http://michaelgoerz.net #
# ... | gpl-3.0 | 7,518,117,689,724,686,000 | 37.536 | 80 | 0.605148 | false | 3.856685 | true | false | false |
lupyuen/RaspberryPiImage | usr/share/pyshared/ajenti/plugins/fm/backend.py | 1 | 6269 | import grp
import logging
import os
import pwd
import re
import subprocess
import stat
import shutil
from datetime import datetime
from ajenti.api import *
from ajenti.util import str_fsize
from ajenti.plugins import manager
from ajenti.plugins.tasks.manager import TaskManager
from ajenti.plugins.tasks.tasks import Co... | apache-2.0 | -8,778,958,459,631,277,000 | 29.285024 | 92 | 0.535971 | false | 3.515984 | false | false | false |
layzerar/gospel | gospel/scripts/gossc.py | 1 | 8923 | # -*- coding: utf-8 -*-
import io
import operator
import os
import re
import sys
import signal
import tempfile
import subprocess
import argparse
try:
import psutil
except ImportError:
psutil = None
def _log_info(msg, **kwds):
if kwds:
msg = msg.format(**kwds)
sys.stdout.write(msg)
sys.st... | mit | 7,736,834,664,173,986,000 | 30.754448 | 77 | 0.545781 | false | 4.081885 | false | false | false |
kevinseelbach/generic_utils | src/generic_utils/json_utils.py | 1 | 7686 | """
Functions which support creating dicts (mappings) with interesting structures and simplify getting or setting
values which may be nested deeply within the object.
"""
from __future__ import absolute_import
# stdlib
import collections
def query_json_struct_from_path(json_struct, path):
"""
Query the json... | bsd-3-clause | -6,572,456,200,221,115,000 | 36.31068 | 109 | 0.63362 | false | 3.848773 | false | false | false |
WalrusCow/euler | Solutions/problem12.py | 1 | 1428 | # Project Euler Problem 12
# Created on: 2012-06-15
# Created by: William McDonald
import math
# Short list of prime numbers under 20
primeList = [2, 3, 5, 7, 9, 11, 13, 17, 19]
last = 21
# Returns True if n is prime, otherwise False
def isPrime(n):
prime = True
for i in primeList:
if n % i == 0:
... | mit | -6,129,487,564,086,719,000 | 20.636364 | 50 | 0.52381 | false | 3.070968 | false | false | false |
sgenoud/scikit-learn | sklearn/lda.py | 1 | 9466 | """
The :mod:`sklearn.lda` module implements Linear Discriminant Analysis (LDA).
"""
# Authors: Matthieu Perrot
# Mathieu Blondel
import warnings
import numpy as np
from scipy import linalg, ndimage
from .base import BaseEstimator, ClassifierMixin, TransformerMixin
from .utils.extmath import logsumexp
cla... | bsd-3-clause | -2,355,859,689,835,530,000 | 32.807143 | 79 | 0.553243 | false | 3.877919 | false | false | false |
abossi/42projects | api/app.py | 1 | 1356 | from flask import Flask, send_from_directory, jsonify, request
from flask_socketio import SocketIO
import settings
import os
app = Flask(__name__, static_url_path='')
socketio = SocketIO(app)
@app.route('/', methods=['GET'])
def home():
return send_from_directory('../front', 'index.html')
@app.route('/front/<pat... | mit | -6,426,062,721,653,113,000 | 27.270833 | 82 | 0.584808 | false | 3.777159 | false | false | false |
gotostack/neutron-lbaas | neutron_lbaas/drivers/haproxy/synchronous_namespace_driver.py | 1 | 26298 | # Copyright 2014-2015 Rackspace
#
# 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 agr... | apache-2.0 | 5,295,248,444,146,570,000 | 38.427286 | 79 | 0.599589 | false | 4.195597 | false | false | false |
hanteng/pyCHNadm1 | pyCHNadm1/02_converting_csv_pkl.py | 1 | 2853 | # -*- coding: utf-8 -*-
#歧視無邊,回頭是岸。鍵起鍵落,情真情幻。
import ConfigParser
Config = ConfigParser.ConfigParser()
Config.read("config.ini")
dir_src = Config.get("Directory",'source')
dir_out = Config.get("Directory",'outcome')
fn_suffix = Config.get("Filename",'suffix')
fn_datasrc= Config.get("Filename",'datasource')
fn_mappi... | gpl-3.0 | -2,508,967,665,729,506,300 | 27.938144 | 132 | 0.633773 | false | 2.686124 | true | false | false |
awsteiner/bamr | bamr_ex2.py | 1 | 3952 | # -------------------------------------------------------------------
#
# Copyright (C) 2020, Andrew W. Steiner and Sarah Wellence
#
# This file is part of bamr.
#
# bamr 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... | gpl-3.0 | 5,815,714,334,031,064,000 | 39.326531 | 71 | 0.541498 | false | 2.688435 | false | false | false |
GoWebyCMS/goweby-core-dev | blog/views.py | 1 | 2842 | from django.shortcuts import render, get_object_or_404
from django.views.generic import ListView
from itertools import chain
from django.core.paginator import Paginator, EmptyPage,PageNotAnInteger
from django.db.models import Count
from .forms import SearchForm
from .models import Post, Category, Tag
# Create your vi... | mit | -833,982,272,543,700,500 | 31.666667 | 105 | 0.607671 | false | 3.92 | false | false | false |
jamespcole/home-assistant | homeassistant/components/generic/camera.py | 1 | 5982 | """
Support for IP Cameras.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/camera.generic/
"""
import asyncio
import logging
import aiohttp
import async_timeout
import requests
from requests.auth import HTTPDigestAuth
import voluptuous as vol
from home... | apache-2.0 | 7,431,058,157,576,323,000 | 37.101911 | 79 | 0.636242 | false | 4.13407 | false | false | false |
3dfxsoftware/cbss-addons | report_aeroo/wizard/report_print_by_action.py | 1 | 2630 | ##############################################################################
#
# Copyright (c) 2008-2012 Alistek Ltd (http://www.alistek.com) All Rights Reserved.
# General contacts <info@alistek.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take th... | gpl-2.0 | -1,483,548,834,182,775,600 | 40.746032 | 126 | 0.637262 | false | 3.948949 | false | false | false |
whiteear/cloudbase-init | cloudbaseinit/tests/plugins/windows/test_winrmcertificateauth.py | 1 | 6477 | # Copyright 2013 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | 8,448,140,944,114,927,000 | 41.611842 | 78 | 0.630076 | false | 3.866866 | true | false | false |
SoFolichon/ISN-Twitter | src/lib/mttkinter.py | 1 | 9704 | """Thread-safe version of tkinter.
Copyright (c) 2014, Andrew Barnert
Based on mtTkinter (for Python 2.x), copyright (c) 2009, Allen B. Taylor
This module is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser Public License as published by
the Free Software Foundation, either v... | gpl-3.0 | 1,259,108,486,377,189,400 | 34.940741 | 105 | 0.613355 | false | 4.291906 | false | false | false |
JaneliaSciComp/osgpyplusplus | examples/rough_translated1/osgcubemap.py | 1 | 5601 | #!/bin/env python
# Automatically translated python version of
# OpenSceneGraph example program "osgcubemap"
# !!! This program will need manual tuning before it will work. !!!
import sys
from osgpypp import osg
from osgpypp import osgDB
from osgpypp import osgGA
from osgpypp import osgUtil
from osgpypp import osgV... | bsd-3-clause | -8,895,560,723,117,979,000 | 36.34 | 109 | 0.725763 | false | 3.562977 | false | false | false |
Crystal-SDS/dashboard | crystal_dashboard/dashboards/crystal/projects/groups/tables.py | 1 | 2270 | from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
from django.core.urlresolvers import reverse
from horizon import tables
from horizon import exceptions
from crystal_dashboard.api import projects as api
class MyFilterAction(tables.FilterAction):
name = "... | gpl-3.0 | 4,537,338,068,862,969,300 | 28.102564 | 94 | 0.634361 | false | 4.157509 | false | false | false |
enriquefynn/dwm-scripts | status_bar.py | 1 | 3351 | #!/usr/bin/env python
import json
import time
import urllib2
import re
from subprocess import call,check_output
redfg = '\x1b[38;5;196m'
bluefg = '\x1b[38;5;21m'
darkgreenfg = '\x1b[38;5;78m'
darkbluefg = '\x1b[38;5;74m'
winefg = '\x1b[38;5;118m'
yellowfg = '\x1b[38;5;226m'
redbg = '\x1b[48;5;196m'
greenbg = '\x1b[4... | bsd-3-clause | -1,261,675,721,522,088,000 | 27.887931 | 133 | 0.587586 | false | 2.820707 | false | false | false |
looooo/paraBEM | examples/vtk/vtk_cylinder_linear_dirichlet.py | 1 | 1537 | import numpy as np
import paraBEM
from paraBEM.pan2d import DirichletDoublet1Case2 as Case
from paraBEM.utils import check_path
from paraBEM.vtk_export import VtkWriter
# geometry
numpoints = 100
phi = np.linspace(0, 2 * np.pi, numpoints + 1)
x = np.cos(phi)[:-1]
y = np.sin(phi)[:-1]
xy = np.transpose(np.array([x, y])... | gpl-3.0 | -7,619,371,730,664,298,000 | 33.954545 | 90 | 0.676643 | false | 2.774368 | false | false | false |
solooboroten/fedora-livecd | imgcreate/kickstart.py | 1 | 20592 | #
# kickstart.py : Apply kickstart configuration to a system
#
# Copyright 2007, Red Hat 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; version 2 of the License.
#
# This program is dis... | gpl-2.0 | 1,327,125,252,375,814,700 | 32.924217 | 128 | 0.595037 | false | 3.898523 | true | false | false |
sergeneren/anima | anima/env/base.py | 1 | 17632 | # -*- coding: utf-8 -*-
# Copyright (c) 2012-2015, Anima Istanbul
#
# This module is part of anima-tools and is released under the BSD 2
# License: http://www.opensource.org/licenses/BSD-2-Clause
import os
from anima import logger, log_file_handler
from anima.recent import RecentFileManager
class EnvironmentBase(obj... | bsd-2-clause | -7,131,568,699,548,201,000 | 30.542039 | 80 | 0.609176 | false | 4.588082 | false | false | false |
Mankee/CS419 | wsgi/openshift/schedules/views.py | 1 | 2686 | import logging
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response, redirect
from django_cas.views import _service_url, _login_url
from models import CredentialsModel, Event
from... | apache-2.0 | -4,304,884,770,091,513,300 | 36.84507 | 112 | 0.702904 | false | 4.119632 | false | false | false |
bfalacerda/strands_executive | task_executor/scripts/example_add_cosafe_client.py | 2 | 3508 | #! /usr/bin/env python
import rospy
import actionlib
from actionlib_msgs.msg import GoalStatus
from strands_executive_msgs.msg import ExecutePolicyAction, ExecutePolicyFeedback, ExecutePolicyGoal, MdpStateVar, StringIntPair, StringTriple, MdpAction, MdpActionOutcome, MdpDomainSpec, MdpTask, Task
from strands_executiv... | mit | 7,696,492,989,779,846,000 | 37.141304 | 201 | 0.631129 | false | 3.525628 | false | false | false |
haracejacob/darknet-python-flask | app.py | 1 | 6131 | # -*- coding: utf-8 -*-
import os
from os.path import splitext, basename
import time
import datetime
import logging
import flask
import werkzeug
import optparse
import tornado.wsgi
import tornado.httpserver
from flask import jsonify
from PIL import Image
from PIL import ImageDraw
import cStringIO as StringIO
import ur... | mit | -8,258,458,316,918,674,000 | 32.502732 | 76 | 0.63709 | false | 3.554203 | false | false | false |
jdcald13/Winning_Texas_Holdem_Strategy | app/hand.py | 1 | 2626 | from app.deck import Deck
class Hand(Deck):
"""In real play we would also need to know the total number of players so that we could deal the cards out in the correct order. However, here we are only interested in our hand (we never fully know our
opponent's hand); which will later be compared to an opening ra... | mit | -5,951,038,077,747,133,000 | 54.87234 | 206 | 0.606626 | false | 3.254027 | false | false | false |
TomTranter/OpenPNM | openpnm/network/__init__.py | 1 | 5934 | r"""
**openpnm.network**
----
This module contains the ``GenericNetwork`` class, whose main purpose is to
manage the topological representation of the Network. It also houses a
collection of Network generators.
----
**Available Network Generators**
OpenPNM includes a variety of Network generators. The basically... | mit | 3,996,471,672,911,377,400 | 53.944444 | 79 | 0.454331 | false | 5.187063 | false | false | false |
ErenTD/Eren-s-Music-Bot | musicbot/playlist.py | 1 | 12272 | import os.path
import datetime
import traceback
from random import shuffle
from itertools import islice
from collections import deque
from urllib.error import URLError
from youtube_dl.utils import ExtractorError, DownloadError, UnsupportedError
from .utils import get_header
from .lib.event_emitter import EventEmitte... | mit | 4,468,694,328,803,419,600 | 36.644172 | 122 | 0.563233 | false | 4.371927 | false | false | false |
Pettythug/ForThisClass | assignment7/broker.py | 1 | 2885 | from network import Listener, Handler, poll
handlers = {} # map client handler to user name
names = {} # map name to handler
subs = {} # map tag to handlers
def broadcast(msg):
for h in handlers.keys():
h.do_send(msg)
class MyHandler(Handler):
count = 0;
def on_open(self):
handlers[sel... | mit | 3,542,157,346,691,514,000 | 35.987179 | 82 | 0.375737 | false | 5.402622 | false | false | false |
airanmehr/Scan | Libs/Util.py | 1 | 2178 | '''
Copyleft Mar 08, 2017 Arya Iranmehr, PhD Student, Bafna Lab, UC San Diego, Email: airanmehr@gmail.com
'''
import numpy as np;
np.set_printoptions(linewidth=200, precision=5, suppress=True)
import pandas as pd;
pd.options.display.max_rows = 20;
pd.options.display.expand_frame_repr = False
import seaborn as sns
im... | mit | 4,540,748,270,361,257,000 | 30.114286 | 148 | 0.68641 | false | 2.659341 | false | false | false |
ceibal-tatu/pygobject | gi/pygtkcompat.py | 1 | 14279 | # -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
# Copyright (C) 2011-2012 Johan Dahlin <johan@gnome.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Founda... | lgpl-2.1 | 8,445,934,827,913,439,000 | 30.451542 | 84 | 0.640101 | false | 3.571536 | false | false | false |
yunojuno/django-juno-testrunner | setup.py | 1 | 1383 | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-juno-testrunner',
version='0.4.1',
description='A ... | mit | 3,243,954,591,741,133,000 | 38.514286 | 117 | 0.610991 | false | 3.668435 | false | false | false |
HackLab-Almeria/clubpythonalm-taller-bots-telegram | 01-Chat Bot/Teclados - Api 2.0/Teclado1.py | 1 | 2361 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Ejemplo: Teclado Virtual 1 (Api 2.0)
Libreria: pyTelegramBotAPI 2.0 [ok]
Python: 3.5.1
"""
from telebot import types # Importamos el API correspondiente para usar teclados virtuales
import telebot
import sys
TOKEN='AQUÍ EL NUMERO DE VUESTRO TOKEN' # Identificador ... | mit | 6,601,520,652,176,615,000 | 36.854839 | 118 | 0.73285 | false | 2.59337 | false | false | false |
polyaxon/polyaxon | core/polyaxon/k8s/custom_resources/operation.py | 1 | 1229 | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | apache-2.0 | 1,260,142,692,166,638,600 | 28.261905 | 74 | 0.701383 | false | 3.668657 | false | false | false |
triump0870/RemindMeLater | src/profiles/migrations/0001_initial.py | 1 | 1204 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import uuid
class Migration(migrations.Migration):
dependencies = [
('authtools', '0003_auto_20160128_0912'),
]
operations = [
migrations.CreateModel... | mit | -7,514,481,914,761,045,000 | 34.411765 | 102 | 0.503322 | false | 4.816 | false | false | false |
brianhouse/housepy | osc.py | 1 | 3521 | #!/usr/bin/env python3
"""
Example:
import time
from osc import *
try:
address = sys.argv[1]
except:
address = "/hello/world"
try:
data = sys.argv[2]
except:
data = None
def message_handler(location, address, data):
print(location)
prin... | mit | -2,130,635,583,753,808,100 | 28.341667 | 112 | 0.550412 | false | 3.96063 | false | false | false |
mmpagani/oq-hazardlib | openquake/hazardlib/calc/hazard_curve.py | 1 | 5948 | # coding: utf-8
# The Hazard Library
# Copyright (C) 2012-2014, GEM Foundation
#
# 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 3 of the
# License, or (at your option) any... | agpl-3.0 | 7,406,639,656,955,995,000 | 43.646617 | 78 | 0.675312 | false | 3.683623 | false | false | false |
uai/VZI | 09/py/sorting.py | 1 | 1314 | # sorting some stuff 2
# https://www.youtube.com/watch?v=-xXvxj0SaQ4
import sys
import random
import time
# import timeit
# v pripade max. recursion limitu
# sys.setrecursionlimit(1500)
# viz. https://stackoverflow.com/questions/3323001/maximum-recursion-depth
nums = list()
n = 10
for i in range(0, n):
# print(... | bsd-3-clause | 6,548,840,141,799,127,000 | 17.507042 | 74 | 0.582953 | false | 3.006865 | false | false | false |
kartikshah1/Test | concept/views.py | 1 | 1365 | """
Views for Concept API
"""
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, get_object_or_404
from elearning_academy.permissions import InInstructorOrContentDeveloperMode
from courseware.permissions import IsOwner
from courseware.models import Concept
@login_require... | mit | -4,125,520,641,924,915,000 | 33.125 | 98 | 0.737729 | false | 3.945087 | false | false | false |
wavesoft/robob | robob/pipe/app.py | 1 | 1444 |
import shlex
from robob.pipe import PipeBase
class Pipe(PipeBase):
"""
Implementation of the application pipe item
"""
def configure(self, config):
"""
Configure cmdline
"""
# Prepare
self.binary = config['binary']
self.args = []
self.stdin = None
# Parse arguments
if 'args' in config:
if ... | apache-2.0 | 7,895,432,236,760,590,000 | 19.628571 | 89 | 0.639197 | false | 3.223214 | true | false | false |
ask/flakeplus | flakeplus/__init__.py | 1 | 7179 | # -*- coding: utf-8 -*-
"""Additional pyflakes"""
# :copyright: (c) 2012-2016 by Ask Solem.
# :license: BSD, see LICENSE for more details.
from __future__ import absolute_import
from __future__ import with_statement
VERSION = (1, 1, 0)
__version__ = '.'.join(map(str, VERSION[0:3])) + ''.join(VERSION[3:])
__author__ =... | bsd-3-clause | -723,099,010,128,184,200 | 30.765487 | 79 | 0.531411 | false | 3.620272 | false | false | false |
skosukhin/spack | var/spack/repos/builtin/packages/snbone/package.py | 1 | 2737 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -3,598,552,296,907,631,600 | 41.765625 | 79 | 0.620022 | false | 3.921203 | false | false | false |
timdiels/zeroinstall | zeroinstall/zerostore/cli.py | 1 | 7291 | """Code for the B{0store} command-line interface."""
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from zeroinstall import _
import sys, os
from zeroinstall.zerostore.manifest import verify, get_algorithm, copy_tree_with_verify
from zeroinstall import zerostore,... | lgpl-2.1 | -8,336,675,680,161,674,000 | 28.759184 | 186 | 0.667124 | false | 2.934004 | false | false | false |
polysquare/cmake-module-common | conanfile.py | 1 | 1305 | from conans import ConanFile
from conans.tools import download, unzip
import os
VERSION = "0.0.12"
class CMakeModuleCommonConan(ConanFile):
name = "cmake-module-common"
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
generators = "cmake"
url = "http://github.com/polysquare/cmake-module-co... | mit | 8,907,373,018,090,672,000 | 32.461538 | 73 | 0.574713 | false | 3.75 | false | false | false |
abhikeshav/ydk-py | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ipv4_telnet_cfg.py | 1 | 5518 | """ Cisco_IOS_XR_ipv4_telnet_cfg
This module contains a collection of YANG definitions
for Cisco IOS\-XR ipv4\-telnet package configuration.
This module contains definitions
for the following management objects\:
ipv6\-telnet\: IPv6 telnet configuration
ipv4\-telnet\: ipv4 telnet
Copyright (c) 2013\-2015 by Cis... | apache-2.0 | 1,648,462,373,414,770,000 | 26.04902 | 321 | 0.546756 | false | 3.399877 | true | false | false |
Marcdnd/electrum-cesc | plugins/qrscanner.py | 1 | 13378 | from electrum_cesc.util import print_error
from urlparse import urlparse, parse_qs
from PyQt4.QtGui import QPushButton, QMessageBox, QDialog, QVBoxLayout, QHBoxLayout, QGridLayout, QLabel, QLineEdit, QComboBox
from PyQt4.QtCore import Qt
from electrum_cesc.i18n import _
import re
import os
from electrum_cesc import Tr... | mit | 2,894,233,677,867,080,000 | 33.658031 | 165 | 0.5746 | false | 3.663198 | true | false | false |
OptimalPayments/Python_SDK | src/PythonNetBanxSDK/ThreeDSecure/EnrollmentChecks.py | 1 | 3265 | '''
Created on 18-Apr-2016
@author: Asawari.Vaidya
'''
from PythonNetBanxSDK.CardPayments.Card import Card
from PythonNetBanxSDK.common.DomainObject import DomainObject
from PythonNetBanxSDK.common.Error import Error
from PythonNetBanxSDK.common.Link import Link
class EnrollmentChecks(DomainObject):
def __i... | mit | 6,267,941,849,149,330,000 | 21.680556 | 63 | 0.515773 | false | 4.117276 | false | false | false |
Shatnerz/ringplus | ringplus/auth.py | 1 | 4820 | """OAuth2 handlers and some utility functions for RingPlus."""
from __future__ import print_function
import requests
from requests_oauthlib import OAuth2, OAuth2Session
from bs4 import BeautifulSoup
class OAuthHandler(object):
"""OAuth Authentication Handler.
OAuthHandler is used to simplify the OAuth2 a... | mit | -689,304,542,838,251,500 | 36.952756 | 78 | 0.636929 | false | 4.358047 | false | false | false |
jimsize/PySolFC | pysollib/games/wavemotion.py | 1 | 4084 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------##
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
# Copyright (C) 2005-2009 Skomoroh
#
# This program is free softwa... | gpl-3.0 | 563,173,693,865,608,500 | 31.15748 | 79 | 0.55142 | false | 3.542064 | false | false | false |
Mathew/psychoanalysis | psychoanalysis/apps/pa/migrations/0002_auto__del_participant.py | 1 | 7476 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Participant'
db.delete_table(u'pa_participant')
# Removing M2M table for field us... | mit | 6,745,956,246,311,314,000 | 60.286885 | 187 | 0.560059 | false | 3.686391 | false | false | false |
plum-umd/pasket | pasket/encoder.py | 1 | 48157 | import math
import cStringIO
import os
import copy as cp
from itertools import chain, ifilter, ifilterfalse
from functools import partial
import re
import operator as op
from string import Template as T
import logging
from lib.typecheck import *
import lib.const as C
from lib.enum import enum
import util
import sampl... | mit | -3,296,324,012,821,895,000 | 30.475163 | 95 | 0.578628 | false | 2.945202 | false | false | false |
cloudrain21/memcached-1 | testsuite/breakdancer/engine_test.py | 1 | 7385 | #!/usr/bin/env python
import os
import sys
import breakdancer
from breakdancer import Condition, Effect, Action, Driver
TESTKEY = 'testkey'
######################################################################
# Conditions
######################################################################
class ExistsConditio... | bsd-3-clause | -7,667,654,003,206,512,000 | 25.281139 | 121 | 0.53067 | false | 3.890938 | true | false | false |
artemix9/mlpy | mlpy.py | 1 | 2876 | # Copyright (C) 2016 Artem Kozlov. All rights reserved. Contacts: <artemix-dev@yandex.ru>
# Multilayer perceptron module for Python 3
from copy import deepcopy as new
import numpy as np
import json
class Neuron:
inputs = []
weights = []
output = 0.0
# The 'weights' variable must be a list of neuron ... | gpl-3.0 | 1,807,188,544,151,770,000 | 32.835294 | 142 | 0.567455 | false | 3.431981 | false | false | false |
ithinksw/philo | philo/signals.py | 1 | 2901 | from django.dispatch import Signal
#: Sent whenever an Entity subclass has been "prepared" -- that is, after the processing necessary to make :mod:`.AttributeProxyField`\ s work has been completed. This will fire after :obj:`django.db.models.signals.class_prepared`.
#:
#: Arguments that are sent with this signal:
#: ... | isc | 5,403,604,978,678,147,000 | 47.366667 | 405 | 0.725957 | false | 3.550796 | false | false | false |
beiko-lab/gengis | bin/Lib/site-packages/numpy/oldnumeric/fix_default_axis.py | 1 | 8326 | """
This module adds the default axis argument to code which did not specify it
for the functions where the default was changed in NumPy.
The functions changed are
add -1 ( all second argument)
======
nansum
nanmax
nanmin
nanargmax
nanargmin
argmax
argmin
compress 3
add 0
======
take 3
rep... | gpl-3.0 | -6,043,871,192,939,689,000 | 26.611684 | 78 | 0.490632 | false | 3.638986 | false | false | false |
jrichte43/ProjectEuler | Problem-0194/solutions.py | 1 | 1346 |
__problem_title__ = "Coloured Configurations"
__problem_url___ = "https://projecteuler.net/problem=194"
__problem_description__ = "Consider graphs built with the units A: and B: , where the units are " \
"glued along the vertical edges as in the graph . A configuration of " \
... | gpl-3.0 | -4,165,816,755,729,612,000 | 39.727273 | 100 | 0.540179 | false | 3.84 | false | false | false |
ThiefMaster/sqlalchemy | lib/sqlalchemy/dialects/postgresql/psycopg2.py | 1 | 26982 | # postgresql/psycopg2.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: postgresql+psycopg2
:name: psycopg2
:dbapi: psycopg2... | mit | 5,201,154,178,368,682,000 | 36.114168 | 85 | 0.641687 | false | 4.138978 | false | false | false |
bhaugen/nova | distribution/view_helpers.py | 1 | 28699 | from decimal import *
import datetime
from operator import attrgetter
from django.forms.formsets import formset_factory
from django.contrib.sites.models import Site
from models import *
from forms import *
try:
from notification import models as notification
except ImportError:
notification = None
def is_n... | mit | -3,354,612,000,780,010,000 | 35.327848 | 96 | 0.559671 | false | 3.705009 | false | false | false |
andela/codango | codango/resources/models.py | 1 | 1889 | from cloudinary.models import CloudinaryField
from community.models import Community
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
class Resource(models.Model):
LANGUAGE_TAGS = (
('PYTHON', 'Python'),
('RUBY', 'Ruby'),
... | mit | -2,677,900,237,199,745,000 | 31.016949 | 76 | 0.637374 | false | 3.762948 | false | false | false |
TribeMedia/synapse | synapse/storage/client_ips.py | 2 | 4803 | # -*- coding: utf-8 -*-
# Copyright 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | 1,665,801,080,157,915,600 | 32.124138 | 79 | 0.553196 | false | 3.845476 | false | false | false |
openspending/ckanext-budgets | ckanext/budgets/controllers.py | 1 | 2310 | import json
import ckan.plugins.toolkit as toolkit
import ckan.model
import pylons
import dateutil.parser
from budgetdatapackage import BudgetDataPackage, BudgetResource
import logging
log = logging.getLogger(__name__)
class BudgetDataPackageController(toolkit.BaseController):
def descriptor(self, id, resource_... | agpl-3.0 | 7,718,835,142,215,778,000 | 33.477612 | 72 | 0.608225 | false | 4.425287 | false | false | false |
yunify/qingcloud-cli | qingcloud/cli/iaas_client/actions/notification/verify_notification_item.py | 1 | 2163 | # =========================================================================
# Copyright 2012-present Yunify, Inc.
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the Licens... | apache-2.0 | -4,494,124,505,304,918,000 | 43.142857 | 98 | 0.585761 | false | 4.983871 | false | false | false |
EderSantana/seya | seya/layers/imageproc.py | 1 | 4991 | """Note: this code was modified from:
https://github.com/lpigou/Theano-3D-ConvNet/blob/master/LICENSE
by @lpigou and collaborators
"""
import numpy as np
import theano.tensor as T
import keras.backend as K
from keras.layers.core import Layer
class NormLayer(Layer):
""" Normalization layer """
def __init__(s... | bsd-3-clause | 2,430,868,583,431,697,400 | 32.952381 | 83 | 0.537167 | false | 3.519746 | false | false | false |
NMGRL/pychron | pychron/git/hosts/local.py | 1 | 1669 | # ===============================================================================
# Copyright 2019 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/LICE... | apache-2.0 | 922,089,579,292,431,400 | 32.38 | 85 | 0.59257 | false | 4.279487 | false | false | false |
cooldome/Nim-gdb | nim.py | 1 | 8490 |
import gdb
import re
#################################################################################################
##### Type pretty printers
#################################################################################################
class NimTypePrinter(gdb.types.TypePrinter):
"Nim type printer, one pr... | mit | -7,555,962,532,464,927,000 | 28.275862 | 141 | 0.538869 | false | 3.683297 | false | false | false |
shygiants/ChangeGAN | change-gan/change-gan/models/change_gan.py | 1 | 16146 | """ Contains the definition of the ChangeGAN architecture. """
import multiprocessing
import tensorflow as tf
from gan_utils import encoder, decoder, transformer, discriminator, preprocess_image
slim = tf.contrib.slim
default_image_size = 256
def model_fn(inputs_a, inputs_b, learning_rate, num_blocks=9, is_traini... | mit | 2,200,847,747,076,158,000 | 36.812646 | 132 | 0.565775 | false | 3.271733 | false | false | false |
wangzheng0822/algo | python/07_linkedlist/linked_list_algo.py | 1 | 2395 | """
1) Reverse singly-linked list
2) Detect cycle in a list
3) Merge two sorted lists
4) Remove nth node from the end
5) Find middle node
Author: Wenru
"""
from typing import Optional
class Node:
def __init__(self, data: int, next=None):
self.data = data
self._next =... | apache-2.0 | -448,324,623,278,686,500 | 24.445652 | 91 | 0.579667 | false | 3.407569 | false | false | false |
etale-cohomology/unicorns | activation_functions.py | 1 | 7428 | # Copyright (c) 2016, Diego Alonso Cortez, diego@mathisart.org
# Code released under the BSD 2-Clause License
# Inspired by: Michael Nielsen, Mocha
# http://neuralnetworksanddeeplearning.com
# https://github.com/pluskid/Mocha.jl
import numpy as np
import abc # Define "skeleton" classes that do nothing but ... | bsd-2-clause | -3,485,144,952,076,071,400 | 34.058252 | 99 | 0.655627 | false | 3.719579 | false | false | false |
TheDeverEric/noesis-importers | Eric Van Hoven/tex_AmericanChopper_csi.py | 1 | 1790 | #-------------------------------------------------------------------------------
# Name: American Chopper CSI Image (Tested with XBOX Only)
# Purpose: Import Texture
#
# Author: Eric Van Hoven
#
# Created: 07/07/2018
# Copyright: (c) Eric Van Hoven 2018
# Licence: <MIT License>
#-----... | mit | -7,782,279,928,896,052,000 | 27.344262 | 80 | 0.567039 | false | 3.173759 | false | false | false |
weapp/miner | shared/objectid.py | 1 | 9362 | # Copyright 2009-2014 MongoDB, 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 writin... | mit | -345,590,328,993,939,400 | 30.416107 | 80 | 0.579897 | false | 4.25739 | false | false | false |
wateraccounting/wa | Collect/RFE/monthly.py | 1 | 3465 | # -*- coding: utf-8 -*-
import sys
import pandas as pd
import calendar
import os
from DataAccess import DownloadData
import wa.General.data_conversions as DC
import wa.General.raster_conversions as RC
def main(Dir, Startdate='', Enddate='',
latlim=[-50, 50], lonlim=[-180, 180], cores=False, Waitbar = 1):
... | apache-2.0 | -4,120,924,246,631,314,000 | 38.827586 | 157 | 0.588745 | false | 3.434093 | false | false | false |
Zlopez/chess | chess/figures/queen.py | 1 | 4620 | """
Implementation of Bishop figure in chess command line client.
"""
import logging
import math
from . import figure
from ..board import Board
class Queen(figure.Figure):
"""
Queen figure for chess implementation.
"""
def _is_move_correct(self, x_index, y_index):
# Move x_index or y_... | gpl-3.0 | 5,723,919,041,787,688,000 | 33.222222 | 91 | 0.514069 | false | 3.32853 | true | false | false |
ad-m/django-teryt-tree | teryt_tree/dal_ext/views.py | 1 | 1263 | from dal import autocomplete
from teryt_tree.models import JednostkaAdministracyjna
class VoivodeshipAutocomplete(autocomplete.Select2QuerySetView):
def get_queryset(self):
qs = JednostkaAdministracyjna.objects.voivodeship().all()
if self.q:
qs = qs.filter(name__istartswith=self.q)
... | bsd-3-clause | -9,305,648,048,797,586 | 27.704545 | 66 | 0.637371 | false | 3.557746 | false | false | false |
pyfarm/pyfarm-agent | setup.py | 1 | 5292 | # No shebang line, this module is meant to be imported
#
# Copyright 2013 Oliver Palmer
#
# 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
#
# U... | apache-2.0 | 7,502,455,223,679,567,000 | 35.75 | 78 | 0.641723 | false | 3.66736 | false | false | false |
goodwillcoding/RIDE | src/robotide/editor/editors.py | 1 | 12638 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | 8,504,961,411,227,969,000 | 34.105556 | 94 | 0.630954 | false | 3.887419 | false | false | false |
ingenieroariel/inasafe | safe/engine/impact_functions_for_testing/BNPB_earthquake_guidelines.py | 1 | 5972 | """Impact function based on Padang 2009 post earthquake survey
This impact function estimates percentual damage to buildings as a
function of ground shaking measured in MMI.
Buildings are currently assumed to be represented in OpenStreetMap with
attributes collected as during the July 2011 Indonesian mapping competiti... | gpl-3.0 | -3,609,612,572,815,342,000 | 37.282051 | 79 | 0.534494 | false | 4.008054 | false | false | false |
TUM-LIS/faultify | analysis/optimization/matlab/viterbi/plotData.py | 1 | 17455 | import scipy.io
p1_1_0 = scipy.io.loadmat('manualOpt_fine_part1_snr0.mat')
p2_1_0 = scipy.io.loadmat('manualOpt_fine_snr0.mat')
p3_1_0 = scipy.io.loadmat('manualOpt_fine_part3_snr0.mat')
p1_2_0 = scipy.io.loadmat('manualOpt_fine_part1_FDRE_snr0.mat')
p2_2_0 = scipy.io.loadmat('manualOpt_fine_part2_FDRE_snr0.mat')
p3... | gpl-2.0 | 6,216,856,939,200,127,000 | 49.302594 | 167 | 0.662446 | false | 1.952898 | false | false | false |
z-Wind/Python_Challenge | Level14_spiralImg.py | 1 | 2358 | # http://www.pythonchallenge.com/pc/return/italy.html
__author__ = 'chihchieh.sun'
from PIL import Image
import urllib.request
from io import BytesIO
def getImg(url):
# User Name & Password
password_mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm()
top_level_url = 'http://www.pythonchalle... | mit | -8,320,253,825,786,456,000 | 28.623377 | 79 | 0.542409 | false | 3.208163 | false | false | false |
CCLab/sezam | apps/authority/urls.py | 1 | 2016 | """ authority urls
"""
#from django.conf import settings
from django.conf.urls import patterns, url
from haystack.query import SearchQuerySet
from haystack.views import SearchView
from apps.browser.forms import ModelSearchForm
urlpatterns = patterns('apps.authority.views',
# Both `display_authorities` and `search... | bsd-3-clause | -4,936,085,818,441,163,000 | 36.333333 | 80 | 0.636409 | false | 3.685558 | false | false | false |
kennedyshead/home-assistant | homeassistant/components/plum_lightpad/__init__.py | 1 | 2434 | """Support for Plum Lightpad devices."""
import logging
from aiohttp import ContentTypeError
from requests.exceptions import ConnectTimeout, HTTPError
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, EVENT_HOMEAS... | apache-2.0 | -6,322,286,563,704,237,000 | 28.325301 | 88 | 0.666393 | false | 4.056667 | true | false | false |
hunse/pytest | _pytest/pytester.py | 1 | 37858 | """ (disabled by default) support for testing pytest and pytest plugins. """
import gc
import sys
import traceback
import os
import codecs
import re
import time
import platform
from fnmatch import fnmatch
import subprocess
import py
import pytest
from py.builtin import print_
from _pytest.main import Session, EXIT_OK... | mit | 108,018,001,310,943,410 | 33.668498 | 82 | 0.580828 | false | 4.13613 | true | false | false |
Orhideous/nidhogg | tests/test_legacy.py | 1 | 5496 | from nidhogg.common.models import User
from nidhogg.common.utils import generate_token
from nidhogg.protocol.legacy import request as req
from nidhogg.protocol.legacy import exceptions as exc
from tests import BaseTestCase
class LegacyRequestTest(BaseTestCase):
def test_wrong_argument(self):
with self.as... | gpl-3.0 | 737,082,699,798,673,200 | 30.050847 | 76 | 0.586426 | false | 4.129226 | true | false | false |
jamesward-demo/air-quick-fix | AIRQuickFixServer/pyamf/remoting/gateway/django.py | 1 | 3714 | # Copyright (c) 2007-2008 The PyAMF Project.
# See LICENSE for details.
"""
Gateway for the Django framework.
This gateway allows you to expose functions in Django to AMF clients and
servers.
@see: U{Django homepage (external)<http://djangoproject.com>}
@author: U{Arnar Birgisson<mailto:arnarbi@gmail.com>}
@since:... | apache-2.0 | 8,034,444,590,400,092,000 | 29.195122 | 80 | 0.636241 | false | 4.122087 | false | false | false |
isaacyeaton/global-dyn-non-equil-gliding | Code/squirrel.py | 1 | 13697 | from __future__ import division
import numpy as np
from scipy import interpolate
import pandas as pd
def load_run(run_num, df):
"""Load in trial data.
Parameters
----------
run_num : int
Which run to load.
df : DataFrame
The DataFrame loaded from the original excel file.
Re... | mit | -4,676,687,735,099,849,000 | 23.458929 | 78 | 0.557494 | false | 2.9564 | false | false | false |
NLeSC/embodied-emotions-scripts | embem/debates/debates2csv.py | 1 | 4854 | #!/usr/bin/env python
# -.*- coding: utf-8 -.*-
"""Script to extract counts for words in word field.
Usage: debates2csv.py <xml-file or directory containing xml files>
2014-11-18 j.vanderzwaan@esciencecenter.nl
"""
import argparse
import xml.etree.ElementTree as ET
import re
from collections import Counter
import os
... | apache-2.0 | 807,590,557,542,389,000 | 43.127273 | 79 | 0.468892 | false | 3.452347 | false | false | false |
resync/resync | resync/hashes.py | 1 | 4083 | """util.py: A collection of utility functions for source and/or client."""
import base64
import hashlib
class Hashes(object):
"""Compute hash digests for ResourceSync.
These are all base64 encoded according to the rules of
http://www.ietf.org/rfc/rfc4648.txt
MD5
ResourceSync defined to be the s... | apache-2.0 | -3,536,747,152,276,613,000 | 34.198276 | 81 | 0.613764 | false | 3.884872 | false | false | false |
erigones/api_openvpn | exceptions.py | 1 | 2259 | from rest_framework.exceptions import APIException
from django.core.exceptions import ValidationError
from django.utils.encoding import force_text
def validate_only_one_instance(obj):
model = obj.__class__
if (model.objects.count() > 0 and
obj.id != model.objects.get().id):
raise Validatio... | bsd-3-clause | 8,523,195,803,407,811,000 | 29.540541 | 105 | 0.677291 | false | 4.122263 | false | false | false |
olegnev/dx-toolkit | src/python/dxpy/scripts/dx_build_app.py | 1 | 48240 | #!/usr/bin/env python
#
# Copyright (C) 2013-2015 DNAnexus, Inc.
#
# This file is part of dx-toolkit (DNAnexus platform client libraries).
#
# 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 a... | apache-2.0 | -4,026,534,068,323,847,000 | 49.197711 | 306 | 0.617081 | false | 3.940211 | false | false | false |
has2k1/plydata | plydata/eval.py | 1 | 7150 | # Credit: https://github.com/pydata/patsy
import __future__
import sys
import numbers
import inspect
from functools import lru_cache
__all__ = ["EvalEnvironment"]
def _all_future_flags():
flags = 0
for feature_name in __future__.all_feature_names:
feature = getattr(__future__, feature_name)
... | bsd-3-clause | 3,623,312,421,378,813,000 | 36.239583 | 79 | 0.599021 | false | 4.381127 | false | false | false |
kohout/djangocms-getaweb-products | djangocms_product/models.py | 1 | 10145 | # -*- coding: utf-8 -*-
from cms.models.pluginmodel import CMSPlugin
from cms.models.pagemodel import Page
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.translation import ugettext as _
from django.utils.timezone import utc
from easy_thumbna... | unlicense | -9,202,939,927,887,959,000 | 28.835294 | 78 | 0.616719 | false | 3.806379 | false | false | false |
totalgood/twote | twote/pw_model.py | 1 | 6558 | import datetime
from collections import Mapping
import peewee as pw
from playhouse.shortcuts import model_to_dict, dict_to_model
from playhouse.csv_utils import dump_csv
import pandas as pd
import gzip
from secrets import DB_NAME, DB_PASSWORD, DB_USER
import models
db = pw.SqliteDatabase('tweets.db')
psql_db = pw.Po... | mit | 8,448,318,166,340,821,000 | 36.261364 | 147 | 0.60735 | false | 3.510707 | false | false | false |
taedori81/shoop | shoop/admin/modules/products/__init__.py | 1 | 4165 | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from collections import Counter
fr... | agpl-3.0 | 4,579,189,671,847,036,400 | 37.564815 | 115 | 0.561345 | false | 4.035853 | false | false | false |
hpk42/numpyson | test_numpyson.py | 1 | 7235 | import datetime as dt
from functools import partial
import inspect
import pytest
import numpy as np
import pandas as pd
from pandas.util.testing import assert_index_equal, assert_series_equal, assert_frame_equal
from numpy.testing import assert_equal
assert_series_equal_strict = partial(assert_series_equal, check_dty... | mit | -594,982,396,743,412,500 | 33.617225 | 120 | 0.609399 | false | 2.962735 | true | false | false |
numberoverzero/finder | scripts/scraper_converter.py | 1 | 2574 | '''
Usage:
python scraper_converter.py scraped.db
Processes the cards scraped using the gatherer downloader and adds sane attributes fields for querying
(int pow/toughness, cmc) and saves the output to the app's database location.
Card attributes are saved according to finder.models.Card
'''
import os
import sqlso... | mit | -6,135,808,375,069,640,000 | 30.012048 | 102 | 0.635198 | false | 3.502041 | false | false | false |
chitr/neutron | neutron/agent/linux/pd.py | 1 | 14123 | # Copyright 2015 Cisco Systems
# 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... | apache-2.0 | 830,436,446,756,060,500 | 38.339833 | 78 | 0.553636 | false | 3.924146 | false | false | false |
voostar/WangWangExcavator | py2exe_script/TrapForBB.py | 1 | 6634 | #!
#--* coding=utf-8 *--
import urllib2
from bs4 import BeautifulSoup as bs
import base64
import subprocess
import re
import time
import logging
import os, sys
# Define
FILE_PATH = "./web_links.txt"
URLDICT = {
u"南宁市科技局": "http://www.nnst.gov.cn",
u"南宁市工信委": "http://219.159.80.227/info/infopen.h... | apache-2.0 | -5,009,635,365,505,735,000 | 29.636364 | 84 | 0.542478 | false | 2.887045 | false | false | false |
gen2brain/comic-utils | comicutils/gui.py | 1 | 13537 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import glob
import time
import shutil
try:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
except ImportError, err:
sys.stderr.write("Error: %s%s" % (str(err), os.linesep))
sys.exit(1)
try:
from comicutils.ui.cc_ui import Ui_... | gpl-3.0 | 3,185,777,950,968,541,000 | 37.240113 | 110 | 0.584915 | false | 3.898906 | false | false | false |
NuWro/nuwro | src/rew/validation/qel_ratio.py | 1 | 1176 | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
particles = ("numu", "numubar")
energies = (500, 1000, 1500)
mas = (800, 1000, 1200)
dyns = ("cc", "nc")
inpath = "qelma"
def plot(what):
with PdfPages("rew_val_qelma_ratio_{}.pdf".format(what)) as pdf:
... | gpl-3.0 | 3,190,528,384,730,777,000 | 33.617647 | 151 | 0.482143 | false | 3.531532 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.