repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
FreeOpcUa/python-opcua
opcua/common/instantiate.py
1
5606
""" Instantiate a new node and its child nodes from a node type. """ import logging from opcua import Node from opcua import ua from opcua.common import ua_utils from opcua.common.copy_node import _rdesc_from_node, _read_and_copy_attrs logger = logging.getLogger(__name__) def instantiate(parent, node_type, nodeid=...
lgpl-3.0
-3,443,361,974,097,699,300
42.457364
178
0.600428
false
anselmobd/fo2
src/estoque/models.py
1
3782
import datetime from pprint import pprint from django.contrib.auth.models import User from django.db import models from produto.models import ProdutoItem class EstoquePermissions(models.Model): class Meta: verbose_name = 'Permissões de estoque' managed = False permissions = ( ...
mit
4,410,419,019,604,873,000
27.293233
78
0.612809
false
maas/maas
src/maasserver/rbac.py
1
15583
from collections import defaultdict from functools import partial import http.client import threading from typing import Mapping, Sequence, Union from urllib.parse import parse_qs, quote, urlparse import attr from maasserver.macaroon_auth import ( APIError, AuthInfo, get_auth_info, MacaroonClient, ...
agpl-3.0
665,017,665,849,337,200
32.297009
78
0.571713
false
maas/maas
src/maasserver/models/space.py
1
6013
# Copyright 2015-2016 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Space objects.""" import datetime import re from django.core.exceptions import PermissionDenied, ValidationError from django.db.models import CharField, Manager, TextFie...
agpl-3.0
-8,030,477,149,762,342,000
32.220994
79
0.620323
false
vmware/pyvmomi-community-samples
samples/getvmsbycluster.py
1
4534
#!/usr/bin/env python """ Written by Chris Hupman Github: https://github.com/chupman/ Example: Get guest info with folder and host placement """ import json from tools import cli, service_instance data = {} def get_nics(guest): nics = {} for nic in guest.net: if nic.network: # Only return adapter ...
apache-2.0
2,445,535,360,479,337,000
38.426087
81
0.60322
false
ASoftTech/Scons-Tools-Grbd
scons_tools_grbd/Tools/MSBuild/VC/Dll2Lib.py
1
3979
""" Dll2Lib This tool will generate a .lib file under windows for a given .dll file This uses dumpfile to export a list of symbols dumpbin /exports C:\yourpath\yourlib.dll The list of symbols is then written to a .def file The lib command is then used to generate the .lib file from the .def file ...
mit
-6,572,437,492,332,772,000
30.614754
83
0.617994
false
liliasapurina/python_training
test/test_contacts.py
1
2349
__author__ = '1' import re def test_contacts_on_home_page(app): address_from_home_page = app.address.get_address_list()[0] address_from_edit_page = app.address.get_address_info_from_edit_page(0) assert address_from_home_page.all_phones_from_home_page == merge_phones_like_on_home_page(address_from_edit_page...
apache-2.0
-2,452,055,065,751,226,400
46.959184
121
0.62069
false
robozman/pymumblegui
pymumble/pymumble_py3/mumble.py
1
24841
# -*- coding: utf-8 -*- import threading import logging import time import select import socket import ssl import struct from .errors import * from .constants import * from . import users from . import channels from . import blobs from . import commands from . import callbacks from . import tools from . import soundou...
gpl-3.0
-3,118,328,671,455,202,300
41.318569
178
0.605088
false
evgenybf/pyXLWriter
pyXLWriter/utilites.py
1
4897
# pyXLWriter: A library for generating Excel Spreadsheets # Copyright (c) 2004 Evgeny Filatov <fufff@users.sourceforge.net> # Copyright (c) 2002-2004 John McNamara (Perl Spreadsheet::WriteExcel) # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Publi...
lgpl-2.1
-7,616,251,451,061,417,000
30.391026
77
0.590157
false
ngokevin/zamboni
settings_test.py
1
2958
import atexit import os import tempfile from mkt.settings import ROOT _tmpdirs = set() def _cleanup(): try: import sys import shutil except ImportError: return tmp = None try: for tmp in _tmpdirs: shutil.rmtree(tmp) except Exception, exc: sys....
bsd-3-clause
2,432,286,399,915,075,000
22.291339
77
0.701826
false
yfpeng/pengyifan-leetcode
src/main/python/pyleetcode/next_greater_element.py
1
1874
""" You are given two arrays (without duplicates) nums1 and nums2 where nums1's elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2. The Next Greater Number of a number x in nums1 is the first greater number to its right in nums2. If it does not exi...
bsd-3-clause
-2,137,404,932,578,816,800
30.25
122
0.623799
false
ProgrammingRobotsStudyGroup/robo_magellan
scripts/kill_switch.py
1
3880
#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
8,239,543,852,723,142,000
33.954955
81
0.569072
false
jul/dsat
setup.py
1
1616
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages import unittest import sys import os sys.path += [ "./dsat" ] import dsat #TODO call make text with sphinx (please don't use system) before #building/install fcontent = lambda f: open(f).read() def test(): print "TEST SKIP...
bsd-2-clause
1,446,415,715,708,504,300
27.350877
67
0.591584
false
phtagn/sickbeard_mp4_automator
tmdb_api/tmdb.py
1
14699
#!/usr/bin/env python #-*- coding:utf-8 -*- #author:doganaydin #project:themoviedb #repository:http://github.com/doganaydin/themoviedb #license: LGPLv3 http://www.gnu.org/licenses/lgpl.html """An interface to the themoviedb.org API""" __author__ = "doganaydin" __version__ = "1.0b" try: import simplejson except: ...
mit
-7,890,947,823,603,571,000
35.026961
149
0.598476
false
fossfreedom/coverart-browser
coverart_controllers.py
1
28816
# -*- Mode: python; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*- # # Copyright (C) 2012 - fossfreedom # Copyright (C) 2012 - Agustin Carrasco # # 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 Fou...
gpl-3.0
-712,676,144,686,856,600
32.941107
111
0.58877
false
neo900/skyline
src/horizon/listen.py
1
4999
import socket from os import kill, getpid from Queue import Full from multiprocessing import Process from struct import Struct, unpack from msgpack import unpackb from cPickle import loads import logging import settings logger = logging.getLogger("HorizonLog") class Listen(Process): """ The listener is resp...
mit
-8,091,358,596,528,935,000
31.044872
91
0.455091
false
bavla/Graph
PsCoresTQ.py
1
2315
gdir = 'c:/users/batagelj/work/python/graph/graph' # wdir = 'c:/users/batagelj/work/python/graph/JSON/test' wdir = 'c:/users/batagelj/work/python/graph/JSON/SN5' import sys, os, datetime, json sys.path = [gdir]+sys.path; os.chdir(wdir) import GraphNew as Graph import TQ # fJSON = 'ConnectivityWeighted.json' # f...
gpl-3.0
3,479,323,956,564,014,600
36.583333
71
0.577538
false
HarmonyEnterpriseSolutions/harmony-platform
src/gnue/common/datasources/drivers/ldap/Connection.py
1
5525
# GNU Enterprise Common Library - Generic DBSIG2 database driver - Connection # # Copyright 2000-2007 Free Software Foundation # # This file is part of GNU Enterprise. # # GNU Enterprise is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public # License as published by the ...
gpl-2.0
5,706,516,712,830,585,000
31.122093
87
0.520543
false
doraemonext/wechat-platform
wechat_platform/system/response/models.py
1
7805
# -*- coding: utf-8 -*- import logging from time import time from django.db import models from wechat_sdk.messages import EventMessage from system.official_account.models import OfficialAccount logger_response = logging.getLogger(__name__) class ResponseManager(models.Manager): """ 微信服务器响应消息记录表 Manager ...
bsd-2-clause
8,729,925,608,646,641,000
30.864865
95
0.579952
false
blab/antibody-response-pulse
bcell-array/code/Virus_Bcell_IgM_IgG_Landscape.py
1
11385
# coding: utf-8 # # Antibody Response Pulse # https://github.com/blab/antibody-response-pulse # # ### B-cells evolution --- cross-reactive antibody response after influenza virus infection or vaccination # ### Adaptive immune response for repeated infection # In[1]: ''' author: Alvason Zhenhua Li date: 04/09/201...
gpl-2.0
5,572,586,783,299,461,000
36.084691
257
0.622047
false
moyogo/ufo2ft
Lib/ufo2ft/outlineCompiler.py
1
55408
import logging import math from collections import Counter, namedtuple from io import BytesIO from types import SimpleNamespace from fontTools.cffLib import ( CharStrings, GlobalSubrsIndex, IndexedStrings, PrivateDict, SubrsIndex, TopDict, TopDictIndex, ) from fontTools.misc.arrayTools impo...
mit
6,340,247,939,920,733,000
36.062207
88
0.600022
false
only4hj/fast-rcnn
lib/roi_data_layer/minibatch.py
1
22641
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Compute minibatch blobs for training a Fast R-CNN network.""" impor...
mit
2,063,657,557,521,492,200
40.619485
126
0.548209
false
Princeton-CDH/derrida-django
derrida/outwork/migrations/0001_initial.py
1
1186
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-17 18:44 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import mezzanine.core.fields class Migration(migrations.Migration): initial = True dependencies = [ ('people', '...
apache-2.0
759,727,622,976,371,800
34.939394
185
0.604553
false
phalcon/readthedocs.org
readthedocs/vcs_support/backends/hg.py
1
3235
import csv from StringIO import StringIO from projects.exceptions import ProjectImportError from vcs_support.base import BaseVCS, VCSVersion class Backend(BaseVCS): supports_tags = True supports_branches = True fallback_branch = 'default' def update(self): super(Backend, self).update() ...
mit
-1,967,239,795,073,363,200
30.407767
75
0.4983
false
Crystalnix/house-of-life-chromium
chrome/test/functional/chromeos_security.py
1
1213
#!/usr/bin/python # Copyright (c) 2011 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 os import pyauto_functional import pyauto class ChromeosSecurity(pyauto.PyUITest): """Security tests for chrome on ChromeOS...
bsd-3-clause
-6,535,854,804,755,249,000
27.880952
74
0.677659
false
sotlampr/personal-site
app/blog/views.py
1
3882
from datetime import datetime from flask import abort, flash, request, render_template, redirect, url_for from flask.ext.login import login_required, current_user from sqlalchemy import desc from . import blog from .forms import PostForm, DeleteForm from ..models import db, Post @blog.route('/') @blog.route('/inde...
mit
6,123,719,996,085,297,000
29.328125
75
0.569809
false
b-jazz/stravamous
src/converter.py
1
1697
import logging import os import subprocess def out_for_in(in_path): return '{0}.gpx'.format(os.path.splitext(os.path.basename(in_path))[0]) class Converter(object): def __init__(self, config, input_path): self.config = config self.logger = logging.getLogger() self.input_file = input...
lgpl-3.0
-3,339,667,609,686,575,000
40.390244
141
0.551562
false
jesonyang001/qarepo
askbot/__init__.py
1
3117
""" :synopsis: the Django Q&A forum application Functions in the askbot module perform various basic actions on behalf of the forum application """ import os import platform VERSION = (0, 7, 51) #keys are module names used by python imports, #values - the package qualifier to use for pip REQUIREMENTS = { 'akisme...
gpl-3.0
-2,211,768,841,389,933,000
29.558824
73
0.655759
false
OmeGak/indico-plugins
vc_vidyo/indico_vc_vidyo/api/cache.py
1
1207
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
5,846,497,963,158,314,000
31.621622
78
0.710853
false
AndrewGoldstein/grasshopper
tests/test_models.py
1
1954
# -*- coding: utf-8 -*- """Model unit tests.""" import datetime as dt import pytest from grasshopper.user.models import Role, User from .factories import UserFactory @pytest.mark.usefixtures('db') class TestUser: """User tests.""" def test_get_by_id(self): """Get user by ID.""" user = User...
bsd-3-clause
1,862,980,038,182,105,900
28.164179
63
0.589048
false
roboime/pyroboime
roboime/core/skills/gotolooking.py
1
1250
# # Copyright (C) 2013-2015 RoboIME # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distrib...
agpl-3.0
-3,651,936,077,924,898,000
31.051282
70
0.6704
false
rodluger/everest
docs/mcmc.py
1
2721
"""MCMC example for transit fitting.""" import matplotlib.pyplot as pl from everest import Everest, TransitModel import numpy as np import emcee from tqdm import tqdm from corner import corner def lnprior(x): """Return the log prior given parameter vector `x`.""" per, t0, b = x if b < -1 or b > 1: ...
mit
202,969,213,362,555,870
28.901099
72
0.632488
false
cxcsds/ciao-contrib
crates_contrib/images.py
1
4630
# # Copyright (C) 2012, 2015, 2016, 2019 # Smithsonian Astrophysical Observatory # # # 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, or # (at you...
gpl-3.0
6,630,351,362,508,218,000
30.496599
86
0.630886
false
marinho/django-plus
djangoplus/test_utils.py
1
3702
"""Utilities for test modules""" import os, unittest, doctest from django.core.serializers import deserialize from django.db.models import get_apps from django.test.simple import get_tests from django.core import management try: set except: from sets import Set as set def load_fixture(path, file_type='json')...
lgpl-3.0
1,829,607,644,906,898,000
30.641026
100
0.641545
false
nburn42/tensorflow
tensorflow/python/keras/optimizers.py
1
29041
# 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
-7,980,310,125,156,015,000
33.125734
80
0.621811
false
lintrace/GravityFalls3
gravity_falls.py
1
1529
#!/usr/bin/python3 """ Главный файл для запуска Решение шифрограмм из книги "Дневник Гравити Фоллз 3" """ import atbash_chiper, caesar_cipher, vigenere_cipher print('='*80) print('Зашифровано шифром Цезаря, см. коментарии к строкам выше (место в книге)') print('='*80) for line in open('caesar.txt'): if line[0] ==...
gpl-3.0
8,400,138,516,059,571,000
34.766667
207
0.689655
false
Azure/azure-sdk-for-python
sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py
1
30361
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-6,312,953,112,437,856,000
48.609477
232
0.638319
false
thomas-schmid-ubnt/avocado
selftests/unit/test_restclient_response.py
1
2038
import unittest from avocado.core.restclient import response class ResultResponseTest(unittest.TestCase): GOOD_DATA = ('{"count": 1, "next": null, "previous": null, ' '"results": [ { "name": "unknown" } ] }') BAD_DATA_JSON = '{"count": 1' BAD_DATA_COUNT = ('{"counter": 1, "next": null...
gpl-2.0
6,398,491,293,295,591,000
33.542373
71
0.539745
false
kmike/opencorpora-tools
tests/test_corpora.py
1
10519
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division, unicode_literals import os try: import unittest2 as unittest except ImportError: import unittest import tempfile import shutil from collections import OrderedDict from opencorpora.reader import CorpusReader TEST_DATA = ...
mit
-6,981,211,611,246,779,000
32.363014
90
0.588586
false
jackdpage/libxpxpy
docs/conf.py
1
9182
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # libxpxpy documentation build configuration file, created by # sphinx-quickstart on Fri Apr 8 10:16:11 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
apache-2.0
3,913,105,727,664,243,700
31.330986
79
0.705838
false
ucb-sejits/ctree
ctree/c/codegen.py
1
6213
""" Code generator for C constructs. """ from ctree.codegen import CodeGenVisitor from ctree.c.nodes import Op from ctree.types import codegen_type, get_suffix from ctree.precedence import UnaryOp, BinaryOp, TernaryOp, Cast from ctree.precedence import get_precedence, is_left_associative from numbers import Number f...
bsd-2-clause
4,827,430,226,630,825,000
33.325967
99
0.55062
false
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/test/test_list.py
3
5684
import sys from test import list_tests import pickle import unittest class ListTest(list_tests.CommonTest): type2test = list def test_basic(self): self.assertEqual(list([]), []) l0_3 = [0, 1, 2, 3] l0_3_bis = list(l0_3) self.assertEqual(l0_3, l0_3_bis) self.assertTrue(l...
gpl-2.0
3,338,669,728,257,395,000
34.304348
77
0.521464
false
nuagenetworks/vspk-python
vspk/v6/nuegressauditacltemplate.py
1
21660
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
bsd-3-clause
4,749,001,960,045,595,000
32.792512
772
0.605263
false
mbartling/TAMU_senior_design
Python/gps2local.py
1
1458
#! /usr/bin/env python from numpy import * import sys #p1 = [30.625621, -96.336753] #p2 = [30.624388, -96.335755] #p3 = [30.626050, -96.333368] #p4 = [30.627195, -96.334945] xres = 300 yres = 500 lat = [] lon = [] for line in sys.stdin: line.strip() (latS, lonS, dummy) = line.split(',') lat.appe...
mit
-899,562,376,890,822,100
20.78125
66
0.593964
false
rasbt/python-machine-learning-book
code/optional-py-scripts/ch05.py
1
19830
# Sebastian Raschka, 2015 (http://sebastianraschka.com) # Python Machine Learning - Code Examples # # Chapter 5 - Compressing Data via Dimensionality Reduction # # S. Raschka. Python Machine Learning. Packt Publishing Ltd., 2015. # GitHub Repo: https://github.com/rasbt/python-machine-learning-book # # License: MIT # ht...
mit
-2,251,548,366,903,846,100
30.032864
79
0.595209
false
Dragon2fly/vpngate-with-proxy
old/config.py
1
4265
# -*- coding: utf-8 -*- __author__ = 'duc_tin' import ConfigParser import re import sys def ctext(text, color): """ Add color to printed text :type text: str :type color: str """ fcolor = {'p': '\033[95m', # purple 'b': '\033[94m', # blue 'g': '\033[92m', # green ...
gpl-2.0
-464,604,793,038,710,300
35.775862
96
0.516061
false
gengwg/leetcode
179_largest_number.py
1
1445
# -*- coding: utf-8 -*- # 179. Largest Number # Given a list of non negative integers, # arrange them such that they form the largest number. # # For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. # # Note: The result may be very large, # so you need to return a string instead of an integer. # ...
apache-2.0
-4,658,683,190,685,438,000
25.098039
77
0.57701
false
alex-bauer/kelvin-power-challenge
src/features/features_saaf.py
1
1680
"""Concatenate and resample SAAF data""" import sys import os sys.path.append("../") from utils.utils import * folder = config.features_folder if not os.path.exists(folder): os.makedirs(folder) def parse_saaf(filename, dropna=True): df = pd.read_csv(config.data_folder + '/' + filename) df = convert_t...
mit
8,595,800,424,774,629,000
27.982759
102
0.683333
false
heray1990/google-python-exercises
babynames/babynames.py
1
2636
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names exercise Define the extract_names() function below and c...
apache-2.0
2,648,205,463,664,366,600
25.626263
82
0.647951
false
ryanjoneil/docker-image-construction
dicp/solvers/most_common.py
1
1247
from collections import defaultdict class MostCommonHeuristic(object): '''Heuristic that shares the most common command at any point''' _slug = 'most-common' def slug(self): return MostCommonHeuristic._slug def solve(self, problem, saver): # Keep track of what hasn't been assigned and...
mit
5,420,271,509,696,158,000
30.974359
87
0.588613
false
Balannen/LSMASOMM
atom3/Kernel/ErrorHandlers/exceptionStreamHook.py
1
1233
""" exceptionStreamHook.py A custom stderr hook by Denis Dube, http://msdl.cs.mcgill.ca/people/denis/ """ import tkMessageBox, sys class exceptionStreamHook: """ This class pretends to be an open stderr file stream Perhaps it should subclass File to be safer... but what would be the default ...
gpl-3.0
469,603,371,962,662,600
23.729167
78
0.607461
false
aydoganserdar/python-rabbit-logging
setup.py
1
1223
from setuptools import setup, find_packages CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', ...
mit
-2,184,254,084,479,242,800
28.119048
67
0.629599
false
yuanming-hu/taichi
python/taichi/lang/shell.py
1
1472
import atexit import functools import os import sys from taichi.core.util import ti_core as _ti_core import taichi as ti try: import sourceinspect as oinspect except ImportError: ti.warn('`sourceinspect` not installed!') ti.warn( 'Without this package Taichi may not function well in Python IDLE i...
mit
6,888,034,702,434,073,000
31
94
0.686821
false
folz/drop
docs/conf.py
1
7698
# -*- coding: utf-8 -*- # # drop documentation build configuration file, created by # sphinx-quickstart on Sun Feb 17 11:46:20 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
mit
-7,931,662,525,305,026,000
30.809917
80
0.70317
false
leeopop/2015-CS570-Project
lda_preprocess.py
1
2532
import csv from loader import load_single_file num_of_topics__criteria_for_cut_words = 20 num_of_appearance__criteria_for_cut_words = 10 output_num_of_words_per_topic = 50 def load_vocab(): vocab = {} inverse_dict = load_single_file('keyword_table.csv') num = max([int(x['unique']) for x in inverse_dict.values()])...
mit
6,811,511,562,006,119,000
27.460674
92
0.651659
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/exploits/ZIBE/plugin_manager.py
1
2051
# uncompyle6 version 2.9.10 # Python bytecode 2.6 (62161) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: c:\Temp\build\ZIBE\plugin_manager.py # Compiled at: 2013-02-27 18:02:46 from plugins import * class PluginManager(object): __plugins__ = {} ...
unlicense
1,598,297,665,892,283,400
32.096774
78
0.561677
false
alekz112/xlwings
xlwings/tests/test_xlwings.py
1
33895
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import sys import shutil import pytz import nose from nose.tools import assert_equal, raises, assert_true, assert_false, assert_not_equal from datetime import datetime, date from xlwings import Application, Workbook, Sheet, Range, Chart, ChartTy...
apache-2.0
8,551,476,815,334,439,000
33.782341
142
0.574001
false
Zomboided/VPN-Manager
resetVPN.py
1
4136
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2016 Zomboided # # 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)...
gpl-2.0
245,625,491,115,489,120
43.010638
160
0.629594
false
jskDr/keraspp
old/gan_cnn_mse.py
1
6490
################################ # 공통 패키지 불러오기 ################################ from keras.datasets import mnist import numpy as np from PIL import Image import math import os import keras.backend as K K.set_image_data_format('channels_first') print(K.image_data_format) ################################ # GAN 모델링 ###...
mit
1,528,142,904,994,182,000
30.758621
81
0.57431
false
StrongBoy998/ihome-project
Tornado_Project/utils/image_storage.py
1
1089
# -*- coding: utf-8 -*- import qiniu.config import logging from qiniu import Auth, put_data, etag, urlsafe_base64_encode #需要填写你的 Access Key 和 Secret Key access_key = 'btZDjv_qjI4O1P5-KKeaZXBGLJcM-AZfigN8HjQf' secret_key = 'j2Sgq1Pz-1O90OoFSKr24Xa80mVWqzpqbo-byiN5' #要上传的空间 bucket_name = 'ihome' def storage(data): ...
apache-2.0
-76,605,809,266,359,420
18.408163
61
0.615142
false
OpenSPA/dvbapp
lib/python/Plugins/SystemPlugins/FastScan/plugin.py
1
15297
# -*- coding: utf-8 -*- from Plugins.Plugin import PluginDescriptor from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.config import config, ConfigSelection, ConfigYesNo, getConfigListEntry, ConfigSubsection, ConfigText from Components.ConfigList import ConfigListScreen from Co...
gpl-2.0
-1,174,297,479,387,992,600
38.511628
181
0.74534
false
fapable/pygameproject2
Menu/Opties.py
1
1096
import pygame import Game as dm def opties(): pygame.mixer.music.load("music.mp3") pygame.mixer.music.play(loops=0, start=0.0) size = width, height = 340,240 screen = pygame.display.set_mode(size) redSquare = pygame.image.load('achtergrondSpelers.png').convert() white = (255,255,255) w = ...
apache-2.0
-6,016,865,642,873,361,000
27.102564
71
0.556569
false
elsuizo/Kivy_work
Game_1/game1.py
1
1067
#= ------------------------------------------------------------------------- # @file game1.py # # @date 11/17/15 23:12:50 # @author Martin Noblia # @email martin.noblia@openmailbox.org # # @brief # # @detail # # Licence: # This program is free software: you can redistribute it and/or modify # it under the terms of the...
mit
-6,981,795,805,820,989,000
27.078947
78
0.614808
false
OnroerendErfgoed/pyramid_urireferencer
tests/test_renderers.py
1
2787
# -*- coding: utf-8 -*- from pyramid_urireferencer.models import ( RegistryResponse, ApplicationResponse, Item ) class TestRenderers: def test_empty_registry_renderer(self): rr = RegistryResponse('http://id.example.org/foo/1', True, False, 0, []) from pyramid_urireferencer.renderers i...
mit
6,088,043,973,341,636,000
33.8375
82
0.558306
false
TomiBelan/multiparser
example_lr.py
1
1164
from grammar import Grammar from makelr import make_lr_parser preface = "from toycalc.lex import tokenizer" rules = { # stat -> HELLO | IF cond THEN stat | IF cond THEN stat ELSE stat "stat": [(("HELLO",), "lambda ctx, a: 'hello'"), (("IF", "cond", "THEN", "stat"), "lambda ctx, a, b...
apache-2.0
-8,957,619,027,390,037,000
31.333333
77
0.450172
false
leonardoo/django-pipeline
tests/tests/test_compiler.py
1
5061
from __future__ import unicode_literals import sys from unittest import skipIf from django.test import TestCase from pipeline.collector import default_collector from pipeline.compilers import Compiler, CompilerBase, SubProcessCompiler from pipeline.exceptions import CompilerError from tests.utils import _, pipeline...
mit
3,162,126,970,480,120,300
29.672727
99
0.669828
false
torehc/sinucha
web/sinucha/control/models.py
1
5334
from django.db import models from django.contrib.auth.models import User import datetime from django.db.models.signals import post_save from django.dispatch import receiver class User_Data(models.Model): USER = 'user' ADMIN = 'admin' ROL_CHOICES = ( (USER, 'USER'), (ADMIN, 'ADMIN'), ...
gpl-3.0
2,278,878,880,838,755,800
30.382353
96
0.553056
false
joequant/pyswagger
pyswagger/tests/v2_0/test_circular.py
1
3163
from pyswagger import SwaggerApp, utils, primitives, errs from ..utils import get_test_data_folder from ...scanner import CycleDetector from ...scan import Scanner import unittest import os import six class CircularRefTestCase(unittest.TestCase): """ test for circular reference guard """ def test_path_item_...
mit
7,400,816,715,443,850,000
30.009804
133
0.510907
false
rocktavious/DevToolsLib
DTL/api/bases.py
1
3894
import inspect #------------------------------------------------------------ #------------------------------------------------------------ class BaseStruct(object): #------------------------------------------------------------ def __init__(self, *args, **kwds): self.deserialize(*args, **kwds) ...
mit
-2,309,170,053,516,535,000
38.734694
112
0.362866
false
tensorflow/lingvo
lingvo/tasks/asr/decoder_utils_test.py
1
7263
# Lint as: python3 # Copyright 2018 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 ...
apache-2.0
9,188,687,105,552,122,000
33.259434
80
0.640644
false
TheCacophonyProject/Full_Noise
test/test_tracks.py
1
4984
class TestTracks: def test_can_add_and_delete_tracks(self, helper): recording = helper.given_new_device(self, "tracks").has_recording() user = helper.admin_user() track0 = user.can_add_track_to_recording(recording) user.can_see_track(track0) track1 = user.can_add_track_to_r...
agpl-3.0
231,439,124,357,377,300
41.598291
99
0.629013
false
aristanetworks/arista-ovs-nova
nova/utils.py
1
38397
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
apache-2.0
-4,965,048,132,937,103,000
31.104515
79
0.587963
false
larsbutler/swift
swift/obj/expirer.py
1
12641
# Copyright (c) 2010-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 # # Unless required by applicable law or agree...
apache-2.0
-1,666,015,285,613,331,700
40.445902
79
0.537616
false
Rctue/nao-lib
gestures/sta.py
1
3412
names = list() times = list() keys = list() names.append("HeadYaw") times.append([ 2.00000]) keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]]) names.append("HeadPitch") times.append([ 2.00000]) keys.append([ [ -0.30000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]]) names.append("LShoul...
gpl-2.0
7,349,790,136,719,622,000
30.018182
76
0.622509
false
krivenko/som
python/som.py
1
1706
############################################################################## # # SOM: Stochastic Optimization Method for Analytic Continuation # # Copyright (C) 2016-2020 Igor Krivenko <igor.s.krivenko@gmail.com> # # SOM is free software: you can redistribute it and/or modify it under the # terms of the GNU General P...
gpl-3.0
-1,575,309,946,060,850,000
36.911111
86
0.611958
false
atumanov/ray
python/ray/exceptions.py
1
3236
import os import colorama try: import setproctitle except ImportError: setproctitle = None class RayError(Exception): """Super class of all ray exception types.""" pass class RayTaskError(RayError): """Indicates that a task threw an exception during execution. If a task throws an exceptio...
apache-2.0
-4,839,456,202,281,432,000
29.819048
79
0.635352
false
mysociety/barnetplanning
alerts/forms.py
1
2895
import urllib2 import simplejson from django import forms from django.contrib.localflavor.uk.forms import UKPostcodeField from models import Alert # Due to a bug in UKPostcodeField, can't override error message. This is # fixed in: http://code.djangoproject.com/ticket/12017 # So remove this extra class when we have...
agpl-3.0
-3,994,539,111,728,237,600
40.357143
131
0.656995
false
SHA2017-badge/micropython-esp32
tests/basics/struct2.py
1
1284
# test ustruct with a count specified before the type try: import ustruct as struct except: try: import struct except ImportError: print("SKIP") raise SystemExit print(struct.calcsize('0s')) print(struct.unpack('0s', b'')) print(struct.pack('0s', b'123')) print(struct.calcsize('2s...
mit
-4,925,401,632,700,900,000
17.608696
65
0.641745
false
jiaphuan/models
research/slim/nets/mobilenet/mobilenet.py
1
16178
# Copyright 2018 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
7,967,390,960,214,579,000
36.710956
80
0.665657
false
Autodesk/molecular-design-toolkit
moldesign/interfaces/nbo_interface.py
1
9611
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
apache-2.0
3,648,654,696,899,533,000
35.405303
110
0.553949
false
wufangjie/leetcode
187. Repeated DNA Sequences.py
1
1241
class Solution(object): def findRepeatedDnaSequences(self, s): """ :type s: str :rtype: List[str] """ more_than_once, once = set(), set() for i in range(len(s) - 9): t = s[i:i+10] if t not in more_than_once: if t in once: ...
gpl-3.0
-132,350,777,096,766,640
36.606061
122
0.48751
false
ging/keystone
keystone/contrib/keystone_scim/routers.py
1
11710
# # Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U # # 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 unde...
apache-2.0
2,083,376,882,307,337,700
40.378092
80
0.514944
false
openid/python-openid
openid/yadis/manager.py
1
6142
from __future__ import unicode_literals class YadisServiceManager(object): """Holds the state of a list of selected Yadis services, managing storing it in a session and iterating over the services in order.""" def __init__(self, starting_url, yadis_url, services, session_key): # The URL that was ...
apache-2.0
8,008,034,754,780,183,000
30.020202
73
0.620156
false
mojodna/debian-mapnik
plugins/input/osm/build.py
1
1631
# # This file is part of Mapnik (c++ mapping toolkit) # # Copyright (C) 2007 Artem Pavlenko, Jean-Francois Doyon # # Mapnik 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 2.1 of the Li...
lgpl-2.1
7,205,425,582,168,794,000
30.980392
152
0.72103
false
viniciuschiele/central
central/config/dynamodb.py
1
4852
""" DynamoDB config implementation. """ from collections import Mapping from ..compat import string_types from ..exceptions import LibraryRequiredError from ..structures import IgnoreCaseDict from ..utils import make_ignore_case from .core import BaseDataConfig try: import boto3 from boto3.dynamodb.condition...
mit
-6,548,755,572,922,770,000
28.406061
86
0.612531
false
dudulianangang/vps
EneConsTest.py
1
5969
import sdf import matplotlib.pyplot as plt import numpy as np import matplotlib as mpl plt.style.use('seaborn-white') # plt.rcParams['font.family'] = 'sans-serif' # plt.rcParams['font.sans-serif'] = 'Tahoma' # # plt.rcParams['font.monospace'] = 'Ubuntu Mono' plt.rcParams['font.size'] = 16 # plt.rcParams['axes.labelsiz...
apache-2.0
-2,299,900,135,137,136,400
26.892523
100
0.675658
false
Adamssss/projectEuler
pb347.py
1
1198
import math import time t1 = time.time() N = 10000000 prime = [] def primeSieve(n): global prime n = (n+1)//2 p = [True]*(n) i = 1 prime.append(2) while i < n: if p[i]: t = 2*i+1 prime.append(t) p[i] = False j = 2*i*i+2*i wh...
mit
9,094,591,799,074,366,000
14.558442
44
0.3798
false
otfbot/otfbot
otfbot/lib/chatMod.py
1
4027
# This file is part of OtfBot. # # OtfBot 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, or # (at your option) any later version. # # OtfBot is distributed in the hope that it...
gpl-2.0
6,027,862,804,107,587,000
26.026846
76
0.619568
false
nikolas/raven-python
conftest.py
1
1947
from django.conf import settings import os.path import sys collect_ignore = [] if sys.version_info[0] > 2: collect_ignore.append("tests/contrib/flask") if sys.version_info[1] == 2: collect_ignore.append("tests/handlers/logbook") try: import gevent except ImportError: collect_ignore.append("te...
bsd-3-clause
-4,972,678,971,291,255,000
24.96
96
0.57319
false
tisnik/fabric8-analytics-common
integration-tests/features/steps/jobs_api.py
1
14506
"""Tests for jobs API endpoints.""" import os import requests import uuid from behave import given, then, when from src.attribute_checks import check_timestamp, check_job_token_attributes from src.parsing import parse_token_clause from src.authorization_tokens import jobs_api_authorization @given('Jobs debug API is...
apache-2.0
-6,514,030,452,853,019,000
35.539043
96
0.674411
false
pleoni/game-of-life
plot/old/test_perf_mpi/life_perf_compilers.py
1
1863
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from numpy import * import sys import datetime datafile1="life_host_icc.out" datafile2="life_host_gnu.out" datafile3="life_host_pgi.out" if len(sys.argv) > 1: datafile=sys.argv[1] plotfile="compilers_perf_eurora.png" data1 = loadtxt(datafile...
gpl-2.0
7,832,986,248,728,866,000
27.661538
118
0.609769
false
IdeaSolutionsOnline/ERP4R
core/objs/sai_pesquisacont.py
1
4546
# !/usr/bin/env python3 # -*- encoding: utf-8 -*- """ ERP+ """ __author__ = ['António Anacleto', 'Jair Medina'] __credits__ = [] __version__ = "1.0" __maintainer__ = ['António Anacleto', 'Jair Medina'] __status__ = "Development" __model_name__= 'sai_pesquisacont.SaiPesquisacont' #import base_models#auth, from orm impo...
mit
-1,430,141,858,512,203,300
35.328
426
0.558027
false
macarthur-lab/xbrowse
breakpoint_search/urls.py
1
1099
from django.conf.urls import include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.conf import settings import xbrowse_server.base.views.igv_views import xbrowse_server.base.views.family_group_views import xbrowse_server.base.views.reference_views...
agpl-3.0
1,139,833,521,849,080,300
38.25
140
0.753412
false
aberklotz/crimereport
parser/crimeparser/spiders/test_police_spider.py
1
5741
from unittest import TestCase from scrapy.http import Request, HtmlResponse from conftest import RESOURCE_DIR from crimeparser.spiders.police_spider import PoliceSpider class TestPoliceSpider(TestCase): def test_parse_id(self): response = self.fake_response("sample.html", ...
mit
-4,545,190,108,183,718,000
36.496732
92
0.587764
false
DistrictDataLabs/yellowbrick
yellowbrick/classifier/rocauc.py
1
29053
# yellowbrick.classifier.rocauc # Implements visual ROC/AUC curves for classification evaluation. # # Author: Rebecca Bilbro # Author: Benjamin Bengfort # Author: Neal Humphrey # Created: Tue May 03 18:15:42 2017 -0400 # # Copyright (C) 2016 The scikit-yb developers # For license information, see LICENSE.txt # #...
apache-2.0
9,541,486,833,438,028
39.073103
88
0.620521
false
linkslice/ZenPacks.community.EMCIsilon
ZenPacks/community/EMCIsilon/modeler/plugins/community/snmp/EMCIsilonDiskPerfs.py
1
1526
from Products.DataCollector.plugins.CollectorPlugin import ( SnmpPlugin, GetTableMap, ) class EMCIsilonDiskPerfs(SnmpPlugin): relname = 'emcisilon_diskperfs' modname = 'ZenPacks.community.EMCIsilon.EMCIsilonDiskPerf' snmpGetTableMaps = ( GetTableMap( 'diskPerfTable', '.1.3.6.1...
mit
513,000,661,527,704,640
34.488372
85
0.542595
false
ellak-monades-aristeias/enhydris
enhydris/hcore/migrations/0006_offset_help.py
1
2090
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('hcore', '0005_remove_is_active'), ] operations = [ migrations.AlterField( model_name='timeseries', n...
agpl-3.0
-1,065,025,794,875,866,500
60.470588
362
0.673206
false
crackcell/www-entity-mining
software/game/17173.com/crawler.py
1
1873
#!/usr/bin/env python # -*- encoding: utf-8; indent-tabs-mode: nil -*- """ crawler ~~~~~~~ desc :copyright: (c) 2015 Menglong TAN. """ import os import sys import re import urllib2 import time import BeautifulSoup import logging logger = logging.getLogger(__file__) logger.setLevel(logging.DEBUG) ch ...
bsd-3-clause
-3,796,389,506,530,348,000
23.973333
116
0.566471
false
Wonjuseo/Project101
others/sine_RNN.py
1
4425
import tensorflow as tf import numpy as np from sklearn.model_selection import train_test_split from sklearn.utils import shuffle def sin(x, T=100): return np.sin(2.0*np.pi*x/T) def problem(T=100,ampl=0.05): x = np.arange(0,2*T+1) noise = ampl*np.random.uniform(low=-1.0,high=1.0,size=len(x)) ...
apache-2.0
-1,230,086,603,572,883,200
24.981707
94
0.608588
false
JungeAlexander/cocoscore
ci/bootstrap.py
1
2124
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import os import sys from os.path import abspath from os.path import dirname from os.path import exists from os.path import join if __name__ == "__main__": base_path = dirname(dirname(abspath(__...
mit
5,956,504,451,291,047,000
35.62069
110
0.636064
false