hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
078020f71f5048ac586b39bd25bd14051179baa6 | 34,488 | py | Python | ctelib/v3_00/cteModalDutoviario.py | akretion/ctelib | 50f4ddee234d803155bd1b7a0a88e3680817ba3f | [
"MIT"
] | 4 | 2020-09-09T02:59:24.000Z | 2022-03-07T19:06:26.000Z | ctelib/v3_00/cteModalDutoviario.py | akretion/ctelib | 50f4ddee234d803155bd1b7a0a88e3680817ba3f | [
"MIT"
] | 2 | 2019-11-18T14:41:02.000Z | 2020-02-26T15:09:48.000Z | ctelib/v3_00/cteModalDutoviario.py | akretion/ctelib | 50f4ddee234d803155bd1b7a0a88e3680817ba3f | [
"MIT"
] | 3 | 2018-02-15T02:09:40.000Z | 2022-03-07T19:06:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Mon Oct 9 15:35:29 2017 by generateDS.py version 2.28b.
# Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
#
# Command line options:
# ('--no-process-includes', '')
# ('-o', 'ctelib/v3_00/cteModalDutoviario.py')
#
# Command line argum... | 37.004292 | 165 | 0.557759 |
fb8971d1a9b5a5517c702939724ab0eb9afe84b8 | 3,489 | py | Python | rocket_simulation.py | Nobregaigor/Rotary-Inverted-Pendulum-System | 97c8a8a502245f2affad46f1c427e83fa55721f4 | [
"MIT"
] | null | null | null | rocket_simulation.py | Nobregaigor/Rotary-Inverted-Pendulum-System | 97c8a8a502245f2affad46f1c427e83fa55721f4 | [
"MIT"
] | null | null | null | rocket_simulation.py | Nobregaigor/Rotary-Inverted-Pendulum-System | 97c8a8a502245f2affad46f1c427e83fa55721f4 | [
"MIT"
] | null | null | null | # Import standard modules.
import sys
# Import non-standard modules.
import pygame as pyg
from pygame.locals import *
import numpy as np
import numpy.linalg as la
import scipy.linalg as spla
import matplotlib.pyplot as plt
from pprint import pprint as pp
from classes.controls import controls
from classes.ctr_sys impor... | 28.598361 | 110 | 0.660648 |
86a084e6365e8ebc2fe8981685b4e429d3fb13f1 | 17,992 | py | Python | twisted/internet/unix.py | djmitche/Twisted | 0b404060400d35d23e7f2ba2963b3d47540d8f81 | [
"MIT",
"Unlicense"
] | null | null | null | twisted/internet/unix.py | djmitche/Twisted | 0b404060400d35d23e7f2ba2963b3d47540d8f81 | [
"MIT",
"Unlicense"
] | 1 | 2022-03-04T17:40:22.000Z | 2022-03-04T17:40:22.000Z | twisted/internet/unix.py | djmitche/Twisted | 0b404060400d35d23e7f2ba2963b3d47540d8f81 | [
"MIT",
"Unlicense"
] | null | null | null | # -*- test-case-name: twisted.test.test_unix,twisted.internet.test.test_unix,twisted.internet.test.test_posixbase -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Various asynchronous TCP/IP classes.
End users shouldn't use this module directly - use the reactor APIs instead.
Maintain... | 34.075758 | 117 | 0.60916 |
8254c9c3bb6b6f4e5b3bef9d8b6cdee74b4146d7 | 12,535 | py | Python | src/controllers/rode_controller.py | niuliyuan/RODE | 51850e2580dac38b6be8a275aac9eadd010d1e51 | [
"Apache-2.0"
] | null | null | null | src/controllers/rode_controller.py | niuliyuan/RODE | 51850e2580dac38b6be8a275aac9eadd010d1e51 | [
"Apache-2.0"
] | null | null | null | src/controllers/rode_controller.py | niuliyuan/RODE | 51850e2580dac38b6be8a275aac9eadd010d1e51 | [
"Apache-2.0"
] | null | null | null | from modules.agents import REGISTRY as agent_REGISTRY
from components.action_selectors import REGISTRY as action_REGISTRY
from modules.action_encoders import REGISTRY as action_encoder_REGISTRY
from modules.roles import REGISTRY as role_REGISTRY
from modules.role_selectors import REGISTRY as role_selector_REGISTRY
impo... | 48.397683 | 133 | 0.61803 |
b868a59e27e911c37de7f7f905c920248d02ed73 | 601 | py | Python | students/lindsay/hagman.py | sleepinghungry/wwtag | 8ffa886f28281e3acef2465953d26db85a81a045 | [
"MIT"
] | null | null | null | students/lindsay/hagman.py | sleepinghungry/wwtag | 8ffa886f28281e3acef2465953d26db85a81a045 | [
"MIT"
] | null | null | null | students/lindsay/hagman.py | sleepinghungry/wwtag | 8ffa886f28281e3acef2465953d26db85a81a045 | [
"MIT"
] | null | null | null | import getpass
ward = getpass.getpass("enter word")
right_guesses = []
wrong = 0
while True:
letter = input ("guess letter ")
if letter in ward:
print("yay you got it right")
right_guesses.append(letter)
print(right_guesses)
else:
print("nope ")
wrong += 1
... | 15.815789 | 39 | 0.527454 |
85af407df70d05991524412bcef61b8e7b19119a | 1,841 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/troubleshooting_details_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/troubleshooting_details_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/troubleshooting_details_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | null | null | null | # 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 ... | 40.021739 | 144 | 0.62792 |
1e77ce6b5aada6ad15d5be28656a48fb3f811779 | 2,009 | py | Python | simple_workflow/v1/crawl.py | katelyngray/orchestra | 31acdaec32ed7cdd8910f20ddd3cfec2ad8189a5 | [
"Apache-2.0"
] | 1 | 2021-04-26T23:22:03.000Z | 2021-04-26T23:22:03.000Z | simple_workflow/v1/crawl.py | katelyngray/orchestra | 31acdaec32ed7cdd8910f20ddd3cfec2ad8189a5 | [
"Apache-2.0"
] | null | null | null | simple_workflow/v1/crawl.py | katelyngray/orchestra | 31acdaec32ed7cdd8910f20ddd3cfec2ad8189a5 | [
"Apache-2.0"
] | null | null | null | import logging
import random
import re
from urllib.parse import urljoin
from urllib.parse import urlparse
import requests
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
IMAGE_FILE_REGEX = re.compile('([-\w]+\.(?:jpg|jpeg|gif|png))',
re.IGNORECASE)
def crawl_page(pr... | 27.148649 | 78 | 0.612245 |
d1719c349b2932200d14aefe1e5f22301e21f9b4 | 3,645 | py | Python | SECOND/Bat algorithm/test_all_functions.py | zdoryk/TSI | 22c9baf919ef85e1d1887a5978f81c0bff9651d6 | [
"MIT"
] | 1 | 2022-03-13T10:49:36.000Z | 2022-03-13T10:49:36.000Z | SECOND/Bat algorithm/test_all_functions.py | zdoryk/TSI | 22c9baf919ef85e1d1887a5978f81c0bff9651d6 | [
"MIT"
] | null | null | null | SECOND/Bat algorithm/test_all_functions.py | zdoryk/TSI | 22c9baf919ef85e1d1887a5978f81c0bff9651d6 | [
"MIT"
] | null | null | null | from Herd import Herd
from fitness_functions import sphere, f2, rosenbrock, griewank, rastrigin, ackley, brown, schwefel, easom, zakharov, \
schaffersf6, leeyao_2004
to_txt = ''
log_counter = 0
PRESETS = {
'Sphere': {
'accuracy': 0.0001,
'min_x': -100.0,
'max_x': 100.0,
'dimensi... | 28.700787 | 119 | 0.518519 |
4bfa797aa1eeadf260deee0d34bce7679f5358bb | 1,767 | py | Python | examples/sparrow/wsplugin.py | sics-iot/sparrow | 3ab386ccd80293928da7d5a98c2b7a9ef5fb96f9 | [
"BSD-3-Clause"
] | 26 | 2016-07-15T06:18:27.000Z | 2021-12-15T19:54:49.000Z | examples/sparrow/wsplugin.py | sics-iot/sparrow | 3ab386ccd80293928da7d5a98c2b7a9ef5fb96f9 | [
"BSD-3-Clause"
] | 34 | 2016-08-16T09:55:55.000Z | 2018-02-19T09:53:47.000Z | examples/sparrow/wsplugin.py | sics-iot/sparrow | 3ab386ccd80293928da7d5a98c2b7a9ef5fb96f9 | [
"BSD-3-Clause"
] | 16 | 2016-08-21T06:38:29.000Z | 2021-11-28T22:02:44.000Z | #
# Copyright (c) 2015-2016, Yanzi Networks AB.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of co... | 46.5 | 77 | 0.758347 |
121c3aa179ae18ed804d9b0bb9141a1d397ad1bb | 8,035 | py | Python | scraper/ssb_public_schedule.py | Pandawan/OpenCourseAPI | 4d849ff16182f564308994b440d081b8eb2d200b | [
"MIT"
] | 1 | 2021-07-24T20:30:43.000Z | 2021-07-24T20:30:43.000Z | scraper/ssb_public_schedule.py | Pandawan/OpenCourseAPI | 4d849ff16182f564308994b440d081b8eb2d200b | [
"MIT"
] | null | null | null | scraper/ssb_public_schedule.py | Pandawan/OpenCourseAPI | 4d849ff16182f564308994b440d081b8eb2d200b | [
"MIT"
] | null | null | null | from collections import defaultdict
from datetime import datetime
from bs4 import BeautifulSoup
from .ssb_base import BaseSSBScraper, SOUP_PARSER
# CACHE_DIR = join(DB_DIR, '.cache', 'scrape_schedule')
# CACHE_DIR = join(DB_DIR, '.cache', 'scrape_schedule', 'western_colorada')
# CACHE_DIR = join(DB_DIR, '.cache', 's... | 35.396476 | 89 | 0.427629 |
6951d6dad59e7845035580892802f3a53b682755 | 6,933 | py | Python | src/ggrc/converters/handlers/snapshot_instance_column_handler.py | pbedn/ggrc-core | 12ae4720a430730835f1d02def62c0f6ef453521 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-08-26T06:56:01.000Z | 2021-07-08T13:56:20.000Z | src/ggrc/converters/handlers/snapshot_instance_column_handler.py | pbedn/ggrc-core | 12ae4720a430730835f1d02def62c0f6ef453521 | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2021-02-02T23:04:30.000Z | 2022-03-02T09:54:47.000Z | src/ggrc/converters/handlers/snapshot_instance_column_handler.py | pbedn/ggrc-core | 12ae4720a430730835f1d02def62c0f6ef453521 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2016-08-23T10:51:19.000Z | 2016-08-23T10:51:19.000Z | # Copyright (C) 2019 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Handler for imports and exports snapshoted instances."""
import sqlalchemy
from sqlalchemy.orm import load_only
from cached_property import cached_property
from ggrc import db
from ggrc import models
fro... | 36.68254 | 78 | 0.676475 |
bfa588d3805c9af1edf3ec405cc1264e78cf64fa | 706 | py | Python | docs/markdown_parser.py | EltonCN/evolvepy | 4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc | [
"MIT"
] | 1 | 2022-01-13T21:11:53.000Z | 2022-01-13T21:11:53.000Z | docs/markdown_parser.py | EltonCN/evolvepy | 4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc | [
"MIT"
] | null | null | null | docs/markdown_parser.py | EltonCN/evolvepy | 4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc | [
"MIT"
] | null | null | null | from typing import List
FILES_PATHS = ["../README.md", "../examples/Examples.md"]
replaces = {"](/examples": "](https://github.com/EltonCN/evolvepy/blob/main/examples",
"](/Thumbnail.png":"](https://raw.githubusercontent.com/EltonCN/evolvepy/main/Thumbnail.png"}
def parse_files():
for path in FILES_... | 24.344828 | 105 | 0.576487 |
e99a9e85b3fda3589cf2fc0db55ddd63f0d54e72 | 2,648 | py | Python | deconvolution/utils/metrics.py | JustinLin610/DeconvDec | e3835e140ab52d86d1045f2fd5a685cac123d0cc | [
"MIT"
] | 26 | 2018-06-10T15:31:55.000Z | 2021-02-26T18:00:55.000Z | deconvolution/utils/metrics.py | JustinLin610/DeconvDec | e3835e140ab52d86d1045f2fd5a685cac123d0cc | [
"MIT"
] | 1 | 2019-10-24T07:44:45.000Z | 2019-10-26T10:03:05.000Z | deconvolution/utils/metrics.py | JustinLin610/DeconvDec | e3835e140ab52d86d1045f2fd5a685cac123d0cc | [
"MIT"
] | 2 | 2019-03-12T20:58:04.000Z | 2021-11-01T13:31:23.000Z | import pyrouge
import codecs
import os
import logging
def bleu(reference, candidate, log_path, print_log, config):
ref_file = log_path+'reference.txt'
cand_file = log_path+'candidate.txt'
with codecs.open(ref_file, 'w', 'utf-8') as f:
for s in reference:
if not config.char:
... | 36.273973 | 87 | 0.578927 |
34d1728c330d250aa06ebb43c48a2a1dd9d4ecb1 | 18,893 | py | Python | pydy_code_gen/code.py | pydy/pydy-code-gen | f133130c3515aa8c817af58b6b7aaf7d831cd650 | [
"Unlicense"
] | 1 | 2020-03-25T21:38:16.000Z | 2020-03-25T21:38:16.000Z | pydy_code_gen/code.py | pydy/pydy-code-gen | f133130c3515aa8c817af58b6b7aaf7d831cd650 | [
"Unlicense"
] | 1 | 2015-09-22T17:36:19.000Z | 2015-09-23T15:41:38.000Z | pydy_code_gen/code.py | pydy/pydy-code-gen | f133130c3515aa8c817af58b6b7aaf7d831cd650 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# standard library
import os
import subprocess
import importlib
import random
from itertools import chain
# external libraries
import numpy as np
from sympy import lambdify, numbered_symbols, cse, symbols
from sympy.printing.ccode import CCodePrinter
try:
from sympy.printing.theanocode impor... | 39.85865 | 156 | 0.593712 |
1cb9e3bcce995e91973d4fb7f4539ba1e1bb6637 | 2,325 | py | Python | src/todo/main.py | pn11/python-command-line-sample | 001b5d961f9bd2556cf0c4af5c6f7c62c3d7e55e | [
"MIT"
] | null | null | null | src/todo/main.py | pn11/python-command-line-sample | 001b5d961f9bd2556cf0c4af5c6f7c62c3d7e55e | [
"MIT"
] | null | null | null | src/todo/main.py | pn11/python-command-line-sample | 001b5d961f9bd2556cf0c4af5c6f7c62c3d7e55e | [
"MIT"
] | null | null | null | """Primary application entrypoint.
"""
import argparse
import json
import os
import pathlib
import sys
def _load_todos():
fname = str(pathlib.Path.home())+'/.todo.json'
if not os.path.exists(fname):
return {}
else:
with open(fname) as f:
return json.load(f)
def _write_todos(t... | 27.034884 | 97 | 0.609462 |
a4a07c3b7cd4ffd8d9efc0bbfdefbc604a85968e | 1,063 | py | Python | pools/items.py | Xs2296/pools | 984d48c5e72ce2c67f117b63b8dd8f5ea6c25617 | [
"Apache-2.0"
] | 1 | 2019-06-05T07:25:21.000Z | 2019-06-05T07:25:21.000Z | pools/items.py | Xs2296/pools | 984d48c5e72ce2c67f117b63b8dd8f5ea6c25617 | [
"Apache-2.0"
] | null | null | null | pools/items.py | Xs2296/pools | 984d48c5e72ce2c67f117b63b8dd8f5ea6c25617 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
from peewee import *
import config
db = MySQLDatabase(config.DB_NAME, host=config.DB_HOST, port=config.DB_PORT, user=config.DB_USER, passwd=config.DB_PW... | 26.575 | 134 | 0.697084 |
b015b769e2046cefb820eae34abe908878d82c09 | 3,782 | py | Python | election_data_collection.py | anuragrana/2019-Indian-general-election | 99df8bc4ff86c064bb26de6021fc0c1dabebfbe0 | [
"MIT"
] | 2 | 2019-05-26T16:30:15.000Z | 2020-02-09T03:14:13.000Z | election_data_collection.py | anuragrana/2019-Indian-general-election | 99df8bc4ff86c064bb26de6021fc0c1dabebfbe0 | [
"MIT"
] | 3 | 2019-05-26T10:21:19.000Z | 2021-03-31T19:02:50.000Z | election_data_collection.py | anuragrana/2019-Indian-general-election | 99df8bc4ff86c064bb26de6021fc0c1dabebfbe0 | [
"MIT"
] | 3 | 2019-07-23T07:08:38.000Z | 2019-09-24T09:51:11.000Z | """
Author: Anurag Rana
Site: https://www.pythoncircle.com
"""
import requests
from bs4 import BeautifulSoup
import json
from lxml import html
import time
NOT_FOUND = 404
states = ["U0" + str(u) for u in range(1, 8)] + ["S0" + str(s) if s < 10 else "S" + str(s) for s in range(1, 30)]
# base_url = "http://results.eci... | 40.234043 | 113 | 0.563723 |
762453fcabd37a6f44e732c63ee57374d797c83c | 6,581 | py | Python | assignments/assignment1/linear_classifer.py | caisilus/dlcourse_ai | 57ddab4a7e028cc6eaaf96ba7639269ad6132d06 | [
"MIT"
] | null | null | null | assignments/assignment1/linear_classifer.py | caisilus/dlcourse_ai | 57ddab4a7e028cc6eaaf96ba7639269ad6132d06 | [
"MIT"
] | null | null | null | assignments/assignment1/linear_classifer.py | caisilus/dlcourse_ai | 57ddab4a7e028cc6eaaf96ba7639269ad6132d06 | [
"MIT"
] | null | null | null | import numpy as np
import math
def softmax(predictions):
'''
Computes probabilities from scores
Arguments:
predictions, np array, shape is either (N) or (batch_size, N) -
classifier output
Returns:
probs, np array of the same shape as predictions -
probability for every c... | 28.991189 | 93 | 0.610697 |
0383411ea75a524f986da9253a203ea318aa3dee | 2,323 | py | Python | src/neophile/repository.py | lsst-sqre/neophile | 0923bd5b58851af13c09f73a05b1a2882434b437 | [
"MIT"
] | null | null | null | src/neophile/repository.py | lsst-sqre/neophile | 0923bd5b58851af13c09f73a05b1a2882434b437 | [
"MIT"
] | 23 | 2020-07-17T23:27:44.000Z | 2022-03-21T19:39:19.000Z | src/neophile/repository.py | lsst-sqre/neophile | 0923bd5b58851af13c09f73a05b1a2882434b437 | [
"MIT"
] | null | null | null | """Wrapper around a Git repository."""
from __future__ import annotations
from typing import TYPE_CHECKING
from git import Repo
if TYPE_CHECKING:
from pathlib import Path
__all__ = ["Repository"]
class Repository:
"""Wrapper around a Git repository to add some convenience functions.
Parameters
-... | 28.329268 | 76 | 0.597503 |
7330cd480d432c9a4773a033b6b4df2d70dd4675 | 14,542 | py | Python | backend/light_head_rcnn/lib/utils/tf_utils/basemodel/resnet_v1.py | zju-3dv/multi-person3dpose | 38b958f423f2de2bf7562f5a386c27440eab8c53 | [
"Apache-2.0"
] | 391 | 2019-04-01T04:57:36.000Z | 2022-03-25T08:08:57.000Z | backend/light_head_rcnn/lib/utils/tf_utils/basemodel/resnet_v1.py | christw16/mvpose | f1bf69d650c7d337e73e0bd63b4472737e49ecba | [
"Apache-2.0"
] | 79 | 2019-04-04T15:39:45.000Z | 2022-03-31T11:32:57.000Z | backend/light_head_rcnn/lib/utils/tf_utils/basemodel/resnet_v1.py | christw16/mvpose | f1bf69d650c7d337e73e0bd63b4472737e49ecba | [
"Apache-2.0"
] | 84 | 2019-03-29T08:39:59.000Z | 2022-03-17T05:47:30.000Z | # Copyright 2016 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... | 42.028902 | 80 | 0.672603 |
f2eef03ccec483e364614ed591002bebb2be35f8 | 6,312 | py | Python | msgraph/cli/command_modules/sites/azext_sites/vendored_sdks/sites/operations/_sitesonenotenotebookssectiongroupssectionspagesparentnotebook_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | msgraph/cli/command_modules/sites/azext_sites/vendored_sdks/sites/operations/_sitesonenotenotebookssectiongroupssectionspagesparentnotebook_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | 22 | 2022-03-29T22:54:37.000Z | 2022-03-29T22:55:27.000Z | msgraph/cli/command_modules/sites/azext_sites/vendored_sdks/sites/operations/_sitesonenotenotebookssectiongroupssectionspagesparentnotebook_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | # 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 ... | 50.903226 | 254 | 0.706274 |
ccc39db0ec1736eafb2c784c0ab485060aed8174 | 458 | py | Python | examples/computer_vision/mmdetection_pytorch/configs/regnet/retinanet_regnetx-1.6GF_fpn_1x_coco.py | RAbraham/determined | 1161b667ed6d0242f70f9f15d58600f910c8d7f9 | [
"Apache-2.0"
] | 1 | 2021-03-29T13:39:45.000Z | 2021-03-29T13:39:45.000Z | examples/computer_vision/mmdetection_pytorch/configs/regnet/retinanet_regnetx-1.6GF_fpn_1x_coco.py | RAbraham/determined | 1161b667ed6d0242f70f9f15d58600f910c8d7f9 | [
"Apache-2.0"
] | null | null | null | examples/computer_vision/mmdetection_pytorch/configs/regnet/retinanet_regnetx-1.6GF_fpn_1x_coco.py | RAbraham/determined | 1161b667ed6d0242f70f9f15d58600f910c8d7f9 | [
"Apache-2.0"
] | null | null | null | _base_ = "./retinanet_regnetx-3.2GF_fpn_1x_coco.py"
model = dict(
pretrained="open-mmlab://regnetx_1.6gf",
backbone=dict(
type="RegNet",
arch="regnetx_1.6gf",
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type="BN", requires_grad=True),
norm_eval=True,
... | 26.941176 | 81 | 0.587336 |
2748baca0c971b64cee9414772814f671158a32c | 384 | py | Python | python/examples/cross_silo/mqtt_s3_fedavg_mnist_lr_example/step_by_step/torch_server.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | python/examples/cross_silo/mqtt_s3_fedavg_mnist_lr_example/step_by_step/torch_server.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | python/examples/cross_silo/mqtt_s3_fedavg_mnist_lr_example/step_by_step/torch_server.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | import fedml
from fedml.cross_silo import Server
if __name__ == "__main__":
args = fedml.init()
# init device
device = fedml.device.get_device(args)
# load data
dataset, output_dim = fedml.data.load(args)
# load model
model = fedml.model.create(args, output_dim)
# start training
... | 20.210526 | 49 | 0.666667 |
7f718096535da5d8e49c2b3d12fee234e2c1aeb7 | 966 | py | Python | stormpath/resources/tenant.py | denibertovic/stormpath-sdk-python | e594a1bb48de3fa8eff26558bf4f72bb056e9d00 | [
"Apache-2.0"
] | null | null | null | stormpath/resources/tenant.py | denibertovic/stormpath-sdk-python | e594a1bb48de3fa8eff26558bf4f72bb056e9d00 | [
"Apache-2.0"
] | null | null | null | stormpath/resources/tenant.py | denibertovic/stormpath-sdk-python | e594a1bb48de3fa8eff26558bf4f72bb056e9d00 | [
"Apache-2.0"
] | null | null | null | """Stormpath Tenant resource mappings."""
from .base import (
DeleteMixin,
DictMixin,
Resource,
SaveMixin,
AutoSaveMixin,
)
class Tenant(Resource, DeleteMixin, DictMixin, AutoSaveMixin, SaveMixin):
"""Stormpath Tenant resource.
More info in documentation:
http://docs.stormpath.com/p... | 23.560976 | 73 | 0.621118 |
79a98bef92c02a7ba1458038d0c204ae66c42004 | 1,237 | py | Python | script.module.resolveurl/lib/resolveurl/plugins/chromecast.py | Reapercrew666/crypt | e1e0994f5323c6b454ac0f65fb2e579f7bea8e5a | [
"Beerware"
] | 1 | 2019-10-16T18:38:33.000Z | 2019-10-16T18:38:33.000Z | script.module.resolveurl/lib/resolveurl/plugins/chromecast.py | Reapercrew666/crypt | e1e0994f5323c6b454ac0f65fb2e579f7bea8e5a | [
"Beerware"
] | null | null | null | script.module.resolveurl/lib/resolveurl/plugins/chromecast.py | Reapercrew666/crypt | e1e0994f5323c6b454ac0f65fb2e579f7bea8e5a | [
"Beerware"
] | null | null | null | """
chromecast ResolveUrl plugin
Copyright (C) 2019 gujal
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 version.
This program is dist... | 38.65625 | 123 | 0.736459 |
71150131ca218f1e57efc110c530c1dfc7174ef1 | 360 | py | Python | LeakDetection/divcalculations.py | jonev/wago-demo-plc-python | 987a44274742f971cae215a6655e8619e442f650 | [
"MIT"
] | 2 | 2021-01-13T11:01:55.000Z | 2022-01-04T21:37:15.000Z | LeakDetection/divcalculations.py | jonev/wago-demo-plc-python | 987a44274742f971cae215a6655e8619e442f650 | [
"MIT"
] | null | null | null | LeakDetection/divcalculations.py | jonev/wago-demo-plc-python | 987a44274742f971cae215a6655e8619e442f650 | [
"MIT"
] | 1 | 2021-01-13T11:01:29.000Z | 2021-01-13T11:01:29.000Z | class DivCalculations:
def __init__(self):
pass
@staticmethod
def avgValue(samples, value_column_nr):
if len(samples) < 1:
return 0
sample_sum = 0
for sample in samples:
sample_sum = sample_sum + sample[value_column_nr]
avg_value = sample_sum ... | 25.714286 | 61 | 0.605556 |
c2266a2b064430904a0740f76c16f8b774f4c259 | 1,011 | py | Python | openstack/load_balancer/version.py | nicolasochem/openstacksdk | 34ea72ce5b0b7f16a038ca57b2a9f1ec2f90ce00 | [
"Apache-2.0"
] | null | null | null | openstack/load_balancer/version.py | nicolasochem/openstacksdk | 34ea72ce5b0b7f16a038ca57b2a9f1ec2f90ce00 | [
"Apache-2.0"
] | null | null | null | openstack/load_balancer/version.py | nicolasochem/openstacksdk | 34ea72ce5b0b7f16a038ca57b2a9f1ec2f90ce00 | [
"Apache-2.0"
] | 1 | 2021-03-12T14:28:28.000Z | 2021-03-12T14:28:28.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 unde... | 32.612903 | 75 | 0.74184 |
d050f2cbd8f87a4ef58774007cf82fb62bb6e58e | 186 | py | Python | app/balltracking/pubnubpython/crypto_core.py | gdmgent-1718-wot/interactive-wall | af7ecff126b1ee9c85c270fe13d1338aa790c34b | [
"Apache-2.0"
] | 146 | 2015-01-05T03:14:53.000Z | 2022-03-16T16:51:52.000Z | app/balltracking/pubnubpython/crypto_core.py | gdmgent-1718-wot/interactive-wall | af7ecff126b1ee9c85c270fe13d1338aa790c34b | [
"Apache-2.0"
] | 48 | 2015-01-15T15:27:41.000Z | 2022-03-21T14:17:05.000Z | app/balltracking/pubnubpython/crypto_core.py | gdmgent-1718-wot/interactive-wall | af7ecff126b1ee9c85c270fe13d1338aa790c34b | [
"Apache-2.0"
] | 128 | 2015-01-05T03:40:59.000Z | 2022-03-02T20:50:58.000Z | from abc import abstractmethod
class PubNubCrypto:
@abstractmethod
def encrypt(self, key, msg):
pass
@abstractmethod
def decrypt(self, key, msg):
pass
| 15.5 | 32 | 0.645161 |
2b4b98018a02f1519404c1500716e3e722d39860 | 7,015 | py | Python | Parser.py | martincmartin/MathematiciansAssistant | 173cb0b1c96aaf7013480bda571960f9cd21e9ef | [
"Apache-2.0"
] | 1 | 2022-02-11T05:41:35.000Z | 2022-02-11T05:41:35.000Z | Parser.py | martincmartin/MathematiciansAssistant | 173cb0b1c96aaf7013480bda571960f9cd21e9ef | [
"Apache-2.0"
] | null | null | null | Parser.py | martincmartin/MathematiciansAssistant | 173cb0b1c96aaf7013480bda571960f9cd21e9ef | [
"Apache-2.0"
] | null | null | null | from Expression import *
from tokenize import *
from typing import *
import io
import token
# Look! A yak! I think I'll shave it...
class Parser:
type: Union[int, str]
token: TokenInfo
tokens: List[TokenInfo]
keywords = {"in", "and", "or", "not", "==>", "<==>", "forall", "exists"}
class_map ... | 32.476852 | 80 | 0.509052 |
aafd1609cfe85cd2619659e2416b4748e3c1f33b | 3,160 | py | Python | qa/rpc-tests/auxpow.py | seanPhill/dingocoin | 228c520567461fa39273a182cd91b1aa2861b43c | [
"MIT"
] | 8 | 2021-04-09T18:40:03.000Z | 2022-03-28T17:15:41.000Z | qa/rpc-tests/auxpow.py | seanPhill/dingocoin | 228c520567461fa39273a182cd91b1aa2861b43c | [
"MIT"
] | 3 | 2021-04-14T11:17:12.000Z | 2021-09-15T01:25:14.000Z | qa/rpc-tests/auxpow.py | seanPhill/dingocoin | 228c520567461fa39273a182cd91b1aa2861b43c | [
"MIT"
] | 8 | 2021-04-09T05:24:43.000Z | 2022-03-27T21:54:02.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Dingocoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test AuxPOW RPC interface and constraints
#
from test_framework.test_framework import BitcoinTestF... | 35.505618 | 87 | 0.646519 |
e6d195e9ff517cddcbaa26113d70686903facc3c | 743 | py | Python | caravaggio_rest_api/users/views.py | brunohenriquy/django-caravaggio-rest-api | 25abe3666dae63e88b8f2cec9b4c8deac980207f | [
"MIT"
] | 1 | 2019-10-30T20:14:37.000Z | 2019-10-30T20:14:37.000Z | caravaggio_rest_api/users/views.py | joaomedeiros95/django-caravaggio-rest-api | cb2647c55597623174992b555c949f4d08503115 | [
"MIT"
] | null | null | null | caravaggio_rest_api/users/views.py | joaomedeiros95/django-caravaggio-rest-api | cb2647c55597623174992b555c949f4d08503115 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*
# Copyright (c) 2019 BuildGroup Data Services Inc.
# All rights reserved.
from django.contrib.auth.models import User
from rest_framework.permissions import IsAdminUser
# from rest_framework.authentication import \
# TokenAuthentication, SessionAuthentication
# from rest_framework.permission... | 27.518519 | 72 | 0.792732 |
c4547e5f573273b5c900ae232f72fb5272e8237f | 643 | py | Python | SocialRobotCustom/setup.py | jesbu1/h-baselines | f6f775bb18de22527f2d01d73bd733ed2e435ba3 | [
"MIT"
] | null | null | null | SocialRobotCustom/setup.py | jesbu1/h-baselines | f6f775bb18de22527f2d01d73bd733ed2e435ba3 | [
"MIT"
] | null | null | null | SocialRobotCustom/setup.py | jesbu1/h-baselines | f6f775bb18de22527f2d01d73bd733ed2e435ba3 | [
"MIT"
] | null | null | null | # Copyright (c) 2019 Horizon Robotics. All Rights Reserved.
from setuptools import setup, find_packages
import os
import shutil
import glob
for f in glob.glob("build/pygazebo/pygazebo*.so"):
shutil.copy2(f, "python/social_bot")
setup(
name='social_bot',
version='0.0.1',
install_requires=[
'gi... | 27.956522 | 79 | 0.625194 |
11485e14410bce418365976108a31482c2dd816a | 1,028 | py | Python | backend/tests/test_webservice/test_query_issuer.py | geometalab/highfog-ch-service | 951475376eb11e1f987ac27b3a25f7c5b9a3ac03 | [
"MIT"
] | null | null | null | backend/tests/test_webservice/test_query_issuer.py | geometalab/highfog-ch-service | 951475376eb11e1f987ac27b3a25f7c5b9a3ac03 | [
"MIT"
] | 2 | 2020-10-09T07:26:59.000Z | 2020-10-29T10:19:43.000Z | backend/tests/test_webservice/test_query_issuer.py | geometalab/highfog-ch-service | 951475376eb11e1f987ac27b3a25f7c5b9a3ac03 | [
"MIT"
] | 1 | 2020-10-09T11:04:02.000Z | 2020-10-09T11:04:02.000Z | '''
Created: 08.04.2015
@author: Dennis Ligtenberg
'''
from tests.testbase import DatabaseTestCase
from webservice.query_issuer import get_heights, get_max_forecasted_height_by_time
from webservice.update_fog_height import UpdateFogHeightForecast
from datetime import datetime
class TestQueryIssuer(DatabaseTestCase):
... | 33.16129 | 82 | 0.719844 |
8f36a58972380dd659ea4d5116cb344f1879677e | 6,018 | py | Python | mosdef_cassandra/tests/test_utils.py | rsdefever/mosdef_cassandra | ceb8cbd3e402e2a1af9a6327c93c2f3097d6b108 | [
"MIT"
] | null | null | null | mosdef_cassandra/tests/test_utils.py | rsdefever/mosdef_cassandra | ceb8cbd3e402e2a1af9a6327c93c2f3097d6b108 | [
"MIT"
] | null | null | null | mosdef_cassandra/tests/test_utils.py | rsdefever/mosdef_cassandra | ceb8cbd3e402e2a1af9a6327c93c2f3097d6b108 | [
"MIT"
] | 1 | 2020-03-29T21:07:44.000Z | 2020-03-29T21:07:44.000Z | import pytest
import numpy as np
import unyt as u
from mosdef_cassandra.tests.base_test import BaseTest
from mosdef_cassandra.utils.convert_box import convert_to_boxmatrix
from mosdef_cassandra.utils.units import validate_unit, validate_unit_list
from unyt import dimensions
from unyt.exceptions import IterableUnitCoer... | 38.33121 | 76 | 0.560319 |
c9b950ad177d8596b365e70d7236ec4c36493329 | 456 | py | Python | Medical-Record-Managment-System/notifications/migrations/0006_auto_20200720_1944.py | AtluriNikhil/College_Projects | 23fa5d05e3c93691faa618a22fca858ba030ee5d | [
"Apache-2.0"
] | null | null | null | Medical-Record-Managment-System/notifications/migrations/0006_auto_20200720_1944.py | AtluriNikhil/College_Projects | 23fa5d05e3c93691faa618a22fca858ba030ee5d | [
"Apache-2.0"
] | null | null | null | Medical-Record-Managment-System/notifications/migrations/0006_auto_20200720_1944.py | AtluriNikhil/College_Projects | 23fa5d05e3c93691faa618a22fca858ba030ee5d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-20 14:14
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('notifications', '0005_auto_20200720_1943'),
]
operations = [
migrations.AlterField(
model_name='post',
... | 22.8 | 95 | 0.622807 |
9ed42c8426e60ea689e0d66eefb080c9757bd3f8 | 1,394 | py | Python | Regression_Evaluation/R19_MLPRegressor.py | mahnooranjum/Regression_MachineLearning | 37c2bc7ef7815997cfa59816effd22f58cfd8f13 | [
"MIT"
] | null | null | null | Regression_Evaluation/R19_MLPRegressor.py | mahnooranjum/Regression_MachineLearning | 37c2bc7ef7815997cfa59816effd22f58cfd8f13 | [
"MIT"
] | null | null | null | Regression_Evaluation/R19_MLPRegressor.py | mahnooranjum/Regression_MachineLearning | 37c2bc7ef7815997cfa59816effd22f58cfd8f13 | [
"MIT"
] | null | null | null | ##############################################################################
#
# Mahnoor Anjum
# manomaq@gmail.com
#
# References:
# Official Documentation
#
##############################################################################
# Importing the libraries
import numpy as np
import matplotlib... | 30.304348 | 101 | 0.624821 |
c841c567f48c42f0d6a9d59a71b047f36aa457f8 | 5,401 | py | Python | test/functional/receivedby.py | ingenierobinario/IngenieroBinarioCoin | 636381185fc31a4d0eeeec8d40b44b931c27aac2 | [
"MIT"
] | 63 | 2017-07-25T21:57:21.000Z | 2022-02-05T02:58:03.000Z | test/functional/receivedby.py | ingenierobinario/IngenieroBinarioCoin | 636381185fc31a4d0eeeec8d40b44b931c27aac2 | [
"MIT"
] | 105 | 2017-09-04T00:52:17.000Z | 2021-05-22T13:58:37.000Z | test/functional/receivedby.py | ingenierobinario/IngenieroBinarioCoin | 636381185fc31a4d0eeeec8d40b44b931c27aac2 | [
"MIT"
] | 102 | 2017-11-04T22:27:46.000Z | 2022-03-04T10:57:28.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 listreceivedbyaddress RPC."""
from decimal import Decimal
from test_framework.test_framework ... | 43.208 | 142 | 0.635993 |
13f10dd5b314aaf8ef4b378884918a3013c4cfd9 | 28,907 | py | Python | rmgweb/main/templatetags/render_kinetics.py | yunsiechung/RMG-website | d05750e1868e31dfa0a69faea074776afe223481 | [
"MIT"
] | null | null | null | rmgweb/main/templatetags/render_kinetics.py | yunsiechung/RMG-website | d05750e1868e31dfa0a69faea074776afe223481 | [
"MIT"
] | null | null | null | rmgweb/main/templatetags/render_kinetics.py | yunsiechung/RMG-website | d05750e1868e31dfa0a69faea074776afe223481 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# #
# RMG Website - A Django-powered website for Reaction Mechanism Generator #
# ... | 43.864947 | 247 | 0.559484 |
0e3b66f8b02c976d9c16475dd5efabe4ee53378b | 12,944 | py | Python | pybind/slxos/v17s_1_02/interface/homerun/switchport/trunk/allowed/rspan_vlan/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v17s_1_02/interface/homerun/switchport/trunk/allowed/rspan_vlan/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v17s_1_02/interface/homerun/switchport/trunk/allowed/rspan_vlan/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 77.047619 | 874 | 0.66525 |
47ef743f198e132d3db8a3aa1f62ac237bfcb61c | 5,437 | py | Python | deepfigures/extraction/figure_utils.py | amevada9/DeepFigures-Modificatons | 16987c49db1a54074ffede561231cce3cf83c645 | [
"Apache-2.0"
] | 1 | 2020-06-26T23:09:31.000Z | 2020-06-26T23:09:31.000Z | deepfigures/extraction/figure_utils.py | amevada9/DeepFigures-Modificatons | 16987c49db1a54074ffede561231cce3cf83c645 | [
"Apache-2.0"
] | null | null | null | deepfigures/extraction/figure_utils.py | amevada9/DeepFigures-Modificatons | 16987c49db1a54074ffede561231cce3cf83c645 | [
"Apache-2.0"
] | null | null | null | import collections
import os
import subprocess
from typing import Callable, Dict, Iterable, List, Tuple, TypeVar
from matplotlib import axes
import matplotlib.pyplot as plt
import numpy as np
import scipy as sp
from scipy.optimize import linear_sum_assignment
from deepfigures.utils import file_util
from deepfigures.ex... | 36.489933 | 131 | 0.667096 |
a1dac69088570b5009fa317d6e9025659eeb2925 | 102 | py | Python | notion_scheduler.py | kontheocharis/notion_scheduler | 26be1f41bca73c66b33daaa5def2487931798fa5 | [
"MIT"
] | 17 | 2020-09-17T22:13:36.000Z | 2022-01-27T14:33:36.000Z | notion_scheduler.py | kontheocharis/notion_scheduler | 26be1f41bca73c66b33daaa5def2487931798fa5 | [
"MIT"
] | 4 | 2020-09-17T21:11:59.000Z | 2020-10-02T11:05:22.000Z | notion_scheduler.py | kontheocharis/notion_scheduler | 26be1f41bca73c66b33daaa5def2487931798fa5 | [
"MIT"
] | 2 | 2021-01-15T20:57:08.000Z | 2021-12-31T05:30:56.000Z | #!/usr/bin/env python3
from notion_scheduler import main
if __name__ == "__main__":
main.main()
| 14.571429 | 33 | 0.705882 |
83ce905d37cb6104129def2690474c165f388550 | 3,253 | py | Python | MLapp/MLapp/settings.py | huongdo108/deploy-dog-breed-prediction-model-VGG16-Django | 9e36c38553237c343168307182983cda4a60ff06 | [
"MIT"
] | null | null | null | MLapp/MLapp/settings.py | huongdo108/deploy-dog-breed-prediction-model-VGG16-Django | 9e36c38553237c343168307182983cda4a60ff06 | [
"MIT"
] | null | null | null | MLapp/MLapp/settings.py | huongdo108/deploy-dog-breed-prediction-model-VGG16-Django | 9e36c38553237c343168307182983cda4a60ff06 | [
"MIT"
] | null | null | null | """
Django settings for MLapp project.
Generated by 'django-admin startproject' using Django 3.0.8.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# ... | 25.414063 | 91 | 0.694128 |
99ab971de17f4aaf2bf2ef0a278c5f62d930d171 | 4,363 | py | Python | contrib/devtools/logprint-scanner.py | Crazyhead90/helix | 78b5a27fa95f89cdada72fe285a06a26a152b464 | [
"MIT"
] | null | null | null | contrib/devtools/logprint-scanner.py | Crazyhead90/helix | 78b5a27fa95f89cdada72fe285a06a26a152b464 | [
"MIT"
] | null | null | null | contrib/devtools/logprint-scanner.py | Crazyhead90/helix | 78b5a27fa95f89cdada72fe285a06a26a152b464 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The HELIX developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import os, sys
from subprocess import check_output
def countRelevantCommas(line):
openParensPosStack = []
... | 42.359223 | 167 | 0.568187 |
454031b0744e15d7d179ecd7f2da6f4326aedb41 | 4,784 | py | Python | chomskIE/extract/born_tuples.py | aashishyadavally/chomskIE | 9159bd0f442acb50549c2fe67c429158174cd8f1 | [
"MIT"
] | null | null | null | chomskIE/extract/born_tuples.py | aashishyadavally/chomskIE | 9159bd0f442acb50549c2fe67c429158174cd8f1 | [
"MIT"
] | null | null | null | chomskIE/extract/born_tuples.py | aashishyadavally/chomskIE | 9159bd0f442acb50549c2fe67c429158174cd8f1 | [
"MIT"
] | null | null | null | import spacy
from spacy.symbols import ORTH, LEMMA, POS
class BornTupleExtractor:
"""All tuples in each sentence in the document that fit the template
BORN (ORGANIZATION/PERSON, DATE, LOCATION) are extracted.
"""
def _founded_active(self, sent):
"""Extract relations from sentences with 'founde... | 31.473684 | 86 | 0.562918 |
37495e23dcec164bfc3753b9f538c894db3ae267 | 53,793 | py | Python | dask_ml/model_selection/_search.py | stsievert/dask-ml | e6183d63e7381fbb4001c17a931905b10ec3cf63 | [
"BSD-3-Clause"
] | null | null | null | dask_ml/model_selection/_search.py | stsievert/dask-ml | e6183d63e7381fbb4001c17a931905b10ec3cf63 | [
"BSD-3-Clause"
] | null | null | null | dask_ml/model_selection/_search.py | stsievert/dask-ml | e6183d63e7381fbb4001c17a931905b10ec3cf63 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import logging
import numbers
from collections import defaultdict
from itertools import repeat
from multiprocessing import cpu_count
from operator import getitem
import dask
import numpy as np
import packaging.version
from dask.base import tokenize
from... | 31.568662 | 88 | 0.569944 |
63b6848010dca8851546d65f2d748bb3101fface | 1,053 | py | Python | systems-many-docker/one.py | Kraken-CI/workflow-examples | 34ce70d6c42d88d101fc5b1cad16b093744ec879 | [
"Apache-2.0"
] | null | null | null | systems-many-docker/one.py | Kraken-CI/workflow-examples | 34ce70d6c42d88d101fc5b1cad16b093744ec879 | [
"Apache-2.0"
] | null | null | null | systems-many-docker/one.py | Kraken-CI/workflow-examples | 34ce70d6c42d88d101fc5b1cad16b093744ec879 | [
"Apache-2.0"
] | null | null | null | def stage(ctx):
return {
"parent": "root",
"triggers": {
"parent": True,
},
"parameters": [],
"configs": [],
"jobs": [{
"name": "build",
"timeout": 1200,
"steps": [{
"tool": "shell",
"cmd"... | 30.970588 | 58 | 0.301045 |
82613777d5ed5dbc2fdf67428d2d683d4f9772d6 | 4,552 | py | Python | models/aa_wide_resnet.py | LegenDong/attention-augmented.pytorch | 98f1141ad7bdc6f110789ba568b51df89fba164d | [
"MIT"
] | 4 | 2019-10-19T10:42:37.000Z | 2021-11-09T19:26:30.000Z | models/aa_wide_resnet.py | LegenDong/attention-augmented.pytorch | 98f1141ad7bdc6f110789ba568b51df89fba164d | [
"MIT"
] | null | null | null | models/aa_wide_resnet.py | LegenDong/attention-augmented.pytorch | 98f1141ad7bdc6f110789ba568b51df89fba164d | [
"MIT"
] | 1 | 2019-11-04T06:44:54.000Z | 2019-11-04T06:44:54.000Z | # -*- coding: utf-8 -*-
# @Time : 2019/5/3 14:01
# @Author : LegenDong
# @User : legendong
# @File : aa_wide_resnet.py
# @Software: PyCharm
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
from models.augmented_layer import AugmentedLayer
__a... | 35.5625 | 111 | 0.588752 |
f0112bdc3823ec97eb1a45e4e61fe25300599153 | 119,850 | py | Python | dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2.py | erikwebb/google-cloud-python | 288a878e9a07239015c78a193eca1cc15e926127 | [
"Apache-2.0"
] | 1 | 2019-04-16T08:13:06.000Z | 2019-04-16T08:13:06.000Z | dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2.py | erikwebb/google-cloud-python | 288a878e9a07239015c78a193eca1cc15e926127 | [
"Apache-2.0"
] | null | null | null | dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2.py | erikwebb/google-cloud-python | 288a878e9a07239015c78a193eca1cc15e926127 | [
"Apache-2.0"
] | 1 | 2020-11-30T02:23:29.000Z | 2020-11-30T02:23:29.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/dataproc_v1beta2/proto/workflow_templates.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _me... | 36.142943 | 9,510 | 0.633901 |
201731dbc2260ce2b73d2fba909a3670e2760c89 | 483 | py | Python | fgs_bayesian_filter/entry_point.py | fugashy/fgs_localization | 47a821b243bfed9456c88ff2dfc2035e7ef48b96 | [
"MIT"
] | null | null | null | fgs_bayesian_filter/entry_point.py | fugashy/fgs_localization | 47a821b243bfed9456c88ff2dfc2035e7ef48b96 | [
"MIT"
] | null | null | null | fgs_bayesian_filter/entry_point.py | fugashy/fgs_localization | 47a821b243bfed9456c88ff2dfc2035e7ef48b96 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
# -*- coding: utf-8 -*-
from sys import argv, exit
import yaml
import offline_simulator
def main(args):
if len(args) != 2:
print('usage: python3 fgs_gaussian_filter.entry_point PATH_TO_CONFIG_YAML')
return -1
f = open(args[1], 'r')
config = yaml.load(f, Loader=y... | 18.576923 | 83 | 0.660455 |
e0273022ca94723c873529d7593c3955ea0289f1 | 916 | py | Python | services/web/apps/dns/dnszone/views.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | services/web/apps/dns/dnszone/views.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | services/web/apps/dns/dnszone/views.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# dns.dnszone application
# ---------------------------------------------------------------------
# Copyright (C) 2007-2017 The NOC Project
# See LICENSE for details
# --------------------------------------------------------... | 30.533333 | 71 | 0.567686 |
b39b9f776338761aa03a435fdbff77ef28c26d1b | 1,614 | py | Python | zippy/benchmarks/src/benchmarks/euler31-timed.py | lucapele/pele-c | ff6d06794a171f8e1b08fc6246446d9777116f56 | [
"BSD-3-Clause"
] | 319 | 2016-09-22T15:54:48.000Z | 2022-03-18T02:36:58.000Z | zippy/benchmarks/src/benchmarks/euler31-timed.py | lucapele/pele-c | ff6d06794a171f8e1b08fc6246446d9777116f56 | [
"BSD-3-Clause"
] | 9 | 2016-11-03T21:56:41.000Z | 2020-08-09T19:27:37.000Z | zippy/benchmarks/src/benchmarks/euler31-timed.py | lucapele/pele-c | ff6d06794a171f8e1b08fc6246446d9777116f56 | [
"BSD-3-Clause"
] | 27 | 2016-10-06T16:05:32.000Z | 2022-03-18T02:37:00.000Z | #runas solve()
#unittest.skip recursive generator
#pythran export solve()
# 01/08/14 modified for benchmarking by Wei Zhang
import sys, time
COINS = [1, 2, 5, 10, 20, 50, 100, 200]
# test
def _sum(iterable):
sum = None
for i in iterable:
if sum is None:
sum = i
else:
su... | 24.454545 | 115 | 0.578067 |
9ed90b2bc4c90c506a0e9bc2452e3765c323fe66 | 2,854 | py | Python | progress/helpers.py | zhaoweixi/GraFormer | 0a0a04014cdf157c11ab8e952862efa27c6a1980 | [
"BSD-2-Clause"
] | 937 | 2019-05-08T08:46:25.000Z | 2022-03-31T12:56:07.000Z | pip/_vendor/progress/helpers.py | alex/pip | d51a4b345b31ec4c8defbefe7f12b996c00c67fa | [
"MIT"
] | 3,243 | 2017-02-07T15:30:01.000Z | 2022-03-31T16:42:19.000Z | pip/_vendor/progress/helpers.py | alex/pip | d51a4b345b31ec4c8defbefe7f12b996c00c67fa | [
"MIT"
] | 354 | 2019-05-10T02:15:26.000Z | 2022-03-30T05:52:57.000Z | # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE A... | 31.021739 | 74 | 0.633847 |
4c1fad8030e567b7dcb4c1576209d1ac06ee65e6 | 3,754 | py | Python | demo/qa_classification/classifier.py | jjandnn/PaddleHub | 05e24ce2495b60e095b1b0d94ba1c7ac09d077f9 | [
"Apache-2.0"
] | 1 | 2020-03-13T10:53:07.000Z | 2020-03-13T10:53:07.000Z | demo/qa_classification/classifier.py | Melissa9596/PaddleHub | 0b002a0add1c982d52f7591a5e773bf09b3e6361 | [
"Apache-2.0"
] | null | null | null | demo/qa_classification/classifier.py | Melissa9596/PaddleHub | 0b002a0add1c982d52f7591a5e773bf09b3e6361 | [
"Apache-2.0"
] | null | null | null | #coding:utf-8
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 41.711111 | 140 | 0.730687 |
cf0c8a27d3e9163733f28dd9b8e7b650ac502245 | 1,787 | py | Python | environment/lib/python3.8/site-packages/numba/cuda/tests/cudapy/test_errors.py | 123972/PCA-nutricion | aff3c51a71c887c3fa367dbf9d599be5915c80cc | [
"MIT"
] | 1 | 2021-02-27T20:33:37.000Z | 2021-02-27T20:33:37.000Z | environment/lib/python3.8/site-packages/numba/cuda/tests/cudapy/test_errors.py | 123972/PCA-nutricion | aff3c51a71c887c3fa367dbf9d599be5915c80cc | [
"MIT"
] | 2 | 2021-05-11T16:00:55.000Z | 2021-08-23T20:45:22.000Z | environment/lib/python3.8/site-packages/numba/cuda/tests/cudapy/test_errors.py | 123972/PCA-nutricion | aff3c51a71c887c3fa367dbf9d599be5915c80cc | [
"MIT"
] | 1 | 2021-04-17T15:28:25.000Z | 2021-04-17T15:28:25.000Z | import numpy as np
from numba import cuda
from numba.cuda.testing import unittest, CUDATestCase
def noop(x):
pass
class TestJitErrors(CUDATestCase):
"""
Test compile-time errors with @jit.
"""
def test_too_many_dims(self):
kernfunc = cuda.jit(noop)
with self.assertRaises(Value... | 30.288136 | 92 | 0.61052 |
aab248e25871e61cdc4fd8f09a82c185c1c4b7f1 | 597 | py | Python | GeeksforGeeks/Medium/Python/Cat and Hat - Python .py | mohitkhedkar/Competitive-programming | 85d08791002363c6a1104b6b51bf049489fd5257 | [
"MIT"
] | 2 | 2020-10-22T15:37:14.000Z | 2020-12-11T06:45:02.000Z | GeeksforGeeks/Medium/Python/Cat and Hat - Python .py | mohitkhedkar/Competitive-programming | 85d08791002363c6a1104b6b51bf049489fd5257 | [
"MIT"
] | null | null | null | GeeksforGeeks/Medium/Python/Cat and Hat - Python .py | mohitkhedkar/Competitive-programming | 85d08791002363c6a1104b6b51bf049489fd5257 | [
"MIT"
] | null | null | null | #{
#Driver Code Starts
#Initial Template for Python 3
# } Driver Code Ends
#User function Template for python3
def cat_hat(str):
##your code here##
##You need to write complete code this time
hat = str.count("hat")
cat = str.count("cat")
if (hat == cat):
return "True"
else :
ret... | 16.135135 | 46 | 0.572864 |
0aa73e8255852517109111a0d7030085417817ef | 3,670 | py | Python | Transfer/SSDLite/eval_metrics.py | chakkritte/EEEA-Net | 260c2a5c673a806315fc5b529b9c9112c48ca8ae | [
"Apache-2.0"
] | 3 | 2021-08-30T01:36:52.000Z | 2021-11-05T07:36:28.000Z | Transfer/SSDLite/eval_metrics.py | chakkritte/EEEA-Net | 260c2a5c673a806315fc5b529b9c9112c48ca8ae | [
"Apache-2.0"
] | 1 | 2021-11-29T12:00:56.000Z | 2021-11-30T04:07:28.000Z | Transfer/SSDLite/eval_metrics.py | chakkritte/EEEA-Net | 260c2a5c673a806315fc5b529b9c9112c48ca8ae | [
"Apache-2.0"
] | 2 | 2021-08-17T10:06:59.000Z | 2021-08-30T01:36:57.000Z | import torch
import numpy as np
from vision.utils import box_utils, measurements
def group_annotation_by_class(dataset):
true_case_stat = {}
all_gt_boxes = {}
all_difficult_cases = {}
for i in range(len(dataset)):
image_id, annotation = dataset.get_annotation(i)
gt_boxes, classes, is... | 41.235955 | 132 | 0.623433 |
f82d44ab6033072915044e0514663ad9e1890025 | 1,832 | py | Python | sdk/python/setup.py | chlige/arvados | e4a68851e521c0e3152f9790683d8cdb1b3923df | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/setup.py | chlige/arvados | e4a68851e521c0e3152f9790683d8cdb1b3923df | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/setup.py | chlige/arvados | e4a68851e521c0e3152f9790683d8cdb1b3923df | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
import os
import sys
import re
from setuptools import setup, find_packages
SETUP_DIR = os.path.dirname(__file__) or '.'
README = os.path.join(SETUP_DIR, 'REA... | 27.757576 | 81 | 0.583515 |
9bafeebdb7b3384fc1cd1d0707bbeba2f68ac52b | 370 | py | Python | attendanceWeb/attendanceWeb/users/apps.py | mahbubcubd/attendanceWeb | 7a8779360b560a6491ca229b4fc79706ff8f741c | [
"MIT"
] | 1 | 2019-03-11T17:10:06.000Z | 2019-03-11T17:10:06.000Z | attendanceWeb/attendanceWeb/users/apps.py | mahbubcubd/attendanceWeb | 7a8779360b560a6491ca229b4fc79706ff8f741c | [
"MIT"
] | null | null | null | attendanceWeb/attendanceWeb/users/apps.py | mahbubcubd/attendanceWeb | 7a8779360b560a6491ca229b4fc79706ff8f741c | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class UsersConfig(AppConfig):
name = 'attendanceWeb.users'
verbose_name = "Users"
def ready(self):
"""Override this to put in:
Users system checks
Users signal registration
"""
try:
import users.signals # noqa ... | 21.764706 | 45 | 0.578378 |
b0b470cbbf18e96073d9b1fd4a0a2b4ead6f2f65 | 4,411 | py | Python | doors/dates.py | chechir/doors | 57d1bc7871e42bff255a9d01ef1d6b0894763e40 | [
"MIT"
] | 2 | 2018-05-17T06:08:59.000Z | 2018-05-22T13:14:03.000Z | doors/dates.py | chechir/doors | 57d1bc7871e42bff255a9d01ef1d6b0894763e40 | [
"MIT"
] | null | null | null | doors/dates.py | chechir/doors | 57d1bc7871e42bff255a9d01ef1d6b0894763e40 | [
"MIT"
] | 2 | 2018-05-18T11:27:18.000Z | 2019-08-04T10:48:02.000Z | import datetime
import re
import numpy as np
import pandas as pd
import pytz
def get_day_of_year(dates):
return _get_timestamp_attribute(dates, "dayofyear")
def get_day_of_week(dates):
return pd.Series(dates).apply(lambda x: x.weekday()).values
def get_hour(dates):
return _get_timestamp_attribute(dat... | 27.06135 | 82 | 0.704149 |
28c049bc47e242d741464c5ac75ffaf9afb73a8d | 236 | py | Python | PythonFiles/input.py | IamVaibhavsar/Python_Files | 283d73929a3e11955c71499407c4f8bff56e4273 | [
"MIT"
] | null | null | null | PythonFiles/input.py | IamVaibhavsar/Python_Files | 283d73929a3e11955c71499407c4f8bff56e4273 | [
"MIT"
] | null | null | null | PythonFiles/input.py | IamVaibhavsar/Python_Files | 283d73929a3e11955c71499407c4f8bff56e4273 | [
"MIT"
] | 1 | 2019-07-26T15:25:21.000Z | 2019-07-26T15:25:21.000Z | name=input("Enter your name:")
print("Hello "+ name + " Welcome to python")
age=int(input("Enter your Age: "))
print("You are " + str(age) + " Years old.")
#age=input("Enter your Age: ")
#print("You are " + age + " Years old.") | 29.5 | 45 | 0.597458 |
6880bf851efbc772e29c793ebd62210b63fb30cc | 84 | py | Python | pyadb/adb/sub_command/__init__.py | HsOjo/OjoPyADB | 4f5272b5a838a09a3a5d4653dea7e24b5103283d | [
"MIT"
] | 2 | 2021-07-07T02:07:00.000Z | 2021-08-23T01:50:40.000Z | pyadb/adb/sub_command/__init__.py | HsOjo/OjoPyADB | 4f5272b5a838a09a3a5d4653dea7e24b5103283d | [
"MIT"
] | null | null | null | pyadb/adb/sub_command/__init__.py | HsOjo/OjoPyADB | 4f5272b5a838a09a3a5d4653dea7e24b5103283d | [
"MIT"
] | null | null | null | from .forward import Forward
from .reverse import Reverse
from .logcat import Logcat | 28 | 28 | 0.833333 |
4f5dfa776942367f9577e565417fb2809b4a5e6f | 900 | py | Python | assets/data_and_scripts/Parsing/filter_fasta_by_Met_and_Trp.py | GTPB/PPB18 | fe19c9b8c6b91dce22c554bc1fa48c97834f8a87 | [
"CC-BY-4.0"
] | 4 | 2020-01-14T18:23:24.000Z | 2021-07-30T10:15:10.000Z | assets/data_and_scripts/Parsing/filter_fasta_by_Met_and_Trp.py | GTPB/PPB18 | fe19c9b8c6b91dce22c554bc1fa48c97834f8a87 | [
"CC-BY-4.0"
] | null | null | null | assets/data_and_scripts/Parsing/filter_fasta_by_Met_and_Trp.py | GTPB/PPB18 | fe19c9b8c6b91dce22c554bc1fa48c97834f8a87 | [
"CC-BY-4.0"
] | 1 | 2021-07-30T10:11:35.000Z | 2021-07-30T10:11:35.000Z | '''
Parsing - Exercise 11
The script reads a multiple sequence record file in FASTA format and
writes to a new file only the records the sequences of which start
with a methionine ('M') AND contain at least two tryptophans ('W').
'''
fasta = open('SwissProtHuman.fasta','r')
outfile = open('SwissProtHuman-Filtered... | 25.714286 | 69 | 0.587778 |
e6d44334327ed1599aee05f9d816eda36aace765 | 272 | py | Python | houdini/houdini/urls.py | TrianglePlusPlus/houdini | 292b1fb395fc34dbefa8f891cc94bb811f5805bb | [
"MIT"
] | 2 | 2017-09-25T00:30:22.000Z | 2021-02-04T22:11:54.000Z | houdini/houdini/urls.py | TrianglePlusPlus/houdini | 292b1fb395fc34dbefa8f891cc94bb811f5805bb | [
"MIT"
] | 11 | 2016-12-29T22:05:57.000Z | 2020-06-05T17:23:10.000Z | houdini/houdini/urls.py | TrianglePlusPlus/houdini | 292b1fb395fc34dbefa8f891cc94bb811f5805bb | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^', include('houdini_admin.urls')),
url(r'^', include('houdini_server.urls')),
url(r'^', include('houdini_client.urls')),
]
| 27.2 | 46 | 0.665441 |
1467c7e286a0e0f5f178dbe343d4aecc7d0e0b57 | 580 | py | Python | core/statchannel.py | mathwuyue/py-wireless-sys-sim | 4b2bfef072fb520db8b792e434a5f3d5b5dd2939 | [
"MIT"
] | 3 | 2015-09-18T15:05:40.000Z | 2022-01-07T02:26:37.000Z | core/statchannel.py | mathwuyue/py-wireless-sys-sim | 4b2bfef072fb520db8b792e434a5f3d5b5dd2939 | [
"MIT"
] | 1 | 2021-05-25T08:13:26.000Z | 2021-05-25T08:13:26.000Z | core/statchannel.py | mathwuyue/py-wireless-sys-sim | 4b2bfef072fb520db8b792e434a5f3d5b5dd2939 | [
"MIT"
] | 7 | 2015-09-18T15:05:22.000Z | 2021-12-15T06:13:55.000Z | import numpy as np
def gen_rayleigh(sigma=1.0, *args):
return np.sqrt(sigma/2.0) * np.random.randn(*args) +\
np.sqrt(sigma/2.0) * np.random.randn(*args) * 1j
def gen_rician(k=10, sigma=1.0, *args):
return np.sqrt(k/float(k+1))*sigma*np.exp(1j) +\
np.sqrt((1.0/(k+1))*sigma/2.0) * np.random.ra... | 26.363636 | 68 | 0.596552 |
51de582ce0f11f0492ad0cfd5334c4d4d3fd5d76 | 6,163 | py | Python | test/functional/mempool_updatefromblock.py | apokalyzr/bitcoin | 5b4b8f76f3ae11064d4aa3ac157558e364751fd2 | [
"MIT"
] | 9 | 2022-02-20T11:12:21.000Z | 2022-02-23T21:24:03.000Z | test/functional/mempool_updatefromblock.py | apokalyzr/bitcoin | 5b4b8f76f3ae11064d4aa3ac157558e364751fd2 | [
"MIT"
] | 12 | 2021-12-14T01:00:25.000Z | 2022-03-24T01:49:23.000Z | test/functional/mempool_updatefromblock.py | apokalyzr/bitcoin | 5b4b8f76f3ae11064d4aa3ac157558e364751fd2 | [
"MIT"
] | 15 | 2022-02-10T00:08:33.000Z | 2022-03-24T00:01:30.000Z | #!/usr/bin/env python3
# Copyright (c) 2020-2021 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 mempool descendants/ancestors information update.
Test mempool update of transaction descendants/... | 49.304 | 145 | 0.624696 |
261db3499646a8a901f1076574d1b053798d4f43 | 3,318 | py | Python | covid/models/seichar_demographic.py | kimuraz/covid-19 | db7995c1075e6fc3930585691d6c1c5be8eac465 | [
"MIT"
] | null | null | null | covid/models/seichar_demographic.py | kimuraz/covid-19 | db7995c1075e6fc3930585691d6c1c5be8eac465 | [
"MIT"
] | null | null | null | covid/models/seichar_demographic.py | kimuraz/covid-19 | db7995c1075e6fc3930585691d6c1c5be8eac465 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from .seichar import SEICHAR
from .. import data
from ..region import Region
class SEICHARDemographic(SEICHAR):
"""
RSEICHA model for epidemics that uses demography information
"""
_dedup_factor = 0.5
demography: pd.DataFrame
mortality: pd.DataFrame
... | 30.440367 | 90 | 0.563593 |
781b81e0fe3561d3a1aedb31b2577ae075787376 | 32,082 | py | Python | second/core/box_np_ops.py | AhmedStohy/CLOCs | e73964f6e57bdb85e604510ffb43ad27b6500eeb | [
"MIT"
] | null | null | null | second/core/box_np_ops.py | AhmedStohy/CLOCs | e73964f6e57bdb85e604510ffb43ad27b6500eeb | [
"MIT"
] | null | null | null | second/core/box_np_ops.py | AhmedStohy/CLOCs | e73964f6e57bdb85e604510ffb43ad27b6500eeb | [
"MIT"
] | null | null | null | import numba
from pathlib import Path
import numpy as np
from second.core.geometry import points_in_convex_polygon_3d_jit
from second.core.non_max_suppression.nms_gpu import rotate_iou_gpu_eval
from spconv.utils import rbbox_iou
def riou_cc(rbboxes, qrbboxes, standup_thresh=0.0):
# less than 50ms when us... | 37.261324 | 136 | 0.566735 |
402e3a82eee1a05a5d1b47b37522db5ca27ff2ac | 34,900 | py | Python | tests/config_test.py | alexsapran/rally | 6c4164bcc681b267feac969c100809964aac9c8f | [
"Apache-2.0"
] | 2 | 2019-04-11T10:45:11.000Z | 2019-06-05T15:24:05.000Z | tests/config_test.py | alexsapran/rally | 6c4164bcc681b267feac969c100809964aac9c8f | [
"Apache-2.0"
] | null | null | null | tests/config_test.py | alexsapran/rally | 6c4164bcc681b267feac969c100809964aac9c8f | [
"Apache-2.0"
] | null | null | null | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this f... | 42.927429 | 140 | 0.619713 |
90d7676727c25665f15dbdb8aae0baa71a76c9ca | 2,522 | py | Python | research-work/src/common/metro.py | egbuch/super-urop | 7e067e0821a75a468c733bf9906867a1de31ad0a | [
"MIT"
] | null | null | null | research-work/src/common/metro.py | egbuch/super-urop | 7e067e0821a75a468c733bf9906867a1de31ad0a | [
"MIT"
] | null | null | null | research-work/src/common/metro.py | egbuch/super-urop | 7e067e0821a75a468c733bf9906867a1de31ad0a | [
"MIT"
] | null | null | null | #####################################################################
#
# metro.py
#
# Copyright (c) 2016, Eran Egozy
#
# Released under the MIT License (http://opensource.org/licenses/MIT)
#
#####################################################################
from .clock import kTicksPerQuarter, quantize_tick_up
cl... | 30.02381 | 97 | 0.578509 |
c84426540e9488367642be22556466e4603b893c | 4,476 | py | Python | canopy/transforms/tests/tree_test.py | diogo149/treeano | 9b3fd6bb5eb2f6738c9e5c357e70bef95dcae7b7 | [
"Apache-2.0"
] | 45 | 2015-04-26T04:45:51.000Z | 2022-01-24T15:03:55.000Z | canopy/transforms/tests/tree_test.py | diogo149/treeano | 9b3fd6bb5eb2f6738c9e5c357e70bef95dcae7b7 | [
"Apache-2.0"
] | 5 | 2015-07-24T00:51:19.000Z | 2016-02-03T07:32:49.000Z | canopy/transforms/tests/tree_test.py | diogo149/treeano | 9b3fd6bb5eb2f6738c9e5c357e70bef95dcae7b7 | [
"Apache-2.0"
] | 13 | 2015-07-24T00:46:28.000Z | 2022-01-18T16:55:47.000Z | from __future__ import division, absolute_import
from __future__ import print_function, unicode_literals
import nose.tools as nt
import numpy as np
import theano
import theano.tensor as T
import treeano
import treeano.nodes as tn
import canopy
fX = theano.config.floatX
def test_remove_nodes():
network1 = tn.S... | 28.329114 | 66 | 0.536193 |
b4b7c2e09d161cc8e5937f18215a3dcd3e594dc3 | 887 | py | Python | model/category.py | n8wachT/BotListBot | 457160498a90c8d0a63d5a9f7400227e35431b6d | [
"MIT"
] | null | null | null | model/category.py | n8wachT/BotListBot | 457160498a90c8d0a63d5a9f7400227e35431b6d | [
"MIT"
] | null | null | null | model/category.py | n8wachT/BotListBot | 457160498a90c8d0a63d5a9f7400227e35431b6d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import emoji
from peewee import *
import const
import helpers
from model.basemodel import BaseModel
class Category(BaseModel):
id = PrimaryKeyField()
order = IntegerField(unique=True)
emojis = CharField()
name = CharField(unique=True)
extra = CharField(null=True)
curre... | 25.342857 | 81 | 0.613303 |
29a400e43780ac866d2e2362e76087575c709812 | 1,702 | py | Python | .venv/lib/python2.7/site-packages/sqlalchemy_utils/types/__init__.py | MansoorHanif/FYP-web-app | 918008d3b5eedaa904f3e720296afde9d73ac3f4 | [
"BSD-3-Clause"
] | 11 | 2016-09-14T21:59:55.000Z | 2019-01-28T21:58:31.000Z | .venv/lib/python2.7/site-packages/sqlalchemy_utils/types/__init__.py | MansoorHanif/FYP-web-app | 918008d3b5eedaa904f3e720296afde9d73ac3f4 | [
"BSD-3-Clause"
] | null | null | null | .venv/lib/python2.7/site-packages/sqlalchemy_utils/types/__init__.py | MansoorHanif/FYP-web-app | 918008d3b5eedaa904f3e720296afde9d73ac3f4 | [
"BSD-3-Clause"
] | null | null | null | from functools import wraps
from sqlalchemy.orm.collections import InstrumentedList as _InstrumentedList
from .arrow import ArrowType # noqa
from .choice import Choice, ChoiceType # noqa
from .color import ColorType # noqa
from .country import CountryType # noqa
from .currency import CurrencyType # noqa
from .em... | 29.344828 | 76 | 0.743243 |
15bb6103bad3288b6564928113259ac1bbdbc03b | 1,704 | py | Python | powerline/lint/inspect.py | MrFishFinger/powerline | 361534bafecf836e100eaff257c93eb4805f48db | [
"MIT"
] | 11,435 | 2015-01-01T03:32:34.000Z | 2022-03-31T20:39:05.000Z | powerline/lint/inspect.py | ritiek/powerline | 82c1373ba0b424c57e8c12cb5f6f1a7ee3829c27 | [
"MIT"
] | 879 | 2015-01-02T11:59:30.000Z | 2022-03-24T09:52:17.000Z | powerline/lint/inspect.py | ritiek/powerline | 82c1373ba0b424c57e8c12cb5f6f1a7ee3829c27 | [
"MIT"
] | 1,044 | 2015-01-05T22:37:53.000Z | 2022-03-17T19:43:16.000Z | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from inspect import ArgSpec, getargspec
from powerline.segments import Segment
def getconfigargspec(obj):
if hasattr(obj, 'powerline_origin'):
obj = obj.powerline_origin
else:
obj = obj
args = ... | 26.625 | 84 | 0.701878 |
beedb2a8414fbb2623265cacc658968132dcf13e | 6,821 | py | Python | python/ntp/commands/run/local/__init__.py | EmyrClement/NTupleProduction | 4c1b67ac8826656e804912512f4c4dc6695c7674 | [
"Apache-2.0"
] | 1 | 2021-10-18T01:37:09.000Z | 2021-10-18T01:37:09.000Z | python/ntp/commands/run/local/__init__.py | RickeyEstes/NTupleProduction | 1319183de0ce00749c8f5841fa925479b9024b48 | [
"Apache-2.0"
] | 116 | 2015-01-09T22:38:07.000Z | 2017-05-24T08:12:48.000Z | python/ntp/commands/run/local/__init__.py | RickeyEstes/NTupleProduction | 1319183de0ce00749c8f5841fa925479b9024b48 | [
"Apache-2.0"
] | 1 | 2020-11-01T00:01:17.000Z | 2020-11-01T00:01:17.000Z | """
DEPRECATED
run local: Runs the n-tuple production on the current machine.
All run commands require a valid grid certificate as they
either read data from the grid via XRootD or run on grid
resources.
The command will use python/run/miniAODToNTuple... | 38.106145 | 128 | 0.61296 |
a0a815a3c6e9989b70b43040188fc92282495abb | 13,510 | py | Python | checkout_server/resources.py | bciobo/checkout-server | f6e178b6fc3a67a69608eb312a568d5b782755c6 | [
"MIT"
] | null | null | null | checkout_server/resources.py | bciobo/checkout-server | f6e178b6fc3a67a69608eb312a568d5b782755c6 | [
"MIT"
] | 1 | 2019-03-15T12:00:42.000Z | 2019-03-15T12:00:42.000Z | checkout_server/resources.py | bciobo/checkout-server | f6e178b6fc3a67a69608eb312a568d5b782755c6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
checkout-server.resources
~~~~~~~~~~~~
"""
import json
from stripe.error import InvalidRequestError
from flask.views import MethodView
from flask import current_app as app
from flask import jsonify, abort, request, send_from_directory, make_response
from checkout_server.models import Inval... | 42.21875 | 119 | 0.562768 |
d98ffc358c81ff60e096a252d85114b4aab83272 | 2,260 | py | Python | CIM100/IEC61970/Informative/InfLocations/Zone.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/IEC61970/Informative/InfLocations/Zone.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/IEC61970/Informative/InfLocations/Zone.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 51.363636 | 475 | 0.734956 |
e850fa90968028beee05bb08dba3fa31f80879ad | 8,249 | py | Python | micropy/project/modules/modules.py | lemariva/micropy-cli | 564660184bbe8510e4c4283f6d94ad1713d59fd2 | [
"MIT"
] | 1 | 2020-07-20T17:16:40.000Z | 2020-07-20T17:16:40.000Z | micropy/project/modules/modules.py | lemariva/micropy-cli | 564660184bbe8510e4c4283f6d94ad1713d59fd2 | [
"MIT"
] | null | null | null | micropy/project/modules/modules.py | lemariva/micropy-cli | 564660184bbe8510e4c4283f6d94ad1713d59fd2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import abc
import inspect
from copy import deepcopy
from functools import wraps
from typing import Any, Callable, List, Optional, Tuple, Type, TypeVar, Union
from micropy import utils
from micropy.config import Config
from micropy.logger import Log, ServiceLog
"""Project Packages Module Abstr... | 30.895131 | 99 | 0.588677 |
8fb9c0d65b81a992806f847c3edcc811c393efde | 273 | py | Python | tests/artificial/transf_Anscombe/trend_ConstantTrend/cycle_7/ar_/test_artificial_128_Anscombe_ConstantTrend_7__100.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_Anscombe/trend_ConstantTrend/cycle_7/ar_/test_artificial_128_Anscombe_ConstantTrend_7__100.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_Anscombe/trend_ConstantTrend/cycle_7/ar_/test_artificial_128_Anscombe_ConstantTrend_7__100.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 7, transform = "Anscombe", sigma = 0.0, exog_count = 100, ar_order = 0); | 39 | 168 | 0.736264 |
e09e2aa399ed5d4802b7363ab611124f085cecd1 | 1,930 | py | Python | stack_queue/deque.py | bestgopher/dsa | df0244816abd7f55ba4ae43a91e6d63e16b5fc2e | [
"MIT"
] | null | null | null | stack_queue/deque.py | bestgopher/dsa | df0244816abd7f55ba4ae43a91e6d63e16b5fc2e | [
"MIT"
] | null | null | null | stack_queue/deque.py | bestgopher/dsa | df0244816abd7f55ba4ae43a91e6d63e16b5fc2e | [
"MIT"
] | null | null | null | from exceptions import Empty
from stack_queue.queue_base import BaseQueue
class ArrayDeque(BaseQueue):
def add_first(self, t):
if self._size == len(self._data):
self._resize(2 * self._size)
front = (self._front - 1) % len(self._data)
self._data[front] = t
self._front ... | 23.82716 | 75 | 0.552332 |
259499383c057cd151824bba9d51136d99d4001e | 5,959 | py | Python | extensible_provn/view/style/provtoolbox.py | JoaoFelipe/extensible_provn | 523ad0ee1e94d765f2e8c82d5ce8a93374f3d587 | [
"MIT"
] | 1 | 2022-03-30T23:20:50.000Z | 2022-03-30T23:20:50.000Z | extensible_provn/view/style/provtoolbox.py | JoaoFelipe/extensible_provn | 523ad0ee1e94d765f2e8c82d5ce8a93374f3d587 | [
"MIT"
] | null | null | null | extensible_provn/view/style/provtoolbox.py | JoaoFelipe/extensible_provn | 523ad0ee1e94d765f2e8c82d5ce8a93374f3d587 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from functools import partial
from ...utils import parsetime, unquote, escape
class ProvToolboxStyle(object):
def __init__(self):
self.qualified_attr = False
self.tail_labelsize = "8"
self.attrs_labelsize = "10"
self.use_parsetime = True
... | 35.260355 | 89 | 0.530458 |
0709bc546a37eb0b050a70e874963fe4ff5c8fa3 | 11,876 | py | Python | tests/test_datagram_netstring.py | JohnSitarski/gestalt | 119bc0f1c1c8a9ad1919347573d25f1c502737dc | [
"MIT"
] | null | null | null | tests/test_datagram_netstring.py | JohnSitarski/gestalt | 119bc0f1c1c8a9ad1919347573d25f1c502737dc | [
"MIT"
] | null | null | null | tests/test_datagram_netstring.py | JohnSitarski/gestalt | 119bc0f1c1c8a9ad1919347573d25f1c502737dc | [
"MIT"
] | null | null | null | import asyncio
import asynctest
import logging
import socket
import unittest.mock
from gestalt import serialization
from gestalt.datagram.netstring import NetstringDatagramEndpoint
class NetstringDatagramEndpointTestCase(asynctest.TestCase):
async def test_start_server(self):
receiver_on_message_mock = un... | 41.093426 | 78 | 0.705456 |
d9c3a83a09cbd73d39be9c53e3bde4d8cdf0f292 | 40,579 | py | Python | seapy/roms/boundary.py | powellb/seapy | bd988a66e657f927e35413e19a3b66f0c1db3ecf | [
"MIT"
] | 24 | 2015-08-17T01:24:56.000Z | 2022-03-01T09:10:43.000Z | seapy/roms/boundary.py | powellb/seapy | bd988a66e657f927e35413e19a3b66f0c1db3ecf | [
"MIT"
] | 43 | 2016-03-29T23:09:14.000Z | 2021-10-29T18:57:45.000Z | seapy/roms/boundary.py | powellb/seapy | bd988a66e657f927e35413e19a3b66f0c1db3ecf | [
"MIT"
] | 21 | 2016-03-29T22:44:57.000Z | 2021-08-31T20:15:37.000Z | #!/usr/bin/env python
"""
boundary.py
ROMS boundary utilities
Written by Brian Powell on 01/15/14
Copyright (c)2010--2021 University of Hawaii under the MIT-License.
"""
import seapy
import numpy as np
import netCDF4
import textwrap
from collections import namedtuple
from rich.progress import track
# Defin... | 42.491099 | 88 | 0.515981 |
c1fc70971be56b182ad1309f9e8cba0eff679d22 | 858 | py | Python | core/polyaxon/proxies/schemas/error_page.py | gregmbi/polyaxon | 8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d | [
"Apache-2.0"
] | null | null | null | core/polyaxon/proxies/schemas/error_page.py | gregmbi/polyaxon | 8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d | [
"Apache-2.0"
] | null | null | null | core/polyaxon/proxies/schemas/error_page.py | gregmbi/polyaxon | 8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | 30.642857 | 74 | 0.75641 |
9a10b2210b1253c5de9057693e7311b515f8ba1c | 2,399 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/input_encrypted_file_location.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/input_encrypted_file_location.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/input_encrypted_file_location.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.986667 | 103 | 0.621092 |
398e9f65e90f30d927e4776d1a689924433fe53e | 37,854 | py | Python | edb/pgsql/compiler/pathctx.py | OhBonsai/edgedb | 786c853090b90f3005cb65014194d0dbd45d6fcc | [
"Apache-2.0"
] | 2 | 2019-01-21T05:43:52.000Z | 2019-05-24T02:53:14.000Z | edb/pgsql/compiler/pathctx.py | ciusji/edgedb | 1c68c02430a92464839f03f43c4e5ad6f7ede4e0 | [
"Apache-2.0"
] | null | null | null | edb/pgsql/compiler/pathctx.py | ciusji/edgedb | 1c68c02430a92464839f03f43c4e5ad6f7ede4e0 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB 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... | 33.528787 | 79 | 0.630501 |
9485eb2075b2de052eb838dcc7f6aa71a860c897 | 40 | py | Python | tests/roots/test-ext-intersphinx-cppdomain/conf.py | samdoran/sphinx | 4c91c038b220d07bbdfe0c1680af42fe897f342c | [
"BSD-2-Clause"
] | 4,973 | 2015-01-03T15:44:00.000Z | 2022-03-31T03:11:51.000Z | tests/roots/test-ext-intersphinx-cppdomain/conf.py | samdoran/sphinx | 4c91c038b220d07bbdfe0c1680af42fe897f342c | [
"BSD-2-Clause"
] | 7,850 | 2015-01-02T08:09:25.000Z | 2022-03-31T18:57:40.000Z | tests/roots/test-ext-intersphinx-cppdomain/conf.py | samdoran/sphinx | 4c91c038b220d07bbdfe0c1680af42fe897f342c | [
"BSD-2-Clause"
] | 2,179 | 2015-01-03T15:26:53.000Z | 2022-03-31T12:22:44.000Z | extensions = ['sphinx.ext.intersphinx']
| 20 | 39 | 0.75 |
613734cb91a1275f259ad51c7f549fe289e6fdf0 | 3,236 | py | Python | doxybook/runner.py | matusnovak/doxybook | 6d0e2b93caf3f35cf242cdc95c65230e89cb975b | [
"MIT"
] | 30 | 2018-09-06T11:26:02.000Z | 2022-03-24T11:30:50.000Z | doxybook/runner.py | matusnovak/doxybook | 6d0e2b93caf3f35cf242cdc95c65230e89cb975b | [
"MIT"
] | 10 | 2018-06-20T11:29:59.000Z | 2021-07-31T11:20:04.000Z | doxybook/runner.py | matusnovak/doxybook | 6d0e2b93caf3f35cf242cdc95c65230e89cb975b | [
"MIT"
] | 10 | 2018-04-12T11:27:51.000Z | 2021-12-20T12:17:03.000Z | import sys
import os
from doxybook.doxygen import Doxygen
from doxybook.generator import Generator
from doxybook.xml_parser import XmlParser
from doxybook.cache import Cache
from doxybook.constants import Kind
def run(output: str,
input: str,
target: str = 'gitbook',
hints: bool = True,
... | 53.04918 | 167 | 0.728677 |
774807f4d64f71a429ecf9436a756a9f63d24cf0 | 697 | py | Python | migrations/versions/e36f1d0c4947_.py | DerekBev/tasking-manager | 6473ba28d0834ee82c9463c254a8b759c9566622 | [
"BSD-2-Clause"
] | 2 | 2019-07-15T19:18:58.000Z | 2020-09-02T18:11:30.000Z | migrations/versions/e36f1d0c4947_.py | DerekBev/tasking-manager | 6473ba28d0834ee82c9463c254a8b759c9566622 | [
"BSD-2-Clause"
] | 28 | 2019-01-04T17:39:00.000Z | 2021-05-06T23:06:24.000Z | migrations/versions/e36f1d0c4947_.py | DerekBev/tasking-manager | 6473ba28d0834ee82c9463c254a8b759c9566622 | [
"BSD-2-Clause"
] | 3 | 2020-02-29T20:46:09.000Z | 2020-11-20T19:44:04.000Z | """empty message
Revision ID: e36f1d0c4947
Revises: badf8bb7d56b
Create Date: 2019-06-14 11:20:15.129237
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e36f1d0c4947'
down_revision = 'badf8bb7d56b'
branch_labels = None
depends_on = None
def upgrade():
# ... | 24.034483 | 99 | 0.710187 |
fdc6ad23822da75be4e89e2e12e76a13d15d565a | 2,335 | py | Python | patron/tests/unit/pci/test_utils.py | casbin/openstack-patron | b41b1262f3a52c8cc9f6b6bdf87be5a1abcf6d25 | [
"Apache-2.0"
] | null | null | null | patron/tests/unit/pci/test_utils.py | casbin/openstack-patron | b41b1262f3a52c8cc9f6b6bdf87be5a1abcf6d25 | [
"Apache-2.0"
] | null | null | null | patron/tests/unit/pci/test_utils.py | casbin/openstack-patron | b41b1262f3a52c8cc9f6b6bdf87be5a1abcf6d25 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 Intel, Inc.
# Copyright (c) 2012 OpenStack Foundation
# 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/li... | 37.66129 | 78 | 0.662527 |
6a2520b48e99902131119de0d59e62668ae8301c | 865 | py | Python | layers.py | songquanpeng/Exploring-Unlabeled-Faces-for-Novel-Attribute-Discovery | df1b0126aa0a3fb5579525762943b6ae28176ca2 | [
"MIT"
] | 1 | 2021-02-19T13:40:11.000Z | 2021-02-19T13:40:11.000Z | layers.py | songquanpeng/XploreGAN | df1b0126aa0a3fb5579525762943b6ae28176ca2 | [
"MIT"
] | null | null | null | layers.py | songquanpeng/XploreGAN | df1b0126aa0a3fb5579525762943b6ae28176ca2 | [
"MIT"
] | null | null | null | import torch
from torch import nn
# Credit: https://github.com/lernapparat/lernapparat
class NoiseLayer(nn.Module):
"""adds noise. noise is per pixel (constant over channels) with per-channel weight"""
def __init__(self, channels):
super().__init__()
self.weight = nn.Parameter(torch.zeros(chan... | 37.608696 | 99 | 0.623121 |
e7c4cce453c7a05a49cb2f0c2179c768f07faf41 | 18,271 | py | Python | mmpose/core/visualization/image.py | dmvictor/mmpose | 95c6766b0d9198b6a4f26addaeb058fffd83c634 | [
"Apache-2.0"
] | null | null | null | mmpose/core/visualization/image.py | dmvictor/mmpose | 95c6766b0d9198b6a4f26addaeb058fffd83c634 | [
"Apache-2.0"
] | null | null | null | mmpose/core/visualization/image.py | dmvictor/mmpose | 95c6766b0d9198b6a4f26addaeb058fffd83c634 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import math
import os
import warnings
import cv2
import mmcv
import numpy as np
import trimesh
from matplotlib import pyplot as plt
from mmcv.utils.misc import deprecated_api_warning
from mmcv.visualization.color import color_val
try:
os.environ['PYOPENGL_PLATFORM']... | 40.156044 | 194 | 0.522303 |
c14bae85ce9a83e71b8899877984e953aeeb40e8 | 466 | py | Python | python/ccxt/async_support/huobipro.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 2 | 2021-04-15T22:12:33.000Z | 2021-09-04T05:29:32.000Z | python/ccxt/async_support/huobipro.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 1 | 2021-08-23T16:27:34.000Z | 2021-08-23T16:27:34.000Z | python/ccxt/async_support/huobipro.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 2 | 2020-09-08T01:41:24.000Z | 2021-04-30T00:07:59.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.huobi import huobi
class huobipro(huobi):
def describe(self):
# self is an alias for backward-compat... | 27.411765 | 81 | 0.66309 |
ce806f4b60cb150569e05c81b2fe590de1e6df92 | 240 | py | Python | neurec/evaluation/foldout/Precision.py | qiqiding/NeuRec | c4c113d5ef37224bdbb1505b376f1e0668ebb52a | [
"MIT"
] | 24 | 2019-11-19T02:56:02.000Z | 2022-03-03T02:35:53.000Z | neurec/evaluation/foldout/Precision.py | shipjobs/NeuRec-1 | 54099961a52739bc562e9e147e286c0dd9c6acde | [
"MIT"
] | 6 | 2020-01-28T23:07:51.000Z | 2022-02-10T00:23:29.000Z | neurec/evaluation/foldout/Precision.py | shipjobs/NeuRec-1 | 54099961a52739bc562e9e147e286c0dd9c6acde | [
"MIT"
] | 6 | 2019-12-18T07:10:58.000Z | 2022-03-28T14:12:09.000Z | def hit(ranklist, taget_items):
count = 0
for item in ranklist:
if item in taget_items:
count += 1
return count
def getPre(ranklist,taget_items,topK):
return hit(ranklist, taget_items)/topK | 24 | 42 | 0.616667 |
efd0087730d540d98474f0cecb77a91a27874a94 | 4,916 | py | Python | rasa_core_sdk/endpoint.py | yobekiko/rasa_core_sdk | 5da8d7631a7ee83accf3014b5db4f2a0f3463916 | [
"Apache-2.0"
] | null | null | null | rasa_core_sdk/endpoint.py | yobekiko/rasa_core_sdk | 5da8d7631a7ee83accf3014b5db4f2a0f3463916 | [
"Apache-2.0"
] | null | null | null | rasa_core_sdk/endpoint.py | yobekiko/rasa_core_sdk | 5da8d7631a7ee83accf3014b5db4f2a0f3463916 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import str
import argparse
import logging
from flask import Flask, jsonify, request
from flask_cors import CORS, cross_origin
from gevent.pywsgi import WS... | 34.377622 | 80 | 0.649105 |
f9a15db1692f20bbc9963b009efaebae2cae41e0 | 10,151 | py | Python | tests/bgp/test_traffic_shift.py | saravanansv/sonic-mgmt | 677fc0cb2722dba43606957fae75d1cdf852bed7 | [
"Apache-2.0"
] | null | null | null | tests/bgp/test_traffic_shift.py | saravanansv/sonic-mgmt | 677fc0cb2722dba43606957fae75d1cdf852bed7 | [
"Apache-2.0"
] | null | null | null | tests/bgp/test_traffic_shift.py | saravanansv/sonic-mgmt | 677fc0cb2722dba43606957fae75d1cdf852bed7 | [
"Apache-2.0"
] | null | null | null | import pytest
import logging
import ipaddr as ipaddress
from bgp_helpers import parse_rib, verify_all_routes_announce_to_bgpmon,remove_bgp_neighbors,restore_bgp_neighbors
from tests.common.helpers.constants import DEFAULT_ASIC_ID
from tests.common.helpers.assertions import pytest_assert
import re
pytestmark = [
py... | 44.327511 | 157 | 0.667816 |
76bb2ea99b46a4e89b25b5c9cae3f81a52cc036c | 249 | py | Python | python/dask_cudf/dask_cudf/io/__init__.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 239 | 2018-10-10T09:55:22.000Z | 2018-10-28T20:47:23.000Z | python/dask_cudf/dask_cudf/io/__init__.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 25 | 2018-10-10T14:46:32.000Z | 2018-10-28T22:16:14.000Z | python/dask_cudf/dask_cudf/io/__init__.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 19 | 2018-10-10T12:42:51.000Z | 2018-10-26T16:33:22.000Z | # Copyright (c) 2018-2022, NVIDIA CORPORATION.
from .csv import read_csv
from .json import read_json
from .orc import read_orc, to_orc
from .text import read_text
try:
from .parquet import read_parquet, to_parquet
except ImportError:
pass
| 20.75 | 49 | 0.771084 |
2bd2cb1e24dfaf28d6290cefbb8bcbe5c71f4e8d | 24,806 | py | Python | sklearn/linear_model/_glm/glm.py | ikingye/scikit-learn | 3254e98a79e5c1172c794ad38f222dc45f0fb65c | [
"BSD-3-Clause"
] | 3 | 2020-02-28T09:28:09.000Z | 2020-10-12T07:09:40.000Z | sklearn/linear_model/_glm/glm.py | ikingye/scikit-learn | 3254e98a79e5c1172c794ad38f222dc45f0fb65c | [
"BSD-3-Clause"
] | 2 | 2019-07-11T13:48:42.000Z | 2020-08-09T18:30:36.000Z | sklearn/linear_model/_glm/glm.py | ikingye/scikit-learn | 3254e98a79e5c1172c794ad38f222dc45f0fb65c | [
"BSD-3-Clause"
] | 1 | 2021-09-06T08:42:02.000Z | 2021-09-06T08:42:02.000Z | """
Generalized Linear Models with Exponential Dispersion Family
"""
# Author: Christian Lorentzen <lorentzen.ch@googlemail.com>
# some parts and tricks stolen from other sklearn files.
# License: BSD 3 clause
import numbers
import numpy as np
import scipy.optimize
from ...base import BaseEstimator, RegressorMixin
... | 37.190405 | 79 | 0.577925 |
21a0d12dd4d65b15dbccd6ad818125669c25e069 | 3,975 | py | Python | models.py | susheels/gnns-and-local-assortativity | 79be99b70a5e34d8a17f638d7a32466df924becb | [
"MIT"
] | 12 | 2021-06-28T03:31:58.000Z | 2022-03-31T02:51:53.000Z | models.py | susheels/gnns-and-local-assortativity | 79be99b70a5e34d8a17f638d7a32466df924becb | [
"MIT"
] | null | null | null | models.py | susheels/gnns-and-local-assortativity | 79be99b70a5e34d8a17f638d7a32466df924becb | [
"MIT"
] | 1 | 2022-01-23T05:22:46.000Z | 2022-01-23T05:22:46.000Z | import torch
import torch.nn.functional as F
from torch.nn import Sequential, Linear, ReLU
from torch_geometric.nn import GCNConv, GINConv, SAGEConv
from wrgat import WeightedRGATConv, GATConv
from wrgcn import WeightedRGCNConv
class WRGAT(torch.nn.Module):
def __init__(self, num_features, num_classes, num_relation... | 34.267241 | 114 | 0.725535 |
a0f373c6ac7ed863d500dac3c5c84323d13ba21f | 3,883 | py | Python | warehouse/sentry.py | fairhopeweb/warehouse | 7d8ef742e8fe6b401190c28ce56761848041c89f | [
"Apache-2.0"
] | 3,103 | 2015-01-30T00:24:10.000Z | 2022-03-31T23:21:39.000Z | warehouse/sentry.py | fairhopeweb/warehouse | 7d8ef742e8fe6b401190c28ce56761848041c89f | [
"Apache-2.0"
] | 6,709 | 2015-01-05T01:23:20.000Z | 2022-03-31T14:49:46.000Z | warehouse/sentry.py | fairhopeweb/warehouse | 7d8ef742e8fe6b401190c28ce56761848041c89f | [
"Apache-2.0"
] | 959 | 2015-01-12T22:22:40.000Z | 2022-03-31T22:21:51.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 Li... | 39.622449 | 82 | 0.725212 |
84d1d34bd78674186d1a3c9034c637adcdd5ebb6 | 12,007 | py | Python | homeassistant/components/abode/__init__.py | dzmitov/core | 7697ef7f5ec357ae5ab76237dc52af55fc044c36 | [
"Apache-2.0"
] | 1 | 2021-01-14T11:42:12.000Z | 2021-01-14T11:42:12.000Z | homeassistant/components/abode/__init__.py | dzmitov/core | 7697ef7f5ec357ae5ab76237dc52af55fc044c36 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/abode/__init__.py | dzmitov/core | 7697ef7f5ec357ae5ab76237dc52af55fc044c36 | [
"Apache-2.0"
] | 1 | 2020-09-23T16:41:16.000Z | 2020-09-23T16:41:16.000Z | """Support for the Abode Security System."""
from asyncio import gather
from copy import deepcopy
from functools import partial
from abodepy import Abode
from abodepy.exceptions import AbodeException
import abodepy.helpers.timeline as TIMELINE
from requests.exceptions import ConnectTimeout, HTTPError
import voluptuous... | 29.428922 | 88 | 0.660615 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.