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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dsoprea/PySecure | pysecure/types.py | 1 | 4059 | import platform
from ctypes import *
from datetime import datetime
from pysecure.constants import TIME_DATETIME_FORMAT
from pysecure.constants.sftp import SSH_FILEXFER_TYPE_REGULAR, \
SSH_FILEXFER_TYPE_DIRECTORY, \
SSH_FILEXFER_TYPE_SYMLINK, \
... | gpl-2.0 | -6,243,054,323,641,303,000 | 30.465116 | 101 | 0.55186 | false | 3.478149 | false | false | false |
dke-knu/i2am | i2am-app/AlgorithmSelectionEngine/PeriodicClassification/DeepLearning(local).py | 1 | 2820 | """ Learned classification model """
import tensorflow as tf
from PeriodicClassification import ModelConfig as myConfig
from PeriodicClassification import Preprocess as pre
def _model(X, keep_prob):
# input
W1 = tf.Variable(tf.random_normal([myConfig.INPUT_SIZE, myConfig.HIDDEN_SIZE]), name="weight1")
b1 ... | apache-2.0 | 5,677,919,536,755,330,000 | 33.207317 | 100 | 0.661912 | false | 2.781746 | true | false | false |
jgliss/pyplis | pyplis/model_functions.py | 1 | 8950 | # -*- coding: utf-8 -*-
#
# Pyplis is a Python library for the analysis of UV SO2 camera data
# Copyright (C) 2017 Jonas Gliss (jonasgliss@gmail.com)
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License a
# published by the Free Software Foundat... | gpl-3.0 | 7,274,057,895,621,544,000 | 35.234818 | 79 | 0.603128 | false | 3.762085 | false | false | false |
UNC-Major-Lab/Fragment-Isotope-Distribution-Paper | scripts/theoretical/mergeHistogram.py | 1 | 1930 | #!/usr/bin/env python
import sys
import os
import re
from collections import defaultdict
from math import floor
from math import isnan
root_dir = sys.argv[1]
prefix = sys.argv[2]
do_iso = sys.argv[3]
if do_iso == 'F':
comp2bin2count = defaultdict(dict)
for f in os.listdir(root_dir):
fp = root_dir+"/"... | mit | 324,607,062,226,680,960 | 32.877193 | 95 | 0.526425 | false | 3.607477 | false | false | false |
NETWAYS/ingraph | ingraph/api.py | 1 | 16388 | # inGraph (https://www.netways.org/projects/ingraph)
# Copyright (C) 2011-2012 NETWAYS GmbH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your optio... | gpl-3.0 | 3,848,192,613,168,572,400 | 34.703704 | 134 | 0.527886 | false | 4.509631 | false | false | false |
spark8103/deploy | app/celery_runner.py | 1 | 4976 | import subprocess
from subprocess import Popen, PIPE
from . import celery
@celery.task(bind=True)
def deploy_running_task(self, cmd, type='Deploy'):
has_error = False
result = None
output = ""
self.update_state(state='PROGRESS',
meta={'output': output,
... | mit | 2,258,274,440,267,406,800 | 35.321168 | 107 | 0.527532 | false | 4.319444 | false | false | false |
talumbau/webapp-public | webapp/apps/taxbrain/helpers.py | 1 | 26371 | from collections import namedtuple
import taxcalc
import dropq
import os
import requests
from requests.exceptions import Timeout, RequestException
import json
import pandas as pd
import time
#
# Prepare user params to send to DropQ/Taxcalc
#
NUM_BUDGET_YEARS = int(os.environ.get('NUM_BUDGET_YEARS', 10))
START_YEAR =... | mit | -2,011,549,738,239,617,500 | 31.881546 | 93 | 0.540101 | false | 3.344451 | false | false | false |
lucc/alot | tests/utils/argparse_test.py | 1 | 5935 | # encoding=utf-8
# Copyright © 2017 Dylan Baker
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is dist... | gpl-3.0 | -1,888,860,210,976,214,300 | 32.337079 | 93 | 0.667678 | false | 4.138075 | true | false | false |
monkut/deso | deso/deso/layers/raster/management/commands/fill_raster_layer_cache.py | 1 | 2025 | """
Make requests for tiles at given zoom levels to fill the tilecache.
"""
from django.core.management.base import BaseCommand
from django.conf import settings
from ...models import RasterAggregatedLayer
WGS84_SRID = settings.WGS84_SRID
def request_layer_tiles(layer_url, layer, zoom):
"""
Request tiles for g... | mit | 2,064,351,220,925,089,800 | 37.207547 | 122 | 0.536296 | false | 4.336188 | false | false | false |
MissionCriticalCloud/marvin | marvin/cloudstackAPI/uploadCustomCertificate.py | 1 | 1685 | """Uploads a custom certificate for the console proxy VMs to use for SSL. Can be used to upload a single certificate signed by a known CA. Can also be used, through multiple calls, to upload a chain of certificates from CA to the custom certificate itself."""
from baseCmd import *
from baseResponse import *
class upl... | apache-2.0 | 2,818,282,309,625,276,000 | 43.342105 | 328 | 0.651632 | false | 4.469496 | false | false | false |
intelligent-agent/redeem | tests/gcode/test_M114.py | 1 | 1069 | from __future__ import absolute_import
import mock
from random import random
from .MockPrinter import MockPrinter
from redeem.Gcode import Gcode
class M114_Tests(MockPrinter):
def test_gcodes_M114(self):
A = round(random() * 200, 1)
B = round(random() * 200, 1)
C = round(random() * 200, 1)
X = rou... | gpl-3.0 | 9,131,512,291,480,535,000 | 27.891892 | 95 | 0.533209 | false | 2.783854 | false | false | false |
sunnychaudhari/gstudio | gnowsys-ndf/gnowsys_ndf/ndf/views/ajax_views.py | 1 | 226833 |
''' -- imports from python libraries -- '''
# import os -- Keep such imports here
import datetime
import csv
import time
import ast
import json
import math
import multiprocessing
''' -- imports from installed packages -- '''
from django.http import HttpResponseRedirect
from django.http import HttpResponse
from django... | agpl-3.0 | 7,496,256,682,763,233,000 | 40.658953 | 521 | 0.557128 | false | 3.780928 | false | false | false |
yuhangc/HRI_planner | scripts/hri/human_traj_generator.py | 1 | 5437 | #!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
class HumanTrajGenerator:
def __init__(self, T, dt):
self.T = T
self.dt = dt
# set some parameters
self.v_max = 1.0
self.a_max = 0.6
self.k_v = 0.8
self.k_hr = 0.6
self.th_hr... | apache-2.0 | -6,814,724,475,351,384,000 | 31.363095 | 108 | 0.48924 | false | 2.948482 | false | false | false |
mromanello/CitationExtractor | citation_extractor/settings/svm.py | 1 | 1036 | """Settings for an SVM-based citation extractor."""
import pkg_resources
from sklearn.svm import LinearSVC
# Sets debug on (=true) or off (=false)
DEBUG = False
POS = True
# leave empty to write the log to the console
LOG_FILE = ""
# list of directories containing data (IOB format with .iob extension)
DATA_DIRS = (
... | gpl-3.0 | 4,482,813,493,128,714,000 | 19.313725 | 70 | 0.665058 | false | 3.158537 | false | false | false |
Astyan-42/skepticalscience | skepticalsciencewebsite/custompayment/forms.py | 1 | 3142 | from django import forms
from django.core.exceptions import ValidationError
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from custompayment.models import Addres... | agpl-3.0 | -482,083,300,925,337,660 | 36.86747 | 108 | 0.63972 | false | 4.007653 | false | false | false |
giliam/turbo-songwriter | backend/songwriter/migrations/0001_initial.py | 1 | 5963 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-08-04 14:21
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.Crea... | mit | 1,539,306,744,246,456,000 | 52.241071 | 135 | 0.584605 | false | 4.381337 | false | false | false |
hkzhe/ddz_project | game_server/client.py | 1 | 1279 | import socket
import json
import struct
import sys
import time
def build_login_cmd():
cmd_dict = {}
cmd_dict["userID"] = sys.argv[1]
cmd_dict["cmd"] = "login"
return json.dumps( cmd_dict )
def send_cmd( sock , cmd ):
cmd_len = len( cmd )
send_str = struct.pack( 'i' , cmd_len )
sock.send( send_str... | bsd-3-clause | 6,844,430,092,311,269,000 | 24.102041 | 60 | 0.591869 | false | 2.417769 | false | false | false |
dongweiming/web_develop | chapter10/section2/server.py | 1 | 3462 | # coding=utf-8
import os
import sys
from datetime import datetime
sys.path.append('gen-py')
sys.path.append('/usr/lib/python2.7/site-packages')
from flask_sqlalchemy import SQLAlchemy
from app import app
from models import PasteFile as BasePasteFile
from utils import get_file_md5
db = SQLAlchemy(app)
from thrift.t... | gpl-3.0 | 7,807,537,685,541,028,000 | 31.130841 | 79 | 0.62071 | false | 3.782178 | false | false | false |
lambdamusic/OntoSPy | ontospy/ontodocs/utils.py | 1 | 6309 | # !/usr/bin/env python
# -*- coding: UTF-8 -*-
import json
# ===========
# Utilities
# ===========
def build_D3treeStandard(old, MAX_DEPTH, level=1, toplayer=None):
"""
For d3s examples all we need is a json with name, children and size .. eg
{
"name": "flare",
"children": [
{
"name": "analyt... | gpl-3.0 | -6,854,177,205,183,017,000 | 26.077253 | 96 | 0.5191 | false | 3.146633 | false | false | false |
wutali/sauron | sauron/metrics/RedisMetric.py | 1 | 6731 | import redis
from sauron import logger
from sauron.metrics import Metric, MetricException
class RedisMetric(Metric):
@staticmethod
def parseMemory(x):
try:
if 'G' in x:
return (x.replace('G', ''), 'Gigabytes')
elif 'M' in x:
return (x.replace('M'... | mit | 2,291,710,560,482,880,000 | 44.47973 | 95 | 0.473332 | false | 3.745687 | false | false | false |
rolandgeider/wger | wger/mailer/urls.py | 1 | 1189 | # -*- coding: utf-8 -*-
# This file is part of wger Workout Manager.
#
# wger Workout Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | agpl-3.0 | 4,714,017,575,843,777,000 | 29.487179 | 78 | 0.721615 | false | 3.738994 | false | false | false |
rvykydal/blivet | blivet/formats/disklabel.py | 1 | 22009 | # disklabel.py
# Device format classes for anaconda's storage configuration module.
#
# Copyright (C) 2009 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your ... | lgpl-2.1 | 3,892,311,891,357,951,500 | 35.927852 | 104 | 0.576809 | false | 4.274422 | false | false | false |
JianfengYao/python-web-app | www/transwarp/db.py | 1 | 13974 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Michael Liao'
'''
Database operation module.
'''
import time, uuid, functools, threading, logging
# Dict object:
class Dict(dict):
'''
Simple dict but support access as x.y style.
>>> d1 = Dict()
>>> d1['x'] = 100
>>> d1.x
100
... | gpl-2.0 | -7,054,294,330,750,922,000 | 27.871901 | 140 | 0.563761 | false | 3.643807 | true | false | false |
suprotkin/atm | atm/atm/settings.py | 1 | 2842 | """
Django settings for atm project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths in... | gpl-2.0 | -6,900,148,488,778,329,000 | 25.314815 | 74 | 0.69247 | false | 3.424096 | false | false | false |
foundertherapy/django-users-plus | accountsplus/views.py | 1 | 8660 | from __future__ import unicode_literals
import logging
from django.utils.translation import ugettext as _
import django.views.decorators.cache
import django.views.decorators.csrf
import django.views.decorators.debug
import django.contrib.auth.decorators
import django.contrib.auth.views
import django.contrib.auth.forms... | mit | -1,332,505,607,043,437,000 | 40.238095 | 131 | 0.675751 | false | 3.992623 | false | false | false |
kevin-intel/scikit-learn | sklearn/datasets/_kddcup99.py | 3 | 12676 | """KDDCUP 99 dataset.
A classic dataset for anomaly detection.
The dataset page is available from UCI Machine Learning Repository
https://archive.ics.uci.edu/ml/machine-learning-databases/kddcup99-mld/kddcup.data.gz
"""
import errno
from gzip import GzipFile
import logging
import os
from os.path import dirname, ex... | bsd-3-clause | 3,550,723,356,904,437,000 | 32.983914 | 98 | 0.574787 | false | 3.740336 | false | false | false |
wheeler-microfluidics/dmf-device-ui | dmf_device_ui/canvas.py | 1 | 51678 | # -*- coding: utf-8 -*-
from collections import OrderedDict
import itertools
import functools as ft
import logging
import threading
from cairo_helpers.surface import flatten_surfaces
from logging_helpers import _L
from pygtkhelpers.ui.views.shapes_canvas_view import GtkShapesCanvasView
from pygtkhelpers.utils import g... | lgpl-2.1 | 1,564,422,671,550,628,900 | 40.079491 | 88 | 0.531251 | false | 4.264917 | false | false | false |
hobson/pug-dj | pug/dj/miner/models.py | 1 | 13381 | import datetime
from django.db import models
#from django_hstore import hstore
from jsonfield import JSONField
from pug.nlp.db import representation
# FIXME: simplify circular import/dependencies with miner app
#from pug.dj.miner import explore
from model_mixin import DateMixin
class Connection(models.Model):
... | mit | 215,834,773,485,895,000 | 49.116105 | 348 | 0.653613 | false | 3.896622 | false | false | false |
devilry/devilry-django | devilry/devilry_admin/views/dashboard/overview.py | 1 | 6086 | # -*- coding: utf-8 -*-
from devilry.devilry_cradmin import devilry_listbuilder
from devilry.devilry_cradmin.devilry_listbuilder.period import AdminItemValue
from django.db import models
from itertools import groupby
from django.utils.translation import gettext, gettext_lazy
from django.views.generic import Template... | bsd-3-clause | -6,426,557,289,801,527,000 | 36.801242 | 111 | 0.670884 | false | 3.861675 | false | false | false |
jeetsukumaran/Ginkgo | ginkgopy/ginkgo/ginkgogrid.py | 1 | 5281 | #! /usr/bin/env python
import random
import sys
import os
from ginkgo import argparse
##############################################################################\\
# Grid
class Grid(object):
def __init__(self, **kwargs):
self.ncols = kwargs.get("ncols", None)
self.nrows = kwargs.get("nrows", ... | gpl-3.0 | 8,019,885,483,017,476,000 | 32.636943 | 112 | 0.492142 | false | 3.659737 | false | false | false |
mattvonrocketstein/smash | smashlib/ipy3x/nbconvert/preprocessors/execute.py | 1 | 3693 | """Module containing a preprocessor that removes the outputs from code cells"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import os
try:
from queue import Empty # Py 3
except ImportError:
from Queue import Empty # Py 2
from IPython.utils.traitlets... | mit | -6,775,581,182,042,542,000 | 31.394737 | 86 | 0.541836 | false | 4.444043 | false | false | false |
pettazz/pygooglevoice | examples/parse_sms.py | 1 | 1581 | #
# SMS test via Google Voice
#
# John Nagle
# nagle@animats.com
#
from googlevoice import Voice
import BeautifulSoup
def extractsms(htmlsms):
"""
extractsms -- extract SMS messages from BeautifulSoup
tree of Google Voice SMS HTML.
Output is a list of dictionaries, one per message.
"""
ms... | bsd-3-clause | 4,728,614,197,272,323,000 | 32.638298 | 79 | 0.611638 | false | 3.856098 | false | false | false |
AlphaSmartDog/DeepLearningNotes | Note-6 A3CNet/Note 6 simple ACNet/ACNet_adjust.py | 1 | 3662 | import random
import tensorflow as tf
from FCNet import FCNet
LOSS_V = 100
ENTROPY_BETA = 0.05
_EPSILON = 1e-6
L2_P = 1e-5
L2_V = 1e-2
actor_learning_rate = 1e-3
critic_learning_rate = 1e-3
class ACNet(object):
def __init__(self, state_size, action_size):
self.state_size = state_size
self.action_... | mit | -7,544,644,809,307,700,000 | 39.7 | 100 | 0.629164 | false | 3.29613 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_operations.py | 1 | 4744 | # 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 | -2,921,255,939,064,702,000 | 42.522936 | 133 | 0.640388 | false | 4.610301 | false | false | false |
datamicroscopes/lda | test/test_reuters.py | 1 | 4285 | import os
import numpy as np
from nose.plugins.attrib import attr
from nose.tools import assert_almost_equal, assert_dict_equal
from nose.tools import assert_list_equal
from microscopes.lda import model, runner
from microscopes.lda.definition import model_definition
from microscopes.common.rng import rng
from microsc... | bsd-3-clause | -5,277,405,691,397,815,000 | 37.258929 | 109 | 0.641774 | false | 3.195377 | true | false | false |
n6g7/django_markdown | django_markdown/widgets.py | 1 | 1852 | """ Widgets for django-markdown. """
import os
from django import forms
from django.contrib.admin.widgets import AdminTextareaWidget
from django.contrib.staticfiles.storage import staticfiles_storage
from django.utils.safestring import mark_safe
from . import settings
from .utils import editor_js_initialization
cla... | lgpl-3.0 | 4,647,823,019,649,413,000 | 30.389831 | 126 | 0.654428 | false | 3.923729 | false | false | false |
zpiman/MathIA | square.py | 1 | 1854 | import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 8, 0.01)
myb = []
for i in x:
if np.floor(i)%2 == 0:
myb.append(1)
else:
myb.append(0)
y = np.array(myb)
plt.subplot(121)
plt.plot(x,y)
plt.xticks([2,4,6],("-T","0","T"))
plt.tick_params(axis='x', labelsize="15")
plt.ylim([-... | apache-2.0 | 3,362,402,061,348,584,000 | 20.068182 | 62 | 0.59493 | false | 2.228365 | false | false | false |
muffato/pyEnsemblRest | template/genome.py | 1 | 1247 |
#__GENERATED_OBJECTS__
__feature_types = {
'gene' : GeneFeature,
'transcript' : TranscriptFeature,
'cds': CDSFeature,
'exon' : ExonFeature,
'repeat' : RepeatFeature,
'simple' : SimpleFeature,
'misc' : MiscFeature,
'variation' : VariationFeature,
... | apache-2.0 | -6,060,772,300,965,686,000 | 28 | 75 | 0.587811 | false | 3.778788 | false | false | false |
johnbywater/eventsourcing | setup.py | 1 | 2434 | from distutils.core import setup
from eventsourcing import __version__
crypto_requires = ["pycryptodome<=3.9.99999"]
postgresql_requires = ["psycopg2<=2.8.99999"]
postgresql_dev_requires = ["psycopg2-binary<=2.8.99999"]
docs_requires = (
postgresql_dev_requires
+ crypto_requires
+ [
"Sphinx==1.8.... | bsd-3-clause | -1,621,732,981,441,119,200 | 26.348315 | 87 | 0.620378 | false | 3.821036 | false | false | false |
XuesongYang/end2end_dialog | PipelineLstmModel.py | 1 | 9106 | ''' Pipelined bi-directional LSTM model.
This model stacked biLSTM NLU and biLSTM SAP separate models together,
and its weights are initilized by the ones of seprate models. Besides,
for the SAP task, the decision threshold on the output layer is tuned
on dev data.
Author : Xuesong Yang
... | mit | 5,262,195,568,939,314,000 | 49.871508 | 190 | 0.669888 | false | 3.604909 | true | false | false |
alviezhang/leetcode | 91.decode_ways/solution.py | 1 | 1077 | # coding: utf-8
class Solution:
def numDecodings(self, s):
"""
:type s: str
:rtype: int
"""
if s == "" or s[0] == '0':
return 0
# Initialization
before_previous = 0
previous_one = 0
current = 1
for i in range(1, len(s)):... | mit | 6,711,470,115,184,742,000 | 26.615385 | 84 | 0.44104 | false | 3.792254 | false | false | false |
openelections/openelections-core | openelex/us/vt/validate/validates.py | 1 | 8951 | import re
from openelex.models import Contest, Candidate, Office, Result
import logging
import time
import os
# if not os.path.isdir("logs"):
# os.makedirs("logs")
# logging.basicConfig(filename=time.strftime("logs/%Y%m%d-%H%M%S-validate.log"),level=logging.DEBUG)
# Generic validation helpers
def _validate_can... | mit | -705,504,772,250,037,200 | 45.378238 | 117 | 0.669199 | false | 3.174113 | true | false | false |
snowflying/messager | messager/common/sslutils.py | 1 | 2833 | # Copyright 2013 IBM Corp.
#
# 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 t... | apache-2.0 | -7,891,878,470,662,829,000 | 27.908163 | 78 | 0.61772 | false | 3.722733 | false | false | false |
Yukarumya/Yukarum-Redfoxes | testing/marionette/harness/marionette_harness/tests/unit/test_screen_orientation.py | 1 | 3917 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from marionette_driver import errors
from mozrunner.devices.emulator_screen import EmulatorScreen
from marionette_harne... | mpl-2.0 | -3,902,149,290,655,037,400 | 44.546512 | 103 | 0.725045 | false | 3.825195 | true | false | false |
YannThorimbert/ThorPy-1.4.1 | thorpy/elements/browser.py | 1 | 5542 | # -*- coding: utf-8 -*-
import os
import pygame
from thorpy.elements.browserlight import BrowserLight
from thorpy.elements._explorerutils._pathelement import PathElement
from thorpy.elements.element import Element
from thorpy.elements.inserter import Inserter
from thorpy.elements.ddlf import DropDownListFast
from tho... | mit | -6,465,121,483,309,031,000 | 40.365672 | 84 | 0.579033 | false | 3.827348 | false | false | false |
avinet/adaptive3-qgis-plugin | dlgNewProjectBase.py | 1 | 2600 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dlgNewProject.ui'
#
# Created: Fri Apr 01 12:27:36 2016
# by: PyQt4 UI code generator 4.10.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except ... | mit | 3,318,942,337,191,141,000 | 46.272727 | 115 | 0.740385 | false | 3.939394 | false | false | false |
TAMU-CPT/galaxy-tools | tools/webapollo/create_or_update_organism.py | 1 | 3514 | #!/usr/bin/env python
import sys
import json
import argparse
import time
from webapollo import WAAuth, WebApolloInstance, OrgOrGuess, GuessOrg, AssertUser
import logging
logging.basicConfig(level=logging.INFO)
log = logging.getLogger(__name__)
if __name__ == "__main__":
parser = argparse.ArgumentParser(
... | gpl-3.0 | 1,875,516,418,846,996,000 | 33.792079 | 284 | 0.610985 | false | 3.750267 | false | false | false |
Com-Mean/MLinAcition | chapter2/numpyIntro.py | 1 | 1099 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#########################################################################
# File Name: numpyIntro.py
# Author: lpqiu
# mail: qlp_1018@126.com
# Created Time: 2014年09月06日 星期六 16时33分05秒
#########################################################################
import numpy as... | gpl-3.0 | -7,973,966,228,759,885,000 | 24.139535 | 76 | 0.427382 | false | 2.800518 | false | false | false |
Southpaw-TACTIC/Team | src/python/Lib/site-packages/PySide/examples/graphicsview/elasticnodes.py | 1 | 13943 | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2006-2006 Trolltech ASA. All rights reserved.
##
## This file is part of the example classes of the Qt Toolkit.
##
## Licensees holding a valid Qt License Agreement may use this file in
## accordance... | epl-1.0 | -5,084,416,713,089,854,000 | 34.388325 | 138 | 0.588324 | false | 3.644276 | false | false | false |
stryder199/RyarkAssignments | Assignment2/web2py/gluon/decoder.py | 1 | 3038 | import codecs, encodings
"""Caller will hand this library a buffer and ask it to either convert
it or auto-detect the type.
Based on http://code.activestate.com/recipes/52257/
Licensed under the PSF License
"""
# None represents a potentially variable byte. "##" in the XML spec...
autodetect_dict={ # bytepattern ... | mit | -9,123,745,468,234,891,000 | 40.054054 | 78 | 0.560895 | false | 3.755253 | false | false | false |
FreeON/spammpack | src-C/prototype/stream_multiply/generate_SSE_assembly.py | 1 | 19562 | #!/usr/bin/python
#
# Generate SSE assembly code for a kernel operating on a 4x4 blocks.
import math, optparse, sys
class box:
def __init__ (self, i_1, i_2, j_1, j_2):
self.i_1 = i_1
self.i_2 = i_2
self.j_1 = j_1
self.j_2 = j_2
def __str__ (self):
return "box: [%d-%d][%d-%d]" % (self.i_1, sel... | bsd-3-clause | -6,811,387,707,721,082,000 | 35.979206 | 132 | 0.586596 | false | 2.467146 | false | false | false |
smjurcak/csm | csmserver/views/download_dashboard.py | 1 | 8882 | # =============================================================================
# Copyright (c) 2016, Cisco Systems, 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 sour... | apache-2.0 | -7,126,437,171,829,432,000 | 34.670683 | 115 | 0.654582 | false | 4.19556 | false | false | false |
tdickers/mitmproxy | mitmproxy/utils.py | 1 | 1071 | from __future__ import absolute_import, print_function, division
import netlib.utils
pkg_data = netlib.utils.Data(__name__)
class LRUCache:
"""
A simple LRU cache for generated values.
"""
def __init__(self, size=100):
self.size = size
self.cache = {}
self.cacheList = ... | mit | 1,121,692,843,674,526,200 | 27.184211 | 78 | 0.549953 | false | 4.041509 | false | false | false |
Cladis/wikilabels | wikilabels/database/worksets.py | 1 | 8760 | import psycopg2
from psycopg2.extras import Json
from .collection import Collection
from .errors import IntegrityError, NotFoundError
class Worksets(Collection):
def get(self, workset_id, stats=False):
with self.db.conn.cursor() as cursor:
cursor.execute("""
SELECT
... | mit | 8,908,630,188,383,749,000 | 37.086957 | 86 | 0.457648 | false | 4.555382 | false | false | false |
ljhandlwt/flask-study | flask1/app/models.py | 1 | 3601 | #coding=utf-8
from flask import url_for
from flask.ext.sqlalchemy import SQLAlchemy
from app import db,app
from hashlib import md5
from datetime import datetime
import os
user_user_concern=db.Table('user_user_concern',
db.Column('user1_id',db.Integer,db.ForeignKey('user.id'),primary_key=True),
db.Column('use... | mit | 1,049,869,579,345,582,300 | 29.13913 | 111 | 0.706063 | false | 2.820331 | false | false | false |
JohnLZeller/dd-agent | tests/test_cassandra.py | 1 | 5263 | import logging
import unittest
from dogstream.cassandra import parse_cassandra
logger = logging.getLogger(__name__)
class TestCassandraDogstream(unittest.TestCase):
def testStart(self):
events = parse_cassandra(logger, " INFO [main] 2012-12-11 21:46:26,995 StorageService.java (line 687) Bootstrap/Repla... | bsd-3-clause | -4,113,671,884,750,322,700 | 86.716667 | 689 | 0.758123 | false | 3.283219 | true | false | false |
stanleykylee/worldbank-world-development-indicators-distributed-tf | src/build_sequences.py | 1 | 1618 | import csv
import json
# configuration
DATA_FILE = 'WDI_Data.csv'
INDICATORS_FILE = 'indicators.config'
OUTPUT_FILE = 'population-data.csv.csv'
def make_country_dict():
country = {}
for i in range(0,57):
country[i] = {}
return country
# extract selected indicators and write time series entries o... | gpl-3.0 | -3,085,287,364,212,459,000 | 27.892857 | 74 | 0.543263 | false | 3.611607 | false | false | false |
whitehorse-io/encarnia | Encarnia/typeclasses/statue.py | 1 | 1228 | """
Readables
A readable plaque.
"""
from evennia import DefaultObject, Command, CmdSet
from world import english_utils
from evennia.utils import list_to_string
from random import randint
import time
from typeclasses.objects import Object
# the "read" command
class CmdReadStatue(Command):
"""
... | mit | -988,572,104,984,226,600 | 19.578947 | 73 | 0.614821 | false | 3.622419 | false | false | false |
shastah/spacewalk | backend/server/importlib/packageImport.py | 1 | 22007 | #
# Copyright (c) 2008--2016 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 | -7,587,173,102,851,040,000 | 40.998092 | 156 | 0.577907 | false | 4.633053 | false | false | false |
geertj/bluepass | bluepass/frontends/qt/passwordbutton.py | 1 | 10929 | #
# This file is part of Bluepass. Bluepass is Copyright (c) 2012-2013
# Geert Jansen.
#
# Bluepass is free software available under the GNU General Public License,
# version 3. See the file LICENSE distributed with this file for the exact
# licensing terms.
from __future__ import absolute_import, print_function
from... | gpl-3.0 | -703,691,127,010,999,800 | 33.046729 | 79 | 0.637753 | false | 4.037311 | true | false | false |
apophys/freeipa | ipalib/__init__.py | 1 | 34622 | # Authors:
# Jason Gerard DeRose <jderose@redhat.com>
#
# Copyright (C) 2008 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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, ei... | gpl-3.0 | 9,104,041,449,937,767,000 | 34.220753 | 106 | 0.658136 | false | 3.933871 | false | false | false |
lnls-fac/scripts | bin/delete_dups.py | 1 | 3559 | #!/usr/bin/python
import subprocess
import sys
import os
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
@staticmethod
def purple(string):
return bcolors.HEADER + string + bcolors.ENDC
@staticmethod
def b... | mit | 112,618,110,065,499,700 | 23.210884 | 90 | 0.650745 | false | 2.835857 | false | false | false |
akuendig/RxPython | rx/linq/takeLast.py | 1 | 4061 | from rx.disposable import CompositeDisposable, SingleAssignmentDisposable
from rx.internal import Struct
from rx.observable import Producer
import rx.linq.sink
from collections import deque
class TakeLastCount(Producer):
def __init__(self, source, count, scheduler):
self.source = source
self.count = count
... | mit | -6,765,602,060,497,232,000 | 27.013793 | 82 | 0.658951 | false | 3.871306 | false | false | false |
gem/oq-engine | openquake/hazardlib/near_fault.py | 1 | 18706 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2012-2021 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | agpl-3.0 | -4,038,285,033,445,288,400 | 37.64876 | 79 | 0.599326 | false | 3.541462 | false | false | false |
MySportsFeeds/mysportsfeeds-python | ohmysportsfeedspy/v1_0.py | 1 | 7330 | import os
import csv
import requests
from datetime import datetime
import simplejson as json
import platform
import base64
import ohmysportsfeedspy
# API class for dealing with v1.0 of the API
class API_v1_0(object):
# Constructor
def __init__(self, verbose, store_type=None, store_location=None):
se... | mit | 4,933,645,844,157,687,000 | 33.413146 | 159 | 0.54543 | false | 4.276546 | false | false | false |
ua-snap/downscale | snap_scripts/epscor_sc/older_epscor_sc_scripts_archive/downscaled_data_to_netcdf_epscor_se.py | 1 | 9999 | # convert the downscaled data archive
def run( x ):
''' simple wrapper to open and return a 2-D array from a geotiff '''
import rasterio
return rasterio.open(x).read(1)
def sort_files( files, split_on='_', elem_month=-2, elem_year=-1 ):
'''
sort a list of files properly using the month and year parsed
from the... | mit | 2,371,635,134,616,050,000 | 36.037037 | 137 | 0.667767 | false | 2.840625 | false | false | false |
apache/airflow | tests/plugins/test_plugins_manager.py | 2 | 14930 | #
# 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 | -9,114,536,456,285,706,000 | 37.981723 | 110 | 0.649565 | false | 4.330046 | true | false | false |
danielholmstrom/nose-pyversion | setup.py | 1 | 1770 | """
~~~~~~~~~~~~~~~~~~~~~
Nose-Pyversion-Plugin
~~~~~~~~~~~~~~~~~~~~~
"""
import os
import sys
from setuptools import find_packages, setup
# Required for nose.collector, see http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing
except ImportError:
pass
here = os.path.abspath(os.path.dirnam... | mit | -7,525,720,973,531,597,000 | 27.548387 | 78 | 0.596045 | false | 4.078341 | false | false | false |
egbertbouman/tribler-g | Tribler/Tools/dirtrackerseeder.py | 1 | 6798 | # Written by Arno Bakker
# see LICENSE.txt for license information
#
# Razvan Deaconescu, 2008:
# * corrected problem when running in background
# * added usage and print_version functions
# * uses getopt for command line argument parsing
import sys
import shutil
import time
import tempfi... | lgpl-2.1 | -6,706,108,623,727,171,000 | 32.333333 | 191 | 0.521624 | false | 3.891242 | false | false | false |
pstiasny/bigos | bigos/__init__.py | 1 | 1522 | #/bin/env python2
# encoding: utf8
__version__ = '0.0.3'
import re
import itertools
from bigos.backend import generate_events
watchlist = []
class EventHandler:
def __init__(self, function, regex, dirs=False, types=['created', 'modified']):
'''
:param function: function to run when the event is... | gpl-3.0 | 4,430,752,800,128,339,500 | 28.843137 | 83 | 0.603811 | false | 3.902564 | false | false | false |
blooparksystems/odoo | addons/account/models/chart_template.py | 1 | 43914 | # -*- coding: utf-8 -*-
import time
import math
from openerp.osv import expression
from openerp.tools.float_utils import float_round as round
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.exceptions import AccessError, UserError, ValidationError
import openerp.addons.decimal_precision as dp
fr... | gpl-3.0 | -9,035,051,368,661,658,000 | 56.554391 | 193 | 0.633488 | false | 4.046627 | false | false | false |
truthcoin/truthcoin-cpp | contrib/linearize/linearize-hashes.py | 1 | 3041 | #!/usr/bin/python
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import pr... | mit | 8,576,335,789,278,602,000 | 25.911504 | 90 | 0.664255 | false | 2.961052 | false | false | false |
theJollySin/python_for_scientists | classes/14_netcdf/extract_cell_from_3d_ioapi.py | 1 | 1291 |
import sys
from netCDF4 import Dataset
def main():
print(extract_cell_from_3d_ioapi(sys.argv[1], int(sys.argv[2]), int(sys.argv[3]), layer=0, var=None))
def extract_cell_from_3d_ioapi(file_path, row, col, layer=0, var=None):
'''Extract a single grid cell from a GRIDDED IOAPI NetCDF file.
If you don't p... | gpl-3.0 | -4,119,864,125,831,360,000 | 32.102564 | 105 | 0.633617 | false | 3.678063 | false | false | false |
daodewang/qingcloud-sdk-python | qingcloud/iaas/router_static.py | 1 | 8191 | # =========================================================================
# Copyright 2012-present Yunify, Inc.
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the Licens... | apache-2.0 | 8,290,995,983,507,668,000 | 30.503846 | 99 | 0.521182 | false | 3.790375 | false | false | false |
matplotlib/freetypy | docstrings/truetype.py | 1 | 5852 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Michael Droettboom 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. Redistributions of source code must retain the above copyright
# notice, t... | bsd-2-clause | -7,203,823,751,697,514,000 | 25.527273 | 72 | 0.72207 | false | 3.071579 | false | false | false |
foursquare/pants | contrib/errorprone/src/python/pants/contrib/errorprone/tasks/errorprone.py | 1 | 7607 | # coding=utf-8
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import re
from builtins import str
from pants.backend.jvm import argfile
from ... | apache-2.0 | 2,359,390,993,532,608,000 | 40.342391 | 131 | 0.640331 | false | 3.91508 | false | false | false |
ace02000/pyload | module/plugins/accounts/Keep2ShareCc.py | 1 | 2362 | # -*- coding: utf-8 -*-
import re
import time
from module.plugins.internal.Account import Account
from module.plugins.internal.Plugin import set_cookie
class Keep2ShareCc(Account):
__name__ = "Keep2ShareCc"
__type__ = "account"
__version__ = "0.10"
__status__ = "testing"
__description__ ... | gpl-3.0 | -2,316,719,965,670,955,000 | 30.918919 | 101 | 0.516511 | false | 3.7792 | false | false | false |
namgivu/shared-model-FlaskSqlAlchemy-vs-SQLAlchemy | python-app/model/user.py | 1 | 1292 | from base_model import BaseModel
import sqlalchemy as db
class User(BaseModel):
#table mapping
__tablename__ = "users"
##region column mapping
id = db.Column(db.Integer, primary_key=True)
user_name = db.Column(db.Text)
primary_email_id = db.Column(db.Integer, db.ForeignKey('user_emails.id') )
#Use mod... | gpl-3.0 | 6,215,019,284,809,545,000 | 37 | 117 | 0.647059 | false | 4.050157 | false | false | false |
Disiok/poetry-seq2seq | utils.py | 1 | 1442 | #! /usr/bin/env python
# -*- coding:utf-8 -*-
import os
VOCAB_SIZE = 6000
SEP_TOKEN = 0
PAD_TOKEN = 5999
DATA_RAW_DIR = 'data/raw'
DATA_PROCESSED_DIR = 'data/processed'
DATA_SAMPLES_DIR = 'data/samples'
MODEL_DIR = 'model'
LOG_DIR = 'log'
if not os.path.exists(DATA_PROCESSED_DIR):
os.mkdir(DATA_PROCESSED_DIR)... | mit | -4,215,054,157,706,704,400 | 20.058824 | 106 | 0.609637 | false | 2.875502 | false | false | false |
rohitwaghchaure/erpnext_develop | erpnext/regional/united_arab_emirates/setup.py | 1 | 2919 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, os, json
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
from erpnext.setup.setup_wizard.operations.tax... | gpl-3.0 | 1,549,981,976,826,451,200 | 37.407895 | 82 | 0.711545 | false | 3.239734 | false | false | false |
w1ll1am23/home-assistant | homeassistant/components/smartthings/sensor.py | 1 | 12696 | """Support for sensors through the SmartThings cloud API."""
from __future__ import annotations
from collections import namedtuple
from typing import Sequence
from pysmartthings import Attribute, Capability
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import (
AREA_SQUARE_MET... | apache-2.0 | -5,184,662,723,028,571,000 | 32.856 | 88 | 0.604285 | false | 3.728634 | false | false | false |
pixelpicosean/my-godot-2.1 | platform/android/detect.py | 1 | 9664 | import os
import sys
import string
import platform
def is_active():
return True
def get_name():
return "Android"
def can_build():
import os
if (not os.environ.has_key("ANDROID_NDK_ROOT")):
return False
return True
def get_opts():
return [
('ANDROID_NDK_ROOT', 'the path... | mit | 7,101,317,733,062,213,000 | 35.467925 | 119 | 0.561465 | false | 3.274822 | false | false | false |
Endika/connector-accountedge | hr_expense_accountedge/hr_expense_accountedge.py | 1 | 8226 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it und... | agpl-3.0 | -4,562,259,662,920,168,000 | 40.336683 | 117 | 0.531972 | false | 3.818942 | false | false | false |
srcole/qwm | usa_map/map_util.py | 1 | 4006 | """
map_util.py
Visualizing US state data on a geographical colormap
"""
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap as Basemap
from matplotlib.colors import rgb2hex
from matplotlib.patches import Polygon
def usa_state_colormap(state_dict, title... | mit | -7,728,630,059,513,854,000 | 36.439252 | 100 | 0.638293 | false | 3.557726 | false | false | false |
protwis/protwis | signprot/migrations/0008_auto_20200829_1739.py | 1 | 3041 | # Generated by Django 3.0.3 on 2020-08-29 15:39
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('common', '0003_citation_page_name'),
('structure', '0028_auto_20200829_1704'),
('protein', '0009_auto_202005... | apache-2.0 | 4,604,085,215,076,593,000 | 41.830986 | 150 | 0.599474 | false | 4.211911 | false | false | false |
Fizzadar/pyinfra | pyinfra/api/connectors/winrm.py | 1 | 7851 | from __future__ import print_function, unicode_literals
import base64
import ntpath
import click
from pyinfra import logger
from pyinfra.api import Config
from pyinfra.api.exceptions import ConnectError, PyinfraError
from pyinfra.api.util import get_file_io, memoize, sha1_hash
from .pyinfrawinrmsession import Pyinf... | mit | -1,413,492,209,220,742,400 | 28.851711 | 94 | 0.61075 | false | 3.724383 | false | false | false |
silmeth/Simple-Library-Manager | server/slm_db_interface/views.py | 1 | 10693 | from django.shortcuts import render
from django.http import HttpResponse
from django.db import transaction, connection
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth import authenticate, login
from slm_db_interface.models import Book, Author, Publisher, Borrower, SLMUser
from bisect impor... | lgpl-3.0 | 4,883,945,105,540,650,000 | 38.899254 | 119 | 0.600673 | false | 3.991415 | false | false | false |
davidjrichardson/uwcs-zarya | newsletter/tasks.py | 1 | 2020 | import gc
from celery.decorators import task
from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import render_to_string
from django.urls import reverse
from blog.models import Sponsor
from .models import Subscription, Mail
def mail_newsletter(recipients, ... | mit | -830,727,445,206,895,400 | 37.113208 | 88 | 0.64703 | false | 3.726937 | false | false | false |
ianmiell/shutit-distro | screen/screen.py | 1 | 1148 | """ShutIt module. See http://shutit.tk
"""
from shutit_module import ShutItModule
class screen(ShutItModule):
def build(self, shutit):
shutit.send('mkdir -p /tmp/build/screen')
shutit.send('cd /tmp/build/screen')
shutit.send('wget -qO- http://ftp.gnu.org/gnu/screen/screen-4.2.1.tar.gz | tar -zxf -')
shutit... | gpl-2.0 | 4,438,800,849,325,293,000 | 26.333333 | 175 | 0.682927 | false | 2.512035 | false | false | false |
PROGRAM-IX/vectorwars | vw_game_engine.py | 1 | 10587 | import pygame
from pygame.locals import *
from pystroke.hud import *
from pystroke.game_engine import GameEngine
from pystroke.vector2 import Vector2
from pystroke.vex import Vex
from pystroke.input_engine import InputEngine
from pystroke.event_engine import EventEngine
from pystroke.draw_engine import DrawEngine
from... | mit | 8,833,229,971,831,664,000 | 34.891525 | 79 | 0.489657 | false | 3.516108 | false | false | false |
liqd/a4-meinberlin | meinberlin/apps/polls/migrations/0006_copy_poll_data_to_a4_polls.py | 1 | 2716 | # Generated by Django 2.2.24 on 2021-06-18 12:18
from django.db import migrations
def copy_data(apps, schema_editor):
Item = apps.get_model('a4modules', 'Item')
MBPoll = apps.get_model('meinberlin_polls', 'MBPoll')
Poll = apps.get_model('a4polls', 'Poll')
MBQuestion = apps.get_model('meinberlin_polls... | agpl-3.0 | -491,148,125,555,496,700 | 38.362319 | 78 | 0.60162 | false | 3.564304 | false | false | false |
ulrikpedersen/toggl-gnome-applet | toggl.py | 1 | 5391 | #!/usr/bin/env python
import logging
from datetime import datetime
logging.basicConfig(level=logging.WARNING)
import os
import urllib2, base64, json
import dateutil.parser
def from_ISO8601( str_iso8601 ):
return dateutil.parser.parse(str_iso8601)
def to_ISO8601( timestamp ):
return timestamp.isoformat()
de... | unlicense | 6,207,641,037,173,916,000 | 37.241135 | 116 | 0.565758 | false | 3.679863 | false | false | false |
fancycode/dnsadmin | scripts/dnsadmin.py | 1 | 4877 | #
# Copyright (C) 2016 Joachim Bauch <mail@joachim-bauch.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
... | agpl-3.0 | 8,245,141,423,036,300,000 | 33.835714 | 83 | 0.58294 | false | 4.193465 | false | false | false |
pinterest/mysql_utils | mysql_backup_csv.py | 1 | 33689 | #!/usr/bin/env python
import argparse
import datetime
import json
import logging
import multiprocessing
import os
import subprocess
import threading
import time
import traceback
import uuid
import boto
import _mysql_exceptions
import psutil
import safe_uploader
import mysql_backup_status
from lib import backup
from l... | gpl-2.0 | -410,670,963,058,634,600 | 42.808843 | 98 | 0.531123 | false | 4.236544 | false | false | false |
docusign/docusign-python-client | docusign_esign/models/workflow.py | 1 | 5166 | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | mit | 5,507,776,582,154,696,000 | 28.861272 | 140 | 0.577429 | false | 4.136109 | false | false | false |
nttcom/eclcli | eclcli/orchestration/heatclient/common/http.py | 1 | 13729 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -2,518,008,748,685,360,600 | 37.564607 | 79 | 0.592541 | false | 4.067852 | false | false | false |
ramineni/my_congress | congress_dashboard/policies/views.py | 1 | 5367 | # Copyright 2014 VMware.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | apache-2.0 | -726,373,775,188,115,800 | 39.353383 | 78 | 0.618968 | false | 4.428218 | false | false | false |
JohnPeel/Sarabi | misc.py | 1 | 2767 |
import os
import shutil
import stat
import yaml
from strings import *
ignored_paths = ['.git']
class EPackageNotFound(Exception):
pass
class EAmbiguousAtom(Exception):
def __init__(self, valid_packages):
self.valid_packages = valid_packages
message = PACKAGE_TOO_AMBIGUOUS % len(valid_packages)
messa... | gpl-3.0 | 873,124,693,430,433,500 | 23.927928 | 95 | 0.606433 | false | 3.202546 | false | false | false |
ianmiell/shutit-distro | postgresql/postgresql.py | 1 | 1264 | """ShutIt module. See http://shutit.tk
"""
#http://www.linuxfromscratch.org/blfs/view/svn/postlfs/mitkrb.html configs and context and configureation
from shutit_module import ShutItModule
class postgresql(ShutItModule):
def build(self, shutit):
shutit.send('mkdir -p /tmp/build/postgresql')
shutit.send('cd /tmp... | gpl-2.0 | 7,476,906,327,428,438,000 | 37.30303 | 151 | 0.719146 | false | 2.61157 | false | false | false |
cprn/samegame | model.py | 1 | 1390 | import random
data = []
NUM_COLOURS = 5
GRID_SIZE = 20
def init():
for y in range(GRID_SIZE):
r = []
for x in range(GRID_SIZE):
r.append(random.randint(0, NUM_COLOURS - 1))
data.append(r)
def get_block_colour(x, y):
if x in range(get_width()) and y in range(get_height())... | unlicense | 6,598,916,812,739,268,000 | 22.166667 | 66 | 0.539568 | false | 3.159091 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.