repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mbrukman/libcloud | libcloud/utils/dist.py | 57 | 4973 | # 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 use ... | apache-2.0 | 4,766,146,444,383,373,000 | 35.837037 | 78 | 0.647899 | false | 3.931225 | false | false | false |
caseyrollins/osf.io | osf/models/preprint_service.py | 2 | 13310 | # -*- coding: utf-8 -*-
import urlparse
import logging
from dirtyfields import DirtyFieldsMixin
from django.db import models
from django.utils import timezone
from django.contrib.contenttypes.fields import GenericRelation
from django.core.exceptions import ValidationError
from framework.exceptions import PermissionsE... | apache-2.0 | 7,554,843,069,861,371,000 | 37.247126 | 162 | 0.615101 | false | 4.075321 | false | false | false |
jonwright/ImageD11 | sandbox/ftomo.py | 1 | 4480 |
from __future__ import print_function
import math, numpy, time
from ImageD11 import cImageD11
from fabio.openimage import openimage
print("Using class version")
class fourier_radial(object):
""" Cache results for re-use where possible on next layer """
def __init__(self, dims, theta=None):
self.dim... | gpl-2.0 | 561,290,789,958,171,500 | 33.728682 | 68 | 0.561607 | false | 3.150492 | false | false | false |
yenw/computer-go-dataset | Tom/Converter_Tom.py | 1 | 2988 | #!/bin/python
# encoding=utf8
import sys
import platform
def kifu_converter(index_name, user_id, kifu_folder, save_folder):
f = open(index_name)
stack = []
save_index = ""
for line in f:
line = line.decode('utf-8')
line_r = line.split('\t')
if line_r[2] != user_id and ... | gpl-3.0 | -1,515,790,253,295,045,600 | 28.489796 | 85 | 0.422691 | false | 2.990991 | false | false | false |
mckesson-uspharmamarketing/mailchimp-API-handler | mailchimp_api_wrapper.py | 1 | 4261 | from __future__ import division
import json
import mailchimp3
from mailchimp3 import MailChimp
from user_login_credentials import user_name
from user_login_credentials import api_key
class single_report:
def __init__(self, report_data):
self.campaign_id = report_data['id']
self.subject_line = report_data['subject... | apache-2.0 | 3,937,751,821,937,486,300 | 46.355556 | 188 | 0.711101 | false | 2.892736 | false | false | false |
scaramallion/pynetdicom | pynetdicom/_validators.py | 1 | 2079 | """Validation functions used by pynetdicom"""
from collections import OrderedDict
import logging
from typing import Union, Dict, Optional, cast, Tuple
import unicodedata
from pydicom.dataset import Dataset
from pydicom.uid import UID
LOGGER = logging.getLogger('pynetdicom._validators')
def validate_ae(value: str)... | mit | 3,829,577,689,415,675,400 | 26 | 78 | 0.643098 | false | 4.068493 | false | false | false |
chenchiyuan/hawaii | hawaii/apps/commodity/signals.py | 1 | 1434 | # -*- coding: utf-8 -*-
# __author__ = chenchiyuan
from __future__ import division, unicode_literals, print_function
from django.db.models.signals import m2m_changed
def commodity_inventory_changed(sender, instance, *args, **kwargs):
from libs.datetimes import dates_during
from hawaii.apps.commodity.models i... | bsd-3-clause | -6,126,397,034,087,340,000 | 35.794872 | 136 | 0.735704 | false | 3.686375 | false | false | false |
umbc-hackafe/sign-drivers | python/games/snake.py | 1 | 2701 | import graphics
import driver
import game
import random
class Snake(game.Game):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.reset()
def reset(self):
self.sprites.clear()
self.playing = True
self.snake = [graphics.Rectangle(1, 1... | mit | -1,034,839,308,905,894,900 | 35.013333 | 84 | 0.466124 | false | 3.620643 | false | false | false |
dmsurti/reynolds-blender | reynolds_blender/models.py | 1 | 6371 | #------------------------------------------------------------------------------
# Reynolds-Blender | The Blender add-on for Reynolds, an OpenFoam toolbox.
#------------------------------------------------------------------------------
# Copyright|
#-----------------------------------------------------------------------... | gpl-3.0 | -2,622,846,358,038,049,000 | 36.25731 | 79 | 0.501491 | false | 4.483462 | false | false | false |
rajdeepd/dockersamples | python/utils.py | 1 | 1545 | import httplib
import socket
import json
class UnixHTTPConnection(httplib.HTTPConnection):
"""
HTTPConnection object which connects to a unix socket.
"""
def __init__(self, sock_path):
httplib.HTTPConnection.__init__(self, "localhost")
self.sock_path = sock_path
def connect(self)... | gpl-2.0 | 7,247,339,961,896,200,000 | 25.186441 | 112 | 0.583819 | false | 3.777506 | false | false | false |
zhmcclient/python-zhmcclient | zhmcclient/_console.py | 1 | 28583 | # Copyright 2017 IBM Corp. 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 applicable law or agre... | apache-2.0 | 1,441,471,050,216,845,600 | 34.773467 | 80 | 0.599587 | false | 4.566704 | false | false | false |
flgiordano/netcash | +/google-cloud-sdk/lib/surface/container/nodepools/delete.py | 1 | 2953 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | bsd-3-clause | -578,831,552,267,577,600 | 31.450549 | 79 | 0.675246 | false | 4.165021 | false | false | false |
gurovic/oluch2 | oluch/forms.py | 1 | 3254 | from django.utils.translation import ugettext_lazy as _
from django import forms
from django.contrib.auth.models import User
from oluch.models import Submit
class SubmitForm(forms.Form):
file = forms.FileField(label=_("Choose a file"))
user = forms.HiddenInput()
def __init__(self, choices, *arg... | gpl-2.0 | -6,291,880,909,630,117,000 | 54.413793 | 154 | 0.63614 | false | 3.992638 | false | false | false |
DenisCarriere/gopro | examples/open_csv.py | 1 | 1419 | import os
import csv
import time
from datetime import datetime
from datetime import timedelta
from dateutil import parser
import exifread
from pymongo import MongoClient
client = MongoClient()
root = '/home/ubuntu/Pictures/GoPro/'
client.gopro.gpx.remove({})
client.gopro.photos.remove({})
with open(root + 'Gopro2.c... | mit | 5,475,434,421,845,267,000 | 25.792453 | 65 | 0.554616 | false | 3.704961 | false | false | false |
eykd/owyl | examples/boids.py | 2 | 19512 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""boids -- Boids implementation using Owyl behavior trees.
This module provides example code using the L{owyl} library to
implement the Boids flocking algorithm.
Requirements
============
Note: this demo requires Pyglet, Rabbyt, cocos2d
- B{Pyglet}: U{http://pypi.p... | bsd-3-clause | -5,427,581,079,136,333,000 | 30.675325 | 77 | 0.604141 | false | 3.850799 | false | false | false |
urlist/devcharm | articles/migrations/0002_import_previous_articles.py | 1 | 18116 | # -*- coding: utf-8 -*-
from django.db.utils import IntegrityError, ProgrammingError
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models, connection
from articles.models import Article
class Migration(DataMigration):
def get_fu... | gpl-3.0 | -6,591,887,817,401,861,000 | 66.345725 | 120 | 0.525834 | false | 3.834074 | false | false | false |
simpeg/simpeg | examples/08-nsem/plot_foward_MTTipper3D.py | 1 | 3807 | """
MT: 3D: Forward
===============
Forward model 3D MT data.
Test script to use SimPEG.NSEM platform to forward model
impedance and tipper synthetic data.
"""
import SimPEG as simpeg
from SimPEG.EM import NSEM
import numpy as np
import matplotlib.pyplot as plt
try:
from pymatsolver import Pardiso as Solver
exc... | mit | -775,327,344,103,404,200 | 28.511628 | 116 | 0.566851 | false | 2.90389 | false | false | false |
abztrakt/labtracker | client_scripts/ping_service.py | 1 | 2296 | #
# A ping service to be 'compiled' into an exe-file with py2exe.
# To install this service, run 'LabtrackerPingService.py install' at command prompt
# 'Then LabtrackerPingService.py start'
#
#
#Need to download pywin32 in order to import these module
import win32serviceutil
import win32service
i... | apache-2.0 | -5,519,914,994,963,934,000 | 25.662651 | 111 | 0.642422 | false | 3.615748 | false | false | false |
deniskolokol/kinect_log_visualizer | utils.py | 1 | 4602 | import os
import sys
import time
import random
import datetime
from bisect import bisect
from termcolor import colored, cprint
from string import ascii_lowercase, digits, punctuation
import settings
CHARS = ascii_lowercase + digits + punctuation
def relpath(*x):
return os.path.join(settings.BASE_DIR, *x)
def ... | mit | -6,743,224,113,621,126,000 | 26.070588 | 81 | 0.569752 | false | 3.449775 | false | false | false |
suqi/everhelper | sample_code/tutorial.py | 1 | 2550 | # -*- coding:utf-8 -*-
"""
这是用来快速上手Evernote API的测试代码
注意:由于Evernote官方Py库使用的是py2, 其py3分支很久没有更新了,因此这里统一使用py2
个人感觉最好的学习资源,就是sublime-evernote插件
https://github.com/bordaigorl/sublime-evernote/blob/master/sublime_evernote.py
因为那是一个全功能的插件(包括增删改查)
另外一个比较好的资源,是evernote官方代码里的样例
https://github.com/evernote/evernote-sdk-python/b... | mit | -4,224,595,090,090,930,000 | 26.974026 | 113 | 0.75766 | false | 2.120079 | true | false | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-batchai/azure/mgmt/batchai/models/batch_ai_management_client_enums.py | 1 | 1839 | # 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 ... | mit | 7,489,821,665,362,570,000 | 18.357895 | 76 | 0.611746 | false | 3.937901 | false | false | false |
z25/ZOCPApps | zsay/zsayNode.py | 1 | 1853 | #!/usr/bin/python
'''
use subprocess to triggen the say command to do Text to speech
Works on OSX out of the box.
On Ubuntu do apt-get install gnustep-gui-runtime
'''
# IMPORTS
import sys
import subprocess
from zocp import ZOCP
def map(value, istart, istop, ostart, ostop):
return ostart + (ostop ... | gpl-3.0 | 6,593,179,945,152,202,000 | 20.546512 | 76 | 0.529951 | false | 3.529524 | false | false | false |
coyotevz/nbx | nbx/models/fiscal.py | 1 | 1166 | # -*- coding: utf-8 -*-
from nbx.models import db
class FiscalData(db.Model):
__tablename__ = 'fiscal_data'
FISCAL_CONSUMIDOR_FINAL = 'CONSUMIDOR FINAL'
FISCAL_RESPONSABLE_INSCRIPTO = 'RESPONSABLE INSCRIPTO'
FISCAL_EXCENTO = 'EXCENTO'
FISCAL_MONOTRIBUTO = 'MONOTRIBUTO'
_fiscal_types = {
... | gpl-3.0 | 152,274,601,453,172,130 | 28.15 | 79 | 0.611492 | false | 3.005155 | false | false | false |
seewindcn/tortoisehg | src/ext/dulwich/greenthreads.py | 1 | 4958 | # greenthreads.py -- Utility module for querying an ObjectStore with gevent
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Author: Fabien Boucher <fabien.boucher@enovance.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
... | gpl-2.0 | 8,698,830,080,980,818,000 | 34.163121 | 75 | 0.616176 | false | 3.988737 | false | false | false |
hickerson/bbn | fable/fable_sources/libtbx/command_line/line_count.py | 1 | 1442 | from __future__ import division
import sys, os
import re
import libtbx.load_env
boost_python_include_pat = re.compile(r"#include\s*<boost(?:/|_)python");
def run(modules):
directory_paths = [ libtbx.env.dist_path(m) for m in modules ]
line_counts_in_files_of_type = {}
for d in directory_paths:
for root, dir... | mit | -1,620,334,639,011,736,800 | 31.772727 | 78 | 0.582524 | false | 3.277273 | false | false | false |
shawncaojob/LC | PY/459_repeated_substring_pattern.py | 1 | 1188 | # 459. Repeated Substring Pattern Add to List
# DescriptionHintsSubmissionsSolutions
# Total Accepted: 28053
# Total Submissions: 73141
# Difficulty: Easy
# Contributors:
# YuhanXu
# Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring togeth... | gpl-3.0 | -8,715,548,885,708,875,000 | 26.627907 | 255 | 0.610269 | false | 3.423631 | false | false | false |
TC01/calcpkg | calcrepo/repo.py | 1 | 6492 | import copy
import os
import tarfile
import urllib2
import zipfile
from calcrepo import index
from calcrepo import output
from calcrepo import util
class CalcRepository:
"""A class for adding new calcpkg repositories"""
def __init__(self, name, url):
self.name = name
self.url = url
self.output = output.C... | mit | -8,259,769,547,867,269,000 | 29.336449 | 121 | 0.676217 | false | 3.29878 | false | false | false |
slarosa/QGIS | python/plugins/sextante/otb/OTBUtils.py | 3 | 5178 | # -*- coding: utf-8 -*-
"""
***************************************************************************
OTBUtils.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
******************************... | gpl-2.0 | 8,866,819,792,905,386,000 | 38.830769 | 162 | 0.526844 | false | 4.265239 | true | false | false |
huntermalm/SevenStories | SevenStories/updator.py | 1 | 1128 | def update(game_map):
"""Updated the game_map depending on version
:param game_map: The currently loaded GameMap object
:type game_map: class GameMap
:return: True/False depending on if any updates occurred
:rtype: boolean
"""
updated = False
if game_map.version == "0.1.1":
im... | mit | -5,038,023,386,771,104,000 | 35.387097 | 111 | 0.638298 | false | 3.876289 | false | false | false |
tuxnani/open-telugu | ngram/LetterModels.py | 3 | 1883 |
# -*- coding: utf-8 -*-
#
# (C) முத்தையா அண்ணாமலை 2013-2015
#
# N-gram language model for Tamil letters
import tamil
import copy
from .Corpus import Corpus
class Letters:
def __init__(self,filename):
self.letter = dict()
self.letter.update(zip( tamil.utf8.tamil_letters,
... | mit | 2,368,099,136,509,108,000 | 28.380952 | 79 | 0.548352 | false | 3.539197 | false | false | false |
LuoZijun/python-proxy | proxy/__init__.py | 1 | 3560 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import os, sys, time
import socket, struct, select
import thread, logging
import protocols
reload(sys)
sys.setdefaultencoding('utf8')
logging.basicConfig(
# filename ='proxy.log',
format = '%(asctime)s %(message)s',
datefmt = '%Y-%m-%d %H:%M:%S',
level ... | gpl-3.0 | -8,861,070,895,592,761,000 | 28.355372 | 98 | 0.538851 | false | 4.054795 | false | false | false |
JoaquimPatriarca/senpy-for-gis | gasp/osm2lulc/combine.py | 1 | 7837 | """
Methods to update/combine authoritative Land Use/Land Cover Information
with OSM Data
"""
def update_globe_land_cover(
original_globe_raster, osm_urban_atlas_raster, osm_globe_raster, epsg,
updated_globe_raster, detailed_globe_raster):
"""
Update the original Glob Land 30 with the result of the co... | gpl-3.0 | 5,554,260,234,809,204,000 | 33.986607 | 80 | 0.584662 | false | 3.389706 | false | false | false |
dsiddharth/access-keys | keystone/common/config.py | 1 | 14051 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack Foundation
#
# 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
#
# Unle... | apache-2.0 | 7,931,056,553,063,509,000 | 44.472492 | 79 | 0.597822 | false | 4.048113 | true | false | false |
rcosnita/fantastico | fantastico/mvc/models/model_filter_compound.py | 1 | 5048 | '''
Copyright 2013 Cosnita Radu Viorel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute... | mit | 3,021,974,887,476,876,300 | 42.895652 | 128 | 0.684826 | false | 4.267117 | false | false | false |
mcieslik-mctp/papy | doc/examples/buffer.py | 1 | 1113 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from numap import NuMap
from time import sleep
def printer(element):
print element
return element
LEFT_INPUT = ('L0', 'L1', 'L2', 'L3')
RIGHT_INPUT = ('R0', 'R1', 'R2', 'R3')
# LEFT_INPUT RIGHT_INPUT
# | |
# |(printer) |(printer)
# | ... | mit | 4,727,368,988,170,081,000 | 19.611111 | 49 | 0.515723 | false | 2.576389 | false | false | false |
lavalamp-/ws-backend-community | rest/views/elasticsearch/models/mixin.py | 1 | 25755 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404
from django.shortcuts import get_object_or_404
from rest_framework.settings import api_settings
from ..mixin import BaseE... | gpl-3.0 | -154,340,441,295,558,980 | 32.977573 | 121 | 0.656494 | false | 4.547943 | false | false | false |
devdattakulkarni/test-solum | solum/api/controllers/camp/v1_1/plans.py | 1 | 9115 | # -*- coding: utf-8 -*-
#
# 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, soft... | apache-2.0 | 5,306,191,214,696,418,000 | 39.154185 | 79 | 0.602414 | false | 4.052912 | false | false | false |
BTY2684/gitPy-snippets | testProj/main.py | 1 | 1348 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# main.py
#
# Copyright 2014 Yang <yang@Leo-FamilyGuy>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License,... | gpl-2.0 | -295,398,262,035,383,740 | 25.431373 | 74 | 0.699555 | false | 3.156909 | false | false | false |
jhetherly/EnglishSpeechUpsampler | models.py | 1 | 20377 | import tensorflow as tf
custom_shuffle_module = tf.load_op_library('src/shuffle_op.so')
shuffle = custom_shuffle_module.shuffle
# ###################
# TENSORBOARD HELPERS
# ###################
def comprehensive_variable_summaries(var):
"""
Attach a lot of summaries to a Tensor (for TensorBoard visualizatio... | mit | 1,638,412,468,420,272,000 | 39.112205 | 79 | 0.49178 | false | 4.135782 | false | false | false |
nekohayo/meld | meld/filediff.py | 1 | 77547 | ### Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org>
### Copyright (C) 2009-2010 Kai Willadsen <kai.willadsen@gmail.com>
### This program is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; either v... | gpl-2.0 | -8,771,073,025,037,235,000 | 43.110922 | 196 | 0.56126 | false | 3.72303 | false | false | false |
brianlorenz/COSMOS_IMACS_Redshifts | PlotCodes/Plot_2_lines.py | 1 | 2780 | import numpy as np
import matplotlib.pyplot as plt
from astropy.io import ascii
import sys, os, string
import pandas as pd
from astropy.io import fits
import collections
#Folder to save the figures
figout = '/Users/blorenz/COSMOS/Reports/2018/Images/'
#The location with the file for all of our data
fluxdatapath = '/U... | mit | -4,506,119,063,836,019,700 | 28.263158 | 111 | 0.699281 | false | 2.477718 | false | false | false |
cmusatyalab/deltaic | deltaic/sources/__init__.py | 1 | 6246 | #
# Deltaic - an efficient backup system supporting multiple data sources
#
# Copyright (c) 2014 Carnegie Mellon University
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# Thi... | gpl-2.0 | -1,964,339,124,457,846,000 | 34.691429 | 79 | 0.538585 | false | 4.032279 | false | false | false |
slobberchops/rop | art/utils/shrapnel.py | 1 | 1757 | from pen import Pen
from math import sin, cos, pi, sqrt
from random import random
class Shrapnel(Pen):
def __init__(self, matrix, motion_cycles, huedelta=0.001, saturation=1,
radius=0, decelerate=False):
self.centerx = matrix.width/2.0
self.centery = matrix.height/2.0
self... | gpl-3.0 | -1,175,577,868,237,285,400 | 29.293103 | 79 | 0.583381 | false | 3.738298 | false | false | false |
idmillington/papersizes | papersizes/papersize.py | 1 | 9882 | # -*- coding: utf-8 -*-
"""
Page sizes and various mechanisms for manipulating them.
"""
import math
import collections
from .units import mm, inch
# ----------------------------------------------------------------------------
# Page size tuple.
# -----------------------------------------------------------------------... | mit | -5,493,778,113,455,439,000 | 36.245283 | 80 | 0.567332 | false | 4.059646 | false | false | false |
htem/CATMAID | django/applications/catmaid/migrations/0022_cleanup_neurons_and_skeletons.py | 4 | 49681 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
verbose_log = False
def log(msg):
print(" %s" % msg)
def logv(msg):
if verbose_log:
log(msg)
else:
return
class Migration(DataMigration):
def forwards(se... | agpl-3.0 | 2,328,740,279,306,109,400 | 72.492604 | 190 | 0.546547 | false | 3.787816 | false | false | false |
petry/django-photologue-old | photologue/tests/views_gallery.py | 1 | 1840 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime
from django.core.urlresolvers import reverse
from photologue.tests import helpers
from photologue.tests.helpers import RequestTest
YEAR = datetime.now().year
MONTH = datetime.now().ctime().split(' ')[1].lower()
DAY = datetime.now().day
class ... | bsd-3-clause | -3,286,291,012,856,413,000 | 27.765625 | 88 | 0.577174 | false | 3.923241 | true | false | false |
LouisePaulDelvaux/openfisca-france-data | openfisca_france_data/input_data_builders/build_openfisca_indirect_taxation_survey_data/step_0_2_homogeneisation_vehicules.py | 1 | 4481 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redist... | agpl-3.0 | -2,859,668,005,457,323,500 | 38.27193 | 123 | 0.611124 | false | 3.443846 | false | false | false |
elewis33/doorstop | doorstop/core/document.py | 1 | 24092 | """Representation of a collection of items."""
import os
from itertools import chain
from collections import OrderedDict
from doorstop import common
from doorstop.common import DoorstopError, DoorstopWarning
from doorstop.core.base import (add_document, edit_document, delete_document,
... | lgpl-3.0 | 291,275,080,082,622,800 | 36.121726 | 116 | 0.546156 | false | 4.42055 | true | false | false |
SaranyaKarthikeyan/boto | boto/ec2/elb/policies.py | 152 | 3856 | # Copyright (c) 2010 Reza Lotun http://reza.lotun.name
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, m... | mit | 2,679,070,068,852,678,000 | 34.703704 | 77 | 0.643932 | false | 4.205016 | false | false | false |
tensorflow/probability | tensorflow_probability/python/experimental/auto_batching/tf_backend_test.py | 1 | 4331 | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | 8,641,079,420,912,624,000 | 39.476636 | 101 | 0.688294 | false | 3.55 | true | false | false |
iphoting/healthchecks | hc/front/forms.py | 1 | 8776 | from datetime import timedelta as td
import json
import re
from urllib.parse import quote, urlencode
from django import forms
from django.forms import URLField
from django.conf import settings
from django.core.exceptions import ValidationError
from hc.front.validators import (
CronExpressionValidator,
Timezone... | bsd-3-clause | 5,900,701,289,062,930,000 | 29.054795 | 88 | 0.62876 | false | 3.611523 | false | false | false |
gdhungana/desispec | py/desispec/io/fluxcalibration.py | 2 | 5653 | """
desispec.io.fluxcalibration
===========================
IO routines for flux calibration.
"""
from __future__ import absolute_import, print_function
import os
from astropy.io import fits
import numpy,scipy
from desiutil.depend import add_dependencies
from .util import fitsheader, native_endian, makepath
def wri... | bsd-3-clause | -3,059,710,040,801,416,000 | 34.553459 | 85 | 0.656112 | false | 3.248851 | false | false | false |
the-useless-one/blind_injection | injection.py | 1 | 2562 | #!/usr/bin/env python3
#
# -*- coding: utf8 -*-
# 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 i... | gpl-3.0 | 5,222,827,028,218,631,000 | 30.617284 | 82 | 0.570871 | false | 4.033071 | false | false | false |
h4ck3rm1k3/MapNickAutotools | tests/python_tests/load_map_test.py | 1 | 1395 | #!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, sys, glob, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
# We expect these files to not raise any
# exc... | lgpl-2.1 | -6,521,023,405,738,516,000 | 26.9 | 74 | 0.676703 | false | 3.4875 | false | false | false |
rdio/translate-toolkit | tools/pocompile.py | 3 | 3220 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2005, 2006,2010 Zuza Software Foundation
#
# This file is part of the translate-toolkit
#
# translate 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 | 2,589,526,101,237,635,000 | 36.44186 | 136 | 0.659938 | false | 4.154839 | false | false | false |
chengdh/openerp-ktv | openerp/addons/ktv_sale/ktv_helper.py | 1 | 5772 | # -*- coding: utf-8 -*-
from osv import fields
from datetime import date,datetime,time
import logging
_logger = logging.getLogger(__name__)
#时间段选择
def time_for_selection(self,cr,uid,context = None):
ret = [("%02i:00" % i,"%02i时30分" % i) for i in range(24)] + [("%02i:30" % i,"%02i时00分" % (i+1)) for i in range(24)]
... | agpl-3.0 | -5,257,962,662,141,587,000 | 31.951049 | 193 | 0.627547 | false | 2.164446 | false | false | false |
Arcturus314/cansat2017 | CanSat/control.py | 1 | 6550 | import datastore
import timed_input
import packet
import datalogger
import multiprocessing
import position
import time
start_data = False
input_timeout = 3 #3 seconds to wait for response
num_packets = 0
num_failures = 0
init_time = time.time()
print "init_time: ",
print init_time
in_packet = ("",False)
def t_input... | gpl-3.0 | -2,134,036,573,260,997 | 31.914573 | 103 | 0.52687 | false | 3.969697 | false | false | false |
hidenori-t/chainer | cupy/carray.py | 9 | 1722 | import ctypes
import os
import six
from cupy import cuda
MAX_NDIM = 25
def _make_carray(n):
class CArray(ctypes.Structure):
_fields_ = (('data', ctypes.c_void_p),
('size', ctypes.c_int),
('shape', ctypes.c_int * n),
('strides', ctypes.c_int *... | mit | -2,818,954,360,372,897,000 | 22.27027 | 75 | 0.585947 | false | 3.311538 | false | false | false |
maartenbreddels/vaex | packages/vaex-jupyter/vaex/jupyter/__init__.py | 1 | 10408 | # -*- coding: utf-8 -*-
import os
import logging
import time
from .utils import debounced, flush, gather, kernel_tick, interactive_selection, interactive_cleanup # noqa
import vaex
import IPython.display
base_path = os.path.dirname(__file__)
logger = logging.getLogger("vaex.jupyter")
def _add_toolbar(viz):
fro... | mit | 7,665,222,285,347,056,000 | 40.466135 | 153 | 0.613855 | false | 3.966463 | false | false | false |
AlexanderPease/email-waze | app/user.py | 1 | 2998 | import app.basic, settings, ui_methods
import simplejson as json
import logging
import tornado.web
from mongoengine.queryset import Q, DoesNotExist, MultipleObjectsReturned
from db.userdb import User
from db.groupdb import Group
from db.profiledb import Profile
from group_api import AcceptInvite
#####################... | gpl-3.0 | 7,409,164,365,114,897,000 | 31.586957 | 127 | 0.592728 | false | 3.965608 | false | false | false |
City-of-Bloomington/green-rental | scripts/migrate_data.py | 2 | 1731 | """
this is a script to help tranfer a data format
that was used initially to store downloaded geocoded coordinates
to the current one...
not a database migration script
note added *2014.03.01 20:07:37 ... script is older than that
"""
import os, json, codecs, re
from helpers import save_json, load_json, Location, Ge... | agpl-3.0 | -8,462,015,992,887,935,000 | 33.62 | 93 | 0.642981 | false | 3.829646 | false | false | false |
darrencheng0817/AlgorithmLearning | Python/interview/levelSum.py | 1 | 1076 | '''
Created on 2015年12月4日
given [1, [2,3], [[4]]], return sum. 计算sum的方法是每向下一个level权重+1,
例子的sum = 1 * 1 + (2 + 3) * 2 + 4 * 3。follow up:每向下一个level 权重 - 1, sum = 3 * 1 +(2 + 3)* 2 + 4 * 1
@author: Darren
'''
def levelSum(string):
if not string:
return 0
index=0
level=0
maxLevel=0
d={}
... | mit | 2,215,303,086,633,905,700 | 23.707317 | 98 | 0.474308 | false | 3.057402 | false | false | false |
mwx1993/TACTIC | src/tactic/ui/checkin/sandbox_select_wdg.py | 6 | 6093 | ###########################################################
#
# Copyright (c) 2014, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | epl-1.0 | 262,500,904,807,144,000 | 30.246154 | 81 | 0.541605 | false | 3.789179 | false | false | false |
AlessandroZ/LaZagne | Linux/lazagne/softwares/sysadmin/cli.py | 1 | 4072 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import psutil
import pwd
import os
from lazagne.config.module_info import ModuleInfo
from lazagne.config import homes
try:
from ConfigParser import ConfigParser # Python 2.7
except ImportError:
from configparser import ConfigParser # Python 3
class Cli(Modul... | lgpl-3.0 | -487,171,008,708,852,740 | 29.38806 | 106 | 0.4278 | false | 4.959805 | true | false | false |
suvitorg/suvit-odoo | suvit_base/tests/crud.py | 1 | 2195 | # -*- coding: utf-8 -*-
from lxml import etree
from odoo.tests.common import TransactionCase
from odoo.tools.safe_eval import safe_eval as eval
class CRUDCase(TransactionCase):
def crud(self, model, create_vals={}, write_vals={}, check_vals={}, view_id=None):
arch = model.fields_view_get(view_id=view_i... | agpl-3.0 | 5,289,709,077,205,224,000 | 33.296875 | 87 | 0.562187 | false | 3.752137 | false | false | false |
anler/Rockefeller | rockefeller/money.py | 1 | 5943 | # -*- coding: utf-8 -*-
from __future__ import division
import decimal
from collections import namedtuple
from six import PY3
from .exchange_rates import get_exchange_rate
from .exceptions import ExchangeError, MoneyError
def round_amount(amount, currency):
"""Round a given amount using curreny's exponent.
... | mit | 7,846,369,725,114,093,000 | 33.754386 | 98 | 0.628639 | false | 4.135699 | false | false | false |
BunsenMcDubbs/cs4400-project | add_projects.py | 1 | 1707 | from random import randint, sample, choice
from app.models import Category, Designation, Project, Requirement
def add_projects(num_projects=20):
designations = [d['name'] for d in Designation.get_all()]
categories = [c['name'] for c in Category.get_all()]
year = [y['requirement_name'] for y in Requirement.... | mit | 3,880,460,114,864,280,000 | 40.634146 | 99 | 0.60867 | false | 3.718954 | false | false | false |
santumahapatra/django-poll-app | mysite/mysite/settings.py | 1 | 2040 | """
Django settings for mysite project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | mit | 1,138,400,909,693,369,500 | 23 | 71 | 0.719118 | false | 3.202512 | false | false | false |
ytsapras/robonet_site | scripts/OBSOLETE_CODE/update_db.py | 1 | 48917 | ################################################################################################################
# Collection of routines to update the RoboNet database tables
# Keywords match the class model fields in ../robonet_site/events/models.py
#
# Written by Yiannis Tsapras Sep 2015
# Last update:
############... | gpl-2.0 | 7,512,084,029,422,223,000 | 45.410816 | 173 | 0.614224 | false | 3.405054 | false | false | false |
Russell-IO/ansible | lib/ansible/cli/playbook.py | 63 | 8553 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | gpl-3.0 | -1,190,748,893,708,862,500 | 42.637755 | 145 | 0.542734 | false | 4.663577 | false | false | false |
ngsxfem/ngsxfem | setup.py | 1 | 3528 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import re
import sys
import platform
import subprocess
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from distutils.version import LooseVersion
class CMakeExtension(Extension):
def __init__(self, name, sourcedir=... | lgpl-3.0 | -3,344,411,647,456,524,300 | 46.04 | 315 | 0.589569 | false | 3.698113 | false | false | false |
evolaemp/svmcc | code/prepare/utils.py | 1 | 2495 | import re
from lingpy.sequence.sound_classes import ipa2tokens, tokens2class
def make_sample_id(gloss_id, lang1, lang2, index1, index2):
"""
Sample IDs should uniquely identify a feature row.
Sample sample ID: 98/English,German/1,1
"""
assert lang1 < lang2
s = str(gloss_id) + '/'
s += lang1 +','+ lang2 + '/... | mit | -1,881,165,960,155,471,600 | 23.223301 | 75 | 0.625251 | false | 2.677039 | false | false | false |
FrodeSolheim/python-lhafile | lhafile/lhafile.py | 1 | 14048 | # -*- coding:utf-8 -*-
# Copyright (c) 2010 Hidekazu Ohnishi.
# 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
# ... | bsd-3-clause | 9,002,658,663,594,287,000 | 35.865229 | 98 | 0.545202 | false | 3.992043 | false | false | false |
chajadan/dragonfly | dragonfly/engines/base/dictation.py | 5 | 3080 | #
# This file is part of Dragonfly.
# (c) Copyright 2007, 2008 by Christo Butcher
# Licensed under the LGPL.
#
# Dragonfly is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version ... | lgpl-3.0 | -4,009,291,875,308,011,000 | 33.790698 | 76 | 0.612411 | false | 4.422414 | false | false | false |
ariestiyansyah/atlas | users/utilities/helpers.py | 2 | 1942 | # coding=utf-8
"""Helper methods."""
from threading import Thread
from flask import jsonify
from werkzeug.exceptions import HTTPException
from flask_mail import Message
from users import mail, APP
def make_json_error(ex):
"""Return errors as json.
See http://flask.pocoo.org/snippets/83/
:param ex: An e... | gpl-2.0 | -4,620,640,378,158,892,000 | 26.742857 | 76 | 0.670958 | false | 3.915323 | false | false | false |
goldblade/CobemApp | app/modules/adm/controllers/perfil.py | 1 | 3226 | # -*- coding: utf-8 -*-
from flask import render_template, request, redirect, url_for, flash
from . import mod
from flask.ext.login import login_required
from flask.ext import login
from app.models import paginate
from app.modules.adm.models.usuario import Perfil
from app.modules.adm.forms.perfil import PerfilFo... | gpl-2.0 | 5,153,285,524,558,392,000 | 32.265957 | 108 | 0.678161 | false | 2.705042 | false | false | false |
tryolabs/luminoth | luminoth/utils/bbox_transform_tf.py | 1 | 4791 | import tensorflow as tf
def get_width_upright(bboxes):
with tf.name_scope('BoundingBoxTransform/get_width_upright'):
bboxes = tf.cast(bboxes, tf.float32)
x1, y1, x2, y2 = tf.split(bboxes, 4, axis=1)
width = x2 - x1 + 1.
height = y2 - y1 + 1.
# Calculate up right point of b... | bsd-3-clause | 302,808,356,167,152,300 | 30.519737 | 79 | 0.591943 | false | 3.096962 | false | false | false |
uber-common/opentracing-python-instrumentation | opentracing_instrumentation/utils.py | 1 | 1743 | # Copyright (c) 2015 Uber Technologies, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | mit | 4,675,019,730,161,642,000 | 41.512195 | 79 | 0.743546 | false | 4.240876 | false | false | false |
sadimusi/mc4p | mc4p/util.py | 2 | 3264 | # -*- coding: utf-8 -*-
# This source file is part of mc4p,
# the Minecraft Portable Protocol-Parsing Proxy.
#
# Copyright (C) 2011 Matthew J. McGill, Simon Marti
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License v2 as published by
# the Free... | gpl-2.0 | 2,994,194,222,830,003,000 | 24.700787 | 80 | 0.643382 | false | 3.688136 | true | false | false |
CCI-Tools/ect-core | cate/util/sround.py | 2 | 1479 | from typing import Tuple
import math
# max number of significant digits for a 64-bit float
_MAX_SIGNIFICANT_DIGITS_AFTER_DOT = 15
_MIN_EXP = -323
_MAX_EXP = 308
def sround(value: float, ndigits: int = 0, int_part=False) -> float:
"""
Round *value* to significant number of digits *ndigits*.
:param value... | mit | -1,770,504,944,185,274,000 | 26.90566 | 108 | 0.648411 | false | 3.087683 | false | false | false |
janinamass/gardening | Scythe/src/Tools/Scythe_gff2loc.py | 1 | 2365 | #!/usr/bin/python
import re,sys, getopt
#####################################
# last update 03/31/2013 by J. Mass #
# version = '0.1' #
#####################################
def usage():
print ("""
##############################
# Scythe_gff2loc.py v0.1 #
########################... | gpl-3.0 | 4,433,694,549,720,110,000 | 26.183908 | 108 | 0.49556 | false | 2.997465 | false | false | false |
etuna-SBF-kog/Stadsparken | env/lib/python2.7/site-packages/mustachejs/tests/utils.py | 4 | 1294 | """
Testing utilities backported from recent Django versions, for testing with
older Django versions.
"""
from __future__ import with_statement
from django.conf import settings, UserSettingsHolder
from django.utils.functional import wraps
class override_settings(object):
"""
Acts as either a decorator, or ... | gpl-3.0 | -2,958,675,292,093,917,000 | 27.755556 | 78 | 0.646832 | false | 4.386441 | false | false | false |
viswimmer1/PythonGenerator | data/python_files/33345232/save_utils.py | 1 | 3968 | import os
from zipfile import ZipFile
from itertools import izip_longest
from django.conf import settings
from utils import save_to_file, save_to_zip, set_header, get_diff
from apps.weapon.models import Weapon, ECM, Sensor, Repair, Construction, Brain, WeaponSound
from apps.structure.models import Structure, Structure... | gpl-2.0 | 3,776,653,706,209,634,300 | 46.238095 | 212 | 0.715222 | false | 3.830116 | false | false | false |
chandinijain/Auquan-Toolbox | TradingStrategyTemplate.py | 1 | 3670 | from __future__ import absolute_import, division, print_function, unicode_literals
import pandas as pd
import numpy as np
from pythonToolbox.toolbox import backtest
def settings():
exchange = "stocks" # Exchange to download data for (nyse or nasdaq)
markets = ['A','AAPL','IBM','GOOG','C']
# S... | mit | -4,952,343,690,289,032,000 | 44.308642 | 165 | 0.644687 | false | 3.532243 | false | false | false |
ryanpepper/oommf-python | vision/oommf/test_oommf.py | 2 | 1514 | import pytest
def test_oommf_sim():
import oommf
import os.path
oommf.path = "/home/vagrant/oommf-python/oommf/oommf/"
Py = oommf.materials.permalloy
my_geometry = oommf.geometry.Cuboid(
(0, 0, 0), (30, 30, 100), unitlength=1e-9)
sim = oommf.Simulation(my_geometry, cellsize=5e-9, materi... | bsd-2-clause | 7,453,137,607,101,006,000 | 38.842105 | 184 | 0.638045 | false | 2.544538 | false | false | false |
kate-v-stepanova/flowcell_parser | flowcell_parser/classes.py | 1 | 18602 |
import re
import os
import csv
import xml.etree.ElementTree as ET
import logging
import glob
from datetime import datetime
from collections import OrderedDict
from bs4 import BeautifulSoup #html parser
class RunParser(object):
"""Parses an Illumina run folder. It generates data for statusdb
notable attribut... | mit | -6,675,619,845,388,132,000 | 34.982592 | 143 | 0.538921 | false | 4.150379 | false | false | false |
seanny1986/Aerodynamic-Strip-Theory | Aero Strip Theory/forcecalc.py | 1 | 21505 | from __future__ import print_function
import numpy as np
class forcecalc(object):
def __init__(self):
pass
##################--SETTERS--##################
def setsolverparams(self,
timestep,
udot,
vdot,
... | gpl-3.0 | -3,505,475,472,434,140,700 | 35.511036 | 126 | 0.487608 | false | 2.815528 | false | false | false |
TryCatchHCF/DumpsterFire | FireModules/FileDownloads/download_kali.py | 1 | 1314 | #!/usr/bin/python
#
# Filename:
#
# Version: 1.0.0
#
# Author: Joe Gervais (TryCatchHCF)
#
# Summary:
#
# Part of the DumpsterFire Toolset. See documentation at https://github.com/TryCatchHCF/DumpsterFire
#
#
# Description:
#
#
# Example:
#
#
import os, sys, urllib
from FireModules.fire_module_base_class import *
... | mit | -2,891,286,367,684,792,000 | 20.193548 | 104 | 0.713851 | false | 3.041667 | false | false | false |
sternoru/goscalecms | setup.py | 1 | 1601 | import os
import imp
try:
imp.find_module('setuptools')
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
README = open('README.rst').read()
setup(
name = "goscalecms",
version = __import__('goscale').__version__,
packages = ... | bsd-3-clause | -6,431,777,091,402,744,000 | 31.02 | 227 | 0.620862 | false | 4.042929 | false | false | false |
mlperf/inference_results_v0.7 | open/Inspur/code/ssd-resnet34/tensorrt/infer.py | 12 | 5389 | #!/usr/bin/env python3
# Copyright (c) 2020, NVIDIA CORPORATION. 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
#
# U... | apache-2.0 | 930,155,146,158,092,900 | 36.685315 | 130 | 0.62442 | false | 3.345127 | false | false | false |
pydanny/django-admin2 | example/files/migrations/0001_initial.py | 2 | 1262 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='CaptionedFile',
fields=[
('id', models.AutoFiel... | bsd-3-clause | -9,021,473,371,332,954,000 | 34.055556 | 114 | 0.546751 | false | 4.539568 | false | false | false |
indhub/mxnet | python/mxnet/torch.py | 11 | 6714 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -7,899,274,321,398,590,000 | 35.688525 | 99 | 0.584748 | false | 3.691039 | false | false | false |
timwaizenegger/osecm-sdos | mcm/sdos/core/MasterKeySource.py | 2 | 15616 | #!/usr/bin/python
# coding=utf-8
"""
Project MCM - Micro Content Management
SDOS - Secure Delete Object Store
Copyright (C) <2017> Tim Waizenegger, <University of Stuttgart>
This software may be modified and distributed under the terms
of the MIT license. See the LICENSE file for details.
"""
import io
impor... | mit | 7,323,551,077,043,263,000 | 41.434783 | 118 | 0.524974 | false | 4.71213 | false | false | false |
ahmedsalman/django-autotranslate | autotranslate/management/commands/translate_messages.py | 1 | 8592 | import logging
import os
import re
from optparse import make_option
import polib
from django.conf import settings
from django.core.management.base import BaseCommand
from autotranslate.utils import translate_strings
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = ('autotranslate all the... | mit | 3,598,298,534,061,988,000 | 42.393939 | 120 | 0.591597 | false | 4.317588 | false | false | false |
robcarver17/pysystemtrade | sysbrokers/IB/client/ib_client.py | 1 | 3045 | from dateutil.tz import tz
import datetime
from ib_insync import Contract
from ib_insync import IB
from sysbrokers.IB.ib_connection import connectionIB
from syscore.dateutils import strip_timezone_fromdatetime
from syslogdiag.logger import logger
from syslogdiag.log_to_screen import logtoscreen
_PACING_PERIOD_SECO... | gpl-3.0 | 4,736,020,536,605,287,000 | 25.478261 | 108 | 0.625616 | false | 3.722494 | false | false | false |
open-city/school-admissions | api/endpoints.py | 1 | 3229 | from flask import Blueprint, make_response, request, jsonify, \
session as flask_session
import json
from sqlalchemy import Table, func, or_
from api.database import session, engine, Base
from api.models import SourceDest
endpoints = Blueprint('endpoints', __name__)
@endpoints.route('/matrix/')
def matrix():
... | mit | 6,371,344,603,827,604,000 | 38.864198 | 103 | 0.560545 | false | 3.567956 | false | false | false |
Shuailong/Leetcode | solutions/maximum-size-subarray-sum-equals-k.py | 1 | 2057 | #!/usr/bin/env python
# encoding: utf-8
"""
maximum-size-subarray-sum-equals-k.py
Created by Shuailong on 2016-01-06.
https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/.
"""
'''Not solved yet.'''
class Solution(object):
def maxSubArrayLen(self, nums, k):
"""
:type nums: List[... | mit | -1,179,304,352,611,225,900 | 20.893617 | 66 | 0.450656 | false | 3.451342 | false | false | false |
rmichie/TTools | Step1_SegmentStream.py | 1 | 14902 | ########################################################################
# TTools
# Step 1: Create Stream Nodes version 0.953
# Ryan Michie
# This script will take an input polyline feature with unique
# stream IDs and generate evenly spaced points along each
# unique stream ID polyline at a user defined spacing me... | gpl-3.0 | 3,051,930,570,020,387,300 | 40.628492 | 108 | 0.593679 | false | 3.930889 | false | false | false |
westernx/mayatools | mayatools/camera/exporterui.py | 1 | 6399 | from __future__ import absolute_import
from uitools.qt import QtCore, QtGui, Qt
from maya import cmds, mel
import sgpublish.exporter.ui.publish.maya
import sgpublish.exporter.ui.tabwidget
import sgpublish.exporter.ui.workarea
import sgpublish.uiutils
from sgpublish.exporter.ui.publish.generic import PublishSafetyErr... | bsd-3-clause | 3,548,856,518,298,732,000 | 34.159341 | 136 | 0.609783 | false | 4.128387 | false | false | false |
uclouvain/osis | program_management/views/search.py | 1 | 5873 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | 3,858,530,714,304,342,000 | 43.150376 | 115 | 0.701635 | false | 3.858081 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.