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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nathanbjenx/cairis | cairis/gui/TemplateRequirementPanel.py | 1 | 2080 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | apache-2.0 | 9,020,233,058,832,603,000 | 41.44898 | 104 | 0.774038 | false | 3.573883 | false | false | false |
googleapis/python-kms | samples/snippets/create_key_ring.py | 1 | 1511 | # 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 agreed to in writing, s... | apache-2.0 | 6,052,987,254,862,620,000 | 31.847826 | 121 | 0.679682 | false | 3.632212 | false | false | false |
rwl/PyCIM | CIM14/ENTSOE/Dynamics/IEC61970/Dynamics/DynamicsMetaBlockParameter.py | 1 | 3262 | # 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 | 6,889,832,679,586,051,000 | 38.301205 | 109 | 0.704476 | false | 4.219922 | false | false | false |
gVallverdu/myScripts | CRYSTAL/crystalio.py | 1 | 14817 | #!/usr/bin/env python3
# -*- coding=utf-8 -*-
"""
crystailio
----------
Read a CRYSTAL output file and export all structures, SCF energies and
convergence data.
"""
__author__ = "Germain Vallverdu"
__email__ = "germain.vallverdu@univ-pau.fr"
__licence__ = "GPL"
import re
import numpy as np
from pymatgen import Stru... | gpl-2.0 | 5,053,067,532,660,909,000 | 41.213675 | 100 | 0.437943 | false | 4.289809 | false | false | false |
emacsway/django-oembed | oembed/models.py | 1 | 1251 | import datetime
from django.db import models
from django.utils import simplejson
from django.utils.translation import ugettext_lazy as _
JSON = 1
XML = 2
FORMAT_CHOICES = (
(JSON, "JSON"),
(XML, "XML"),
)
class ProviderRule(models.Model):
name = models.CharField(_("name"), max_length=128, null=True, blank... | bsd-3-clause | -859,522,205,000,884,200 | 30.275 | 79 | 0.657074 | false | 3.958861 | false | false | false |
lupien/pyHegel | pyHegel/instruments/agilent_smu.py | 1 | 68624 | # -*- coding: utf-8 -*-
########################## Copyrights and license ############################
# #
# Copyright 2019-2019 Christian Lupien <christian.lupien@usherbrooke.ca> #
# ... | lgpl-3.0 | 5,311,880,424,862,998,000 | 48.763597 | 176 | 0.546733 | false | 3.728147 | false | false | false |
rmhyman/DataScience | Lesson3/exploratory_data_analysis_subway_data.py | 1 | 1558 | import numpy as np
import pandas
import matplotlib.pyplot as plt
def entries_histogram(turnstile_weather):
'''
Before we perform any analysis, it might be useful to take a
look at the data we're hoping to analyze. More specifically, let's
examine the hourly entries in our NYC subway data and d... | mit | -433,697,089,876,752,400 | 48.258065 | 159 | 0.716945 | false | 3.954315 | false | false | false |
wglass/zoonado | examples/locking.py | 1 | 1246 | import logging
import random
from tornado import gen
log = logging.getLogger()
def arguments(parser):
parser.add_argument(
"--workers", "-w", type=int, default=3,
help="Number of workers to launch."
)
parser.add_argument(
"--lock-path", "-p", type=str, default="examplelock",
... | apache-2.0 | -1,379,920,386,763,527,400 | 22.074074 | 66 | 0.585875 | false | 3.664706 | false | false | false |
jakubbrindza/gtg | GTG/plugins/export/templates.py | 1 | 6180 | # -*- coding: utf-8 -*-
# Copyright (c) 2010 - Luca Invernizzi <invernizzi.l@gmail.com>
# 2012 - Izidor Matušov <izidor.matusov@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
# Fou... | gpl-3.0 | 4,735,512,752,990,252,000 | 34.308571 | 79 | 0.597993 | false | 4.397865 | false | false | false |
hrashk/sympy | release/fabfile.py | 1 | 29364 | # -*- coding: utf-8 -*-
"""
Fab file for releasing
Please read the README in this directory.
Guide for this file
===================
Vagrant is a tool that gives us a reproducible VM, and fabric is a tool that
we use to run commands on that VM.
Each function in this file should be run as
fab vagrant func
Even tho... | bsd-3-clause | 8,105,300,423,079,544,000 | 33.419695 | 126 | 0.638862 | false | 3.699131 | true | false | false |
CharlesGulian/Deconv | fits_tools_tesla.py | 1 | 5575 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 14 21:18:54 2016
@author: charlesgulian
"""
import os
#os.chdir('/Users/annepstein/Work/Deconv')
curr_dir = os.getcwd()
import numpy as np
from astropy.io import fits
import matplotlib.pyplot as plt
import matplotlib
#from photutils import aperture_photometry
#from phot... | gpl-3.0 | 1,029,574,979,489,327,000 | 28.973118 | 131 | 0.649865 | false | 3.107581 | true | false | false |
r39132/airflow | airflow/contrib/operators/mlengine_operator.py | 1 | 23245 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the 'License'); you may not us... | apache-2.0 | -5,851,779,120,407,853,000 | 36.431562 | 107 | 0.605248 | false | 4.329484 | false | false | false |
BD823/pcover | project_version1/booklist.py | 1 | 3959 | # -*- coding: ms949 -*-
import re
import json
#text file read
with open('GutindexAll.txt','r') as gutinfile:
data=gutinfile.read()
data=unicode(data, errors='replace')
result = []
isStart = False
for line in data.splitlines():
#if 'by': #line¿¡ ÀúÀÚ°¡ ÀÖ´Â °æ¿ì¿Í ŸÀÌÆ²¸¸ Àִ°æ¿ì¸¦ ±¸ºÐÇØ¾ßÇÒµí
if i... | mit | 7,297,451,816,901,036,000 | 40.673684 | 137 | 0.475625 | false | 2.454433 | false | false | false |
danxhuber/isoclassify | setup.py | 1 | 1463 | import os
from setuptools import setup
# Load version
__version__ = None
# exec(open('isoclassify/version.py').read())
# Load requirements
requirements = None
with open('requirements.txt') as file:
requirements = file.read().splitlines()
# mwdust requires manual install to download maps
# TODO: add warning if `m... | mit | 5,368,206,483,387,825,000 | 28.26 | 92 | 0.686945 | false | 3.694444 | false | false | false |
lebauce/artub | sysfont.py | 1 | 10522 | ## pygame - Python Game Library
## Copyright (C) 2000-2003 Pete Shinners
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Library General Public
## License as published by the Free Software Foundation; either
## version 2 of the License, or (... | gpl-2.0 | 4,310,771,421,104,446,500 | 30.78852 | 101 | 0.567953 | false | 3.936401 | false | false | false |
stephenmcd/ratemyflight | ratemyflight/scripts/create_project.py | 1 | 1581 | #!/usr/bin/env python
import os
import shutil
import sys
import ratemyflight
class ProjectException(Exception):
pass
def create_project():
"""
Copies the contents of the project_template directory to a new directory
specified as an argument to the command line.
"""
# Ensure a directory na... | bsd-2-clause | -4,580,954,432,024,506,400 | 27.232143 | 79 | 0.649589 | false | 3.846715 | false | false | false |
jdgwartney/meter-plugin-sdk-python | setup.py | 1 | 1283 | #
# Copyright 2016 BMC Software, 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 applicable law or agreed to in w... | apache-2.0 | -3,823,786,787,623,511,000 | 32.763158 | 74 | 0.680436 | false | 3.751462 | false | false | false |
hasadna/open-shot | qa/tasks.py | 1 | 3325 | import httplib
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.core.mail import EmailMultiAlternatives
from django.contrib.sites.models import Site
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import User
from django.templ... | bsd-3-clause | 335,651,410,459,111,230 | 38.117647 | 88 | 0.67609 | false | 3.808706 | false | false | false |
Newsrecommender/newsrecommender | ArticleRecommendationProject/Recommendation/Collab_Content_Based.py | 1 | 5856 | import yaml
import pandas as pd
import numpy as np
import sys
import os
from math import sqrt
import matplotlib
import matplotlib.pyplot as plot
import networkx as nx
def get_script_directory():
"""
This function returns the directory of the script in scrip mode
In interactive mode returns interpreter name... | mit | 4,368,910,734,218,285,000 | 38.04 | 198 | 0.715335 | false | 3.551243 | true | false | false |
akretion/connector | connector/queue/model.py | 1 | 16341 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | agpl-3.0 | 4,304,506,418,957,077,000 | 40.474619 | 87 | 0.553944 | false | 4.168622 | false | false | false |
cl0ne/vital-records-registry | registry/registry/settings.py | 1 | 3274 | """
Django settings for registry project.
Generated by 'django-admin startproject' using Django 1.9.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
... | gpl-3.0 | -2,707,232,421,402,551,000 | 25.192 | 91 | 0.694258 | false | 3.61768 | false | false | false |
jabesq/home-assistant | homeassistant/components/totalconnect/alarm_control_panel.py | 1 | 4506 | """Interfaces with TotalConnect alarm control panels."""
import logging
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT,
STATE_ALARM_DISARMED, STATE_ALARM_ARMING, STATE_ALARM_DISARMING,
ST... | apache-2.0 | -3,600,262,308,670,847,000 | 34.761905 | 76 | 0.612517 | false | 3.773869 | false | false | false |
gabrielecker/DogAdoption-Backend | views/dogs.py | 1 | 1667 | # encoding: utf-8
from flask import jsonify, request
from flask_login import login_required, current_user
from project.app import db
from project.models import Dog
from utils.rest import RestView
class DogAPI(RestView):
schema = 'Dog'
def get(self, id):
page = request.args.get('page') or 1
if... | mit | -6,304,520,599,628,042,000 | 27.741379 | 67 | 0.587882 | false | 3.639738 | false | false | false |
efiop/dvc | dvc/repo/experiments/base.py | 1 | 4573 | from typing import Optional
from dvc.exceptions import DvcException, InvalidArgumentError
# Experiment refs are stored according baseline git SHA:
# refs/exps/01/234abcd.../<exp_name>
EXPS_NAMESPACE = "refs/exps"
EXPS_STASH = f"{EXPS_NAMESPACE}/stash"
EXEC_NAMESPACE = f"{EXPS_NAMESPACE}/exec"
EXEC_APPLY = f"{EXEC_N... | apache-2.0 | 2,720,833,934,026,154,000 | 30.979021 | 78 | 0.569429 | false | 3.91524 | false | false | false |
labordoc/labordoc-next | modules/bibformat/lib/bibformat_templates.py | 1 | 86532 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 CERN.
##
## Invenio 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 t... | gpl-2.0 | 7,907,009,272,232,269,000 | 43.420945 | 507 | 0.534947 | false | 4.08536 | false | false | false |
CORDEA/analysis_of_1000genomes-data | programs/add_annotations/missense.py | 1 | 1346 | #!/bin/env python
# encoding:utf-8
#
# Author: CORDEA
# Created: 2014-09-12
#
infile = open("ilm_missene.onmis.vcf", "r")
lines = infile.readlines()
infile.close()
msDict = {}
for line in lines:
samples = line.split(",")[5]
tmp = samples.split("|")
for i in range(len(tmp)):
try:
m... | apache-2.0 | -7,018,247,842,795,256,000 | 28.911111 | 70 | 0.531204 | false | 2.353147 | false | false | false |
Saviio/ClawMonitor | urls.py | 1 | 1245 | from utils import current_random, current, timestring
import urllib, time
class urls():
def __init__():
return None
@staticmethod
def verify_usr(usr):
return "http://login.xunlei.com/check/?u=%s&business_type=108&cachetime=%d&" % (usr, current())
@staticmethod
def login():
... | mit | -6,989,403,600,762,888,000 | 34.6 | 202 | 0.655422 | false | 3.242188 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/resources/types/managed_placement_view.py | 1 | 1296 | # -*- 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 | -5,183,687,149,090,668,000 | 28.454545 | 90 | 0.684414 | false | 4 | false | false | false |
TamiaLab/PySkCode | skcode/utility/cosmetics.py | 1 | 1689 | """
SkCode cosmetics replacement utility code.
"""
import re
# Default cosmetics replacement map (compiled regex)
DEFAULT_COSMETICS_MAP = (
(re.compile(r'(\s+)---(\s+)'), r'\1—\2'),
(re.compile(r'(\s+)--(\s+)'), r'\1—\2'),
(re.compile(r'\.\.\.'), r'…'),
(re.compile(r'\(tm\)'), r'™'),
)
# Document a... | agpl-3.0 | 4,560,335,722,737,678,300 | 30.12963 | 97 | 0.672814 | false | 3.39596 | false | false | false |
gregbanks/suds | suds/bindings/binding.py | 1 | 19048 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 distributed in the hope that it will ... | lgpl-3.0 | -868,910,296,671,780,100 | 34.405204 | 87 | 0.569404 | false | 4.15623 | false | false | false |
destinokm/DesHabitat | backend/articles/migrations/0001_initial.py | 1 | 1937 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-26 07:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Articl... | gpl-3.0 | -4,343,730,946,445,375,500 | 33.589286 | 114 | 0.503356 | false | 4.622912 | false | false | false |
butterscotchstallion/SpiffyRPG | SpiffyRPG/SpiffyWorld/db.py | 1 | 1041 | # -*- coding: utf-8 -*-
import sqlite3 as lite
import os
class Database:
"""
Handles db connection
"""
def __init__(self, **kwargs):
self.log = None
if "log" in kwargs:
self.log = kwargs["log"]
if "path" in kwargs:
path = kwargs["path"]
... | mit | 1,049,532,641,733,517,800 | 23.209302 | 76 | 0.548511 | false | 4.130952 | false | false | false |
jakevdp/klsh | klsh/hamming_ann.py | 1 | 6489 | """
This is a set of classes to perform fast (approximate) nearest neighbors
searches over Hamming spaces.
[1] M. Charikar. Similarity Estimation Techniques from Rounding Algorithms.
ACM Symposium on Theory of Computing, 2002.
"""
__all__ = ["HammingANN", "HammingBrute", "HammingBallTree"]
import numpy as np
from... | bsd-3-clause | 3,745,315,121,985,854,000 | 34.459016 | 78 | 0.572507 | false | 3.75956 | false | false | false |
os2webscanner/os2webscanner | django-os2webscanner/os2webscanner/validate.py | 1 | 3231 | # The contents of this file are subject to the Mozilla Public 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.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"basis,
#... | mpl-2.0 | 564,477,714,231,741,000 | 33.741935 | 87 | 0.666357 | false | 3.897467 | false | false | false |
nvbn/thefuck | thefuck/rules/omnienv_no_such_command.py | 1 | 1061 | import re
from thefuck.utils import (cache, for_app, replace_argument, replace_command,
which)
from subprocess import PIPE, Popen
supported_apps = 'goenv', 'nodenv', 'pyenv', 'rbenv'
enabled_by_default = any(which(a) for a in supported_apps)
COMMON_TYPOS = {
'list': ['versions', 'inst... | mit | -7,693,855,433,599,655,000 | 29.314286 | 80 | 0.655042 | false | 3.347003 | false | false | false |
HumanExposure/factotum | dashboard/views/functional_use_curation.py | 1 | 5589 | from dashboard.models.functional_use import FunctionalUseToRawChem
from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import render, reverse, get_object_or_404, redirect
from django.contrib.auth.decorators import login_required
from django.db.models impor... | gpl-3.0 | 5,112,750,429,061,577,000 | 34.826923 | 86 | 0.615853 | false | 4.047067 | false | false | false |
acemod/ace3-misc | tools/setup.py | 2 | 3202 | #!/usr/bin/env python3
#######################
# ACEX Setup Script #
#######################
import os
import sys
import shutil
import platform
import subprocess
import winreg
######## GLOBALS #########
MAINDIR = "z"
PROJECTDIR = "acex"
##########################
def main():
FULLDIR = "{}\\{}".format(MAINDIR,... | gpl-2.0 | 8,127,507,055,567,471,000 | 31.02 | 209 | 0.599001 | false | 4.022613 | false | false | false |
qedsoftware/commcare-hq | custom/apps/crs_reports/fields.py | 2 | 1360 | from corehq.apps.reports.dont_use.fields import ReportSelectField
from corehq.apps.reports.filters.users import SelectCaseOwnerFilter
from django.utils.translation import ugettext_noop
from django.utils.translation import ugettext as _
from corehq.apps.es import CaseES
def _get_blocks(domain):
query = (CaseES('re... | bsd-3-clause | 6,461,348,915,643,667,000 | 30.627907 | 94 | 0.672059 | false | 3.665768 | false | false | false |
ChengeLi/VehicleTracking | utilities/embedding.py | 1 | 3427 | #### embedding
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE, MDS
from mpl_toolkits.mplot3d import Axes3D
class embeddings(obj):
def __init__(self, model,data):
self.modelChoice = model
self.data = data
# self.data = FeatureMtx_norm
def PCA_embedding(self,n_c... | mit | -6,324,826,729,370,016,000 | 40.289157 | 164 | 0.640502 | false | 3.121129 | false | false | false |
shamanu4/netmiko | netmiko/ssh_dispatcher.py | 1 | 3921 | """Controls selection of proper class based on the device type."""
from __future__ import unicode_literals
from netmiko.cisco import CiscoIosSSH
from netmiko.cisco import CiscoIosTelnet
from netmiko.cisco import CiscoAsaSSH
from netmiko.cisco import CiscoNxosSSH
from netmiko.cisco import CiscoXrSSH
from netmiko.cisco i... | mit | -3,015,145,150,224,998,000 | 33.095652 | 117 | 0.744708 | false | 2.928305 | false | false | false |
jashandeep-sohi/pyds | docs/conf.py | 1 | 8535 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pyds documentation build configuration file, created by
# sphinx-quickstart on Thu May 29 20:47:19 2014.
#
# 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
# autog... | gpl-3.0 | -6,161,528,037,825,426,000 | 30.036364 | 79 | 0.704979 | false | 3.707646 | true | false | false |
berkerpeksag/astor | astor/code_gen.py | 1 | 31784 | # -*- coding: utf-8 -*-
"""
Part of the astor library for Python AST manipulation.
License: 3-clause BSD
Copyright (c) 2008 Armin Ronacher
Copyright (c) 2012-2017 Patrick Maupin
Copyright (c) 2013-2017 Berker Peksag
This module converts an AST into Python source code.
Before being version-controlled as part of... | bsd-3-clause | 844,184,922,287,169,700 | 34.433668 | 89 | 0.56541 | false | 4.013638 | false | false | false |
LiamBao/Spiders | LivePlatformIndex/douyuOnlineCount.py | 1 | 5918 | # -*- coding: utf-8 -*-
##__author__ =='liam'
# python3.52
import re,time,random
import requests
import tkinter as tk
from tkinter import filedialog
import xlsxwriter as wx
from lxml import etree
USER_AGENTS = [
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AcooBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.5... | gpl-3.0 | 1,555,726,848,255,108,600 | 45.674603 | 248 | 0.584184 | false | 2.718447 | false | false | false |
mrpau/kolibri | kolibri/core/content/serializers.py | 1 | 12418 | from django.db.models import Manager
from django.db.models import Sum
from django.db.models.query import RawQuerySet
from le_utils.constants import content_kinds
from rest_framework import serializers
from kolibri.core.content.models import ChannelMetadata
from kolibri.core.content.models import ContentNode
from kolib... | mit | -1,062,654,053,079,444,100 | 31.338542 | 119 | 0.614109 | false | 4.286503 | false | false | false |
wbvalid/python2 | getVduNormal.py | 1 | 1309 | #!/usr/bin/python
import re
import time
import sys
import os
work_path = '/home/vpu_data'
def to_unix(date):
if len(date) < 14:
date = date + '0' * (14 - len(date))
return int(time.mktime(time.strptime(date, "%Y%m%d%H%M%S")))
def convert(file_name):
hex_num = re.findall(r'/(\w{16})_', file_name... | unlicense | 7,932,546,129,014,261,000 | 24.173077 | 110 | 0.556914 | false | 3.051282 | false | false | false |
fifengine/fifengine | engine/python/fife/extensions/pychan/widgets/radiobutton.py | 1 | 4543 | # -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2019 by the FIFE team
# http://www.fifengine.net
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#... | lgpl-2.1 | 7,668,242,136,275,732,000 | 27.39375 | 79 | 0.625358 | false | 3.594146 | false | false | false |
RobCranfill/miditrans | changer.py | 1 | 2952 | #!/usr/bin/python3
#
# Command-line app to write data for MPK mapper app
# Note that we want Python 3, not 2!
# robcranfill@gmail.com
import sys
SR18voiceNames_ = [
"kick",
"snare_1",
"snare_2",
"highhat_1",
"highhat_2",
"highhat_3",
"tom_1",
"tom_2",
... | gpl-2.0 | 4,290,177,914,641,355,300 | 27.114286 | 77 | 0.50542 | false | 2.66426 | false | false | false |
amadeusproject/amadeuslms | dashboards/utils.py | 1 | 62643 | import calendar
import os
from datetime import date, datetime, timedelta
from django.utils import formats, timezone
from django.conf import settings
from django.utils.dateparse import parse_datetime
from django.core.urlresolvers import reverse
from django.utils.formats import get_format
from django.utils.translation im... | gpl-2.0 | -3,478,303,365,244,445,000 | 31.754055 | 272 | 0.532272 | false | 3.935119 | false | false | false |
mrozekma/Sprint | Retrospective.py | 1 | 1171 | from collections import OrderedDict
from Project import Project
from Sprint import Sprint
from utils import *
from stasis.ActiveRecord import ActiveRecord, link
DEFAULT_CATEGORIES = ['Product Management', 'Infrastructure', 'Teamwork', 'Release Planning', 'Scrum Process', 'Engineering Practices']
class Category(Acti... | mit | -6,562,437,916,365,981,000 | 22.897959 | 135 | 0.721605 | false | 3.131016 | false | false | false |
asi-uniovi/malloovia | malloovia/lpsolver.py | 1 | 33503 | # coding: utf-8
# import pandas as pd
"""Malloovia interface to LP solver"""
from typing import Sequence, List, Any
from itertools import product as cartesian_product
from inspect import ismethod
from collections import namedtuple
from uuid import uuid4
import os
import pulp # type: ignore
from pulp import (
L... | mit | 121,577,441,597,928,210 | 38.83591 | 114 | 0.580622 | false | 4.266684 | false | false | false |
lauregonnord/cap-labs | TP04/Mu-evalntype/MyMuTypingVisitor.py | 1 | 1555 | from MuVisitor import MuVisitor
from MuParser import MuParser
from enum import Enum
class MuTypeError(Exception):
pass
class BaseType(Enum):
Float, Integer, Boolean, String, Nil = range(5)
def printBaseType(self):
print(self)
# Basic Type Checking for Mu programs.
class MyMuTypingVisitor(MuV... | gpl-3.0 | 452,382,548,198,036,800 | 24.916667 | 61 | 0.597428 | false | 3.801956 | false | false | false |
Erotemic/plottool | plottool_ibeis/viz_keypoints.py | 1 | 4272 | from __future__ import absolute_import, division, print_function
import utool
import plottool_ibeis.draw_func2 as df2
import numpy as np
from plottool_ibeis import plot_helpers as ph
#(print, print_, printDBG, rrr, profile) = utool.inject(__name__, '[viz_keypoints]', DEBUG=False)
utool.noinject(__name__, '[viz_keypoint... | apache-2.0 | -2,003,975,904,293,060,000 | 34.305785 | 112 | 0.571161 | false | 2.995792 | false | false | false |
timkahlke/BASTA | basta/test_tax_creator.py | 1 | 4320 | import unittest
import os
import sys
from basta import NCBITaxonomyCreator
class TestDB(unittest.TestCase):
def setUp(self):
dir_path = os.path.dirname(os.path.realpath(__file__))
self.pwd = dir_path
with open(os.path.join(self.pwd,"names.tab"), "w") as f:
f.write("2|\tBacteri... | gpl-3.0 | 6,601,308,234,924,260,000 | 54.384615 | 137 | 0.509954 | false | 2.778135 | true | false | false |
nagaozen/my-os-customizations | home/nagaozen/gedit-plugins-2.30.1/usr/local/lib/gedit-2/plugins/codecomment.py | 1 | 9563 | # -*- coding: utf-8 -*-
# Code comment plugin
# This file is part of gedit
#
# Copyright (C) 2005-2006 Igalia
# Copyright (C) 2006 Matthew Dugan
# Copyrignt (C) 2007 Steve Frécinaux
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... | gpl-3.0 | -438,864,936,761,803,460 | 33.395683 | 99 | 0.566722 | false | 3.791435 | false | false | false |
eliben/deep-learning-samples | cs231n/linear_classifier.py | 1 | 2603 | # This is a generic linear classifier that implements SGD - Stochastic Gradient
# Descent (actually its mini-batch generalization).
#
# It has to be derived from by classes that provide a 'loss' member function,
# to implement different classifiers.
# See http://cs231n.github.io/classification/ for background.
import n... | unlicense | 9,185,285,309,427,893,000 | 34.657534 | 80 | 0.58932 | false | 4.092767 | false | false | false |
MauHernandez/cyclope | cyclope/apps/staticpages/admin.py | 1 | 4324 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2010-2013 Código Sur Sociedad Civil.
# All rights reserved.
#
# This file is part of Cyclope.
#
# Cyclope 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 Foundat... | gpl-3.0 | -698,385,631,172,390,800 | 39.027778 | 84 | 0.662966 | false | 4.010204 | false | false | false |
ivanovev/tmb | gui/RSW.py | 1 | 1830 |
from collections import OrderedDict as OD
from util import Data, control_cb, monitor_cb, alarm_trace_cb, dev_io_cb
def status_fmt_cb(val, read=True, n=0):
val = int(val, 16)
return '1' if val & (1 << n) else '0'
def get_ctrl(dev):
ctrl = Data(name='Settings', send=True, io_cb=dev_io_cb)
ctrl.add('chu... | gpl-3.0 | 537,557,001,978,085,200 | 51.285714 | 168 | 0.605464 | false | 2.659884 | false | false | false |
DeanSherwin/django-dynamic-scraper | dynamic_scraper/models.py | 1 | 17900 | #Stage 2 Update (Python 3)
from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from builtins import range
from builtins import str
from builtins import object
import datetime
from django.db import models
from django.db.models import Q
@python_2_unicode_compatible
clas... | bsd-3-clause | -4,625,286,893,330,727,000 | 45.25323 | 257 | 0.646425 | false | 3.466977 | false | false | false |
ericmjl/chameleon | game/player.py | 1 | 3954 | from random import choice
class Player(object):
"""
A base Python class to represent game players.
"""
def __init__(self, chameleon):
super(Player, self).__init__()
self.hand = [] # the five cards that the player has.
self.penalty = [] # the penalty pile that belongs to the pl... | mit | 8,055,643,525,817,262,000 | 34.3125 | 111 | 0.557916 | false | 3.880275 | false | false | false |
mikekap/batchy | batchy/clients/memcached.py | 1 | 4404 | from collections import defaultdict
from itertools import chain
from ..compat import iteritems, itervalues
from ..runloop import coro_return, runloop_coroutine
from ..batch_coroutine import class_batch_coroutine
class BatchMemcachedClient(object):
def __init__(self, real_client):
self.client = real_client... | apache-2.0 | 8,673,413,436,122,850,000 | 34.232 | 96 | 0.599909 | false | 3.489699 | false | false | false |
LandRegistry/address-search-api | service/es_access.py | 1 | 2191 | from elasticsearch import Elasticsearch # type: ignore
from elasticsearch_dsl import Search # type: ignore
from typing import Any, Dict, List, Tuple, Union
from service import app
ELASTICSEARCH_ENDPOINT = app.config['ELASTIC_SEARCH_ENDPOINT']
MAX_NUMBER_SEARCH_RESULTS = app.config['MAX_NUMBER_SEARCH_RESULTS']
SE... | mit | -3,485,829,653,908,113,000 | 40.339623 | 86 | 0.667732 | false | 3.428795 | false | false | false |
compas-dev/compas | src/compas_rhino/forms/image.py | 1 | 3344 | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
try:
basestring
except NameError:
basestring = str
from compas_rhino.forms.base import BaseForm
from System.Windows.Forms import PictureBox
from System.Windows.Forms import PictureBoxSizeMode
from Sys... | mit | -3,657,716,452,254,985,000 | 23.588235 | 124 | 0.608553 | false | 3.962085 | false | false | false |
DroneMapp/powerlibs-django-restless-contrib | setup.py | 1 | 1772 | import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
version = '0.30.0'
def pip_git_to_setuptools_git(url):
match = re.match(r'git\+https://github.com/(?P<organization>[^/]+)/(?P<repository>[^/]+).git@(?P<tag>.+)', url.strip())
if match:
url = 'htt... | mit | 8,690,435,853,167,838,000 | 29.016949 | 123 | 0.645963 | false | 3.776119 | false | false | false |
Seek/RayTracing | blender_export/blender_scene_export.py | 1 | 2760 | import bpy
import bmesh
import gzip
# Date 12/28/15
# Wrriten for Blender ver. 2.76.2b
# This file will serve as a record of how we will transmit data from blender to our raytracer.
# These parameters are more or less mirrored information about BlendData types from:
# http://www.blender.org/api/blender_python_api_2_76... | mit | -2,840,073,239,132,708,000 | 31.093023 | 99 | 0.552174 | false | 3.179724 | false | false | false |
SpaceGroupUCL/qgisSpaceSyntaxToolkit | esstoolkit/external/networkx/algorithms/community/lukes.py | 1 | 8124 | """Lukes Algorithm for exact optimal weighted tree partitioning."""
from copy import deepcopy
from functools import lru_cache
from random import choice
import networkx as nx
from networkx.utils import not_implemented_for
__all__ = ["lukes_partitioning"]
D_EDGE_W = "weight"
D_EDGE_VALUE = 1.0
D_NODE_W = "weight"
D_N... | gpl-3.0 | 6,792,404,174,136,051,000 | 34.779736 | 88 | 0.574735 | false | 3.622658 | false | false | false |
ponty/arduino-sketchbook | libacoll/xtests/test_examples.py | 1 | 2094 | from nose.tools import eq_, ok_
from path import path
from pyavrutils import support, arduino
from pyavrutils.arduino import Arduino, ArduinoCompileError
import logging
root = path(__file__).parent.parent
examples = support.find_examples(root)
fails = [
('PWM.pde', 'atmega8'),
]
# def check_build(ex, hwpack, bo... | bsd-2-clause | 7,967,207,849,194,937,000 | 33.327869 | 114 | 0.509551 | false | 3.561224 | false | false | false |
szopu/datadiffs | datadiffs/freezing.py | 1 | 1812 | from collections import Mapping
class frozendict(Mapping):
def __init__(self, input):
if not isinstance(input, dict):
raise TypeError('{0} is not type of dict'.format(type(input)))
self.__dict = input.copy()
def __getitem__(self, key):
return self.__dict[key]
def __l... | mit | 6,462,465,035,445,186,000 | 23.821918 | 74 | 0.557395 | false | 3.775 | false | false | false |
odb9402/OPPA | oppa/Helper/tools.py | 1 | 5111 | import os
import time
import glob
import re
from ..calculateError import run as calculateError
from ..loadParser.parseLabel import run as parseLabel
from ..loadParser.loadPeak import run as loadPeak
"""
These methods are common parts of learning processes which are in
learn****param.py.
"""
def parallel_learning(MAX... | mit | 4,639,354,527,759,813,000 | 34.006849 | 113 | 0.532968 | false | 3.962016 | false | false | false |
DCGM/EmotionService | src/clusterFaces.py | 1 | 5407 | #!/usr/bin/env python
from __future__ import print_function
import time
import argparse
import cv2
import os
from operator import itemgetter
from collections import defaultdict
from scipy.cluster.hierarchy import linkage, fcluster
from scipy.spatial.distance import pdist
import numpy as np
import caffe
from classif... | bsd-2-clause | -1,064,040,003,081,222,500 | 30.805882 | 103 | 0.587387 | false | 3.741869 | false | false | false |
ozzmeister00/mazeGeneration | mazeGame_hard.py | 1 | 6271 | '''
Hard version of the maze game, which only shows the grid immediately around the player
First iteration, moved the logic around after this was first done to support a multiple-difficulties
mazeGame
'''
import maze
import random
import time
verbDict = {'up':['up','u','north','n'],
'down':['down', 'd', '... | gpl-3.0 | 4,961,732,224,700,495,000 | 25.133333 | 107 | 0.477914 | false | 3.690995 | false | false | false |
cosurgi/trunk | examples/mpi/fibres/exampleFibresMPI.py | 1 | 6543 | #Example showing how to run 'fiber' (gridNode+girdConnection) in Yade-MPI
from yade import utils
from yade.gridpfacet import *
from yade import mpy as mp
# create a Fiber class with attributes of the nodes it consists, the node which corresponds to the centre of mass, and a tuple 'segs' which consists the node pair ... | gpl-2.0 | -5,530,442,072,045,555,000 | 40.942308 | 185 | 0.612563 | false | 3.039015 | false | false | false |
HenriqueLR/simple-route | app/seek/views.py | 1 | 3996 | #encoding> utf-8
from core.models import Maps, Routes
from core.serializers import MapsSerializer, RoutesSerializer
from django.http import Http404
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from django.http import HttpResponse
import json
fr... | mit | -7,706,990,268,082,385,000 | 29.052632 | 86 | 0.714464 | false | 3.349539 | false | false | false |
hanw/p4c | tools/driver/p4c_src/config.py | 1 | 1610 | # Copyright 2013-present Barefoot Networks, 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 applicable law or agr... | apache-2.0 | -8,957,840,182,282,729,000 | 28.814815 | 77 | 0.627329 | false | 4.203655 | true | false | false |
fw1121/Roary | contrib/roary_plots/roary_plots.py | 1 | 5754 | #!/usr/bin/env python
# Copyright (C) <2015> EMBL-European Bioinformatics Institute
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any la... | gpl-3.0 | -5,649,037,397,445,452,000 | 36.122581 | 118 | 0.59993 | false | 3.359019 | false | false | false |
Laurawly/tvm-1 | tutorials/dev/low_level_custom_pass.py | 1 | 6886 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -2,715,676,810,671,700,500 | 39.269006 | 108 | 0.660035 | false | 3.724175 | false | false | false |
ilique/webpushkin | pushkin/pushkin.py | 1 | 13033 | import re
import paramiko
import telnetlib
import time
from django.core.exceptions import ObjectDoesNotExist
from netmiko import ConnectHandler
from .models import Service, CommandGroup
class Switch(object):
def __init__(self, value):
self.value = value
self.fall = False
def __iter__(self):... | mit | 4,651,819,988,733,412,000 | 32.294118 | 119 | 0.518129 | false | 4.227996 | false | false | false |
robintw/Py6S | Py6S/outputs.py | 1 | 17043 | # This file is part of Py6S.
#
# Copyright 2012 Robin Wilson and contributors listed in the CONTRIBUTORS file.
#
# Py6S 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 3 of the License, o... | lgpl-3.0 | -3,590,337,999,511,935,500 | 41.714286 | 218 | 0.535939 | false | 4.165974 | false | false | false |
foospidy/DbDat | plugins/mssql/check_privileges_clr_assembly_permissions.py | 1 | 1261 | class check_privileges_clr_assembly_permissions():
"""
check_privileges_clr_assembly_permissions:
Setting CLR Assembly Permission Sets to SAFE_ACCESS will prevent assemblies
from accessing external system resources such as files, the network,
environment variables, or the registry.
"""
# Ref... | gpl-2.0 | 3,333,233,473,428,498,000 | 32.184211 | 96 | 0.590801 | false | 4.041667 | false | false | false |
kirillmakhonin/med | MED.Server/apps/human_resources/migrations/0004_auto_20160826_2140.py | 1 | 1111 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-26 21:40
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('human_resources', '0003_auto_20160826_2113'),
]
operations = [
migrations.Cre... | mit | 7,525,030,300,426,919,000 | 29.861111 | 114 | 0.558056 | false | 4.273077 | false | false | false |
helloworldC2/VirtualRobot | GuiHUD.py | 1 | 22037 | import scoring
import pygame
import gui
import Game
import selectBar
from selectBar import *
import Level
from Level import *
import Tile
import EntityTreasure
import Keyboard
from pygame.locals import *
from Image import *
class GuiHUD(object):
def __init__(self,screen):
self.ebg = image(screen,(5,5),... | mit | -6,966,806,704,096,815,000 | 47.646799 | 200 | 0.378318 | false | 3.976362 | false | false | false |
luminousflux/lflux | lfluxproject/lstory/migrations/0010_auto.py | 1 | 6790 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing M2M table for field tumbleposts on 'Story'
db.delete_table('lstory_story_tumbleposts')
def b... | mit | 4,325,919,837,941,949,400 | 67.59596 | 182 | 0.552725 | false | 3.674242 | false | false | false |
arunchandramouli/fanofpython | code/features/classes/serialize.py | 1 | 2846 | '''
Use Case: Exploring the Concept of Serializing and De-Serializing in Python
Shortly called as pickling, the needs is to store the object and later resurrect it
----> Use dump for serializing the records into a file
----> Use dumps for serializing the records into a string
---->... | gpl-3.0 | -5,709,167,118,428,060,000 | 20.398496 | 122 | 0.615952 | false | 3.92011 | false | false | false |
ibmjstart/bluemix-python-sample-twitter-influence-app | app/klout-master/klout/api.py | 1 | 7997 | # -*- coding: utf-8 -*-
"""
A minimalist klout API interface. Use of this API
requires klout *developer key*. You can get registered and
get a key at
<http://klout.com/s/developers/v2>
Supports Python >= 2.5 and Python 3
====================
Quickstart
====================
Install the PyPi package::
... | apache-2.0 | -2,995,289,857,531,983,400 | 26.296928 | 109 | 0.553458 | false | 3.904785 | true | false | false |
jandom/rdkit | rdkit/sping/PDF/pdfmetrics.py | 1 | 20669 | #fontmetrics.py - part of PDFgen - copyright Andy Robinson 1999
"""This contains pre-canned text metrics for the PDFgen package, and may also
be used for any other PIDDLE back ends or packages which use the standard
Type 1 postscript fonts.
Its main function is to let you work out the width of strings; it exposes a
s... | bsd-3-clause | 7,079,990,396,523,041,000 | 62.79321 | 100 | 0.540762 | false | 2.155041 | false | false | false |
ichuang/sympy | sympy/physics/quantum/dagger.py | 1 | 4556 | """Hermitian conjugation."""
from sympy import Expr, sympify, Add, Mul, Matrix, Pow
from sympy.physics.quantum.qexpr import QExpr
from sympy.physics.quantum.matrixutils import (
numpy_ndarray, scipy_sparse_matrix, matrix_dagger
)
__all__ = [
'Dagger'
]
class Dagger(Expr):
"""General Hermitian conjugate... | bsd-3-clause | -2,904,213,865,865,206,000 | 29.783784 | 80 | 0.521071 | false | 3.958297 | false | false | false |
sovnarkom/instwitter-py | instwitter/rest/partial/status.py | 1 | 3165 | '''
Created on Jul 31, 2009
@author: aleksandrcicenin
'''
from .. import RESTAPI, authneeded
class StatusAPI(RESTAPI):
def status_show(self, id):
path = self._get_method_path('statuses/show/' + id)
return self._get_request_data(path)
@authneeded
def status_update(self, status, ... | mit | -5,823,370,449,636,178,000 | 40.103896 | 129 | 0.649289 | false | 3.436482 | false | false | false |
jamespcole/home-assistant | homeassistant/components/nmap_tracker/device_tracker.py | 1 | 4634 | """Support for scanning a network with nmap."""
import logging
import re
import subprocess
from collections import namedtuple
from datetime import timedelta
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util
from homeassistant.components.device_tracke... | apache-2.0 | 88,692,433,497,622,320 | 30.958621 | 78 | 0.602719 | false | 4.090026 | true | false | false |
mmcardle/django_app_cookie | hooks/pre_gen_project.py | 1 | 1367 | #!/usr/bin/python
__author__ = 'mm'
import json
import os
print "Start Generate Templates Hook"
cookie_dir = '{{cookiecutter.app_name}}'
project_base = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
json_file = os.path.join(project_base, 'cookiecutter.json')
base_templates = os.path.join(project_base... | mit | 5,755,319,420,505,244,000 | 28.73913 | 77 | 0.625457 | false | 3.334146 | false | false | false |
sgallagher/anaconda | tests/nosetests/pyanaconda_tests/module_network_test.py | 1 | 68731 | #
# Copyright (C) 2018 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that it will be... | gpl-2.0 | 9,146,075,531,034,508,000 | 38.364834 | 187 | 0.569816 | false | 4.156949 | true | false | false |
remyoudompheng/forum-gtk | lib/main_window.py | 1 | 40023 | #! /usr/bin/env python2.4
# -*- coding: utf-8 -*-
# Flrn-gtk: fenêtre principale
# Rémy Oudompheng, Noël 2005
import os
import sys
import time, re
import socket
# Modules GTK
import pygtk
pygtk.require('2.0')
import gtk
import gtk.gdk
import gobject
import pango
from tempfile import mkstemp
# Modules
from grp_buffe... | gpl-3.0 | -6,290,413,386,575,644,000 | 44.699885 | 198 | 0.54033 | false | 3.851709 | false | false | false |
TheNaterz/koadic | core/commands/jobs.py | 1 | 1058 | DESCRIPTION = "shows info about jobs"
def autocomplete(shell, line, text, state):
pass
def help(shell):
pass
def print_job(shell, id):
for stager in shell.stagers:
for session in stager.sessions:
for job in session.jobs:
if job.id == int(id):
job.di... | apache-2.0 | -6,811,713,726,290,306,000 | 23.604651 | 96 | 0.563327 | false | 3.327044 | false | false | false |
mcclurmc/juju | juju/unit/tests/test_lifecycle.py | 1 | 37560 | import logging
import os
import sys
import StringIO
import stat
import yaml
import zookeeper
from twisted.internet.defer import inlineCallbacks, Deferred, fail, returnValue
from juju.unit.lifecycle import (
UnitLifecycle, UnitRelationLifecycle, RelationInvoker)
from juju.unit.workflow import RelationWorkflowSta... | agpl-3.0 | -4,143,050,929,278,393,300 | 37.054711 | 79 | 0.597045 | false | 4.213124 | true | false | false |
krono/pycket | pycket/prims/continuation_marks.py | 1 | 2868 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from pycket import impersonators as imp
from pycket import values
from pycket.cont import call_cont
from pycket.error import SchemeException
from pycket.prims.expose import default, expose, make_callable_label, procedure
# Can use this to promote a get_cmk operation to a ... | mit | 7,641,448,481,125,027,000 | 41.80597 | 130 | 0.710251 | false | 3.300345 | false | false | false |
idmillington/sparkle | sparkle/decorators.py | 1 | 1539 | from tokens import *
import functools
def rule(rule_definition, state=None, add_to_docstring=True):
"""A general purpose decorator-generator for methods that
represent rules. This decorator adds two attributes to the
method: the 'rule' attribute with the given rule strng in it
and the 'state' attribute... | mit | -6,347,593,118,546,538,000 | 33.2 | 68 | 0.640676 | false | 4.359773 | false | false | false |
doy/python-termcast-server | termcast_server/termcast.py | 1 | 9519 | import json
import re
import ssl
import time
import traceback
import vt100
auth_re = re.compile(b'^hello ([^ ]+) ([^ ]+)$')
extra_data_re = re.compile(b'\033\]499;([^\007]*)\007')
clear_patterns = [
b"\033[H\033[J",
b"\033[H\033[2J",
b"\033[2J\033[H",
# this one is from tmux - can't possibly imagine ... | mit | 5,012,020,664,790,571,000 | 30.107843 | 122 | 0.470533 | false | 3.984512 | false | false | false |
PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/test_assign_op_npu.py | 1 | 1547 | # Copyright (c) 2021 PaddlePaddle 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 appli... | apache-2.0 | 9,074,280,440,638,911,000 | 26.625 | 74 | 0.674208 | false | 3.597674 | true | false | false |
marscher/mdtraj | MDTraj/core/trajectory.py | 1 | 51903 | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2014 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors: Kyle A. Beauchamp, TJ Lane, Jo... | lgpl-2.1 | -7,012,444,258,323,120,000 | 37.560921 | 127 | 0.594802 | false | 4.26168 | false | false | false |
thusser/rtml-parse | rtmlparse/examples/telescope.py | 1 | 1224 | from rtmlparse import RTML
from rtmlparse.elements import *
from rtmlparse.misc import units, unitvalues
def main():
# create rtml
rtml = RTML('rtml://monet.uni-goettingen.de/resource', RTML.Mode.resource)
# telescope
telescope = Telescope(rtml, name='MONET/S')
telescope.Aperture = unitvalues.Ape... | mit | -1,235,825,905,234,738,200 | 24 | 78 | 0.670752 | false | 3.308108 | false | false | false |
google/floq-client | floq/client/client/cirq.py | 1 | 1444 | # Copyright 2021 The Floq 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | -7,485,892,882,139,834,000 | 39.111111 | 84 | 0.690443 | false | 4.415902 | false | false | false |
SergioGonzalezSanz/conformal_predictors | tests/nc_measures/SVMTest.py | 1 | 1492 | import unittest
from conformal_predictors.nc_measures.SVM import SVCDistanceNCMeasure
from sklearn.svm import SVC
from numpy import array
class SVMTest(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_1(self):
x = array([[1, 1], [2, 2]])
y = ar... | mit | -3,612,386,006,468,725,000 | 34.52381 | 69 | 0.622654 | false | 3.315556 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.