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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
woest85/PokemonGo-Map-1 | pogom/models.py | 1 | 39432 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
import itertools
import calendar
import sys
import gc
import time
import geopy
from peewee import SqliteDatabase, InsertQuery, \
IntegerField, CharField, DoubleField, BooleanField, \
DateTimeField, fn, DeleteQuery, CompositeKey, FloatField, SQL, TextField... | agpl-3.0 | -5,867,474,748,991,135,000 | 37.771878 | 224 | 0.531764 | false | 4.088656 | false | false | false |
flavour/iscram | controllers/default.py | 1 | 32108 | # -*- coding: utf-8 -*-
"""
Default Controllers
"""
module = "default"
# -----------------------------------------------------------------------------
def call():
"Call an XMLRPC, JSONRPC or RSS service"
# If webservices don't use sessions, avoid cluttering up the storage
#session.forget()
return... | mit | -8,412,861,163,105,064,000 | 40.216945 | 225 | 0.501557 | false | 4.23924 | false | false | false |
reiven/pungabot | util/ptime.py | 3 | 1715 | #!/usr/bin/python
# -*- coding: iso8859-1 -*-
## (c)2004 Timo Reunanen <parker _et_ wolfenstein _dit_ org>
import time
import re
_exact=r'''
^
(?P<hour> \d{1,2}) ## hour
[:.]
(?P<min> \d{2}) ## minutes
(?:
[:.]
(?P<sec>\d{2} ) ## secods (optional)
)?
$
'''
_add=r'''
^
[+]
(?: ## ho... | gpl-3.0 | 5,110,685,968,079,071,000 | 20.708861 | 79 | 0.498542 | false | 2.877517 | false | false | false |
michellab/Sire | wrapper/Tools/AmberLoader.py | 2 | 31281 | #!/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import re
from Sire.IO import *
from Sire.Mol import *
from Sire.CAS import *
from Sire.System import *
from Sire.Move import *
from Sire.MM import *
from Sire.FF import *
from Sire.Units import *
from Sire.Vol import *
from Sire.Maths import *
from Sire.... | gpl-2.0 | 2,624,787,477,966,018,000 | 35.581287 | 131 | 0.583304 | false | 3.97825 | false | false | false |
tshi04/machine-learning-codes | headGAN-ff/headgan.py | 1 | 3126 | import re
import numpy as np
import tensorflow as tf
from model import *
class headGAN(object):
def __init__(self, d_net, g_net, wordvec, article, title, wd_list):
print 'GAN headline'
self.wordvec = wordvec
self.article = article
self.title = title
self.d_net = d_net
... | gpl-3.0 | -7,351,620,951,786,911,000 | 34.931034 | 108 | 0.555982 | false | 2.943503 | false | false | false |
joelphillips/pypyramid | src/pypyr/assembly.py | 1 | 9235 | '''
Created on Aug 17, 2010
@author: joel
'''
import numpy
from pypyr.mesh import Basis, ElementFinder, ElementQuadrature, BoundaryQuadrature
import itertools as it
from pypyr.timing import *
def processIndices(basis, boundarytags):
""" Given a basis (a collection of elements) and a set of boundaries, extract the... | bsd-3-clause | 246,970,839,694,353,700 | 49.741758 | 183 | 0.663996 | false | 3.797286 | false | false | false |
JaneliaSciComp/Neuroptikon | Source/Scripts/C. elegans/Centrality.py | 1 | 2516 | # Copyright (c) 2010 Howard Hughes Medical Institute.
# All rights reserved.
# Use is subject to Janelia Farm Research Campus Software Copyright 1.1 license terms.
# http://license.janelia.org/license/jfrc_copyright_1_1.html
"""
A custom centrality script for the C. elegans network.
"""
import networkx
# Load th... | bsd-3-clause | 7,372,495,485,617,536,000 | 46.471698 | 134 | 0.738871 | false | 3.949765 | false | false | false |
cloudera/hue | desktop/core/ext-py/josepy-1.1.0/setup.py | 2 | 2983 | import io
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
version = '1.1.0'
# Please update tox.ini when modifying dependency version requirements
install_requires = [
# load_pem_private/public_key (>=0.6)
# rsa_recover_prime_factors (>=0.8)
... | apache-2.0 | -2,400,312,496,107,875,000 | 25.39823 | 78 | 0.60476 | false | 3.61138 | true | false | false |
LouisChen1905/OneAnalyser | src/one_analyse/request_code.py | 1 | 1851 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 2016年4月10日
@author: chensi
'''
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.orm.session import sessionmaker
from one_analyse import one_engine
from threadpool import ThreadPool, makeRequests
from one_analyse.lib.db.ormtables import OneOR... | mit | -4,420,334,246,598,185,500 | 28.774194 | 73 | 0.61897 | false | 3.667992 | false | false | false |
gwct/grampa | helper_scripts/grampa_plot.py | 1 | 3054 | import sys, os
############################################
def barPlot(xdata,ydata,xtitle,ytitle,maintitle,outname,barcol='rgb(0,102,51)',plotcol='#e1e1ea',bgcol='#fffae6',w=1000,h=1000,bmar=150):
data = [go.Bar(x=xdata,y=ydata,marker=dict(color=barcol),opacity=0.6)];
layout = go.Layout(
autosize=False,
width=... | gpl-3.0 | 2,242,864,692,299,380,500 | 23.238095 | 140 | 0.609037 | false | 2.660279 | false | false | false |
tectronics/open-ihm | src/openihm/model/household.py | 3 | 3987 | #!/usr/bin/env python
"""
This file is part of open-ihm.
open-ihm 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.
open-ihm is di... | lgpl-3.0 | 3,986,717,152,432,254,000 | 39.53125 | 257 | 0.663155 | false | 4.123061 | false | false | false |
Adarnof/adarnauth-whsales | whsales/urls.py | 1 | 2103 | """whsales URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | gpl-3.0 | 6,050,143,814,335,140,000 | 47.906977 | 80 | 0.66001 | false | 3.181543 | false | false | false |
DMS-Aus/Roam | ext_libs/cx_Freeze/samples/matplotlib/matplotlib_eg.py | 1 | 1652 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from numpy import arange, sin, pi
import matplotlib
matplotlib.use('WXAgg')
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.backends.backend_wx import NavigationToolbar2Wx
from matplotlib.figure import Figure
import sys
impor... | gpl-2.0 | -2,295,577,713,273,751,000 | 29.592593 | 79 | 0.616828 | false | 3.463312 | false | false | false |
benrudolph/commcare-hq | corehq/ex-submodules/phonelog/migrations/0003_auto__del_userlog__del_log__add_userentry__add_unique_userentry_xform_.py | 3 | 6323 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'UserLog'
db.delete_table(u'phonelog_userlog')
# Deleting model 'Log'
db... | bsd-3-clause | -2,299,862,887,122,350,000 | 54.464912 | 109 | 0.588486 | false | 3.45708 | false | false | false |
karimbahgat/PythonGis | (sandbox,tobemerged)/pythongis/raster/loader.py | 1 | 11514 | import sys, os, itertools, operator
import PIL.Image
import itertools
def grouper(iterable, n):
args = [iter(iterable)] * n
return itertools.izip(*args)
def from_file(filepath):
def check_world_file(filepath):
dir, filename = os.path.split(filepath)
filename, filetype = os.path.splitext(... | mit | -6,514,481,410,946,916,000 | 38.84083 | 162 | 0.556106 | false | 3.904374 | false | false | false |
a-parhom/edx-platform | scripts/xsslint/xsslint/utils.py | 15 | 11534 | """
Utility classes/functions for the XSS Linter.
"""
import re
def is_skip_dir(skip_dirs, directory):
"""
Determines whether a directory should be skipped or linted.
Arguments:
skip_dirs: The configured directories to be skipped.
directory: The current directory to be tested.
Return... | agpl-3.0 | -2,525,840,043,737,450,000 | 31.767045 | 111 | 0.581325 | false | 4.491433 | false | false | false |
tectronics/coot | python/jligand_gui.py | 4 | 4622 |
# This happens when user clicks on the "Launch JLigand" button.
# It starts a jligand and puts it in the background.
#
def launch_jligand_function():
global jligand_jar
global jligand_home_env
global java_command
start_jligand_listener()
# maybe this should rather check PATH or similar!? FIXM... | gpl-3.0 | -8,485,911,911,103,284,000 | 41.796296 | 84 | 0.463436 | false | 3.940324 | false | false | false |
zbqf109/goodo | openerp/addons/sale_stock/tests/test_sale_stock.py | 1 | 10525 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.addons.sale.tests.test_sale_common import TestSale
class TestSaleStock(TestSale):
def test_00_sale_stock_invoice(self):
"""
Test SO's changes when playing around with stock moves, quants... | gpl-3.0 | -8,601,836,444,490,651,000 | 59.142857 | 217 | 0.645986 | false | 3.671085 | true | false | false |
Pushjet/Pushjet-Server-Api | utils.py | 1 | 3199 | from re import compile
from json import dumps
from flask import request, jsonify
from functools import wraps
from models import Service
from shared import zmq_relay_socket
uuid = compile(r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$')
service = compile(r'^[a-zA-Z0-9]{4}-[a-zA-Z0-9]{6}... | bsd-2-clause | 53,105,573,924,442,610 | 35.352273 | 134 | 0.615505 | false | 3.315026 | false | false | false |
katstalk/android_external_chromium_org | tools/win/toolchain/get_toolchain_if_necessary.py | 23 | 4403 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import ctypes.wintypes
import hashlib
import json
import os
import subprocess
import sys
BASEDIR = os.path.dirname(os.path.abspath(__file__))
GetFileAttr... | bsd-3-clause | 7,618,586,585,814,765,000 | 30.905797 | 78 | 0.671588 | false | 3.49722 | false | false | false |
ellisgeek/AllSeeingEye | allSeeingEye.py | 1 | 7922 | """
All Seeing Eye
Oracle Client Install Helper!
Elliott Saille
12/3/13
"""
#Include only specific functions
from subprocess import call
from os import name
from os import system
from os import access
from os import R_OK
from os import W_OK
from os import makedirs
from os import path
from os import environ
from os impo... | gpl-3.0 | -2,110,420,134,937,973,800 | 29.007576 | 158 | 0.601237 | false | 3.788618 | false | false | false |
aldian/tensorflow | tensorflow/python/kernel_tests/variable_scope_test.py | 4 | 57583 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -5,723,243,853,738,241,000 | 43.192632 | 80 | 0.639998 | false | 3.648882 | true | false | false |
jmckib/soundcurl | src/soundcurl.py | 1 | 4951 | #!/usr/bin/env python
from HTMLParser import HTMLParser
import json
import shutil
from StringIO import StringIO
import sys
import traceback
import urllib2
from bs4 import BeautifulSoup
from mutagen.id3 import ID3, APIC, TIT2, TPE1
unescape_html = HTMLParser().unescape
def main():
try:
if len(sys.argv) !... | apache-2.0 | -6,992,734,706,741,720,000 | 36.793893 | 88 | 0.611392 | false | 3.802611 | false | false | false |
vbatoufflet/machette | machette/module/split.py | 1 | 3365 | # -*- coding: utf-8 -*-
#
# This file is a part of Machette.
#
# Copyright (C) 2010 Vincent Batoufflet <vincent@batoufflet.info>
#
# This software is released under the terms of the GNU General Public License
# version 3 or any later version. See LICENSE file for further details.
#
# $Id$
import gtk
import pygtk
impor... | gpl-3.0 | 8,518,862,810,468,989,000 | 31.355769 | 78 | 0.618425 | false | 3.806561 | false | false | false |
webeng/DeepLearningTutorials | code/sktheano_cnn_v2.py | 1 | 37558 | """This tutorial introduces the LeNet5 neural network architecture
using Theano. LeNet5 is a convolutional neural network, good for
classifying images. This tutorial shows how to build the architecture,
and comes with all the hyper-parameters you need to reproduce the
paper's MNIST results.
This implementation simpl... | bsd-3-clause | 1,384,039,947,904,350,500 | 31.631625 | 175 | 0.664785 | false | 2.902024 | true | false | false |
skewerr/deskbot | modules/commands/decide.py | 1 | 1511 | import random
from .. import irc, var
# Fill command dictionary.
def ins_command ():
var.commands["decide"] = type("command", (object,), {})()
var.commands["decide"].method = decide
var.commands["decide"].tags = ["other"]
var.commands["decide"].aliases = [".decide", ".choose"]
var.commands["decide"].usage = [
... | bsd-3-clause | -9,165,051,844,989,602,000 | 32.577778 | 106 | 0.598279 | false | 2.939689 | false | false | false |
CeltonMcGrath/TACTIC | src/tactic/ui/startup/column_edit_wdg.py | 6 | 10659 | ###########################################################
#
# Copyright (c) 2005-2008, 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 ... | epl-1.0 | -5,752,984,038,108,893,000 | 28.941011 | 173 | 0.535604 | false | 3.810869 | true | false | false |
polarise/python-bioclasses | BioClasses/FrameshiftTranscript.py | 1 | 3519 | # -*- encoding: utf-8 -*-
from __future__ import division
import sys
import scipy
from FrameshiftSite import *
class FrameshiftTranscript( object ):
def __init__( self, name, length ):
self.name = name
self.length = length
self.frameshift_sites = dict()
def add_frameshift_site( self, position, signal, radian... | gpl-2.0 | -4,739,742,955,990,341,000 | 33.165049 | 236 | 0.658142 | false | 2.786223 | false | false | false |
tcpcloud/openvstorage | webapps/api/backend/views/users.py | 1 | 6661 | # Copyright 2014 Open vStorage NV
#
# 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 writ... | apache-2.0 | 967,324,019,206,811,600 | 38.414201 | 107 | 0.605915 | false | 4.42004 | false | false | false |
Godricly/zhihu_cup | concise_data.py | 2 | 2604 | from read_embed import read_embed
char_raw = open('sorted_char_count.txt').readlines()
word_raw = open('sorted_word_count.txt').readlines()
char_raw = [v.strip().split(',') for v in char_raw]
word_raw = [v.strip().split(',') for v in word_raw]
char = [v[0] for v in char_raw]
char = {k:0 for k in char}
word = [v[0] for ... | mit | -8,551,566,206,774,961,000 | 29.635294 | 63 | 0.580261 | false | 2.649034 | false | false | false |
yfried/ansible | lib/ansible/module_utils/facts/virtual/openbsd.py | 199 | 2319 | # 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 later version.
#
# Ansible is distributed in the hope that ... | gpl-3.0 | 5,320,738,837,033,867,000 | 35.234375 | 81 | 0.695558 | false | 3.964103 | false | false | false |
massimo-nocentini/on-python | beazley-metaprogramming/execly/execly.py | 1 | 3654 | # execly.py
#
# Example of generating code and executing it with exec()
# in the context of descriptors/metaclasses
from inspect import Parameter, Signature
import re
from collections import OrderedDict
# Utility functions
def _make_init(fields):
'''
Give a list of field names, make an __init__ method
'''... | mit | -5,169,347,624,705,959,000 | 23.689189 | 68 | 0.557471 | false | 3.95027 | false | false | false |
snakedragon/scrapy-hive | starlord/test/geetest-demo.py | 1 | 3901 | # -*- coding: utf-8 -*-
from starlord.ocr.api import *
import requests
import selenium
from selenium import webdriver
import json, urllib,urllib2
import hashlib
from urllib import urlencode
from selenium.webdriver.common import keys as KEYS
import bs4
import sys
import time
from selenium.webdriver.common.action_chains... | apache-2.0 | -1,942,913,534,372,948,200 | 20.692737 | 93 | 0.617564 | false | 3.055075 | false | false | false |
HackerTool/vivisect | vivisect/impemu/emulator.py | 2 | 19864 | import struct
import traceback
import itertools
import envi
import envi.bits as e_bits
import envi.memory as e_mem
import envi.registers as e_reg
import visgraph.pathcore as vg_path
from vivisect.const import *
# Pre-initialize a stack memory bytes
init_stack_map = ''
for i in xrange(8192/4):
init_stack_map += ... | apache-2.0 | -5,625,522,150,030,716,000 | 32.724958 | 119 | 0.540727 | false | 3.967246 | false | false | false |
mday299/MAVProxy | setup.py | 2 | 2663 | from setuptools import setup
version = "1.5.1"
setup(name='MAVProxy',
version=version,
zip_safe=True,
description='MAVProxy MAVLink ground station',
long_description='''A MAVLink protocol proxy and ground station. MAVProxy
is oriented towards command line operation, and is suitable for embeddi... | gpl-3.0 | 8,074,820,753,599,540,000 | 47.418182 | 90 | 0.651145 | false | 4.206951 | false | false | false |
pydicom/sendit | sendit/logger.py | 1 | 8575 | # -*- coding: utf-8 -*-
'''
logger.py: Simple logger for sendit. Note that levels info and log are the
only two considered stdout, the rest are sent to stderr.
Copyright (c) 2017 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentatio... | mit | 2,299,047,214,545,847,600 | 29.734767 | 95 | 0.580175 | false | 4.293941 | false | false | false |
cyanfish/heltour | heltour/tournament/automod.py | 1 | 17435 | from heltour import settings
from heltour.tournament.models import *
from django.db.models.signals import post_save
from django.dispatch.dispatcher import receiver
from heltour.tournament.tasks import pairings_published
import reversion
import time
logger = logging.getLogger(__name__)
@receiver(post_save, sender=Mod... | mit | -8,901,362,672,809,592,000 | 45.002639 | 107 | 0.638142 | false | 3.958002 | false | false | false |
kescobo/util_hutlab | workflows/strainphlan_workflow.py | 1 | 4981 | #!/usr/bin/env python
"""
bioBakery Workflows: strainphlan
Copyright (c) 2018 Harvard School of Public Health
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 witho... | mit | 1,441,946,323,739,177,000 | 56.918605 | 224 | 0.775146 | false | 3.846332 | true | false | false |
gudeg-united/mishapp-api | mishapp_api/views/__init__.py | 1 | 3263 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from flask import Blueprint
from flask import jsonify
from webargs import Arg
from webargs import ValidationError
from webargs.flaskparser import use_args
from mishapp_a... | bsd-3-clause | 3,217,415,846,938,317,300 | 24.692913 | 66 | 0.569108 | false | 3.550598 | false | false | false |
ehliang/myo-unlock | myo/lowlevel/enums.py | 1 | 3312 | # Copyright (c) 2015 Niklas Rosenstein
#
# 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, ... | mit | 4,962,799,579,743,529,000 | 23.533333 | 79 | 0.670592 | false | 3.603917 | false | false | false |
ClimateImpactLab/open-estimate | openest/generate/smart_curve.py | 1 | 19082 | """Curve classes that apply to xarray Datasets.
Curves are mathematical functions on one or more independent
variables. The basic form of the curves classes is in
`models/curve.py`. The curve classes defined here, derived from
`SmartCurve`, take Datasets as arguments.
Smart Curves fall back on Curve logic, but take x... | gpl-3.0 | 1,786,271,144,499,775,000 | 39.427966 | 173 | 0.600933 | false | 3.987879 | false | false | false |
leopoul/ncclient | ncclient/devices/nexus.py | 15 | 3378 | """
Handler for Cisco Nexus device specific information.
Note that for proper import, the classname has to be:
"<Devicename>DeviceHandler"
...where <Devicename> is something like "Default", "Nexus", etc.
All device-specific handlers derive from the DefaultDeviceHandler, which implements the
generic information ... | apache-2.0 | 8,493,074,875,138,781,000 | 34.1875 | 87 | 0.618413 | false | 4.134639 | false | false | false |
em-2/em2 | em2/utils/network.py | 1 | 2025 | import asyncio
import logging
from aiohttp import ClientSession
from async_timeout import timeout
from em2 import Settings
from em2.exceptions import StartupException
logger = logging.getLogger('em2.utils')
async def _wait_port_open(host, port, delay, loop):
step_size = 0.05
steps = int(delay / step_size)
... | mit | -8,350,600,370,374,822,000 | 35.160714 | 113 | 0.633086 | false | 3.715596 | false | false | false |
ushahidi/riverid-python | api/riversite.py | 1 | 1288 | # RiverID Site Class
# ==================
#
# This file is part of RiverID.
#
# RiverID 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 v... | agpl-3.0 | -7,584,865,214,060,750,000 | 32.894737 | 77 | 0.659161 | false | 3.638418 | false | false | false |
mendrugory/monkey-note-bot | app/model/notelist.py | 1 | 2987 | def find(db, user):
"""
find the notelist
:param db:
:param user:
:return:
"""
document = db.notelist.find_one({"_id": user})
return document
def find_all_lists(db, user):
"""
It finds all lists
:param db:
:param user:
:return:
"""
document = db.notelist.fin... | mit | 5,042,442,036,290,355,000 | 21.976923 | 102 | 0.544024 | false | 3.239696 | false | false | false |
LTD-Beget/sprutio-rpc | lib/FileManager/workers/local/extractArchive.py | 1 | 12194 | import gzip
import os
import pprint
import threading
import time
import traceback
import libarchive
import pyinotify
import rarfile
from lib.FileManager.FM import REQUEST_DELAY
from lib.FileManager.LibArchiveEntry import Entry
from lib.FileManager.SevenZFile import SevenZFile
from lib.FileManager.ZipFile import ZipFi... | gpl-3.0 | -8,980,587,258,137,486,000 | 40.868966 | 119 | 0.480152 | false | 4.439488 | false | false | false |
gkc1000/pyscf | pyscf/nao/test/test_0044_h2_scf_gto_vs_nao_nao.py | 1 | 1518 | # Copyright 2014-2018 The PySCF Developers. 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 appl... | apache-2.0 | 1,189,539,529,152,935,200 | 36.95 | 95 | 0.685771 | false | 3.079108 | true | false | false |
wangheda/youtube-8m | youtube-8m-wangheda/all_frame_models/cnn_lstm_memory_model.py | 1 | 3248 | import sys
import models
import model_utils
import math
import numpy as np
import video_level_models
import tensorflow as tf
import utils
import tensorflow.contrib.slim as slim
from tensorflow import flags
FLAGS = flags.FLAGS
class CnnLstmMemoryModel(models.BaseModel):
def cnn(self,
model_input,
... | apache-2.0 | 2,656,356,261,795,894,000 | 36.333333 | 105 | 0.607759 | false | 3.608889 | false | false | false |
edips/GeoEndaze | QT_DESIGNER/calculatorUi.py | 1 | 2079 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'calculatorUi.ui'
#
# Created: Mon Jan 6 00:27:51 2014
# by: pyside-uic 0.2.14 running on PySide 1.1.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_hesap(object):
def setupUi(s... | gpl-2.0 | -3,659,458,863,494,783,000 | 43.234043 | 117 | 0.665705 | false | 3.315789 | false | false | false |
constantinius/YaaGame | engine/gui.py | 1 | 1804 | from engine.service import (
AbstractService, GraphicsService,
ServiceManager
)
import pyglet
import kytten
class GuiService(AbstractService):
""" Service to manage GUI screens """
def __init__(self, window, group_index = 1):
self.guis = {}
self.window = window
self.batch = Ser... | mit | 2,763,050,527,148,521,500 | 27.650794 | 67 | 0.547672 | false | 4.008889 | false | false | false |
justinchuby/cmu-courseapi-flask | common/search.py | 1 | 20717 | import re
import copy
import json
import arrow
import datetime
# Elasticsearch libraries, certifi required by Elasticsearch
import elasticsearch
from elasticsearch_dsl import Search
from elasticsearch_dsl.query import Q
from elasticsearch_dsl.connections import connections
import certifi
from common import Message, u... | mit | -2,254,356,826,381,168,400 | 32.041467 | 99 | 0.526572 | false | 4.052621 | true | false | false |
amrishparmar/mal_cl_interface | nl_interface/ui.py | 1 | 1055 | from time import sleep
from multiprocessing.pool import ThreadPool
import click
def loading_animation(msg):
"""Print out one rotation of a spinning bar loading animation
:param msg: A string, the message to display
"""
for c in "|/-\\":
click.echo("\r{}...{}".format(msg, c), nl=False)
... | mit | -6,162,271,973,474,892,000 | 29.142857 | 85 | 0.675829 | false | 4.105058 | false | false | false |
xuru/restler | tests/test_modelstrategy.py | 2 | 1362 | import unittest
from restler.serializers import ModelStrategy
from tests.models import Model1
class ModelStrategyTest(unittest.TestCase):
def test_empty_strategy(self):
ms = ModelStrategy(Model1)
self.assertEqual(len(ms._ModelStrategy__name_map()), 0)
def test_all_strategy(self):
ms ... | mit | 1,966,132,408,643,636,200 | 34.842105 | 122 | 0.64464 | false | 3.651475 | true | false | false |
arcyfelix/Courses | 18-05-05-Apache-Spark-with-Python-Big-Data-with-PySpark-and-Spark/6_Spark_SQL/3_UkMakerSpacesSparkSQL.py | 1 | 1041 | from pyspark.sql import SparkSession, functions as fs
if __name__ == "__main__":
session = SparkSession.builder.appName("UkMakerSpaces").master("local[*]").getOrCreate()
makerSpace = session.read.option("header", "true") \
.csv("data/uk-makerspaces-identifiable-data.csv")
# Using pyspark's functi... | apache-2.0 | 8,371,738,106,421,133,000 | 42.416667 | 109 | 0.661864 | false | 3.589655 | false | false | false |
bowen0701/algorithms_data_structures | lc0204_count_primes.py | 1 | 1610 | """Leetcode 204. Count Primes
Easy
URL: https://leetcode.com/problems/count-primes/
Count the number of prime numbers less than a non-negative number, n.
Example:
Input: 10
Output: 4
Explanation: There are 4 prime numbers less than 10, they are 2, 3, 5, 7.
"""
class SolutionSqrt(object):
def _is_prime(self, i):... | bsd-2-clause | 859,565,256,147,556,600 | 21.054795 | 74 | 0.496273 | false | 3.292434 | false | false | false |
markushutzler/pygeda | pygeda/commands/stat.py | 1 | 2610 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pygeda - Support tool for Electonic Design Automation
# Copyright (C) 2017 Markus Hutzler
#
# 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, eithe... | gpl-3.0 | 3,676,940,689,704,679,000 | 33.342105 | 76 | 0.598467 | false | 3.681241 | false | false | false |
mlperf/training_results_v0.6 | Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/tests/webgl/test_local_gemm.py | 2 | 1217 | import tvm
import numpy as np
def test_local_gemm():
if not tvm.module.enabled("opengl"):
return
if not tvm.module.enabled("llvm"):
return
nn = 1024
n = tvm.var('n')
n = tvm.convert(nn)
m = n
l = n
A = tvm.placeholder((n, l), name='A', dtype='int32')
B = tvm.placeho... | apache-2.0 | -773,018,145,437,749,000 | 28.682927 | 80 | 0.539852 | false | 2.657205 | false | false | false |
prculley/gramps | gramps/gui/plug/report/_textreportdialog.py | 11 | 3750 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2006 Donald N. Allingham
# Copyright (C) 2008-2009 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... | gpl-2.0 | 959,766,771,137,691,500 | 34.046729 | 79 | 0.549867 | false | 4.6875 | false | false | false |
yaukwankiu/armor | tests/colourbartest.py | 1 | 5176 | '''
Make a colorbar as a separate figure.
'''
from matplotlib import pyplot
import matplotlib as mpl
# Make a figure and axes with dimensions as desired.
fig = pyplot.figure(figsize=(8,3))
ax1 = fig.add_axes([0.05, 0.80, 0.9, 0.15])
ax2 = fig.add_axes([0.05, 0.475, 0.9, 0.15])
ax3 = fig.add_axes([0.05, 0.15, 0.9, 0.1... | cc0-1.0 | -155,821,429,262,094,200 | 37.058824 | 113 | 0.482998 | false | 3.61958 | false | false | false |
wummel/wok | woklib/renderers.py | 1 | 3367 | # -*- coding: iso-8859-1 -*-
from __future__ import print_function
import logging
from .util import has_module
if not has_module('pygments'):
logging.warn('Pygments not enabled.')
# List of available renderers
all = []
class Renderer(object):
"""Base renderer class."""
extensions = []
@classmethod
... | mit | 2,064,293,836,571,738,400 | 27.533898 | 83 | 0.6139 | false | 4.23522 | false | false | false |
brahle/fitmarket-python-api | fitmarket_api/models/status.py | 1 | 5711 | # coding: utf-8
"""
Fitmarket
Mali broj ljudi - donori - dijele dnevna mjerenja svoje težine. Iz dnevne težine jednog donora određujemo vrijednosti dviju dionica: - dionica X ima vrijednost koja odgovara težini donora na taj dan. - inverzna dionica ~X ima vrijednost (150 kg - X). Primjetimo da: - kako X r... | apache-2.0 | -3,221,127,743,901,845,000 | 29.972826 | 850 | 0.578523 | false | 3.81204 | false | false | false |
slosar/april | py/MCMCAnalyzer.py | 1 | 7508 | #
# This is the MCMC module.
# it spits out chains that are compatible with CosmoMC
# it calculates cov matrix during burn-in.
# chain_num tells it to spit out multi-node chains.
# optional temperature makes it sample at a higher temperature but note that
# this guy, as opposed to cosmomc, reweights the weights on the ... | gpl-2.0 | -819,347,348,433,912,800 | 32.368889 | 119 | 0.532898 | false | 3.635835 | false | false | false |
drJfunk/gbmgeometry | gbmgeometry/gbm_frame.py | 1 | 4791 | import astropy.coordinates as coord
import astropy.units as u
import numpy as np
from astropy.coordinates import BaseCoordinateFrame, Attribute, RepresentationMapping
from astropy.coordinates import frame_transform_graph
class GBMFrame(BaseCoordinateFrame):
"""
Fermi GBM Frame
Parameters
-------... | mit | 2,118,053,221,106,580,000 | 31.371622 | 85 | 0.548111 | false | 3.265849 | false | false | false |
I-sektionen/i-portalen | wsgi/iportalen_django/exchange_portal/migrations/0008_auto_20180129_1747.py | 1 | 3257 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.utils.timezone import utc
import datetime
class Migration(migrations.Migration):
dependencies = [
('exchange_portal', '0007_auto_20171121_2041'),
]
operations = [
migrati... | mit | 2,449,549,004,156,473,000 | 50.870968 | 356 | 0.64148 | false | 3.258359 | false | false | false |
Tiloon/Object-Recognition | src/desc.py | 1 | 2184 | import numpy
import math
class descriptor:
def __init__(self):
self.size_sub_squares = 8
self.eps = 0.00001
def create_descriptors(self, features, img):
descriptors = {}
floatImg = img.astype(numpy.float64)
desNum = len(features)
for i in range(desNum):
... | mit | 7,932,203,387,093,352,000 | 38.017857 | 109 | 0.473443 | false | 3.230769 | false | false | false |
nish10z/CONCUSS | lib/coloring/basic/optimization_interval.py | 3 | 3058 | #!/usr/bin/python
#
# This file is part of CONCUSS, https://github.com/theoryinpractice/concuss/,
# and is Copyright (C) North Carolina State University, 2015. It is licensed
# under the three-clause BSD license; see LICENSE.
#
from lib.util.memorized import memorized
import sys
import copy
import random
# @memori... | bsd-3-clause | -8,832,448,500,417,851,000 | 25.824561 | 79 | 0.478417 | false | 3.555814 | false | false | false |
pedroallenrevez/MemLinguo | memlingo/dictionary.py | 1 | 4495 | #!/usr/bin/env python
# future
# standard lib
# third-party
# memlingo
import memlingo.yandex as yandex
# local
# try/except
class WordDictionary:
'''WordDictionary contains all your known words from a given language.
It is a simple dictionary that maps <word, card>.
Attributes
----------
lang: ... | mit | 8,505,630,829,982,515,000 | 30 | 79 | 0.575083 | false | 4.240566 | false | false | false |
sebastien17/MAVlink_plug | example/Test_GroundControl.py | 1 | 1814 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# This file is part of MAVlinkplug.
# MAVlinkplug 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 Soft... | bsd-3-clause | 4,902,761,369,695,845,000 | 35.3 | 127 | 0.661521 | false | 3.35305 | false | false | false |
kovidgoyal/kitty | kittens/diff/options/types.py | 1 | 6324 | # generated by gen-config.py DO NOT edit
# vim:fileencoding=utf-8
import typing
from kitty.conf.utils import KeyAction, KittensKeyMap
import kitty.conf.utils
from kitty.rgb import Color
import kitty.rgb
from kitty.types import ParsedShortcut
import kitty.types
option_names = ( # {{{
'added_bg',
'added_margin_bg',... | gpl-3.0 | 1,632,852,033,682,323,000 | 36.642857 | 99 | 0.618912 | false | 3.084878 | false | false | false |
KnoxMakers/KM-Laser | extensions/km_deps/libfuturize/fixes/fix_raise.py | 3 | 3884 | """Fixer for 'raise E, V'
From Armin Ronacher's ``python-modernize``.
raise -> raise
raise E -> raise E
raise E, 5 -> raise E(5)
raise E, 5, T -> raise E(5).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)
raise (((E, E'), E''), E'''), 5 -> raise E(5)
raise "foo", V, T -... | gpl-3.0 | 1,069,032,594,874,147,500 | 35.299065 | 80 | 0.530896 | false | 3.73821 | false | false | false |
Catrodigious/OctoPrint-TAM | src/octoprint/server/__init__.py | 1 | 9654 | # coding=utf-8
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
import flask
import tornado.wsgi
from sockjs.tornado import SockJSRouter
from flask import Flask, render_template, send_from_directory, make_response
from flask.ext.login i... | agpl-3.0 | -5,305,622,735,948,998,000 | 31.498316 | 172 | 0.708247 | false | 3.416637 | true | false | false |
cslarsen/dna-traits | py-dnatraits/dna_traits/health.py | 1 | 12313 | # -*- encoding: utf-8 -*-
"""
Used to infer some health related reports.
Use with caution, this code may contain errors!
Copyright (C) 2014, 2016 Christian Stigen Larsen
Distributed under the GPL v3 or later. See COPYING.
"""
from dna_traits.match import unphased_match, assert_european
from dna_traits.util import m... | gpl-3.0 | -7,864,582,680,967,866,000 | 34.686957 | 125 | 0.608512 | false | 3.137615 | false | false | false |
mhance/physics | Snowmass/DelphesReader/scripts/make_limits.py | 2 | 20360 | #!/usr/bin/env python
"""
Author: Sourabh Dube
Make XML files for one channel, with the right uncertainties
"""
import os,sys,commands,subprocess
import argparse
import ROOT
from ROOT import TH1F,TFile
def SetupWorkspace(backgrounds,
sign,
data,
lumiuncer,
... | gpl-2.0 | 2,355,134,792,932,228,000 | 33.803419 | 207 | 0.460658 | false | 3.747469 | false | false | false |
pimoroni/python-sparkfun-zx | zx.py | 1 | 1180 | import smbus
ADDR = 0x10
bus = smbus.SMBus(1)
__debug = False
SWIPE_RIGHT = 0x01
SWIPE_LEFT = 0x02
SWIPE_UP = 0x03
HOVER = 0x05
HOVER_LEFT = 0x06
HOVER_RIGHT = 0x07
HOVER_UP = 0x08
def gesture_name(gesture):
if gesture is None or gesture > HOVER_UP:
return None
return [
None,
'Swipe... | bsd-3-clause | 194,380,839,664,205,600 | 17.4375 | 96 | 0.608475 | false | 2.712644 | false | false | false |
deepmind/deepmind-research | byol/utils/optimizers.py | 1 | 6161 | # Copyright 2020 DeepMind Technologies Limited.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | apache-2.0 | 7,526,814,321,664,008,000 | 31.771277 | 80 | 0.678624 | false | 3.57574 | false | false | false |
madscatt/zazzie_1.5 | trunk/sassie/build/gui_mimic_pdbrx.py | 1 | 1026 | import sys, os
import logging
sys.path.append('./')
import sassie.build.pdb_rx as pdb_rx
import sassie.util.sasconfig as sasconfig
import sassie.interface.input_filter as input_filter
import multiprocessing
svariables = {}
#### user input ####
#### user input ####
#### user input ####
runname = 'run_0'
pdbfile = ... | gpl-3.0 | 7,903,234,656,523,687,000 | 22.318182 | 79 | 0.669591 | false | 3.147239 | false | true | false |
spilgames/novacek | novacek/auth.py | 1 | 2979 | #!/usr/bin/env python
#
# vim: set expandtab:ts=4:sw=4
#
# Authors: Jasper Capel
# Robert van Leeuwen
#
# Funtion: Handles authentication to various OpenStack API's and
# other authentication based (Keystone) functions
#
# This software is released under the terms of the Apache License.
#
from keystoneclie... | apache-2.0 | -6,892,060,041,972,486,000 | 34.047059 | 129 | 0.642497 | false | 3.914586 | false | false | false |
eroicaleo/LearningPython | HandsOnML/ch09/house_gd.py | 1 | 1695 | #!/usr/bin/env python
import numpy as np
import tensorflow as tf
from sklearn.datasets import fetch_california_housing
from sklearn.preprocessing import StandardScaler
learning_rate = 0.01
n_epochs = 10000
def scaler_norm(a):
return StandardScaler().fit(a).transform(a)
housing = fetch_california_housing()
m, n ... | mit | 2,936,218,098,030,359,600 | 28.224138 | 91 | 0.672566 | false | 2.76509 | false | false | false |
hoytak/lazyrunner | lazyrunner/pnstructures.py | 1 | 34464 | from treedict import TreeDict
from parameters import applyPreset
from collections import defaultdict
from os.path import join, abspath, exists, split
from os import makedirs
import hashlib, base64, weakref, sys, gc, logging
from itertools import chain
from collections import namedtuple
from pmodule import isPModule, ge... | bsd-3-clause | -8,434,984,872,523,774,000 | 33.292537 | 121 | 0.539084 | false | 4.394797 | false | false | false |
KlubJagiellonski/Politikon | events/models.py | 1 | 30976 | # -*- coding: utf-8 -*-
import json
import logging
from collections import defaultdict
from dateutil.relativedelta import relativedelta
from math import exp
from unidecode import unidecode
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core.validators import RegexValidator
fr... | gpl-2.0 | -519,453,585,463,597,000 | 32.918771 | 108 | 0.591942 | false | 3.552132 | false | false | false |
baverman/scribes-goodies | scribes_helpers/scribes/helpers/signals.py | 1 | 2297 | from gsignals import weak_connect, connect_all as gsignals_connect_all
from gsignals.signals import attach_signal_connect_info
from SCRIBES.TriggerManager import TriggerManager as CoreTriggerManager
def connect_all(obj, *managers, **external_gobjects):
for m in managers:
if isinstance(m, TriggerManager):
... | mit | 3,299,106,395,166,423,600 | 34.338462 | 96 | 0.641707 | false | 4.238007 | false | false | false |
stephane-martin/salt-debian-packaging | salt-2016.3.2/salt/transport/ipc.py | 1 | 25403 | # -*- coding: utf-8 -*-
'''
IPC transport classes
'''
# Import Python libs
from __future__ import absolute_import
import logging
import socket
import msgpack
import weakref
import time
# Import Tornado libs
import tornado
import tornado.gen
import tornado.netutil
import tornado.concurrent
from tornado.ioloop import I... | apache-2.0 | 184,623,737,381,527,700 | 34.47905 | 119 | 0.578829 | false | 4.420219 | false | false | false |
Alex-Ian-Hamilton/sunpy | sunpy/tests/setup_command.py | 1 | 4158 | # -*- coding: utf-8 -*-
"""
Created on Sat Jun 7 19:36:08 2014
@author: Stuart Mumford
This file is designed to be imported and ran only via setup.py, hence it's
dependency on astropy_helpers which will be available in that context.
"""
from __future__ import absolute_import, division, print_function
import os
fro... | bsd-2-clause | 7,418,370,620,876,246,000 | 32.804878 | 80 | 0.550505 | false | 4.340292 | true | false | false |
johnlinp/telegram-good-timing-bot | goodtiming/core/bot.py | 1 | 1942 | import goodtiming.core.i18n
from goodtiming.core.parser import CompositeParser
from goodtiming.core.processor import CompositeProcessor
from goodtiming.core.renderer import CompositeRenderer
import goodtiming.core.database
import goodtiming.modules.addtodo
import goodtiming.modules.reporttiming
import goodtiming.mod... | bsd-3-clause | -7,889,959,222,115,885,000 | 35.641509 | 166 | 0.677652 | false | 3.995885 | false | false | false |
pjdelport/django | django/contrib/auth/tests/context_processors.py | 5 | 6705 | import os
from django.conf import global_settings
from django.contrib.auth import authenticate
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.contrib.auth.models import User, Permission
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.context_processors impo... | bsd-3-clause | -3,832,255,872,866,182,000 | 38.910714 | 81 | 0.646085 | false | 4.328599 | true | false | false |
mcouthon/benes | core/matrix.py | 1 | 9583 | import math
import numpy
from numpy import linalg as LA
import sympy
from sympy.core.symbol import Dummy
from sympy.simplify.simplify import nsimplify
import calculations
import itertools
import q_vec
#import scipy
#import scipy.linalg
class matrix_factory(object):
@staticmethod
def get_probability_matrix(n, q... | gpl-3.0 | -6,711,100,729,631,826,000 | 33.471223 | 110 | 0.514244 | false | 4.033249 | false | false | false |
sidnarayanan/BAdNet | train/images/utils.py | 1 | 3654 | import numpy as np
# import seaborn
from collections import namedtuple
from keras import backend as K
from keras.engine.topology import Layer
from scipy.interpolate import interp1d
## Loss functions
dice_smooth = 1.
def dice_coef(y_true, y_pred):
y_true_f = K.flatten(y_true)
y_pred_f = K.flatten(y_pred)
... | mit | 6,423,772,911,152,429,000 | 31.336283 | 96 | 0.511768 | false | 2.886256 | false | false | false |
nicolashainaux/mathmaker | mathmaker/lib/document/content/geometry/intercept_theorem_butterfly.py | 1 | 10506 | # -*- coding: utf-8 -*-
# Mathmaker creates automatically maths exercises sheets
# with their answers
# Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com>
# This file is part of Mathmaker.
# Mathmaker is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | gpl-3.0 | 337,846,521,828,428,540 | 45.078947 | 79 | 0.488007 | false | 4.199041 | false | false | false |
ireapps/coding-for-journalists | 6_from_apis/completed/fun_with_sqlite_done.py | 1 | 1985 | # SQLite is a lightweight database manager that's part of Python's standard
# library, so it's a good example of how to hook a script up to a database.
# If you work in MySQL or Postgres, there are libraries you can use to make
# a connection and gain similar functionality.
import sqlite3
# Connect to a test database... | mit | 9,214,594,952,591,105,000 | 32.083333 | 77 | 0.689673 | false | 3.550984 | false | false | false |
bearing/dosenet-analysis | D3S_analysis/radon_variation_analysis.py | 1 | 19367 | import importlib
import io
import os
import csv
import math
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib.path as path
import matplotlib.dates as mdates
from dateutil.parser import parse
from datetime import datetime
from datetime import timedelta
# Python 2 ... | mit | 2,582,159,175,080,987,600 | 35.132463 | 124 | 0.539887 | false | 3.404887 | false | false | false |
chienlieu2017/it_management | odoo/addons/mrp/models/stock_picking.py | 5 | 1241 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class StockPickingType(models.Model):
_inherit = 'stock.picking.type'
code = fields.Selection(selection_add=[('mrp_operation', 'Manufacturing Operation')])
count_mo_todo = f... | gpl-3.0 | 8,673,702,273,649,559,000 | 44.962963 | 136 | 0.647059 | false | 3.693452 | false | false | false |
orgito/ansible | lib/ansible/modules/remote_management/oneview/oneview_san_manager_facts.py | 120 | 3321 | #!/usr/bin/python
# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -1,306,415,450,797,404,700 | 29.46789 | 110 | 0.666366 | false | 3.681818 | true | false | false |
mendax-grip/cfdemUtilities | foam/getVelocitiesFoam.py | 2 | 3743 | # This program converts OpenFOAM raw data for the velocity field to a text file with
# both position and velocity vector
#
# Output format :
# position (x y z) and velocity vector
# THIS PROGRAM REQUIRES A DIRECTORY U in the main folder
#
#
# Author : Bruno Blais
#Python imports
#----------------
import os
import s... | lgpl-3.0 | 1,780,018,183,711,861,800 | 23.148387 | 137 | 0.597115 | false | 2.850724 | false | false | false |
h01ger/voctomix | voctogui/lib/studioclock.py | 1 | 3272 | import math
import time
import cairo
from gi.repository import Gtk, GLib
# studio clock that displays a clock like mentioned in:
# https://masterbase.at/studioclock/#C3CD2D
class StudioClock(Gtk.ToolItem):
__gtype_name__ = 'StudioClock'
# set resolution of the update timer in seconds
timer_resolution = ... | mit | -424,392,922,117,431,940 | 36.181818 | 73 | 0.558068 | false | 3.469777 | false | false | false |
pbanaszkiewicz/amy | amy/workshops/tests/test_diff.py | 1 | 4086 | from django.urls import reverse
from reversion import revisions as reversion
from reversion.models import Version
from reversion.revisions import create_revision
from workshops.models import Event, Person, Tag
from workshops.tests.base import TestBase
class TestRevisions(TestBase):
def setUp(self):
self.... | mit | -2,616,457,965,333,948,000 | 33.05 | 84 | 0.569995 | false | 3.925072 | true | false | false |
ieguiguren/menu | scripts/get_menu.py | 1 | 2134 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import os
hostname = os.uname()[1]
if hostname == "server1":
prepath = "/opt"
elif hostname == "octopussy":
prepath = "/home/xir/dev"
import sys, urllib, os,cStringIO
try:
import pycurl
except:
print "Intentando instalar pycurl"
try:
os.system... | gpl-3.0 | -8,420,493,370,423,797,000 | 26.358974 | 139 | 0.614339 | false | 3.175595 | false | false | false |
machinalis/eff | eff_site/urls.py | 1 | 7722 | # Copyright 2009 - 2011 Machinalis: http://www.machinalis.com/
#
# This file is part of Eff.
#
# Eff 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 l... | gpl-3.0 | 3,161,027,209,666,449,400 | 48.5 | 94 | 0.654105 | false | 3.295775 | false | false | false |
ngr/sm_00 | slave/views.py | 1 | 4072 | ### Slave API Views ###
from django.db.models import F, Count
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import generics
from rest_framework import permissions
from rest_framework import pagination
from slave.mode... | mit | 1,533,044,917,512,156,700 | 40.4375 | 103 | 0.618124 | false | 4.299894 | false | false | false |
mistergone/college-costs | paying_for_college/tests/test_models.py | 1 | 6953 | #!/usr/bin/env python
# -*- coding: utf8 -*-
import json
import dateutil.parser
import mock
from django.test import TestCase
from paying_for_college.models import School, Contact, Program, Alias, Nickname
from paying_for_college.models import ConstantCap, ConstantRate, Disclosure
from paying_for_college.models import... | cc0-1.0 | 5,558,168,240,107,250,000 | 41.139394 | 88 | 0.562347 | false | 3.961823 | true | false | false |
rxcomm/qtile | libqtile/widget/memory.py | 6 | 1883 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Jörg Thalheim (Mic92)
#
# 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, cop... | mit | -5,031,802,817,300,626,000 | 38.208333 | 79 | 0.694474 | false | 4.029979 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.