hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
875dcecdc3f2bc71fedaf046bff94d3c7d84ffd5 | 709 | py | Python | contrib/seeds/makeseeds.py | scamcoindevelop/sscam | e07fd184dc2583f833036b06a2236fd293ad8a75 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | scamcoindevelop/sscam | e07fd184dc2583f833036b06a2236fd293ad8a75 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | scamcoindevelop/sscam | e07fd184dc2583f833036b06a2236fd293ad8a75 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Generate pnSeed[] from Pieter's DNS seeder
#
NSEEDS=600
import re
import sys
from subprocess import check_output
def main():
lines = sys.stdin.readlines()
ips = []
pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):33569")
for line in lines:
m = patt... | 21.484848 | 78 | 0.509168 |
0c83008e6fd35c35678b51764864d15f5a699230 | 173 | py | Python | tests/conftest.py | matutter/water | b3390b02a53661e84200e0c8f00e19459bc7bc82 | [
"MIT"
] | 1 | 2021-02-21T03:09:17.000Z | 2021-02-21T03:09:17.000Z | tests/conftest.py | matutter/water | b3390b02a53661e84200e0c8f00e19459bc7bc82 | [
"MIT"
] | 1 | 2021-02-19T14:24:40.000Z | 2021-02-20T20:06:58.000Z | tests/conftest.py | matutter/water | b3390b02a53661e84200e0c8f00e19459bc7bc82 | [
"MIT"
] | null | null | null | import pytest
def pytest_addoption(parser):
parser.addoption("--coverage", action="store_true",
default=False, help="Enables coverage collecting")
| 28.833333 | 71 | 0.676301 |
b6639938bba42f39410be51f9134ca7c0f540e58 | 2,387 | py | Python | nipype/interfaces/ants/tests/test_auto_JointFusion.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/ants/tests/test_auto_JointFusion.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 2 | 2018-04-26T12:09:32.000Z | 2018-04-27T06:36:49.000Z | nipype/interfaces/ants/tests/test_auto_JointFusion.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 1 | 2019-11-14T14:16:57.000Z | 2019-11-14T14:16:57.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..segmentation import JointFusion
def test_JointFusion_inputs():
input_map = dict(
alpha=dict(
requires=['method'],
usedefault=True,
),
args=dict(argstr='%s', ),
atlas_group_id=dict(argstr='-gp %d...... | 27.125 | 67 | 0.492669 |
93aec54b1596fe657afcf2460b6360ea364ac0ce | 5,282 | py | Python | nova/scheduler/utils.py | bopopescu/nova_audit | 1cd2901802f82d39411adfa04cf2f432ff3bf280 | [
"Apache-2.0"
] | 1 | 2020-02-21T19:19:11.000Z | 2020-02-21T19:19:11.000Z | nova/scheduler/utils.py | bopopescu/nova_audit | 1cd2901802f82d39411adfa04cf2f432ff3bf280 | [
"Apache-2.0"
] | null | null | null | nova/scheduler/utils.py | bopopescu/nova_audit | 1cd2901802f82d39411adfa04cf2f432ff3bf280 | [
"Apache-2.0"
] | 1 | 2020-07-24T08:52:14.000Z | 2020-07-24T08:52:14.000Z | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 40.015152 | 78 | 0.655812 |
7a1397b247f80100fb311b61418abe6e3e0cbf5a | 479 | py | Python | Ar_Script/ar_040_函数_递归斐波那契数列.py | archerckk/PyTest | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | [
"MIT"
] | null | null | null | Ar_Script/ar_040_函数_递归斐波那契数列.py | archerckk/PyTest | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | [
"MIT"
] | 1 | 2020-01-19T01:19:57.000Z | 2020-01-19T01:19:57.000Z | Ar_Script/ar_040_函数_递归斐波那契数列.py | archerckk/PyTest | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | [
"MIT"
] | null | null | null | #先是普通版本求斐波那契数列
def fei(n):
n1 = 1
n2 = 1
n3 = 1
#真正地理解了一下这个n3为什么是等于1了
#它其实在下面的循环走不进去的时候是有作用的
if n < 1:
print('你要计算的位置过小')
while (n - 2) > 0:
n3 = n1 + n2
n1 = n2
n2 = n3
n -= 1
return n3
print(fei(2))
#递归版本
def feiD(n):
if n<1:
print(... | 15.966667 | 34 | 0.492693 |
d13f7e90540370736133cda026bb2758a1dba5b5 | 19,372 | py | Python | src/third_party/chromium/src/build/android/run_tests.py | voku/mod-spdy | bcfb388cbc5415ee660c2b5dbcf61f6f43c2a5ca | [
"Apache-2.0"
] | null | null | null | src/third_party/chromium/src/build/android/run_tests.py | voku/mod-spdy | bcfb388cbc5415ee660c2b5dbcf61f6f43c2a5ca | [
"Apache-2.0"
] | null | null | null | src/third_party/chromium/src/build/android/run_tests.py | voku/mod-spdy | bcfb388cbc5415ee660c2b5dbcf61f6f43c2a5ca | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2012 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.
"""Runs all the native unit tests.
1. Copy over test binary to /data/local on device.
2. Resources: chrome/unit_tests requires r... | 38.589641 | 80 | 0.655585 |
333ac4538347d73ab89c77ac79e96fdcbf0d6c5f | 386 | py | Python | mysite/blog/urls.py | mezgoodle/django-site | a7476be11764c3103d88dcb2599d546068106c29 | [
"MIT"
] | 1 | 2020-12-05T08:24:34.000Z | 2020-12-05T08:24:34.000Z | mysite/blog/urls.py | mezgoodle/django-site | a7476be11764c3103d88dcb2599d546068106c29 | [
"MIT"
] | 1 | 2020-04-21T11:47:02.000Z | 2020-04-21T16:59:51.000Z | mysite/blog/urls.py | mezgoodle/django-site | a7476be11764c3103d88dcb2599d546068106c29 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'blog'
urlpatterns = [
# post views
# path('', views.post_list, name='post_list'),
path('', views.PostListView.as_view(), name='post_list'),
path('<int:year>/<int:month>/<int:day>/<slug:post>/', views.post_detail, name='post_detail'),
pat... | 29.692308 | 97 | 0.660622 |
85c70ed1bbc49fd03ce90b885d4204f322847a4a | 1,583 | py | Python | setup.py | jinbeizame007/planet_pybullet | 9b648355fd70a1aade837d835ccc5e33133ae39a | [
"Apache-2.0"
] | 1 | 2019-03-24T21:59:29.000Z | 2019-03-24T21:59:29.000Z | setup.py | jinbeizame007/planet_pybullet | 9b648355fd70a1aade837d835ccc5e33133ae39a | [
"Apache-2.0"
] | null | null | null | setup.py | jinbeizame007/planet_pybullet | 9b648355fd70a1aade837d835ccc5e33133ae39a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The PlaNet 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 applicable... | 31.66 | 74 | 0.678459 |
aabd608824a96b12e52a2fe5904d532721c30df9 | 9,074 | py | Python | tensorflow/python/kernel_tests/template_test.py | 285219011/hello-world | dfb71ea206eb9f61e5d97c9727caa1a6449e39cb | [
"Apache-2.0"
] | 6 | 2017-04-25T01:30:41.000Z | 2019-12-11T15:08:46.000Z | tensorflow/python/kernel_tests/template_test.py | PaulTR/tensorflow | 84bcff1e814ee5697b5980535583737f8e81d82f | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/template_test.py | PaulTR/tensorflow | 84bcff1e814ee5697b5980535583737f8e81d82f | [
"Apache-2.0"
] | 4 | 2017-04-14T07:31:18.000Z | 2021-08-30T11:06:24.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.307393 | 80 | 0.688451 |
7f0e6529d41c6d446f4b4fb86550589371796678 | 4,126 | py | Python | src/server.py | thaikoushik/xandr-assessment | 9d3511b558c0969fc1d07891f38bd1efb8c59f11 | [
"MIT"
] | null | null | null | src/server.py | thaikoushik/xandr-assessment | 9d3511b558c0969fc1d07891f38bd1efb8c59f11 | [
"MIT"
] | null | null | null | src/server.py | thaikoushik/xandr-assessment | 9d3511b558c0969fc1d07891f38bd1efb8c59f11 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import request, redirect, url_for, jsonify
from flask import Blueprint
from db.db_helper import *
server = Flask(__name__)
#server = Blueprint("", __name__)
@server.route("/readme")
def read_me():
txt = """Hera are the available routes -
1. /save(POST) -... | 44.847826 | 126 | 0.55017 |
174028c52718d2e1528c8b459039584226a2a219 | 23,869 | py | Python | pair/generate/generate_pair_exp.py | 13952522076/diffvg | 2c5af9ecf470b1c7071e821583e5ba09cb2c4622 | [
"Apache-2.0"
] | null | null | null | pair/generate/generate_pair_exp.py | 13952522076/diffvg | 2c5af9ecf470b1c7071e821583e5ba09cb2c4622 | [
"Apache-2.0"
] | null | null | null | pair/generate/generate_pair_exp.py | 13952522076/diffvg | 2c5af9ecf470b1c7071e821583e5ba09cb2c4622 | [
"Apache-2.0"
] | null | null | null | """
Experimental generating pair_exp
python generate_pair.py ../Layerwise/demo2.png --pool_size 60 --free --initial circle --circle_init_radius 0.01
"""
import pydiffvg
import torch
import os
import numpy as np
import cv2
import skimage
import skimage.io
import matplotlib.pyplot as plt
import random
import argparse
... | 48.712245 | 174 | 0.642968 |
fbd9fe78b59249ef8451a75467caeb75c42e6d3e | 3,079 | py | Python | app/app/settings.py | isaaczhou/app-cbrne-api | 8054b20f1c5205f7c890f93482104e65fb637745 | [
"MIT"
] | null | null | null | app/app/settings.py | isaaczhou/app-cbrne-api | 8054b20f1c5205f7c890f93482104e65fb637745 | [
"MIT"
] | null | null | null | app/app/settings.py | isaaczhou/app-cbrne-api | 8054b20f1c5205f7c890f93482104e65fb637745 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bui... | 25.446281 | 91 | 0.695356 |
8e4050857ef866af0b7d6f069551347e3de670d5 | 358 | py | Python | ubermagtable/tests/test_interact.py | ubermag/oommfodt | f0fadbcd990e742647269ee1c2b94302dc4e0def | [
"BSD-3-Clause"
] | null | null | null | ubermagtable/tests/test_interact.py | ubermag/oommfodt | f0fadbcd990e742647269ee1c2b94302dc4e0def | [
"BSD-3-Clause"
] | null | null | null | ubermagtable/tests/test_interact.py | ubermag/oommfodt | f0fadbcd990e742647269ee1c2b94302dc4e0def | [
"BSD-3-Clause"
] | null | null | null | import os
import ubermagtable as ut
def test_interact():
dirname = os.path.join(os.path.dirname(__file__), "test_sample/")
odtfile = os.path.join(dirname, "oommf-new-file2.odt")
table = ut.Table.fromfile(odtfile, x="t")
# Only test whether it runs.
@ut.interact(xlim=table.slider())
def myplo... | 23.866667 | 69 | 0.667598 |
b07485a4ddb13b88dd3a8f6a6aa19a060bd256dc | 4,463 | py | Python | benchmark/startQiskit1327.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit1327.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit1327.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=60
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy as np
import networkx as ... | 32.576642 | 82 | 0.607439 |
479390faa937ae3b44dff1e1f175722de870cfc8 | 562 | py | Python | Term 2/11/1-request-bs4.py | theseana/miniatur | eed89de0b1e0b96bb32067d5c049c6fd4ca5f872 | [
"MIT"
] | 1 | 2022-01-16T00:30:43.000Z | 2022-01-16T00:30:43.000Z | Term 2/11/1-request-bs4.py | theseana/miniatur | eed89de0b1e0b96bb32067d5c049c6fd4ca5f872 | [
"MIT"
] | null | null | null | Term 2/11/1-request-bs4.py | theseana/miniatur | eed89de0b1e0b96bb32067d5c049c6fd4ca5f872 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
url = "https://divar.ir/s/rasht/bike-skate-scooter"
data = requests.get(url)
soup = BeautifulSoup(data.content, "html.parser")
names = soup.find_all('div', class_="kt-post-card__title")
prices = soup.find_all('div', class_="kt-post-card__top-description kt-post-card-desc... | 40.142857 | 113 | 0.72242 |
bd3c278ae13a0d1ae4e0d6d9cfaa8a8b525f4ffe | 17,216 | py | Python | python_modules/dagster/dagster_tests/daemon_tests/test_backfill.py | a-cid/dagster | 13fefd6aea44b63338377e02ca4af6e868bdba47 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/daemon_tests/test_backfill.py | a-cid/dagster | 13fefd6aea44b63338377e02ca4af6e868bdba47 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/daemon_tests/test_backfill.py | a-cid/dagster | 13fefd6aea44b63338377e02ca4af6e868bdba47 | [
"Apache-2.0"
] | null | null | null | import os
import random
import string
import sys
import time
from collections import defaultdict
from contextlib import contextmanager
import pendulum
import pytest
from dagster import Any, Field, pipeline, repository, solid
from dagster.core.definitions import PartitionSetDefinition
from dagster.core.execution.backfi... | 35.278689 | 99 | 0.668622 |
158d7ca0822e0620dc6b8a41825e31fe0105bc7f | 535 | py | Python | coco/web/settings.py | ipynbsrv/ipynbsrv | 6cd99719c2a9b3814ee37d87a38adcbf30172141 | [
"BSD-3-Clause"
] | null | null | null | coco/web/settings.py | ipynbsrv/ipynbsrv | 6cd99719c2a9b3814ee37d87a38adcbf30172141 | [
"BSD-3-Clause"
] | null | null | null | coco/web/settings.py | ipynbsrv/ipynbsrv | 6cd99719c2a9b3814ee37d87a38adcbf30172141 | [
"BSD-3-Clause"
] | null | null | null | """
Setting storing the name of the cookie that is used to check access via the reverse proxy to containers.
"""
AUTH_COOKIE_NAME = 'username'
"""
Setting storing the name of the header that is indicating the requested URI, the reverse proxy is adding to sub-requests.
"""
PROXY_URI_HEADER = 'HTTP_X_ORIGINAL_URI'
""... | 23.26087 | 121 | 0.743925 |
322e9e742b95b817575496e4793f2cc024d288ba | 187 | py | Python | nabu/processing/tfwriters/__init__.py | rzcwade/nabu | 11238abd890b58a0f070c1886dc23b170b992b68 | [
"MIT"
] | 3 | 2019-02-15T03:28:42.000Z | 2019-06-29T14:39:58.000Z | nabu/processing/tfwriters/__init__.py | rzcwade/nabu | 11238abd890b58a0f070c1886dc23b170b992b68 | [
"MIT"
] | null | null | null | nabu/processing/tfwriters/__init__.py | rzcwade/nabu | 11238abd890b58a0f070c1886dc23b170b992b68 | [
"MIT"
] | 1 | 2019-04-19T06:58:47.000Z | 2019-04-19T06:58:47.000Z | '''@package tfwriters
contains the objects for writing tensorflow record files'''
from . import tfwriter, array_writer, string_writer, tfwriter_factory,\
binary_writer, alignment_writer
| 31.166667 | 71 | 0.818182 |
9f1763aa7b2fe4551ad0958223ceefa837e1c1d5 | 225,292 | py | Python | theano/tensor/basic.py | AT-jamesp0013/Theano | b158a2360e76f19434592c30cab707d88c5fd725 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/basic.py | AT-jamesp0013/Theano | b158a2360e76f19434592c30cab707d88c5fd725 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/basic.py | AT-jamesp0013/Theano | b158a2360e76f19434592c30cab707d88c5fd725 | [
"BSD-3-Clause"
] | null | null | null | """A `Type` and `Op` classes to work with numpy.ndarrays symbolically."""
from __future__ import absolute_import, print_function, division
from six.moves import builtins
import sys
import warnings
import numpy as np
from six import integer_types
from six.moves import xrange
import numbers
import theano
from theano.c... | 33.282907 | 162 | 0.578338 |
11d3fde190e7e1dd654cc79db79eb1f6602f7c44 | 6,117 | py | Python | services/card/cards/alarmheat.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | null | null | null | services/card/cards/alarmheat.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | null | null | null | services/card/cards/alarmheat.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Alarm heatmap
# ---------------------------------------------------------------------
# Copyright (C) 2007-2017 The NOC Project
# See LICENSE for details
# ------------------------------------------------------------------... | 37.29878 | 99 | 0.493052 |
d5846f371ff4695d2bc2262c251a1849af9f8bc8 | 2,033 | py | Python | commerce/views.py | anar2706/allauth_override | 8d06e3c11bf54ff8cc2e8feb5b9af53ad4234720 | [
"MIT"
] | 1 | 2020-06-02T16:39:08.000Z | 2020-06-02T16:39:08.000Z | commerce/views.py | anar2706/allauth_override | 8d06e3c11bf54ff8cc2e8feb5b9af53ad4234720 | [
"MIT"
] | 8 | 2020-06-05T23:52:38.000Z | 2022-03-12T00:02:20.000Z | commerce/views.py | anar2706/allauth_override | 8d06e3c11bf54ff8cc2e8feb5b9af53ad4234720 | [
"MIT"
] | null | null | null | from django.shortcuts import render,get_object_or_404,reverse,redirect
from django.views.generic import ListView,DetailView,CreateView,UpdateView
from django.urls import reverse_lazy
from .forms import ProductForm
from .models import Product
from .models import Comment
from .forms import CommentForm
# Create your views... | 27.849315 | 80 | 0.690113 |
dc940c3050a3345eec5e917766b6a466310fca3b | 5,428 | py | Python | Docs/conf.py | pppt94/PythonGameCollection | 26f7919edc50a1afc243e3b96efe9a0eeed76b22 | [
"MIT"
] | null | null | null | Docs/conf.py | pppt94/PythonGameCollection | 26f7919edc50a1afc243e3b96efe9a0eeed76b22 | [
"MIT"
] | null | null | null | Docs/conf.py | pppt94/PythonGameCollection | 26f7919edc50a1afc243e3b96efe9a0eeed76b22 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.155556 | 82 | 0.655674 |
49b38bee062b0cf3ca46600246b62e05d4a752e5 | 2,149 | py | Python | setup.py | iPERDance/neural_renderer | e5f54f71a8941acf372514eb92e289872f272653 | [
"MIT"
] | 12 | 2020-12-15T06:11:56.000Z | 2021-12-15T03:48:33.000Z | setup.py | iPERDance/neural_renderer | e5f54f71a8941acf372514eb92e289872f272653 | [
"MIT"
] | 4 | 2021-01-22T08:25:03.000Z | 2022-03-28T22:54:02.000Z | setup.py | iPERDance/neural_renderer | e5f54f71a8941acf372514eb92e289872f272653 | [
"MIT"
] | 7 | 2020-12-07T04:26:00.000Z | 2021-09-29T18:55:54.000Z | from setuptools import setup, find_packages
import unittest
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
cxx_args = ['-std=c++14']
# compute architecture capability
# nvcc_args = [
# '-gencode', 'arch=compute_30,code=sm_30',
# '-gencode', 'arch=compute_35,code=sm_35',
# '-gencode'... | 34.66129 | 91 | 0.69986 |
7f63608ca3d686ffbc195f38d592bd5146b9bf15 | 1,087 | py | Python | chapters/appendix_c/tfx_template_example/models/keras/model_test.py | swilliams11/building-machine-learning-pipelines | b7e5e722975b3138005892e4644bfadb61ada945 | [
"MIT"
] | 465 | 2020-05-18T08:23:42.000Z | 2022-03-28T14:51:43.000Z | chapters/appendix_c/tfx_template_example/models/keras/model_test.py | swilliams11/building-machine-learning-pipelines | b7e5e722975b3138005892e4644bfadb61ada945 | [
"MIT"
] | 49 | 2020-06-25T12:35:32.000Z | 2021-11-23T22:47:30.000Z | chapters/appendix_c/tfx_template_example/models/keras/model_test.py | swilliams11/building-machine-learning-pipelines | b7e5e722975b3138005892e4644bfadb61ada945 | [
"MIT"
] | 163 | 2020-05-19T07:20:13.000Z | 2022-03-24T06:05:41.000Z | # Lint as: python2, python3
# Copyright 2020 Google LLC. 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 req... | 30.194444 | 74 | 0.75805 |
dfd2544c3a851bf3812bb5a5febcfa9453ec10e2 | 3,427 | py | Python | rajasablon/settings.py | ahmadsyarif/Django-RajaSablon | 99ae4b93382a0f0fe1539fc01bad85ce9f3f6d58 | [
"Apache-2.0"
] | null | null | null | rajasablon/settings.py | ahmadsyarif/Django-RajaSablon | 99ae4b93382a0f0fe1539fc01bad85ce9f3f6d58 | [
"Apache-2.0"
] | null | null | null | rajasablon/settings.py | ahmadsyarif/Django-RajaSablon | 99ae4b93382a0f0fe1539fc01bad85ce9f3f6d58 | [
"Apache-2.0"
] | null | null | null | """
Django settings for rajasablon project.
Generated by 'django-admin startproject' using Django 1.9.7.
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... | 25.766917 | 91 | 0.700321 |
e33c38fd817444390952265d4c40c48a6444bb1e | 3,086 | py | Python | server/src/experiments/robot_maze.py | gabimart/weblabdeusto | 7b6ad43890ef02b4e00d2719edc434eb69016938 | [
"BSD-2-Clause"
] | null | null | null | server/src/experiments/robot_maze.py | gabimart/weblabdeusto | 7b6ad43890ef02b4e00d2719edc434eb69016938 | [
"BSD-2-Clause"
] | null | null | null | server/src/experiments/robot_maze.py | gabimart/weblabdeusto | 7b6ad43890ef02b4e00d2719edc434eb69016938 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005 onwards University of Deusto
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# This software consists of contributions made by many individuals,
# list... | 29.673077 | 264 | 0.633506 |
7dc4fac16d7d0909273c542795204dfabceaf05d | 3,873 | py | Python | databricks/koalas/tests/test_series_datetime.py | zatang007/koalas | dabeceff919aab8d44f7fbbf3d5502d410736c6f | [
"Apache-2.0"
] | 1 | 2021-01-17T18:26:33.000Z | 2021-01-17T18:26:33.000Z | databricks/koalas/tests/test_series_datetime.py | mercileesb/koalas | 685176c512f31166f0e472aa0f461d0f1449fb0c | [
"Apache-2.0"
] | null | null | null | databricks/koalas/tests/test_series_datetime.py | mercileesb/koalas | 685176c512f31166f0e472aa0f461d0f1449fb0c | [
"Apache-2.0"
] | 1 | 2020-06-16T09:29:04.000Z | 2020-06-16T09:29:04.000Z | #
# Copyright (C) 2019 Databricks, 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 i... | 31.233871 | 95 | 0.6504 |
727f4d55de5b447d43119264323f5502c7b743f2 | 3,360 | py | Python | gongneungdynamics/Kinematics.py | voyagerAhn/quadruped_robot | 1ae296c5e921b96d2f446087689c3a8eba03c497 | [
"MIT"
] | null | null | null | gongneungdynamics/Kinematics.py | voyagerAhn/quadruped_robot | 1ae296c5e921b96d2f446087689c3a8eba03c497 | [
"MIT"
] | null | null | null | gongneungdynamics/Kinematics.py | voyagerAhn/quadruped_robot | 1ae296c5e921b96d2f446087689c3a8eba03c497 | [
"MIT"
] | null | null | null | import numpy as np
from transforms3d.euler import euler2mat
def leg_explicit_inverse_kinematics(r_body_foot, leg_index, config):
"""Find the joint angles corresponding to the given body-relative foot position for a given leg and configuration
Parameters
----------
r_body_foot : [type]
[de... | 36.129032 | 136 | 0.664881 |
b328767dc513d8539589b347d4c28ee02621edef | 30,203 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_route_filters_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_route_filters_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_route_filters_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.030844 | 193 | 0.661524 |
b9900a8d5db9f97c168816da23a584fe00bb28f3 | 3,255 | py | Python | Iot/synth.py | garygitton/google-cloud-php | 8ac34686059df4f10244db3b24abe4439273605b | [
"Apache-2.0"
] | 5 | 2019-01-25T08:48:18.000Z | 2020-09-19T12:45:47.000Z | Iot/synth.py | garygitton/google-cloud-php | 8ac34686059df4f10244db3b24abe4439273605b | [
"Apache-2.0"
] | 3 | 2019-07-26T14:29:09.000Z | 2021-04-12T15:24:31.000Z | Iot/synth.py | garygitton/google-cloud-php | 8ac34686059df4f10244db3b24abe4439273605b | [
"Apache-2.0"
] | 3 | 2019-07-25T22:19:58.000Z | 2021-04-12T09:41:35.000Z | # Copyright 2018 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... | 26.680328 | 94 | 0.643625 |
73b67ef302f4c494a065d2f71bcdb929f4e99b34 | 4,335 | py | Python | hermione/cli.py | karenstemartins/hermione | 3d411ea7a8a8e1929e3b7f0fb0a0d238d25696d0 | [
"Apache-2.0"
] | 183 | 2020-06-03T22:43:14.000Z | 2022-03-17T22:39:07.000Z | hermione/cli.py | karenstemartins/hermione | 3d411ea7a8a8e1929e3b7f0fb0a0d238d25696d0 | [
"Apache-2.0"
] | 31 | 2020-06-03T22:55:18.000Z | 2022-03-27T20:06:17.000Z | hermione/cli.py | karenstemartins/hermione | 3d411ea7a8a8e1929e3b7f0fb0a0d238d25696d0 | [
"Apache-2.0"
] | 43 | 2020-06-03T22:45:03.000Z | 2021-12-29T19:43:54.000Z | import click
import os
import re
import sys
from .writer import *
from .module_writer import modules_autocomplete, write_module
from .__init__ import __version__ as version
LOCAL_PATH = os.getcwd()
# Correct LOCAL_PATH in case of empty spaces #21
logo = r"""
_ _
| |__ ___... | 31.875 | 134 | 0.645905 |
c8ae8727644c343b27e186a18eccda5f015963d5 | 3,561 | py | Python | tests/run-programs.py | sielicki/clvm_rs | cb3bf09ef154f5e0026b8305b986204d9ea11678 | [
"Apache-2.0"
] | null | null | null | tests/run-programs.py | sielicki/clvm_rs | cb3bf09ef154f5e0026b8305b986204d9ea11678 | [
"Apache-2.0"
] | null | null | null | tests/run-programs.py | sielicki/clvm_rs | cb3bf09ef154f5e0026b8305b986204d9ea11678 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import subprocess
import glob
import time
import sys
import platform
from clvm_rs import deserialize_and_run_program, STRICT_MODE
from clvm import KEYWORD_FROM_ATOM, KEYWORD_TO_ATOM
from clvm.operators import OP_REWRITE
from clvm.EvalError import EvalError
from colorama import init, Fore, Style
... | 31.236842 | 114 | 0.592811 |
f0323086052320333b13fcf123b94e4bce1ed74c | 320 | py | Python | app/shell.py | tahesse/Kvinder | ae24ff64b04c31e7fe55e8fcd80d4d2b18613520 | [
"Apache-2.0"
] | 1 | 2020-09-22T04:35:27.000Z | 2020-09-22T04:35:27.000Z | app/shell.py | tahesse/Kvinder | ae24ff64b04c31e7fe55e8fcd80d4d2b18613520 | [
"Apache-2.0"
] | null | null | null | app/shell.py | tahesse/Kvinder | ae24ff64b04c31e7fe55e8fcd80d4d2b18613520 | [
"Apache-2.0"
] | 1 | 2020-12-19T15:34:05.000Z | 2020-12-19T15:34:05.000Z | import kivy
from kivy.factory import Factory
from kivy.app import App
kivy.require('1.8.0')
class Shell(App):
def build(self):
# the root is created in shell.kv
root = self.root
# register widgets
Factory.register('Swiper', module='app.widgets')
Factory.register('Card', module='app.widgets')
| 16.842105 | 48 | 0.690625 |
4a45a3116d7b6f526e5280c4be86fc558d5f518a | 2,840 | py | Python | rssynergia/elliptic/elliptic_post_processing.py | radiasoft/rs_synergia | b43509de7f4a938354dc127762d8e723463e0e95 | [
"Apache-2.0"
] | null | null | null | rssynergia/elliptic/elliptic_post_processing.py | radiasoft/rs_synergia | b43509de7f4a938354dc127762d8e723463e0e95 | [
"Apache-2.0"
] | null | null | null | rssynergia/elliptic/elliptic_post_processing.py | radiasoft/rs_synergia | b43509de7f4a938354dc127762d8e723463e0e95 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import random
class ellipticPostProcessing:
def __init__(self, _t, _c, _beta, _betaPrime=0.):
self.ellipticT = -1.*_t
self.ellipticC = _c
self.rtbeta = np.sqrt(_beta)
self.betaPrime = _betaPrime
def computeHamiltonian(self, xHat, pxHat, y... | 32.643678 | 91 | 0.502465 |
8e96650f0a3399de8916911c6c10fa0606295715 | 13,764 | py | Python | main_right.py | Jonghyun-Kim-73/SAMG_Project | 42aef9985bc40775fd72d4525ce72ed299d93db1 | [
"Apache-2.0"
] | null | null | null | main_right.py | Jonghyun-Kim-73/SAMG_Project | 42aef9985bc40775fd72d4525ce72ed299d93db1 | [
"Apache-2.0"
] | null | null | null | main_right.py | Jonghyun-Kim-73/SAMG_Project | 42aef9985bc40775fd72d4525ce72ed299d93db1 | [
"Apache-2.0"
] | null | null | null | import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from Flag import Flag
from TOOL_MatGP2 import Trend
class MainRight(QWidget):
qss = """
QWidget {
background: rgb(128, 128, 128);
border: 2px solid rgb(0, 0, 0);
font-size: ... | 37.606557 | 125 | 0.517727 |
ed9330f4bd435e60b6f5a52cb5ff50965fa766dc | 536 | py | Python | crudapp/model/login.py | MrMattSim/crudmap | 77fb0bb35a10f69b84804d228399e843e8c09f24 | [
"MIT"
] | null | null | null | crudapp/model/login.py | MrMattSim/crudmap | 77fb0bb35a10f69b84804d228399e843e8c09f24 | [
"MIT"
] | null | null | null | crudapp/model/login.py | MrMattSim/crudmap | 77fb0bb35a10f69b84804d228399e843e8c09f24 | [
"MIT"
] | 3 | 2016-07-12T17:45:02.000Z | 2021-04-15T13:28:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" The model receives commands from the controller,
and interacts with the host computer:
- reads data from db
- writes data
- writes to console
- logs
- etc
The db model is built using SQLAlchemy
"""
def raise_error_if_not_logged_in(session... | 20.615385 | 52 | 0.641791 |
60d34c12830451c7b5a9ec597b22cf99d8d923d1 | 4,688 | py | Python | tests/document/test_document_sort.py | heikomuller/histore | d600052514a1c5f672137f76a6e1388184b17cd4 | [
"BSD-3-Clause"
] | 2 | 2020-09-05T23:27:41.000Z | 2021-08-08T20:46:54.000Z | tests/document/test_document_sort.py | heikomuller/histore | d600052514a1c5f672137f76a6e1388184b17cd4 | [
"BSD-3-Clause"
] | 22 | 2020-05-22T01:38:08.000Z | 2021-04-28T12:41:46.000Z | tests/document/test_document_sort.py | heikomuller/histore | d600052514a1c5f672137f76a6e1388184b17cd4 | [
"BSD-3-Clause"
] | 1 | 2021-08-08T20:46:58.000Z | 2021-08-08T20:46:58.000Z | # This file is part of the History Store (histore).
#
# Copyright (C) 2018-2021 New York University.
#
# The History Store (histore) is released under the Revised BSD License. See
# file LICENSE for full license details.
"""Unit test for sorting CSV documents."""
from tempfile import NamedTemporaryFile as TempFile
i... | 37.806452 | 88 | 0.543729 |
ea14f705d922017a0a5cdd828fc266f419cd3455 | 3,959 | py | Python | cloudbridge/providers/aws/provider.py | MosheFriedland/cloudbridge | af7644322044863d401645311c0d1f2556bccb63 | [
"MIT"
] | 61 | 2018-07-10T18:32:43.000Z | 2022-03-06T04:50:20.000Z | cloudbridge/providers/aws/provider.py | MosheFriedland/cloudbridge | af7644322044863d401645311c0d1f2556bccb63 | [
"MIT"
] | 134 | 2018-07-02T16:46:29.000Z | 2022-02-03T17:05:43.000Z | cloudbridge/providers/aws/provider.py | MosheFriedland/cloudbridge | af7644322044863d401645311c0d1f2556bccb63 | [
"MIT"
] | 23 | 2018-08-07T17:33:16.000Z | 2021-12-25T01:44:20.000Z | """Provider implementation based on boto library for AWS-compatible clouds."""
import logging
import boto3
from botocore.client import Config
from cloudbridge.base import BaseCloudProvider
from cloudbridge.base.helpers import get_env
from .services import AWSComputeService
from .services import AWSDnsService
from .... | 31.672 | 78 | 0.63703 |
d65bc2323d9fa4a14782763c7c7b30b6f2c9f2d6 | 801 | py | Python | backend/models/post.py | redhatcat/vueblog | 8731960f04adb69324dd74808b2abff4143c611a | [
"MIT"
] | 1 | 2019-05-22T00:37:37.000Z | 2019-05-22T00:37:37.000Z | backend/models/post.py | redhatcat/vueblog | 8731960f04adb69324dd74808b2abff4143c611a | [
"MIT"
] | null | null | null | backend/models/post.py | redhatcat/vueblog | 8731960f04adb69324dd74808b2abff4143c611a | [
"MIT"
] | null | null | null | from datetime import datetime
from mongoengine import (
Document,
DateTimeField,
IntField,
ListField,
StringField,
signals,
)
from models.util import mongo_to_dict
class Post(Document):
title = StringField(max_length=120, required=True)
slug = StringField(max_length=120, required=True, ... | 26.7 | 66 | 0.717853 |
bd7a434e5e8f8d438f88da5188e07b37de7a8fb4 | 19,966 | py | Python | test/test_hub_rest_api_python.py | iskunk/hub-rest-api-python | 87ac93512137e99a1b600dfeecf48ace0aca7d53 | [
"Apache-2.0"
] | 68 | 2018-07-23T07:39:52.000Z | 2022-02-08T07:12:51.000Z | test/test_hub_rest_api_python.py | iskunk/hub-rest-api-python | 87ac93512137e99a1b600dfeecf48ace0aca7d53 | [
"Apache-2.0"
] | 103 | 2018-08-06T14:45:16.000Z | 2022-03-22T10:43:53.000Z | test/test_hub_rest_api_python.py | iskunk/hub-rest-api-python | 87ac93512137e99a1b600dfeecf48ace0aca7d53 | [
"Apache-2.0"
] | 78 | 2018-11-01T20:43:27.000Z | 2022-03-21T15:34:37.000Z | #!/usr/bin/env python
import copy
import json
import os
import pytest
import re
from urllib.parse import urlparse
from blackduck.HubRestApi import HubInstance
from unittest.mock import patch, MagicMock, mock_open
fake_hub_host = "https://my-hub-host"
def return_auth_token(api_token):
if api_token:
ret... | 39.852295 | 136 | 0.708855 |
ffb702e50e489f3c85b57c5554600b2a2e3caf4d | 1,069 | py | Python | src/_geo.py | nuuuwan/highways_lk | 65ca88da8828867759c8d96d6991b6bf1a6d2195 | [
"MIT"
] | 1 | 2022-01-17T11:16:57.000Z | 2022-01-17T11:16:57.000Z | src/_geo.py | nuuuwan/highways_lk | 65ca88da8828867759c8d96d6991b6bf1a6d2195 | [
"MIT"
] | null | null | null | src/_geo.py | nuuuwan/highways_lk | 65ca88da8828867759c8d96d6991b6bf1a6d2195 | [
"MIT"
] | null | null | null | def get_bbox(latlng_list):
max_lat, max_lng = min_lat, min_lng = latlng_list[0]
for [lat, lng] in latlng_list[1:]:
min_lat = min(min_lat, lat)
max_lat = max(max_lat, lat)
min_lng = min(min_lng, lng)
max_lng = max(max_lng, lng)
lat_span = max_lat - min_lat
lng_span = max_l... | 22.744681 | 60 | 0.53508 |
10367d2129b758caa066a14660a9cb678e712270 | 1,392 | py | Python | setup.py | clnrp/logicqubit-gpu | 5de45887e95d3bd5d9316d594ab7049604f52962 | [
"Apache-2.0"
] | null | null | null | setup.py | clnrp/logicqubit-gpu | 5de45887e95d3bd5d9316d594ab7049604f52962 | [
"Apache-2.0"
] | null | null | null | setup.py | clnrp/logicqubit-gpu | 5de45887e95d3bd5d9316d594ab7049604f52962 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
from os import path
from io import open
import logicqubit
# sudo pip3 install twine
# python setup.py sdist
# python setup.py bdist_wheel
# twine upload dist/*
# sudo python setup.py install
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'... | 29 | 109 | 0.663793 |
850ee5ebc1173af2337d184e4aec4922e399d626 | 1,070 | py | Python | attendees/users/models/menu_auth_group.py | xjlin0/attendees | 3c337ee68c00f17cbbbe26f2e33131e57850e4ed | [
"MIT"
] | 1 | 2020-03-26T00:42:04.000Z | 2020-03-26T00:42:04.000Z | attendees/users/models/menu_auth_group.py | xjlin0/attendees | 3c337ee68c00f17cbbbe26f2e33131e57850e4ed | [
"MIT"
] | null | null | null | attendees/users/models/menu_auth_group.py | xjlin0/attendees | 3c337ee68c00f17cbbbe26f2e33131e57850e4ed | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import Group
from model_utils.models import TimeStampedModel, SoftDeletableModel
from attendees.users.models import Menu
class MenuAuthGroup(TimeStampedModel, SoftDeletableModel):
id = models.BigAutoField(
auto_created=True,
primary_key... | 21.836735 | 90 | 0.608411 |
34ddbb9e31a7a4f9a879e9c716f7993c572ce15b | 2,946 | py | Python | examples/cluster/plot_commonnn_data_sets.py | rth/scikit-learn-extra | 55ad1f1d4d5b4525ee88cb3114a4682e4d1f061a | [
"BSD-3-Clause"
] | 120 | 2019-03-01T11:55:20.000Z | 2022-03-30T07:31:39.000Z | examples/cluster/plot_commonnn_data_sets.py | kevinfjiang/scikit-learn-extra | 859ce5e7d8e01689c93c54e343fa47e3cb9372a2 | [
"BSD-3-Clause"
] | 111 | 2019-03-01T13:22:21.000Z | 2022-03-07T12:46:53.000Z | examples/cluster/plot_commonnn_data_sets.py | kevinfjiang/scikit-learn-extra | 859ce5e7d8e01689c93c54e343fa47e3cb9372a2 | [
"BSD-3-Clause"
] | 41 | 2019-03-01T10:48:11.000Z | 2022-02-27T19:50:44.000Z | """
==========================================
Common-nearest-neighbor clustering demo II
==========================================
Common-nearest neighbor clustering of data points following a density
criterion. Two points will be part of the same cluster if they share a
minimum number of common neighbors. Read more... | 26.540541 | 93 | 0.609301 |
9c9e8fd7e412136525314046ffffe6ba25be965b | 1,174 | py | Python | src/cpapi/OpenMayaUI.py | cpcgskill/cpapi | 50ebd86637aec5aab47dff5561f1f1b54e967d64 | [
"Apache-2.0"
] | 1 | 2021-09-11T08:06:59.000Z | 2021-09-11T08:06:59.000Z | src/cpapi/OpenMayaUI.py | cpcgskill/cpapi | 50ebd86637aec5aab47dff5561f1f1b54e967d64 | [
"Apache-2.0"
] | null | null | null | src/cpapi/OpenMayaUI.py | cpcgskill/cpapi | 50ebd86637aec5aab47dff5561f1f1b54e967d64 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*-coding:utf-8 -*-
u"""
:创建时间: 2020/5/18 23:57
:作者: 苍之幻灵
:我的主页: https://cpcgskill.com
:QQ: 2921251087
:爱发电: https://afdian.net/@Phantom_of_the_Cang
:aboutcg: https://www.aboutcg.org/teacher/54335
:bilibili: https://space.bilibili.com/351598127
"""
from .__OpenMayaUI__ import *
__all__ = [
"MFn... | 21.345455 | 47 | 0.654174 |
b33dc3042b787e3680bd7eed83dfd7a68ef5fe7e | 5,897 | py | Python | ProgressBar/ProgressBarExample.py | thimper/PySudouStock | afa1c8cffd1632e944f4da5ab77288b49140327b | [
"Apache-2.0"
] | 1 | 2016-12-11T13:50:23.000Z | 2016-12-11T13:50:23.000Z | ProgressBar/ProgressBarExample.py | thimper/PySudouStock | afa1c8cffd1632e944f4da5ab77288b49140327b | [
"Apache-2.0"
] | null | null | null | ProgressBar/ProgressBarExample.py | thimper/PySudouStock | afa1c8cffd1632e944f4da5ab77288b49140327b | [
"Apache-2.0"
] | null | null | null | #coding:utf-8
import sys
import time
from progressbar import AnimatedMarker, Bar, BouncingBar, Counter, ETA, \
FileTransferSpeed, FormatLabel, Percentage, AdaptiveETA,\
ProgressBar, ReverseBar, RotatingMarker, \
SimpleProgress, Timer
examples = []
def example(fn):
try: name = 'Example %d' % int(fn.__na... | 28.080952 | 76 | 0.594709 |
6e700f864ffb14afb97d35b6e47b0c973cb968e8 | 9,115 | py | Python | payments/migrations/0004_auto__add_field_payment_is_notify.py | ygrass/handsome | 0ea016745d92054bd4df8d934c1b67fd61b6f845 | [
"Unlicense"
] | null | null | null | payments/migrations/0004_auto__add_field_payment_is_notify.py | ygrass/handsome | 0ea016745d92054bd4df8d934c1b67fd61b6f845 | [
"Unlicense"
] | null | null | null | payments/migrations/0004_auto__add_field_payment_is_notify.py | ygrass/handsome | 0ea016745d92054bd4df8d934c1b67fd61b6f845 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Payment.is_notify'
db.add_column(u'payments_payment', 'is... | 72.92 | 195 | 0.557433 |
80c17cdfd2abd036d56a8aa59d575cce29a15e57 | 466 | py | Python | posts/migrations/0006_auto_20210215_1225.py | IMegaMaan/Django-project | 7ebe62aacf972410299f92183c6c9e23cd837fe7 | [
"BSD-3-Clause"
] | null | null | null | posts/migrations/0006_auto_20210215_1225.py | IMegaMaan/Django-project | 7ebe62aacf972410299f92183c6c9e23cd837fe7 | [
"BSD-3-Clause"
] | null | null | null | posts/migrations/0006_auto_20210215_1225.py | IMegaMaan/Django-project | 7ebe62aacf972410299f92183c6c9e23cd837fe7 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.9 on 2021-02-15 12:25
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('posts', '0005_auto_20210215_1211'),
]
operations = [
migrations.AlterModelOptions(
name='post',
options={'ordering': ['-pub_... | 21.181818 | 48 | 0.577253 |
8a42eabd631e763a3d0eac4ee1a3d2e793b02394 | 54,466 | py | Python | astronomy/footprintfinder.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | 5 | 2016-05-28T14:12:28.000Z | 2021-04-22T10:23:12.000Z | astronomy/footprintfinder.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | null | null | null | astronomy/footprintfinder.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | 2 | 2015-07-13T10:04:10.000Z | 2021-04-22T10:23:23.000Z | """
This program finds the footprint of the illuminated of a fits image on the sky.
This footprint is a polygon in pixel (and WCS) coordinates for each chip.
The input fits images images can
- be composed of multiple chips
- be concave or convex
- have non-straight outlines
- have bad/masked pixels
- ha... | 41.356112 | 211 | 0.514358 |
cc142262d12e491bddf613a92a3aa05837bbf3ab | 2,375 | bzl | Python | google/cloud/bigtable/bigtable_client_unit_tests.bzl | orinem/google-cloud-cpp | c43f73e9abeb2b9d8a6e99f7d9750cba37f2f6b1 | [
"Apache-2.0"
] | 3 | 2020-05-27T23:21:23.000Z | 2020-05-31T22:31:53.000Z | google/cloud/bigtable/bigtable_client_unit_tests.bzl | orinem/google-cloud-cpp | c43f73e9abeb2b9d8a6e99f7d9750cba37f2f6b1 | [
"Apache-2.0"
] | 2 | 2020-05-31T22:26:57.000Z | 2020-06-19T00:14:10.000Z | google/cloud/bigtable/bigtable_client_unit_tests.bzl | orinem/google-cloud-cpp | c43f73e9abeb2b9d8a6e99f7d9750cba37f2f6b1 | [
"Apache-2.0"
] | 1 | 2021-12-09T16:26:23.000Z | 2021-12-09T16:26:23.000Z | # Copyright 2018 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... | 33.450704 | 79 | 0.730105 |
731c7f780760a5b6be8470f1eb960252995fd385 | 4,923 | py | Python | iriusrisk-python-client-lib/iriusrisk_python_client_lib/models/component_use_case_short.py | iriusrisk/iriusrisk-python-client-lib | 4912706cd1e5c0bc555dbc7da02fb64cbeab3b18 | [
"Apache-2.0"
] | null | null | null | iriusrisk-python-client-lib/iriusrisk_python_client_lib/models/component_use_case_short.py | iriusrisk/iriusrisk-python-client-lib | 4912706cd1e5c0bc555dbc7da02fb64cbeab3b18 | [
"Apache-2.0"
] | null | null | null | iriusrisk-python-client-lib/iriusrisk_python_client_lib/models/component_use_case_short.py | iriusrisk/iriusrisk-python-client-lib | 4912706cd1e5c0bc555dbc7da02fb64cbeab3b18 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
IriusRisk API
Products API # noqa: E501
OpenAPI spec version: 1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class ComponentUseCaseShort(object):
"""NOTE: This class is auto generated by the sw... | 25.376289 | 83 | 0.552509 |
e02a64a70b5aed3a5e8d78e6b14ce3e82d1e0952 | 341 | py | Python | rastervision/backend/keras_classification/builders/trainer_builder.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | 4 | 2019-03-11T12:38:15.000Z | 2021-04-06T14:57:52.000Z | rastervision/backend/keras_classification/builders/trainer_builder.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | null | null | null | rastervision/backend/keras_classification/builders/trainer_builder.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | 1 | 2020-04-27T15:21:53.000Z | 2020-04-27T15:21:53.000Z | from rastervision.backend.keras_classification.builders import optimizer_builder
from rastervision.backend.keras_classification.core.trainer import Trainer
def build(trainer_config, model):
optimizer = optimizer_builder.build(trainer_config.optimizer)
trainer = Trainer(model, optimizer, trainer_config.options... | 37.888889 | 80 | 0.832845 |
a43aa61cf006fca2ab9d664992e92eead674e178 | 12,159 | py | Python | qlib/contrib/strategy/strategy.py | morristai/qlib | c459f9b5378ce6bd2395593a57be70c956b6ce04 | [
"MIT"
] | 1 | 2020-10-15T20:18:09.000Z | 2020-10-15T20:18:09.000Z | qlib/contrib/strategy/strategy.py | morristai/qlib | c459f9b5378ce6bd2395593a57be70c956b6ce04 | [
"MIT"
] | 2 | 2021-03-31T20:02:55.000Z | 2021-12-13T20:47:04.000Z | qlib/contrib/strategy/strategy.py | morristai/qlib | c459f9b5378ce6bd2395593a57be70c956b6ce04 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import copy
import numpy as np
import pandas as pd
from ..backtest.order import Order
from ...utils import get_pre_trading_date
from .order_generator import OrderGenWInteract
class BaseStrategy:
def __init__(self):
pass
def g... | 38.115987 | 128 | 0.61584 |
d7211ee9b3715276cb7f93ebb932cfa963461300 | 26,561 | py | Python | synapse/crypto/keyring.py | xsteadfastx/synapse | 9a8ae6f1bf833b58416fae1add1972ac3e9d2d59 | [
"Apache-2.0"
] | 1 | 2017-02-03T18:58:29.000Z | 2017-02-03T18:58:29.000Z | synapse/crypto/keyring.py | xsteadfastx/synapse | 9a8ae6f1bf833b58416fae1add1972ac3e9d2d59 | [
"Apache-2.0"
] | null | null | null | synapse/crypto/keyring.py | xsteadfastx/synapse | 9a8ae6f1bf833b58416fae1add1972ac3e9d2d59 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 37.20028 | 86 | 0.566846 |
642442b2830c736c46bd95b3aa1c75288fb97999 | 216 | py | Python | tutorial/tutorial/spiders/movie.py | boybeak/ScrapyTutorial | 1c6fc605482ffe7b41c47a71231c4db31efc7b61 | [
"Apache-2.0"
] | 1 | 2017-03-08T01:23:52.000Z | 2017-03-08T01:23:52.000Z | tutorial/tutorial/spiders/movie.py | boybeak/ScrapyTutorial | 1c6fc605482ffe7b41c47a71231c4db31efc7b61 | [
"Apache-2.0"
] | null | null | null | tutorial/tutorial/spiders/movie.py | boybeak/ScrapyTutorial | 1c6fc605482ffe7b41c47a71231c4db31efc7b61 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
class Movie(scrapy.Item):
title = scrapy.Field()
cover = scrapy.Field()
detail = scrapy.Field()
thumbnails = scrapy.Field()
download_links = scrapy.Field() | 19.636364 | 35 | 0.634259 |
d6ad692761df92adf1485ffe88c273844fc4c6dc | 6,595 | py | Python | Code/Figure10.py | karenadam/Sampling-and-Reconstruction-of-Bandlimited-Signals-with-Multi-Channel-Time-Encoding | d4d9d41bf82002e8de2695187e2f71ed25686c9b | [
"MIT"
] | 4 | 2019-09-24T11:00:22.000Z | 2021-11-04T12:21:12.000Z | Code/Figure10.py | karenadam/Sampling-and-Reconstruction-of-Bandlimited-Signals-with-Multi-Channel-Time-Encoding | d4d9d41bf82002e8de2695187e2f71ed25686c9b | [
"MIT"
] | 3 | 2021-06-02T00:27:29.000Z | 2022-01-13T01:40:16.000Z | Code/Figure10.py | karenadam/Sampling-and-Reconstruction-of-Bandlimited-Signals-with-Multi-Channel-Time-Encoding | d4d9d41bf82002e8de2695187e2f71ed25686c9b | [
"MIT"
] | null | null | null | from SimulationSettings import *
from header import *
import pickle
try:
from ExtraSpecifications import *
except:
pass
def new_sig(t, delta_t, Omega):
T = np.pi / Omega
T_WIDTH = int(T / delta_t)
NUM_SINCS = int(len(t) / T_WIDTH)
# print(NUM_SINCS)
x = np.zeros_like(t)
sinc_loc = []
... | 29.181416 | 88 | 0.591812 |
33c304e1042bead83f4a575fbac3c7b3aa6504dc | 3,376 | py | Python | django_email/django_email/settings.py | duboisR/django_email | 52a426c3fd20d0012febf75680ea3ccdec3a4681 | [
"MIT"
] | null | null | null | django_email/django_email/settings.py | duboisR/django_email | 52a426c3fd20d0012febf75680ea3ccdec3a4681 | [
"MIT"
] | null | null | null | django_email/django_email/settings.py | duboisR/django_email | 52a426c3fd20d0012febf75680ea3ccdec3a4681 | [
"MIT"
] | 1 | 2022-02-21T01:05:12.000Z | 2022-02-21T01:05:12.000Z | """
Django settings for django_email project.
Generated by 'django-admin startproject' using Django 2.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import ... | 25.575758 | 91 | 0.704088 |
6f8dafc622d60fd06090eb7c05f22a6ac7e3e259 | 1,643 | py | Python | examples/protocols/asio/chat_server/asio_chat_server_test.py | ActoryOu/esp-afr-sdk | 9e3992ead78da4e9c4c0c6082d719640f258d29c | [
"Apache-2.0"
] | 12 | 2020-06-03T18:21:26.000Z | 2021-12-15T02:11:40.000Z | examples/protocols/asio/chat_server/asio_chat_server_test.py | ActoryOu/esp-afr-sdk | 9e3992ead78da4e9c4c0c6082d719640f258d29c | [
"Apache-2.0"
] | 1 | 2022-02-21T01:57:32.000Z | 2022-02-21T01:57:32.000Z | examples/protocols/asio/chat_server/asio_chat_server_test.py | ActoryOu/esp-afr-sdk | 9e3992ead78da4e9c4c0c6082d719640f258d29c | [
"Apache-2.0"
] | 16 | 2020-06-01T05:50:11.000Z | 2022-03-20T05:12:34.000Z | import re
import os
import socket
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_asio_chat_server(env, extra_data):
"""
steps: |
1. join AP
2. Start server
3. Test connects to server and sends a test message
4. Test evaluates received tes... | 35.717391 | 109 | 0.680463 |
87e7d6d2da0448900bae6e1ca49921823bb1fb16 | 254 | py | Python | rusentrel/classic/ctx/cnn.py | nicolay-r/are-networks-experiments | 3831bfda75fae1d3a336fc808af2b671df0efb45 | [
"MIT"
] | 2 | 2021-06-30T18:58:32.000Z | 2021-12-01T07:02:32.000Z | rusentrel/classic/ctx/cnn.py | nicolay-r/are-networks-experiments | 3831bfda75fae1d3a336fc808af2b671df0efb45 | [
"MIT"
] | 16 | 2020-10-20T20:22:27.000Z | 2021-02-21T11:46:07.000Z | rusentrel/classic/ctx/cnn.py | nicolay-r/are-networks-experiments | 3831bfda75fae1d3a336fc808af2b671df0efb45 | [
"MIT"
] | null | null | null | import tensorflow as tf
from arekit.contrib.networks.context.configurations.cnn import CNNConfig
def ctx_cnn_custom_config(config):
assert(isinstance(config, CNNConfig))
config.modify_weight_initializer(tf.contrib.layers.xavier_initializer())
| 28.222222 | 76 | 0.822835 |
aafa5e7bcc4a4849bf115fb364391f9b0dfe9137 | 10,426 | py | Python | django/core/management/commands/squashmigrations.py | bryanlaura736/django | d70b4bea18c96e518ce14dca96085e9265e8ebb6 | [
"BSD-3-Clause",
"0BSD"
] | 1 | 2022-02-21T21:51:20.000Z | 2022-02-21T21:51:20.000Z | django/core/management/commands/squashmigrations.py | bryanlaura736/django | d70b4bea18c96e518ce14dca96085e9265e8ebb6 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | django/core/management/commands/squashmigrations.py | bryanlaura736/django | d70b4bea18c96e518ce14dca96085e9265e8ebb6 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | import os
from django.apps import apps
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS, connections, migrations
from django.db.migrations.loader import AmbiguityError, MigrationLoader
from django.db.migrations.migration import Sw... | 40.254826 | 88 | 0.557357 |
d65df2226bbb583c204d4e5c54a1d6db50fb38e2 | 4,701 | py | Python | scripts/sql_dbs/visualize.py | CUAHSI/qa-automation-engine | 9e7cb5ce02dfe74bbce874c01fda6f5656424111 | [
"BSD-2-Clause"
] | 1 | 2019-02-17T22:01:57.000Z | 2019-02-17T22:01:57.000Z | scripts/sql_dbs/visualize.py | CUAHSI/qa-automation-engine | 9e7cb5ce02dfe74bbce874c01fda6f5656424111 | [
"BSD-2-Clause"
] | 3 | 2018-09-19T23:34:37.000Z | 2022-03-18T20:07:10.000Z | scripts/sql_dbs/visualize.py | CUAHSI/qa-automation-engine | 9e7cb5ce02dfe74bbce874c01fda6f5656424111 | [
"BSD-2-Clause"
] | 3 | 2018-05-12T20:39:46.000Z | 2022-03-02T18:09:42.000Z | import argparse
import os
import matplotlib.pyplot as plt
from matplotlib import rcParams
import pandas as pd
import seaborn as sns
def valid_input_file(path):
if not os.path.isfile(path):
msg = "Provided path does not exist or is not a file."
raise argparse.ArgumentTypeError(msg)
else:
... | 31.34 | 86 | 0.637098 |
2b7a114a6a8f71bdb4553af9fd065eac6e975439 | 5,054 | py | Python | feeds.py | mattsacommonname/SpaceCanoe | d777fd869b7a61e83fa7ee35082e462fcdcdf70c | [
"Apache-2.0"
] | null | null | null | feeds.py | mattsacommonname/SpaceCanoe | d777fd869b7a61e83fa7ee35082e462fcdcdf70c | [
"Apache-2.0"
] | null | null | null | feeds.py | mattsacommonname/SpaceCanoe | d777fd869b7a61e83fa7ee35082e462fcdcdf70c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Matthew Bishop
#
# 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... | 32.397436 | 114 | 0.671152 |
2b3998794f94d2b88af0dea67ea0d4637e74960c | 2,304 | py | Python | tests/functional/test_bash.py | samzhang111/oops | 5823623f94f7c4cdeccea4938c1a0efd4280184e | [
"MIT"
] | null | null | null | tests/functional/test_bash.py | samzhang111/oops | 5823623f94f7c4cdeccea4938c1a0efd4280184e | [
"MIT"
] | null | null | null | tests/functional/test_bash.py | samzhang111/oops | 5823623f94f7c4cdeccea4938c1a0efd4280184e | [
"MIT"
] | null | null | null | import pytest
from tests.functional.plots import with_confirmation, without_confirmation, \
refuse_with_confirmation, history_changed, history_not_changed, \
select_command_with_arrows, how_to_configure
containers = ((u'theoops/ubuntu-python3-bash',
u'''FROM ubuntu:latest
RUN ... | 33.882353 | 78 | 0.700087 |
1b0ba4836b3afb7a1cadace5a1147192e883130b | 27,250 | py | Python | DockerFile/init_skipadminserver.py | vmeta42/neodata | 00a42ab8d1adbb14f09bc4cc04720b0067241985 | [
"Apache-2.0"
] | null | null | null | DockerFile/init_skipadminserver.py | vmeta42/neodata | 00a42ab8d1adbb14f09bc4cc04720b0067241985 | [
"Apache-2.0"
] | null | null | null | DockerFile/init_skipadminserver.py | vmeta42/neodata | 00a42ab8d1adbb14f09bc4cc04720b0067241985 | [
"Apache-2.0"
] | 1 | 2022-03-16T08:31:28.000Z | 2022-03-16T08:31:28.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import getopt
import os
import shutil
from string import Template
class FileTemplate(Template):
delimiter = '$'
def generate_config_file(
rd_server_v, db_name_v, redis_ip_v, redis_port_v,
redis_pass_v, sentinel_pass_v, mongo_ip_v, mongo_port_... | 33.850932 | 191 | 0.605101 |
85fb6470c9eb9d6ea3a4f9495a0de84e11585bd4 | 333 | py | Python | appurl/__init__.py | Metatab/appurl | 254cb8fc1bfaa6750bd02845b26b98f857641c7b | [
"MIT"
] | 1 | 2017-09-11T11:44:45.000Z | 2017-09-11T11:44:45.000Z | appurl/__init__.py | Metatab/appurl | 254cb8fc1bfaa6750bd02845b26b98f857641c7b | [
"MIT"
] | 2 | 2017-09-19T04:14:14.000Z | 2017-10-05T22:39:41.000Z | appurl/__init__.py | CivicKnowledge/appurl | 254cb8fc1bfaa6750bd02845b26b98f857641c7b | [
"MIT"
] | 1 | 2017-12-07T02:25:02.000Z | 2017-12-07T02:25:02.000Z | # Copyright (c) 2017 Civic Knowledge. This file is licensed under the terms of the
# MIT, included in this distribution as LICENSE
"""
"""
from .url import Url, parse_app_url, match_url_classes
from .file import *
from .archive import *
from .web import *
from .util import get_cache
from .exc import DownloadError, ... | 20.8125 | 82 | 0.756757 |
ba4f85b180856ac4667402774fd2de69ef12141b | 8,632 | py | Python | env3.10/lib/python3.10/site-packages/pyramid/router.py | slmaankhaan/todo_app | 4e5a81a789e02be84525682f3ec5d0bfc3d91e8d | [
"MIT"
] | null | null | null | env3.10/lib/python3.10/site-packages/pyramid/router.py | slmaankhaan/todo_app | 4e5a81a789e02be84525682f3ec5d0bfc3d91e8d | [
"MIT"
] | null | null | null | env3.10/lib/python3.10/site-packages/pyramid/router.py | slmaankhaan/todo_app | 4e5a81a789e02be84525682f3ec5d0bfc3d91e8d | [
"MIT"
] | null | null | null | from zope.interface import (
implementer,
providedBy,
)
from pyramid.interfaces import (
IDebugLogger,
IRequest,
IRequestExtensions,
IRootFactory,
IRouteRequest,
IRouter,
IRequestFactory,
IRoutesMapper,
ITraverser,
IView,
IViewClassifier,
ITweens,
)
from... | 35.232653 | 76 | 0.562558 |
20a3453b8e2fa338965a4e178a216497637bec66 | 3,769 | py | Python | flightaware2columbus/tests/test_gpx_writer.py | KenMercusLai/FlightAware2columbus | 107144b9dc42fb051bddf818c74467b789def583 | [
"MIT"
] | null | null | null | flightaware2columbus/tests/test_gpx_writer.py | KenMercusLai/FlightAware2columbus | 107144b9dc42fb051bddf818c74467b789def583 | [
"MIT"
] | null | null | null | flightaware2columbus/tests/test_gpx_writer.py | KenMercusLai/FlightAware2columbus | 107144b9dc42fb051bddf818c74467b789def583 | [
"MIT"
] | null | null | null | import os
import unittest
import xml.etree.ElementTree as ET
from flightaware2columbus.gpx_writer import (write2xml, xml_description,
xml_root, xml_trackpoints)
class TestGPX_Writer(unittest.TestCase):
def setUp(self):
self.test_filename = 'test.gpx'
s... | 43.321839 | 124 | 0.512603 |
05ef62831e12e6252f1963f156fc1a75e5f297c8 | 3,467 | bzl | Python | go/private/go_repository.bzl | jmhodges/rules_go | e0b19317b39357823b26c7e266596c8066e8f8e6 | [
"Apache-2.0"
] | null | null | null | go/private/go_repository.bzl | jmhodges/rules_go | e0b19317b39357823b26c7e266596c8066e8f8e6 | [
"Apache-2.0"
] | null | null | null | go/private/go_repository.bzl | jmhodges/rules_go | e0b19317b39357823b26c7e266596c8066e8f8e6 | [
"Apache-2.0"
] | 1 | 2021-05-28T17:40:57.000Z | 2021-05-28T17:40:57.000Z | # Copyright 2014 The Bazel 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 applicable la... | 32.101852 | 99 | 0.667147 |
425f706339290a5b2c5c5c096d709e8f74375581 | 849 | py | Python | mk/mk/urls.py | datadrivennarratives/AI_View | 81ab768ca757764061bc5c4fdf3eb89367079327 | [
"MIT"
] | 1 | 2019-01-04T21:51:39.000Z | 2019-01-04T21:51:39.000Z | mk/mk/urls.py | datadrivennarratives/AI_View | 81ab768ca757764061bc5c4fdf3eb89367079327 | [
"MIT"
] | null | null | null | mk/mk/urls.py | datadrivennarratives/AI_View | 81ab768ca757764061bc5c4fdf3eb89367079327 | [
"MIT"
] | 1 | 2018-12-31T17:08:57.000Z | 2018-12-31T17:08:57.000Z | """mk URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based view... | 35.375 | 77 | 0.698469 |
f7e87528f6a6dc951f4668bc3e04b46b33de8891 | 6,807 | py | Python | st2reactor/tests/unit/test_process_container.py | machao19902/st2 | 6768a529af1b3c12109cbfeae19d3cf7fdb71bb7 | [
"Apache-2.0"
] | 1 | 2020-11-09T21:05:33.000Z | 2020-11-09T21:05:33.000Z | st2reactor/tests/unit/test_process_container.py | machao19902/st2 | 6768a529af1b3c12109cbfeae19d3cf7fdb71bb7 | [
"Apache-2.0"
] | 3 | 2021-03-26T00:29:52.000Z | 2021-03-26T00:34:45.000Z | st2reactor/tests/unit/test_process_container.py | machao19902/st2 | 6768a529af1b3c12109cbfeae19d3cf7fdb71bb7 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 43.634615 | 100 | 0.674893 |
0027c562e9c4fcbcbeebd6d74ffa276b8701f477 | 11,897 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/modules/system/beadm.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/system/beadm.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/system/beadm.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Adam Števko <adam.stevko@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_versio... | 27.92723 | 122 | 0.536858 |
e2cab0143705870d2890114b46468cb7e206dc58 | 129 | py | Python | venv/ptova.py | gabrielecristina/Python | b7aa3060a2d9279591f84ed5775b58f12d156fdc | [
"Apache-2.0"
] | null | null | null | venv/ptova.py | gabrielecristina/Python | b7aa3060a2d9279591f84ed5775b58f12d156fdc | [
"Apache-2.0"
] | null | null | null | venv/ptova.py | gabrielecristina/Python | b7aa3060a2d9279591f84ed5775b58f12d156fdc | [
"Apache-2.0"
] | null | null | null | '''for k in range(0, 4, -1):
print(k)'''
def foo(n):
if n > 1:
return n * foo(n - 1)
return n
print(foo(4)) | 9.923077 | 29 | 0.457364 |
87f2bac5850ac453f43e9e20bc22d53b5e60cdcc | 694 | py | Python | LICENSES/license.py | fzi-forschungszentrum-informatik/ArNe | c542ae65393fc61c0d3833142f035cbb05f43c12 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2022-02-19T00:09:15.000Z | 2022-03-13T13:33:36.000Z | LICENSES/license.py | fzi-forschungszentrum-informatik/ArNe | c542ae65393fc61c0d3833142f035cbb05f43c12 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | LICENSES/license.py | fzi-forschungszentrum-informatik/ArNe | c542ae65393fc61c0d3833142f035cbb05f43c12 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | ################################################################################
# Copyright 2022 FZI Research Center for Information Technology
#
# 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 ... | 46.266667 | 80 | 0.677233 |
7c3766879ff25d999e13ee21c3220bf3aad1443d | 7,038 | py | Python | elliot/result_handler/result_handler.py | deklanw/elliot | 729871d29093f63c3fe30d54bc42669fd16eb662 | [
"Apache-2.0"
] | null | null | null | elliot/result_handler/result_handler.py | deklanw/elliot | 729871d29093f63c3fe30d54bc42669fd16eb662 | [
"Apache-2.0"
] | null | null | null | elliot/result_handler/result_handler.py | deklanw/elliot | 729871d29093f63c3fe30d54bc42669fd16eb662 | [
"Apache-2.0"
] | null | null | null | """
Module description:
"""
__version__ = '0.1'
__author__ = 'Vito Walter Anelli, Claudio Pomo'
__email__ = 'vitowalter.anelli@poliba.it, claudio.pomo@poliba.it'
import pandas as pd
from datetime import datetime
import json
from enum import Enum
from elliot.evaluation.statistical_significance import PairedTTest, Wi... | 45.701299 | 153 | 0.557261 |
0afec5bbcdeabca954b02f55b513649846d15fee | 17,405 | py | Python | src/dataloader.py | zjunlp/OntoProtein | 74e46a8a86bce07c089f29c0ac7c55a76e1f5230 | [
"MIT"
] | 42 | 2022-01-28T11:32:40.000Z | 2022-03-28T13:20:01.000Z | src/dataloader.py | SuperXiang/OntoProtein | 88e100e66c709e6c4ff531e250ab7676b80c73d3 | [
"MIT"
] | 2 | 2022-02-02T15:48:34.000Z | 2022-03-25T07:49:23.000Z | src/dataloader.py | SuperXiang/OntoProtein | 88e100e66c709e6c4ff531e250ab7676b80c73d3 | [
"MIT"
] | 9 | 2022-01-21T06:21:49.000Z | 2022-03-24T05:16:52.000Z | import torch
from dataclasses import dataclass
from torch._C import dtype
from transformers import PreTrainedTokenizerBase
from typing import List, Dict, Optional, Tuple
from src.dataset import ProteinGoInputFeatures, GoGoInputFeatures, ProteinSeqInputFeatures
def _collate_batch_for_protein_seq(
examples: List[D... | 49.028169 | 184 | 0.725883 |
ca62e8831531eadb677d47f57016abe13649164a | 2,725 | py | Python | grr/proto/makefile.py | Onager/grr | 646196bbfb332e4cb546b6d0fe1c09b57c675f7d | [
"Apache-2.0"
] | null | null | null | grr/proto/makefile.py | Onager/grr | 646196bbfb332e4cb546b6d0fe1c09b57c675f7d | [
"Apache-2.0"
] | 1 | 2018-05-08T21:15:51.000Z | 2018-05-08T21:15:51.000Z | grr/proto/makefile.py | Onager/grr | 646196bbfb332e4cb546b6d0fe1c09b57c675f7d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""A script to prepare the source tree for building."""
# This script must have no special requirements because it wont be able to
# import any GRR stuff until the protos are built.
import argparse
import os
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument(
"--clean... | 29.619565 | 80 | 0.640734 |
eb5e310760186768eafba1d2c51d211fa9486e5a | 5,745 | py | Python | test/examples/test_kissgp_dkl_regression.py | yushangdi/gpytorch | 3234046ecb672965af8765d47eb016f85b729bb0 | [
"MIT"
] | null | null | null | test/examples/test_kissgp_dkl_regression.py | yushangdi/gpytorch | 3234046ecb672965af8765d47eb016f85b729bb0 | [
"MIT"
] | null | null | null | test/examples/test_kissgp_dkl_regression.py | yushangdi/gpytorch | 3234046ecb672965af8765d47eb016f85b729bb0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from math import exp, pi
import os
import random
import torch
import unittest
import gpytorch
from torch import optim, nn
from gpytorch.kernels import RBFKernel, GridInterpolationKernel, ScaleKernel
from gpytorch.likelihoods import GaussianLikelihood
from gpytorch.means import ConstantMean
from... | 36.360759 | 119 | 0.632376 |
640ea013af1df7a24776540d2a04b0a40cdb1a0a | 3,218 | py | Python | text_encoder.py | fedormyskin/textreuse-blast | 521470ba3e03cd80905f18c13f6d018bc3699dde | [
"MIT"
] | null | null | null | text_encoder.py | fedormyskin/textreuse-blast | 521470ba3e03cd80905f18c13f6d018bc3699dde | [
"MIT"
] | null | null | null | text_encoder.py | fedormyskin/textreuse-blast | 521470ba3e03cd80905f18c13f6d018bc3699dde | [
"MIT"
] | null | null | null | import re
class TextEncoder:
def __init__(self, language):
self.mapping = self.make_mapping(language)
def make_mapping(self, language):
if language.lower() == "fin":
return {"ä": "W", "v": "V", "a": "B", "i": "C", "s": "H", "m": "N", "d": "Z", "h": "S", "e": "G", "u": "K", "f": "W", "w": "Y", "o": "I", "y"... | 46.637681 | 240 | 0.507147 |
2462f84548f749afef0c5b4b308cba8e8d9799d6 | 2,510 | py | Python | watcher/applier/action_plan/default.py | jjmike2001/ForbeginTest000 | 03a2c0142ac032fd2ba0ad0b97ca1887445534ac | [
"Apache-2.0"
] | null | null | null | watcher/applier/action_plan/default.py | jjmike2001/ForbeginTest000 | 03a2c0142ac032fd2ba0ad0b97ca1887445534ac | [
"Apache-2.0"
] | null | null | null | watcher/applier/action_plan/default.py | jjmike2001/ForbeginTest000 | 03a2c0142ac032fd2ba0ad0b97ca1887445534ac | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
# Copyright (c) 2015 b<>com
#
# Authors: Jean-Emile DARTOIS <jean-emile.dartois@b-com.com>
#
# 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/... | 37.462687 | 69 | 0.688446 |
da2246826af86eccf9ad5a3595e71fe6f9375ccb | 814 | py | Python | dnsgen/cli.py | jaikishantulswani/dnsgen | 1bad6e163f77dfefb6c004da1e32d8627d5b4689 | [
"MIT"
] | 592 | 2019-09-29T16:30:53.000Z | 2022-03-30T00:59:38.000Z | dnsgen/cli.py | dmatrixx/dnsgen | 1baf7bee3e2fa895bdac4fcccab61be37d2e373c | [
"MIT"
] | 13 | 2019-09-30T07:32:56.000Z | 2022-03-02T16:12:14.000Z | dnsgen/cli.py | dmatrixx/dnsgen | 1baf7bee3e2fa895bdac4fcccab61be37d2e373c | [
"MIT"
] | 111 | 2019-09-29T16:58:44.000Z | 2022-03-29T07:28:10.000Z | # python3
import os
import sys
import click
from . import dnsgen
@click.command()
@click.option('-l', '--wordlen', default=6,
help='Min length of custom words extracted from domains.',
required=False, type=click.IntRange(1, 100))
@click.option('-w', '--wordlist', default=None, help... | 32.56 | 81 | 0.648649 |
7847a21b2a8dd22f8cf09e527e2d9863544cd173 | 1,022 | py | Python | sdk/python/lib/test/langhost/inheritance_types/pulumi_pkg/mod/resource.py | pcen/pulumi | 1bb85ca98c90f2161fe915df083d47c56c135e4d | [
"Apache-2.0"
] | 12,004 | 2018-06-17T23:56:29.000Z | 2022-03-31T18:00:09.000Z | sdk/python/lib/test/langhost/inheritance_types/pulumi_pkg/mod/resource.py | pcen/pulumi | 1bb85ca98c90f2161fe915df083d47c56c135e4d | [
"Apache-2.0"
] | 6,263 | 2018-06-17T23:27:24.000Z | 2022-03-31T19:20:35.000Z | sdk/python/lib/test/langhost/inheritance_types/pulumi_pkg/mod/resource.py | pcen/pulumi | 1bb85ca98c90f2161fe915df083d47c56c135e4d | [
"Apache-2.0"
] | 706 | 2018-06-17T23:56:50.000Z | 2022-03-31T11:20:23.000Z | # Copyright 2016-2021, Pulumi Corporation.
#
# 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 t... | 30.058824 | 74 | 0.700587 |
259a6a65c3f7f8adb900a882e7aebb024b8e8af1 | 12,791 | py | Python | src/sage/doctest/fixtures.py | Ivo-Maffei/DistanceRegular | d4dedd5c3e7da73111168fcce60d1f180fe24019 | [
"BSL-1.0"
] | 1 | 2020-05-19T22:34:03.000Z | 2020-05-19T22:34:03.000Z | src/sage/doctest/fixtures.py | Ivo-Maffei/DistanceRegular | d4dedd5c3e7da73111168fcce60d1f180fe24019 | [
"BSL-1.0"
] | null | null | null | src/sage/doctest/fixtures.py | Ivo-Maffei/DistanceRegular | d4dedd5c3e7da73111168fcce60d1f180fe24019 | [
"BSL-1.0"
] | 3 | 2020-03-29T17:13:36.000Z | 2021-05-03T18:11:28.000Z | r"""
Fixtures to help testing functionality
Utilities which modify or replace code to help with doctesting functionality.
Wrappers, proxies and mockups are typical examples of fixtures.
AUTHORS:
- Martin von Gagern (2014-12-15): AttributeAccessTracerProxy and trace_method
- Martin von Gagern (2015-01-02): Factor out... | 33.223377 | 79 | 0.544523 |
f70da28ac6692ac932239b685896870375bd2ff4 | 49,635 | py | Python | src/licensedcode/models.py | abhi27-web/scancode-toolk | 66f59168fb7824ab9be332712dcaf16340e1aa22 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/licensedcode/models.py | abhi27-web/scancode-toolk | 66f59168fb7824ab9be332712dcaf16340e1aa22 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/licensedcode/models.py | abhi27-web/scancode-toolk | 66f59168fb7824ab9be332712dcaf16340e1aa22 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | #
# Copyright (c) 2018 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | 37.207646 | 128 | 0.633223 |
5d43e930cc20bbdef63a41f78ccb49e7fbb02b81 | 8,910 | py | Python | bounter/count_min_sketch.py | BenLangmead/bounter | ab53c8edc168e9d991c5c25d68a30d2f7334ead2 | [
"MIT"
] | null | null | null | bounter/count_min_sketch.py | BenLangmead/bounter | ab53c8edc168e9d991c5c25d68a30d2f7334ead2 | [
"MIT"
] | null | null | null | bounter/count_min_sketch.py | BenLangmead/bounter | ab53c8edc168e9d991c5c25d68a30d2f7334ead2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Filip Stefanak <f.stefanak@rare-technologies.com>
# Copyright (C) 2017 Rare Technologies
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
import bounter_cmsc as cmsc
class CountMinSketch(object):
"""
Data struc... | 46.165803 | 126 | 0.64119 |
bad9f1b5aa288c96b6f005231e1b7df9e5bc755f | 4,884 | py | Python | hummingbot/client/ui/__init__.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 542 | 2021-12-17T22:34:31.000Z | 2022-03-31T14:36:23.000Z | hummingbot/client/ui/__init__.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 291 | 2021-12-17T20:07:53.000Z | 2022-03-31T11:07:23.000Z | hummingbot/client/ui/__init__.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 220 | 2021-12-17T12:41:23.000Z | 2022-03-31T23:03:22.000Z | from prompt_toolkit.shortcuts import input_dialog, message_dialog
from prompt_toolkit.styles import Style
from os.path import join, realpath, dirname
from hummingbot.client.config.global_config_map import color_config_map
import sys; sys.path.insert(0, realpath(join(__file__, "../../../")))
with open(realpath(join(d... | 37.569231 | 127 | 0.567977 |
50093a98908c064907092f9ce063bb5356e05788 | 3,151 | py | Python | eden/ml/link_prediction.py | xiaozai512/EDeN | 2e603381369f618f4e0838d64d897d0e191ae0ed | [
"MIT"
] | null | null | null | eden/ml/link_prediction.py | xiaozai512/EDeN | 2e603381369f618f4e0838d64d897d0e191ae0ed | [
"MIT"
] | null | null | null | eden/ml/link_prediction.py | xiaozai512/EDeN | 2e603381369f618f4e0838d64d897d0e191ae0ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Provides link prediction utilities."""
import networkx as nx
import numpy as np
import random
from eden.util import timeit
from eden.ml.estimator_utils import paired_shuffle
import logging
logger = logging.getLogger()
def _bfs(graph, start, max_depth):
visited, queue, dist = set(), [sta... | 36.218391 | 79 | 0.67788 |
1125a5db54d07a287731c47ea5537806de605ae8 | 1,129 | py | Python | src/data_io.py | harbenml/digit-recognizer | 58bf7601a76ff177ad5f1cf75f706e7e41b19edc | [
"MIT"
] | null | null | null | src/data_io.py | harbenml/digit-recognizer | 58bf7601a76ff177ad5f1cf75f706e7e41b19edc | [
"MIT"
] | null | null | null | src/data_io.py | harbenml/digit-recognizer | 58bf7601a76ff177ad5f1cf75f706e7e41b19edc | [
"MIT"
] | null | null | null | import gzip
import pickle
from config import DATA_PATH
from config import FILENAME
from config import URL
from typing import cast
from typing import IO
from typing import Tuple
import numpy as np # type: ignore
import requests
import torch
from torch.utils.data import TensorDataset
def get_data() -> Tuple[TensorDat... | 29.710526 | 77 | 0.697077 |
99e409d1d72bde91bec3e76b09c71aa698501403 | 1,207 | py | Python | main.py | TheNeonHaze/yandexmusicapp | 42e4114e1c158cf171e3f544b428cdcb604449bc | [
"MIT"
] | null | null | null | main.py | TheNeonHaze/yandexmusicapp | 42e4114e1c158cf171e3f544b428cdcb604449bc | [
"MIT"
] | null | null | null | main.py | TheNeonHaze/yandexmusicapp | 42e4114e1c158cf171e3f544b428cdcb604449bc | [
"MIT"
] | null | null | null | from yandex_music.client import Client
import eyed3
import config
import logging
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger()
logger.setLevel(logging.ERROR)
class Downloader:
def __init__(self, login, password):
self.... | 30.175 | 103 | 0.630489 |
f5c6f1f87ee34f89e3a93c9050eccd3c71f423b6 | 779 | py | Python | oauthost/settings.py | idlesign/django-oauthost | b7539122d42761f2efe9fc02147e87ebea360b62 | [
"BSD-3-Clause"
] | 8 | 2015-10-03T06:12:05.000Z | 2022-02-09T12:06:29.000Z | oauthost/settings.py | idlesign/django-oauthost | b7539122d42761f2efe9fc02147e87ebea360b62 | [
"BSD-3-Clause"
] | 1 | 2021-12-02T21:29:11.000Z | 2021-12-03T17:16:58.000Z | oauthost/settings.py | idlesign/django-oauthost | b7539122d42761f2efe9fc02147e87ebea360b62 | [
"BSD-3-Clause"
] | 1 | 2019-01-22T06:59:08.000Z | 2019-01-22T06:59:08.000Z | from django.conf import settings
from .auth_handlers import BearerAuthHandler
# Someday here might be something more than bare Bearer.
TOKEN_TYPE_BEARER = 'bearer'
REGISTRY_TOKEN_TYPE = {
(TOKEN_TYPE_BEARER, 'Bearer', BearerAuthHandler),
}
TEMPLATE_AUTHORIZE = getattr(settings, 'OAUTHOST_TEMPLATE_AUTHORIZE', '... | 43.277778 | 120 | 0.827985 |
287d63c2018f1b14ca0b36a80e1b1f0ca0455f56 | 1,371 | py | Python | tests/terraform/checks/resource/gcp/test_GoogleProjectDefaultNetwork.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 4,013 | 2019-12-09T13:16:54.000Z | 2022-03-31T14:31:01.000Z | tests/terraform/checks/resource/gcp/test_GoogleProjectDefaultNetwork.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 1,258 | 2019-12-17T09:55:51.000Z | 2022-03-31T19:17:17.000Z | tests/terraform/checks/resource/gcp/test_GoogleProjectDefaultNetwork.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 638 | 2019-12-19T08:57:38.000Z | 2022-03-30T21:38:37.000Z | import unittest
import hcl2
from checkov.terraform.checks.resource.gcp.GoogleProjectDefaultNetwork import check
from checkov.common.models.enums import CheckResult
class TestGoogleProjectDefaultNetwork(unittest.TestCase):
def test_failure(self):
hcl_res = hcl2.loads("""
resource "google... | 35.153846 | 83 | 0.56601 |
aa1100456cc6e1791dd46d7fba2b984e4f4ceb1d | 2,696 | py | Python | src/molden_modifier/common.py | alba-vcl/molden_modifier | c70f91d0b36b2145a8e99d75e53e6dd7a4bd5696 | [
"MIT"
] | 2 | 2020-06-29T04:04:54.000Z | 2020-07-01T04:46:46.000Z | src/molden_modifier/common.py | alba-vcl/molden_modifier | c70f91d0b36b2145a8e99d75e53e6dd7a4bd5696 | [
"MIT"
] | 7 | 2020-06-29T03:53:05.000Z | 2020-07-18T05:10:24.000Z | src/molden_modifier/common.py | alba-vcl/molden_modifier | c70f91d0b36b2145a8e99d75e53e6dd7a4bd5696 | [
"MIT"
] | 1 | 2019-11-09T17:01:48.000Z | 2019-11-09T17:01:48.000Z | """Constants for all the other modules
"""
# Third Party Libraries
from docopt import DocoptExit
from logging import (CRITICAL, # isort:skip
DEBUG,
ERROR,
FATAL,
INFO,
NOTSET,
WARN,
... | 27.793814 | 87 | 0.476261 |
037a58c36af5b8d4bcc18a5ed77453225edb5409 | 1,041 | py | Python | vendor/packages/translate-toolkit/translate/lang/kw.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | null | null | null | vendor/packages/translate-toolkit/translate/lang/kw.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | 1 | 2021-12-13T20:55:07.000Z | 2021-12-13T20:55:07.000Z | vendor/packages/translate-toolkit/translate/lang/kw.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2013 Zuza Software Foundation
#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of t... | 30.617647 | 70 | 0.736792 |
3c554f43d63ed29693ac5cab2a4eca7e9ad0989e | 34,000 | py | Python | pyxtal/operations.py | paulsaxe/PyXtal | 203f8711a1978501dec211b1ebb7ebf8253940d2 | [
"MIT"
] | null | null | null | pyxtal/operations.py | paulsaxe/PyXtal | 203f8711a1978501dec211b1ebb7ebf8253940d2 | [
"MIT"
] | null | null | null | pyxtal/operations.py | paulsaxe/PyXtal | 203f8711a1978501dec211b1ebb7ebf8253940d2 | [
"MIT"
] | null | null | null | """
Module for generating and analyzing transformation operations. Several functions
for working with matrices are provided. The class OperationAnalyzer allows for
comparison between pymatgen.core.operations.SymmOp objects, and can be used to
identify conjugate operations. The orientation class can be used to identify
... | 35.639413 | 94 | 0.583735 |
e397fa728802768a880c2c7ec22bd6404d392f0a | 1,888 | py | Python | wawmembers/templatetags/filters.py | heidi666/WorldsAtWar | 59c49462ad250cbd1fec4d5875f3f103c57217cf | [
"MIT"
] | 8 | 2016-04-04T15:48:07.000Z | 2020-08-29T22:30:26.000Z | wawmembers/templatetags/filters.py | heidi666/WorldsAtWar | 59c49462ad250cbd1fec4d5875f3f103c57217cf | [
"MIT"
] | null | null | null | wawmembers/templatetags/filters.py | heidi666/WorldsAtWar | 59c49462ad250cbd1fec4d5875f3f103c57217cf | [
"MIT"
] | 8 | 2016-04-03T22:34:06.000Z | 2020-12-28T12:17:24.000Z | # Django Imports
from django import template
from django import forms
from django.forms.forms import NON_FIELD_ERRORS
from django.forms.utils import ErrorDict
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
# WaW Imports
from wawmembers.models import World
'''
Simple text ma... | 23.308642 | 91 | 0.667903 |
2852fca8420f9016d01d573a0ec4ad106b24f391 | 3,370 | py | Python | models/cdm/cdm/Source.py | AlTarFramework/altar | 3f13e04640331702387f1eb696acfc21a94f26f7 | [
"BSD-3-Clause"
] | 32 | 2018-04-24T05:32:27.000Z | 2021-12-15T23:48:38.000Z | models/cdm/cdm/Source.py | AlTarFramework/altar | 3f13e04640331702387f1eb696acfc21a94f26f7 | [
"BSD-3-Clause"
] | 13 | 2018-11-20T15:55:50.000Z | 2022-02-16T06:48:30.000Z | models/cdm/cdm/Source.py | AlTarFramework/altar | 3f13e04640331702387f1eb696acfc21a94f26f7 | [
"BSD-3-Clause"
] | 20 | 2018-04-26T18:40:41.000Z | 2022-02-10T07:10:00.000Z | # -*- python -*-
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis <michael.aivazis@para-sim.com>
#
# (c) 2013-2020 parasim inc
# (c) 2010-2020 california institute of technology
# all rights reserved
#
# framework
import altar
# externals
import numpy
from math import sqrt, pi as π
# library
from .libcdm import CDM
... | 27.398374 | 99 | 0.564095 |
3b67ec133f257bd67fe14f2ba776f5ee5230d83d | 1,187 | py | Python | tools/testrunner/testproc/shard.py | KDr2/v8 | 6048f754931e0971cab58fb0de785482d175175b | [
"BSD-3-Clause"
] | null | null | null | tools/testrunner/testproc/shard.py | KDr2/v8 | 6048f754931e0971cab58fb0de785482d175175b | [
"BSD-3-Clause"
] | null | null | null | tools/testrunner/testproc/shard.py | KDr2/v8 | 6048f754931e0971cab58fb0de785482d175175b | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from . import base
# Alphabet size determines the hashing radix. Choosing a prime number prevents
# clustering of the hashes.
HASHING_ALPHABET_SIZE = 2 *... | 25.804348 | 78 | 0.699242 |
a74b89f4ff280edec08c1071b245fbc35c898032 | 2,545 | py | Python | src/tests/test_view_wthr.py | threatsimple/smugapi | 0e2e5ecb3c3076b9b8dd8342371de21fa9c4a8c4 | [
"MIT"
] | null | null | null | src/tests/test_view_wthr.py | threatsimple/smugapi | 0e2e5ecb3c3076b9b8dd8342371de21fa9c4a8c4 | [
"MIT"
] | null | null | null | src/tests/test_view_wthr.py | threatsimple/smugapi | 0e2e5ecb3c3076b9b8dd8342371de21fa9c4a8c4 | [
"MIT"
] | null | null | null |
import json
from os.path import dirname, join as path_join
from unittest.mock import patch
from .base import HttpTestCase
class TestWeather(HttpTestCase):
def test_weather_no_api(self):
# missing param
resp = self.fetch('/weather')
self.assertEqual(resp.code, 400)
# missing api ... | 33.486842 | 78 | 0.585069 |
383c10dafd5b2d7349d9e916ff2d921cf01e0772 | 1,378 | py | Python | resources/dot_PyCharm/system/python_stubs/-762174762/PySide/QtCore/QDirIterator.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | 1 | 2020-04-20T02:27:20.000Z | 2020-04-20T02:27:20.000Z | resources/dot_PyCharm/system/python_stubs/cache/16012662ddca113c1f50140f9e0d3bd290a511015767475cf362e5267760f062/PySide/QtCore/QDirIterator.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | null | null | null | resources/dot_PyCharm/system/python_stubs/cache/16012662ddca113c1f50140f9e0d3bd290a511015767475cf362e5267760f062/PySide/QtCore/QDirIterator.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | null | null | null | # encoding: utf-8
# module PySide.QtCore
# from C:\Python27\lib\site-packages\PySide\QtCore.pyd
# by generator 1.147
# no doc
# imports
import Shiboken as __Shiboken
class QDirIterator(__Shiboken.Object):
# no doc
def fileInfo(self, *args, **kwargs): # real signature unknown
pass
def fileName(se... | 29.956522 | 94 | 0.675617 |
62e6d0c4903c051d77b0966dd3e81fcbff056f60 | 1,252 | py | Python | test_superpose3d.py | jtpils/superpose3d | d94e96a9cdf6ffcfa04f983f4f65c346de2a486e | [
"BSD-3-Clause"
] | 1 | 2019-06-07T15:57:52.000Z | 2019-06-07T15:57:52.000Z | test_superpose3d.py | jtpils/superpose3d | d94e96a9cdf6ffcfa04f983f4f65c346de2a486e | [
"BSD-3-Clause"
] | null | null | null | test_superpose3d.py | jtpils/superpose3d | d94e96a9cdf6ffcfa04f983f4f65c346de2a486e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import numpy as np
from superpose3d import Superpose3D
def test_superpose3d():
X=[[0,0,0],[0,0,1],[0,1,1],[1,1,1]]
x=[[0,0,0],[0,1,0],[0,1,-1],[1,1,-1]] # (=X after rotation around the Z axis)
Xshifted = [ [X[i][0],X[i][1]+100, X[i][2]] for i in range(0,len(X))]
xscaled = [ [2... | 32.102564 | 82 | 0.533546 |
aa9207975fd8bac9a63a5a3a4d780faef4e19867 | 1,337 | py | Python | MatrixPy/operations/add.py | shaybrynes/MatrixPy | 8cbad4427159666770135aa4b85be46d83507fb0 | [
"Apache-2.0"
] | 2 | 2018-02-15T16:50:37.000Z | 2021-01-26T20:35:35.000Z | MatrixPy/operations/add.py | shaybrynes/MatrixPy | 8cbad4427159666770135aa4b85be46d83507fb0 | [
"Apache-2.0"
] | null | null | null | MatrixPy/operations/add.py | shaybrynes/MatrixPy | 8cbad4427159666770135aa4b85be46d83507fb0 | [
"Apache-2.0"
] | null | null | null |
__author__ = "Shay Brynes"
__license__ = "Apache License 2.0"
def calc_add(a, b):
"""""
Adds two matrices together.
:param list a: The first Matrix in the addition.
:param list b: The second Matrix in the addition.
:return: The result of the addition of the two matrices.
:rtype: list
""""... | 27.854167 | 71 | 0.525056 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.