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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e267bc4acfd6d4776608d17cfb3aaba69c932c1e | 660 | py | Python | backend/src/utils.py | jonas-scholz123/boomer-humour-exhumer | ca7110eed220b3805f29a1cef45c3ce04bfdbceb | [
"MIT"
] | null | null | null | backend/src/utils.py | jonas-scholz123/boomer-humour-exhumer | ca7110eed220b3805f29a1cef45c3ce04bfdbceb | [
"MIT"
] | null | null | null | backend/src/utils.py | jonas-scholz123/boomer-humour-exhumer | ca7110eed220b3805f29a1cef45c3ce04bfdbceb | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import config
def imshow(img):
img = img / 2 + 0.5 # unnormalize
npimg = img.numpy()
plt.imshow(np.transpose(npimg, (1, 2, 0)))
plt.show()
class ConceptNetDict:
def __init__(self):
path = config.paths["embeddings"]... | 23.571429 | 67 | 0.613636 |
89ea3f60af5dbb14dba2b4c971f2474c30d72f44 | 14,363 | py | Python | michi/geocoder/street_stretch.py | fractalphile/michi | 449c784929e84b9d47728b8af4db8db2e292fb67 | [
"MIT"
] | null | null | null | michi/geocoder/street_stretch.py | fractalphile/michi | 449c784929e84b9d47728b8af4db8db2e292fb67 | [
"MIT"
] | 1 | 2019-07-12T11:58:59.000Z | 2019-07-12T11:58:59.000Z | michi/geocoder/street_stretch.py | fractalphile/michi | 449c784929e84b9d47728b8af4db8db2e292fb67 | [
"MIT"
] | 1 | 2019-07-10T20:58:31.000Z | 2019-07-10T20:58:31.000Z | from collections import OrderedDict
import itertools
import pandas as pd
from shapely.geometry import LineString
from shapely.ops import linemerge
from ..utils.utils import drop_consecutive_duplicates
class StreetStretch:
"""
An object that represents a "stretch" - usually a list of segments along
a sing... | 35.640199 | 90 | 0.571399 |
d338ee4b6afb2413043beb23273fdefd42953ab6 | 2,483 | py | Python | extract_moments_in_time_frames_hdf5.py | ombretta/3D-ResNets-PyTorch | a5b0f092c36c5256257ba854fbc50718c35244fb | [
"MIT"
] | null | null | null | extract_moments_in_time_frames_hdf5.py | ombretta/3D-ResNets-PyTorch | a5b0f092c36c5256257ba854fbc50718c35244fb | [
"MIT"
] | null | null | null | extract_moments_in_time_frames_hdf5.py | ombretta/3D-ResNets-PyTorch | a5b0f092c36c5256257ba854fbc50718c35244fb | [
"MIT"
] | 1 | 2020-12-22T11:24:38.000Z | 2020-12-22T11:24:38.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 28 11:55:57 2021
@author: ombretta
"""
import cv2
import os
import h5py
import numpy as np
def extract_frames(video_path, video_dest):
with h5py.File(video_dest, "w") as h5_file:
cap = cv2.VideoCapture(video_path)
... | 31.0375 | 86 | 0.566653 |
a13c389f636fb1edeef9104cf719ae074bd69253 | 4,495 | py | Python | src/olympia/reviewers/urls.py | hiikezoe/addons-server | 1574d92fae097796b40b54579e3c7eeb876d6e32 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/reviewers/urls.py | hiikezoe/addons-server | 1574d92fae097796b40b54579e3c7eeb876d6e32 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/reviewers/urls.py | hiikezoe/addons-server | 1574d92fae097796b40b54579e3c7eeb876d6e32 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from django.shortcuts import redirect
from olympia.addons.urls import ADDON_ID
from olympia.reviewers import views, views_themes
# All URLs under /editors/
urlpatterns = (
url(r'^$', views.dashboard, name='reviewers.dashboard'),
url(r'^dashboard$',
lambda request: red... | 49.395604 | 79 | 0.685428 |
2e63d6376cb08db256c4cd1c57318e51d7e46019 | 6,249 | py | Python | Bot/src/funhouse/reddit.py | AryamanSrii/Mecha-Karen | 4a5c7318f8c458495eee72a13be5db8a0113ed28 | [
"Apache-2.0"
] | 181 | 2021-05-26T17:37:40.000Z | 2022-02-26T08:36:07.000Z | Bot/src/funhouse/reddit.py | AryamanSrii/Mecha-Karen | 4a5c7318f8c458495eee72a13be5db8a0113ed28 | [
"Apache-2.0"
] | 24 | 2021-05-14T19:47:34.000Z | 2021-09-06T17:16:17.000Z | Bot/src/funhouse/reddit.py | AryamanSrii/Mecha-Karen | 4a5c7318f8c458495eee72a13be5db8a0113ed28 | [
"Apache-2.0"
] | 16 | 2021-07-02T09:40:56.000Z | 2022-01-21T10:07:08.000Z | # !/usr/bin/python
"""
Copyright ©️: 2020 Seniatical / _-*™#7519
License: Apache 2.0
A permissive license whose main conditions require preservation of copyright and license notices.
Contributors provide an express grant of patent rights.
Licensed works, modifications, and larger works may be distributed under differe... | 42.80137 | 155 | 0.590174 |
de8e33f961552427074b3a95c39a853ee3a84b93 | 1,673 | py | Python | io_scene_xray/hotkeys.py | ed8rez/blender-xray | 543ae9c40dc706216552d92b7f7b7c9d8da9dbf3 | [
"BSD-2-Clause"
] | 1 | 2021-02-14T11:52:25.000Z | 2021-02-14T11:52:25.000Z | io_scene_xray/hotkeys.py | ed8rez/blender-xray | 543ae9c40dc706216552d92b7f7b7c9d8da9dbf3 | [
"BSD-2-Clause"
] | null | null | null | io_scene_xray/hotkeys.py | ed8rez/blender-xray | 543ae9c40dc706216552d92b7f7b7c9d8da9dbf3 | [
"BSD-2-Clause"
] | null | null | null | import bpy
from .obj.imp.ops import OpImportObject
from .obj.exp.ops import OpExportObjects
class KayMap():
def __init__(self):
self.key = None
self.text = None
self.operator_id = None
self.shift = False
self.ctrl = False
self.alt = False
self.key_modifier ... | 24.246377 | 77 | 0.699342 |
fa72b0ae1a170b207348d4ae5df9e8481547e41c | 5,891 | py | Python | examples/3_Authentication.py | ktmeaton/basespace-python3-sdk | 7209517f213e626bf9b227a781de1bf8eee9f88e | [
"Apache-2.0"
] | null | null | null | examples/3_Authentication.py | ktmeaton/basespace-python3-sdk | 7209517f213e626bf9b227a781de1bf8eee9f88e | [
"Apache-2.0"
] | null | null | null | examples/3_Authentication.py | ktmeaton/basespace-python3-sdk | 7209517f213e626bf9b227a781de1bf8eee9f88e | [
"Apache-2.0"
] | null | null | null | """
Copyright 2012 Illumina
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
di... | 37.762821 | 137 | 0.748939 |
e5f206a9d16d493aabafba459722289b6aebf5d7 | 4,020 | py | Python | cwlkernel/AutoCompleteEngine.py | fabricebrito/CWLJNIKernel | c87d9d1ae326bb198c4b8e14836ce934b9841c0d | [
"Apache-2.0"
] | 4 | 2020-02-28T16:03:26.000Z | 2021-03-28T12:58:25.000Z | cwlkernel/AutoCompleteEngine.py | fabricebrito/CWLJNIKernel | c87d9d1ae326bb198c4b8e14836ce934b9841c0d | [
"Apache-2.0"
] | 1 | 2020-12-09T11:06:42.000Z | 2020-12-09T19:08:23.000Z | cwlkernel/AutoCompleteEngine.py | fabricebrito/CWLJNIKernel | c87d9d1ae326bb198c4b8e14836ce934b9841c0d | [
"Apache-2.0"
] | 3 | 2020-04-10T15:09:11.000Z | 2020-12-09T11:26:24.000Z | import re
from typing import Dict, Iterable, Optional, Callable, Tuple, List
from pygtrie import CharTrie
class AutoCompleteEngine:
"""
AutoCompleteEngine generates suggestions given a users input.
"""
def __init__(self, magic_commands: Optional[Iterable[str]]):
self._magics_args_suggesters:... | 43.225806 | 113 | 0.612438 |
ee9020ebeaa8c120bb6b7677807a8960a59ed303 | 21,682 | py | Python | landlab/components/space/space.py | cctrunz/landlab | 4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939 | [
"MIT"
] | null | null | null | landlab/components/space/space.py | cctrunz/landlab | 4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939 | [
"MIT"
] | 1 | 2016-03-16T02:34:08.000Z | 2016-04-20T19:31:30.000Z | landlab/components/space/space.py | cctrunz/landlab | 4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939 | [
"MIT"
] | null | null | null | import numpy as np
from landlab.components.erosion_deposition.generalized_erosion_deposition import (
DEFAULT_MINIMUM_TIME_STEP,
_GeneralizedErosionDeposition,
)
from landlab.utils.return_array import return_array_at_node
from .cfuncs import calculate_qs_in
ROOT2 = np.sqrt(2.0) # syntactic sugar for precalc... | 37.254296 | 153 | 0.559127 |
c12927af3a029e0584489c9d1e0f71d750ae829f | 1,868 | py | Python | .github/workflows/postgresql_settings.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 1,544 | 2015-01-01T22:16:31.000Z | 2022-03-31T19:17:45.000Z | .github/workflows/postgresql_settings.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 1,686 | 2015-01-02T18:26:31.000Z | 2022-03-31T20:12:03.000Z | .github/workflows/postgresql_settings.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 867 | 2015-01-02T21:01:54.000Z | 2022-03-29T00:28:27.000Z | """
Evennia settings file.
The available options are found in the default settings file found
here:
/home/griatch/Devel/Home/evennia/evennia/evennia/settings_default.py
Remember:
Don't copy more from the default file than you actually intend to
change; this will make sure that you don't overload upstream updates
un... | 30.622951 | 70 | 0.62152 |
dad379baaee79b811b22b22f501741544b483d6b | 1,835 | py | Python | aiokraken/websockets/schemas/unsubscribe.py | asmodehn/aiokraken | b260bd41d5aa091e6a4f1818328426fbe6f625c0 | [
"MIT"
] | null | null | null | aiokraken/websockets/schemas/unsubscribe.py | asmodehn/aiokraken | b260bd41d5aa091e6a4f1818328426fbe6f625c0 | [
"MIT"
] | 82 | 2019-08-30T09:37:49.000Z | 2022-03-29T14:53:22.000Z | aiokraken/websockets/schemas/unsubscribe.py | asmodehn/aiokraken | b260bd41d5aa091e6a4f1818328426fbe6f625c0 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
import typing
from marshmallow import fields, post_load, post_dump, pre_load, pre_dump
from aiokraken.rest.schemas.base import BaseSchema
from aiokraken.websockets.schemas.subscribe import Subscription, SubscriptionSchema
@dataclass(frozen=True)
class Unsubscribe:
subs... | 26.594203 | 124 | 0.66158 |
e4d10182ff87fb56988884cc61ae63704f69a03e | 994 | py | Python | scripts/disc_ssl_https.py | leshak/zabbix-ssl-nginx | efed212bbb17a32dddc9d30beb354c040ba63f65 | [
"MIT"
] | null | null | null | scripts/disc_ssl_https.py | leshak/zabbix-ssl-nginx | efed212bbb17a32dddc9d30beb354c040ba63f65 | [
"MIT"
] | null | null | null | scripts/disc_ssl_https.py | leshak/zabbix-ssl-nginx | efed212bbb17a32dddc9d30beb354c040ba63f65 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import crossplane
import json
NGINX_CONFIG_PATH = '/etc/nginx/nginx.conf'
HTTPS_PORT = 'ssl'
domainsList = []
nginxConfig = crossplane.parse(NGINX_CONFIG_PATH)
if nginxConfig['config']:
for cfile in nginxConfig['config']:
for parsed in cfile['parsed']:
... | 26.157895 | 97 | 0.512072 |
75c59fb9e7d8db6973c74d7c3e7544c27854509d | 63 | py | Python | utils/__init__.py | Misterion777/ConceptFlow | 50cedc4b1db1d0311ce98af6088609812bc71934 | [
"MIT"
] | 107 | 2020-05-02T07:41:13.000Z | 2022-02-23T07:36:20.000Z | utils/__init__.py | Misterion777/ConceptFlow | 50cedc4b1db1d0311ce98af6088609812bc71934 | [
"MIT"
] | 25 | 2020-05-02T08:13:41.000Z | 2022-03-12T00:27:57.000Z | utils/__init__.py | Misterion777/ConceptFlow | 50cedc4b1db1d0311ce98af6088609812bc71934 | [
"MIT"
] | 15 | 2020-05-18T12:30:51.000Z | 2022-02-15T01:16:51.000Z | from .utils import padding, padding_triple_id, build_kb_adj_mat | 63 | 63 | 0.873016 |
dc4aa435613b92ebc97ffc682ff5b7d035d072b5 | 10,035 | py | Python | anyex/bxinth.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | anyex/bxinth.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | anyex/bxinth.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/anyex/anyex/blob/master/CONTRIBUTING.md#how-to-contribute-code
from anyex.base.exchange import Exchange
from anyex.base.errors import ExchangeError
class bxinth (Exchange):
def describe(self):
... | 35.087413 | 126 | 0.47703 |
b11f82b119d199041baa20b4a479f12fb0759d21 | 1,355 | py | Python | tests/test_resource_loader.py | Mattlk13/python-percy-client | c6add77bb5a45d0d57ea579bea577086db114cab | [
"MIT"
] | 22 | 2016-06-06T18:52:47.000Z | 2019-08-05T20:05:50.000Z | tests/test_resource_loader.py | Mattlk13/python-percy-client | c6add77bb5a45d0d57ea579bea577086db114cab | [
"MIT"
] | 85 | 2016-06-08T17:16:12.000Z | 2020-07-08T05:00:10.000Z | tests/test_resource_loader.py | startupgrind/python-percy-client | 8c6ce83c74b9dbe51beadac5923f5d9f1d999f58 | [
"MIT"
] | 23 | 2016-07-01T17:30:29.000Z | 2021-01-13T16:33:55.000Z | import unittest
import os
from percy.resource_loader import ResourceLoader
TEST_FILES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'testdata')
class FakeWebdriver(object):
page_source = 'foo'
current_url = '/'
class FakeWebdriverAbsoluteUrl(object):
page_source = 'foo'
current_url... | 33.875 | 85 | 0.695941 |
73c04e6552775f3e153965812e47e57a749742e1 | 2,129 | py | Python | setup.py | dduraipandian/scrapqd | 7515ebebd54506af765c65e5c9b14331208e6cf6 | [
"MIT"
] | null | null | null | setup.py | dduraipandian/scrapqd | 7515ebebd54506af765c65e5c9b14331208e6cf6 | [
"MIT"
] | 2 | 2022-03-14T00:42:59.000Z | 2022-03-15T15:50:14.000Z | setup.py | dduraipandian/scrapqd | 7515ebebd54506af765c65e5c9b14331208e6cf6 | [
"MIT"
] | null | null | null | import sys
from os import path
import setuptools
from setuptools.command.test import test as TestCommand # noqa
import scrapqd
DIR = path.abspath(path.dirname(__file__))
with open("README.rst") as f:
readme = f.read()
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_option... | 28.013158 | 70 | 0.612494 |
31445e474b76e20911fafe71d90958703aebb8ae | 5,833 | py | Python | gen_kinesis_data.new.py | alfredcs/marketTrend | 3a6afa04a3cb21f7d624a0169da6a733eaa7ab22 | [
"MIT"
] | null | null | null | gen_kinesis_data.new.py | alfredcs/marketTrend | 3a6afa04a3cb21f7d624a0169da6a733eaa7ab22 | [
"MIT"
] | null | null | null | gen_kinesis_data.new.py | alfredcs/marketTrend | 3a6afa04a3cb21f7d624a0169da6a733eaa7ab22 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
# vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab
import sys
import csv
import json
import argparse
from collections import OrderedDict
import base64
import traceback
import random
import time
from datetime import datetime
import pandas as pd
import boto3
import twint
import nest_asyncio
... | 34.111111 | 189 | 0.681468 |
7b1b45949984f3dbe596d2c3aeb036f918184590 | 1,688 | py | Python | parser.py | NyoNyoHtwe/Python-exercises | ef060239dcf2d21ee5cde8a1326af6d130d662ed | [
"MIT"
] | null | null | null | parser.py | NyoNyoHtwe/Python-exercises | ef060239dcf2d21ee5cde8a1326af6d130d662ed | [
"MIT"
] | null | null | null | parser.py | NyoNyoHtwe/Python-exercises | ef060239dcf2d21ee5cde8a1326af6d130d662ed | [
"MIT"
] | null | null | null |
class ParserError(Exception):
pass
class Sentence(object):
def __init__(self, subject, verb, obj):
# remember we take ('noun','princess') tuples and convert them
self.subject = subject[1]
self.verb = verb[1]
self.object = obj[1]
def peek(word_list):
if word_lis... | 23.444444 | 72 | 0.613152 |
b3bd09c3ed4813548f547d03b1b4717965ec50e5 | 10,259 | py | Python | scalabel/label/utils.py | scalabel/scalabel | 857a32e1c08e5b9a7ab346468940621c2fe2226a | [
"Apache-2.0"
] | 279 | 2019-11-18T01:48:39.000Z | 2022-03-30T00:16:43.000Z | scalabel/label/utils.py | elrichgro/scalabel | 9be76e8976e936d357f3153ca195eac2d7d8f120 | [
"Apache-2.0"
] | 141 | 2019-11-20T02:36:11.000Z | 2022-03-29T15:17:46.000Z | scalabel/label/utils.py | elrichgro/scalabel | 9be76e8976e936d357f3153ca195eac2d7d8f120 | [
"Apache-2.0"
] | 85 | 2019-11-18T06:10:12.000Z | 2022-03-27T12:32:55.000Z | """Utility functions for label."""
import math
from typing import Dict, List, Optional, Tuple
import numpy as np
import pytest
from scipy.spatial.transform import Rotation
from ..common.typing import NDArrayF64
from .typing import Category, Extrinsics, Frame, FrameGroup, Intrinsics, Label
def get_intrinsics_from_ma... | 35.254296 | 78 | 0.599376 |
b694476f105f4ee3ea43fb77b318c1b89bb31179 | 3,496 | py | Python | src/triangulator.py | agusalex/Wireless-Sensor-Tracking | 93a39f629ab485457db7b5b447828425c846a12e | [
"MIT"
] | 3 | 2019-05-23T06:46:58.000Z | 2019-05-30T12:48:01.000Z | src/triangulator.py | agusalex/triangulation | 93a39f629ab485457db7b5b447828425c846a12e | [
"MIT"
] | 2 | 2021-05-24T19:08:33.000Z | 2021-05-24T19:24:31.000Z | src/triangulator.py | agusalex/triangulation | 93a39f629ab485457db7b5b447828425c846a12e | [
"MIT"
] | null | null | null | from src.models.packet import Packet
from src.db_utils import db_interact
from src.graph import draw
from src.models.circle import Circle
from src.models.point import Point
from src.models.sniffer import Sniffer
from src.models.packet import Packet
from src.models.triangulation import Triangulation
from itertools impor... | 38.844444 | 142 | 0.728261 |
7d31fd739532fb05b395eeb50f0a167044fe1e68 | 493 | py | Python | mbox/scripts/python/echo-server.py | mrjamiebowman/mbox | a0628d05c5e84c6b29dda7db03336dfb9b2bd197 | [
"Apache-2.0"
] | 3 | 2020-12-20T06:16:43.000Z | 2022-03-14T05:14:01.000Z | mbox/scripts/python/echo-server.py | mrjamiebowman/mbox | a0628d05c5e84c6b29dda7db03336dfb9b2bd197 | [
"Apache-2.0"
] | null | null | null | mbox/scripts/python/echo-server.py | mrjamiebowman/mbox | a0628d05c5e84c6b29dda7db03336dfb9b2bd197 | [
"Apache-2.0"
] | 1 | 2022-03-14T05:23:14.000Z | 2022-03-14T05:23:14.000Z | #!/usr/bin/env python3
import socket
HOST = '0.0.0.0' # Standard loopback interface address (localhost)
PORT = 8080 # Port to listen on (non-privileged ports are > 1023)
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((HOST, PORT))
s.listen()
conn, addr = s.accept()
with c... | 27.388889 | 72 | 0.588235 |
0141060f8177125a4a6738d3708a8d448159be87 | 8,975 | py | Python | tests/test_data/test_datasets/test_sot_dataset.py | LJoson/mmtracking | af471f07d2d2e5b30862c39f4d576a0a0fb81e69 | [
"Apache-2.0"
] | null | null | null | tests/test_data/test_datasets/test_sot_dataset.py | LJoson/mmtracking | af471f07d2d2e5b30862c39f4d576a0a0fb81e69 | [
"Apache-2.0"
] | null | null | null | tests/test_data/test_datasets/test_sot_dataset.py | LJoson/mmtracking | af471f07d2d2e5b30862c39f4d576a0a0fb81e69 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import os
import os.path as osp
import tempfile
import mmcv
import numpy as np
import pytest
from mmtrack.datasets import DATASETS as DATASETS
PREFIX = osp.join(osp.dirname(__file__), '../../data')
SOT_DATA_PREFIX = f'{PREFIX}/demo_sot_data'
DATASET_INFOS = dict(
G... | 35.058594 | 79 | 0.65415 |
3a4491083c6073893000d3d86a997247a7a8ee70 | 8,088 | py | Python | src/sst/elements/memHierarchy/tests/testCachLineTrack.py | Xiaoyang-Lu/sst-elements | 7946241e9f5a57a0bfdbfbf8452deacb1c3a9051 | [
"BSD-3-Clause"
] | null | null | null | src/sst/elements/memHierarchy/tests/testCachLineTrack.py | Xiaoyang-Lu/sst-elements | 7946241e9f5a57a0bfdbfbf8452deacb1c3a9051 | [
"BSD-3-Clause"
] | null | null | null | src/sst/elements/memHierarchy/tests/testCachLineTrack.py | Xiaoyang-Lu/sst-elements | 7946241e9f5a57a0bfdbfbf8452deacb1c3a9051 | [
"BSD-3-Clause"
] | null | null | null | # Automatically generated SST Python input
import sst
# Define the simulation components
# cores with private L1/L2
# Shared distributed LLCs
# All caches have prefetchers and limit prefetching
cores = 6
caches = 3 # Number of LLCs on the network
memories = 2
coreclock = "2.4GHz"
uncoreclock = "1.4GHz"
coherence = ... | 40.238806 | 173 | 0.55094 |
ed34d17ee74978b34c20c3bb478f1c4d60658ca6 | 1,333 | py | Python | mindhome_alpha/erpnext/accounts/doctype/bank_account/test_bank_account.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | mindhome_alpha/erpnext/accounts/doctype/bank_account/test_bank_account.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | null | null | null | mindhome_alpha/erpnext/accounts/doctype/bank_account/test_bank_account.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe import ValidationError
import unittest
# test_records = frappe.get_test_records('Bank Account')
class TestBankAccount... | 26.66 | 80 | 0.722431 |
2318f4e9045e0f232a529c136942b0067e8e4844 | 32,610 | py | Python | pymks/tools.py | wd15/pymks-clean | 97a4145c56626f6a1dea5c3a67dbaf83d3372446 | [
"MIT"
] | null | null | null | pymks/tools.py | wd15/pymks-clean | 97a4145c56626f6a1dea5c3a67dbaf83d3372446 | [
"MIT"
] | null | null | null | pymks/tools.py | wd15/pymks-clean | 97a4145c56626f6a1dea5c3a67dbaf83d3372446 | [
"MIT"
] | null | null | null | import matplotlib.colors as colors
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.axes_grid1 import make_axes_locatable
from sklearn.learning_curve import learning_curve
from .stats import _auto_correlations
from .stats import _cross_correlations
import numpy as np
import warn... | 37.353952 | 79 | 0.62398 |
594f74feef3ebb775d5dad1147ea0f3bd26329c1 | 151 | py | Python | snippets/python/utils/reshape/walk_tree.py | c6401/Snippets | a88d97005658eeda99f1a2766e3d069a64e142cb | [
"MIT"
] | null | null | null | snippets/python/utils/reshape/walk_tree.py | c6401/Snippets | a88d97005658eeda99f1a2766e3d069a64e142cb | [
"MIT"
] | null | null | null | snippets/python/utils/reshape/walk_tree.py | c6401/Snippets | a88d97005658eeda99f1a2766e3d069a64e142cb | [
"MIT"
] | null | null | null | def walk_tree(tree, key='children'):
for item in tree:
yield item
if key in tree:
yield from walk_tree(tree[key], key)
| 25.166667 | 48 | 0.582781 |
6b11becd79a1257eed8ba9977568850e156a6b39 | 12,337 | py | Python | tensorflow_quantum/core/ops/batch_util_test.py | lockwo/quantum | de57af9330ac7f5bf8298d202081c29fb2a956b8 | [
"Apache-2.0"
] | 2 | 2020-12-24T06:27:28.000Z | 2021-12-30T17:42:45.000Z | tensorflow_quantum/core/ops/batch_util_test.py | lockwo/quantum | de57af9330ac7f5bf8298d202081c29fb2a956b8 | [
"Apache-2.0"
] | null | null | null | tensorflow_quantum/core/ops/batch_util_test.py | lockwo/quantum | de57af9330ac7f5bf8298d202081c29fb2a956b8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorFlow Quantum 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... | 39.415335 | 80 | 0.596904 |
d6cb966415f00fb0883872e3a6270dd76f2fd2d3 | 910 | py | Python | idmap/version.py | tkhyn/django-idmap | 383124fc4bd537d053f9d4c0d02a498f66831baa | [
"BSD-2-Clause"
] | 1 | 2021-04-24T16:35:15.000Z | 2021-04-24T16:35:15.000Z | idmap/version.py | tkhyn/django-idmap | 383124fc4bd537d053f9d4c0d02a498f66831baa | [
"BSD-2-Clause"
] | null | null | null | idmap/version.py | tkhyn/django-idmap | 383124fc4bd537d053f9d4c0d02a498f66831baa | [
"BSD-2-Clause"
] | 1 | 2021-02-27T14:45:48.000Z | 2021-02-27T14:45:48.000Z | """
Defines __version__ from __version_info__
"""
import subprocess
__version_info__ = (1, 0, 4, 'alpha', 0)
def get_version(version=__version_info__):
dev_st = {'alpha': 'a', 'beta': 'b', 'rc': 'c', 'final': ''}
assert len(version) == 5
assert version[3] in dev_st.keys()
n = 2 + ... | 23.947368 | 80 | 0.541758 |
623382086a16b1764ddcb1c50183b899acd065a7 | 2,434 | py | Python | romclean-pass2.py | gatesphere/romclean | 1a2bc70c691166d8199bced19ed982a26af8b6dc | [
"Unlicense"
] | null | null | null | romclean-pass2.py | gatesphere/romclean | 1a2bc70c691166d8199bced19ed982a26af8b6dc | [
"Unlicense"
] | null | null | null | romclean-pass2.py | gatesphere/romclean | 1a2bc70c691166d8199bced19ed982a26af8b6dc | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import os
mypath = os.getcwd()
kill_file = os.path.join(mypath, 'kill.lis')
error_file = os.path.join(mypath, 'error.lis')
keep_file = os.path.join(mypath, 'keep.lis')
# get files in current path
files = [f for f in os.listdir(mypath) if os.path.isfile(os.path.join(mypath, f))]
matches = {}
p... | 25.354167 | 86 | 0.612983 |
3a7eb3ae5b7a7f8e9a7b39ae989344289803c1ae | 2,882 | py | Python | include/__init__.py | maxfischer2781/include | d8b0404f4996b6abcd39fdebf282b31fad8bb6f5 | [
"MIT"
] | 1 | 2020-07-06T22:56:18.000Z | 2020-07-06T22:56:18.000Z | include/__init__.py | maxfischer2781/include | d8b0404f4996b6abcd39fdebf282b31fad8bb6f5 | [
"MIT"
] | 2 | 2017-06-09T12:50:31.000Z | 2022-03-28T11:28:33.000Z | include/__init__.py | maxfischer2781/include | d8b0404f4996b6abcd39fdebf282b31fad8bb6f5 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import sys
import weakref
# weak reference to installed hooks
_IMPORT_HOOKS = weakref.WeakValueDictionary()
# must have _IMPORT_HOOKS to bootstrap hook disabling
from .inhibit import DISABLED_TYPES
def path(file_path):
"""
Include module code from a file identified by i... | 31.326087 | 114 | 0.70923 |
da2dd30df2066e05833a12c3dc08e2974c0bd71b | 5,945 | py | Python | venv/Lib/site-packages/pandas/tests/frame/methods/test_asof.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/frame/methods/test_asof.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/frame/methods/test_asof.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from pandas._libs.tslibs import IncompatibleFrequency
from pandas import (
DataFrame,
Period,
Series,
Timestamp,
date_range,
period_range,
to_datetime,
)
import pandas._testing as tm
@pytest.fixture
def date_range_frame():
"""
... | 33.212291 | 85 | 0.557443 |
5a162008785960f2d37040da497d21ab459be11e | 2,472 | py | Python | build/lib/emojipasta/moderation.py | musca1997/emojipasta-bot | 408794733c988260176a0b41325e079342e146d3 | [
"MIT"
] | 10 | 2018-04-09T17:15:40.000Z | 2020-10-16T01:06:53.000Z | build/lib/emojipasta/moderation.py | musca1997/emojipasta-bot | 408794733c988260176a0b41325e079342e146d3 | [
"MIT"
] | 17 | 2018-04-15T01:14:20.000Z | 2019-08-04T11:19:37.000Z | build/lib/emojipasta/moderation.py | musca1997/emojipasta-bot | 408794733c988260176a0b41325e079342e146d3 | [
"MIT"
] | 13 | 2018-04-15T00:57:45.000Z | 2022-01-15T02:04:47.000Z | import discord
from discord.ext import commands
class Moderation:
def __init__(self, client):
self.client = client
@commands.command(pass_context=True)
async def ban(self, ctx, target: discord.User, *reason):
try:
if (ctx.message.author.server_permissions.ban_members == True):
... | 47.538462 | 128 | 0.60801 |
c121b5b2674454f3b739d07cf2ead6a0d9b4aa46 | 14,448 | py | Python | data_as_code/_recipe.py | Mikuana/data_as_code | 339f0c6bcd4e318ad925ceb4ccd6149f980d4032 | [
"MIT"
] | 2 | 2021-05-18T22:04:22.000Z | 2021-07-24T19:52:49.000Z | data_as_code/_recipe.py | Mikuana/data_as_code | 339f0c6bcd4e318ad925ceb4ccd6149f980d4032 | [
"MIT"
] | 1 | 2021-03-12T22:56:45.000Z | 2021-03-12T22:56:45.000Z | data_as_code/_recipe.py | Mikuana/data_as_code | 339f0c6bcd4e318ad925ceb4ccd6149f980d4032 | [
"MIT"
] | null | null | null | import difflib
import gzip
import json
import logging
import os
import tarfile
from enum import Enum, auto
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Union, Dict, Type, List
from data_as_code._metadata import validate_metadata
from data_as_code._step import Step
__all__ = ['Re... | 37.333333 | 94 | 0.60389 |
b67604ceeeecd28156adea9318f23e10be675b04 | 22,284 | py | Python | glance/api/v2/image_data.py | shangxinjinxingzhong/glance | 3084dadc47c4f120854f9e9216c77f0ae53b2504 | [
"Apache-2.0"
] | null | null | null | glance/api/v2/image_data.py | shangxinjinxingzhong/glance | 3084dadc47c4f120854f9e9216c77f0ae53b2504 | [
"Apache-2.0"
] | null | null | null | glance/api/v2/image_data.py | shangxinjinxingzhong/glance | 3084dadc47c4f120854f9e9216c77f0ae53b2504 | [
"Apache-2.0"
] | null | null | null | # Copyright 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/licenses/LICENSE-2.0
#
# Unless req... | 43.354086 | 79 | 0.562601 |
9668a75dddb231e172724d0723819151cf1eb710 | 2,169 | py | Python | sunnysouth/marketplace/migrations/0003_auto_20210922_0754.py | EdwinBaeza05/django-genricsl-app | a8759d609957e80883cca79f0694d494364775a4 | [
"MIT"
] | null | null | null | sunnysouth/marketplace/migrations/0003_auto_20210922_0754.py | EdwinBaeza05/django-genricsl-app | a8759d609957e80883cca79f0694d494364775a4 | [
"MIT"
] | null | null | null | sunnysouth/marketplace/migrations/0003_auto_20210922_0754.py | EdwinBaeza05/django-genricsl-app | a8759d609957e80883cca79f0694d494364775a4 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2021-09-22 07:54
from django.db import migrations, models
import django.db.models.deletion
import sunnysouth.lib.models
import sunnysouth.marketplace.models.assets
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
... | 45.1875 | 156 | 0.623329 |
b705aebee84e2fd3b89730029d8c40a871a9c22f | 1,251 | py | Python | hse2/__init__.py | smoyergh/hse-python | b56a5477e69d890591f80e94554a0c92c06ae4e6 | [
"Apache-2.0"
] | null | null | null | hse2/__init__.py | smoyergh/hse-python | b56a5477e69d890591f80e94554a0c92c06ae4e6 | [
"Apache-2.0"
] | 6 | 2021-11-10T20:48:07.000Z | 2021-12-06T16:48:59.000Z | hse2/__init__.py | smoyergh/hse-python | b56a5477e69d890591f80e94554a0c92c06ae4e6 | [
"Apache-2.0"
] | 1 | 2021-08-24T00:26:35.000Z | 2021-08-24T00:26:35.000Z | # SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2020 Micron Technology, Inc. All rights reserved.
"""
The HSE library is generally described in other places. The documentation here is
geared towards describing the structure of the HSE API and the specifics of each
entry point's operation.
Terminology:
KVS ... | 35.742857 | 81 | 0.646683 |
1743614a178a9bb483503e78afb3fa7cc2478f0d | 147 | py | Python | src/bee/log/__init__.py | awenhaowenchao/bee | cac7522f8994aa3067c6e0a1bb3613de5c577129 | [
"MIT"
] | 4 | 2019-11-12T05:01:42.000Z | 2022-02-23T01:52:11.000Z | src/bee/log/__init__.py | awenhaowenchao/bee | cac7522f8994aa3067c6e0a1bb3613de5c577129 | [
"MIT"
] | 6 | 2021-03-19T08:13:39.000Z | 2022-03-02T15:00:19.000Z | src/bee/log/__init__.py | awenhaowenchao/bee | cac7522f8994aa3067c6e0a1bb3613de5c577129 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'wenchao.hao'
"""
log package.
目前可以使用python的logging来替代。
to be continued...
"""
| 14.7 | 28 | 0.619048 |
35dcfe624306896d15a993f5e703adb35549ebd3 | 777 | py | Python | python/setup.py | Billcountry/eson-python | 5a09231357eeb01ba1f62dd04fec85f395b0c2ab | [
"MIT"
] | null | null | null | python/setup.py | Billcountry/eson-python | 5a09231357eeb01ba1f62dd04fec85f395b0c2ab | [
"MIT"
] | 7 | 2020-05-10T05:20:28.000Z | 2022-03-26T16:28:08.000Z | python/setup.py | Billcountry/eson | 5a09231357eeb01ba1f62dd04fec85f395b0c2ab | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as readme:
long_description = readme.read()
with open("RELEASE", "r") as release:
version = release.read().strip()
setuptools.setup(
name="eson",
version=version,
author="Billcountry",
author_email="me@billcountry.tech",
description="Extendabl... | 32.375 | 135 | 0.684685 |
7eaaabcbf9b18ae697bd47590e4b4cbe5735b8f1 | 8,360 | py | Python | ferrit/rest.py | gryf/ferrit | e65a5d28a391cd3dfa8f89afe2c7d718dc2c09ac | [
"CC-BY-2.0"
] | 3 | 2019-10-29T21:38:10.000Z | 2020-04-19T10:25:22.000Z | ferrit/rest.py | gryf/ferrit | e65a5d28a391cd3dfa8f89afe2c7d718dc2c09ac | [
"CC-BY-2.0"
] | null | null | null | ferrit/rest.py | gryf/ferrit | e65a5d28a391cd3dfa8f89afe2c7d718dc2c09ac | [
"CC-BY-2.0"
] | null | null | null | import json
import logging
import os
import sys
import time
import bottle
# This global variable meant to be set in module, which imports this one
FIFO = 'ferrit.fifo'
LOG_PATH = './'
LOG = logging.getLogger('bottle')
LOG.setLevel(logging.DEBUG)
handler = logging.FileHandler(os.path.join(LOG_PATH, 'ferrit-http.log'... | 40.386473 | 78 | 0.419019 |
5db4325121b9c3a9ff4363541a260307742e7a63 | 120 | py | Python | capitulo-02/ex03.py | bryan-lima/exercicios-livro-introd-prog-python-3ed | b6bc26dced9728510865704a80cb0d97f81f756b | [
"MIT"
] | 3 | 2021-11-09T17:54:10.000Z | 2022-01-30T22:32:25.000Z | capitulo-02/ex03.py | bryan-lima/exercicios-livro-introd-prog-python-3ed | b6bc26dced9728510865704a80cb0d97f81f756b | [
"MIT"
] | null | null | null | capitulo-02/ex03.py | bryan-lima/exercicios-livro-introd-prog-python-3ed | b6bc26dced9728510865704a80cb0d97f81f756b | [
"MIT"
] | null | null | null | # Faça um programa que exiba seu nome na tela
# name = str(input('Digite seu nome: '))
name = 'Bryan Lima'
print(name)
| 20 | 45 | 0.683333 |
4117deb1d3fcd0525e8d2756e4551a89c6aaed53 | 26,469 | py | Python | schema_salad/schema.py | drjrm3/schema_salad | b6a752fccf79883e96e5d47298b5987fed8c5e8c | [
"Apache-2.0"
] | null | null | null | schema_salad/schema.py | drjrm3/schema_salad | b6a752fccf79883e96e5d47298b5987fed8c5e8c | [
"Apache-2.0"
] | null | null | null | schema_salad/schema.py | drjrm3/schema_salad | b6a752fccf79883e96e5d47298b5987fed8c5e8c | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import copy
import hashlib
import logging
from typing import (IO, Any, AnyStr, Dict, List, MutableMapping,
MutableSequence, Set, Tuple, TypeVar, Union, cast)
import avro
import avro.schema # pylint: disable=no-name-in-module,import-error
from avro.schema imp... | 40.349085 | 139 | 0.557142 |
21dccd0598383c8565b9afa9c6de240ea6ef7638 | 686 | py | Python | env/Lib/site-packages/plotly/validators/cone/_legendgrouptitle.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/cone/_legendgrouptitle.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/cone/_legendgrouptitle.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="legendgrouptitle", parent_name="cone", **kwargs):
super(LegendgrouptitleValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | 32.666667 | 85 | 0.593294 |
de9f135586bd6268088ee2af0a6be149d2a21104 | 2,165 | py | Python | payment_lib_examples/alipay-sdk-python/virtual_environment/lib/python3.4/site-packages/alipay/aop/api/response/AlipayEcoMycarParkingOrderPayResponse.py | cuhk-mobitec/S3KVetter | 9ae79a242afbe6edae27c17065a88feca2896cf6 | [
"Apache-2.0"
] | 32 | 2018-05-24T08:40:15.000Z | 2019-04-04T20:54:55.000Z | payment_lib_examples/alipay-sdk-python/virtual_environment/lib/python3.4/site-packages/alipay/aop/api/response/AlipayEcoMycarParkingOrderPayResponse.py | cuhk-mobitec/S3KVetter | 9ae79a242afbe6edae27c17065a88feca2896cf6 | [
"Apache-2.0"
] | 7 | 2018-05-24T08:42:59.000Z | 2020-09-06T23:18:46.000Z | payment_lib_examples/alipay-sdk-python/virtual_environment/lib/python3.4/site-packages/alipay/aop/api/response/AlipayEcoMycarParkingOrderPayResponse.py | cuhk-mobitec/S3KVetter | 9ae79a242afbe6edae27c17065a88feca2896cf6 | [
"Apache-2.0"
] | 13 | 2018-04-25T11:27:58.000Z | 2021-03-15T12:22:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayEcoMycarParkingOrderPayResponse(AlipayResponse):
def __init__(self):
super(AlipayEcoMycarParkingOrderPayResponse, self).__init__()
self._fund_bill_list = None
... | 28.486842 | 110 | 0.658661 |
5d3a57fcf355cb67f68a110e36c87f05637db089 | 2,974 | py | Python | backend/omdb/lista_filmes/apps.py | tiagodomp/tiagoflix | 87b36450e55d0c9b8de9321b6cb4d44bb9fe31ce | [
"MIT"
] | null | null | null | backend/omdb/lista_filmes/apps.py | tiagodomp/tiagoflix | 87b36450e55d0c9b8de9321b6cb4d44bb9fe31ce | [
"MIT"
] | 9 | 2020-06-05T20:17:54.000Z | 2022-02-26T21:54:45.000Z | backend/omdb/lista_filmes/apps.py | tiagodomp/tiagoflix | 87b36450e55d0c9b8de9321b6cb4d44bb9fe31ce | [
"MIT"
] | null | null | null | from datetime import date
import gzip
import requests
import shutil
import os
import json
extension = '.gz'
hoje = date.today()
filmes_ids = 'movie_ids'
# {"adult":false,"id":3924,"original_title":"Blondie","popularity":2.063,"video":false}
series_ids = 'tv_series_ids'
# {"id":2,"original_name":"Clerks: The Animated S... | 29.156863 | 127 | 0.548083 |
0cd2f7908597e57d8dbc256abb9c3a1e71c48059 | 5,834 | py | Python | configs/development.py | trooster/PowerDNS-Admin | 0cdf4bc560d1fd5a8e084448ea63ad76202602c6 | [
"MIT"
] | null | null | null | configs/development.py | trooster/PowerDNS-Admin | 0cdf4bc560d1fd5a8e084448ea63ad76202602c6 | [
"MIT"
] | null | null | null | configs/development.py | trooster/PowerDNS-Admin | 0cdf4bc560d1fd5a8e084448ea63ad76202602c6 | [
"MIT"
] | null | null | null | import os
basedir = os.path.abspath(os.path.abspath(os.path.dirname(__file__)))
### BASIC APP CONFIG
SALT = '$2b$12$yLUMTIfl21FKJQpTkRQXCu'
SECRET_KEY = 'e951e5a1f4b94151b360f47edf596dd2'
BIND_ADDRESS = '0.0.0.0'
PORT = 9191
OFFLINE_MODE = False
### DATABASE CONFIG
SQLA_DB_USER = 'pda'
SQLA_DB_PASSWORD = 'changeme'
S... | 40.513889 | 167 | 0.711347 |
69c55b9ac425b351038dda39e7f6cb2837da2ff0 | 3,310 | py | Python | teraserver/python/tests/clients/test_websocket_user_client.py | introlab/opentera | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | [
"Apache-2.0"
] | 10 | 2020-03-16T14:46:06.000Z | 2022-02-11T16:07:38.000Z | teraserver/python/tests/clients/test_websocket_user_client.py | introlab/opentera | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | [
"Apache-2.0"
] | 114 | 2019-09-16T13:02:50.000Z | 2022-03-22T19:17:36.000Z | teraserver/python/tests/clients/test_websocket_user_client.py | introlab/opentera | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | [
"Apache-2.0"
] | null | null | null | import unittest
import os
from requests import get
import json
import websocket
import ssl
from opentera.messages.python.UserRegisterToEvent_pb2 import UserRegisterToEvent
from opentera.messages.python.TeraModuleMessage_pb2 import TeraModuleMessage
from google.protobuf.json_format import MessageToJson
from google.proto... | 32.45098 | 107 | 0.68006 |
08ecc670e762b16246dd1fe743722629ca6a21dd | 13,208 | py | Python | hw/ip/rom_ctrl/util/scramble_image.py | gezalore/opentitan | b1ddd9b3d649dd050ff3567c02d9c891c0d90e07 | [
"Apache-2.0"
] | null | null | null | hw/ip/rom_ctrl/util/scramble_image.py | gezalore/opentitan | b1ddd9b3d649dd050ff3567c02d9c891c0d90e07 | [
"Apache-2.0"
] | null | null | null | hw/ip/rom_ctrl/util/scramble_image.py | gezalore/opentitan | b1ddd9b3d649dd050ff3567c02d9c891c0d90e07 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
'''Script for scrambling a ROM image'''
import argparse
from typing import Dict, List
import hjson # type: ignore
from mem import MemChunk, MemFi... | 28.713043 | 84 | 0.589945 |
030a2cc8d94803e071b75638137af8c13ebb4780 | 11,278 | py | Python | model.py | quanghuy17111999/LMTracker | 221ff8ff97e8d81ad03c0bab187ef1dbbad42c12 | [
"MIT"
] | null | null | null | model.py | quanghuy17111999/LMTracker | 221ff8ff97e8d81ad03c0bab187ef1dbbad42c12 | [
"MIT"
] | 1 | 2022-02-22T01:40:43.000Z | 2022-02-22T01:40:43.000Z | model.py | quanghuy17111999/LMTracker | 221ff8ff97e8d81ad03c0bab187ef1dbbad42c12 | [
"MIT"
] | 1 | 2022-02-22T01:09:28.000Z | 2022-02-22T01:09:28.000Z | from distutils.log import WARN
from pdb import post_mortem
from typing import Dict, List, Optional, Tuple
import torch
from torch import Tensor
from torch.nn import Embedding
from torch.utils.data import DataLoader
from torch_sparse import SparseTensor
from torch_geometric.typing import EdgeType, NodeType, OptTensor
... | 39.296167 | 79 | 0.585831 |
afaafc15130cd12eab09089a5be343df5eda3766 | 1,417 | py | Python | mmocr/models/textdet/detectors/ocr_mask_rcnn.py | xyzhu8/mmocr | f62b4513f5411bde9f24e1902b1cb1945340022a | [
"Apache-2.0"
] | null | null | null | mmocr/models/textdet/detectors/ocr_mask_rcnn.py | xyzhu8/mmocr | f62b4513f5411bde9f24e1902b1cb1945340022a | [
"Apache-2.0"
] | null | null | null | mmocr/models/textdet/detectors/ocr_mask_rcnn.py | xyzhu8/mmocr | f62b4513f5411bde9f24e1902b1cb1945340022a | [
"Apache-2.0"
] | null | null | null | from mmdet.models.builder import DETECTORS
from mmdet.models.detectors import MaskRCNN
from mmocr.models.textdet.detectors.text_detector_mixin import \
TextDetectorMixin
@DETECTORS.register_module()
class OCRMaskRCNN(TextDetectorMixin, MaskRCNN):
"""Mask RCNN tailored for OCR."""
def __init__(self,
... | 31.488889 | 73 | 0.579393 |
168614e6e514dd1acb0e4f7ed2ff26c80e3ca0de | 3,473 | py | Python | echoremote.py | petermoon/echoir | dac36ab518a014b227b8ba74d61e1a7c8932bfc4 | [
"Apache-2.0"
] | null | null | null | echoremote.py | petermoon/echoir | dac36ab518a014b227b8ba74d61e1a7c8932bfc4 | [
"Apache-2.0"
] | null | null | null | echoremote.py | petermoon/echoir | dac36ab518a014b227b8ba74d61e1a7c8932bfc4 | [
"Apache-2.0"
] | null | null | null | #!/home/pi/.virtualenvs/python34/bin/python
import boto3
import boto3.session
import json
from subprocess import call
from time import sleep
import os.path
from botocore.exceptions import ClientError
from botocore.exceptions import BotoCoreError
import logging
LOG_FILENAME = '/home/pi/log/echoremote.log'
logging.basic... | 30.2 | 75 | 0.61647 |
945f7b1da8ba1f49eedd1458f2a47378bd4ccd27 | 1,173 | py | Python | flowtorch/bijectors/sigmoid.py | brianjo/flowtorch | 88dcc5cf0a7e1899de18d0fc88157690a1d189ac | [
"MIT"
] | 5 | 2020-12-09T22:05:16.000Z | 2020-12-17T23:43:15.000Z | flowtorch/bijectors/sigmoid.py | stefanwebb/flowtorch-old | 7dfc0ccb1ba43d0b0190611f27e966f55ef7784e | [
"MIT"
] | 12 | 2020-12-09T21:03:36.000Z | 2020-12-17T23:36:30.000Z | flowtorch/bijectors/sigmoid.py | stefanwebb/flowtorch-old | 7dfc0ccb1ba43d0b0190611f27e966f55ef7784e | [
"MIT"
] | null | null | null | # Copyright (c) FlowTorch Development Team. All Rights Reserved
# SPDX-License-Identifier: MIT
from typing import Optional
import torch
import torch.distributions.constraints as constraints
import torch.nn.functional as F
import flowtorch
from flowtorch.utils import clipped_sigmoid
class Sigmoid(flowtorch.Bijector... | 27.27907 | 63 | 0.649616 |
4131c0081ccef7fe6bf1466162270137efd76ed3 | 4,738 | py | Python | squamish/squamish/main.py | FabianHinder/drifting-features-analysis | ac02c2c872057f08f35730cc5a9ac394267ce5d4 | [
"MIT"
] | 2 | 2020-12-02T08:55:13.000Z | 2021-06-19T05:27:03.000Z | squamish/squamish/main.py | FabianHinder/drifting-features-analysis | ac02c2c872057f08f35730cc5a9ac394267ce5d4 | [
"MIT"
] | null | null | null | squamish/squamish/main.py | FabianHinder/drifting-features-analysis | ac02c2c872057f08f35730cc5a9ac394267ce5d4 | [
"MIT"
] | null | null | null | import logging
from copy import deepcopy
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.exceptions import NotFittedError
from sklearn.preprocessing import scale
from sklearn.utils import check_random_state
from squamish.algorithm import FeatureSorter
from squamish.utils import create_support_A... | 30.766234 | 111 | 0.588645 |
dfd35a15e58332d7e9d3a89539f6ffe4e552fb1e | 1,279 | py | Python | xlsxwriter/test/comparison/test_cond_format02.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_cond_format02.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_cond_format02.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompar... | 27.212766 | 88 | 0.520719 |
0c403ac3c6eac6252468c7d9a0b1ef40d3930797 | 2,028 | py | Python | corehq/ex-submodules/pillowtop/dao/couch.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/ex-submodules/pillowtop/dao/couch.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/ex-submodules/pillowtop/dao/couch.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | import six
from couchdbkit import ResourceNotFound
from dimagi.utils.couch.database import iter_docs
from .interface import DocumentStore
from pillowtop.dao.exceptions import DocumentMissingError, DocumentDeletedError, DocumentNotFoundError
ID_CHUNK_SIZE = 10000
class CouchDocumentStore(DocumentStore):
def __i... | 30.727273 | 102 | 0.656805 |
6a31bc0228e04f005a50e9f3543a459c724e929b | 578 | py | Python | participant_profile/migrations/0037_alter_studentfile_ijazah.py | zidandff/primaseru | a14fa7326098af220e0671c3bf3870b4016ab4bf | [
"MIT"
] | null | null | null | participant_profile/migrations/0037_alter_studentfile_ijazah.py | zidandff/primaseru | a14fa7326098af220e0671c3bf3870b4016ab4bf | [
"MIT"
] | null | null | null | participant_profile/migrations/0037_alter_studentfile_ijazah.py | zidandff/primaseru | a14fa7326098af220e0671c3bf3870b4016ab4bf | [
"MIT"
] | 2 | 2021-08-10T09:09:58.000Z | 2021-08-10T10:54:51.000Z | # Generated by Django 3.2.5 on 2021-09-21 02:13
from django.db import migrations, models
import participant_profile.models
class Migration(migrations.Migration):
dependencies = [
('participant_profile', '0036_auto_20210921_0912'),
]
operations = [
migrations.AlterField(
mode... | 28.9 | 191 | 0.683391 |
d2653607dca3849a1920a884a9c7a429ceabbcb8 | 13,914 | py | Python | orio/module/loop/ast_lib/common_lib.py | parsabee/Orio | 64de0f7ee422483b60a9f02793472e20e864aa08 | [
"MIT"
] | 24 | 2015-01-26T03:14:19.000Z | 2021-09-27T23:10:12.000Z | orio/module/loop/ast_lib/common_lib.py | parsabee/Orio | 64de0f7ee422483b60a9f02793472e20e864aa08 | [
"MIT"
] | 30 | 2015-04-17T18:14:27.000Z | 2021-05-30T15:01:47.000Z | orio/module/loop/ast_lib/common_lib.py | parsabee/Orio | 64de0f7ee422483b60a9f02793472e20e864aa08 | [
"MIT"
] | 20 | 2015-02-11T08:20:19.000Z | 2022-01-15T17:55:00.000Z | #
# Contain a class that provides a set of common library functions for AST processing
#
import sys
import orio.module.loop.ast
import orio.main.util.globals as g
from functools import reduce
#-----------------------------------------------------------
class CommonLib:
'''A common library set for AST processing... | 39.416431 | 126 | 0.549662 |
10f7cca5047346f34ad6d0cbb3a98441a903e025 | 65,877 | py | Python | Lib/test/test_coroutines.py | 6r9/cpython | 69524821a87251b7aee966f6e46b3810ff5aaa64 | [
"PSF-2.0"
] | 2 | 2019-01-04T23:21:29.000Z | 2020-02-26T23:30:31.000Z | Lib/test/test_coroutines.py | 6r9/cpython | 69524821a87251b7aee966f6e46b3810ff5aaa64 | [
"PSF-2.0"
] | null | null | null | Lib/test/test_coroutines.py | 6r9/cpython | 69524821a87251b7aee966f6e46b3810ff5aaa64 | [
"PSF-2.0"
] | 2 | 2020-12-03T15:10:21.000Z | 2022-02-05T17:12:11.000Z | import contextlib
import copy
import inspect
import pickle
import re
import sys
import types
import unittest
import warnings
from test import support
from test.support.script_helper import assert_python_ok
class AsyncYieldFrom:
def __init__(self, obj):
self.obj = obj
def __await__(self):
yiel... | 27.44875 | 85 | 0.482945 |
9041a86d0c08efff42e7c167642c30acaa4473f6 | 4,284 | py | Python | test/functional/p2p_add_connections.py | eleccoin/eleccoin | 95f86f28019fe8666816e75e1dc82f1edeee3b31 | [
"MIT"
] | 3 | 2020-04-24T08:03:09.000Z | 2020-06-24T00:53:03.000Z | test/functional/p2p_add_connections.py | eleccoin/eleccoin | 95f86f28019fe8666816e75e1dc82f1edeee3b31 | [
"MIT"
] | 8 | 2021-02-06T16:15:10.000Z | 2022-02-20T20:08:45.000Z | test/functional/p2p_add_connections.py | eleccoin/eleccoin | 95f86f28019fe8666816e75e1dc82f1edeee3b31 | [
"MIT"
] | 7 | 2020-02-26T22:08:49.000Z | 2021-02-06T12:35:40.000Z | #!/usr/bin/env python3
# Copyright (c) 2021 The Eleccoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test add_outbound_p2p_connection test framework functionality"""
from test_framework.p2p import P2PInterfa... | 44.164948 | 120 | 0.6669 |
d06235fde05a9287b7070befc763ea1258f3d849 | 5,078 | py | Python | config/settings.py | pawelszopa/django_api_menu | 292c117aa4fea57aed80bbfc9cc2bece5c0da434 | [
"Beerware"
] | null | null | null | config/settings.py | pawelszopa/django_api_menu | 292c117aa4fea57aed80bbfc9cc2bece5c0da434 | [
"Beerware"
] | null | null | null | config/settings.py | pawelszopa/django_api_menu | 292c117aa4fea57aed80bbfc9cc2bece5c0da434 | [
"Beerware"
] | null | null | null | """
Django settings for config project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
import os
from p... | 28.211111 | 91 | 0.703427 |
df342d9e71f0138c976b305d6a53086a0fa0f6ea | 296 | py | Python | tests/demo/zh/demo_pos.py | v-smwang/HanLP | 98db7a649110fca4307acbd6a26f2b5bb1159efc | [
"Apache-2.0"
] | 2 | 2020-07-08T07:29:47.000Z | 2021-04-01T02:51:57.000Z | tests/demo/zh/demo_pos.py | v-smwang/HanLP | 98db7a649110fca4307acbd6a26f2b5bb1159efc | [
"Apache-2.0"
] | 4 | 2020-11-13T19:00:05.000Z | 2022-02-10T02:03:54.000Z | tests/demo/zh/demo_pos.py | v-smwang/HanLP | 98db7a649110fca4307acbd6a26f2b5bb1159efc | [
"Apache-2.0"
] | 1 | 2021-12-27T01:04:42.000Z | 2021-12-27T01:04:42.000Z | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2019-12-28 21:25
import hanlp
from hanlp.pretrained.pos import CTB5_POS_RNN_FASTTEXT_ZH
tagger = hanlp.load(CTB5_POS_RNN_FASTTEXT_ZH)
print(tagger.predict(['我', '的', '希望', '是', '希望', '和平']))
print(tagger.predict([['支持', '批处理'], ['速度', '更', '快']]))
| 32.888889 | 57 | 0.655405 |
d917d9060bd2c46d04ff8d7392a3953188065eef | 636 | py | Python | tests/settings.py | jhselvik/blogging_for_humans | 5376d1d505d0a06c9468cce624c64dac1ddcfa4c | [
"MIT"
] | null | null | null | tests/settings.py | jhselvik/blogging_for_humans | 5376d1d505d0a06c9468cce624c64dac1ddcfa4c | [
"MIT"
] | null | null | null | tests/settings.py | jhselvik/blogging_for_humans | 5376d1d505d0a06c9468cce624c64dac1ddcfa4c | [
"MIT"
] | null | null | null | # -*- coding: utf-8
from __future__ import unicode_literals, absolute_import
import django
DEBUG = True
USE_TZ = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "cuu0#7he^njm!s92=f83csr^se)q!3*bm#c6f41u$m=hf+bi#!"
DATABASES = {
"default": {
"ENGINE": "django.db.backe... | 18.705882 | 66 | 0.657233 |
0133c48560e131c9f392791ed0e2697f360ae6a7 | 2,275 | py | Python | engine/components/clause.py | ariyo21/Expert-System | 75a76940f9ad12c45a51b4cd34df361857a2a741 | [
"MIT"
] | 5 | 2020-11-07T14:41:16.000Z | 2022-01-18T19:50:52.000Z | engine/components/clause.py | ariyo21/Expert-System | 75a76940f9ad12c45a51b4cd34df361857a2a741 | [
"MIT"
] | null | null | null | engine/components/clause.py | ariyo21/Expert-System | 75a76940f9ad12c45a51b4cd34df361857a2a741 | [
"MIT"
] | 4 | 2020-11-19T11:24:44.000Z | 2021-05-11T11:16:59.000Z | """
Clauses parsing from the clause.json file. This refers to questions
asked by the engine. Answers are two types
positive : on rule match
negative : on no rule match
"""
class Clause:
"""
Clause refers to question asked. The rules are matches with the
answers given by the user for the clause.
... | 20.495495 | 73 | 0.540659 |
9bae97c40a69420a7b57ada76b0fff2fe2e53752 | 7,934 | py | Python | sandbox/ours/algos/ModelMAML/model_maml_vpg.py | jackwilkinson255/mbmpo_master | e9e0eaf542c7895764dcb0bfee28752818124ff2 | [
"MIT"
] | 28 | 2018-11-15T14:14:23.000Z | 2022-01-10T01:53:43.000Z | sandbox/ours/algos/ModelMAML/model_maml_vpg.py | hongzimao/model_ensemble_meta_learning | 8b1351df94dfe530efaff1118022315c8d877774 | [
"MIT"
] | 3 | 2019-05-05T23:39:01.000Z | 2021-06-15T15:28:06.000Z | sandbox/ours/algos/ModelMAML/model_maml_vpg.py | hongzimao/model_ensemble_meta_learning | 8b1351df94dfe530efaff1118022315c8d877774 | [
"MIT"
] | 14 | 2018-11-15T16:47:02.000Z | 2021-05-28T14:58:01.000Z |
from rllab.misc import logger
from rllab_maml.misc import ext
from rllab_maml.misc.overrides import overrides
from sandbox.ours.algos.MAML.batch_maml_polopt import BatchMAMLPolopt
from sandbox_maml.rocky.tf.optimizers.first_order_optimizer import FirstOrderOptimizer
from sandbox_maml.rocky.tf.misc import tensor_utils... | 38.892157 | 143 | 0.594026 |
b67833270026f6660c7a1d463d07927c3b5e71c3 | 1,152 | py | Python | hardwareControl2/main.py | untrobotics/IEEE-2019-R5 | 799bffc95b7be1c939d1ad1858b10faabb3cc842 | [
"MIT"
] | null | null | null | hardwareControl2/main.py | untrobotics/IEEE-2019-R5 | 799bffc95b7be1c939d1ad1858b10faabb3cc842 | [
"MIT"
] | 6 | 2019-03-06T01:10:24.000Z | 2020-06-17T05:04:43.000Z | hardwareControl2/main.py | untrobotics/IEEE-2019-R5 | 799bffc95b7be1c939d1ad1858b10faabb3cc842 | [
"MIT"
] | 3 | 2019-03-01T05:11:39.000Z | 2019-11-22T15:01:02.000Z | from lidar import lidarControl
from hardwareControl import hardwareControl
from yaw import yaw
import threading
import time
import math
ROUND = 1
if (ROUND == 1):
NUMOFBLOCKS = 2
NUMOFOBS = 5
elif (ROUND == 2):
NUMOFBLOCKS = 4
NUMOFOBS = 10
else:
NUMOFBLOCKS = 6
NUMOFOBS = 15
yawObj = yaw()
... | 15.157895 | 62 | 0.646701 |
87416f44f0b814f4a645e9085242e3b86d3a1030 | 4,709 | py | Python | src/sage/coding/codes_catalog.py | fchapoton/sage | 765c5cb3e24dd134708eca97e4c52e0221cd94ba | [
"BSL-1.0"
] | 4 | 2020-07-17T04:49:44.000Z | 2020-07-29T06:33:51.000Z | src/sage/coding/codes_catalog.py | Ivo-Maffei/sage | 467fbc70a08b552b3de33d9065204ee9cbfb02c7 | [
"BSL-1.0"
] | null | null | null | src/sage/coding/codes_catalog.py | Ivo-Maffei/sage | 467fbc70a08b552b3de33d9065204ee9cbfb02c7 | [
"BSL-1.0"
] | 3 | 2020-03-29T17:13:36.000Z | 2021-05-03T18:11:28.000Z | r"""
Index of code constructions
The ``codes`` object may be used to access the codes that Sage can build.
Families of Codes (Rich representation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. csv-table::
:class: contentstable
:widths: 30, 70
:delim: @
:meth:`~sage.coding.parity_check_code.ParityCheckC... | 42.423423 | 120 | 0.71289 |
f8c0051562c92b9aa22af6c040179e439d9e292a | 107,027 | py | Python | pysb/macros.py | maurosilber/pysb | 30eb4158b9d28eff704b883c2139387a89d9c5eb | [
"BSD-2-Clause"
] | 1 | 2019-10-23T16:29:29.000Z | 2019-10-23T16:29:29.000Z | pysb/macros.py | zhwycsz/pysb | d1afd8bed83cc09476ea871ffcc106b18498dc7f | [
"BSD-2-Clause"
] | null | null | null | pysb/macros.py | zhwycsz/pysb | d1afd8bed83cc09476ea871ffcc106b18498dc7f | [
"BSD-2-Clause"
] | null | null | null | """
A collection of generally useful modeling macros.
These macros are written to be as generic and reusable as possible, serving as a
collection of best practices and implementation ideas. They conform to the
following general guidelines:
* All components created by the macro are implicitly added to the current mode... | 43.03458 | 409 | 0.621722 |
401dd15bdec369395d029e314b0ea60f3f2deb09 | 3,503 | py | Python | validator/kube/resource.py | KubeOperator/kubeGrade | ca9cdeb438707135bb35a1a3d3e028367dd122df | [
"Apache-2.0"
] | 4 | 2020-03-20T00:28:06.000Z | 2020-04-17T18:33:21.000Z | validator/kube/resource.py | KubeOperator/kubeGrade | ca9cdeb438707135bb35a1a3d3e028367dd122df | [
"Apache-2.0"
] | null | null | null | validator/kube/resource.py | KubeOperator/kubeGrade | ca9cdeb438707135bb35a1a3d3e028367dd122df | [
"Apache-2.0"
] | 1 | 2021-06-09T02:09:17.000Z | 2021-06-09T02:09:17.000Z | from datetime import datetime
from kubernetes import client
from kubernetes.client import ApiClient
__all__ = ["NamespaceKubernetesResource", "KubernetesResourceProvider"]
class NamespaceKubernetesResource:
def __init__(self, namespace):
super().__init__()
self.namespaces = namespace
self... | 34.343137 | 76 | 0.653725 |
aaa02dfc59f8314d6787a1bcebb595d9a139faf7 | 2,885 | py | Python | TensorArtist/tartist/data/flow/remote.py | cosmic119/DiscoGAN | 5a86f36f45a3dafdc028fc2100eb477e54dc83cd | [
"MIT"
] | null | null | null | TensorArtist/tartist/data/flow/remote.py | cosmic119/DiscoGAN | 5a86f36f45a3dafdc028fc2100eb477e54dc83cd | [
"MIT"
] | null | null | null | TensorArtist/tartist/data/flow/remote.py | cosmic119/DiscoGAN | 5a86f36f45a3dafdc028fc2100eb477e54dc83cd | [
"MIT"
] | null | null | null | # -*- coding:utf8 -*-
# File : remote.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 3/10/17
#
# This file is part of TensorArtist.
from .base import SimpleDataFlowBase
from ..rflow import InputPipe, OutputPipe, control
from ..rflow import make_push_pair
from multiprocessing import Process
im... | 31.703297 | 123 | 0.634315 |
c2ff032f44788856e59b75b42cc8ddefc6cafe81 | 8,226 | py | Python | Chapter 4/B05034_ch4_SRC_V3/src_ch4_python2/wargame/docs/source/conf.py | kunal2494/Learning-Python-Application-Development | 241bec5d5340e95cd68aef813c9ce8b0fca98986 | [
"MIT"
] | 64 | 2016-12-15T20:38:45.000Z | 2022-03-31T06:38:39.000Z | Chapter 4/B05034_ch4_SRC_V3/src_ch4_python2/wargame/docs/source/conf.py | kunal2494/Learning-Python-Application-Development | 241bec5d5340e95cd68aef813c9ce8b0fca98986 | [
"MIT"
] | null | null | null | Chapter 4/B05034_ch4_SRC_V3/src_ch4_python2/wargame/docs/source/conf.py | kunal2494/Learning-Python-Application-Development | 241bec5d5340e95cd68aef813c9ce8b0fca98986 | [
"MIT"
] | 48 | 2016-09-14T20:01:31.000Z | 2021-11-25T09:03:37.000Z | # -*- coding: utf-8 -*-
#
# wargame_py2 documentation build configuration file, created by
# sphinx-quickstart on Sat Dec 26 14:39:35 2015.
#
# 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.
#... | 31.517241 | 79 | 0.718332 |
f26a6390b45fe548a347544f344b604b8627391d | 8,218 | py | Python | myvenv/Lib/site-packages/suds/servicedefinition.py | Fa67/saleor-shop | 76110349162c54c8bfcae61983bb59ba8fb0f778 | [
"BSD-3-Clause"
] | null | null | null | myvenv/Lib/site-packages/suds/servicedefinition.py | Fa67/saleor-shop | 76110349162c54c8bfcae61983bb59ba8fb0f778 | [
"BSD-3-Clause"
] | 5 | 2020-03-24T16:37:25.000Z | 2021-06-10T21:24:54.000Z | upibo-venv/Lib/site-packages/suds/servicedefinition.py | smbpgroup/upibo | 625dcda9f9692c62aeb9fe8f7123a5d407c610ae | [
"BSD-3-Clause"
] | null | null | null | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will b... | 34.099585 | 83 | 0.536992 |
006f8d217768d3f738f862a872ecd05273ae455b | 683 | py | Python | app/core/migrations/0002_tag.py | vkathirvel/python-django-recipe-app-api | c0533c74aec9bb172cfe3b1a2d04cb81179a1790 | [
"MIT"
] | null | null | null | app/core/migrations/0002_tag.py | vkathirvel/python-django-recipe-app-api | c0533c74aec9bb172cfe3b1a2d04cb81179a1790 | [
"MIT"
] | null | null | null | app/core/migrations/0002_tag.py | vkathirvel/python-django-recipe-app-api | c0533c74aec9bb172cfe3b1a2d04cb81179a1790 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-10-03 08:09
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 28.458333 | 118 | 0.616398 |
9ae86d981bb5feee1b16b6cf63c6486663b5efa5 | 9,033 | py | Python | meiduo_mall/meiduo_mall/settings/dev.py | RuanJylf/MeiDuo_Mall | 06a570fb327e8d06934fc942266456c798a9aec2 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/settings/dev.py | RuanJylf/MeiDuo_Mall | 06a570fb327e8d06934fc942266456c798a9aec2 | [
"MIT"
] | 4 | 2021-06-08T23:42:00.000Z | 2022-03-12T00:50:52.000Z | meiduo_mall/meiduo_mall/settings/dev.py | RuanJylf/MeiDuo_Mall | 06a570fb327e8d06934fc942266456c798a9aec2 | [
"MIT"
] | null | null | null | """
Django settings for meiduo_mall project.
Generated by 'django-admin startproject' using Django 1.11.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
impor... | 27.207831 | 132 | 0.647957 |
bef9c1a8488fedd534e226e87159d4a5497f46ce | 6,323 | py | Python | tests/test_forms.py | DummerDelfin/django-contact-form | ef7f7d2492b6bdf9bed6aae2fa5aadc3dd2f3d30 | [
"BSD-3-Clause"
] | null | null | null | tests/test_forms.py | DummerDelfin/django-contact-form | ef7f7d2492b6bdf9bed6aae2fa5aadc3dd2f3d30 | [
"BSD-3-Clause"
] | null | null | null | tests/test_forms.py | DummerDelfin/django-contact-form | ef7f7d2492b6bdf9bed6aae2fa5aadc3dd2f3d30 | [
"BSD-3-Clause"
] | null | null | null | import os
import unittest
from django.conf import settings
from django.core import mail
from django.test import RequestFactory, TestCase
from django.utils.six import text_type
import mock
from contact_form.forms import AkismetContactForm, ContactForm
class ContactFormTests(TestCase):
"""
Tests the base Cont... | 30.399038 | 74 | 0.573936 |
f2b6114bdd12ad7814093cfa8cc4c3e64893b871 | 1,761 | py | Python | tests/unit/dataactvalidator/test_fabsreq11_detached_award_financial_assistance.py | RonSherfey/data-act-broker-backend | d287abda2cac06dd479ecf0127e789cb8e59387d | [
"CC0-1.0"
] | null | null | null | tests/unit/dataactvalidator/test_fabsreq11_detached_award_financial_assistance.py | RonSherfey/data-act-broker-backend | d287abda2cac06dd479ecf0127e789cb8e59387d | [
"CC0-1.0"
] | 3 | 2021-08-22T11:47:45.000Z | 2022-03-29T22:06:49.000Z | tests/unit/dataactvalidator/test_fabsreq11_detached_award_financial_assistance.py | RonSherfey/data-act-broker-backend | d287abda2cac06dd479ecf0127e789cb8e59387d | [
"CC0-1.0"
] | null | null | null | from tests.unit.dataactcore.factories.staging import DetachedAwardFinancialAssistanceFactory
from tests.unit.dataactvalidator.utils import number_of_errors, query_columns
_FILE = 'fabsreq11_detached_award_financial_assistance'
def test_column_headers(database):
expected_subset = {'row_number', 'action_type', 'co... | 48.916667 | 118 | 0.794435 |
f9e81658d955af9cc508ac8e5e9906312b7d5475 | 22,396 | py | Python | recipes/AMI/Diarization/experiment.py | JasonSWFu/speechbrain | cb78ba2b33fceba273b055dc471535344c3053f0 | [
"Apache-2.0"
] | 3,913 | 2021-03-14T13:54:52.000Z | 2022-03-30T05:09:55.000Z | recipes/AMI/Diarization/experiment.py | JasonSWFu/speechbrain | cb78ba2b33fceba273b055dc471535344c3053f0 | [
"Apache-2.0"
] | 667 | 2021-03-14T20:11:17.000Z | 2022-03-31T04:07:17.000Z | recipes/AMI/Diarization/experiment.py | JasonSWFu/speechbrain | cb78ba2b33fceba273b055dc471535344c3053f0 | [
"Apache-2.0"
] | 785 | 2021-03-14T13:20:57.000Z | 2022-03-31T03:26:03.000Z | #!/usr/bin/python3
"""This recipe implements diarization system using deep embedding extraction followed by spectral clustering.
To run this recipe:
> python experiment.py hparams/<your_hyperparams_file.yaml>
e.g., python experiment.py hparams/ecapa_tdnn.yaml
Condition: Oracle VAD (speech regions taken from the grou... | 32.79063 | 135 | 0.612208 |
8d4457971221bec1117aadb51a009c263c20090a | 68,146 | py | Python | eve/app/algo.py | densechen/eve-mli | 73fdeff8cf080bf01040383a72e66cfc9219a803 | [
"MIT"
] | 9 | 2020-12-27T03:02:55.000Z | 2021-01-14T10:13:22.000Z | eve/app/algo.py | densechen/eve-mli | 73fdeff8cf080bf01040383a72e66cfc9219a803 | [
"MIT"
] | 1 | 2021-01-14T12:56:26.000Z | 2021-01-15T07:00:41.000Z | eve/app/algo.py | densechen/eve-mli | 73fdeff8cf080bf01040383a72e66cfc9219a803 | [
"MIT"
] | null | null | null | # _ _ _ _ _ _ _ _
# /\ \ /\ \ _ / /\ /\ \ /\_\/\_\ _ _\ \ /\ \
# / \ \ \ \ \ /_/ / / / \ \ / / / / //\_\/\__ \ \ \ \
# / /\ \ \ \ \ \ \___\/ / /\ \ \ /\ \/ \ \/ / / /_ \... | 40.757177 | 110 | 0.5998 |
8f721f14f5570b36a60bbfa9379b2a706fc000a4 | 470 | py | Python | clock_time.py | aaronsaderholm/bad-arduino-clock | 5e46d9843b48b898a49de7d073e042c95c76cc5d | [
"MIT"
] | null | null | null | clock_time.py | aaronsaderholm/bad-arduino-clock | 5e46d9843b48b898a49de7d073e042c95c76cc5d | [
"MIT"
] | null | null | null | clock_time.py | aaronsaderholm/bad-arduino-clock | 5e46d9843b48b898a49de7d073e042c95c76cc5d | [
"MIT"
] | null | null | null | import time
import serial
import struct
# configure the serial connections (the parameters differs on the device you are connecting to)
ser = serial.Serial(port='/dev/cu.usbserial-A900JEHX',baudrate=115200)
time.sleep(2)
time = int(time.time())
print(time,"\n")
ser.write(bytes(time))
time.sleep(1)
while 1:
try:
... | 26.111111 | 95 | 0.697872 |
959570dd9111f4e560b212e2b9595bc24781a7d8 | 66 | py | Python | popcorn/image_processing/fiberExtractors.py | bertrand-faure/popcorn | 757ceee636bd5c4973373efde0f99943f94e4e19 | [
"MIT"
] | 11 | 2021-03-03T17:34:24.000Z | 2021-11-20T02:27:01.000Z | popcorn/image_processing/fiberExtractors.py | bertrand-faure/popcorn | 757ceee636bd5c4973373efde0f99943f94e4e19 | [
"MIT"
] | null | null | null | popcorn/image_processing/fiberExtractors.py | bertrand-faure/popcorn | 757ceee636bd5c4973373efde0f99943f94e4e19 | [
"MIT"
] | 4 | 2021-01-12T10:01:00.000Z | 2021-12-03T10:08:11.000Z | from skimage import morphology
import numpy as np
import math
| 8.25 | 30 | 0.787879 |
fa96baab15e0c00870bc043ac02e31c10b222759 | 65,256 | py | Python | pennylane/ops/qubit/non_parametric_ops.py | eddddddy/pennylane | bcd837b1ed1187895c327abfe62aea71fbeba02f | [
"Apache-2.0"
] | null | null | null | pennylane/ops/qubit/non_parametric_ops.py | eddddddy/pennylane | bcd837b1ed1187895c327abfe62aea71fbeba02f | [
"Apache-2.0"
] | null | null | null | pennylane/ops/qubit/non_parametric_ops.py | eddddddy/pennylane | bcd837b1ed1187895c327abfe62aea71fbeba02f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2021 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or... | 29.675307 | 134 | 0.573694 |
a0899e2cbcbfe8ce3e7889761e06a2f46c756665 | 266 | py | Python | simforest/__init__.py | megaduks/SimilarityForest | f85665830e29bc97c954742ef5952bc6336df52e | [
"MIT"
] | 1 | 2019-05-27T00:32:01.000Z | 2019-05-27T00:32:01.000Z | simforest/__init__.py | megaduks/SimilarityForest | f85665830e29bc97c954742ef5952bc6336df52e | [
"MIT"
] | null | null | null | simforest/__init__.py | megaduks/SimilarityForest | f85665830e29bc97c954742ef5952bc6336df52e | [
"MIT"
] | 1 | 2019-05-27T12:50:58.000Z | 2019-05-27T12:50:58.000Z | """
Similarity Forest implementation based on
'Similarity Forests', Saket Sathe and Charu C. Aggarwal, KDD 2017 Research Paper
"""
from ._simforest import SimilarityForest
from ._simforest import AxesSampler
__all__ = (
'SimilarityForest',
'AxesSampler'
)
| 20.461538 | 80 | 0.759398 |
ef5a644444309719ffdb7d8764526f2bfa2b8ef2 | 2,598 | py | Python | resto_client/responses/feature_collection_response.py | CNES/resto_client | 7048bd79c739e33882ebd664790dcf0528e81aa4 | [
"Apache-2.0"
] | 6 | 2019-12-20T09:12:30.000Z | 2021-07-08T11:44:55.000Z | resto_client/responses/feature_collection_response.py | CNES/resto_client | 7048bd79c739e33882ebd664790dcf0528e81aa4 | [
"Apache-2.0"
] | null | null | null | resto_client/responses/feature_collection_response.py | CNES/resto_client | 7048bd79c739e33882ebd664790dcf0528e81aa4 | [
"Apache-2.0"
] | 1 | 2019-12-17T20:16:39.000Z | 2019-12-17T20:16:39.000Z | # -*- coding: utf-8 -*-
"""
.. admonition:: License
Copyright 2019 CNES
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 requir... | 43.3 | 100 | 0.718245 |
bcf241daf3b872300e2c3dacaf68a09648ad0184 | 107 | py | Python | 2483.py | barroslipe/urionlinejudge | a20d8199d9a92b30ea394a6c949967d2fc51aa34 | [
"MIT"
] | null | null | null | 2483.py | barroslipe/urionlinejudge | a20d8199d9a92b30ea394a6c949967d2fc51aa34 | [
"MIT"
] | null | null | null | 2483.py | barroslipe/urionlinejudge | a20d8199d9a92b30ea394a6c949967d2fc51aa34 | [
"MIT"
] | null | null | null | n = int(input())
print("Feliz nat", end = "")
for i in range(0, n):
print("a", end = "")
print("l!") | 13.375 | 28 | 0.495327 |
fc1d048ee9ee6103acbd646c67395f86ef46e312 | 7,050 | py | Python | talent/google/cloud/talent_v4beta1/gapic/transports/profile_service_grpc_transport.py | hugovk/google-cloud-python | b387134827dbc3be0e1b431201e0875798002fda | [
"Apache-2.0"
] | 2 | 2021-11-26T07:08:43.000Z | 2022-03-07T20:20:04.000Z | talent/google/cloud/talent_v4beta1/gapic/transports/profile_service_grpc_transport.py | hugovk/google-cloud-python | b387134827dbc3be0e1b431201e0875798002fda | [
"Apache-2.0"
] | 6 | 2019-05-27T22:05:58.000Z | 2019-08-05T16:46:16.000Z | talent/google/cloud/talent_v4beta1/gapic/transports/profile_service_grpc_transport.py | hugovk/google-cloud-python | b387134827dbc3be0e1b431201e0875798002fda | [
"Apache-2.0"
] | 1 | 2019-03-29T18:26:16.000Z | 2019-03-29T18:26:16.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 35.606061 | 88 | 0.640993 |
df7c978c672b8a8c0091bf219a2a7d0cf481a230 | 7,922 | py | Python | parallel_wavegan/bin/preprocess.py | Escaton615/ParallelWaveGAN | e8217d43eebbc31277b713c1ff6a47558c7916fe | [
"MIT"
] | 4 | 2020-09-12T03:09:29.000Z | 2021-01-23T03:52:06.000Z | parallel_wavegan/bin/preprocess.py | arita37/ParallelWaveGAN | bb32b19f9ccb638de670f8b8d3a1dfed13ecf1c3 | [
"MIT"
] | null | null | null | parallel_wavegan/bin/preprocess.py | arita37/ParallelWaveGAN | bb32b19f9ccb638de670f8b8d3a1dfed13ecf1c3 | [
"MIT"
] | 2 | 2020-11-28T10:16:33.000Z | 2020-12-15T13:57:40.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2019 Tomoki Hayashi
# MIT License (https://opensource.org/licenses/MIT)
"""Perform preprocessing and raw feature extraction."""
import argparse
import logging
import os
import librosa
import numpy as np
import soundfile as sf
import yaml
from tqdm import ... | 40.418367 | 117 | 0.581293 |
0e9935c81b33d3fa5ac2e3a8eb3a8f21923a5633 | 1,437 | py | Python | load_loss.py | liminghao0914/involution_GAN | f049f76a49fc99d56efac4519f0b87931c2dcdcd | [
"MIT"
] | 3 | 2021-05-18T05:46:10.000Z | 2021-05-26T07:37:23.000Z | load_loss.py | liminghao0914/involution_GAN | f049f76a49fc99d56efac4519f0b87931c2dcdcd | [
"MIT"
] | null | null | null | load_loss.py | liminghao0914/involution_GAN | f049f76a49fc99d56efac4519f0b87931c2dcdcd | [
"MIT"
] | 1 | 2021-05-17T14:31:03.000Z | 2021-05-17T14:31:03.000Z | import os
import json
import matplotlib.pyplot as plt
import numpy as np
subpath = 'celeb_igan_3.0'
file = os.path.join("..", "Baseline GAN", "logs", subpath, 'lossv1.log')
with open(file, 'r') as f:
s = f.readline()
s = s.strip()
log = json.loads(s)
# print(len(log['lossG']))
# print(len(log['lossD']))
x_g = np... | 33.418605 | 81 | 0.607516 |
07f289f83e328437223c1d883900e2dae6167e46 | 6,650 | py | Python | continual_rl/policies/progress_and_compress/progress_and_compress_monobeast.py | AGI-Labs/continual_rl | bcf17d879e8a983340be233ff8f740c424d0f303 | [
"MIT"
] | 19 | 2021-07-27T05:20:09.000Z | 2022-02-27T07:12:05.000Z | continual_rl/policies/progress_and_compress/progress_and_compress_monobeast.py | AGI-Labs/continual_rl | bcf17d879e8a983340be233ff8f740c424d0f303 | [
"MIT"
] | 2 | 2021-11-05T07:36:50.000Z | 2022-03-11T00:21:50.000Z | continual_rl/policies/progress_and_compress/progress_and_compress_monobeast.py | AGI-Labs/continual_rl | bcf17d879e8a983340be233ff8f740c424d0f303 | [
"MIT"
] | 3 | 2021-10-20T06:04:35.000Z | 2022-03-06T22:59:36.000Z | import torch
import threading
import os
import json
from torch.nn import functional as F
from continual_rl.policies.ewc.ewc_monobeast import EWCMonobeast
class ProgressAndCompressMonobeast(EWCMonobeast):
"""
Progress and Compress leverages Online EWC (implemented in EWCMonobeast). We just modify it such that
... | 54.065041 | 162 | 0.697895 |
27099dca1297f24c5540128df592b4ff07555b99 | 679 | py | Python | python-module/numpy_test_cached.py | pospielov/Linear-Algebra-in-Python-and-Java-Research | 833f22b510c65ec5059543e093e140b033173bda | [
"Apache-2.0"
] | 1 | 2020-09-08T07:45:07.000Z | 2020-09-08T07:45:07.000Z | python-module/numpy_test_cached.py | pospielov/Linear-Algebra-in-Python-and-Java-Research | 833f22b510c65ec5059543e093e140b033173bda | [
"Apache-2.0"
] | null | null | null | python-module/numpy_test_cached.py | pospielov/Linear-Algebra-in-Python-and-Java-Research | 833f22b510c65ec5059543e093e140b033173bda | [
"Apache-2.0"
] | null | null | null | import numpy as np
import timeit
embeddings = np.genfromtxt("embeddings.txt", delimiter=',')
embeddings2 = embeddings[1:10001]
embeddings2 = embeddings2/np.linalg.norm(embeddings2, axis=1, keepdims=True)
def test():
embeddings1 = embeddings[0:1]
embeddings1 = embeddings1/np.linalg.norm(embeddings1, axis=1, ... | 28.291667 | 103 | 0.717231 |
6a46041ac89892aa4979c423675f204c584f4bfe | 1,167 | py | Python | ansiblemetrics/playbook/avg_play_size.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | 1 | 2020-04-24T16:09:14.000Z | 2020-04-24T16:09:14.000Z | ansiblemetrics/playbook/avg_play_size.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | ansiblemetrics/playbook/avg_play_size.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | import yaml
from ansiblemetrics.ansible_metric import AnsibleMetric
from ansiblemetrics.general.lines_code import LinesCode
from ansiblemetrics.playbook.num_plays import NumPlays
class AvgPlaySize(AnsibleMetric):
""" This class measures a play's average number of lines of code."""
def count(self):
"... | 23.816327 | 72 | 0.542416 |
9e7d4dc0d8220552449e489669451f9947bcfff6 | 3,828 | py | Python | example/image-classification/symbols/alexnet_fp16.py | axbaretto/mxnet | 5f593885356ff6d14f5519fa18e79b944beb51cd | [
"Apache-2.0"
] | 9 | 2017-07-13T03:12:24.000Z | 2021-11-10T16:15:27.000Z | example/image-classification/symbols/alexnet_fp16.py | yanghaojin/BMXNet | 102f8d0ed59529bbd162c37bf07ae58ad6c4caa1 | [
"Apache-2.0"
] | 3 | 2017-07-10T21:49:18.000Z | 2017-07-12T22:40:06.000Z | example/image-classification/symbols/alexnet_fp16.py | yanghaojin/BMXNet | 102f8d0ed59529bbd162c37bf07ae58ad6c4caa1 | [
"Apache-2.0"
] | 11 | 2018-02-27T15:32:09.000Z | 2021-04-21T08:48:17.000Z | """
Reference:
Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet classification with deep convolutional neural networks." Advances in neural information processing systems. 2012.
"""
import mxnet as mx
import numpy as np
def get_symbol(num_classes, **kwargs):
input_data = mx.symbol.Variable(name... | 54.685714 | 181 | 0.690439 |
11387a0d4b2042a952f8e7b3a8f77fbd5f99e49b | 3,096 | py | Python | src/robot/running/handlerstore.py | Kompakti/robotframework | 3ac75d5212f544018ef1cc99a8b68c222715df5f | [
"ECL-2.0",
"Apache-2.0"
] | 11 | 2017-09-30T05:47:28.000Z | 2019-04-15T11:58:40.000Z | src/robot/running/handlerstore.py | Kompakti/robotframework | 3ac75d5212f544018ef1cc99a8b68c222715df5f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/running/handlerstore.py | Kompakti/robotframework | 3ac75d5212f544018ef1cc99a8b68c222715df5f | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2018-02-13T10:22:39.000Z | 2019-07-04T07:39:28.000Z | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | 36 | 78 | 0.640827 |
1e97d79f284b33e22c02aa1aec4412a46c8c5e96 | 7,058 | py | Python | bot.py | bcbwilla/bcbbot | 4dbfd011aed270464391c33129a46f4c362999d8 | [
"MIT"
] | 1 | 2016-03-03T17:37:27.000Z | 2016-03-03T17:37:27.000Z | bot.py | bcbwilla/bcbbot | 4dbfd011aed270464391c33129a46f4c362999d8 | [
"MIT"
] | null | null | null | bot.py | bcbwilla/bcbbot | 4dbfd011aed270464391c33129a46f4c362999d8 | [
"MIT"
] | null | null | null | import sys
import time
import socket
import inspect
import logging
import itertools
import yaml
import requests
import commands
class IRC(object):
""" Wrapper class providing access to some standard IRC commands """
def __init__(self):
self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM... | 30.820961 | 111 | 0.566591 |
f9fe33162aac3ca7bbce505d2fb044dceb549f0a | 2,584 | py | Python | Packs/CommonWidgets/Scripts/RSSWidget/RSSWidget_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonWidgets/Scripts/RSSWidget/RSSWidget_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonWidgets/Scripts/RSSWidget/RSSWidget_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import sys
import pytest
from test_data.test_variables import NO_ARTICLE, NO_ARTICLE_RES, ONE_ARTICLE, ONE_ARTICLE_RES, ONE_ARTICLE_STRING, \
ONE_ARTICLE_STRING_FORMATTED, TWO_ARTICLES, TWO_ARTICLES_RES, TWO_ARTICLES_STRING,\
ONE_ARTICLE_NOT_PUBLISHED, ONE_ARTICLE_NOT_PUBLISHED_RES, ONE_ARTICLE_HTML, ONE_ARTICL... | 35.888889 | 116 | 0.752709 |
180f44189af5b0bf43aacf4507d963b7d9072451 | 5,232 | py | Python | data_processing/obs/calc_durack_ocean_maps.py | DamienIrving/ocean-analysis | 23a6dbf616fb84e6e158e32534ffd394e0df2e3e | [
"MIT"
] | 7 | 2017-06-06T20:20:58.000Z | 2020-02-05T23:28:41.000Z | data_processing/obs/calc_durack_ocean_maps.py | DamienIrving/ocean-analysis | 23a6dbf616fb84e6e158e32534ffd394e0df2e3e | [
"MIT"
] | 17 | 2017-04-06T04:46:37.000Z | 2021-07-01T00:47:50.000Z | data_processing/obs/calc_durack_ocean_maps.py | DamienIrving/ocean-analysis | 23a6dbf616fb84e6e158e32534ffd394e0df2e3e | [
"MIT"
] | 4 | 2021-01-19T01:31:40.000Z | 2022-03-15T00:50:11.000Z | """
Filename: calc_durack_ocean_maps.py
Author: Damien Irving, irving.damien@gmail.com
Description: Calculate the zonal and vertical mean ocean anomaly fields
from the Durack and Wijffels (2010) data files
"""
# Import general Python modules
import sys, os, pdb
import argparse, math
import n... | 39.938931 | 178 | 0.698203 |
5b06eaf37c7ad32f1ab0421c931feed803f6e93e | 8,766 | py | Python | src/python/pants/jvm/goals/coursier_integration_test.py | Eric-Arellano/pants | aaa9756bc4f2cc97bb97851a4295a0de85f374b1 | [
"Apache-2.0"
] | null | null | null | src/python/pants/jvm/goals/coursier_integration_test.py | Eric-Arellano/pants | aaa9756bc4f2cc97bb97851a4295a0de85f374b1 | [
"Apache-2.0"
] | 12 | 2022-01-06T23:20:22.000Z | 2022-03-17T05:06:37.000Z | src/python/pants/jvm/goals/coursier_integration_test.py | Eric-Arellano/pants | aaa9756bc4f2cc97bb97851a4295a0de85f374b1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from pathlib import Path
from textwrap import dedent
import pytest
from pants.core.target_types import ResourcesGeneratorTarget
from pants.core.target... | 33.976744 | 99 | 0.544832 |
252c938087b1ddbcd243e20cd4981916cf9d8f64 | 2,787 | py | Python | src/tests/dao_test/nicknames_dao_test.py | Veloxization/likahbot | 24e22711f514fc0878cf6fb9e516ad44425ea6a7 | [
"MIT"
] | null | null | null | src/tests/dao_test/nicknames_dao_test.py | Veloxization/likahbot | 24e22711f514fc0878cf6fb9e516ad44425ea6a7 | [
"MIT"
] | null | null | null | src/tests/dao_test/nicknames_dao_test.py | Veloxization/likahbot | 24e22711f514fc0878cf6fb9e516ad44425ea6a7 | [
"MIT"
] | null | null | null | import unittest
import os
from dao.nicknames_dao import NicknamesDAO
class TestNicknamesDAO(unittest.TestCase):
def setUp(self):
self.db_addr = "database/test_db.db"
os.popen(f"sqlite3 {self.db_addr} < database/schema.sql")
self.nicknames_dao = NicknamesDAO(self.db_addr)
def tearDown(s... | 47.237288 | 70 | 0.712594 |
cf4db466c5885d920eef7129902bc0299dbd2ca7 | 2,627 | py | Python | python/PHN.py | danijel3/ASRDemos | 33b82d56eba5b508f53f0120193b15f72859173b | [
"Apache-2.0"
] | 57 | 2016-02-10T02:11:50.000Z | 2021-06-23T15:39:00.000Z | python/PHN.py | danijel3/ASRDemos | 33b82d56eba5b508f53f0120193b15f72859173b | [
"Apache-2.0"
] | null | null | null | python/PHN.py | danijel3/ASRDemos | 33b82d56eba5b508f53f0120193b15f72859173b | [
"Apache-2.0"
] | 24 | 2016-04-05T19:31:44.000Z | 2022-01-07T12:17:10.000Z | # -*- coding: utf-8 -*-
import re
import numpy
class Segment:
def __init__(self, xmin=0, xmax=0, text=''):
self.__dict__.update(locals())
def __str__(self):
return str('"' + self.text + '" : ' + str(self.xmin) + ' -- ' + str(self.xmax))
def __repr__(self):
return self.__str__()
class PHN:
def __init_... | 21.532787 | 84 | 0.583555 |
ed8e404ec9aa9b318e020672e4b10567635875da | 2,429 | py | Python | code/python/User_CF.py | gitsoftsun/GraduationThesis | b632266c4071395b4bc020939e63cace54ab3d94 | [
"Apache-2.0"
] | null | null | null | code/python/User_CF.py | gitsoftsun/GraduationThesis | b632266c4071395b4bc020939e63cace54ab3d94 | [
"Apache-2.0"
] | null | null | null | code/python/User_CF.py | gitsoftsun/GraduationThesis | b632266c4071395b4bc020939e63cace54ab3d94 | [
"Apache-2.0"
] | null | null | null | class User_CF:
def __init__(self,train_file,test_file):
self.train_file = train_file
self.test_file = test_file
self.readData()
def readData(self):
#读取文件,并生成用户-物品的评分表和测试集
self.train = dict() #用户-物品的评分表
for line in open(self.train_file):
# user,item... | 37.953125 | 98 | 0.478798 |
702ae821078a279199ec8a26cb86b056cff90f24 | 1,489 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"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 ... | 36.317073 | 76 | 0.597717 |
fe0efe354e563308af649e06f79d03507614dd74 | 13,507 | py | Python | invenio_records_lom/fixtures/demo.py | tu-graz-library/invenio-records-lom | c811506e51a1ed15d11cf10d6e6ef83a4ecc202b | [
"MIT"
] | null | null | null | invenio_records_lom/fixtures/demo.py | tu-graz-library/invenio-records-lom | c811506e51a1ed15d11cf10d6e6ef83a4ecc202b | [
"MIT"
] | 18 | 2020-10-21T07:58:14.000Z | 2022-03-29T12:10:25.000Z | invenio_records_lom/fixtures/demo.py | tu-graz-library/invenio-records-lom | c811506e51a1ed15d11cf10d6e6ef83a4ecc202b | [
"MIT"
] | 7 | 2020-10-06T08:46:40.000Z | 2021-07-06T13:21:29.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Graz University of Technology.
#
# invenio-records-lom is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Fake LOM demo records."""
import json
from faker import Faker
from flask_princip... | 33.105392 | 128 | 0.617532 |
37209cda6ffc6ac4e8568fe62cee8558e1e4e517 | 289 | py | Python | submissions_viewer/tests_results/utils.py | ClassroomSuite/SubmissionsViewer | 1f8dd931e1a6c68b289d23deb1c25a2c438137e6 | [
"MIT"
] | null | null | null | submissions_viewer/tests_results/utils.py | ClassroomSuite/SubmissionsViewer | 1f8dd931e1a6c68b289d23deb1c25a2c438137e6 | [
"MIT"
] | 1 | 2020-08-06T14:51:57.000Z | 2020-08-06T14:51:57.000Z | submissions_viewer/tests_results/utils.py | ClassroomSuite/SubmissionsViewer | 1f8dd931e1a6c68b289d23deb1c25a2c438137e6 | [
"MIT"
] | null | null | null | import time
import ipywidgets as widgets
from IPython import display
def _display(out: widgets.Output, content, clear_output=True):
@out.capture(clear_output=clear_output, wait=True)
def _display_out():
display.display(content)
time.sleep(1)
_display_out()
| 20.642857 | 62 | 0.723183 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.