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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dbbf7a3d1ea6a059d79ae71533a8dda4aef3f9db | 694 | py | Python | python_base/HTML/html_css/app.py | sven820/python | ddb13ffdab45bdb2c8ca8038cfa0c47f2502e554 | [
"Apache-2.0"
] | null | null | null | python_base/HTML/html_css/app.py | sven820/python | ddb13ffdab45bdb2c8ca8038cfa0c47f2502e554 | [
"Apache-2.0"
] | null | null | null | python_base/HTML/html_css/app.py | sven820/python | ddb13ffdab45bdb2c8ca8038cfa0c47f2502e554 | [
"Apache-2.0"
] | null | null | null | __author__ = "JJ.sven"
import tornado.web
from tornado import ioloop
class MainHandle(tornado.web.RequestHandler):
def get(self):
self.__login()
def post(self, *args, **kwargs):
self.__login()
'''==========private=========='''
def __login(self):
name = self.get_argument('use... | 22.387097 | 49 | 0.583573 |
bbbbc39acdaf7c9ad88c4bdf4cdf86cbcb7807db | 716 | py | Python | data.py | wzwietering/mnist-fun | c14334bc5504f9d0d3dca5154986d49ae4532482 | [
"MIT"
] | null | null | null | data.py | wzwietering/mnist-fun | c14334bc5504f9d0d3dca5154986d49ae4532482 | [
"MIT"
] | null | null | null | data.py | wzwietering/mnist-fun | c14334bc5504f9d0d3dca5154986d49ae4532482 | [
"MIT"
] | null | null | null | from keras.datasets import mnist
def prepare_data(data_set, zero_center=False, flatten=False):
data_set = data_set.reshape(data_set.shape[0], data_set.shape[1], data_set.shape[2], 1)
data_set = data_set.astype("float32")
if zero_center:
data_set = (data_set - 127.5) / 127.5
else:
data_s... | 37.684211 | 93 | 0.696927 |
6b36ead2acac4212c83e2700570ba2ef9eef98cf | 65 | py | Python | paraguay/telegram.py | PythonParaguay/paraguay | 201ffed271a1f3c83ac6e4bd29b0688946968a2a | [
"MIT"
] | 4 | 2018-05-31T01:55:13.000Z | 2018-06-09T12:54:46.000Z | paraguay/telegram.py | PythonParaguay/paraguay | 201ffed271a1f3c83ac6e4bd29b0688946968a2a | [
"MIT"
] | null | null | null | paraguay/telegram.py | PythonParaguay/paraguay | 201ffed271a1f3c83ac6e4bd29b0688946968a2a | [
"MIT"
] | 1 | 2018-06-08T21:35:13.000Z | 2018-06-08T21:35:13.000Z | import webbrowser
webbrowser.open("https://t.me/pythonparaguay") | 21.666667 | 46 | 0.8 |
f64acb77f48984def6dcb78f91ec5a60b47fc193 | 1,384 | py | Python | resources/renderers.py | erlendr/swapi | a7d69bb88bf0e0f25f00dde1dbb196084f43f6d6 | [
"BSD-3-Clause"
] | null | null | null | resources/renderers.py | erlendr/swapi | a7d69bb88bf0e0f25f00dde1dbb196084f43f6d6 | [
"BSD-3-Clause"
] | null | null | null | resources/renderers.py | erlendr/swapi | a7d69bb88bf0e0f25f00dde1dbb196084f43f6d6 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from rest_framework import renderers
class WookieeRenderer(renderers.JSONRenderer):
media_type = "application/json"
charset = 'utf-8'
format = "wookiee"
lookup = {
"a": "ra",
"b": "rh",
"c": "oa",
"d": "wa",
"e": "wo",
... | 23.862069 | 77 | 0.458092 |
eff625b92dc4c57f7f9a20a2b61ae9045e8f8dad | 24,220 | py | Python | venv/Lib/site-packages/pylint/extensions/docparams.py | AnxhelaMehmetaj/is219_flask | 1e88579f14a96c9826e9452b3c7f8e6477577ef7 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/pylint/extensions/docparams.py | AnxhelaMehmetaj/is219_flask | 1e88579f14a96c9826e9452b3c7f8e6477577ef7 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/pylint/extensions/docparams.py | AnxhelaMehmetaj/is219_flask | 1e88579f14a96c9826e9452b3c7f8e6477577ef7 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
"""Pylint plugin for checking in Sphinx, Google, or Numpy style docstrings."""
import re
from typi... | 37.608696 | 88 | 0.607473 |
f8ea783e3240a057ea661e49b47d664b9ffe5b78 | 475 | py | Python | 346/solution.py | wizh/euler | 604e8776b984ddf00669d9c29e232b6ef164d28e | [
"MIT"
] | null | null | null | 346/solution.py | wizh/euler | 604e8776b984ddf00669d9c29e232b6ef164d28e | [
"MIT"
] | null | null | null | 346/solution.py | wizh/euler | 604e8776b984ddf00669d9c29e232b6ef164d28e | [
"MIT"
] | null | null | null | def to_base(n, base):
digits = []
while n > 0:
digits.insert(0, n % base)
n = n // base
return digits
def repunit(digits):
for d in digits:
if d != 1:
return False
return True
def main(n):
ret = 1
for i in range(2, n):
reps = 0
for j in r... | 19 | 42 | 0.448421 |
16356123c475b171cfc258b6a72c99a35aff4ced | 1,776 | py | Python | tl5.py | YmerejRedienhcs/ws2811 | d4299cfc8577eebcd23a73bacbfbafbde439711a | [
"Unlicense"
] | 1 | 2021-06-22T16:42:59.000Z | 2021-06-22T16:42:59.000Z | tl5.py | YmerejRedienhcs/ws2811 | d4299cfc8577eebcd23a73bacbfbafbde439711a | [
"Unlicense"
] | null | null | null | tl5.py | YmerejRedienhcs/ws2811 | d4299cfc8577eebcd23a73bacbfbafbde439711a | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3
import sys
import board
import neopixel
import time
import random
num_lights = 200
#num_lights = int(sys.argv[1])
seg_length = 100
black = (0, 0, 0)
white = (255, 255, 255)
# program 50 lights with the default brightness 1.0, and autoWrite true
pixels = neopixel.NeoPixel(board.D18, num_lights)
# ligh... | 25.371429 | 80 | 0.569257 |
1acc90db4db8b6995d465ea563a66688e3329156 | 629 | py | Python | RPESystem/manage.py | YanTszyafen/RPESystem | 8ddf8eb5d7a159c0146cc5a7215ff4b8e91ae62d | [
"MIT"
] | null | null | null | RPESystem/manage.py | YanTszyafen/RPESystem | 8ddf8eb5d7a159c0146cc5a7215ff4b8e91ae62d | [
"MIT"
] | null | null | null | RPESystem/manage.py | YanTszyafen/RPESystem | 8ddf8eb5d7a159c0146cc5a7215ff4b8e91ae62d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'RPESystem.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Impo... | 28.590909 | 73 | 0.683625 |
26a192e500016acc0de1b4694c5632d2f4c8513a | 5,850 | py | Python | models/datastructures.py | dtu-act/pinn-acoustic-wave-prop | 2fbc7e39499e28264396669999b8be8f86f01082 | [
"MIT"
] | 7 | 2021-11-05T21:48:44.000Z | 2022-01-28T14:52:14.000Z | models/datastructures.py | dtu-act/pinn-acoustic-wave-prop | 2fbc7e39499e28264396669999b8be8f86f01082 | [
"MIT"
] | null | null | null | models/datastructures.py | dtu-act/pinn-acoustic-wave-prop | 2fbc7e39499e28264396669999b8be8f86f01082 | [
"MIT"
] | 1 | 2021-11-21T01:43:17.000Z | 2021-11-21T01:43:17.000Z | # ==============================================================================
# Copyright 2021 Technical University of Denmark
# Author: Nikolas Borrel-Jensen
#
# All Rights Reserved.
#
# Licensed under the MIT License.
# ==============================================================================
from collection... | 27.209302 | 112 | 0.63094 |
54817627e9c4aba5e469f3d51adc6cd75c343ed3 | 1,652 | py | Python | test/unit/mysql_class/flush_logs.py | mjpernot/mysql-lib | aabc0c3b3120c0ec5344dc460092d830e796d43c | [
"MIT"
] | null | null | null | test/unit/mysql_class/flush_logs.py | mjpernot/mysql-lib | aabc0c3b3120c0ec5344dc460092d830e796d43c | [
"MIT"
] | null | null | null | test/unit/mysql_class/flush_logs.py | mjpernot/mysql-lib | aabc0c3b3120c0ec5344dc460092d830e796d43c | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: flush_logs.py
Description: Unit testing of flush_logs in mysql_class.py.
Usage:
test/unit/mysql_class/flush_logs.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
import un... | 14.365217 | 68 | 0.603511 |
dbadb30b326bcd3c4b1dbcc973937be2d5e80593 | 4,836 | py | Python | doc/summarize.py | tovrstra/numpy | bb5d666e84e2eb294543a67c6143d7e9124d1c73 | [
"BSD-3-Clause"
] | 15 | 2015-01-24T09:16:17.000Z | 2021-12-19T10:41:07.000Z | doc/summarize.py | tovrstra/numpy | bb5d666e84e2eb294543a67c6143d7e9124d1c73 | [
"BSD-3-Clause"
] | 2 | 2019-07-19T16:30:31.000Z | 2019-07-19T19:17:13.000Z | doc/summarize.py | tacaswell/numpy | 1147490663d36b05fad8dcce1e104601c2724560 | [
"BSD-3-Clause"
] | 5 | 2017-01-31T21:28:01.000Z | 2021-02-23T06:38:32.000Z | #!/usr/bin/env python
"""
summarize.py
Show a summary about which NumPy functions are documented and which are not.
"""
from __future__ import division, absolute_import, print_function
import os, glob, re, sys, inspect, optparse
import collections
sys.path.append(os.path.join(os.path.dirname(__file__), 'sphinxext'))... | 27.953757 | 104 | 0.660256 |
fd594a0c0467c362e46686a8f22ee532c768f504 | 508 | py | Python | tools/sapp/sapp/iterutil.py | s-pace/pyre-check | 2b71dcf22e4672567cfe0dfef356f11646d66244 | [
"MIT"
] | 5 | 2019-02-14T19:46:47.000Z | 2020-01-16T05:48:45.000Z | tools/sapp/sapp/iterutil.py | s-pace/pyre-check | 2b71dcf22e4672567cfe0dfef356f11646d66244 | [
"MIT"
] | 4 | 2022-02-15T02:42:33.000Z | 2022-02-28T01:30:07.000Z | tools/sapp/sapp/iterutil.py | s-pace/pyre-check | 2b71dcf22e4672567cfe0dfef356f11646d66244 | [
"MIT"
] | 2 | 2019-02-14T19:46:23.000Z | 2020-07-13T03:53:04.000Z | # Copyright (c) 2016-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import itertools
def split_every(n, iterable):
"""Yields batches of size 'n' from an iterable:
list(split_every(2, range(10))) => [[0, 1]... | 26.736842 | 79 | 0.627953 |
5ae8dd47559ca261ea3a1dd3c3d8c861d48df99b | 403 | py | Python | src/format_string_name_hashes.py | famavott/codewars-katas | fdc5574bcd13adc194975ac94ab90c59ee3aa398 | [
"MIT"
] | null | null | null | src/format_string_name_hashes.py | famavott/codewars-katas | fdc5574bcd13adc194975ac94ab90c59ee3aa398 | [
"MIT"
] | null | null | null | src/format_string_name_hashes.py | famavott/codewars-katas | fdc5574bcd13adc194975ac94ab90c59ee3aa398 | [
"MIT"
] | null | null | null | """Format a string of names from list of dicts."""
def namelist(names):
if len(names) == 0:
return ''
elif len(names) == 1:
return names[0]['name']
elif len(names) == 2:
return names[0]['name'] + ' & ' + names[1]['name']
else:
name_list = [x['name'] for x in names]
... | 26.866667 | 58 | 0.508685 |
fbf02148f28b648d5916639b651c898e3294fa83 | 3,131 | py | Python | setup.py | risto-trajanov/nevergrad | 8c123bd5911debc4840c1683112251cee0cf6121 | [
"MIT"
] | 3,217 | 2018-12-20T05:41:46.000Z | 2022-03-31T10:22:54.000Z | setup.py | risto-trajanov/nevergrad | 8c123bd5911debc4840c1683112251cee0cf6121 | [
"MIT"
] | 590 | 2018-12-20T21:03:38.000Z | 2022-03-31T04:38:45.000Z | setup.py | risto-trajanov/nevergrad | 8c123bd5911debc4840c1683112251cee0cf6121 | [
"MIT"
] | 333 | 2018-12-20T08:38:03.000Z | 2022-03-28T06:23:53.000Z | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import re
import os
import sys
import typing as tp
from pathlib import Path
from setuptools import ... | 32.278351 | 87 | 0.671351 |
f72dc3ca8aa596b8bc7e93a42cd965a4678d9bb0 | 1,626 | py | Python | rates_classify/rdf.py | xhades/rates_classify | 225627dad22c162023bc6b5e4d8f5881c5a6f354 | [
"MIT"
] | 7 | 2017-12-23T05:34:01.000Z | 2021-01-03T10:10:03.000Z | rates_classify/rdf.py | xhades/rates_classify | 225627dad22c162023bc6b5e4d8f5881c5a6f354 | [
"MIT"
] | null | null | null | rates_classify/rdf.py | xhades/rates_classify | 225627dad22c162023bc6b5e4d8f5881c5a6f354 | [
"MIT"
] | 3 | 2019-05-23T20:15:44.000Z | 2020-01-14T07:27:58.000Z | # !/usr/bin/env python
# -*-coding:utf-8-*-
"""
@author: xhades
@Date: 2017/12/28
"""
# 随机森林分类器
import numpy as np
from numpy import *
from numpy import array, argmax
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
import pickle
from sklearn.ensemble import Random... | 25.015385 | 114 | 0.673432 |
771a986085f463cd264825425978c3cacadeee83 | 2,819 | py | Python | 3D_Graphics_Shapes/3D_render.py | Wason1797/Fun-Python | 1432aec98423f13cc228c34c53bdb19ba4efe1da | [
"MIT"
] | 11 | 2018-11-21T19:34:48.000Z | 2019-01-13T04:30:44.000Z | 3D_Graphics_Shapes/3D_render.py | Wason1797/Fun-Python | 1432aec98423f13cc228c34c53bdb19ba4efe1da | [
"MIT"
] | null | null | null | 3D_Graphics_Shapes/3D_render.py | Wason1797/Fun-Python | 1432aec98423f13cc228c34c53bdb19ba4efe1da | [
"MIT"
] | null | null | null | import numpy as np
import math as mt
import pygame
import sys
from pygame.locals import *
pygame.init()
# set up the window
windowSurface = pygame.display.set_mode((500, 500), 0, 32)
pygame.display.set_caption('Cube Rotation')
# Set up the colors
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, ... | 26.847619 | 69 | 0.566513 |
adc0b415e4a9da1fdb2221eb862525e00f803105 | 2,602 | py | Python | tests/brightway_fixtures.py | kais-siala/wurst | 448dd4e9e0bfbde956c2913222222509ff2b14e1 | [
"BSD-2-Clause"
] | null | null | null | tests/brightway_fixtures.py | kais-siala/wurst | 448dd4e9e0bfbde956c2913222222509ff2b14e1 | [
"BSD-2-Clause"
] | null | null | null | tests/brightway_fixtures.py | kais-siala/wurst | 448dd4e9e0bfbde956c2913222222509ff2b14e1 | [
"BSD-2-Clause"
] | null | null | null | try:
from bw2data.tests import bw2test
from bw2data import Database
import pytest
biosphere = {
("biosphere", "1"): {
"categories": ["things"],
"code": "1",
"exchanges": [],
"reference product": "find me!",
"name": "an emission",
... | 27.389474 | 65 | 0.33897 |
936c41369733236368b67a282a19742d8a255def | 146 | py | Python | myapp.py | maxvol/Streamlit | f18c5e978040cb0df07cd68c27ce6239a4ecad44 | [
"Unlicense"
] | null | null | null | myapp.py | maxvol/Streamlit | f18c5e978040cb0df07cd68c27ce6239a4ecad44 | [
"Unlicense"
] | null | null | null | myapp.py | maxvol/Streamlit | f18c5e978040cb0df07cd68c27ce6239a4ecad44 | [
"Unlicense"
] | null | null | null | import streamlit as st
import pandas as pd
st.write("""
# My first app
Hello *world*!
""")
df = pd.read_csv("timeseries.csv")
st.line_chart(df)
| 13.272727 | 34 | 0.691781 |
16584b01db7547b590a6ee9934aef711137dc35a | 1,074 | py | Python | HP Code Wars Documents/2014/Solutions/prob08_Nultimate.py | p473lr/i-urge-mafia-gear | ae19efb1af2e85ed8bcbbcc3d12ae0f024f3565e | [
"Apache-2.0"
] | null | null | null | HP Code Wars Documents/2014/Solutions/prob08_Nultimate.py | p473lr/i-urge-mafia-gear | ae19efb1af2e85ed8bcbbcc3d12ae0f024f3565e | [
"Apache-2.0"
] | null | null | null | HP Code Wars Documents/2014/Solutions/prob08_Nultimate.py | p473lr/i-urge-mafia-gear | ae19efb1af2e85ed8bcbbcc3d12ae0f024f3565e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#CodeWars 2014
#
# N-ultimate Element
#The last element in a series may be called the ultimate element.
# The penultimate element is next-to last. So, by extension,
# the N-ultimate element is the Nth element from the end.
#
#Write a program to find the N-ultimate element in a series.
#
#
#Inp... | 22.375 | 72 | 0.698324 |
6a73a7344b95c102ab36808ae36c36c69bf53bd1 | 2,933 | py | Python | lldb/examples/summaries/cocoa/metrics.py | bytesnake/Enzyme | 247606c279920d476645d2e319e574bf8be10fc9 | [
"Apache-2.0"
] | 427 | 2018-05-29T14:21:02.000Z | 2022-03-16T03:17:54.000Z | SymbolExtractorAndRenamer/lldb/examples/summaries/cocoa/metrics.py | PolideaPlayground/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 25 | 2018-07-23T08:34:15.000Z | 2021-11-05T07:13:36.000Z | SymbolExtractorAndRenamer/lldb/examples/summaries/cocoa/metrics.py | PolideaPlayground/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 52 | 2018-07-19T19:57:32.000Z | 2022-03-11T16:05:38.000Z | """
Objective-C runtime wrapper for use by LLDB Python formatters
part of The LLVM Compiler Infrastructure
This file is distributed under the University of Illinois Open Source
License. See LICENSE.TXT for details.
"""
import lldb
import time
import datetime
import inspect
class TimeMetrics:
@staticmethod
d... | 25.955752 | 77 | 0.598704 |
977d7c3089d5bdef035080fd1585c21e7b5e0e11 | 2,324 | py | Python | analysis_interaction_on_elements.py | cetceeve/Abschlussarbeit-Log-Data-Analysis | 16cb272329c25a6fd5b51d9bb8bd4eecf0fe9487 | [
"MIT"
] | null | null | null | analysis_interaction_on_elements.py | cetceeve/Abschlussarbeit-Log-Data-Analysis | 16cb272329c25a6fd5b51d9bb8bd4eecf0fe9487 | [
"MIT"
] | null | null | null | analysis_interaction_on_elements.py | cetceeve/Abschlussarbeit-Log-Data-Analysis | 16cb272329c25a6fd5b51d9bb8bd4eecf0fe9487 | [
"MIT"
] | null | null | null | import utils
import decorators
print('setting up data analysis')
LOG_DATA = utils.import_log_data()
# get unique values for log datapoint property
@decorators.exec_all(LOG_DATA)
def unique_prop_values(arr, prop=None):
values = utils.get_property(arr, prop)
values = utils.remove_duplicate_entries(values)
#... | 38.098361 | 91 | 0.768933 |
2a310046ffb70aefe78e867beaa4bbf858ec501f | 2,932 | py | Python | tools/gitignore/tests/test_gitignore.py | Johanna-hub/wpt | 7176f30f78dcfc600e627b8e5786ede4b79300ad | [
"BSD-3-Clause"
] | 9 | 2019-04-01T10:57:10.000Z | 2021-12-02T11:12:06.000Z | tools/gitignore/tests/test_gitignore.py | Johanna-hub/wpt | 7176f30f78dcfc600e627b8e5786ede4b79300ad | [
"BSD-3-Clause"
] | 33 | 2018-07-11T22:04:44.000Z | 2019-03-18T15:38:51.000Z | tools/gitignore/tests/test_gitignore.py | Johanna-hub/wpt | 7176f30f78dcfc600e627b8e5786ede4b79300ad | [
"BSD-3-Clause"
] | 7 | 2019-04-24T10:51:15.000Z | 2021-12-17T16:53:01.000Z | import pytest
from ..gitignore import fnmatch_translate, PathFilter
match_data = [
("foo", True, ["a/foo", "foo"]),
("*.a", True, ["foo.a", "a/foo.a", "a/b/foo.a", "a.a/foo.a"]),
("*.py[co]", True, ["a.pyc", "a.pyo", "a/b/c.pyc"]),
("\\#*", True, ["#a", "a/#b"]),
("*#", True, ["a#", "a/b#", "#a#"]... | 29.029703 | 81 | 0.507844 |
90f4dc62c7b904cfe8a0e135b659e2ecd4e714dd | 9,650 | py | Python | tests/api/v1_3_1/test_sites.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v1_3_1/test_sites.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v1_3_1/test_sites.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI sites API fixtures and tests.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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, inc... | 26.222826 | 304 | 0.689637 |
9d485db3919805867d6c5dcff050ea543171ec12 | 5,339 | py | Python | ansible/modules/cloud/openstack/os_server_group.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ansible/modules/cloud/openstack/os_server_group.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ansible/modules/cloud/openstack/os_server_group.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
# Copyright (c) 2016 Catalyst IT Limited
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This so... | 27.95288 | 79 | 0.646563 |
3505e714175c1f8859f6ced30e2c218383148ffe | 18,166 | py | Python | Lib/site-packages/tensorflow_probability/python/distributions/_numpy/poisson_lognormal.py | caiyongji/tf2.3.1-py3.7.9-full-built | ace4efcbf05b2b494388739718a18c13eab83c71 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/site-packages/tensorflow_probability/python/distributions/_numpy/poisson_lognormal.py | caiyongji/tf2.3.1-py3.7.9-full-built | ace4efcbf05b2b494388739718a18c13eab83c71 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/site-packages/tensorflow_probability/python/distributions/_numpy/poisson_lognormal.py | caiyongji/tf2.3.1-py3.7.9-full-built | ace4efcbf05b2b494388739718a18c13eab83c71 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | # Copyright 2018 The TensorFlow Probability Authors.
#
# 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 o... | 40.101545 | 104 | 0.690961 |
6d9920f4cd59e80613591cc06c7e4fa60ed049b4 | 14,496 | py | Python | mmdet/models/bbox_heads/convfc_bbox_head.py | LiGangszu/PedestrianDetection-HGPD | 3874e331c8afe4cc20fc49de7ebdbe77db277c98 | [
"Apache-2.0"
] | 9 | 2021-04-02T12:21:38.000Z | 2021-08-19T07:55:19.000Z | mmdet/models/bbox_heads/convfc_bbox_head.py | LiGangszu/PedestrianDetection-HGPD | 3874e331c8afe4cc20fc49de7ebdbe77db277c98 | [
"Apache-2.0"
] | 1 | 2021-05-02T18:34:06.000Z | 2021-05-12T04:04:57.000Z | mmdet/models/bbox_heads/convfc_bbox_head.py | LiGangszu/PedestrianDetection-HGPD | 3874e331c8afe4cc20fc49de7ebdbe77db277c98 | [
"Apache-2.0"
] | 2 | 2021-04-28T09:27:45.000Z | 2021-06-07T12:02:01.000Z | import torch.nn as nn
from ..registry import HEADS
from ..utils import ConvModule
from .bbox_head import BBoxHead
import torch
from ..utils.norm import build_norm_layer
from mmcv.cnn import constant_init
import random
from mmdet.core.bbox.geometry import bbox_overlaps
import numpy as np
import pdb
@HEADS.register_mo... | 38.656 | 93 | 0.579746 |
aeba891d4966544734b88eadcea8040c3f4832af | 4,153 | py | Python | commands/subsystems/generic.py | AndreyCortez/Telegram-Bot | 46f5c3044460812ee4b57e53b48eeab1ccf80404 | [
"MIT"
] | null | null | null | commands/subsystems/generic.py | AndreyCortez/Telegram-Bot | 46f5c3044460812ee4b57e53b48eeab1ccf80404 | [
"MIT"
] | null | null | null | commands/subsystems/generic.py | AndreyCortez/Telegram-Bot | 46f5c3044460812ee4b57e53b48eeab1ccf80404 | [
"MIT"
] | null | null | null | from telegram import ReplyKeyboardRemove, Update, ReplyKeyboardMarkup
from telegram.ext import CallbackContext, ConversationHandler
from spreadsheet import systems
from utils import available_systems, electric_subsystems, mechanics_subsystem
from .conversation import Conversation
from ..general import reply_text
# A ... | 34.89916 | 99 | 0.716109 |
c06ee76ae2dd8b4962c211aa6c4eccdb8042629b | 23,297 | py | Python | src/documents/views.py | PhaseDMS/phase | 4f776d0b1b5e7916a3e26aee890b3c2b9454ef0e | [
"MIT"
] | 2 | 2021-09-10T19:40:30.000Z | 2022-01-31T07:15:51.000Z | src/documents/views.py | PhaseDMS/phase | 4f776d0b1b5e7916a3e26aee890b3c2b9454ef0e | [
"MIT"
] | null | null | null | src/documents/views.py | PhaseDMS/phase | 4f776d0b1b5e7916a3e26aee890b3c2b9454ef0e | [
"MIT"
] | 1 | 2021-09-10T19:40:42.000Z | 2021-09-10T19:40:42.000Z | import json
from django.utils import timezone
from django.conf import settings
from django.http import (
HttpResponse,
Http404,
HttpResponseForbidden,
HttpResponseRedirect,
)
from wsgiref.util import FileWrapper
from django.core.exceptions import PermissionDenied
from django.views.generic import ListVi... | 34.159824 | 88 | 0.652359 |
329a24272de4651b6ef89b070347bfd2670cd98a | 768 | py | Python | dvc/repo/metrics/diff.py | mtl-ai/dvc | e675698a8d3979b8791699ade8c0d7a6d5c04818 | [
"Apache-2.0"
] | null | null | null | dvc/repo/metrics/diff.py | mtl-ai/dvc | e675698a8d3979b8791699ade8c0d7a6d5c04818 | [
"Apache-2.0"
] | null | null | null | dvc/repo/metrics/diff.py | mtl-ai/dvc | e675698a8d3979b8791699ade8c0d7a6d5c04818 | [
"Apache-2.0"
] | null | null | null | from dvc.exceptions import NoMetricsError
from dvc.utils.diff import diff as _diff
from dvc.utils.diff import format_dict
def _get_metrics(repo, *args, revs=None, **kwargs):
try:
metrics = repo.metrics.show(*args, **kwargs, revs=revs)
return metrics
except NoMetricsError:
return {}
d... | 25.6 | 73 | 0.65625 |
34041610d180ea861f8bcd573af920be19bd4f4e | 1,258 | py | Python | fiwareclient/lib/parser.py | YujiAzama/python-fiwareclient | 7d19034d832a1148abc6022c6e7687a52b74eef4 | [
"Apache-2.0"
] | null | null | null | fiwareclient/lib/parser.py | YujiAzama/python-fiwareclient | 7d19034d832a1148abc6022c6e7687a52b74eef4 | [
"Apache-2.0"
] | null | null | null | fiwareclient/lib/parser.py | YujiAzama/python-fiwareclient | 7d19034d832a1148abc6022c6e7687a52b74eef4 | [
"Apache-2.0"
] | null | null | null | from fiwareclient.orion.model.attribute import Attribute
from fiwareclient.orion.model.metadata import Metadata
class Parser(object):
def dict_to_attribute(self, dict_attr):
attr_name = list(dict_attr.keys())[0]
attr_type = dict_attr[attr_name]["type"]
attr_value = dict_attr[attr_name]["v... | 29.255814 | 82 | 0.537361 |
8d18a940b9d113562ff6e3cecf93d563f4885f0c | 404 | py | Python | fxwebgen.py | tiliado/fxwebgen | 5d1c5120b27fc13b6b45ee4e0017771271c3c3e0 | [
"BSD-2-Clause"
] | null | null | null | fxwebgen.py | tiliado/fxwebgen | 5d1c5120b27fc13b6b45ee4e0017771271c3c3e0 | [
"BSD-2-Clause"
] | 13 | 2018-08-06T15:25:50.000Z | 2019-04-14T14:09:22.000Z | fxwebgen.py | tiliado/fxwebgen | 5d1c5120b27fc13b6b45ee4e0017771271c3c3e0 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3.6
# Copyright 2018 Jiří Janoušek <janousek.jiri@gmail.com>
# Licensed under BSD-2-Clause license - see file LICENSE for details.
if __name__ == '__main__':
import os
import sys
fxwebgen_dir = os.path.abspath('fxwebgen')
if os.path.isfile(os.path.join(fxwebgen_dir, '__init__.py'))... | 31.076923 | 69 | 0.700495 |
38b83eabdbd196d94ad5dafe402ba76506e2a067 | 3,197 | py | Python | cmc/modules/exchange/spot.py | Devansh3712/cmc-py | e3f9687914d92cd95bd5a7c04e6103345ba43a3d | [
"MIT"
] | 2 | 2022-02-19T15:51:22.000Z | 2022-02-20T18:26:14.000Z | cmc/modules/exchange/spot.py | Devansh3712/py-cmc | e3f9687914d92cd95bd5a7c04e6103345ba43a3d | [
"MIT"
] | 6 | 2022-02-21T10:50:43.000Z | 2022-03-03T15:44:09.000Z | cmc/modules/exchange/spot.py | Devansh3712/py-cmc | e3f9687914d92cd95bd5a7c04e6103345ba43a3d | [
"MIT"
] | 2 | 2022-02-20T01:43:35.000Z | 2022-03-13T09:34:51.000Z | #!/usr/bin/env python
"""Module for fetching spot exchange rankings from CoinMarketCap
website."""
from datetime import datetime
import os
import time
from typing import Any, Dict, List, Optional, Tuple, Union
import bs4
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.by im... | 34.376344 | 114 | 0.580231 |
36287f4bb514473c467a906e885611d0efcff110 | 3,709 | py | Python | app.py | Azka-Gilani/webservices1.3 | 272928f351d9f68ac45df22654e7cc9a210b2c9f | [
"Apache-2.0"
] | null | null | null | app.py | Azka-Gilani/webservices1.3 | 272928f351d9f68ac45df22654e7cc9a210b2c9f | [
"Apache-2.0"
] | null | null | null | app.py | Azka-Gilani/webservices1.3 | 272928f351d9f68ac45df22654e7cc9a210b2c9f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import urllib
import json
import os
from flask import Flask
from flask import request
from flask import make_response
# Flask app should start in global layout
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
req = request.get_json(silent=True, force=True)
... | 29.204724 | 146 | 0.551631 |
02f457eebff5ba16720bac29a2ddab6ee261b371 | 3,026 | py | Python | flask-app/application/worker.py | filak/MTW-MeSH | b4bc525b01eaefadf991304f725dd4b51c11f50e | [
"MIT"
] | 1 | 2019-10-25T09:38:39.000Z | 2019-10-25T09:38:39.000Z | flask-app/application/worker.py | filak/MTW-MeSH | b4bc525b01eaefadf991304f725dd4b51c11f50e | [
"MIT"
] | 13 | 2019-10-16T09:33:37.000Z | 2022-03-22T12:51:28.000Z | flask-app/application/worker.py | filak/MTW-MeSH | b4bc525b01eaefadf991304f725dd4b51c11f50e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
MeSH Traslation Workflow (MTW) background worker - Flask app factory
"""
import logging
from flask import Flask, abort, request
from application import utils as mtu
def create_app(debug=False, logger=None,
config_path='conf/mtw.ini',
static_url_path='/assets-... | 31.852632 | 107 | 0.594514 |
8e02b8a24bca9d7e5ae6b5aec52acd1decb5b904 | 8,833 | py | Python | salt/modules/hipchat.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | salt/modules/hipchat.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | salt/modules/hipchat.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Module for sending messages to hipchat.
.. versionadded:: 2015.5.0
:configuration: This module can be used by either passing an api key and version
directly or by specifying both in a configuration profile in the salt
master/minion config.
For example:
.. code-block:: yam... | 29.64094 | 136 | 0.598551 |
70aa9877b15d3750bb9b4c800ed2402b5439fb60 | 11,719 | py | Python | alphapose/utils/detector.py | 18761095968/AlphaPose | 2370191beb87848e87c83cf704a24b6e9a3a1e4a | [
"Apache-2.0"
] | 2 | 2021-06-11T08:15:18.000Z | 2021-07-04T08:55:33.000Z | alphapose/utils/detector.py | 18761095968/AlphaPose | 2370191beb87848e87c83cf704a24b6e9a3a1e4a | [
"Apache-2.0"
] | null | null | null | alphapose/utils/detector.py | 18761095968/AlphaPose | 2370191beb87848e87c83cf704a24b6e9a3a1e4a | [
"Apache-2.0"
] | 4 | 2021-07-03T15:04:18.000Z | 2021-07-04T09:08:42.000Z | import os
import sys
from threading import Thread
from queue import Queue
import cv2
import numpy as np
import torch
import torch.multiprocessing as mp
from alphapose.utils.presets import SimpleTransform
from alphapose.models import builder
class DetectionLoader():
def __init__(self, input_source, detector, cfg... | 41.704626 | 155 | 0.567711 |
1c4208b2f7a2bd869e15e83d2bdd272601022302 | 29,953 | py | Python | testsSDW__copy/card_tests/shaman_tests.py | jomyhuang/sdwle | 9b6e916567e09c7cba4a171fe0adf0f47009a8c3 | [
"MIT"
] | null | null | null | testsSDW__copy/card_tests/shaman_tests.py | jomyhuang/sdwle | 9b6e916567e09c7cba4a171fe0adf0f47009a8c3 | [
"MIT"
] | null | null | null | testsSDW__copy/card_tests/shaman_tests.py | jomyhuang/sdwle | 9b6e916567e09c7cba4a171fe0adf0f47009a8c3 | [
"MIT"
] | null | null | null | import random
import unittest
from SDWLE.cards.spells.neutral import TheCoin
from testsSDW.agents.testing_agents import OneCardPlayingAgent, MinionAttackingAgent, CardTestingAgent, \
PlayAndAttackAgent
from testsSDW.testing_utils import generate_game_for
from SDWLE.cards import *
from SDWLE.constants import MINION... | 43.097842 | 120 | 0.672988 |
38809ad1ffbe5c2d21602f10d5851fd5d7a6f7a1 | 2,802 | py | Python | test/functional/invalidateblock.py | twairgroup/wondercoin | c075c2d0c1a4927d9f04d5100106e369a85128e5 | [
"MIT"
] | 1 | 2021-04-29T09:04:49.000Z | 2021-04-29T09:04:49.000Z | test/functional/invalidateblock.py | twairgroup/wondercoin | c075c2d0c1a4927d9f04d5100106e369a85128e5 | [
"MIT"
] | 2 | 2021-06-08T21:50:46.000Z | 2021-06-09T14:04:30.000Z | test/functional/invalidateblock.py | twairgroup/wondercoin | c075c2d0c1a4927d9f04d5100106e369a85128e5 | [
"MIT"
] | 1 | 2021-06-09T01:09:47.000Z | 2021-06-09T01:09:47.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the invalidateblock RPC."""
from test_framework.test_framework import WondercoinTestFramework
fro... | 43.107692 | 100 | 0.660243 |
c55c646582326e2204c86901926d04509f0c0798 | 13,893 | py | Python | .history/train_20210815162721.py | Arcofcosmos/MyYolov4_Pytorch | 14c445503d0fc69b8a8b64ecdc87256ac4c1fce1 | [
"MIT"
] | null | null | null | .history/train_20210815162721.py | Arcofcosmos/MyYolov4_Pytorch | 14c445503d0fc69b8a8b64ecdc87256ac4c1fce1 | [
"MIT"
] | null | null | null | .history/train_20210815162721.py | Arcofcosmos/MyYolov4_Pytorch | 14c445503d0fc69b8a8b64ecdc87256ac4c1fce1 | [
"MIT"
] | null | null | null | #-------------------------------------#
# 对数据集进行训练
#-------------------------------------#
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.optim as optim
from torch.utils.data import DataLoader
from tqdm import tqdm
from nets.yolo4 import YoloBody
from nets.yolo_training import ... | 41.846386 | 148 | 0.511912 |
7b2f4627f425bd83da321827d6e01412d1a5012e | 8,059 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_hub_virtual_network_connections_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_hub_virtual_network_connections_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_hub_virtual_network_connections_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 46.051429 | 199 | 0.668569 |
645e74f21bd0ae0484116fb94f996c8a4e22df5b | 13,058 | py | Python | sdk/identity/azure-identity/tests/test_interactive_credential.py | iamvishnuks/azure-sdk-for-python | 4df435651ab32f57b1e9f33fc65fd46632055704 | [
"MIT"
] | 1 | 2020-08-17T14:40:09.000Z | 2020-08-17T14:40:09.000Z | sdk/identity/azure-identity/tests/test_interactive_credential.py | iamvishnuks/azure-sdk-for-python | 4df435651ab32f57b1e9f33fc65fd46632055704 | [
"MIT"
] | 2 | 2020-07-17T13:57:08.000Z | 2020-07-21T18:30:37.000Z | sdk/identity/azure-identity/tests/test_interactive_credential.py | iamvishnuks/azure-sdk-for-python | 4df435651ab32f57b1e9f33fc65fd46632055704 | [
"MIT"
] | 1 | 2020-09-18T13:20:20.000Z | 2020-09-18T13:20:20.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from azure.core.exceptions import ClientAuthenticationError
from azure.identity import (
AuthenticationRequiredError,
AuthenticationRecord,
KnownAuthorities,... | 40.552795 | 117 | 0.721933 |
d956b2bb4ff288eb48d6c4c2c7f9697d0807d90d | 8,419 | py | Python | cogkit/modules/provider-localscheduler/examples/gce-cloud-provider/cloud.py | ketancmaheshwari/swift-k | ec4f2acbf122536b1b09f77251cb0d00b508251c | [
"Apache-2.0"
] | null | null | null | cogkit/modules/provider-localscheduler/examples/gce-cloud-provider/cloud.py | ketancmaheshwari/swift-k | ec4f2acbf122536b1b09f77251cb0d00b508251c | [
"Apache-2.0"
] | null | null | null | cogkit/modules/provider-localscheduler/examples/gce-cloud-provider/cloud.py | ketancmaheshwari/swift-k | ec4f2acbf122536b1b09f77251cb0d00b508251c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
from random import randrange
import logging
import pprint
import argparse
import datetime
import time
import json
#from __future__ import print_function
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
from libcloud.compute.base i... | 37.417778 | 160 | 0.605891 |
34b1d48452bf8fdeb2c093056210690176c1e8fc | 317 | py | Python | selia/urls/create_views/sites.py | IslasGECI/selia | 9863c32cd45db13053a1d2add67f5bdc1871b791 | [
"BSD-4-Clause"
] | null | null | null | selia/urls/create_views/sites.py | IslasGECI/selia | 9863c32cd45db13053a1d2add67f5bdc1871b791 | [
"BSD-4-Clause"
] | 13 | 2020-01-07T21:53:50.000Z | 2022-01-13T01:53:50.000Z | selia/urls/create_views/sites.py | IslasGECI/selia | 9863c32cd45db13053a1d2add67f5bdc1871b791 | [
"BSD-4-Clause"
] | 1 | 2021-05-06T19:38:09.000Z | 2021-05-06T19:38:09.000Z | from django.urls import path
from selia.views.create_views import sites
urlpatterns = [
path(
'sites/create/',
sites.CreateSiteManager.as_view(),
name='create_site'),
path(
'sites/create/1/',
sites.CreateSiteView.as_view(),
name='create_site_create_form'),
]
| 21.133333 | 42 | 0.630915 |
24af67b51354487426d08b210e4729793828c661 | 4,828 | py | Python | src/dxtbx/format/FormatSMVJHSim.py | cctbx/dxtbx | f7bd1201231f0fe94568db5281127d2cb944063a | [
"BSD-3-Clause"
] | 1 | 2020-01-27T22:34:57.000Z | 2020-01-27T22:34:57.000Z | src/dxtbx/format/FormatSMVJHSim.py | cctbx/dxtbx | f7bd1201231f0fe94568db5281127d2cb944063a | [
"BSD-3-Clause"
] | 448 | 2019-04-06T01:20:56.000Z | 2022-03-31T15:58:48.000Z | src/dxtbx/format/FormatSMVJHSim.py | cctbx/dxtbx | f7bd1201231f0fe94568db5281127d2cb944063a | [
"BSD-3-Clause"
] | 10 | 2019-04-08T13:30:32.000Z | 2021-09-30T14:48:50.000Z | """An implementation of the SMV image reader for JHSim images."""
import calendar
import sys
import time
from iotbx.detectors import SMVImage
from dxtbx.format.FormatSMV import FormatSMV
class FormatSMVJHSim(FormatSMV):
"""A class for reading SMV format JHSim images, and correctly constructing
a model for... | 33.068493 | 82 | 0.615369 |
0c0bd36b1c84ebcf650c8523ce49f5e3756fc24f | 1,804 | py | Python | simplemfl/urls.py | METS-Programme/simplemfl | df2e49922b9b5a1bdbec726c5e2a0c2820ecf71c | [
"MIT"
] | 1 | 2020-05-11T21:01:02.000Z | 2020-05-11T21:01:02.000Z | simplemfl/urls.py | hargi12/simplemfl | df2e49922b9b5a1bdbec726c5e2a0c2820ecf71c | [
"MIT"
] | null | null | null | simplemfl/urls.py | hargi12/simplemfl | df2e49922b9b5a1bdbec726c5e2a0c2820ecf71c | [
"MIT"
] | 1 | 2020-05-11T21:00:53.000Z | 2020-05-11T21:00:53.000Z | """simplemfl URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | 36.08 | 95 | 0.734479 |
bc9d3faccbf8e5f70369dc1a6087ecbd8da431ad | 416 | py | Python | barbers_accounts/migrations/0005_auto_20210921_2159.py | starsouf/Python-Django-web-app | 0af1a4f97a7b7583858bd3e487d8a1b502b4daa7 | [
"Unlicense"
] | null | null | null | barbers_accounts/migrations/0005_auto_20210921_2159.py | starsouf/Python-Django-web-app | 0af1a4f97a7b7583858bd3e487d8a1b502b4daa7 | [
"Unlicense"
] | null | null | null | barbers_accounts/migrations/0005_auto_20210921_2159.py | starsouf/Python-Django-web-app | 0af1a4f97a7b7583858bd3e487d8a1b502b4daa7 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.1.2 on 2021-09-22 01:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('barbers_accounts', '0004_auto_20210921_1936'),
]
operations = [
migrations.AlterField(
model_name='website_salon_details',
... | 21.894737 | 56 | 0.622596 |
4b262cc43127b630236ef3e89512c7f8a8690e1b | 1,398 | py | Python | utils/git_fetch.py | FerdiKirsten/coronavirus_structural_task_force | 821c58846550ef6583366ca9adcba63c3aafd4a5 | [
"MIT"
] | null | null | null | utils/git_fetch.py | FerdiKirsten/coronavirus_structural_task_force | 821c58846550ef6583366ca9adcba63c3aafd4a5 | [
"MIT"
] | null | null | null | utils/git_fetch.py | FerdiKirsten/coronavirus_structural_task_force | 821c58846550ef6583366ca9adcba63c3aafd4a5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 1 17:43:06 2020
@author: yunyun
"""
import os
import requests
from subprocess import call
import argparse
import pickle
_url_root = 'https://github.com/thorn-lab/coronavirus_structural_task_force/raw/master/'
def parse_args():
parser = argp... | 26.884615 | 109 | 0.613019 |
abc8098704d32d7493494b9342ff6095096a0423 | 4,588 | py | Python | spyder/app/cli_options.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 7,956 | 2015-02-17T01:19:09.000Z | 2022-03-31T21:52:15.000Z | spyder/app/cli_options.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 16,326 | 2015-02-16T23:15:21.000Z | 2022-03-31T23:34:34.000Z | spyder/app/cli_options.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 1,918 | 2015-02-20T19:26:26.000Z | 2022-03-31T19:03:25.000Z | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
import argparse
def get_options(argv=None):
"""
Convert options into commands.
Return commands, message
"""
parser = argparse.ArgumentParser(usa... | 29.22293 | 76 | 0.579119 |
7ee8853f95d6e7cc22a7c907e8ba2d9dc37918b1 | 1,537 | py | Python | 07p/python/py_src/runDemo.py | st970703/AUTO07P-Update-to-Python-3.0 | fb2d2aebf2127fa914064d01ed62c0acb5f6421c | [
"Apache-2.0"
] | null | null | null | 07p/python/py_src/runDemo.py | st970703/AUTO07P-Update-to-Python-3.0 | fb2d2aebf2127fa914064d01ed62c0acb5f6421c | [
"Apache-2.0"
] | null | null | null | 07p/python/py_src/runDemo.py | st970703/AUTO07P-Update-to-Python-3.0 | fb2d2aebf2127fa914064d01ed62c0acb5f6421c | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
from python.py_src import AUTOExceptions, runAUTO
def runDemo(demo,**kw):
runner = runAUTO.runAUTO(**kw)
runner.runDemo(demo)
runner.config(log=None, err=None)
def test():
import os
import sys
from . import AUTOutil
log=open("log","w")
err=open("err","w")
s... | 26.964912 | 71 | 0.571893 |
5f2cc6efd0e3337f3039040ffbdd3e70ce9cc484 | 281 | py | Python | src/south/management/commands/testserver.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 1 | 2022-02-09T22:56:49.000Z | 2022-02-09T22:56:49.000Z | src/south/management/commands/testserver.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 6 | 2018-10-19T10:04:23.000Z | 2019-12-09T20:29:12.000Z | src/south/management/commands/testserver.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | from django.core.management.commands import testserver
from south.management.commands import patch_for_test_db_setup
class Command(testserver.Command):
def handle(self, *args, **kwargs):
patch_for_test_db_setup()
super(Command, self).handle(*args, **kwargs)
| 28.1 | 61 | 0.75089 |
c84836176dd682ef8a0798d72e47e09edccf4f8d | 1,319 | py | Python | ckanext/audioview/plugin.py | hackhit/ckan | 53b9442509b46525d653f2f705e98319752ceb2d | [
"BSD-3-Clause"
] | 6 | 2015-11-09T00:44:51.000Z | 2019-11-21T14:56:01.000Z | ckanext/audioview/plugin.py | hackhit/ckan | 53b9442509b46525d653f2f705e98319752ceb2d | [
"BSD-3-Clause"
] | 39 | 2015-02-18T17:32:23.000Z | 2022-03-11T18:03:36.000Z | ckanext/audioview/plugin.py | hackhit/ckan | 53b9442509b46525d653f2f705e98319752ceb2d | [
"BSD-3-Clause"
] | 17 | 2015-03-13T18:05:05.000Z | 2020-11-06T13:55:32.000Z | # encoding: utf-8
from six import text_type
import ckan.plugins as p
ignore_empty = p.toolkit.get_validator('ignore_empty')
unicode_safe = p.toolkit.get_validator('unicode_safe')
DEFAULT_AUDIO_FORMATS = 'wav ogg mp3'
class AudioView(p.SingletonPlugin):
'''This plugin makes views of audio resources, using an <a... | 30.674419 | 74 | 0.620925 |
adb2a7febbad4fab6515984bd22690c2638ee36f | 2,258 | py | Python | checkerista/.env/Lib/site-packages/django/db/migrations/operations/utils.py | LybaFatimaNasir/CS311S20PID02 | bc29a8c4c9ee508c74d231c015a57b1ca4dfcb39 | [
"MIT"
] | 15 | 2020-06-04T05:22:47.000Z | 2021-07-06T01:37:57.000Z | checkerista/.env/Lib/site-packages/django/db/migrations/operations/utils.py | LybaFatimaNasir/CS311S20PID02 | bc29a8c4c9ee508c74d231c015a57b1ca4dfcb39 | [
"MIT"
] | 51 | 2019-10-08T01:53:02.000Z | 2021-06-04T22:02:21.000Z | checkerista/.env/Lib/site-packages/django/db/migrations/operations/utils.py | LybaFatimaNasir/CS311S20PID02 | bc29a8c4c9ee508c74d231c015a57b1ca4dfcb39 | [
"MIT"
] | 11 | 2019-09-14T20:57:30.000Z | 2022-01-19T17:59:26.000Z | from collections import namedtuple
from django.db.models.fields.related import RECURSIVE_RELATIONSHIP_CONSTANT
def is_referenced_by_foreign_key(state, model_name_lower, field, field_name):
for state_app_label, state_model in state.models:
for _, f in state.models[state_app_label, state_model].fields:
... | 41.814815 | 102 | 0.648361 |
afc742e80b50b5eb6c91fce194df7ba6dbe91420 | 9,452 | py | Python | py/VAE.py | JuliaTagBot/Faceless.jl | db6e20659a2ba589468adf36b67cf9e7f4325bfe | [
"MIT"
] | 2 | 2015-11-29T06:25:24.000Z | 2019-07-19T17:19:32.000Z | py/VAE.py | JuliaTagBot/Faceless.jl | db6e20659a2ba589468adf36b67cf9e7f4325bfe | [
"MIT"
] | null | null | null | py/VAE.py | JuliaTagBot/Faceless.jl | db6e20659a2ba589468adf36b67cf9e7f4325bfe | [
"MIT"
] | 2 | 2016-03-27T19:08:07.000Z | 2020-02-08T11:29:35.000Z |
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
np.random.seed(0)
tf.set_random_seed(0)
# Load MNIST data in a format suited for tensorflow.
# The script input_data is available under this URL:
# https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/g3doc/tutorials/mn... | 46.792079 | 111 | 0.609077 |
a827951b8f489ddd7c383d0904c941cde566587a | 2,763 | py | Python | prody/apps/evol_apps/evol_conserv.py | kaynakb/ProDy | 4366ad28142f51ff8a84f8a0f4ce659c0b949d55 | [
"MIT"
] | 210 | 2015-01-26T08:17:56.000Z | 2022-03-30T01:40:34.000Z | prody/apps/evol_apps/evol_conserv.py | kaynakb/ProDy | 4366ad28142f51ff8a84f8a0f4ce659c0b949d55 | [
"MIT"
] | 555 | 2015-01-05T21:51:54.000Z | 2022-03-31T16:51:41.000Z | prody/apps/evol_apps/evol_conserv.py | kaynakb/ProDy | 4366ad28142f51ff8a84f8a0f4ce659c0b949d55 | [
"MIT"
] | 99 | 2015-02-09T18:00:39.000Z | 2022-03-07T12:52:51.000Z | """Calculate conservation in an MSA using Shannon entropy."""
from ..apptools import DevelApp
from prody import LOGGER
__all__ = ['evol_conserv']
APP = DevelApp('conserv',
help='analyze conservation using Shannon entropy')
APP.setExample(
"""This application calculates conservation using Shannon entr... | 29.393617 | 75 | 0.624683 |
2cb7da4182a186c5350b4125b9a9505f18a3a0db | 12,758 | py | Python | built-in/TensorFlow/Official/cv/image_classification/ShuffleNetV1-1.0x-group3_ID2129_for_TensorFlow/architecture.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | built-in/TensorFlow/Official/cv/image_classification/ShuffleNetV1-1.0x-group3_ID2129_for_TensorFlow/architecture.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 1 | 2022-01-20T03:11:05.000Z | 2022-01-20T06:53:39.000Z | built-in/TensorFlow/Official/cv/image_classification/ShuffleNetV1-1.0x-group3_ID2129_for_TensorFlow/architecture.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | #
# Copyright 2017 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 appli... | 43.993103 | 144 | 0.617417 |
88f30f2f31f9b77fc4097c0d9afcf620669099b3 | 6,399 | py | Python | NCube/NCubeImageOnTopographyBlockSource.py | mobigroup/ParaView-plugins | f7cf829f858dbb91f176d45b17df45cc3fe6cb99 | [
"MIT"
] | 41 | 2020-01-09T16:45:53.000Z | 2022-03-16T07:04:37.000Z | NCube/NCubeImageOnTopographyBlockSource.py | echinoids/ParaView-plugins | f7cf829f858dbb91f176d45b17df45cc3fe6cb99 | [
"MIT"
] | 1 | 2021-06-04T14:09:23.000Z | 2021-06-05T11:52:27.000Z | NCube/NCubeImageOnTopographyBlockSource.py | echinoids/ParaView-plugins | f7cf829f858dbb91f176d45b17df45cc3fe6cb99 | [
"MIT"
] | 6 | 2020-03-15T14:35:52.000Z | 2021-07-31T16:44:07.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020 Alexey Pechnikov. All rights reserved.
# https://orcid.org/0000-0001-9626-8615 (ORCID)
# pechnikov@mobigroup.ru (email)
# License: http://opensource.org/licenses/MIT
from paraview.util.vtkAlgorithm import *
# load error fix for paraView 5.8.1rc1 Python3
try:
import xa... | 34.967213 | 118 | 0.616346 |
a3522a402ac17344dc75f0899f42ec973a2579a6 | 5,297 | py | Python | docs/conf.py | lucas7bm/pychord | eb179289919ab9fec0dd27e10fa52d3e395082d1 | [
"MIT"
] | 1 | 2018-11-18T22:44:40.000Z | 2018-11-18T22:44:40.000Z | docs/conf.py | lucas7bm/pychord | eb179289919ab9fec0dd27e10fa52d3e395082d1 | [
"MIT"
] | null | null | null | docs/conf.py | lucas7bm/pychord | eb179289919ab9fec0dd27e10fa52d3e395082d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# pychord documentation build configuration file, created by
# sphinx-quickstart on Sat Dec 31 14:51:42 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | 29.427778 | 92 | 0.678497 |
6dc603f2b760141d2254c0cbbbe095cc2cc7da80 | 9,167 | py | Python | docs/conf.py | timothyb0912/genvi | b6382f488ffcea89355876f04ffdc2b122c09509 | [
"MIT"
] | 1 | 2021-01-22T07:50:30.000Z | 2021-01-22T07:50:30.000Z | docs/conf.py | timothyb0912/genvi | b6382f488ffcea89355876f04ffdc2b122c09509 | [
"MIT"
] | null | null | null | docs/conf.py | timothyb0912/genvi | b6382f488ffcea89355876f04ffdc2b122c09509 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
impo... | 33.578755 | 85 | 0.703284 |
3598bd430da64b169889803820f0ad8cdb82662e | 5,717 | py | Python | enroll/tests/model_tests.py | maciektr/enrollXchange | 1b579a6e4b92360bade28836686c733581f68c37 | [
"MIT"
] | null | null | null | enroll/tests/model_tests.py | maciektr/enrollXchange | 1b579a6e4b92360bade28836686c733581f68c37 | [
"MIT"
] | 10 | 2021-04-08T11:36:41.000Z | 2021-06-05T21:09:31.000Z | enroll/tests/model_tests.py | maciektr/enrollXchange | 1b579a6e4b92360bade28836686c733581f68c37 | [
"MIT"
] | 1 | 2021-05-29T20:33:12.000Z | 2021-05-29T20:33:12.000Z | import datetime as dt
from django.test import TestCase
from django.core.exceptions import ValidationError
from django.db import transaction
from django.db.utils import DataError, IntegrityError
from enroll.models import User, Student, Lecturer, Enrollment, ClassTime
from enroll.types import UserType
from enroll.utils ... | 33.629412 | 99 | 0.60014 |
ef40f62e694e83a4eb749c613a7593c495035d2c | 7,946 | py | Python | tensor2tensor/data_generators/mnist.py | sivaramakrishna7/tensor2tensor | eb0118d3f459913133e3d68a96944480a928bff1 | [
"Apache-2.0"
] | 5 | 2019-03-28T03:52:32.000Z | 2021-02-24T07:09:26.000Z | tensor2tensor/data_generators/mnist.py | sivaramakrishna7/tensor2tensor | eb0118d3f459913133e3d68a96944480a928bff1 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/data_generators/mnist.py | sivaramakrishna7/tensor2tensor | eb0118d3f459913133e3d68a96944480a928bff1 | [
"Apache-2.0"
] | 2 | 2018-08-07T03:43:09.000Z | 2019-12-09T06:41:40.000Z | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# 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.531746 | 80 | 0.73106 |
b80ee527cc2ee351644cf4a81440f300f26551c1 | 1,709 | py | Python | kingfisher_scrapy/commands/crawlall.py | open-contracting/kingfisher-collect | 2fbbd6361a0ec959e0603343a4b363f97fae3815 | [
"BSD-3-Clause"
] | 7 | 2020-07-24T13:15:37.000Z | 2021-12-11T22:40:07.000Z | kingfisher_scrapy/commands/crawlall.py | open-contracting/kingfisher-collect | 2fbbd6361a0ec959e0603343a4b363f97fae3815 | [
"BSD-3-Clause"
] | 418 | 2020-04-27T22:15:27.000Z | 2022-03-31T23:49:34.000Z | kingfisher_scrapy/commands/crawlall.py | open-contracting/kingfisher-collect | 2fbbd6361a0ec959e0603343a4b363f97fae3815 | [
"BSD-3-Clause"
] | 6 | 2020-05-28T16:06:53.000Z | 2021-03-16T02:54:15.000Z | from scrapy.commands import ScrapyCommand
from scrapy.exceptions import UsageError
class CrawlAll(ScrapyCommand):
def syntax(self):
return '[options] [spider ...]'
def short_desc(self):
return 'Run all spiders'
def add_options(self, parser):
ScrapyCommand.add_options(self, parser... | 35.604167 | 110 | 0.640726 |
437e20163c585ebc942948a499eaf5e79e6b5257 | 2,454 | py | Python | {{cookiecutter.github_repository}}/tests/conftest.py | ricardoesc25/django-init | e48e6e238d967cca191db122ae753e1c0bcaad50 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.github_repository}}/tests/conftest.py | ricardoesc25/django-init | e48e6e238d967cca191db122ae753e1c0bcaad50 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.github_repository}}/tests/conftest.py | ricardoesc25/django-init | e48e6e238d967cca191db122ae753e1c0bcaad50 | [
"BSD-3-Clause"
] | null | null | null | """
This module is used to provide configuration, fixtures, and plugins for pytest.
It may be also used for extending doctest's context:
1. https://docs.python.org/3/library/doctest.html
2. https://docs.pytest.org/en/latest/doctest.html
"""
# Standard Library
import functools
from unittest import mock
# Third Party S... | 29.566265 | 106 | 0.635289 |
dbb09eace40f317230211ec2d07e918da543525a | 1,568 | py | Python | pytorch/resume_replicate_model_genesis.py | mistermoutan/ModelsGenesis | 98af7075b93311fe655e9692773eb1ce015b8bd0 | [
"MIT"
] | null | null | null | pytorch/resume_replicate_model_genesis.py | mistermoutan/ModelsGenesis | 98af7075b93311fe655e9692773eb1ce015b8bd0 | [
"MIT"
] | null | null | null | pytorch/resume_replicate_model_genesis.py | mistermoutan/ModelsGenesis | 98af7075b93311fe655e9692773eb1ce015b8bd0 | [
"MIT"
] | null | null | null | from finetune_config import FineTuneConfig
from config import models_genesis_config
from dataset import Dataset
from finetune import Trainer
from utils import make_dir
def resume_replication_of_results_pretrain(run_nr:int):
config = models_genesis_config()
config.override_dirs(run_nr)
config.resume_s... | 44.8 | 146 | 0.757015 |
871891319498320b06b63d5daee75e3e4f0a4f5a | 3,790 | py | Python | bigbench/models/human_model.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | bigbench/models/human_model.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | bigbench/models/human_model.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 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, ... | 34.770642 | 195 | 0.571768 |
405861eeb752e999df788ac666d6ebbd3579f2e9 | 5,608 | py | Python | homeassistant/helpers/discovery.py | MoshonkaKita/Golovastik | df2ab62ce9b245b9b0f976af8c9868d9b416733b | [
"Apache-2.0"
] | 3 | 2019-01-31T13:41:37.000Z | 2020-05-20T14:22:18.000Z | homeassistant/helpers/discovery.py | MoshonkaKita/Golovastik | df2ab62ce9b245b9b0f976af8c9868d9b416733b | [
"Apache-2.0"
] | 5 | 2021-02-08T20:32:11.000Z | 2022-01-13T01:19:23.000Z | homeassistant/helpers/discovery.py | MoshonkaKita/Golovastik | df2ab62ce9b245b9b0f976af8c9868d9b416733b | [
"Apache-2.0"
] | 1 | 2021-05-31T08:13:56.000Z | 2021-05-31T08:13:56.000Z | """Helper methods to help with platform discovery.
There are two different types of discoveries that can be fired/listened for.
- listen/discover is for services. These are targeted at a component.
- listen_platform/discover_platform is for platforms. These are used by
components to allow discovery of their platf... | 31.863636 | 79 | 0.696327 |
82a6292ed2190ec0f075399ecb6fb0bd5af1c7a1 | 728 | py | Python | example/urls.py | callowayproject/django-stories | ea0398d69ea597819d0a6c75d4a3f65820321e13 | [
"Apache-2.0"
] | 10 | 2015-06-25T23:35:29.000Z | 2021-08-20T04:22:00.000Z | example/urls.py | callowayproject/django-stories | ea0398d69ea597819d0a6c75d4a3f65820321e13 | [
"Apache-2.0"
] | null | null | null | example/urls.py | callowayproject/django-stories | ea0398d69ea597819d0a6c75d4a3f65820321e13 | [
"Apache-2.0"
] | 2 | 2017-03-21T04:10:29.000Z | 2020-04-06T12:38:12.000Z | from django.conf.urls.defaults import patterns, include
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
(r'^news/', include('stories.urls')),
(r'^people/', include('simpleprofil... | 34.666667 | 100 | 0.697802 |
653d77228864bce74662507330838416facd1ce3 | 1,898 | py | Python | docs/source/conf.py | joelegner/leglib | 5f7f4cc48112302bb48857d85435c42fb8c72169 | [
"MIT"
] | null | null | null | docs/source/conf.py | joelegner/leglib | 5f7f4cc48112302bb48857d85435c42fb8c72169 | [
"MIT"
] | null | null | null | docs/source/conf.py | joelegner/leglib | 5f7f4cc48112302bb48857d85435c42fb8c72169 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 34.509091 | 79 | 0.664384 |
4030cced5ed7949568eaac0501baffd721fcdf3f | 1,975 | py | Python | Python Programs/zero-arrow-pattern-printing.py | muhammad-masood-ur-rehman/Skillrack | 71a25417c89d0efab40ee6229ccd758b26ae4312 | [
"CC0-1.0"
] | 2 | 2021-06-26T21:50:59.000Z | 2021-09-18T04:55:51.000Z | Python Programs/zero-arrow-pattern-printing.py | muhammad-masood-ur-rehman/Skillrack | 71a25417c89d0efab40ee6229ccd758b26ae4312 | [
"CC0-1.0"
] | null | null | null | Python Programs/zero-arrow-pattern-printing.py | muhammad-masood-ur-rehman/Skillrack | 71a25417c89d0efab40ee6229ccd758b26ae4312 | [
"CC0-1.0"
] | null | null | null | Zero Arrow Pattern Printing
The program must accept an integer N as the input. The program must print the pattern of (2*N)-1 lines based on the following conditions.
- Each row of the pattern contains N characters.
- In the 1st row, the Nth character is 0 and the remaining characters are asterisks.
- In the 2nd row, t... | 32.916667 | 137 | 0.687595 |
8d8aba894c8a0fda7798c50e2e3519ecf14badd0 | 2,465 | py | Python | sdk/gcc_arm_embedded_4_9_mac/arm-none-eabi/lib/armv7-m/libstdc++.a-gdb.py | Bardo91/fruitymesh_grvc | 872d3cb5e92a7fa6d4823b7295d20f459058fb19 | [
"OLDAP-2.4"
] | null | null | null | sdk/gcc_arm_embedded_4_9_mac/arm-none-eabi/lib/armv7-m/libstdc++.a-gdb.py | Bardo91/fruitymesh_grvc | 872d3cb5e92a7fa6d4823b7295d20f459058fb19 | [
"OLDAP-2.4"
] | 2 | 2017-09-19T11:46:02.000Z | 2017-09-19T11:49:14.000Z | sdk/gcc_arm_embedded_4_9_mac/arm-none-eabi/lib/armv7-m/libstdc++.a-gdb.py | Bardo91/fruitymesh_grvc | 872d3cb5e92a7fa6d4823b7295d20f459058fb19 | [
"OLDAP-2.4"
] | null | null | null | # -*- python -*-
# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# 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 later versio... | 40.409836 | 117 | 0.723732 |
fdf79b5389882e2e0a8870933819f79a5bb0a977 | 1,164 | py | Python | tests/unit/test_lists.py | staticdev/human-readable | 1c3328560f9b8097e1bc3ec6fceefa486c264fd5 | [
"MIT"
] | 5 | 2021-03-10T21:22:31.000Z | 2022-03-23T04:38:07.000Z | tests/unit/test_lists.py | staticdev/human-readable | 1c3328560f9b8097e1bc3ec6fceefa486c264fd5 | [
"MIT"
] | 59 | 2021-02-13T10:08:23.000Z | 2022-03-14T19:43:55.000Z | tests/unit/test_lists.py | staticdev/human-readable | 1c3328560f9b8097e1bc3ec6fceefa486c264fd5 | [
"MIT"
] | null | null | null | """Tests for listing humanization."""
from __future__ import annotations
import pytest
import human_readable.lists as lists
@pytest.mark.parametrize(
"params, expected",
[
(([], ","), ""), # empty list
((["jorbas"], ","), "jorbas"), # one element
((["jorbas", "maria"], ","), "jorba... | 29.1 | 78 | 0.547251 |
416b0993bdf4655333c7f7f7dcf494c0ebd4c043 | 13,694 | py | Python | assignments/assignment4/starter_code/main.py | mebusy/cs234_RL_2019_stanford | 6ca051294f8af5257a051d2933fcc6a39177f24d | [
"MIT"
] | null | null | null | assignments/assignment4/starter_code/main.py | mebusy/cs234_RL_2019_stanford | 6ca051294f8af5257a051d2933fcc6a39177f24d | [
"MIT"
] | null | null | null | assignments/assignment4/starter_code/main.py | mebusy/cs234_RL_2019_stanford | 6ca051294f8af5257a051d2933fcc6a39177f24d | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
import numpy as np
import csv
import os
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from data import load_data, LABEL_KEY
import pdb
def dose_class(weekly_dose):
if weekly_dose < 21:
return 'low'
elif 21 <= weekly_dose and weekly_dose <= 49:
r... | 33.318735 | 118 | 0.625091 |
2c8b3ebe7a08746e737d92e83663aae432be124f | 6,936 | py | Python | improver/cube_combiner.py | LaurenceBeard/improver | b7cfe44f3a802d2a3d65f76a325215033c9de074 | [
"BSD-3-Clause"
] | null | null | null | improver/cube_combiner.py | LaurenceBeard/improver | b7cfe44f3a802d2a3d65f76a325215033c9de074 | [
"BSD-3-Clause"
] | 2 | 2020-03-30T17:25:18.000Z | 2021-06-25T15:30:29.000Z | improver/cube_combiner.py | LaurenceBeard/improver | b7cfe44f3a802d2a3d65f76a325215033c9de074 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2019 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 38.320442 | 79 | 0.625433 |
2efa448db51d675785b4d69ee659a2f2618cef73 | 360 | py | Python | lib/utils/utils.py | bugcrowd/methodology-taxonomy | 428503ae17f83de56e17762c9dd8daeb6f14dd6a | [
"Apache-2.0"
] | 4 | 2021-09-28T18:17:12.000Z | 2022-02-14T04:47:12.000Z | lib/utils/utils.py | bugcrowd/methodology-taxonomy | 428503ae17f83de56e17762c9dd8daeb6f14dd6a | [
"Apache-2.0"
] | 4 | 2021-09-21T10:05:30.000Z | 2022-01-28T04:21:45.000Z | lib/utils/utils.py | bugcrowd/methodology-taxonomy | 428503ae17f83de56e17762c9dd8daeb6f14dd6a | [
"Apache-2.0"
] | 2 | 2021-11-15T21:13:04.000Z | 2022-02-27T04:52:00.000Z | import json
import git
SCHEMA_FILENAME = 'schema.json'
METHODOLOGIES_DIR = 'methodologies'
MAPPING_DIR = 'mappings'
TEMPLATE_FILENAME = 'templates.json'
TEMPLATE_SCHEMA = 'templates.schema.json'
TEMPLATE_BASE_URL = 'https://github.com/bugcrowd/templates/tree/master/'
def get_json(filename):
with open(filename) a... | 25.714286 | 72 | 0.758333 |
f0de2a13040231a89f303923dd22650b976fab94 | 3,324 | py | Python | contrib/zmq/zmq_sub3.4.py | pavhash5/bitcoinroyale | 74711b2767e1a64cd4af172d40fada969e03505c | [
"MIT"
] | 5 | 2019-09-19T22:24:28.000Z | 2020-08-26T00:07:59.000Z | contrib/zmq/zmq_sub3.4.py | pavhash5/bitcoinroyale | 74711b2767e1a64cd4af172d40fada969e03505c | [
"MIT"
] | 6 | 2019-10-01T00:00:54.000Z | 2021-07-26T12:57:40.000Z | contrib/zmq/zmq_sub3.4.py | pavhash5/bitcoinroyale | 74711b2767e1a64cd4af172d40fada969e03505c | [
"MIT"
] | 3 | 2019-09-30T15:03:26.000Z | 2019-12-09T18:47:52.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
ZMQ example using python3's asyncio
Bitcoin should be started with the command line argument... | 36.527473 | 107 | 0.649819 |
9cee43be4808b943423dfccb358a70ef341cfea6 | 11,243 | py | Python | vhdl_interface.py | Remillard/VHDL-Mode | 35d2b6ad022b30bdd23e4e89779f9b8b0486fee2 | [
"MIT"
] | 40 | 2017-07-11T20:11:35.000Z | 2021-12-01T06:28:29.000Z | vhdl_interface.py | Remillard/VHDL-Mode | 35d2b6ad022b30bdd23e4e89779f9b8b0486fee2 | [
"MIT"
] | 120 | 2017-07-13T18:22:44.000Z | 2021-11-04T19:39:05.000Z | vhdl_interface.py | Remillard/VHDL-Mode | 35d2b6ad022b30bdd23e4e89779f9b8b0486fee2 | [
"MIT"
] | 12 | 2018-01-03T20:01:25.000Z | 2021-09-05T16:03:49.000Z | """
Port Copying Module -- Contains the editor commands related to
copying and pasting an interface declaration into various forms.
"""
import time
import re
import sublime
import sublime_plugin
from . import vhdl_lang as vhdl
from . import vhdl_util as util
_interface = vhdl.Interface()
#-------------... | 39.868794 | 100 | 0.606511 |
a73998f0e28e2aa66b20fb086da70dcd06a029b0 | 10,679 | py | Python | test/unit/controllers/request_api_test.py | hazmat345/brew-view | effd67819f7e995595471e0dc1c4e03a63942b96 | [
"MIT"
] | null | null | null | test/unit/controllers/request_api_test.py | hazmat345/brew-view | effd67819f7e995595471e0dc1c4e03a63942b96 | [
"MIT"
] | null | null | null | test/unit/controllers/request_api_test.py | hazmat345/brew-view | effd67819f7e995595471e0dc1c4e03a63942b96 | [
"MIT"
] | null | null | null | import copy
import datetime
import json
from mock import Mock
from bg_utils.models import Request, Job, RequestTemplate, DateTrigger
from . import TestHandlerBase
class RequestAPITest(TestHandlerBase):
def setUp(self):
self.request_mock = Mock()
self.ts_epoch = 1451606400000
self.ts_dt... | 34.785016 | 90 | 0.50192 |
a87addeb204daaad47dac5917d1a24ac6238fde1 | 5,765 | py | Python | fresh_tomatoes.py | gurugithub/movie-trailer-website | e997b031dd0691b9af9e7c3bff9f982f23419573 | [
"Unlicense"
] | null | null | null | fresh_tomatoes.py | gurugithub/movie-trailer-website | e997b031dd0691b9af9e7c3bff9f982f23419573 | [
"Unlicense"
] | null | null | null | fresh_tomatoes.py | gurugithub/movie-trailer-website | e997b031dd0691b9af9e7c3bff9f982f23419573 | [
"Unlicense"
] | null | null | null | # Modified Guru Shetti 3/25/2015 Included additional fields Storyline and Rating
import webbrowser
import os
import re
# Styles and scripting for the page
main_page_head = '''
<head>
<meta charset="utf-8">
<title>Gurus Flix!</title>
<!-- Bootstrap 3 -->
<link rel="stylesheet" href="https://netdna.boot... | 35.368098 | 144 | 0.590113 |
ac6fa392ca29d7042c7466c6f26610497be9999d | 13,084 | py | Python | main.py | zyzkevin/PKUAutoSubmit | ef81367c4d81bd32dd15038bd8808f8a895049bc | [
"Apache-2.0"
] | null | null | null | main.py | zyzkevin/PKUAutoSubmit | ef81367c4d81bd32dd15038bd8808f8a895049bc | [
"Apache-2.0"
] | null | null | null | main.py | zyzkevin/PKUAutoSubmit | ef81367c4d81bd32dd15038bd8808f8a895049bc | [
"Apache-2.0"
] | null | null | null | from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver import Firefox, Chrome
from seleni... | 31.83455 | 99 | 0.651559 |
68b17349f891b74ced3e53b628b2f8826118546b | 35,535 | py | Python | amulog/eval/maketpl.py | cpflat/amulog | b7a8c7478d2e5253158f0bce3a7f7109d23e40cb | [
"BSD-3-Clause"
] | 5 | 2019-07-03T09:57:30.000Z | 2021-02-13T13:15:47.000Z | amulog/eval/maketpl.py | cpflat/amulog | b7a8c7478d2e5253158f0bce3a7f7109d23e40cb | [
"BSD-3-Clause"
] | null | null | null | amulog/eval/maketpl.py | cpflat/amulog | b7a8c7478d2e5253158f0bce3a7f7109d23e40cb | [
"BSD-3-Clause"
] | 1 | 2021-09-09T02:21:42.000Z | 2021-09-09T02:21:42.000Z | #!/usr/bin/env python
# coding: utf-8
import logging
import json
import numpy as np
from collections import defaultdict
import amulog.manager
from amulog import common
from amulog import lt_common
from amulog.eval import cluster_metrics
from amulog.eval import structure_metrics
_logger = logging.getLogger(__package_... | 37.287513 | 85 | 0.618939 |
36c36975f2269001b719d29b43d9fcb82b4958e5 | 2,101 | py | Python | adjutant_moc/tests/unit/test_actions/test_users.py | CCI-MOC/adjutant-moc | 015de325dced135f56867c2ca8e07814cc950e36 | [
"Apache-2.0"
] | 1 | 2021-01-22T18:21:42.000Z | 2021-01-22T18:21:42.000Z | adjutant_moc/tests/unit/test_actions/test_users.py | CCI-MOC/adjutant-moc | 015de325dced135f56867c2ca8e07814cc950e36 | [
"Apache-2.0"
] | 14 | 2020-05-06T13:39:21.000Z | 2022-02-22T16:27:01.000Z | adjutant_moc/tests/unit/test_actions/test_users.py | CCI-MOC/adjutant-moc | 015de325dced135f56867c2ca8e07814cc950e36 | [
"Apache-2.0"
] | 3 | 2019-01-26T20:10:10.000Z | 2019-11-04T16:39:46.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 32.828125 | 74 | 0.646359 |
0d38fb3d24e96f5890b6ba7a75d695fda121be68 | 4,255 | py | Python | AskMe/settings.py | pratikroy/AskMe | 732f84e0d4f215a5232703a6e02ca19e430c27ab | [
"MIT"
] | null | null | null | AskMe/settings.py | pratikroy/AskMe | 732f84e0d4f215a5232703a6e02ca19e430c27ab | [
"MIT"
] | 18 | 2020-03-24T17:39:06.000Z | 2022-03-12T00:01:34.000Z | AskMe/settings.py | pratikroy/AskMe | 732f84e0d4f215a5232703a6e02ca19e430c27ab | [
"MIT"
] | null | null | null | """
Django settings for AskMe project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# B... | 24.176136 | 91 | 0.694712 |
62991c9dc19a2dbf6b032f60b2f0df11986b95b1 | 2,083 | py | Python | sim_xps_spectra/x_sections/unit_tests/utest_standard_objs.py | RFogarty1/sim_xps_spectra | 26933a8b00678494121507e66205cf4c02d9b357 | [
"MIT"
] | null | null | null | sim_xps_spectra/x_sections/unit_tests/utest_standard_objs.py | RFogarty1/sim_xps_spectra | 26933a8b00678494121507e66205cf4c02d9b357 | [
"MIT"
] | null | null | null | sim_xps_spectra/x_sections/unit_tests/utest_standard_objs.py | RFogarty1/sim_xps_spectra | 26933a8b00678494121507e66205cf4c02d9b357 | [
"MIT"
] | null | null | null |
import math
import types
import unittest
import sim_xps_spectra.x_sections.standard_objs as tCode
class TestStandardCrossSectionCalculator(unittest.TestCase):
def setUp(self):
self.testXSectionsA = [(10,20), (20,25), (30,35)]
self.testAsymA = [(10,2), (20,4), (30,6)]
self.xSectionPreFactor = 1
self.createT... | 35.913793 | 106 | 0.763802 |
44e1b6d1fe0e428c5bf30a1da05ef9ca7ec795fb | 429 | py | Python | stubs/micropython-v1_9_4-esp8266/neopixel.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_9_4-esp8266/neopixel.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_9_4-esp8266/neopixel.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | """
Module: 'neopixel' on esp8266 v1.9.4
"""
# MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v1.9.4-8-ga9a3caad0 on 2018-05-11', machine='ESP module with ESP8266')
# Stubber: 1.1.2 - updated
from typing import Any
class NeoPixel:
""""""
ORDER = None
def fill(self, *... | 18.652174 | 156 | 0.610723 |
880408d3288af013af40f39f347b0d59080b67c1 | 4,007 | py | Python | mla/tsne.py | Debanitrkl/MLAlgorithms | f53a267897e4d0babdcbae7c271c5042e07549ca | [
"MIT"
] | 2 | 2019-10-15T23:46:01.000Z | 2020-02-23T13:25:43.000Z | mla/tsne.py | Debanitrkl/MLAlgorithms | f53a267897e4d0babdcbae7c271c5042e07549ca | [
"MIT"
] | null | null | null | mla/tsne.py | Debanitrkl/MLAlgorithms | f53a267897e4d0babdcbae7c271c5042e07549ca | [
"MIT"
] | 1 | 2019-10-13T13:36:55.000Z | 2019-10-13T13:36:55.000Z | # coding:utf-8
import logging
import numpy as np
from six.moves import range
from mla.base import BaseEstimator
from mla.metrics.distance import l2_distance
np.random.seed(999)
"""
References:
https://lvdmaaten.github.io/tsne/
Based on:
https://lvdmaaten.github.io/tsne/code/tsne_python.zip
"""
class TSNE(BaseEsti... | 29.902985 | 117 | 0.562266 |
468861790832a21703ab770cadb8e5124575908f | 405 | py | Python | globals.py | PeganovAnton/transformer-xl | f36428445cc903872fde54d90bc5e61886420a5a | [
"Apache-2.0"
] | 133 | 2019-04-17T05:06:39.000Z | 2022-03-24T03:43:56.000Z | globals.py | PeganovAnton/transformer-xl | f36428445cc903872fde54d90bc5e61886420a5a | [
"Apache-2.0"
] | 21 | 2019-05-01T03:54:10.000Z | 2021-03-12T07:00:44.000Z | globals.py | PeganovAnton/transformer-xl | f36428445cc903872fde54d90bc5e61886420a5a | [
"Apache-2.0"
] | 18 | 2019-04-28T16:56:06.000Z | 2021-04-01T05:52:41.000Z | # global variables shared between train.py, eval.py, ..., carrying info for a single user invocation-process pair
event_writer = None
token_count = None
args = None
timeit_dict = None
logger = None
corpus = None
va_iter = None
te_iter = None
va_custom_iter = None
tie_projs = None
cutoffs = None
ntokens = None
device... | 21.315789 | 113 | 0.750617 |
b45adb5511baf2e8648c47bad716c05768969653 | 3,680 | py | Python | main.py | Starrky/SII_files | e6d14b3e2bbd74472a1ebbf31b45f245a06fc329 | [
"MIT"
] | null | null | null | main.py | Starrky/SII_files | e6d14b3e2bbd74472a1ebbf31b45f245a06fc329 | [
"MIT"
] | null | null | null | main.py | Starrky/SII_files | e6d14b3e2bbd74472a1ebbf31b45f245a06fc329 | [
"MIT"
] | null | null | null | import datetime
import os
import time
from os import listdir
from os.path import isfile, join
from time import time
import pymsteams
import smtplib
from email.message import EmailMessage
import pandas as pd
import Configs.Data as CD
# Emailing system
Notificator_card = CD.Notificator_card
EMAIL_USER = CD.EMAIL_USER
EM... | 30.413223 | 102 | 0.661957 |
a1bf16e255f31bae346b485adb0bac81fab5533b | 9,246 | py | Python | sdk/python/pulumi_aws_native/globalaccelerator/listener.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/globalaccelerator/listener.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/globalaccelerator/listener.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 42.608295 | 149 | 0.653364 |
c0a43018c6ae6bb7b102473adffa55428ce8bb1e | 2,989 | py | Python | tests/test_layouts_grid.py | datdinhquoc/flask_jsondash | 124f5739aebb39c4d36d27a57acb1a32df95a51d | [
"MIT"
] | 3,503 | 2016-08-25T19:57:33.000Z | 2022-03-31T20:04:37.000Z | tests/test_layouts_grid.py | wargrider/flask_jsondash | fd84c5498c933ea4175eca8357155826bdbcf14f | [
"MIT"
] | 203 | 2016-05-06T18:01:12.000Z | 2022-03-23T09:05:28.000Z | tests/test_layouts_grid.py | wargrider/flask_jsondash | fd84c5498c933ea4175eca8357155826bdbcf14f | [
"MIT"
] | 350 | 2016-08-30T10:29:57.000Z | 2022-02-02T17:59:41.000Z | import json
from conftest import setup_dashboard
def test_grid_mode_has_no_cols_empty_single_row(monkeypatch, ctx, client):
app, test = client
data = dict(
mode='grid',
name='Some dashboard',
)
dom = setup_dashboard(monkeypatch, app, test, data)
container = dom.find('#container')
... | 34.755814 | 75 | 0.583138 |
3492bf85eda2b4acf42989534fdba1ad1fc3735f | 1,024 | py | Python | src/vectorizer.py | deluxebrain/play-python-sentiment-analysis | d4aaa43e6bf6e6a18d86ed2ac505a0eaffb0f48f | [
"MIT"
] | null | null | null | src/vectorizer.py | deluxebrain/play-python-sentiment-analysis | d4aaa43e6bf6e6a18d86ed2ac505a0eaffb0f48f | [
"MIT"
] | null | null | null | src/vectorizer.py | deluxebrain/play-python-sentiment-analysis | d4aaa43e6bf6e6a18d86ed2ac505a0eaffb0f48f | [
"MIT"
] | null | null | null | from sklearn.feature_extraction.text import HashingVectorizer
from nltk.stem.porter import PorterStemmer
import re
import os
import pickle
work_path = os.path.join(os.path.expanduser('~'), 'tmp/datasets')
stop = pickle.load(open(
os.path.join(work_path,
'pkl_objects',
'stopwords.... | 28.444444 | 68 | 0.554688 |
ec7988d253dc0986f1e55a68adbddbd979001277 | 719 | py | Python | app/core/management/commands/wait_for_db.py | shubhamshinde321/recipe-app-api | 509184d5f3eefb7baf72153f3d3a854b76909d8d | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | shubhamshinde321/recipe-app-api | 509184d5f3eefb7baf72153f3d3a854b76909d8d | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | shubhamshinde321/recipe-app-api | 509184d5f3eefb7baf72153f3d3a854b76909d8d | [
"MIT"
] | null | null | null | import time
from django.db import connections
from django.db.utils import OperationalError
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""Django command to pause execution until db is available"""
def handle(self, *args, **options):
"""Handle the command"""
... | 29.958333 | 72 | 0.628651 |
d051605da543877e8720f94f3f069cb1651347ef | 11,972 | py | Python | bitcoind-monitor.py | juergenhoetzel/bitcoin-prometheus-exporter | c2ee79d3119fc3e130734fc866a78a4d189b2e08 | [
"BSD-3-Clause"
] | null | null | null | bitcoind-monitor.py | juergenhoetzel/bitcoin-prometheus-exporter | c2ee79d3119fc3e130734fc866a78a4d189b2e08 | [
"BSD-3-Clause"
] | null | null | null | bitcoind-monitor.py | juergenhoetzel/bitcoin-prometheus-exporter | c2ee79d3119fc3e130734fc866a78a4d189b2e08 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import logging
import time
import os
import signal
import sys
import socket
from datetime import datetime
from functools import lru_cache
from pathlib import Path
from typing import Any
from typing import Dict
from typing import List
from typing import Union
... | 35.525223 | 100 | 0.724607 |
90c802423ce490e2937114df9dab23fb2a4fbf19 | 1,290 | py | Python | homeassistant/components/websocket_api/__init__.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 3 | 2019-01-31T13:41:37.000Z | 2020-05-20T14:22:18.000Z | homeassistant/components/websocket_api/__init__.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:32:11.000Z | 2022-01-13T01:19:23.000Z | homeassistant/components/websocket_api/__init__.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 3 | 2018-08-29T19:26:20.000Z | 2020-01-19T11:58:22.000Z | """
Websocket based API for Home Assistant.
For more details about this component, please refer to the documentation at
https://developers.home-assistant.io/docs/external_api_websocket.html
"""
from homeassistant.core import callback
from homeassistant.loader import bind_hass
from . import commands, connection, const... | 30 | 75 | 0.784496 |
4fbe430a969ee14ec651dfae6ac84e3fa20bb2c8 | 448 | py | Python | cpdb/data/models/attachment_narrative.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 25 | 2018-07-20T22:31:40.000Z | 2021-07-15T16:58:41.000Z | cpdb/data/models/attachment_narrative.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 13 | 2018-06-18T23:08:47.000Z | 2022-02-10T07:38:25.000Z | cpdb/data/models/attachment_narrative.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 6 | 2018-05-17T21:59:43.000Z | 2020-11-17T00:30:26.000Z | from django.contrib.gis.db import models
from .common import TimeStampsModel
class AttachmentNarrative(TimeStampsModel):
attachment = models.ForeignKey(
'data.AttachmentFile', on_delete=models.CASCADE, related_name='attachment_narratives'
)
page_num = models.IntegerField()
section_name = mode... | 32 | 93 | 0.767857 |
f43df35c35793a42d247e44556a712199f1ea259 | 1,020 | py | Python | refcollections/admin_custom.py | uq-eresearch/archaeology-reference-collections | 532a8974e1e9f7c2b724e5c6d6b316d0fc93478b | [
"BSD-3-Clause"
] | null | null | null | refcollections/admin_custom.py | uq-eresearch/archaeology-reference-collections | 532a8974e1e9f7c2b724e5c6d6b316d0fc93478b | [
"BSD-3-Clause"
] | 2 | 2017-04-12T23:44:08.000Z | 2017-11-23T23:36:43.000Z | refcollections/admin_custom.py | uq-eresearch/archaeology-reference-collections | 532a8974e1e9f7c2b724e5c6d6b316d0fc93478b | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.admin.sites import AdminSite
from apps.shells.admin import SpeciesAdmin, SpecimenAdmin, SpeciesRepresentationAdmin
from apps.shells.models import Species, Specimen, SpeciesRepresentation
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.contrib ... | 30 | 85 | 0.819608 |
5244e8d1abf8c35d164ae30d9673aa7d030207bc | 140 | py | Python | backend/apps/cmdb/apps.py | codelieche/erp | 96861ff63a63a93918fbd5181ffb2646446d0eec | [
"MIT"
] | null | null | null | backend/apps/cmdb/apps.py | codelieche/erp | 96861ff63a63a93918fbd5181ffb2646446d0eec | [
"MIT"
] | 29 | 2020-06-05T19:57:11.000Z | 2022-02-26T13:42:36.000Z | backend/apps/cmdb/apps.py | codelieche/erp | 96861ff63a63a93918fbd5181ffb2646446d0eec | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CmdbConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'cmdb'
| 20 | 56 | 0.75 |
3be9a79826d1e60a340d4cc6ceb8c88e59e262e2 | 670 | py | Python | plenum/common/ledger_info.py | jandayanan/indy-plenum | 2815e994404c77ad87eddcfd09062d5fe6efc1c5 | [
"Apache-2.0"
] | 148 | 2017-07-11T19:05:25.000Z | 2022-03-16T21:31:20.000Z | plenum/common/ledger_info.py | jandayanan/indy-plenum | 2815e994404c77ad87eddcfd09062d5fe6efc1c5 | [
"Apache-2.0"
] | 561 | 2017-06-29T17:59:56.000Z | 2022-03-09T15:47:14.000Z | plenum/common/ledger_info.py | jandayanan/indy-plenum | 2815e994404c77ad87eddcfd09062d5fe6efc1c5 | [
"Apache-2.0"
] | 378 | 2017-06-29T17:45:27.000Z | 2022-03-26T07:27:59.000Z | from plenum.common.ledger import Ledger
class LedgerInfo:
def __init__(self,
id: int,
ledger: Ledger,
preCatchupStartClbk,
postCatchupCompleteClbk,
postTxnAddedToLedgerClbk,
verifier):
self.id = id
... | 27.916667 | 64 | 0.620896 |
06716d49f4e54a619394fd3d8b8dd12afcb40781 | 2,353 | py | Python | pants-plugins/structured/tasks/resolve_packages_task.py | cosmicexplorer/structured | ea452a37e265dd75d4160efa59a4a939bf8c0521 | [
"Apache-2.0"
] | null | null | null | pants-plugins/structured/tasks/resolve_packages_task.py | cosmicexplorer/structured | ea452a37e265dd75d4160efa59a4a939bf8c0521 | [
"Apache-2.0"
] | null | null | null | pants-plugins/structured/tasks/resolve_packages_task.py | cosmicexplorer/structured | ea452a37e265dd75d4160efa59a4a939bf8c0521 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.base.exceptions import TaskError
from pants.util.dirutil import safe_mkdir
from pants.util.memo import memoized_property
from structured.su... | 34.602941 | 93 | 0.702507 |
d323cd5fa662e1b9732221a3d97056877c751907 | 4,096 | py | Python | rest-service/manager_rest/test/infrastructure/base_list_test.py | Metaswitch/cloudify-manager | 760affb83facbe154c35c6ce20acb9432daa8bbd | [
"Apache-2.0"
] | null | null | null | rest-service/manager_rest/test/infrastructure/base_list_test.py | Metaswitch/cloudify-manager | 760affb83facbe154c35c6ce20acb9432daa8bbd | [
"Apache-2.0"
] | 1 | 2021-03-26T00:32:30.000Z | 2021-03-26T00:32:30.000Z | rest-service/manager_rest/test/infrastructure/base_list_test.py | vbohinc/cloudify-manager | 760affb83facbe154c35c6ce20acb9432daa8bbd | [
"Apache-2.0"
] | 1 | 2019-11-24T12:07:18.000Z | 2019-11-24T12:07:18.000Z | #########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. 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... | 44.043011 | 78 | 0.600098 |
9c138948112b76952f741b7be90124819eca9c52 | 2,130 | py | Python | segmentation_models_pytorch/utils/functions.py | vfdev-5/segmentation_models.pytorch | 07a0040df57be5ed3a923435aa2912c3fa2e5673 | [
"MIT"
] | 1 | 2019-05-08T02:21:21.000Z | 2019-05-08T02:21:21.000Z | segmentation_models_pytorch/utils/functions.py | vfdev-5/segmentation_models.pytorch | 07a0040df57be5ed3a923435aa2912c3fa2e5673 | [
"MIT"
] | null | null | null | segmentation_models_pytorch/utils/functions.py | vfdev-5/segmentation_models.pytorch | 07a0040df57be5ed3a923435aa2912c3fa2e5673 | [
"MIT"
] | 1 | 2022-01-01T12:01:02.000Z | 2022-01-01T12:01:02.000Z | import torch
def iou(pr, gt, eps=1e-7, threshold=None, activation='sigmoid'):
"""
Source:
https://github.com/catalyst-team/catalyst/
Args:
pr (torch.Tensor): A list of predicted elements
gt (torch.Tensor): A list of elements that are to be predicted
eps (float): epsilon to... | 28.026316 | 76 | 0.602347 |
91375483e35e00e3d3759dff0e26b9798c9b5b80 | 682 | py | Python | init_repo.py | Serfentum/xcms_finder | dff95fd9e4f9952a6ee365152005ff08b4132210 | [
"MIT"
] | null | null | null | init_repo.py | Serfentum/xcms_finder | dff95fd9e4f9952a6ee365152005ff08b4132210 | [
"MIT"
] | null | null | null | init_repo.py | Serfentum/xcms_finder | dff95fd9e4f9952a6ee365152005ff08b4132210 | [
"MIT"
] | null | null | null | from pathlib import Path
import git
def init_repo(repo_clone_url, path, version):
"""
Clone repo from url to specified path, dir with it will be named as version
:param repo_clone_url: str - url from gihub to clone
:param path: str - path, where dir with repo will be places
:param version: str - ... | 32.47619 | 103 | 0.708211 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.