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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pombreda/https-gitorious.org-appstream-software-center | softwarecenter/backend/channel.py | 1 | 12578 | # Copyright (C) 2010 Canonical
#
# Authors:
# Gary Lasker
# Michael Vogt
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; version 3.
#
# This program is distributed in the hope that it will b... | gpl-3.0 | 6,576,376,662,612,633,000 | 33.938889 | 79 | 0.591827 | false | 4.356772 | false | false | false |
mteule/StationMeteo | messy-doc/StationMeteo.Diagram/StationMeteo.Diagram.py | 1 | 1485 | class Sensor :
'''
https://www.google.fr/#q=NVARCHAR+encodage+mysql
https://stackoverflow.com/questions/612430/when-must-we-use-nvarchar-nchar-instead-of-varchar-char-in-sql-servers
Nvarchar ne sert que pour les utilisateurs MS-SQL. '''
def __init__(self) :
pass
class Station :
'''(NULL)'''
def __init__(self) :
... | mit | -8,164,009,308,065,374,000 | 26 | 113 | 0.665993 | false | 2.855769 | false | false | false |
ppwwyyxx/tensorflow | tensorflow/python/ops/array_ops.py | 1 | 192961 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,979,389,566,144,273,000 | 34.926457 | 129 | 0.608781 | false | 3.381069 | false | false | false |
FKlama/hycud | REMO.py | 1 | 2344 | # HYCUD
# Copyright (C) 2014 Klama, Nina Alexandra and Rezaei-Ghaleh, Nasrollah
#
# This file is part of HYCUD.
#
# HYCUD 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
# (... | gpl-3.0 | -9,100,186,542,631,282,000 | 32.971014 | 95 | 0.680461 | false | 3.197817 | false | false | false |
rwth-ti/gr-ofdm | python/ofdm/qa_freqshift.py | 1 | 13032 | #!/usr/bin/env python
#
# Copyright 2014 Institute for Theoretical Information Technology,
# RWTH Aachen University
# www.ti.rwth-aachen.de
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | gpl-3.0 | 5,002,455,819,893,132,000 | 30.708029 | 81 | 0.607812 | false | 2.79297 | true | false | false |
keishi/chromium | chrome/test/pyautolib/remote_inspector_client.py | 1 | 39894 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Chrome remote inspector utility for pyauto tests.
This script provides a python interface that acts as a front-end for Chrome's... | bsd-3-clause | 7,801,864,265,520,846,000 | 37.694471 | 80 | 0.657643 | false | 4.253092 | false | false | false |
jgehring/Laudio | laudio/src/song/formats/mp3.py | 1 | 2091 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
"""
Laudio - A webbased musicplayer
Copyright (C) 2010 Bernhard Posselt, bernhard.posselt@gmx.at
Laudio 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 ... | gpl-3.0 | 3,334,994,844,228,916,000 | 34.440678 | 84 | 0.634146 | false | 3.84375 | false | false | false |
Wopple/fimbulvetr | src/client/mapmode_c.py | 1 | 3743 | import os
import sys
import pygame
from pygame.locals import *
from common import mvc
from common.constants import *
from client.constants import *
class Controller(mvc.Controller):
def __init__(self, model=None, screen=None):
super(Controller, self).__init__()
self.shift = [False, False... | bsd-3-clause | 4,532,720,471,375,591,000 | 40.131868 | 65 | 0.40716 | false | 4.509639 | false | false | false |
asenovm/book-search-server | crawler/chitanka_crawler_get_books_list.py | 1 | 3790 | import requests
import time
import os
import sqlite3
def init_make_request():
global conn
global last_hour
global last_minute
global queries_for_last_minute
global queries_for_last_hour
last_hour = time.clock()
last_minute = time.clock()
queries_for_last_minute = 0
queries_for_... | mit | -2,583,254,922,830,167,000 | 27.719697 | 114 | 0.492348 | false | 3.907216 | false | false | false |
aashish24/dataset | dataset/persistence/table.py | 1 | 13492 | import logging
from itertools import count
from sqlalchemy.sql import and_, expression
from sqlalchemy.schema import Column, Index
from dataset.persistence.util import guess_type
from dataset.persistence.util import ResultIter
from dataset.util import DatasetException
log = logging.getLogger(__name__)
class Table... | mit | 4,836,438,356,623,720,000 | 33.863049 | 109 | 0.552698 | false | 4.237437 | false | false | false |
wooga/airflow | airflow/providers/apache/hive/sensors/hive_partition.py | 1 | 3014 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | 333,490,660,544,972,600 | 39.72973 | 91 | 0.661911 | false | 4.14011 | false | false | false |
carpedm20/between | between/client.py | 1 | 15097 | # -*- coding: UTF-8 -*-
"""
between.client
~~~~~~~~~~~~~~
This module contains the client for Between.
"""
import json
import requests
import websocket
from uuid import uuid1
from datetime import datetime
from mimetypes import MimeTypes
from random import random, choice
from .utils import make_url
from .models impo... | bsd-3-clause | -5,605,430,828,047,814,000 | 30.783158 | 139 | 0.400411 | false | 4.613998 | false | false | false |
nektor211/imgaug | tests/check_noise.py | 1 | 2519 | from __future__ import print_function, division
import imgaug as ia
from imgaug import augmenters as iaa
from imgaug import parameters as iap
from scipy import misc
import numpy as np
from skimage import data
import cv2
def main():
nb_rows = 8
nb_cols = 8
h, w = (128, 128)
sample_size = 128
noise_... | mit | 3,232,499,235,980,668,000 | 37.166667 | 138 | 0.611354 | false | 3.284224 | false | false | false |
gusnaughton/orbit | orbit/pyencoding.py | 1 | 4918 | # thrown when there isn't enough data
from _codecs import utf_8_decode
import struct
big_endian, little_endian = range(2)
packEndians = {
big_endian: '>',
little_endian: '<'
}
class ReadException(Exception):
pass
# endian is here for automatic struct.packing purposes
def packByte(b, endian=big_endian):
return s... | mit | -5,072,918,801,631,369,000 | 21.153153 | 76 | 0.672834 | false | 2.772266 | false | false | false |
TobiasLohner/proSoar | prosoar/task/json_writer.py | 1 | 1481 | import json
def write_json_task(task):
database = {}
database['type'] = task.type
database['distance'] = task.distance
database['aat_min_time'] = task.aat_min_time
database['start_max_speed'] = task.start_max_speed
database['start_max_height'] = task.start_max_height
database['start_max_h... | gpl-2.0 | -5,785,154,506,445,901,000 | 41.314286 | 71 | 0.579338 | false | 3.846753 | false | false | false |
andymckay/zamboni | mkt/constants/comm.py | 1 | 5367 | from tower import ugettext_lazy as _
# To add a note type:
# - assign it a incremented number (MY_NOTE_TYPE = 42)
# - give it a translation in NOTE_TYPES
# - if adding from amo/log.py, add it to ACTION_MAP
# - add the translation to Commbadge settings
# Faith of the seven.
NO_ACTION = 0
APPROVAL = 1
REJECTION = 2
DI... | bsd-3-clause | -4,813,002,732,634,742,000 | 35.263514 | 78 | 0.703931 | false | 3.05812 | false | false | false |
yudingding6197/fin_script | debug/bs_record.py | 1 | 1577 | #!/usr/bin/env python
# -*- coding:gbk -*-
import sys
import os
import pandas as pd
from openpyxl import Workbook
from openpyxl.reader.excel import load_workbook
# ͳ¼Æbuy_sellϵļǼ£¬½¨ÒéʹÓÃÉÏÒ»¼¶µÄtransaction_sum.py£¬Í³¼ÆÐÅÏ¢¸ü¶à
# Main
pindex = len(sys.argv)
if pindex<2:
sys.stderr.write("Usage: " +os.path.ba... | gpl-2.0 | -564,167,224,171,468,740 | 26.189655 | 75 | 0.636652 | false | 2.125337 | false | false | false |
JeffDestroyerOfWorlds/hydro_examples | advection/advection.py | 1 | 11152 | """
2nd-order accurate finite-volume implementation of linear advection with
piecewise linear slope reconstruction.
We are solving a_t + u a_x = 0
This script defines two classes:
-- the Grid1d class that manages a cell-centered grid and holds the
data that lives on that grid
-- the Simulation class that is... | bsd-3-clause | -5,731,016,496,385,529,000 | 24.060674 | 95 | 0.492019 | false | 3.038692 | false | false | false |
nprapps/elections14 | app.py | 1 | 9458 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from copy import copy
import json
import argparse
from flask import Flask, render_template
import app_config
import app_utils
from app_utils import get_last_updated
from render_utils import make_context, smarty_filter, urlencode_filter
import slides
import static_app
imp... | mit | 3,996,981,375,998,131,000 | 24.771117 | 109 | 0.617467 | false | 3.350337 | true | false | false |
Azure/azure-sdk-for-python | sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_incident_comments_operations.py | 1 | 14785 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 862,310,406,738,324,700 | 50.515679 | 279 | 0.642611 | false | 4.178915 | true | false | false |
rancavil/python-oauth2 | oauth2/__init__.py | 1 | 29076 | """
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | mit | 3,934,429,948,027,602,400 | 32.809302 | 265 | 0.609575 | false | 4.251499 | false | false | false |
auready/django | django/db/models/query.py | 1 | 69244 | """
The main QuerySet implementation. This provides the public API for the ORM.
"""
import copy
import sys
import warnings
from collections import OrderedDict, deque
from django.conf import settings
from django.core import exceptions
from django.db import (
DJANGO_VERSION_PICKLE_KEY, IntegrityError, connections, ... | bsd-3-clause | 2,804,857,369,781,657,600 | 39.37551 | 115 | 0.589784 | false | 4.373397 | false | false | false |
VerTiGoEtrex/spideTor | spideTor/Metafile.py | 1 | 7762 | # coding: utf-8
'''
Created on Jul 24, 2014
@author: Noah
'''
import bencode
import logging
import pprint
import os.path
log = logging.getLogger(__name__)
pp = pprint.PrettyPrinter(indent = 1, width = 80)
HASHLEN = 20
class Metafile:
'''
Decodes the metadata stored in a .torrent metafile and presents a stan... | apache-2.0 | -5,599,650,462,333,740,000 | 32.606061 | 151 | 0.598171 | false | 4.262493 | false | false | false |
onepercentclub/onepercentclub-site | apps/projects/management/commands/cron_status_realised.py | 1 | 3907 | from datetime import datetime
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from django.utils.translation import ugettext as _
class Command(BaseCommand):
args = 'No arguments required'
help = 'Sets projects to "Done Incomplete" and task status to "Rea... | bsd-3-clause | 7,871,289,710,018,549,000 | 49.102564 | 125 | 0.666752 | false | 4.634638 | false | false | false |
Blazemeter/taurus | bzt/jmx/base.py | 1 | 55715 | """
Module holds base stuff regarding JMX format
Copyright 2015 BlazeMeter 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 ap... | apache-2.0 | -383,183,640,151,168,500 | 38.542229 | 119 | 0.590631 | false | 4.130709 | true | false | false |
titilambert/harbour-squilla | squilla/lib/friend.py | 1 | 8123 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# friend.py
#
# This file is part of Squilla
#
# Copyright (C) 2014 Thibault Cohen
#
# 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 Foundat... | gpl-3.0 | 8,010,937,772,864,076,000 | 31.62249 | 102 | 0.577004 | false | 3.806467 | false | false | false |
qingshuimonk/STA663 | vae/Vanilla_GAN.py | 1 | 3540 | import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import numpy as np
import matplotlib
matplotlib.use('PS')
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import os
from time import gmtime, strftime
def xavier_init(size):
in_dim = size[0]
xavier_stddev ... | mit | -5,731,070,445,213,390,000 | 27.556452 | 126 | 0.632768 | false | 2.544932 | false | false | false |
pytorch/fairseq | fairseq/models/nat/nat_crf_transformer.py | 1 | 4378 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from fairseq.models import register_model, register_model_architecture
from fairseq.models.nat import NATransformerModel, base_architecture
f... | mit | 8,179,743,690,239,201,000 | 35.181818 | 88 | 0.604386 | false | 3.754717 | false | false | false |
NicWayand/xray | xarray/core/combine.py | 1 | 15635 | import warnings
import pandas as pd
from . import utils
from .alignment import align
from .merge import merge
from .pycompat import iteritems, OrderedDict, basestring
from .variable import Variable, as_variable, Coordinate, concat as concat_vars
def concat(objs, dim=None, data_vars='all', coords='different',
... | apache-2.0 | -1,998,947,403,007,847,000 | 40.144737 | 81 | 0.6055 | false | 4.527947 | false | false | false |
register-v1/PyBot | API/wisdom.py | 1 | 6947 | #!/usr/bin/python3
import random as r
def pick_random(value):
return value[r.randint(0, len(value)-1)]
abbreviation = ["TCP", "HTTP", "SDD", "RAM", "GB",
"CSS", "SSL", "AGP", "SQL", "FTP",
"PCI", "AI", "ADP", "RSS", "XML",
"EXE", "COM", "HDD", "THX", "SMTP",
"SMS",... | gpl-3.0 | -2,541,187,709,382,089,700 | 37.17033 | 112 | 0.673816 | false | 2.718982 | false | false | false |
minicole/elpolitico | elpolitico/elpolitico/MyState.py | 1 | 2660 | __author__ = 'Nicole'
import json
import random
import time
GREEN = 'green'
CONSERVATIVE = 'conservative'
LIBERAL = 'liberal'
LIBERTARIAN = 'libertarian'
MAX_CACHED_POINTS = 400
STATES = [GREEN, CONSERVATIVE, LIBERAL, LIBERTARIAN]
class MyStates:
def __init__(self):
self.currentStates = [CurrentStateOf... | mit | -5,317,939,568,438,419,000 | 32.2625 | 156 | 0.645865 | false | 3.546667 | false | false | false |
fullmooninu/messy | testIfCanCheat.py | 1 | 1065 | import random
n = 10
print("strategy 1")
s1_points = 0
for i in range(100000):
num1 = random.randint(1,n)
num2 = num1
while num2==num1:
num2 = random.randint(1,n)
choice = random.randint(1,2)
if choice == 1:
if num1 > num2:
s1_points = s1_points +1
if choice... | unlicense | 6,161,339,017,714,504,000 | 22.666667 | 41 | 0.501408 | false | 3.09593 | false | false | false |
Florianjw/NiceCharts | nicechart.py | 1 | 22515 | #!/usr/bin/env python
# nicechart.py
#
# Copyright 2011
#
# Christoph Sterz
# Florian Weber
#
# 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
#... | gpl-3.0 | 8,903,890,283,883,620,000 | 33.852941 | 230 | 0.639129 | false | 3.018906 | false | false | false |
nirs/hpy | hpy/htokenize.py | 1 | 12383 | """Tokenization help for Python programs.
This is tokenize module from Python 2.4.3 with minor modification needed to
support Hebrew tokens.
generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens. It accepts a readline-like method which is called
repeatedly to get the next line of i... | gpl-2.0 | -847,647,740,305,693,600 | 39.074434 | 78 | 0.515465 | false | 3.779915 | false | false | false |
thp/backuppurge | lib/backuppurge/__init__.py | 1 | 7956 | # -*- coding: utf-8 -*-
#
# backuppurge: Selectively purge daily full backups
#
# Copyright (c) 2013, 2015 Thomas Perl <m@thp.io>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistrib... | bsd-2-clause | -5,817,171,671,719,729,000 | 33.894737 | 97 | 0.653343 | false | 3.813998 | false | false | false |
goblinhack/MundusMeus | python/things/weapon.py | 1 | 13288 | import tp
import mm
def thing_init(t):
return
def weapon_init(name, short_name, long_name, damage, is_double_handed=False):
x = tp.Tp(name)
x.set_long_name(long_name)
x.set_short_name(short_name)
x.set_is_weapon(True)
x.set_z_depth(mm.Z_DEPTH_TREASURE)
x.set_damage(damage)
x.set_is_... | lgpl-3.0 | -4,042,375,541,105,230,000 | 36.643059 | 79 | 0.45748 | false | 3.79332 | false | false | false |
DreamerBear/awesome-py3-webapp | www/core/common/apis.py | 1 | 2526 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : 2017/10/18 16:34
# @Author : xxc727xxc (xxc727xxc@foxmail.com)
# @Version : 1.0.0
'''
JSON API definition
'''
class Page(object):
'''
Page object for display pages.
'''
def __init__(self, item_count, page_index=1, page_size=10):
''... | gpl-3.0 | -5,158,730,437,111,365,000 | 25.589474 | 105 | 0.538797 | false | 3.547753 | false | false | false |
trbarrettjr/research-apps | projected.py | 1 | 1091 | #!/usr/bin/env python
import re
import sys
def getData(data):
name = re.search(r'\w\s\w\s[\w]+|\w\s{3}\w+', data)
employee = name.group()
# Headers are as follows below:
# Event, Date, Time, Train, OD Date, OD Time
tuples = re.findall(r'(\w+|\w+\s\w+|\w+\s\w+\s\w+|[\w-]+)\s+(\d+)\s(\d+)\s(\w+)\s(\d+)\s(\d+... | cc0-1.0 | 3,289,933,708,136,195,600 | 23.244444 | 109 | 0.594867 | false | 2.878628 | false | false | false |
GNOME/chronojump-server | chronojumpserver/views.py | 1 | 9513 | # -*- coding: utf-8 -*-
"""Chronojump Server views controller."""
from chronojumpserver import app
from flask import render_template, request, redirect, url_for, abort, flash
from urlparse import urlparse, urljoin
from flask_wtf.file import FileField
from chronojumpserver.models import Person, Station, RFIDHistory, Use... | agpl-3.0 | -1,233,406,085,584,981,500 | 33.32491 | 109 | 0.589924 | false | 3.850952 | false | false | false |
f41c0r/Cipher-Frequency-Analyzer | lettercounter.py | 1 | 2928 | #!/usr/bin/env python2
#fills a sqlite3 database with data from a plaintext file
import sys
import re
myFile = open(sys.argv[1],"r")
line = myFile.readline()
myDict = {}
myDict2 = {}
myDict3 = {}
totalLength = 0
freqDict = {"a" : 8.167, "b" : 1.49, "c" : 2.78, "d" : 4.253, "e" : 12.702, "f" : 2.228, "g" : 2.015, "h" ... | gpl-3.0 | -4,992,788,253,731,573,000 | 30.483871 | 347 | 0.614754 | false | 3.015448 | false | false | false |
mhrivnak/crane | tests/test_app.py | 2 | 3074 | import logging
from flask import Flask
import mock
import unittest2
from crane import app, config, app_util, exceptions, search
from crane.search import GSA
from crane.views import v1
from . import demo_data
@mock.patch('os.environ.get', spec_set=True, return_value=demo_data.demo_config_path)
class TestCreateApp(un... | gpl-2.0 | -1,201,378,466,537,246,000 | 35.164706 | 85 | 0.670787 | false | 3.607981 | true | false | false |
guydavis/lane-detect | older/lane_detect.v2.py | 1 | 6587 | #
# Attempting to replicate lane detection results described in this tutorial by Naoki Shibuya:
# https://medium.com/towards-data-science/finding-lane-lines-on-the-road-30cf016a1165
# For more see: https://github.com/naokishibuya/car-finding-lane-lines
#
# This 2nd version does a much better job of processing images.
... | mit | 2,390,023,151,074,185,000 | 34.610811 | 109 | 0.627752 | false | 3.082358 | false | false | false |
hrantzsch/signature-verification | tools/mkdata_background.py | 1 | 3585 | """
This script is used to create a training database based on GPDSSynth signatures.
Images are scaled to 192x96;
Paper-like backgrounds are added
"""
import argparse
import numpy as np
from scipy.misc import imread, imresize, imshow, imsave
from PIL import Image
import os
from skimage.transform import rotate
import t... | gpl-3.0 | 3,424,798,210,652,326,400 | 35.212121 | 92 | 0.600558 | false | 3.189502 | false | false | false |
crDDI/dbgap | tests/test_file_downloader.py | 1 | 2787 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Mayo Clinic
# 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... | bsd-3-clause | 7,975,316,140,981,146,000 | 47.051724 | 113 | 0.717259 | false | 3.892458 | true | false | false |
perclasson/trail | trail/main.py | 1 | 4059 | """Implements a wrapper script for executing a Python program from the
command line.
The wrapper script works by adding a special directory into the
'PYTHONPATH' environment variable, describing additional Python module
search directories, which contains a custom 'sitecustomize' module. When
the Python interpreter is ... | bsd-2-clause | -460,797,675,587,299,260 | 34.605263 | 72 | 0.654348 | false | 3.876791 | false | false | false |
Einsteinish/PyTune3 | apps/reader/models.py | 1 | 71869 | import datetime
import time
import re
import redis
from collections import defaultdict
from operator import itemgetter
from pprint import pprint
from utils import log as logging
from utils import json_functions as json
from django.db import models, IntegrityError
from django.db.models import Q, F
from django.db.models ... | mit | -6,377,939,261,452,766,000 | 43.556107 | 289 | 0.542445 | false | 3.851913 | false | false | false |
okdshin/Yender | tutorial/tutorial.py | 1 | 3955 | import os, random, time
import yender
import numpy as np
import collections
block_set = collections.OrderedDict()
block_set["."] = yender.Block(char=".", name="air", visible=False)
block_set["#"] = yender.Block(char="#", name="stone", color=(127, 127, 127), movable=False)
block_set["R"] = yender.Block(char="R", name="... | mit | 2,953,751,811,628,154,000 | 31.418033 | 99 | 0.565613 | false | 3.17926 | false | false | false |
kata198/AdvancedHTMLParser | AdvancedHTMLParser/xpath/_body.py | 1 | 84083 | '''
Copyright (c) 2019 Timothy Savannah under terms of LGPLv3. All Rights Reserved.
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
See: https://github.com/kata198/AdvancedHTMLParser for full information
==INTERNAL==
xpath._body.py - Internal module for dealing with it... | lgpl-3.0 | -9,045,549,128,452,777,000 | 33.874741 | 258 | 0.621279 | false | 4.3537 | false | false | false |
dcos/dcos | packages/adminrouter/extra/src/test-harness/modules/mocker/common.py | 1 | 7971 | # Copyright (C) Mesosphere, Inc. See LICENSE file for details.
"""
Shared management code for DC/OS mocks used by AR instances, both EE and Open.
"""
import concurrent.futures
import logging
from mocker.endpoints.marathon import MarathonEndpoint
from mocker.endpoints.mesos import MesosEndpoint
from mocker.endpoints.... | apache-2.0 | -4,933,649,222,516,970,000 | 40.952632 | 88 | 0.648476 | false | 3.763456 | false | false | false |
gnachman/iTerm2 | api/library/python/iterm2/iterm2/variables.py | 1 | 3098 | """
Provides support for iTerm2 variables, which hold information associated
with various objects such as sessions, tabs, and windows.
"""
import asyncio
import enum
import json
import typing
import iterm2.connection
import iterm2.notifications
class VariableScopes(enum.Enum):
"""Describes the scope in which a ... | gpl-2.0 | -8,994,132,710,832,068,000 | 31.957447 | 79 | 0.603938 | false | 4.314763 | false | false | false |
breuderink/psychic | psychic/nodes/filter.py | 1 | 1820 | import numpy as np
from scipy import signal
from golem import DataSet
from golem.nodes import BaseNode
from psychic.utils import get_samplerate
class Filter(BaseNode):
def __init__(self, filt_design_func):
'''
Forward-backward filtering node. filt_design_func is a function that takes
the sample rate as a... | bsd-3-clause | 3,304,547,324,791,819,000 | 28.836066 | 79 | 0.621978 | false | 3.0033 | false | false | false |
Ferjapolis/Indexador-MongoDB | sv03ToMongo.py | 1 | 2461 | # -*- coding: cp1252 -*-
from pymongo import MongoClient
from pymongo.errors import ConnectionFailure
import os
import sys
from PyPDF2 import PdfFileReader
enc = sys.stdin.encoding
c = MongoClient("localhost",27017)
print ("Conectado")
dbh = c["sv03"]
errores = dbh["errores"]
def carga(tabla,carpeta):
collec... | unlicense | 5,193,583,938,490,873,000 | 37.453125 | 76 | 0.407152 | false | 4.250432 | false | false | false |
thelabnyc/django-oscar-wfrs | src/wellsfargo/tests/connector/test_client.py | 1 | 2934 | from urllib.parse import parse_qs
from django.core.cache import cache
from django.test import TestCase
from wellsfargo.connector.client import WFRSGatewayAPIClient
import requests_mock
class WFRSGatewayAPIClientTest(TestCase):
def setUp(self):
super().setUp()
cache.clear()
@requests_mock.Mock... | isc | 9,074,675,246,136,069,000 | 35.675 | 82 | 0.480913 | false | 4.493109 | false | false | false |
ivannz/study_notes | data_study/facebook2012/base.py | 1 | 2045 | # -*- coding: UTF-8 -*-
## Base modules
import scipy.sparse as sp
import numpy as np
from collections import deque
import pandas as pd
## Read a sparese adjacency matrix from a two-column CSV file
def __csr_from_csv( file_name, **kwargs ) :
return __csr_from_pandas( pd.read_csv( file_name, **kwargs ) )
## Creates ... | mit | 3,795,678,255,961,516,000 | 32.52459 | 81 | 0.636186 | false | 2.942446 | false | false | false |
WilJoey/ckanext-tnext | ckanext/tnext/controllers/MUser.py | 1 | 9024 | import ckan.plugins as p
#from ckan.lib.base import BaseController, config
import ckan.lib.base as base
import ckan.lib.helpers as h
import ckan.model as model
import ckan.logic as logic
import ckan.logic.schema as schema
import ckan.new_authz as new_authz
import ckan.lib.captcha as captcha
import ckan.lib.navl.dictiza... | mit | -4,200,688,493,169,835,500 | 36.915966 | 112 | 0.566379 | false | 3.802781 | false | false | false |
newtrino/vertigo | tests/test7.py | 1 | 1747 | #!/usr/bin/python
""" This will be a test for rave's two-jet feature """
width=0.0015
length=5.3
from vertigo import RaveVertexFactory, EventFactory, RaveConstantMagneticField, \
RaveVacuumPropagator, LoopSettings, RaveTrackContainer, WeightedRaveTrack, \
ObserverManager_Instance, RaveCovariance3D, Rav... | gpl-2.0 | -6,821,613,297,838,847,000 | 31.351852 | 115 | 0.721809 | false | 2.951014 | false | false | false |
rubik/poly | tests/test_poly.py | 1 | 9508 | import copy
import unittest
from poly import Poly, monomial
def pass_to(func, convert=(True, True), star=False):
def wrapper(meth):
def inner(self):
for value, expected in meth(self).items():
if convert[0] and not star:
value = Poly(value)
if... | mit | 8,370,560,494,488,886,000 | 32.361404 | 78 | 0.30101 | false | 2.837362 | true | false | false |
sandialabs/BioCompoundML | bcml/PubChemUtils/pubchempy_utils.py | 1 | 14579 | from __future__ import print_function
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from collections import Callable, defaultdict
from six.moves import xrange
try:
# For Python 3.0 and later
import urllib.request as urllib2
except ImportError:
# Fal... | bsd-3-clause | 4,310,988,585,706,478,600 | 34.13012 | 92 | 0.554016 | false | 3.836579 | false | false | false |
averaart/fq_delta | fq_delta/fq_delta.py | 1 | 10373 | __author__ = 'averaart'
"""This module offers a means to store multiple versions of the same fastq file, by only storing the differences between
them and recreating the processed file based on the original file and the differences."""
# Batteries included
import os
import sys
from subprocess import Popen, PIPE
import ... | bsd-3-clause | 63,940,633,616,006,200 | 33.347682 | 120 | 0.550757 | false | 4.129379 | false | false | false |
ChinaQuants/blaze | blaze/expr/core.py | 1 | 10471 | from __future__ import absolute_import, division, print_function
import numbers
import toolz
import inspect
from toolz import unique, concat, compose, partial
import toolz
from pprint import pprint
from ..compatibility import StringIO, _strtypes, builtins
from ..dispatch import dispatch
__all__ = ['Node', 'path', '... | bsd-3-clause | 5,760,293,578,376,260,000 | 23.464953 | 79 | 0.530895 | false | 3.665033 | false | false | false |
rs2/pandas | pandas/conftest.py | 1 | 33159 | """
This file is very long and growing, but it was decided to not split it yet, as
it's still manageable (2020-03-17, ~1.1k LoC). See gh-31989
Instead of splitting it was decided to define sections here:
- Configuration / Settings
- Autouse fixtures
- Common arguments
- Missing values & co.
- Classes
- Indices
- Serie... | bsd-3-clause | -5,213,168,821,077,794,000 | 24.645012 | 88 | 0.588407 | false | 3.489319 | true | false | false |
reunition/reunition | reunition/apps/alumni/test_models.py | 1 | 1192 | from django.test import TestCase
from model_mommy import mommy
class PersonTests(TestCase):
def test_display_name(self):
person = mommy.make(
'alumni.Person',
graduation_first_name='Bobbie',
graduation_last_name='Smith',
)
self.assertEqual(person.displ... | mit | -1,216,111,322,849,305,900 | 29.564103 | 77 | 0.571309 | false | 3.601208 | false | false | false |
rulz/django-registration | registration/models.py | 1 | 11801 | from __future__ import unicode_literals
import datetime
import hashlib
import random
import re
from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.db import models
from django.template import RequestContext, TemplateDoesNotExist
from django.template.loader import render_to... | bsd-3-clause | -2,108,707,373,669,058,000 | 37.819079 | 116 | 0.641132 | false | 4.836475 | false | false | false |
open-synergy/opnsynid-stock-logistics-warehouse | stock_production_operation/models/stock_warehouse.py | 1 | 6557 | # -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields, api, _
from openerp.exceptions import Warning as UserError
class StockWarehouse(models.Model):
_inherit = "stock.warehouse"
production_rm_type_id... | agpl-3.0 | 7,212,818,813,044,937,000 | 31.785 | 70 | 0.583804 | false | 3.731929 | false | false | false |
puruckertom/ubertool | ubertool/earthworm/earthworm_exe.py | 1 | 2201 | from __future__ import division
import pandas as pd
import os.path
import sys
# parentddir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
# sys.path.append(parentddir)
from base.uber_model import UberModel, ModelSharedInputs
from .earthworm_functions import EarthwormFunctions
class Earthw... | unlicense | 1,824,656,894,426,855,400 | 30.442857 | 87 | 0.624262 | false | 3.656146 | false | false | false |
defm03/toraeru | test/loli_gelbooru.py | 1 | 3832 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
*booru general file.
For now, there's working Gelbooru downloader for loli content,
but soon I'll add danbooru, etc.
"""
import loli_spam
import os
import datetime
import urllib.request
import http.cookiejar
import xml.etree.ElementTree as eltree
import json
#lol... | gpl-3.0 | -7,906,757,162,575,998,000 | 29.420635 | 108 | 0.679541 | false | 2.708127 | false | false | false |
mitsuhiko/sentry | src/sentry/models/environment.py | 1 | 1364 | """
sentry.models.release
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
from django.db import models
from django.utils import timezone
from sentry.db.models impo... | bsd-3-clause | 918,329,941,305,556,000 | 25.230769 | 75 | 0.621701 | false | 3.696477 | false | false | false |
MangoMangoDevelopment/neptune | lib/ros_comm-1.12.0/utilities/roswtf/src/roswtf/network.py | 1 | 4458 | # Software License Agreement (BSD License)
#
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | bsd-3-clause | 3,243,990,153,839,998,500 | 38.105263 | 172 | 0.700987 | false | 3.743073 | false | false | false |
yro/openveda | openveda/reporting.py | 1 | 2431 |
import os
import sys
"""
Quick and dirty error handling & logging
"""
from global_vars import *
class ErrorObject(object):
"""
Unspecified errors with a message
"""
@staticmethod
def print_error(message):
decorator = "***************E*R*R*O*R*******************"
outgoing = '\n%... | gpl-3.0 | 3,754,043,802,549,835,000 | 27.267442 | 97 | 0.48334 | false | 3.895833 | false | false | false |
migumar2/uiHRDC | uiHRDC/benchmark/report/summaryTables/utils-py/generateSelfIdx.py | 1 | 3853 |
from sys import argv
from mytiming import *
from mycheckfiles import *
##--main --------------------------------------------------------------##
variants=[]
variants.append( ["WCSA" ,"../../../self-indexes/collectResults/wcsa" ,"B-LOG.dat" , "S-LOG.dat" , "N.Wa_swcsa.dat" , "N.Wb_swcsa.dat" , "N.P2_sw... | lgpl-2.1 | -2,661,403,691,565,364,000 | 35.695238 | 234 | 0.523748 | false | 2.543234 | false | false | false |
USGS-EROS/lcmap-changes | bin/pyccd_inputs.py | 1 | 2416 | #!/usr/bin/env python3
import argparse
import requests
import logging
import sys
__format = '%(asctime)s %(module)-10s::%(funcName)-20s - [%(lineno)-3d]%(message)s'
logging.basicConfig(stream=sys.stdout,
level=logging.INFO,
format=__format,
datefmt='%Y-%m-%d ... | unlicense | -243,910,291,986,523,200 | 44.584906 | 114 | 0.57947 | false | 3.532164 | false | false | false |
crichardson17/starburst_atlas | HighResSims/Baseline_DustFree_Hires_cut17/Baseline_dustfree_plotter.py | 1 | 12507 | ############################################################
############# Plotting File for Contour Plots ##############
################## Data read from Cloudy ###################
################ Helen Meskhidze, Fall 2015 ################
#################### Elon University #######################
#--------------... | gpl-2.0 | 782,418,356,838,361,500 | 38.206897 | 240 | 0.595986 | false | 2.876495 | false | false | false |
suutari/shoop | shuup/front/checkout/_services.py | 1 | 2897 | # 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.
import abc
import six
from shuup.apps.provides import get_provide_objects
from shuup.cor... | agpl-3.0 | 6,591,927,049,728,485,000 | 33.903614 | 74 | 0.714187 | false | 4.260294 | false | false | false |
saullocastro/pyNastran | pyNastran/converters/dev/obj/obj_reader.py | 1 | 3015 | from __future__ import print_function
from numpy import array, unique, hstack, zeros
class OBJ(object):
def __init__(self):
pass
def read_obj(self, obj_filename):
"""
v -0.0817245 0.000635 0.00421862
v -0.0817245 0.000580371 0.00421862
v -0.0817245 -0.000635 0.00421862
... | lgpl-3.0 | -4,943,026,172,035,429,000 | 30.082474 | 76 | 0.511443 | false | 3.364955 | false | false | false |
pombredanne/invenio | modules/bibmerge/lib/bibmerge_engine.py | 1 | 17312 | ## This file is part of Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN.
##
## Invenio 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 | -5,580,802,279,621,333,000 | 39.734118 | 139 | 0.628524 | false | 3.735059 | false | false | false |
mbohlool/client-python | kubernetes/client/models/v1beta2_deployment_strategy.py | 1 | 4295 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | -6,132,782,709,722,817,000 | 26.88961 | 105 | 0.570664 | false | 4.265144 | false | false | false |
gedhe/sidesa2.0 | kejadian_lain.py | 1 | 28823 | #Boa:Frame:kejadian_lain
import os
import wx
import wx.lib.buttons
import data_penduduk
import sqlite3
import string
import gettext
import peringatan
db = sqlite3.connect('/opt/sidesa/sidesa')
cur = db.cursor()
def create(parent):
return kejadian_lain(parent)
[wxID_KEJADIAN_LAIN, wxID_KEJADIAN_LAINCARI_KK, wxI... | gpl-2.0 | 5,543,628,404,911,905,000 | 48.270085 | 229 | 0.630608 | false | 2.721205 | false | false | false |
hjanime/VisTrails | vistrails/packages/URL/http_directory.py | 1 | 8252 | ###############################################################################
##
## Copyright (C) 2014-2015, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | bsd-3-clause | -6,873,373,719,552,639,000 | 37.381395 | 79 | 0.544716 | false | 3.795768 | true | false | false |
Bajoo/client-pc | bajoo/gui/base_view.py | 1 | 4844 | # -*- coding: utf-8 -*-
import wx
from ..common.path import resource_filename
from .translator import Translator
from ..common.i18n import N_
class BaseView(Translator):
"""Base class for all views.
This class come with helper functions to configure the view.
Class Attributes:
LIGHT_GRAY (wx.C... | gpl-3.0 | 7,601,464,904,003,091,000 | 32.638889 | 79 | 0.569777 | false | 4.360036 | false | false | false |
jim-easterbrook/pywws | src/pywws/device_pyusb1.py | 1 | 4757 | # pywws - Python software for USB Wireless Weather Stations
# http://github.com/jim-easterbrook/pywws
# Copyright (C) 2008-20 pywws contributors
# 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;... | gpl-2.0 | 4,071,569,313,834,991,000 | 33.722628 | 104 | 0.646206 | false | 3.639633 | false | false | false |
nehresma/gocardless-python | test/test_params.py | 1 | 8989 | import datetime
import mock
import unittest
import six
from six.moves import urllib
import gocardless
from gocardless import utils, urlbuilder
class ExpiringLimitTestCase(object):
"""superclass factoring out tests for expiring limit param objects"""
def test_interval_length_is_positive(self):
pars =... | mit | -7,502,890,767,632,523,000 | 36.92827 | 99 | 0.590833 | false | 3.73763 | true | false | false |
genyang/classifip | classifip/representations/intervalsProbability.py | 1 | 8808 | import numpy as np
from credalset import CredalSet
class IntervalsProbability(CredalSet):
"""Class of probability intervals: probabilistic bounds on singletons
:param lproba: a 2xn array containing upper (1st row) and lower bounds
:type lproba: :class:`~numpy.array`
:param nbDecision: number of el... | gpl-2.0 | -5,486,011,638,803,645,000 | 36.322034 | 103 | 0.557221 | false | 3.814638 | false | false | false |
jeromeku/Python-Financial-Tools | portfolio.py | 1 | 8295 | # portfolio.py This class represents a portfolio of stocks. It supports optimization
# of assets via a quadratic program.
#
# The following is an example of how the portfolio class may be used to represent a
# portfolio of assets representing major technology companies:
# portfolio = Portfolio(["MSFT","GOOG... | mit | -9,167,423,260,467,966,000 | 43.837838 | 128 | 0.639662 | false | 3.773885 | false | false | false |
qliu/globe_nocturne | globenocturne/globenocturneapp/migrations/0002_auto_20150416_1956.py | 1 | 2732 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('globenocturneapp', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='DMSPDataset',
fie... | gpl-2.0 | 2,225,764,835,229,984,000 | 33.15 | 114 | 0.504758 | false | 4.385233 | false | false | false |
SEMAFORInformatik/femagtools | examples/calculation/ld_lq_fast.py | 1 | 3356 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Ld-Lq-Identification with Femag
"""
import os
import femagtools
import femagtools.machine
import logging
import numpy as np
feapars = {
"num_move_steps": 25,
"calculationMode": "ld_lq_fast",
"magn_temp": 60.0,
"i1_max": 150.0,
"beta_max": 0.0,
... | bsd-2-clause | 4,781,478,290,324,042,000 | 22.298611 | 63 | 0.467064 | false | 2.690457 | false | true | false |
Symmetric/calico-docker | calico_containers/calico_ctl/status.py | 1 | 2475 | # Copyright 2015 Metaswitch 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 law or agreed to in w... | apache-2.0 | 4,725,994,529,181,571,000 | 38.919355 | 84 | 0.585859 | false | 4.245283 | false | false | false |
ULHPC/easybuild-easyblocks | easybuild/easyblocks/h/hdf5.py | 1 | 4242 | ##
# Copyright 2009-2017 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | gpl-2.0 | 1,027,973,136,351,787,100 | 39.788462 | 101 | 0.621405 | false | 3.613288 | true | false | false |
leahrnh/ticktock_text_api | prepare_data_user_input.py | 1 | 1698 | #!/usr/bin/etc python
import sys
import time
import os
import json
import pickle
def readfile(fn):
result = {}
result["Turns"] = {}
current_turn = 0
key_index = 0
keys = ["Turn", "You", "TickTock", "Appropriateness"]
for l in open(fn):
if ":" in l:
key = l.split(":")[0]
value = ":".join(l.s... | gpl-2.0 | -2,080,913,587,433,048,600 | 24.727273 | 64 | 0.585984 | false | 2.97373 | false | false | false |
un-brs/mfiles-tools | mfiles_project/mfiles_sync/management/commands/mfcache.py | 1 | 9571 | # -*- coding: utf-8 -*-
import datetime
import calendar
from mfiles_sync.models import (Vault, Document, DocumentView, PropertyDef,
Property, DocumentProperty)
from django.conf import settings
from django.core.management.base import BaseCommand
from win32com.client import gencache
mfi... | mit | 4,169,048,206,284,975,000 | 34.579926 | 80 | 0.532024 | false | 4.088424 | false | false | false |
bolkedebruin/airflow | airflow/hooks/dbapi_hook.py | 1 | 10860 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | 3,902,563,915,036,066,000 | 35.079734 | 85 | 0.580203 | false | 4.580346 | false | false | false |
gotcha/testcounter | counterpartylib/lib/messages/dividend.py | 1 | 8391 | #! /usr/bin/python3
"""Pay out dividends."""
import struct
import decimal
D = decimal.Decimal
import logging
logger = logging.getLogger(__name__)
from counterpartylib.lib import (config, exceptions, util)
FORMAT_1 = '>QQ'
LENGTH_1 = 8 + 8
FORMAT_2 = '>QQQ'
LENGTH_2 = 8 + 8 + 8
ID = 50
def initialise (db):
curs... | mit | 3,948,772,545,682,078,000 | 42.010256 | 148 | 0.619888 | false | 3.633882 | true | false | false |
GammaC0de/pyload | src/pyload/plugins/decrypters/GoogledriveComFolder.py | 1 | 5023 | # -*- coding: utf-8 -*
import json
from pyload.core.network.http.exceptions import BadHeader
from ..base.decrypter import BaseDecrypter
class GoogledriveComFolder(BaseDecrypter):
__name__ = "GoogledriveComFolder"
__type__ = "decrypter"
__version__ = "0.12"
__status__ = "testing"
__pyload_versi... | agpl-3.0 | -5,063,890,733,911,918,000 | 32.046053 | 118 | 0.495122 | false | 3.843152 | false | false | false |
mpeyrotc/govector | condominios/forms.py | 1 | 2051 | # coding=utf-8
from django import forms
import pyodbc
class LoginForm(forms.Form):
username = forms.CharField(label="Nombre de Usuario", max_length=50)
password = forms.CharField(label="Contraseña", widget=forms.PasswordInput)
widgets = {
"password" : forms.PasswordInput(),
}
def clean... | mit | -3,781,641,314,589,348,400 | 33.15 | 175 | 0.571777 | false | 4.366738 | false | false | false |
kartvep/Combaine | combaine/plugins/DistributedStorage/MongoReplicaSet.py | 1 | 2716 | from __AbstractStorage import AbstractDistributedStorage
import pymongo
import hashlib
import time
class MongoReplicaSet(AbstractDistributedStorage):
def __init__(self, **config):
self.hosts = config['hosts']
self.rs = None
self.db = None
self.coll_name = None
self.cache_k... | lgpl-3.0 | 6,870,602,319,103,538,000 | 31.333333 | 112 | 0.529823 | false | 4.159265 | false | false | false |
claymation/django-zendesk | djzendesk/tests.py | 1 | 3695 | import base64
import mock
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import TestCase
def http_basic_auth_string(username, password):
credentials = base64.encodestring('%s:%s' % (username, password)).strip()
auth_string = 'Basic %s' % credentials
return ... | bsd-3-clause | -4,604,251,067,905,810,000 | 42.470588 | 102 | 0.658457 | false | 3.793634 | true | false | false |
taigaio/taiga-back | taiga/users/migrations/0001_initial.py | 1 | 3199 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
import re
import django.core.validators
import taiga.users.models
class Migration(migrations.Migration):
dependencies = [
("contenttypes", "0001_initial"),
]
ope... | agpl-3.0 | 7,655,461,915,151,665,000 | 65.645833 | 306 | 0.632385 | false | 4.220317 | false | false | false |
tiffanyj41/hermes | src/utils/lastfm_etl/lastfm.py | 3 | 8114 | #!/usr/bin/env python
"""Translate the Last.fm data files to JSON.
This script takes the various Last.fm data files and write them out as
JSON. It removes the Last.fm artist URLs.
Attributes:
ARTISTS (dict): A dictionary that stores information about the artists. The
variables are as follows:
... | apache-2.0 | 1,649,158,540,482,051,300 | 26.137124 | 105 | 0.579123 | false | 3.834594 | false | false | false |
manyunkai/tweixin | weixin/docking/utils/menu.py | 1 | 8631 | # -*-coding:utf-8 -*-
"""
Created on 11/26/2015
@author: Danny<manyunkai@hotmail.com>
DannyWork Project.
"""
import json
import tornado.gen
from .request import request_async
from .token import get_access_token
from exception.request import GetSelfMenuFailed
from docking.models.material import Material, NewsMessage... | gpl-2.0 | 6,789,176,383,028,225,000 | 35.645299 | 150 | 0.464723 | false | 4.33738 | false | false | false |
Hobsons/hippo | data_sources/redis_queue.py | 1 | 1363 | import redis
from data_sources.hippo_base import HippoDataSource
class RedisQueue(HippoDataSource):
namespace = 'redis'
label = 'Redis Queue'
inputs = {
'host': {'input':'text','label':'Redis Host'},
'port': {'input':'number','label':'Redis Port','default':6379},
'db' : {'input':'... | apache-2.0 | 3,635,951,184,378,449,400 | 30 | 94 | 0.557594 | false | 3.625 | false | false | false |
acrazing/dbapi | dbapi/config.py | 1 | 1038 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2017 The Authors. All Rights Reserved.
# License: MIT.
# Author: acrazing <joking.young@gmail.com>.
# File: config.
"""
默认配置
"""
import logging
import os
import sys
api_config = {
'persist_file': os.path.join(os.path.expanduser("~"), ".__cache__dbapi.json... | mit | -682,045,576,200,020,600 | 31.1875 | 111 | 0.596117 | false | 2.746667 | false | true | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.