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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ujiro99/auto_logger | logger/merge.py | 1 | 2373 | import fileinput
import os
import re
from datetime import datetime as dt
from logger import log
class Merge:
"""
Merge multiple log files.
"""
class Parsed:
"""
Parsed datetime and log line.
"""
def __init__(self, time=None, line=None):
self.time = time ... | mit | 8,957,099,488,283,862,000 | 26.917647 | 76 | 0.52381 | false | 3.742902 | false | false | false |
wmde/jenkins-job-builder | jenkins_jobs/modules/publishers.py | 1 | 140186 | # Copyright 2012 Hewlett-Packard Development Company, L.P.
# Copyright 2012 Varnish Software AS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | apache-2.0 | -4,559,542,569,043,464,700 | 40.622922 | 79 | 0.600895 | false | 4.133573 | true | false | false |
joshwalawender/POCS | pocs/focuser/focuser.py | 1 | 16806 | from .. import PanBase
from ..utils import images
from ..utils import current_time
import matplotlib
matplotlib.use('AGG')
import matplotlib.pyplot as plt
from astropy.modeling import models, fitting
import numpy as np
import os
from threading import Event, Thread
class AbstractFocuser(PanBase):
"""
Base... | mit | -576,820,583,751,011,800 | 41.872449 | 118 | 0.529751 | false | 4.636138 | false | false | false |
danielrenechaparro/Python | Clases.py | 1 | 4406 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Clases.py
#
# Copyright 2016 Daniel Rene <danielrenechaparro@openmailbox.org>
#
# 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 ... | gpl-3.0 | 7,002,834,793,237,624,000 | 28.178808 | 222 | 0.715161 | false | 2.684948 | false | false | false |
MartinPyka/Parametric-Anatomical-Modeling | pam/connection_mapping.py | 1 | 19453 | """This module contains the functions and classes needed for mapping points between layers"""
import logging
import mathutils
import random
import numpy
from .mesh import *
from .constants import *
logger = logging.getLogger(__package__)
def computePoint(v1, v2, v3, v4, x1, x2):
"""Interpolates point on a quad
... | gpl-2.0 | 2,615,298,735,748,952,000 | 37.370809 | 125 | 0.637331 | false | 2.675791 | false | false | false |
CroatianMeteorNetwork/CMN-codes | HMM_radio2txt/HMM_radio2txt.py | 1 | 1416 | # Copyright 2014 Denis Vida, denis.vida@gmail.com
# The HMM_radio2txt 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.
# The HMM_radio2txt is distributed in the hope that it will be
# useful, but W... | gpl-2.0 | 3,662,256,188,912,551,000 | 34.4 | 118 | 0.750706 | false | 3.38756 | false | false | false |
dstufft/potpie | potpie/pseudo/splitters.py | 1 | 5418 | # -*- coding: utf-8 -*-
import re
from polib import unescape
class ValidationError(Exception):
pass
class BaseValidator(object):
"""Base class for validators.
Implements the decorator pattern.
"""
def __init__(self, source_language=None, target_language=None, rule=None):
self.slang = ... | gpl-2.0 | 4,022,284,664,336,294,400 | 28.769231 | 82 | 0.591362 | false | 4.117021 | false | false | false |
spasmilo/electrum | scripts/authenticator.py | 1 | 11237 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at y... | gpl-3.0 | 6,965,951,914,015,369,000 | 30.47619 | 113 | 0.575331 | false | 4.119135 | false | false | false |
nschloe/quadpy | src/quadpy/t2/_dunavant/__init__.py | 1 | 2732 | import pathlib
from sympy import Rational as frac
from ...helpers import article
from .._helpers import T2Scheme, _read, register
source = article(
authors=["D.A. Dunavant"],
title="High Degree Efficient Symmetrical Gaussian Quadrature Rules for the Triangle",
journal="Article in International Journal fo... | mit | 5,399,588,959,320,617,000 | 19.984615 | 89 | 0.61327 | false | 2.625602 | false | false | false |
oswjk/py-mklink-wrapper | mklink.py | 1 | 2540 | """
A wrapper script for ln.exe to make it look like the MKLINK utility
found from Windows Vista onwards. To fully utilise this, you should
also have a batch script that should look something like this:
@ECHO OFF
python %~dp0mklink.py %*
Name the file "mklink.cmd" and put it in PATH. Now you can use the
fake ... | mit | 7,813,175,411,467,521,000 | 34.277778 | 95 | 0.688189 | false | 3.527778 | false | false | false |
openstack/octavia | octavia/common/utils.py | 1 | 5621 | # Copyright 2011, VMware, Inc., 2014 A10 Networks
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | -6,552,113,401,978,608,000 | 28.124352 | 78 | 0.652019 | false | 3.664276 | false | false | false |
ramunasd/mapgang | mapgang/metatile.py | 1 | 1671 | #!/usr/bin/python
import os
import struct
from cStringIO import StringIO
from mapgang.constants import METATILE, META_MAGIC
class MetaTile():
def __init__(self, style, x, y, z):
self.style = style
self.x = x
self.y = y
self.z = z
self.content = StringIO()
m2 = METAT... | lgpl-2.1 | 4,790,900,869,442,645,000 | 29.944444 | 91 | 0.552962 | false | 3.348697 | false | false | false |
hakril/PythonForWindows | windows/winproxy/apis/dbghelp.py | 1 | 8510 | import ctypes
import windows.generated_def as gdef
from windows.pycompat import int_types
from ..apiproxy import ApiProxy, NeededParameter
from ..error import fail_on_zero
class DbgHelpProxy(ApiProxy):
APIDLL = "dbghelp"
default_error_check = staticmethod(fail_on_zero)
# We keep the simple definition where c... | bsd-3-clause | 2,012,260,460,677,575,700 | 43.093264 | 191 | 0.809166 | false | 3.539933 | false | false | false |
hydroshare/hydroshare | hs_tracking/tests/test_dashboard.py | 1 | 3060 | from django.test import TestCase
from django.contrib.auth.models import Group
from hs_tracking.models import Variable
from hs_core import hydroshare
from rest_framework import status
import socket
from django.test import Client
class TestDashboard(TestCase):
def setUp(self):
self.hostname = socket.gethos... | bsd-3-clause | -1,793,111,076,543,336,400 | 30.875 | 89 | 0.603595 | false | 3.979194 | true | false | false |
vendelin8/serverApplet | main.py | 1 | 12324 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Main module of serverApplet.
# Copyright (C) 2015 Gergely Bódi
#
# 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, ... | gpl-2.0 | -7,590,797,168,447,875,000 | 44.472325 | 158 | 0.633368 | false | 4.27585 | false | false | false |
lduarte1991/edx-platform | common/lib/xmodule/xmodule/static_content.py | 1 | 6630 | # /usr/bin/env python
"""
This module has utility functions for gathering up the static content
that is defined by XModules and XModuleDescriptors (javascript and css)
"""
import errno
import hashlib
import logging
import os
import sys
from collections import defaultdict
from docopt import docopt
from path import Pat... | agpl-3.0 | 1,384,983,547,345,485,600 | 31.821782 | 96 | 0.641026 | false | 4.010889 | false | false | false |
thomasahle/numberlink | gen/grid.py | 1 | 4350 | def sign(x):
if x == 0:
return x
return -1 if x < 0 else 1
class UnionFind:
def __init__(self, initial=None):
self.uf = initial or {}
def union(self, a, b):
a_par, b_par = self.find(a), self.find(b)
self.uf[a_par] = b_par
def find(self, a):
if self.uf.get(... | agpl-3.0 | -1,240,742,716,527,753,000 | 33.173228 | 91 | 0.408295 | false | 3.129056 | false | false | false |
zoho/books-python-wrappers | books/parser/ChartOfAccountsParser.py | 1 | 5747 | #$Id$#
from books.model.ChartOfAccount import ChartOfAccount
from books.model.ChartOfAccountList import ChartOfAccountList
from books.model.TransactionList import TransactionList
from books.model.Transaction import Transaction
from books.model.PageContext import PageContext
class ChartOfAccountsParser:
"""This cl... | mit | 8,299,171,215,330,370,000 | 44.251969 | 80 | 0.652514 | false | 4.116762 | false | false | false |
brinkframework/brink | tests/test_fields.py | 1 | 3215 | from brink import fields, models
import pytest
class DummyModel(models.Model):
title = fields.CharField()
def test_field_treat():
field = fields.Field()
assert field.validate("val") == "val"
def test_field_validate_required():
field = fields.Field(required=True)
with pytest.raises(fields.Fiel... | bsd-3-clause | 2,837,641,944,071,696,400 | 22.467153 | 50 | 0.684292 | false | 3.742724 | true | false | false |
angr/cle | cle/utils.py | 1 | 3681 | import os
import contextlib
from .errors import CLEError, CLEFileNotFoundError
# https://code.woboq.org/userspace/glibc/include/libc-pointer-arith.h.html#43
def ALIGN_DOWN(base, size):
return base & -size
# https://code.woboq.org/userspace/glibc/include/libc-pointer-arith.h.html#50
def ALIGN_UP(base, size):
... | bsd-2-clause | 2,866,465,400,092,293,600 | 27.984252 | 165 | 0.573485 | false | 3.156947 | false | false | false |
dynamicy/FloodligtModule | apps/qos/qospath.py | 1 | 7564 | #! /usr/bin/python
"""
QoSPath.py ---------------------------------------------------------------------------------------------------
Developed By: Ryan Wallner (ryan.wallner1@marist.edu)
Add QoS to a specific path in the network. Utilized circuit pusher developed by KC Wang
[Note]
*circuitpusher.py is needed in the s... | apache-2.0 | -4,349,914,921,500,390,000 | 35.02381 | 119 | 0.593469 | false | 2.985004 | false | false | false |
JonathanSeguin/Mariana | setup.py | 1 | 2757 | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='Mariana',
... | apache-2.0 | 4,313,847,788,811,178,000 | 34.805195 | 98 | 0.660138 | false | 3.949857 | false | false | false |
yardstick17/GoogleCharts | preprocessing/get_data.py | 1 | 1216 | from random import randint
import pandas as pd
def read_rating_history_dump():
rating_df = pd.read_csv('GoogleChartsFlask/data/rating_history.csv')
data = list()
for index, row in rating_df.iterrows():
data.append((row[0], row[1], row[2]))
return data
def read_daily_rating_dump():
ratin... | mit | 2,226,139,648,123,469,800 | 33.742857 | 98 | 0.599507 | false | 2.916067 | false | false | false |
nbingham1/python-html | css.py | 1 | 2211 | from collections import OrderedDict
class Rgb:
def __init__(self, r = 0.0, g = 0.0, b = 0.0):
self.r = r
self.g = g
self.b = b
def rgba(self):
return "rgb({},{},{})".format(
max(0.0, min(1.0, self.r)),
max(0.0, min(1.0, self.g)),
max(0.0, min(1.0, self.b)))
def hex(self):
return "#{:02x}{:02x}{... | mit | -8,850,375,547,768,495,000 | 20.676471 | 56 | 0.565807 | false | 2.509648 | false | false | false |
nuagenetworks/tempest | tempest/tests/lib/test_decorators.py | 1 | 4381 | # Copyright 2013 IBM Corp
# Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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/LICENS... | apache-2.0 | -7,026,969,918,760,330,000 | 33.769841 | 79 | 0.617439 | false | 3.904635 | true | false | false |
suutari/shoop | shuup/default_tax/admin_module/views.py | 1 | 2508 | # This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django import forms
from django.utils.transla... | agpl-3.0 | -7,073,731,062,335,883,000 | 32 | 77 | 0.603668 | false | 3.987281 | false | false | false |
cournape/numscons | numscons/scons-local/scons-local-1.2.0/SCons/Platform/hpux.py | 1 | 1759 | """engine.SCons.Platform.hpux
Platform-specific initialization for HP-UX systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 200... | bsd-3-clause | 6,774,897,390,272,396,000 | 37.23913 | 89 | 0.761228 | false | 3.926339 | false | false | false |
wwrechard/pydlm | pydlm/access/_dlmGet.py | 1 | 5519 | """
===============================================================================
The code for all get methods
===============================================================================
"""
from numpy import dot
from pydlm.core._dlm import _dlm
class _dlmGet(_dlm):
""" The class containing all get metho... | bsd-3-clause | -5,919,468,780,384,474,000 | 37.326389 | 79 | 0.548831 | false | 4.591514 | false | false | false |
vineodd/PIMSim | GEM5Simulation/gem5/util/systemc/systemc_within_gem5/systemc_simple_object/SystemC_Example.py | 5 | 2697 | # Copyright 2018 Google, Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer;
# redistribu... | gpl-3.0 | -5,901,187,575,971,177,000 | 49.886792 | 78 | 0.763441 | false | 4.247244 | false | false | false |
oschumac/python-uart-pi-xbridge | BGReadings.py | 1 | 3925 | #!/usr/bin/python
import json
import socket
import sys
import time
import os
import array
import math
import sqlite3
import mongo
import db
import sensor
import xdriplib
WixelData = {"_id":0,"TransmitterId":"00000","CaptureDateTime":0,"RelativeTime":0,"ReceivedSignalStrength":0,"RawValue":0,"TransmissionId":0,"Batter... | mit | -7,661,033,420,010,583,000 | 31.983193 | 232 | 0.713885 | false | 2.909563 | false | false | false |
diegojromerolopez/djanban | src/djanban/apps/work_hours_packages/migrations/0001_initial.py | 1 | 2517 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-26 14:15
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('multiboards', '0004_auto_20170526_1615'),... | mit | -4,146,718,177,459,947,500 | 65.236842 | 224 | 0.657926 | false | 4.020767 | false | false | false |
coffeemakr/torweb | doc/conf.py | 1 | 8854 | # -*- coding: utf-8 -*-
#
# Torweb documentation build configuration file, created by
# sphinx-quickstart on Sun Jan 3 13:37:43 2016.
#
# 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.
#
# Al... | gpl-2.0 | 9,221,430,299,245,530,000 | 29.426117 | 79 | 0.69991 | false | 3.684561 | true | false | false |
cnobile2012/inventory | inventory/regions/admin.py | 1 | 3582 | # -*- coding: utf-8 -*-
#
# inventory/regions/admin.py
#
"""
Country, Language, and Timezone region admin.
"""
__docformat__ = "restructuredtext en"
from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from .models import Country, Subdivision, Language, TimeZone, Currency
from .form... | mit | -2,082,895,579,007,227,400 | 30.699115 | 75 | 0.56756 | false | 3.859914 | false | false | false |
brahle/fitmarket-python-api | setup.py | 1 | 3056 | # coding: utf-8
"""
Fitmarket
Mali broj ljudi - donori - dijele dnevna mjerenja svoje težine. Iz dnevne težine jednog donora određujemo vrijednosti dviju dionica: - dionica X ima vrijednost koja odgovara težini donora na taj dan. - inverzna dionica ~X ima vrijednost (150 kg - X). Primjetimo da: - kako X r... | apache-2.0 | -2,895,560,746,953,038,300 | 55.148148 | 880 | 0.735158 | false | 2.602575 | false | false | false |
Schevo/schevo | schevo/database2.py | 1 | 88861 | """Schevo database, format 2."""
# Copyright (c) 2001-2009 ElevenCraft Inc.
# See LICENSE for details.
import sys
from schevo.lib import optimize
import operator
import os
import random
try:
import louie
except ImportError:
# Dummy module.
class louie(object):
@staticmethod
def send(*arg... | mit | -3,918,668,678,691,859,500 | 43.209453 | 80 | 0.558569 | false | 4.261714 | false | false | false |
dalejung/nbx | nbx/nbmanager/tagged_gist/notebook_gisthub.py | 1 | 6300 | import github
import nbformat
from .gisthub import gisthub, _hashtags
import nbx.compat as compat
def parse_tags(desc):
# real tags and not system-like tags
tags = _hashtags(desc)
if '#notebook' in tags:
tags.remove('#notebook')
if '#inactive' in tags:
tags.remove('#inactive')
ret... | mit | 5,413,795,379,214,303,000 | 30.5 | 75 | 0.584127 | false | 3.915475 | false | false | false |
partofthething/home-assistant | homeassistant/components/plaato/config_flow.py | 2 | 7438 | """Config flow for Plaato."""
import logging
from pyplaato.plaato import PlaatoDeviceType
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_SCAN_INTERVAL, CONF_TOKEN, CONF_WEBHOOK_ID
from homeassistant.core impor... | mit | 1,609,999,554,006,146,000 | 32.35426 | 85 | 0.583625 | false | 3.998925 | true | false | false |
v-legoff/pa-poc1 | dc/yaml/connector.py | 1 | 8550 | # Copyright (c) 2012 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and ... | bsd-3-clause | -1,075,166,643,516,734,300 | 34.185185 | 79 | 0.598713 | false | 4.519027 | false | false | false |
tuzonghua/CloudBot | plugins/youtube.py | 1 | 5598 | import re
import time
import isodate
import requests
from cloudbot import hook
from cloudbot.util import timeformat
from cloudbot.util.formatting import pluralize
youtube_re = re.compile(r'(?:youtube.*?(?:v=|/v/)|youtu\.be/|yooouuutuuube.*?id=)([-_a-zA-Z0-9]+)', re.I)
base_url = 'https://www.googleapis.com/youtube... | gpl-3.0 | -2,821,733,049,324,311,000 | 32.321429 | 106 | 0.602358 | false | 3.413415 | false | false | false |
yhpeng-git/mxnet | docs/mxdoc.py | 1 | 9901 | """A sphnix-doc plugin to build mxnet docs"""
import subprocess
import re
import os
import json
from recommonmark import transform
import pypandoc
# start or end of a code block
_CODE_MARK = re.compile('^([ ]*)```([\w]*)')
# language names and the according file extensions and comment symbol
_LANGS = {'python' : ('py... | apache-2.0 | 6,479,518,435,546,730,000 | 34.360714 | 132 | 0.503888 | false | 3.520982 | false | false | false |
adampresley/trackathon | model/DateHelper.py | 1 | 2129 | from Service import Service
from datetime import tzinfo, timedelta, datetime
from dateutil import tz
class DateHelper(Service):
utc = tz.gettz("UTC")
pyToJsFormatMapping = {
"%m/%d/%Y": "MM/dd/yyyy",
"%d/%m/%Y": "dd/MM/yyyy",
"%Y-%m-%d": "yyyy-MM-dd"
}
def __init__(self, db, timezone = "UTC", dateFormat =... | mit | 6,435,613,590,564,856,000 | 24.058824 | 103 | 0.685298 | false | 2.973464 | false | false | false |
JmeHsieh/issue_aggregator | generate_url_list.py | 1 | 1184 | #!/usr/bin/env python3
import json
from subprocess import PIPE, Popen
from requests import get
repo_master_raw = 'https://raw.githubusercontent.com/g0v/awesome-g0v/master/'
readme = 'readme.md'
parser = 'parse.ls'
awesome_g0v = 'awesome-g0v.json'
outfile = 'url_list.json'
def get_source():
readme_url = repo_m... | mit | -4,816,565,584,934,220,000 | 23.666667 | 77 | 0.597128 | false | 3.148936 | false | false | false |
Pistachitos/Sick-Beard | sickbeard/history.py | 1 | 2727 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 Lice... | gpl-3.0 | 3,868,721,296,955,677,700 | 32.268293 | 132 | 0.703337 | false | 3.87358 | false | false | false |
meine-stadt-transparent/meine-stadt-transparent | mainapp/models/person.py | 1 | 1634 | from django.db import models
from django.urls import reverse
from django.utils.translation import gettext as _
from .helper import DefaultFields, DummyInterface
from .location import Location
class Person(DefaultFields, DummyInterface):
name = models.CharField(max_length=100)
given_name = models.CharField(ma... | mit | 1,775,969,022,176,492,000 | 31.68 | 116 | 0.638311 | false | 4.244156 | false | false | false |
quanticio/backupstore | backupstore/src/core/common/metaoperation.py | 1 | 14620 | # coding=utf8
'''
@author : quanticio44
@contact : quanticio44@gmail.com
@license : See with Quanticio44
@summary : metaoperation for rsync complete
@since : 22/08/2014
'''
#Standard package
import os
import hashlib
import zipfile
import tarfile
#Internal package
import backupstoredbfile
import to... | gpl-2.0 | -7,056,456,634,023,718,000 | 34.831234 | 158 | 0.5487 | false | 4.321608 | false | false | false |
zathras777/atavism | atavism/http11/cookies.py | 1 | 3542 | from datetime import datetime
def stripped_split(ss, c, n=-1):
return [p.strip() for p in ss.split(c, n)]
class Cookie(object):
def __init__(self, path=None, key=None, value=None, domain=None, expires=None, max_age=None, secure=False):
self.path = path
self.key = key
self.value = val... | unlicense | -4,666,415,880,981,012,000 | 27.111111 | 111 | 0.513552 | false | 3.812702 | false | false | false |
rafaelosoto/stream | {{cookiecutter.script_name}}/setup.py | 1 | 2382 | # -*- coding: utf-8 -*-
import re
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
REQUIRES = [
'docopt',
]
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = Tr... | mit | -7,396,378,709,102,490,000 | 28.775 | 95 | 0.594039 | false | 3.8112 | true | false | false |
m-ober/byceps | tests/api/tourney/match/comments/test_get_comments_for_match.py | 1 | 3509 | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import pytest
from byceps.services.tourney import (
match_comment_service as comment_service,
match_service,
)
def test_get_comments_for_match(
api_client, api_client_authz_header, match, comment
):
u... | bsd-3-clause | -1,295,547,686,589,896,400 | 31.192661 | 77 | 0.520946 | false | 3.839168 | true | false | false |
yaolei313/python-study | algorithm_study/region_merge.py | 1 | 3025 | # Definition for an interval.
class Interval:
def __init__(self, s=0, e=0):
self.start = s
self.end = e
def __str__(self):
return "[{},{}]".format(self.start, self.end)
class Solution:
def merge(self, intervals):
"""
:type intervals: List[Interval]
:rtype: ... | gpl-2.0 | 81,288,053,263,669,400 | 26.5 | 84 | 0.447603 | false | 3.538012 | false | false | false |
cloudera/ibis | ibis/backends/sqlite/client.py | 1 | 9430 | import errno
import functools
import inspect
import math
import os
from typing import Optional
import regex as re
import sqlalchemy as sa
import ibis.backends.base_sqlalchemy.alchemy as alch
from ibis.client import Database
from .compiler import SQLiteDialect
class SQLiteTable(alch.AlchemyTable):
pass
class ... | apache-2.0 | -6,957,263,060,061,383,000 | 21.613909 | 79 | 0.605408 | false | 3.89187 | false | false | false |
lakiw/cripts | cripts/core/s3_tools.py | 1 | 4177 | from django.conf import settings
from bson.objectid import ObjectId
import boto
from boto.s3.connection import S3Connection
from boto.s3.key import Key
class S3Error(Exception):
"""
Generic S3 Exception.
"""
pass
def s3_connector(bucket):
"""
Connect to an S3 bucket.
:param bucket: The b... | mit | 9,091,742,652,331,264,000 | 26.123377 | 83 | 0.629638 | false | 3.699734 | false | false | false |
geophysics/mtpy | mtpy/modeling/pek2d.py | 1 | 20327 | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 28 14:06:45 2014
@author: a1655681
"""
import mtpy.modeling.occam2d as o2d
import mtpy.modeling.pek1dclasses as p1dc
import numpy as np
import os
import os.path as op
import pek2dforward as p2d
import string
import scipy.interpolate as si
import mtpy.utils.filehandling as... | gpl-3.0 | 4,673,820,515,280,582,000 | 38.548638 | 125 | 0.513258 | false | 3.923374 | false | false | false |
calico/basenji | bin/basenji_bench_gtex.py | 1 | 7886 | #!/usr/bin/env python
# Copyright 2020 Calico LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agr... | apache-2.0 | -2,270,618,590,698,872,600 | 36.023474 | 86 | 0.591301 | false | 3.331643 | false | false | false |
yasoob/youtube-dl-GUI | Threads/Download.py | 1 | 6410 | import math
from pathlib import Path
import youtube_dl
from PyQt5 import QtCore
class StopError(Exception):
pass
class DownloadSignals(QtCore.QObject):
"Define the signals available from a running download thread"
status_bar_signal = QtCore.pyqtSignal(str)
remove_url_signal = QtCore.pyqtSignal(str... | mit | 7,824,562,817,449,066,000 | 31.538071 | 88 | 0.487676 | false | 4.138154 | false | false | false |
AcrDijon/henet | pelican/plugins/henet_comments.py | 1 | 1027 | # -*- coding: utf-8 -*-
import traceback
from pelican import signals
from henet.comments import ArticleThread
from henet.rst.rst2html import rst2html
# xxx read config
storage_dir = '/Users/tarek/Dev/github.com/acr-dijon.org/comments/'
# xxx cache
def add_comments(generator, content):
try:
# the artic... | apache-2.0 | 475,495,567,925,430,500 | 28.342857 | 73 | 0.666991 | false | 3.846442 | false | false | false |
stianpr/flask-oauthlib | tests/test_oauth2/test_code.py | 1 | 4530 | # coding: utf-8
from datetime import datetime, timedelta
from .base import TestCase
from .base import create_server, sqlalchemy_provider, cache_provider
from .base import db, Client, User, Grant
class TestDefaultProvider(TestCase):
def create_server(self):
create_server(self.app)
def prepare_data(se... | bsd-3-clause | 1,346,164,920,111,912,200 | 32.308824 | 77 | 0.601104 | false | 3.673966 | true | false | false |
TariqAHassan/ZeitSci | analysis/pubmed_postprocessing.py | 1 | 15935 | """
Clean the Pubmed Post Processing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dump obtained on: July 11, 2016 (double check).
Python 3.5
"""
import re
import os
import blaze
import numpy as np
import pandas as pd
from blaze import *
from copy import deepcopy
from collections import defaultdict
from collecti... | gpl-3.0 | -1,397,716,387,540,309,500 | 34.569196 | 128 | 0.577722 | false | 3.587348 | false | false | false |
ekorneechev/Connector | source/ctor.py | 1 | 22467 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import time, properties
from GLOBAL import *
from re import escape
try: import keyring
except Exception as error:
class Keyring:
def set_password(self, *args): pass
def get_password(self, *args): return ""
keyring = Keyring()
properties.log.warning... | gpl-2.0 | -4,469,510,885,947,356,700 | 46.831435 | 151 | 0.551243 | false | 3.118206 | false | false | false |
zbyte64/django-hyperadmin | hyperadmin/resources/storages/resources.py | 1 | 4161 | import os
from django.core.exceptions import ObjectDoesNotExist
from hyperadmin.links import Link
from hyperadmin.resources.crud import CRUDResource
from hyperadmin.resources.storages.forms import UploadForm, Base64UploadForm, UploadLinkForm
from hyperadmin.resources.storages.indexes import StorageIndex
from hyperadm... | bsd-3-clause | -3,845,229,485,147,536,400 | 33.106557 | 119 | 0.641192 | false | 4.012536 | false | false | false |
rajul/tvb-framework | tvb/adapters/uploaders/gifti/parser.py | 1 | 9083 | # -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Framework Package. This package holds all Data Management, and
# Web-UI helpful to run brain-simulations. To use it, you also need do download
# TheVirtualBrain-Scientific Package (for simulators). See content of the
# documentation-folder for more details. See also http:/... | gpl-2.0 | 4,596,486,521,529,889,300 | 40.479452 | 109 | 0.654519 | false | 3.711892 | false | false | false |
jarifibrahim/ashoka-dashboard | dashboard/migrations/0012_auto_20161210_1033.py | 1 | 3097 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-10 05:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0011_auto_20161209_2249'),
]
operations = [
migrations.AddFiel... | apache-2.0 | 2,860,983,926,016,569,000 | 49.770492 | 261 | 0.619309 | false | 4.213605 | false | false | false |
cdd1969/pygwa | lib/flowchart/nodes/n08_detectpeaks_v2/node_detectpeaks_v2.py | 1 | 11749 | #!/usr/bin python
# -*- coding: utf-8 -*-
from pyqtgraph import BusyCursor
from pyqtgraph.Qt import QtGui
import numpy as np
from lib.flowchart.nodes.generalNode import NodeWithCtrlWidget, NodeCtrlWidget
from lib.functions.general import isNumpyDatetime, isNumpyNumeric
from lib.functions.detectpeaks import full_peak_d... | gpl-2.0 | -2,258,799,015,408,088,600 | 68.064706 | 268 | 0.570224 | false | 3.50373 | false | false | false |
lfblogs/aio2py | aio2py/db/pool.py | 1 | 1541 | # -*- coding: UTF-8 -*-
__author__ = "Liu Fei"
__github__ = "http://github.com/lfblogs"
__all__ = [
"Pool"
]
"""
Define database connection pool
"""
import asyncio
import logging
try:
import aiomysql
except ImportError:
from aio2py.required import aiomysql
try:
import aiopg
except ImportError:
... | apache-2.0 | 8,201,426,354,376,966,000 | 23.09375 | 68 | 0.55743 | false | 3.558891 | false | false | false |
lpenz/omnilint | container/omnilint/checkers/ansibleplaybooks.py | 1 | 1902 | # Copyright (C) 2020 Leandro Lisboa Penz <lpenz@lpenz.org>
# This file is subject to the terms and conditions defined in
# file 'LICENSE', which is part of this source code package.
'''ansible playbook checker'''
import yaml
import subprocess
import re
from omnilint.error import Error
from omnilint.checkers import Ch... | mit | -1,433,899,188,108,483,600 | 29.677419 | 79 | 0.538381 | false | 4.207965 | false | false | false |
LCAV/pyroomacoustics | pyroomacoustics/denoise/__init__.py | 1 | 1165 | """
Single Channel Noise Reduction
==============================
Collection of single channel noise reduction (SCNR) algorithms for speech:
- :doc:`Spectral Subtraction <pyroomacoustics.denoise.spectral_subtraction>` [1]_
- :doc:`Subspace Approach <pyroomacoustics.denoise.subspace>` [2]_
- :doc:`Iterative Wiener Fil... | mit | -1,552,405,641,654,512,000 | 39.172414 | 109 | 0.712446 | false | 2.941919 | false | false | false |
klpdotorg/dubdubdub | ekstepbin/ProcessUsage.py | 1 | 1985 | import os
import json
import time
import sys
DeviceList = sys.argv[1] #this takes device list as argument
TagList = sys.argv[2] #this takes Tag list as argument
dir = os.path.dirname(__file__)
json_file = os.path.join(dir, '../datapull/ekstepv3data/data/ME_SESSION_SUMMARY.json')
output_file = os.path.join(dir, '../da... | mit | 340,299,390,527,681,540 | 37.921569 | 86 | 0.565239 | false | 3.286424 | false | false | false |
faylau/microblog | config.py | 1 | 1798 | #coding=utf-8
"""
该配置文件在__init__.py中读取
"""
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
"""
:summary:
"""
SCRF_ENABLED = True # 激活跨站点请求伪造保护
# SECRET_KEY配置仅仅当CSRF激活的时候才需要,建立一个加密的令牌用于验证表单。
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
... | apache-2.0 | -8,939,346,742,033,719,000 | 24.742424 | 73 | 0.592462 | false | 2.937716 | true | false | false |
Webcampak/cli | webcampak/core/wpakCapture.py | 1 | 22904 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2010-2016 Eurotechnia (support@webcampak.com)
# This file is part of the Webcampak project.
# Webcampak 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, e... | gpl-3.0 | -3,304,625,089,856,374,300 | 56.26 | 127 | 0.627925 | false | 4.621469 | true | false | false |
tjw/swift | utils/gyb_syntax_support/__init__.py | 1 | 3605 | import textwrap
from AttributeNodes import ATTRIBUTE_NODES
from CommonNodes import COMMON_NODES # noqa: I201
from DeclNodes import DECL_NODES # noqa: I201
from ExprNodes import EXPR_NODES # noqa: I201
from GenericNodes import GENERIC_NODES # noqa: I201
from PatternNodes import PATTERN_NODES # noqa: I201
from StmtN... | apache-2.0 | -4,316,504,402,919,193,600 | 34.343137 | 75 | 0.618863 | false | 3.562253 | false | false | false |
pythonpro-dev/pp-apiaccesstoken | pp/apiaccesstoken/middleware.py | 1 | 3860 | # -*- coding: utf-8 -*-
"""
"""
import logging
from pp.apiaccesstoken.tokenmanager import Manager
from pp.apiaccesstoken.tokenmanager import AccessTokenInvalid
from pp.apiaccesstoken.headers import WSGI_ENV_ACCESS_TOKEN_HEADER
def get_log(e=None):
return logging.getLogger("{0}.{1}".format(__name__, e) if e else ... | bsd-3-clause | -3,918,434,066,661,931,500 | 31.711864 | 79 | 0.594301 | false | 4.701583 | false | false | false |
boun-cmpe-soslab/drenaj | drenaj/drenaj_api/handlers/campaignshandler.py | 1 | 8934 | import bson.json_util
import tornado.ioloop
import tornado.web
from pymongo.errors import OperationFailure
from tornado import gen
from tornado.web import HTTPError
from tornado.web import MissingArgumentError
import drenaj_api.utils.drenajneo4jmanager as drenajneo4jmanager
class CampaignsHandler(tornado.web.Request... | mit | -2,630,529,231,603,231,000 | 46.269841 | 123 | 0.527871 | false | 4.303468 | false | false | false |
scott-s-douglas/SWAPR | SWAPRrubric.py | 1 | 10154 | from SWAPRsqlite import *
from itertools import groupby
def createRubricsTable(db):
db.cursor.execute("CREATE TABLE IF NOT EXISTS rubrics (labNumber int, itemIndex int, itemType text, itemValues text, graded boolean, itemPrompt text)")
def addRubricItem(db, labNumber, itemIndex, itemType, itemValues, graded, item... | gpl-2.0 | -4,788,761,156,601,311,000 | 85.786325 | 241 | 0.697065 | false | 3.655148 | false | false | false |
griddynamics/nova-billing | tests/__init__.py | 1 | 1989 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Nova Billing
# Copyright (C) GridDynamics Openstack Core Team, GridDynamics
#
# 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... | gpl-3.0 | 3,098,607,152,673,971,000 | 32.728814 | 74 | 0.646053 | false | 4.018182 | true | false | false |
science09/minitwi | app/minitwi.py | 1 | 6408 | #-*- coding:utf-8 -*-
import time
from hashlib import md5
from datetime import datetime
from flask import Flask, request, session, url_for, redirect, \
render_template, abort, g, flash
from werkzeug.security import check_password_hash, generate_password_hash
from models import *
PER_PAGE = 10
app = Flask(__name_... | mit | 8,190,148,019,333,539,000 | 36.255814 | 119 | 0.644351 | false | 3.649203 | false | false | false |
pybel/pybel | src/pybel/io/bel_commons_client.py | 1 | 3998 | # -*- coding: utf-8 -*-
"""Transport functions for `BEL Commons <https://github.com/bel-commons/bel-commons>`_.
BEL Commons is a free, open-source platform for hosting BEL content. Because it was originally
developed and published in an academic capacity at Fraunhofer SCAI, a public instance can be
found at https://b... | mit | -2,507,534,870,051,758,600 | 31.504065 | 101 | 0.670585 | false | 3.627949 | true | false | false |
SebastianSchildt/potatonet-power | gui/epod.py | 1 | 2803 | import urwid
from yesno import ConfirmButton
class ElectricityPodlet(object):
def __init__(self, name, nr):
self.name=name
self.nr=nr
self.PWRstate='off'
self.ETHstate='unknown'
self.buildGui()
def buildGui(self):
txt=urwid.Text(('nodehead', self.name), align='center')
#headline=urwid.Filler(txt,"midd... | mit | -2,659,397,285,443,749,000 | 30.144444 | 107 | 0.663932 | false | 2.619626 | false | false | false |
zeta709/django-coffee-capsules | coffee_capsules/forms.py | 1 | 2874 | from django import forms
from django.contrib.admin import widgets
#from django.forms.extras import SelectDateWidget
from coffee_capsules.models import Purchase, PurchaseItem, Request
from coffee_capsules.widgets import SelectedReadonly
class PurchaseForm(forms.ModelForm):
class Meta:
model = Purchase
... | bsd-3-clause | -2,064,641,096,433,153,300 | 36.324675 | 76 | 0.618302 | false | 4.214076 | false | false | false |
stephenlienharrell/WPEAR | wpear/DataConverter.py | 1 | 9026 | #! /usr/bin/env python
import os
import shlex
import shutil
import subprocess
import sys
WGRIB_PATH='./wgrib'
EGREP_PATH='egrep'
GREP_PATH='grep'
NCEP_GRID_TYPE=3
# http://www.nco.ncep.noaa.gov/pmb/docs/on388/tableb.html
class DataConverter:
FNULL=open(os.devnull, 'w')
def __init__(self, wgrib_path=WGRIB_... | gpl-3.0 | 3,493,325,894,899,479,600 | 54.374233 | 240 | 0.574008 | false | 3.616186 | false | false | false |
dgollub/pokealmanac | scripts/parse_pokeapi.py | 1 | 12145 | #!/usr/bin/env python
# encoding: utf-8
"""
Copyright (c) 2016 by Daniel Kurashige-Gollub <daniel@kurashige-gollub.de>
License MIT: see LICENSE file.
"""
"""
Download the API documentation for the PokeAPI.co site, parse it and
generate Swift structs/classes from it that allow us to easily
use the AP... | mit | 4,508,636,457,054,790,700 | 36.140673 | 185 | 0.573322 | false | 3.858005 | false | false | false |
kartikluke/yotube | googleapiclient/errors.py | 1 | 3516 | #!/usr/bin/python2.4
#
# Copyright (C) 2014 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 l... | mit | -440,186,985,566,424,600 | 24.114286 | 75 | 0.685438 | false | 3.959459 | false | false | false |
Bartzi/stn-ocr | datasets/fsns/tfrecord_utils/tfrecord_to_image.py | 1 | 2073 | import argparse
import csv
import os
import re
import numpy as np
import tensorflow as tf
from PIL import Image
FILENAME_PATTERN = re.compile(r'.+-(\d+)-of-(\d+)')
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='tool that takes tfrecord files and extracts all images + labels from it'... | gpl-3.0 | -3,318,274,954,810,785,300 | 38.113208 | 123 | 0.636276 | false | 3.701786 | false | false | false |
olysonek/tuned | tuned/plugins/plugin_bootloader.py | 1 | 12902 | from . import base
from .decorators import *
import tuned.logs
from . import exceptions
from tuned.utils.commands import commands
import tuned.consts as consts
import os
import re
import tempfile
log = tuned.logs.get()
class BootloaderPlugin(base.Plugin):
"""
Plugin for tuning bootloader options.
Currently only ... | gpl-2.0 | -48,616,862,515,739,710 | 36.61516 | 143 | 0.654782 | false | 2.690158 | false | false | false |
ajhager/copycat | copycat/coderack/codelets/bond.py | 1 | 10023 | # Copyright (c) 2007-2017 Joseph Hager.
#
# Copycat is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License,
# as published by the Free Software Foundation.
#
# Copycat is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; with... | gpl-2.0 | 1,317,708,017,138,761,200 | 40.589212 | 81 | 0.663474 | false | 4.171036 | false | false | false |
jwilliamn/handwritten | modeling/svm/mnist_helpers.py | 1 | 2813 | # Standard scientific Python imports
import matplotlib.pyplot as plt
from matplotlib.colors import Normalize
import numpy as np
def show_some_digits(images, targets, sample_size=24, title_text='Digit {}' ):
'''
Visualize random digits in a grid plot
images - array of flatten gidigs [:,784]
targets - fi... | gpl-3.0 | 1,047,688,784,952,043,300 | 32.105882 | 85 | 0.648774 | false | 3.477132 | false | false | false |
bw57899/aws-command-line-cli | ec2.export.csv.py | 1 | 1212 | #!/usr/bin/env python
# Based on the script found here: http://cloudbuzz.wordpress.com/2011/02/15/336/
import boto.ec2
csv_file = open('instances.csv','w+')
def process_instance_list(connection):
map(build_instance_list,connection.get_all_instances())
def build_instance_list(reservation):
map(write_instances,r... | gpl-2.0 | 4,554,851,283,583,734,000 | 36.875 | 160 | 0.735974 | false | 3.284553 | false | false | false |
yuvipanda/edit-stats | dmz/store.py | 1 | 3209 | """Implements a db backed storage area for intermediate results"""
import sqlite3
class Store(object):
"""
Represents an sqlite3 backed storage area that's vaguely key value
modeled for intermediate storage about metadata / data for metrics
about multiple wikis that have some underlying country relate... | mit | 910,942,427,203,685,800 | 38.134146 | 111 | 0.587722 | false | 4.051768 | false | false | false |
jskye/car-classifier-research | src/hyp.verification.tools/py/test/test.py | 1 | 3773 | __author__ = 'juliusskye'
import os, sys
sys.path.append('..')
from py.Rectangle import Rectangle
from py.CompareRectangles import CompareRectangles
# things = [0,1,2,3,4,5]
# for thing in things:
#
# if thing>2:
# print(str(thing) + ' is greater than two')
# break
# else: 'no things greater t... | mit | 3,068,737,828,676,781,600 | 33.614679 | 132 | 0.708985 | false | 3.032958 | false | false | false |
DayGitH/Family-Tree | node.py | 1 | 3177 | from PySide import QtCore, QtGui
import sys
class Actor(QtGui.QGraphicsWidget):
nick_name = ''
real_name = ''
gender = ''
bday = ''
age = ''
marital = ''
children = ''
death = ''
important = False
notes = ''
def __init__(self, nick_name, real_name, gender, bday, age, marital... | cc0-1.0 | 5,410,718,640,994,726,000 | 30.78 | 121 | 0.56972 | false | 3.491209 | false | false | false |
9468305/script | geetest_offline/geetest_offline_gd.py | 1 | 12177 | #!/usr/local/bin/python3
# -*- coding: utf-8 -*-
'''
geetest offline 6.0.0 spider for gd.gsxt.org.cn
'''
import os
import time
import random
import logging
from logging import NullHandler
import json
import requests
import execjs
from bs4 import BeautifulSoup
import constants
import util
logging... | mit | -263,166,151,455,258,660 | 30.441096 | 85 | 0.556119 | false | 3.440151 | false | false | false |
HugoMMRabson/fonsa | src/my/installer/copyintomaple/atxraspisettings.py | 1 | 6164 | #!/usr/bin/python3
'''
Created on Aug 18, 2019
@author: johnrabsonjr
'''
import os
from queue import Queue
import sys
import time
import RPi.GPIO as GPIO # @UnresolvedImport
REBOOTPULSEMINIMUM = None
REBOOTPULSEMAXIMUM = None
SHUT_DOWN = None
BOOTOK = None
ATXRASPI_SOFTBTN = None
FACTORYRESET = None
GREEN22 = N... | gpl-3.0 | 1,488,395,012,073,988,600 | 31.442105 | 164 | 0.571544 | false | 3.310419 | false | false | false |
scieloorg/journals-catalog | jcatalog/reports/fapesp_evaluation_line.py | 1 | 43533 | # coding: utf-8
import pyexcel
import xlsxwriter
import models
import re
import datetime
from accent_remover import *
def formatindicator(indicator):
data = indicator
if type(indicator) == str:
if '.' in indicator and '>' not in indicator:
data = float(indicator)
return data
def f... | bsd-2-clause | -1,299,251,792,692,191,500 | 35.709705 | 93 | 0.407071 | false | 4.093056 | false | false | false |
spaus/pysandbox | sqltests.py | 1 | 2443 | import os
import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
class Person(Base):
__tablename__ ... | mit | -8,484,875,581,494,622,000 | 34.42029 | 76 | 0.722882 | false | 4.147708 | false | false | false |
diacritica/bokzuyXMPPbot | bokzuy_bot.py | 1 | 5842 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
bokzuyXMPPbot: Your dummy XMPP bot for Bokzuy.com
Copyright (C) 2012 Pablo Ruiz Múzquiz
See the file LICENSE for copying permission.
"""
import sys
import logging
import getpass
import json
import sleekxmpp
import requests
from optparse import OptionPar... | gpl-2.0 | -1,316,866,664,008,892,200 | 31.270718 | 79 | 0.564287 | false | 3.744231 | false | false | false |
alexey-grom/django-userflow | userflow/views/verify/request.py | 1 | 1109 | # encoding: utf-8
from django.http.response import HttpResponseRedirect, Http404
from django.views.generic.detail import DetailView
from userflow.models import UserEmail
class RequestConfirmEmailView(DetailView):
model = UserEmail
def get_queryset(self):
return super(RequestConfirmEmailView, self).... | mit | 1,387,404,666,578,132,700 | 33.65625 | 77 | 0.655546 | false | 4.60166 | false | false | false |
tensorflow/tensor2tensor | tensor2tensor/utils/flags.py | 1 | 6431 | # coding=utf-8
# Copyright 2021 The Tensor2Tensor Authors.
#
# 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 | -5,781,691,177,619,446,000 | 50.862903 | 80 | 0.636759 | false | 4.149032 | false | false | false |
mkuron/espresso | src/config/check_myconfig.py | 1 | 3768 | # Copyright (C) 2010-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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 v... | gpl-3.0 | 4,629,193,591,994,059,000 | 28.904762 | 87 | 0.57776 | false | 3.619597 | false | false | false |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/lettuce/django/apps.py | 1 | 3009 | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org>
#
# 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 Foundatio... | agpl-3.0 | -8,298,065,788,740,383,000 | 34.388235 | 98 | 0.691822 | false | 3.686275 | false | false | false |
rjdp/cement | cement/ext/ext_dummy.py | 1 | 6538 | """Dummy Framework Extension"""
from ..core import backend, output, handler, mail
from ..utils.misc import minimal_logger
LOG = minimal_logger(__name__)
class DummyOutputHandler(output.CementOutputHandler):
"""
This class is an internal implementation of the
:ref:`IOutput <cement.core.output>` interfac... | bsd-3-clause | 3,786,560,060,303,839,700 | 28.318386 | 78 | 0.547568 | false | 4.349967 | true | false | false |
nloyolag/music-albums | music_albums/migrations/0001_initial.py | 1 | 2519 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-21 20:52
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Creat... | mit | -5,822,098,756,944,028,000 | 40.483333 | 180 | 0.540779 | false | 3.950794 | false | false | false |
smileboywtu/Code-Interview | combination.py | 1 | 1331 | # list all the combination using recursive method
# use python 3.5 as default
"""
c(4, 2):
{1,2,3,4}
/ | \\
/ | \\
1{2,3,4} 2{3,4} 3{4}
/ ... | gpl-2.0 | 6,553,644,880,663,066,000 | 25.098039 | 80 | 0.449286 | false | 3.770538 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.