repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pegler/pytzwhere | tests/test_locations.py | 1 | 4565 | from tzwhere import tzwhere
import datetime
import unittest
class LocationTestCase(unittest.TestCase):
TEST_LOCATIONS = (
( 35.295953, -89.662186, 'Arlington, TN', 'America/Chicago'),
( 33.58, -85.85, 'Memphis, TN', 'America/Chicago'),
( 61.17, ... | mit | 8,654,051,610,969,396,000 | 59.065789 | 108 | 0.4977 | false | 2.930039 | true | false | false |
hugovk/congress-legislators | scripts/committee_membership.py | 1 | 12853 | #!/usr/bin/env python
# Scrape house.gov and senate.gov for current committee membership,
# and updates the committees-current.yaml file with metadata including
# name, url, address, and phone number.
import re, lxml.html, lxml.etree, io, datetime
from collections import OrderedDict
import utils
from utils import dow... | cc0-1.0 | -2,418,726,465,510,119,000 | 41.282895 | 165 | 0.622734 | false | 3.319473 | false | false | false |
thomasgurry/amplicon_sequencing_pipeline | scripts/QualityControl.py | 1 | 5687 | """
OVERVIEW:
Python module for quality control of datasets prior to preprocessing.
"""
from __future__ import print_function
import os
import util
import numpy as np
import matplotlib
import sys
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import Formatting as frmt
def check_length_stats(fastq_in):
#... | mit | -4,760,766,381,229,880,000 | 31.683908 | 161 | 0.569017 | false | 3.554375 | false | false | false |
sonaht/es-backup-scripts | restore.py | 1 | 3217 | #!/usr/bin/python
# Dependencies
import sys
import os
import time
import json
import tarfile
import shutil
import requests
# Help text
if len(sys.argv) < 2:
print "Usage:"
print " python restore.py (indexname)"
print " python restore.py (indexname) (elasticsearch host)"
print " python restore.py (indexname) (elas... | mit | 6,981,108,509,704,897,000 | 24.330709 | 88 | 0.667392 | false | 2.970452 | false | false | false |
EliotBryant/ShadDetector | shadDetector_testing/Gradient Based Methods/sharpen_lowgrad.py | 1 | 5324 | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 20 12:55:55 2017
@author: Eliot
sharpen_lowgrad.py
"""
import os
import numpy as np
import cv2
import skimage.io
from skimage.exposure import rescale_intensity
def ensure_dir(file_path):
''' check for directory and create if necessary'''
directory = os.path.dir... | gpl-3.0 | 6,797,915,883,095,718,000 | 31.864198 | 113 | 0.634673 | false | 3.037079 | false | false | false |
vmax77/Poppy | pypot/primitive/manager.py | 1 | 2816 | import threading
import numpy
import time
from collections import defaultdict
from functools import partial
class PrimitiveManager(threading.Thread):
""" Combines all :class:`~pypot.primitive.primitive.Primitive` orders and affect them to the real motors.
At a predefined frequency, the manager g... | gpl-3.0 | 2,473,339,752,827,600,400 | 36.56 | 195 | 0.571023 | false | 4.564019 | false | false | false |
seehuhn/wisent | doc/web/conf.py | 1 | 2043 | import sys, os, re
extensions = [ ]
templates_path = [ 'templates' ]
source_suffix = '.txt'
master_doc = 'index'
# General information about the project.
project = 'wisent'
copyright = '2012, Jochen Voss'
m = re.search(r'AC_INIT\(wisent, *(([0-9]+\.[0-9]+)[^, ]*),',
open("../../configure.ac").read(),
... | gpl-2.0 | -5,163,218,314,409,122,000 | 35.482143 | 79 | 0.633382 | false | 3.422111 | false | false | false |
kumina/django-powerdns-manager | src/powerdns_manager/admin.py | 1 | 13091 | # -*- coding: utf-8 -*-
#
# This file is part of django-powerdns-manager.
#
# django-powerdns-manager is a web based PowerDNS administration panel.
#
# Development Web Site:
# - http://www.codetrax.org/projects/django-powerdns-manager
# Public Source Code Repository:
# - https://source.codetrax.org/hgroot/dja... | apache-2.0 | -4,980,581,423,078,971,000 | 34.285714 | 112 | 0.693301 | false | 3.786809 | false | false | false |
openstack/networking-hyperv | networking_hyperv/neutron/trunk_driver.py | 1 | 5778 | # Copyright 2017 Cloudbase Solutions Srl
# 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 r... | apache-2.0 | -6,793,835,711,361,600,000 | 38.575342 | 79 | 0.59242 | false | 3.93865 | false | false | false |
m1lhaus/woofer | forms/library_form.py | 1 | 2753 | # -*- coding: utf-8 -*-
#
# Woofer - free open-source cross-platform music player
# Copyright (C) 2015 Milan Herbig <milanherbig[at]gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, e... | gpl-3.0 | 5,352,283,054,877,990,000 | 37.788732 | 98 | 0.723938 | false | 3.872011 | false | false | false |
jinzekid/codehub | python/基本操作/控制语句.py | 1 | 1247 | # Author: Jason Lu
# 猜数字
age_of_oldboy = 56
guess_age = int(input("guess age:"))
if guess_age == age_of_oldboy:
print("Yes, you got it.")
elif guess_age > age_of_oldboy:
print("think smaller...")
else:
print("think bigger...")
print("===============for语句================")
count = 0
age_of_oldboy = 56
... | gpl-3.0 | -6,562,586,918,179,522,000 | 14.4125 | 53 | 0.529603 | false | 3.074813 | false | false | false |
0x0all/nupic | tests/integration/py2/nupic/swarming/experiments/field_contrib_temporal/description.py | 1 | 15607 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | gpl-3.0 | -5,162,983,504,750,848,000 | 38.0175 | 108 | 0.578587 | false | 4.603835 | true | false | false |
harshatech2012/dual-raspi-stereo-vision | cameraCalibration.py | 1 | 6862 | import os
import numpy as np
import cv2
# Custom modules
from common import cameraTrigger as ct
from common import constantSource as cs
import cameraRectify as cr
from common import miscellaneous as msc
TOTAL_PICS = cs.getCalibReq()
while True:
q = input("Do you want to perform camera caliberation? (y/n): ")
... | gpl-3.0 | -6,111,740,889,220,514,000 | 39.60355 | 97 | 0.523463 | false | 4.118848 | false | false | false |
mirestrepo/voxels-at-lems | bvpl/bvpl_octree/tests.py | 1 | 2159 | # Temporary tests.
#In this test
#1. Create Scene
#2. Create kernel vector
#3. Apply kernels to the scene
#4. Display results as disks
#import bvpl_octree_batch;
#bvpl_octree_batch.register_processes();
#bvpl_octree_batch.register_datatypes();
#
#class dbvalue:
# def __init__(self, index, type):
# self.id = ind... | bsd-2-clause | 3,629,797,651,155,927,000 | 34.393443 | 73 | 0.705882 | false | 2.64908 | false | false | false |
osantana/correios | documentation/process_correios_status.py | 1 | 1409 | #!/usr/bin/env python3.5
import csv
import re
import sys
result = []
with open(sys.argv[1]) as csvfile:
reader = csv.reader(csvfile)
for raw_row in reader:
tipo, status, descr, detalhe, cliente = raw_row
tipo = tipo.strip().replace("\n", " ")
status = status.strip().replace("\n", " ")... | apache-2.0 | 676,500,828,654,824,400 | 28.978723 | 76 | 0.471966 | false | 3.585242 | false | false | false |
xenserver/win-xenguestagent | src/branding/branding.py | 1 | 7258 |
branding = {
"toolsName" : "Citrix XenServer Tools",
"installerProductName" : "Citrix XenServer Tools Installer",
"manufacturer" : "Citrix",
"installerKeyWords" : "Citrix XenServer Windows Installer",
"shortTools" : "XenTools",
"installerServiceName" : "Citrix Xen... | bsd-2-clause | 2,561,739,394,468,852,000 | 50.978102 | 193 | 0.639019 | false | 3.764523 | false | false | false |
ainur-fa/python_training_1 | fixture/db.py | 1 | 2123 | import pymysql.cursors
from model.group import Group
from model.contact import Contact
class DbFixture:
def __init__(self, host, name, user, password):
self.host=host
self.name=name
self.user =user
self.password=password
self.connection=pymysql.connect(host=host, database=n... | apache-2.0 | 5,126,857,193,983,882,000 | 37.618182 | 177 | 0.595384 | false | 4.13035 | false | false | false |
mstriemer/zamboni | mkt/submit/helpers.py | 1 | 2132 | import re
import jinja2
from jingo import register, env
from langid import classify
import mkt
from mkt.submit.models import AppSubmissionChecklist
def del_by_key(data, delete):
"""Delete a tuple from a list of tuples based on its first item."""
data = list(data)
for idx, item in enumerate(data):
... | bsd-3-clause | 5,081,919,413,981,935,000 | 28.205479 | 79 | 0.64728 | false | 3.807143 | false | false | false |
netgroup/Dreamer-VLL-Pusher | floodlight/vll_pusher.py | 1 | 24250 | #!/usr/bin/python
##############################################################################################
# Copyright (C) 2014 Pier Luigi Ventre - (Consortium GARR and University of Rome "Tor Vergata")
# Copyright (C) 2014 Giuseppe Siracusano, Stefano Salsano - (CNIT and University of Rome "Tor Vergata")
# www.... | apache-2.0 | -6,129,818,374,229,325,000 | 44.754717 | 371 | 0.612784 | false | 2.867108 | true | false | false |
0-wiz-0/psutil | psutil/_pssunos.py | 1 | 20127 | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Sun OS Solaris platform implementation."""
import errno
import os
import socket
import subprocess
import sys
from collections import namedtuple
from .... | bsd-3-clause | 6,773,734,069,539,041,000 | 34.434859 | 78 | 0.57167 | false | 3.642237 | false | false | false |
eayunstack/neutron | neutron/services/logapi/rpc/server.py | 1 | 2538 | # Copyright (C) 2017 Fujitsu Limited
# 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 requi... | apache-2.0 | 587,784,051,444,256,500 | 35.782609 | 79 | 0.702522 | false | 3.651799 | false | false | false |
ndanielsen/data5 | hw/hw7/hw7.py | 1 | 4215 | import time
import itertools
import datetime
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from sklearn.neighbors import KNeighborsClassifier
from sklearn.cross_validation import train_test_split
from sklearn import metrics
import scipy
class Glass(object):
def __init__(self, file, t... | mit | 930,583,122,895,792,800 | 24.391566 | 127 | 0.562515 | false | 3.800721 | true | false | false |
utkarsh-goswami/erpnext | erpnext/manufacturing/doctype/bom/bom.py | 1 | 19540 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, cstr, flt
from frappe import _
from erpnext.setup.utils import get_exchange_rate
from frappe.website.websit... | gpl-3.0 | 8,606,196,022,705,561,000 | 33.585841 | 145 | 0.66172 | false | 2.85589 | false | false | false |
azubiaga/tweets2csv | tweepy/models.py | 1 | 12340 | # Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from tweepy.error import TweepError
from tweepy.utils import parse_datetime, parse_html_value, parse_a_href
class ResultSet(list):
"""A list like object that holds results from a Twitter API query."""
def __init__(self, max_id=None, s... | mit | -7,217,803,486,821,469,000 | 27.498845 | 87 | 0.553809 | false | 3.938717 | false | false | false |
evanbiederstedt/RRBSfun | methyl_PDR_cell/PDR_methyl_normal_pcell_by_cell1.py | 1 | 2364 |
import glob
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib
import os
os.chdir('/Users/evanbiederstedt/Downloads/RRBS_data_files')
pcells = glob.glob("RRBS_NormalBCD19pCD27pcell*")
newdf1 = pd.DataFrame()
for filename in pcells:
df = pd.read_table(... | mit | -2,295,323,968,197,837,800 | 43.622642 | 153 | 0.62775 | false | 3.106439 | false | false | false |
trujunzhang/djzhang-targets | cwgooglelinkedin/cwgooglelinkedin/spiders/googlelinkedin_spider.py | 1 | 2355 | # -*- coding: utf-8 -*-
from random import Random
import scrapy
from scrapy.selector import Selector, HtmlXPathSelector
from scrapy_webdriver.http import WebdriverRequest
# yield WebdriverRequest(_url, callback=self.parse_category_full_page)
from cwgooglelinkedin.items import GoogleLinkedIn
import urlparse
class Goo... | mit | -8,530,891,606,262,700,000 | 42.611111 | 308 | 0.639066 | false | 3.600917 | false | false | false |
elbeardmorez/quodlibet | quodlibet/quodlibet/ext/events/trayicon/prefs.py | 1 | 3806 | # -*- coding: utf-8 -*-
# Copyright 2004-2006 Joe Wreschnig, Michael Urman, Iñigo Serna
# 2012 Christoph Reiter
# 2013,2017 Nick Boultbee
#
# 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-2.0 | -3,058,056,470,447,531,500 | 32.672566 | 78 | 0.621288 | false | 3.679884 | true | false | false |
kbrannan/PyHSPF | examples/evapotranspiration/etexample03.py | 2 | 6120 | # etexample03.py
#
# David J. Lampert (djlampert@gmail.com)
#
# last updated: 03/22/2015
#
# this example shows how to use the ETCalculator class to compute hourly
# reference evapotranspiration from the other time series after using the
# ClimateProcessor class to extract and aggregate the climate data from the
# Wor... | bsd-3-clause | -7,549,415,752,637,281,000 | 33.772727 | 80 | 0.728758 | false | 3.246684 | false | false | false |
pythonprobr/metaprog101 | patterns/strategy/strategy_fn.py | 1 | 2476 |
"""
>>> joe = Customer('John Doe', 0)
>>> ann = Customer('Ann Smith', 1100)
>>> cart = [LineItem('banana', 3, .5),
... LineItem('apple', 10, 1.5),
... LineItem('watermellon', 5, 5.0)]
>>> Order(joe, cart, fidelity_promo)
<Order total: 41.50 due: 41.50>
>>> Order(ann, car... | mit | -8,179,683,405,351,398,000 | 26.820225 | 72 | 0.581987 | false | 3.522048 | false | false | false |
LCAS/spqrel_tools | slu4p/slu_utils.py | 1 | 1032 | def lines_to_list(_file):
with open(_file) as f:
_list = f.readlines()
return [x.strip() for x in _list]
def normalize(sublist):
m = .0
for trans in sublist:
m = m + sublist[trans]
for trans in sublist:
sublist[trans] = sublist[trans] / m
return sublist
def list_to_di... | mit | -7,547,638,485,822,024,000 | 23 | 54 | 0.556202 | false | 3.372549 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/ad_group_criterion_approval_status.py | 1 | 1278 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | apache-2.0 | -6,542,211,844,050,196,000 | 29.428571 | 74 | 0.697183 | false | 3.872727 | false | false | false |
abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/code/browser/tests/test_branchsubscription.py | 1 | 2631 | # Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Unit tests for BranchSubscriptions."""
__metaclass__ = type
from lp.app.enums import InformationType
from lp.services.webapp.interfaces import IPrimaryContext
from lp.tes... | agpl-3.0 | 1,524,930,731,386,648,000 | 38.268657 | 76 | 0.664386 | false | 4.29902 | true | false | false |
foobarbazblarg/stayclean | stayclean-2019-may/update-google-chart.py | 1 | 7882 | #!/usr/bin/python
# TODO: issues with new oauth2 stuff. Keep using older version of Python for now.
# #!/usr/bin/env python
import json
import gspread
from oauth2client.client import SignedJwtAssertionCredentials
import datetime
from participantCollection import ParticipantCollection
# Edit Me!
participantFileNames =... | mit | 6,415,359,784,071,522,000 | 56.955882 | 143 | 0.649454 | false | 3.917495 | false | false | false |
nickpowersys/CaaR | caar/pandas_tseries_tools.py | 1 | 5513 | #--------------------------------------------------------------------------------
# Copyright (c) 2012, PyData Development Team
# All rights reserved.
#
# Distributed under the terms of the BSD Simplified License.
#
# The full license is in the PANDAS_LICENSE file, distributed with this software.
#---------------------... | bsd-3-clause | -5,352,531,936,608,387,000 | 35.509934 | 81 | 0.584981 | false | 4.126497 | false | false | false |
inveniosoftware/invenio-records-rest | invenio_records_rest/serializers/citeproc.py | 1 | 4713 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""CSL Citation Formatter serializer for records."""
from __future__ import absolute... | mit | -8,886,878,848,166,447,000 | 34.704545 | 79 | 0.649268 | false | 4.101828 | false | false | false |
Tethik/ericsson-hackathon | server/server/settings.py | 1 | 2167 | """
Django settings for server project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | mit | 2,057,896,832,154,065,200 | 22.813187 | 71 | 0.718043 | false | 3.219911 | false | false | false |
pragma-/pbot | modules/paren/paren.py | 1 | 2698 | #!/usr/bin/env python
from __future__ import print_function
import sys
from pycparser import c_parser, c_generator, c_ast, plyparser
from pycparser.ply import yacc
with open("paren/stddef") as f:
STDDEF = f.read()
class CParser(c_parser.CParser):
def __init__(self, *a, **kw):
super(CParser, self).__... | mpl-2.0 | 2,477,247,791,366,992,000 | 31.119048 | 100 | 0.547072 | false | 3.476804 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/types/account_budget_proposal_service.py | 1 | 5066 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | apache-2.0 | 4,730,186,862,866,976,000 | 31.683871 | 154 | 0.671141 | false | 4.145663 | false | false | false |
cheeseywhiz/cheeseywhiz | http/data/csv-vis.py | 1 | 3063 | #!/usr/bin/env python3
import csv
import sys
import matplotlib.pyplot as plt
from config import data_sets, fontdict
try:
sys.argv[1]
if sys.argv[1] not in data_sets:
raise IndexError
except IndexError as error:
keys = '\n'.join(key for key in data_sets)
print(f'Data sets:\n{keys}\nPut in arg #1... | mit | -5,690,825,025,149,385,000 | 23.309524 | 74 | 0.63859 | false | 3.362239 | false | false | false |
anntzer/scikit-learn | sklearn/ensemble/_weight_boosting.py | 2 | 43115 | """Weight Boosting.
This module contains weight boosting estimators for both classification and
regression.
The module structure is the following:
- The `BaseWeightBoosting` base class implements a common ``fit`` method
for all the estimators in the module. Regression and classification
only differ from each oth... | bsd-3-clause | -255,894,120,014,860,350 | 35.631266 | 79 | 0.597449 | false | 4.344956 | false | false | false |
spcui/virt-test | libvirt/tests/src/virsh_cmd/domain/virsh_setmem.py | 1 | 9363 | import re
import logging
import time
from autotest.client.shared import error
from virttest import virsh, utils_libvirtd
def run_virsh_setmem(test, params, env):
"""
Test command: virsh setmem.
1) Prepare vm environment.
2) Handle params
3) Prepare libvirtd status.
4) Run test command and wai... | gpl-2.0 | 7,478,082,938,550,316,000 | 37.060976 | 79 | 0.555484 | false | 3.775403 | true | false | false |
roderickmackenzie/opvdm | gui/monitor_dir.py | 1 | 3651 | # Organic Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall
# model for organic solar cells.
# Copyright (C) 2012 Roderick C. I. MacKenzie
#
# roderick.mackenzie@nottingham.ac.uk
# www.opvdm.com
# Room B86 Coates, University Park, Nottingham, NG7 2RD, UK
#
# This program is free softwar... | gpl-2.0 | -5,030,337,655,141,456,000 | 28.92623 | 219 | 0.72172 | false | 3.047579 | false | false | false |
hrishioa/Aviato | flask/Lib/site-packages/shapely/geometry/base.py | 1 | 27715 | """Base geometry class and utilities
"""
import sys
from warnings import warn
from binascii import a2b_hex
from ctypes import pointer, c_size_t, c_char_p, c_void_p
from shapely.coords import CoordinateSequence
from shapely.ftools import wraps
from shapely.geos import lgeos, ReadingError
from shapely.geos import WKBWr... | gpl-2.0 | -4,349,629,784,772,605,400 | 30.602052 | 79 | 0.57799 | false | 4.220344 | false | false | false |
BrechtBa/python-git-package | python_git_package/python_git_package.py | 1 | 16982 | #!/usr/bin/env/ python
################################################################################
# Copyright 2016 Brecht Baeten
# This file is part of python-git-package.
#
# python-git-package is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Lic... | gpl-3.0 | 7,694,822,997,281,497,000 | 34.082645 | 119 | 0.570024 | false | 3.798658 | true | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/application_gateway_backend_http_settings_py3.py | 1 | 3708 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 7,246,247,870,950,952,000 | 49.108108 | 252 | 0.661003 | false | 4.257176 | false | false | false |
MediffRobotics/DeepRobotics | DeepLearnMaterials/tutorials/real world examples/bank_marketing_learning/bank_marketing_sk.py | 1 | 4185 | # View more python learning tutorial on my Youtube and Youku channel!!!
# Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg
# Youku video tutorial: http://i.youku.com/pythontutorial
"""
Please note, this code is only for python 3+. If you are using python 2+, please modify the code acco... | gpl-3.0 | 4,880,204,816,180,642,000 | 38.857143 | 116 | 0.68865 | false | 3.201989 | true | false | false |
adambiser/snes-wolf3d-extractor | extractor/ui/optionsframe.py | 1 | 1572 | import tkinter as tk
class OptionsFrame(tk.LabelFrame):
COLUMNS = 3
def __init__(self, parent, settings, **options):
super().__init__(parent, **options)
self.config(text='Export Options',
padx=5,
pady=5)
self.parent = parent
# Add widget... | mit | -1,231,272,076,526,034,000 | 34.727273 | 73 | 0.431934 | false | 4.9279 | false | false | false |
vitorio/pygrow | grow/pods/preprocessors/file_watchers.py | 1 | 4044 | from grow.pods.preprocessors import translation
from grow.pods.preprocessors import routes_cache
from watchdog import events
from watchdog import observers
class PodspecFileEventHandler(events.PatternMatchingEventHandler):
patterns = ['*/podspec.yaml']
ignore_directories = True
def __init__(self, pod, managed_... | mit | 3,954,190,714,449,856,500 | 30.348837 | 84 | 0.699802 | false | 3.877277 | false | false | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.1/Lib/xml/dom/pulldom.py | 1 | 10143 | import xml.sax
import xml.sax.handler
import types
try:
_StringTypes = [types.StringType, types.UnicodeType]
except AttributeError:
_StringTypes = [types.StringType]
START_ELEMENT = "START_ELEMENT"
END_ELEMENT = "END_ELEMENT"
COMMENT = "COMMENT"
START_DOCUMENT = "START_DOCUMENT"
END_DOCUMENT = "END_DOCUMENT"
... | mit | -1,154,279,993,284,917,200 | 32.586093 | 75 | 0.5944 | false | 4.080048 | false | false | false |
amschaal/bioshare | bioshareX/api/views.py | 1 | 18186 | # Create your views here.
from django.core.urlresolvers import reverse
from django.http.response import JsonResponse, HttpResponse
from settings.settings import AUTHORIZED_KEYS_FILE, SITE_URL
from bioshareX.models import Share, SSHKey, MetaData, Tag
from bioshareX.forms import MetaDataForm, json_form_validate
from guar... | mit | -2,161,718,598,179,195,100 | 46.236364 | 298 | 0.63186 | false | 3.836709 | false | false | false |
tommy-u/enable | enable/wx/base_window.py | 1 | 19538 | """
Defines the concrete top-level Enable 'Window' class for the wxPython GUI
toolkit, based on the kiva agg driver.
"""
from __future__ import absolute_import
import sys
import time
import wx
from traits.api import Any, Instance, Trait
from traitsui.wx.menu import MakeMenu
# Relative imports
from enable.events imp... | bsd-3-clause | -7,273,876,677,575,929,000 | 36.144487 | 81 | 0.542788 | false | 4.04681 | false | false | false |
rwl/PyCIM | CIM14/CDPSM/Balanced/IEC61970/Wires/Switch.py | 1 | 2127 | # Copyright (C) 2010-2011 Richard Lincoln
#
# 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 | -5,704,789,517,243,640,000 | 48.465116 | 223 | 0.735778 | false | 4.170588 | false | false | false |
mvidalgarcia/indico | indico/modules/rb/controllers/backend/admin.py | 1 | 22187 | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from io import BytesIO
from flask import jsonify, request, sessi... | mit | 8,321,943,753,006,878,000 | 39.193841 | 120 | 0.647947 | false | 3.640794 | false | false | false |
mathiasertl/fabric | tests/test_tasks.py | 1 | 18968 | from __future__ import with_statement
from fudge import Fake, patched_context, with_fakes
import unittest
from nose.tools import raises, ok_
import random
import sys
import fabric
from fabric.tasks import WrappedCallableTask, execute, Task, get_task_details
from fabric.main import display_command
from fabric.api impo... | bsd-2-clause | -2,933,276,217,915,369,000 | 29.642973 | 96 | 0.561525 | false | 3.838899 | true | false | false |
bryanrtboy/videoselector | installation_text.py | 1 | 2688 | #!/usr/bin/python
from pssh import SSHClient, ParallelSSHClient, utils
import datetime
import time
import random
import sys
output = []
hosts = ['client0', 'client1', 'client2','client3', 'client4']
client = ParallelSSHClient(hosts)
values = ["bear","cake","fork","pipe","gun"]
def open_movies(my_values, delay):
c... | mit | 5,243,929,373,050,166,000 | 28.538462 | 111 | 0.663318 | false | 3.107514 | false | false | false |
patrickrall/CircuitSimulator | libcirc/innerprod.py | 1 | 5589 | #
# file: innerprod.py
# Methods for evaluating inner products of P|H^t> where
# P is a given projector.
#
import numpy as np
from multiprocessing import Pool, cpu_count
from libcirc.stabilizer.stabilizer import StabilizerState
from libcirc.stateprep import prepH, prepL
# Median of means calculation can be done via ... | mit | -7,175,787,578,145,242,000 | 29.210811 | 83 | 0.602254 | false | 3.145189 | false | false | false |
salsita/flask-mime-encoders | lib/json.py | 1 | 1747 | """Flask MIME JSON encoder and decoder."""
__all__ = 'JsonMimeEncoder'.split()
from . import MimeEncoders
from flask import json, request, Response
from functools import wraps
class JsonMimeEncoder(MimeEncoders.base):
"""Flask MIME JSON encoder and decoder."""
name = 'json'
mimetype = 'application/json'
... | mit | -5,810,382,172,931,417,000 | 26.730159 | 64 | 0.608472 | false | 4.169451 | false | false | false |
Unode/ete | ete3/parser/newick.py | 1 | 20069 | # #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://etetoolkit.org
#
# ETE 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-3.0 | -3,665,706,475,217,138,700 | 39.299197 | 139 | 0.567891 | false | 3.537011 | false | false | false |
CERN-CERT/WAD | setup.py | 1 | 1578 | from setuptools import setup, find_packages
try:
import pypandoc
long_description = pypandoc.convert('README.md', to='rst', format='md')
long_description += "\n\n" + pypandoc.convert('AUTHORS.md', to='rst', format='md')
except (IOError, ImportError):
long_description = ''
setup(
name='wad',
ve... | gpl-3.0 | -6,747,920,885,555,944,000 | 34.066667 | 86 | 0.603929 | false | 3.954887 | false | false | false |
AFEPython/comicninja | src/comicninja.py | 1 | 7324 | from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash, views
from pymongo import MongoClient
from pymongo.cursor import Cursor as MongoCursor
from ConfigParser import SafeConfigParser
from datetime import datetime, timedelta
from Crypto.Hash import SHA256
import os
import os.pa... | gpl-2.0 | 2,637,422,542,135,692,000 | 29.902954 | 180 | 0.617013 | false | 3.704603 | true | false | false |
chippey/gaffer | python/GafferUI/FileMenu.py | 1 | 12763 | ##########################################################################
#
# Copyright (c) 2011-2012, John Haddon. All rights reserved.
# Copyright (c) 2012-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted prov... | bsd-3-clause | 4,047,465,248,674,811,400 | 36.985119 | 138 | 0.726867 | false | 3.769344 | false | false | false |
mrroach/CentralServer | csrv/model/cards/ice.py | 1 | 2192 | """An ice card."""
from csrv.model import actions
from csrv.model import events
from csrv.model import game_object
from csrv.model import modifiers
from csrv.model import parameters
from csrv.model.cards import card_base
from csrv.model import timing_phases
from csrv.model.cards import card_info
class Ice(card_base.... | apache-2.0 | -1,993,582,687,030,194,700 | 25.095238 | 74 | 0.703467 | false | 3.158501 | false | false | false |
tongpo/Holle-World | py/easyGUI/demoprograms/chapter4/textfielddemo.py | 1 | 1579 | """
File: textfielddemo.py
Author: Kenneth A. Lambert
"""
from breezypythongui import EasyFrame
class TextFieldDemo(EasyFrame):
"""Converts an input string to uppercase and displays the result."""
def __init__(self):
"""Sets up the window and widgets."""
EasyFrame.__init__(self)
# L... | gpl-2.0 | 3,305,140,002,116,649,500 | 33.326087 | 73 | 0.471184 | false | 4.919003 | false | false | false |
Kraymer/beets | beets/mediafile.py | 1 | 70175 | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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 t... | mit | -502,309,375,197,695,400 | 32.983051 | 79 | 0.597962 | false | 3.863198 | false | false | false |
Hwesta/advent-of-code | aoc2017/day19.py | 1 | 4797 | #!/usr/bin/env python
"""
--- Day 19: A Series of Tubes ---
Somehow, a network packet got lost and ended up here. It's trying to follow a routing diagram (your puzzle input), but it's confused about where to go.
Its starting point is just off the top of the diagram. Lines (drawn with |, -, and +) show the path it nee... | mit | 436,195,257,876,169,500 | 30.768212 | 321 | 0.583281 | false | 3.623112 | false | false | false |
leemac/rocketlaunches | rocketlaunches/rocketapp/migrations/0007_auto_20150429_1228.py | 1 | 1693 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('rocketapp', '0006_auto_20150429_1227'),
]
operations = [
migrations.CreateModel(
name='PayloadFa... | mit | 7,374,288,151,315,174,000 | 33.55102 | 128 | 0.565859 | false | 4.329923 | false | false | false |
wichmann/bbss | gui/gui.py | 1 | 20958 |
"""
bbss - BBS Student Management
Default graphical user interface for bbss.
Main window was generated by calling:
pyuic5 bbss_tabbed_gui.ui > main.py
Created on Mon Feb 23 15:08:56 2014
@author: Christian Wichmann
"""
import os
import sys
import logging
from PyQt5 import QtGui
from PyQt5 import QtCore
from... | gpl-2.0 | -3,237,691,207,682,409,000 | 45.852349 | 144 | 0.644798 | false | 3.930006 | false | false | false |
daniestevez/gr-satellites | python/check_crc16_ccitt.py | 1 | 1642 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2020 Daniel Estevez <daniel@destevez.net>
#
# This file is part of gr-satellites
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
import struct
from gnuradio import gr
import numpy
import pmt
from . import hdlc
class check_crc16_ccitt(gr.basic_block):
... | gpl-3.0 | 5,223,410,564,134,154,000 | 26.830508 | 77 | 0.5676 | false | 3.310484 | false | false | false |
mattpitkin/GraWIToNStatisticsLectures | figures/scripts/coin_toss_2.py | 1 | 1891 | #!/usr/bin/env python
"""
Show how the posterior gets updated as a set of coin tosses are generated for a biased coin.
Assume a flat prior on the bias weighting and also a Gaussian prior.
"""
import matplotlib.pyplot as pl
from scipy.stats import norm, kstest
import numpy as np
# set plot to render labels using late... | mit | 5,257,942,219,974,671,000 | 23.25641 | 92 | 0.630883 | false | 2.608276 | false | false | false |
Spokepoint/chipmunk-restapi | controller/spreadsheet.py | 1 | 1185 | import gspread
import os
import string
def new_token():
gc = gspread.login(os.environ.get('GOOGLE_USER'),
os.environ.get('GOOGLE_PASS'))
return gc
def write_cell(worksheetKey, row, col, value):
gc = new_token()
worksheet = gc.open_by_key(worksheetKey).get_worksheet(0)
row ... | mit | 8,695,209,471,296,882,000 | 23.6875 | 64 | 0.637131 | false | 3.310056 | false | false | false |
MobileWebApps/backend-python-rest-gae | lib/pygments/lexers/shell.py | 1 | 14790 | # -*- coding: utf-8 -*-
"""
pygments.lexers.shell
~~~~~~~~~~~~~~~~~~~~~
Lexers for various shells.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, inclu... | bsd-3-clause | -2,247,668,285,030,396,700 | 35.073171 | 84 | 0.471738 | false | 3.691041 | false | false | false |
b-e-p/bep | Bep/cmds/turn_on.py | 1 | 6540 | #!/usr/bin/env python
#----------------------------------------------------------------
# Author: Jason Gors <jasonDOTgorsATgmail>
# Creation Date: 11-19-2015
# Purpose:
#----------------------------------------------------------------
from Bep.core.release_info import name
from Bep.core import utils
from Bep import ... | bsd-3-clause | -7,830,477,266,451,147,000 | 55.37931 | 152 | 0.556422 | false | 3.890541 | false | false | false |
meher92/Neural-Photos | project/model.py | 1 | 2039 | import os, time
from datetime import datetime
from project import app
from pymongo import MongoClient
import pymongo
client = MongoClient(app.config['MONGO_URI'])
db = client[app.config['MONGO_DBNAME']]
collection = db.images_collection
def save_file_in_db(filename, created_at, uid=-1, caption=''):
count = coll... | mit | 1,790,959,567,304,970,200 | 29.432836 | 132 | 0.598823 | false | 3.839925 | false | false | false |
drewp/commentserve | honeypot.py | 1 | 1657 | """
based on
http://trac.edgewall.org/browser/plugins/0.12/spam-filter-captcha/tracspamfilter/filters/httpbl.py
BSD license: http://trac.edgewall.org/wiki/TracLicense
"""
import logging
from dns.resolver import query, Timeout, NXDOMAIN, NoAnswer, NoNameservers
log = logging.getLogger()
class HoneypotChecker(object):
... | bsd-2-clause | 7,159,504,697,764,755,000 | 30.865385 | 98 | 0.542547 | false | 3.809195 | false | false | false |
vperron/picasa-toolbox | ptoolbox/google/utils.py | 1 | 2017 | # -*- coding: utf-8 -*-
import requests
from xml.etree import ElementTree
from datetime import datetime, timedelta
from .constants import epoch, G_XML_ROOT, G_XML_NAMESPACES, TZ_API_URL
def ts2dt(ts, millisecs=False):
"""Convert a timestamp to a datetime."""
if millisecs:
dt = datetime.utcfromtimest... | mit | -8,591,657,744,851,923,000 | 27.814286 | 80 | 0.642043 | false | 3.301146 | false | false | false |
googleapis/googleapis-gen | google/cloud/translate/v3/translation-v3-py/google/cloud/translate_v3/services/translation_service/client.py | 1 | 50854 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | apache-2.0 | 3,091,188,023,495,868,400 | 41.914768 | 142 | 0.597986 | false | 4.816176 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_properties_for_restore.py | 1 | 2567 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 7,632,846,821,311,256,000 | 44.839286 | 83 | 0.641605 | false | 3.973684 | false | false | false |
andremissaglia/ekaaty_liveusbcreator | liveusb/linux_dialog.py | 1 | 8036 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'data/liveusb-creator.ui'
#
# Created: Tue Jan 15 12:09:54 2013
# by: PyQt4 UI code generator 4.9.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
e... | gpl-2.0 | -7,968,805,798,018,169,000 | 55.591549 | 321 | 0.699477 | false | 3.904762 | false | false | false |
Drapegnik/bsu | decision-science/lab6/main.py | 1 | 4125 | import numpy as np
def edges_list_to_matrix(filename):
inp = file(filename, 'r')
n, m = map(lambda x: int(x), inp.readline().split())
t = np.ndarray((n, n))
t.fill(-1)
for _ in range(m):
i, j, time, _ = inp.readline().split()
i, j, time = map(lambda x: int(x), [i, j, time])
... | mit | -2,541,268,419,509,398,000 | 40.666667 | 118 | 0.586424 | false | 3.094524 | false | false | false |
jabbalaci/Bash-Utils | get_images.py | 1 | 1798 | #!/usr/bin/env python3
"""
Extract image links from a web page
===================================
Author: Laszlo Szathmary, 2011 (jabba.laci@gmail.com)
GitHub: https://github.com/jabbalaci/Bash-Utils
Given a webpage, extract all image links.
Usage:
------
get_images.py URL [URL]... [options]
Options:
-l, --len... | mit | 4,686,281,172,346,054,000 | 22.973333 | 99 | 0.56396 | false | 3.738046 | false | false | false |
rdo-management/neutron | neutron/agent/l3/dvr_router.py | 1 | 9814 | # Copyright (c) 2015 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 ... | apache-2.0 | 8,099,741,431,079,580,000 | 44.435185 | 79 | 0.5968 | false | 3.760153 | false | false | false |
openstack/sahara-dashboard | sahara_dashboard/content/data_processing/data_plugins/workflows/update.py | 1 | 4193 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | apache-2.0 | -4,733,765,303,333,254,000 | 37.118182 | 76 | 0.59814 | false | 4.256853 | false | false | false |
ktan2020/legacy-automation | win/Lib/site-packages/wx-3.0-msw/wx/tools/XRCed/plugins/xh_wxlib.py | 1 | 2451 | # Name: wxlib.py
# Purpose: XML handlers for wx.lib classes
# Author: Roman Rolinsky <rolinsky@femagsoft.com>
# Created: 05.09.2007
# RCS-ID: $Id$
import wx
import wx.xrc as xrc
import wx.lib.foldpanelbar as fpb
from wx.lib.ticker_xrc import wxTickerXmlHandler
from wx.tools.XR... | mit | -6,277,563,818,982,344,000 | 37.532258 | 99 | 0.529172 | false | 3.770769 | false | false | false |
uni-peter-zheng/tp-libvirt | libvirt/tests/src/resource_abnormal.py | 1 | 36840 | import os
import time
import stat
import signal
import logging
import threading
from autotest.client.shared import error
from autotest.client.shared import utils
from virttest import libvirt_storage
from virttest import utils_selinux
from virttest import qemu_storage
from virttest import libvirt_vm
from virttest import... | gpl-2.0 | -7,440,651,188,217,650,000 | 39.752212 | 112 | 0.537975 | false | 3.701025 | true | false | false |
bmbouter/python-bugzilla | tests/__init__.py | 1 | 2668 |
from __future__ import print_function
import atexit
import difflib
import imp
import os
import shlex
import sys
if hasattr(sys.version_info, "major") and sys.version_info.major >= 3:
from io import StringIO
else:
from StringIO import StringIO
_cleanup = []
def _import(name, path):
_cleanup.append(pat... | gpl-2.0 | -5,544,840,165,925,174,000 | 23.934579 | 78 | 0.543853 | false | 3.964339 | false | false | false |
knipknap/Gelatin | Gelatin/util.py | 1 | 5488 | # Copyright (c) 2010-2017 Samuel Abels
#
# 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, d... | mit | 1,872,208,471,006,823,000 | 34.636364 | 85 | 0.668003 | false | 4.290852 | false | false | false |
Synss/python-mbedtls | docs/source/conf.py | 1 | 2086 | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or module... | mit | -642,639,203,501,782,700 | 32.111111 | 79 | 0.657718 | false | 4.074219 | true | false | false |
atleypnorth/bp2dvcm | recorddetail5.py | 1 | 1448 | import datetime
from functools import wraps
from logging import getLogger
LOG = getLogger(__name__)
class RecordDetail(object):
def __init__(self, name=None):
self.name = name
self.status = None
self.start_time = datetime.datetime.now()
self.stop_time = None
self.number_o... | mit | -4,130,902,076,194,367,500 | 27.96 | 99 | 0.517265 | false | 4.401216 | false | false | false |
noironetworks/neutron | neutron/conf/policies/qos.py | 1 | 4265 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | apache-2.0 | -4,615,900,779,380,499,000 | 46.921348 | 76 | 0.525205 | false | 5.252463 | false | false | false |
QualiSystems/cloudshell-orch-sandbox | cloudshell-orch-core/cloudshell/workflow/orchestration/teardown/default_teardown_orchestrator.py | 1 | 1883 | from cloudshell.workflow.orchestration.sandbox import Sandbox
from cloudshell.workflow.orchestration.teardown.default_teardown_logic import DefaultTeardownLogic
class DefaultTeardownWorkflow(object):
def __init__(self):
pass
def register(self, sandbox):
"""
:param Sandbox sandbox:
... | apache-2.0 | -3,816,085,675,126,176,000 | 44.926829 | 120 | 0.519384 | false | 5.706061 | false | false | false |
greenhost/viper | scripts/license.py | 1 | 7545 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
#
# Copyright (c) 2013 Greenhost VOF
# https://greenhost.nl -\- https://greenhost.io
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | gpl-3.0 | -4,695,716,823,875,586,000 | 55.729323 | 118 | 0.710007 | false | 4.238764 | false | false | false |
JanikNex/adventure16 | src/controller/controller_credits.py | 1 | 2012 | from src.gui.gui_credits import *
from src.utilclasses.caudiohandler import *
from src.utilclasses.cjsonhandler import *
class CreditController(object):
def __init__(self, mode='fromStart'):
# Creditphase wird initialisiert
"""
Erstellt ein neues CreditController-Objekt
:param mode... | gpl-3.0 | 1,510,442,056,439,928,800 | 33.033898 | 91 | 0.619522 | false | 3.450172 | false | false | false |
sahiljain/catapult | dashboard/dashboard/pinpoint/models/change.py | 1 | 5253 | # Copyright 2016 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 collections
from dashboard.services import gitiles_service
class NonLinearError(Exception):
"""Raised when trying to find the midpoint of Changes... | bsd-3-clause | 2,869,053,224,633,806,300 | 34.493243 | 80 | 0.650295 | false | 3.798265 | false | false | false |
madjar/nox | nox/search.py | 1 | 3136 | import os
import collections
import json
import subprocess
import re
import click
from .cache import region
class NixEvalError(Exception):
pass
def nix_packages_json():
click.echo('Refreshing cache')
try:
output = subprocess.check_output(['nix-env', '-qa', '--json', '--show-trace'],
... | mit | 66,833,306,864,362,456 | 32.361702 | 125 | 0.583865 | false | 3.890819 | false | false | false |
PrinceNgattaiLam/Trafic | TraficLib/PipelineEval.py | 1 | 4702 | import os
import argparse
import subprocess
import shutil
import time
import sys
# from fiberfileIO import *
from makeDataset import make_fiber_feature
from runStore import run_store
from runClassification import run_classification
start = time.time()
BLUE_BOLD = "\033[1;34m"
YELLOW = "\033[0;33m"
RED = "\033[0;31m"
NC... | apache-2.0 | -331,976,346,076,911,900 | 45.107843 | 193 | 0.674394 | false | 3.377874 | false | false | false |
guillaume-florent/aoc-utils | aocutils/collections.py | 1 | 2126 | # coding: utf-8
r"""OCC collections utilities and conversions"""
from OCC.Core.TColgp import TColgp_Array1OfPnt, TColgp_Array1OfPnt2d
from OCC.Core.TCollection import TCollection_ExtendedString
def to_string(_string):
r"""str to OCC string conversion
Parameters
----------
_string : str
Returns... | lgpl-3.0 | -3,028,877,044,064,268,000 | 19.640777 | 74 | 0.593603 | false | 3.374603 | false | false | false |
nehudesi/MSim | module/eventBollinger.py | 1 | 8332 | '''
Version: MRT v3.0
Type: module
Location: C:\MRT3.0\module
Author: Chintan Patel
Email: chintanlike@gmail.com
Bollinger Based Trading
'''
import pandas as pd
import numpy as np
#import math
import copy
import module.qsdateutil as du
import datetime as dt
import module.DataAccess as da
#import mo... | agpl-3.0 | 96,520,162,211,974,220 | 44.558659 | 108 | 0.493519 | false | 3.523044 | false | false | false |
redox-alpha/omorfi | src/python/omorfi/omor_formatter.py | 1 | 24794 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Formatter to de/format omor style analyses for omrfi."""
# (c) Omorfi contributors <omorfi-devel@groups.google.com> 2015
# see AUTHORS file in top-level dir of this project, or
# <https://github.com/flammie/omorfi/wiki/AUTHORS>
# This program is free software: you c... | gpl-3.0 | 6,803,007,253,595,068,000 | 31.575 | 93 | 0.451266 | false | 3.054157 | false | false | false |
QudevETH/PycQED_py3 | pycqed/utilities/general.py | 1 | 28332 | import os
import sys
import ast
import numpy as np
import h5py
import json
import datetime
from contextlib import contextmanager
from pycqed.measurement import hdf5_data as h5d
from pycqed.analysis import analysis_toolbox as a_tools
import errno
import pycqed as pq
import glob
from os.path import dirname, exists
from o... | mit | 6,031,985,754,801,021,000 | 34.326683 | 83 | 0.55012 | false | 4.200445 | false | false | false |
aletheia7/norm | norm/protolib/setup.py | 1 | 1641 | # This Python script can be used to build and install a Python "protokit" module that
# provides a wrapper to select portions of the "Protlib" code base.
# This currently includes just the "protopipe" interprocess communication class.
# Example scripts are provided in the "examples" subdirectory.
import platform
from ... | bsd-2-clause | 8,900,504,731,457,318,000 | 37.162791 | 85 | 0.635588 | false | 3.954217 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.