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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f715368c12fac7bcd0f0179357f6b421ee70790a | 795 | py | Python | config_music.py | vincenzodentamaro/transformer-xl | 61b76d783be49e409863667bba8576826bbf54df | [
"MIT"
] | 16 | 2020-09-30T02:31:53.000Z | 2022-03-09T10:27:25.000Z | config_music.py | vincenzodentamaro/transformer-xl | 61b76d783be49e409863667bba8576826bbf54df | [
"MIT"
] | 4 | 2020-11-09T03:58:04.000Z | 2021-09-21T09:00:22.000Z | config_music.py | vincenzodentamaro/transformer-xl | 61b76d783be49e409863667bba8576826bbf54df | [
"MIT"
] | 5 | 2020-09-30T02:31:56.000Z | 2021-10-06T15:50:18.000Z | import joblib
tempo = 500000
ppq = 480
numerator = 4
denominator = 4
clocks_per_click = 24
notated_32nd_notes_per_beat = 8
cc_kept = [64, 67]
cc_threshold = 64
cc_lower = 0
cc_upper = 127
vel_value = 64
n_notes = 128
n_cc = 2 * len(cc_kept)
n_sounds = 2 * n_notes + n_cc + 1
n_deltas = 66 + 1
pad_idx = 0
n_jobs... | 14.722222 | 106 | 0.735849 |
acac9470ef3655e8100f0fe32c5ea238f8e3bb7c | 3,281 | py | Python | Ene-Jun-2020/sanchez-niño-angela-gabriela/Examen/Primer Parcial/Ejercicio3/Ejercicio3.py | Andremm303/DAS_Sistemas | 0163505737e2b24365ea8b4e8135773a6801add4 | [
"MIT"
] | null | null | null | Ene-Jun-2020/sanchez-niño-angela-gabriela/Examen/Primer Parcial/Ejercicio3/Ejercicio3.py | Andremm303/DAS_Sistemas | 0163505737e2b24365ea8b4e8135773a6801add4 | [
"MIT"
] | null | null | null | Ene-Jun-2020/sanchez-niño-angela-gabriela/Examen/Primer Parcial/Ejercicio3/Ejercicio3.py | Andremm303/DAS_Sistemas | 0163505737e2b24365ea8b4e8135773a6801add4 | [
"MIT"
] | null | null | null | def decorador(func):
def funciondecorada(self):
if get_formato == 'HTML':
print (f'<p style="color:blue;text-align:center;" >{self.titulo}</p' )
elif get_formato == 'XML':
print ('No me se el formato' '<lki>')
elif get_formato == 'JSON':
print ('Lo ante... | 29.035398 | 168 | 0.639744 |
e461cc8fdbd98c7c50c4a7c207a2ec005d282b1a | 285,683 | py | Python | webapp/tests/test_functions.py | iltempo/graphite-web | fa6fe9d2c065b14280fa91f2772185b8fc860a56 | [
"Apache-2.0"
] | 1 | 2015-02-21T05:43:20.000Z | 2015-02-21T05:43:20.000Z | webapp/tests/test_functions.py | iltempo/graphite-web | fa6fe9d2c065b14280fa91f2772185b8fc860a56 | [
"Apache-2.0"
] | 2 | 2016-07-28T20:55:46.000Z | 2016-08-02T13:59:28.000Z | webapp/tests/test_functions.py | iltempo/graphite-web | fa6fe9d2c065b14280fa91f2772185b8fc860a56 | [
"Apache-2.0"
] | 1 | 2020-03-05T06:50:02.000Z | 2020-03-05T06:50:02.000Z | import copy
import inspect
import math
import pytz
import six
from datetime import datetime
from fnmatch import fnmatch
from mock import patch, call, MagicMock
from os.path import dirname, join
from six.moves import range
from .base import TestCase
from django.conf import settings
try:
from django.urls import reve... | 45.317735 | 396 | 0.578858 |
2612e2d7536238e0984e3b7ed094f8898d6dc1d0 | 1,448 | py | Python | turbo_stream/utils/file_handlers.py | DirksCGM/turbo-stream | dc297376726a6f68f3eafcce2244870d5e12fca7 | [
"MIT"
] | 1 | 2022-03-09T13:45:31.000Z | 2022-03-09T13:45:31.000Z | turbo_stream/utils/file_handlers.py | DirksCGM/turbo-stream | dc297376726a6f68f3eafcce2244870d5e12fca7 | [
"MIT"
] | null | null | null | turbo_stream/utils/file_handlers.py | DirksCGM/turbo-stream | dc297376726a6f68f3eafcce2244870d5e12fca7 | [
"MIT"
] | null | null | null | """
File Handler Methods
"""
import json
import logging
import pandas as pd
import yaml
logging.basicConfig(
format="%(asctime)s %(name)-12s %(levelname)-8s %(message)s", level=logging.INFO
)
def load_file(file_location: str, fmt: str) -> dict:
"""
Gathers file data from json or yaml.
"""
if fmt... | 26.814815 | 84 | 0.596685 |
db5aa477beb22b690b818f8acb04c60389425bb5 | 993 | py | Python | setup.py | agarimella/python-argusclient | 04eb7afe1995c1e0b4683e2b707478cee337b026 | [
"BSD-3-Clause"
] | null | null | null | setup.py | agarimella/python-argusclient | 04eb7afe1995c1e0b4683e2b707478cee337b026 | [
"BSD-3-Clause"
] | null | null | null | setup.py | agarimella/python-argusclient | 04eb7afe1995c1e0b4683e2b707478cee337b026 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2016, salesforce.com, inc.
# All rights reserved.
# Licensed under the BSD 3-Clause license.
# For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
#
from setuptools import setup, find_packages
version = '0.3'
setup(name='argusclient',
... | 29.205882 | 111 | 0.639476 |
a9e56599980c77903496c1e3c3df0b3666a79885 | 14,465 | py | Python | emgapianns/management/lib/utils.py | EBI-Metagenomics/ebi-metagenomics-api | 1f028902fe493583c5c8191dd5dae92cca9e15a9 | [
"Apache-2.0"
] | null | null | null | emgapianns/management/lib/utils.py | EBI-Metagenomics/ebi-metagenomics-api | 1f028902fe493583c5c8191dd5dae92cca9e15a9 | [
"Apache-2.0"
] | null | null | null | emgapianns/management/lib/utils.py | EBI-Metagenomics/ebi-metagenomics-api | 1f028902fe493583c5c8191dd5dae92cca9e15a9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2019 EMBL - European Bioinformatics Institute
#
# 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/LICEN... | 37.089744 | 116 | 0.672174 |
83b5b9d61c929f38ffbac9f870b3805080415203 | 423 | py | Python | wildlifecompliance/migrations/0129_auto_20190228_1702.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 1 | 2020-12-07T17:12:40.000Z | 2020-12-07T17:12:40.000Z | wildlifecompliance/migrations/0129_auto_20190228_1702.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 14 | 2020-01-08T08:08:26.000Z | 2021-03-19T22:59:46.000Z | wildlifecompliance/migrations/0129_auto_20190228_1702.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 15 | 2020-01-08T08:02:28.000Z | 2021-11-03T06:48:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-02-28 09:02
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wildlifecompliance', '0128_auto_20190228_1658'),
]
operations = [
migrations.Rename... | 21.15 | 58 | 0.640662 |
75451493349c469cb7e8910dbc1866a199bd6b0d | 1,241 | py | Python | setup.py | katharine-kinn/django-sql-debugger | 2436710fa68dcc931d4c7e4edc0dffc053afaa85 | [
"MIT"
] | null | null | null | setup.py | katharine-kinn/django-sql-debugger | 2436710fa68dcc931d4c7e4edc0dffc053afaa85 | [
"MIT"
] | null | null | null | setup.py | katharine-kinn/django-sql-debugger | 2436710fa68dcc931d4c7e4edc0dffc053afaa85 | [
"MIT"
] | null | null | null | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-sql-debugger',
version='0.1... | 36.5 | 87 | 0.664786 |
2a8f1256d6f0b73e27474e4d364e6071228093c7 | 13,025 | py | Python | autotest/test_gwf_buy_lak02.py | ougx/modflow6 | 70a056d977bfeb7b077eddab084f0836c9d1eff7 | [
"CC0-1.0"
] | null | null | null | autotest/test_gwf_buy_lak02.py | ougx/modflow6 | 70a056d977bfeb7b077eddab084f0836c9d1eff7 | [
"CC0-1.0"
] | null | null | null | autotest/test_gwf_buy_lak02.py | ougx/modflow6 | 70a056d977bfeb7b077eddab084f0836c9d1eff7 | [
"CC0-1.0"
] | 1 | 2020-09-01T18:43:19.000Z | 2020-09-01T18:43:19.000Z | # Test the buoyancy package and the variable density flows between the lake
# and the gwf model. This model has 4 layers and a lake incised within it.
# The model is transient and has heads in the aquifer higher than the initial
# stage in the lake. As the model runs, the lake and aquifer equalize and
# should end up... | 29.535147 | 90 | 0.566756 |
9a1ea2eb4dd4d3db8a99ce047085e95e3e194ce9 | 1,488 | py | Python | tests/login/test_conftest_idps.py | grugna/fence | 8cf0bb4160d82c03b58a176637df73458bd694e4 | [
"Apache-2.0"
] | null | null | null | tests/login/test_conftest_idps.py | grugna/fence | 8cf0bb4160d82c03b58a176637df73458bd694e4 | [
"Apache-2.0"
] | null | null | null | tests/login/test_conftest_idps.py | grugna/fence | 8cf0bb4160d82c03b58a176637df73458bd694e4 | [
"Apache-2.0"
] | 1 | 2022-02-10T20:21:35.000Z | 2022-02-10T20:21:35.000Z | import os
from tests.conftest import LOGIN_IDPS
def test_contfest_idps():
"""
This test checks that any newly added custom OIDC IDP has been added to
the list of IDPs to test (LOGIN_IDPS).
If you added an IDP and this test fails, do not edit this test. Either the
new IDP should be added to LOGIN... | 39.157895 | 99 | 0.622312 |
5244e8edbe443cb3f82e22d2b9b8325dd6e13930 | 958 | py | Python | python/593_valid_square.py | liaison/LeetCode | 8b10a1f6bbeb3ebfda99248994f7c325140ee2fd | [
"MIT"
] | 17 | 2016-03-01T22:40:53.000Z | 2021-04-19T02:15:03.000Z | python/593_valid_square.py | liaison/LeetCode | 8b10a1f6bbeb3ebfda99248994f7c325140ee2fd | [
"MIT"
] | null | null | null | python/593_valid_square.py | liaison/LeetCode | 8b10a1f6bbeb3ebfda99248994f7c325140ee2fd | [
"MIT"
] | 3 | 2019-03-07T03:48:43.000Z | 2020-04-05T01:11:36.000Z | class Solution:
def validSquare(self, p1: List[int], p2: List[int], p3: List[int], p4: List[int]) -> bool:
points = sorted([tuple(p1), tuple(p2), tuple(p3), tuple(p4)])
diag1 = (points[3][0] - points[0][0],
points[3][1] - points[0][1])
diag2 = (poi... | 38.32 | 94 | 0.4238 |
3b8a6831d07b3b958f24088a266b4ff2ffb04902 | 9,898 | py | Python | backend/tournesol/models/entity.py | sigmike/tournesol | 9d92ff9c552c3b2923b3222f5f32d6b7e558de29 | [
"CC0-1.0"
] | null | null | null | backend/tournesol/models/entity.py | sigmike/tournesol | 9d92ff9c552c3b2923b3222f5f32d6b7e558de29 | [
"CC0-1.0"
] | null | null | null | backend/tournesol/models/entity.py | sigmike/tournesol | 9d92ff9c552c3b2923b3222f5f32d6b7e558de29 | [
"CC0-1.0"
] | null | null | null | """
Entity and closely related models.
"""
import logging
from datetime import timedelta
import numpy as np
from django.conf import settings
from django.core.validators import RegexValidator
from django.db import models
from django.db.models import Q
from django.utils import timezone
from django.utils.html import for... | 32.241042 | 96 | 0.624672 |
d69ecb959a059c0eed352659ae9e9f3f2756e220 | 703 | py | Python | tests/common/test_bo.py | jungtaekkim/bayeso | d11c9ff8037cf7fd3f9b41362eaab120f1224c71 | [
"MIT"
] | 76 | 2018-01-18T03:03:14.000Z | 2022-02-07T06:41:41.000Z | tests/common/test_bo.py | POSTECH-CVLab/bayeso | d11c9ff8037cf7fd3f9b41362eaab120f1224c71 | [
"MIT"
] | 20 | 2018-06-29T16:48:03.000Z | 2021-04-19T00:30:57.000Z | tests/common/test_bo.py | POSTECH-CVLab/bayeso | d11c9ff8037cf7fd3f9b41362eaab120f1224c71 | [
"MIT"
] | 4 | 2020-01-07T06:24:17.000Z | 2021-06-11T06:21:42.000Z | #
# author: Jungtaek Kim (jtkim@postech.ac.kr)
# last updated: October 8, 2021
#
"""test_bo"""
def test_import_BO():
from bayeso.bo import BO
import bayeso.bo
print(BO)
print(bayeso.bo.BO)
def test_import_BOwGP():
from bayeso.bo import BOwGP
import bayeso.bo
print(BOwGP)
print(bayes... | 18.5 | 44 | 0.688478 |
3b65c14f525bf82b1119e2309b18ebf527057c8e | 3,795 | py | Python | commander/thirdparty/covertutils/payloads/windows/shellcode.py | how2how/ToyHome | 4457b1d28e21ed6fd4ab980a0f7fed345c570ae3 | [
"Apache-2.0"
] | 1 | 2020-07-26T01:08:30.000Z | 2020-07-26T01:08:30.000Z | commander/thirdparty/covertutils/payloads/windows/shellcode.py | how2how/ToyHome | 4457b1d28e21ed6fd4ab980a0f7fed345c570ae3 | [
"Apache-2.0"
] | null | null | null | commander/thirdparty/covertutils/payloads/windows/shellcode.py | how2how/ToyHome | 4457b1d28e21ed6fd4ab980a0f7fed345c570ae3 | [
"Apache-2.0"
] | null | null | null |
def init(storage) :
import ctypes
import ctypes.wintypes as wintypes
class __PROCESS_INFORMATION(ctypes.Structure):
"""see:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms684873(v=vs.85).aspx
"""
_fields_ = [("hProcess", wintypes.HANDLE),
("hThread", wintypes.HANDLE... | 33.883929 | 148 | 0.523584 |
97f055e8db659edf052089fb73337fd68c05063e | 788 | py | Python | profiles_api/migrations/0002_profilefeeditem.py | ProgramSKAN/DJango-REST-API | 8f6099365b2e136ad66ea554d5ae690d9ee13ca2 | [
"MIT"
] | null | null | null | profiles_api/migrations/0002_profilefeeditem.py | ProgramSKAN/DJango-REST-API | 8f6099365b2e136ad66ea554d5ae690d9ee13ca2 | [
"MIT"
] | null | null | null | profiles_api/migrations/0002_profilefeeditem.py | ProgramSKAN/DJango-REST-API | 8f6099365b2e136ad66ea554d5ae690d9ee13ca2 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-05-16 14:36
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('profiles_api', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 31.52 | 126 | 0.633249 |
db91b74edcb71f6f66e627b2233502692c4c15a2 | 7,867 | py | Python | lib/werkzeug/debug/__init__.py | Slashbunny/maraschino | 941a0f82a352e9c178e701d5156711b613f7f6db | [
"MIT"
] | 137 | 2015-01-12T19:29:04.000Z | 2022-02-25T04:51:02.000Z | lib/werkzeug/debug/__init__.py | Slashbunny/maraschino | 941a0f82a352e9c178e701d5156711b613f7f6db | [
"MIT"
] | 24 | 2015-01-06T08:36:13.000Z | 2019-04-08T13:59:05.000Z | lib/werkzeug/debug/__init__.py | Slashbunny/maraschino | 941a0f82a352e9c178e701d5156711b613f7f6db | [
"MIT"
] | 57 | 2015-01-01T00:42:44.000Z | 2022-03-10T20:54:41.000Z | # -*- coding: utf-8 -*-
"""
werkzeug.debug
~~~~~~~~~~~~~~
WSGI application traceback debugger.
:copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import mimetypes
from os.path import join, dirname, basename, isfile
from werkzeu... | 42.295699 | 78 | 0.596288 |
ce3da3c9438f226d33f5923aedc2983b051d33b3 | 2,137 | py | Python | src/harrastuspassi/harrastuspassi/tests/test_hobby_categories_api.py | jussih/harrastuspassi-backend | f35c26926a0ce3fde7a6151aa5d00cb6e1c1c069 | [
"MIT"
] | null | null | null | src/harrastuspassi/harrastuspassi/tests/test_hobby_categories_api.py | jussih/harrastuspassi-backend | f35c26926a0ce3fde7a6151aa5d00cb6e1c1c069 | [
"MIT"
] | null | null | null | src/harrastuspassi/harrastuspassi/tests/test_hobby_categories_api.py | jussih/harrastuspassi-backend | f35c26926a0ce3fde7a6151aa5d00cb6e1c1c069 | [
"MIT"
] | null | null | null | import pytest
from django.urls import reverse
from harrastuspassi.models import HobbyCategory
@pytest.mark.django_db
def test_hobby_category_exists(api_client, hobby_category):
hobby_category.name = 'Urheilu'
hobby_category.save()
response = api_client.get(reverse('hobbycategory-list'))
assert respons... | 44.520833 | 100 | 0.751989 |
d1935b2fa306e3449c6add2d443500d74fe7a1c4 | 2,230 | py | Python | apps/common/tasks.py | ycheng-aa/gated_launch_backend | cbb9e7e530ab28d5914276e9607ebfcf84be6433 | [
"MIT"
] | null | null | null | apps/common/tasks.py | ycheng-aa/gated_launch_backend | cbb9e7e530ab28d5914276e9607ebfcf84be6433 | [
"MIT"
] | null | null | null | apps/common/tasks.py | ycheng-aa/gated_launch_backend | cbb9e7e530ab28d5914276e9607ebfcf84be6433 | [
"MIT"
] | null | null | null | # Create your tasks here
from __future__ import absolute_import, unicode_literals
from celery import shared_task
from apps.common.utils import send_sms, send_email
from apps.common.utils import log_wrapper
from apps.utils.utils import sync_user_info_to_db, update_jira_to_zc, set_issues_to_cache, cache_app_owners, \
... | 19.561404 | 110 | 0.752915 |
cfd23c6734e8f434d00d0952ac383fcd77994623 | 8,423 | py | Python | NLI/analysis/input_reduction_baseline.py | ucinlp/facade | e135ead64fa1e2f15cef838b65497c0d143e5942 | [
"Apache-2.0"
] | 1 | 2021-07-26T08:14:33.000Z | 2021-07-26T08:14:33.000Z | NLI/analysis/input_reduction_baseline.py | ucinlp/facade | e135ead64fa1e2f15cef838b65497c0d143e5942 | [
"Apache-2.0"
] | 1 | 2021-07-26T15:50:08.000Z | 2021-10-03T02:03:11.000Z | NLI/analysis/input_reduction_baseline.py | ucinlp/facade | e135ead64fa1e2f15cef838b65497c0d143e5942 | [
"Apache-2.0"
] | null | null | null | # Built-in imports
import argparse
from collections import defaultdict
import pickle
import random
# Libraries
import torch
import numpy as np
from allennlp.data.vocabulary import Vocabulary
from allennlp.data.samplers import BucketBatchSampler
from allennlp.data import Batch
from allennlp.interpret.attackers impo... | 44.099476 | 142 | 0.706993 |
e2359f7141e453355cd87b92c24ee9b4558188de | 548 | py | Python | src/iris/main.py | janaSunrise/sklearn-datasets-implementation | c4978c1a2ef3eb8ead6b710eed461e806c4cb68a | [
"MIT"
] | 2 | 2021-04-15T05:43:49.000Z | 2021-07-10T14:23:51.000Z | src/iris/main.py | Rohith04MVK/sklearn-datasets-implementation | 6b0163ed7ac4899b8c553f4c34494eb8baa57641 | [
"MIT"
] | 2 | 2020-12-08T12:29:10.000Z | 2020-12-12T13:23:19.000Z | src/iris/main.py | Rohith04MVK/sklearn-datasets-implementation | 6b0163ed7ac4899b8c553f4c34494eb8baa57641 | [
"MIT"
] | 3 | 2021-11-29T03:39:32.000Z | 2021-12-31T10:22:55.000Z | from sklearn.datasets import load_iris
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
X, y = load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_... | 30.444444 | 101 | 0.806569 |
edccb0f6b3239005cd2f7078935b98ebb5883a70 | 2,088 | py | Python | tools/telemetry/telemetry/util/support_binaries.py | sunjc53yy/chromium | 049b380040949089c2a6e447b0cd0ac3c4ece38e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/telemetry/util/support_binaries.py | sunjc53yy/chromium | 049b380040949089c2a6e447b0cd0ac3c4ece38e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/telemetry/util/support_binaries.py | sunjc53yy/chromium | 049b380040949089c2a6e447b0cd0ac3c4ece38e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import stat
from telemetry import decorators
from telemetry.util import cloud_storage
from telemetry.util import path
def _GetBinPath(binary_nam... | 33.142857 | 78 | 0.744732 |
ffb9fc74697ec722e3acaee6ff711a2fb76d0ec2 | 10,791 | py | Python | Section 8/MySQL.py | PacktPublishing/Python-GUI-Programming-Solutions-V- | 5e0b5dbfb11745163cb6652d550936977a08cd8e | [
"MIT"
] | null | null | null | Section 8/MySQL.py | PacktPublishing/Python-GUI-Programming-Solutions-V- | 5e0b5dbfb11745163cb6652d550936977a08cd8e | [
"MIT"
] | null | null | null | Section 8/MySQL.py | PacktPublishing/Python-GUI-Programming-Solutions-V- | 5e0b5dbfb11745163cb6652d550936977a08cd8e | [
"MIT"
] | 1 | 2021-09-02T11:08:59.000Z | 2021-09-02T11:08:59.000Z | '''
Created on July 26, 2015
Section 8
@author: test
'''
# # most simple way to connect, exposing all credentials...NOT RECOMMENDED!
# conn = mysql.connector.connect(user='Admin', password='<adminPwd>', host='127.0.0.1', database='GuiDB')
# DBs
# [('information_schema',), ('mysql',), ('performance_schema',), ... | 32.308383 | 130 | 0.448615 |
d9b3a28b0d6d74535cbed9c69cd071587e585433 | 15,856 | py | Python | hvplot/util.py | FabianHofmann/hvplot | 04148a85863ad415d752ba678832291e4b68e8b3 | [
"BSD-3-Clause"
] | null | null | null | hvplot/util.py | FabianHofmann/hvplot | 04148a85863ad415d752ba678832291e4b68e8b3 | [
"BSD-3-Clause"
] | null | null | null | hvplot/util.py | FabianHofmann/hvplot | 04148a85863ad415d752ba678832291e4b68e8b3 | [
"BSD-3-Clause"
] | null | null | null | """
Provides utilities to convert data and projections
"""
import sys
from functools import wraps
from packaging.version import Version
from types import FunctionType
import pandas as pd
import holoviews as hv
import param
try:
import panel as pn
panel_available = True
except:
panel_available = False
fr... | 31.648703 | 112 | 0.580916 |
d773fde3a2558183e54cea2a1b6939dc727e2e81 | 61,736 | py | Python | Packs/ServiceNow/Integrations/ServiceNowv2/test_data/response_constants.py | stonelionsecurity/content | 69e37813e66fde356c600232ed160f4cff0c14a1 | [
"MIT"
] | null | null | null | Packs/ServiceNow/Integrations/ServiceNowv2/test_data/response_constants.py | stonelionsecurity/content | 69e37813e66fde356c600232ed160f4cff0c14a1 | [
"MIT"
] | null | null | null | Packs/ServiceNow/Integrations/ServiceNowv2/test_data/response_constants.py | stonelionsecurity/content | 69e37813e66fde356c600232ed160f4cff0c14a1 | [
"MIT"
] | null | null | null | RESPONSE_TICKET = {
'parent': '', 'made_sla': 'false', 'caused_by': '', 'watch_list': '', 'upon_reject': '',
'sys_updated_on': '2020-04-02 14:03:31',
'child_incidents': '', 'hold_reason': '', 'approval_history': '', 'number': 'INC0000039', 'resolved_by': '',
'sys_updated_by': 'admin',
'opened_by': {... | 34.585994 | 120 | 0.436536 |
50ad27ce3c2c502a8f03d692b54ef4cc7733d309 | 7,284 | py | Python | env/lib/python3.8/site-packages/pandas/tests/arrays/categorical/test_algos.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 4 | 2020-07-15T20:03:28.000Z | 2021-06-09T11:23:06.000Z | env/lib/python3.8/site-packages/pandas/tests/arrays/categorical/test_algos.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 7 | 2020-12-04T04:10:42.000Z | 2021-03-16T00:53:09.000Z | env/lib/python3.8/site-packages/pandas/tests/arrays/categorical/test_algos.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 5 | 2020-11-13T13:52:43.000Z | 2022-03-12T11:51:34.000Z | import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
@pytest.mark.parametrize("ordered", [True, False])
@pytest.mark.parametrize("categories", [["b", "a", "c"], ["a", "b", "c", "d"]])
def test_factorize(categories, ordered):
cat = pd.Categorical(
["b", "b", "a", "c", None], c... | 36.238806 | 80 | 0.620401 |
136834bd10757a90cafe97b3c103190f3595e294 | 1,290 | py | Python | src/elf/utils.py | Szpila123/Remote_device_testing-parser | 544e7f71390e7d222ac2b4ecec29d1d63e419d0d | [
"MIT"
] | null | null | null | src/elf/utils.py | Szpila123/Remote_device_testing-parser | 544e7f71390e7d222ac2b4ecec29d1d63e419d0d | [
"MIT"
] | null | null | null | src/elf/utils.py | Szpila123/Remote_device_testing-parser | 544e7f71390e7d222ac2b4ecec29d1d63e419d0d | [
"MIT"
] | null | null | null | from typing import Optional
import elftools.elf.elffile as elffile
from elftools.elf.sections import SymbolTableSection, Symbol
from elftools.dwarf.die import DIE
from elf.constants import DIE_FUNCTION_TAGS, DIE_TYPE_TAGS, DIE_VARIABLE_TAGS, SECTION_MAP_TYPE
from elf.exceptions import MissingSymbolTableError
from pr... | 33.947368 | 98 | 0.760465 |
4c72643d6cd3d7942a05743a3f09ac621be05f18 | 9,089 | py | Python | src/hvc/extract.py | NickleDave/hybrid-vocal-classifier | 2d95256437f90c9fe69ea1cf7b5e57e709f1d514 | [
"BSD-3-Clause"
] | 26 | 2017-05-01T10:18:23.000Z | 2021-12-30T04:06:54.000Z | src/hvc/extract.py | NickleDave/hybrid-vocal-classifier | 2d95256437f90c9fe69ea1cf7b5e57e709f1d514 | [
"BSD-3-Clause"
] | 94 | 2017-03-13T14:14:53.000Z | 2021-05-09T16:25:28.000Z | src/hvc/extract.py | NickleDave/hybrid-vocal-classifier | 2d95256437f90c9fe69ea1cf7b5e57e709f1d514 | [
"BSD-3-Clause"
] | 10 | 2017-08-26T00:36:30.000Z | 2022-02-12T13:59:43.000Z | """
feature extraction
"""
from .parseconfig import parse_config
from . import features
from .parse.extract import _validate_feature_group_and_convert_to_list
from .parse.ref_spect_params import refs_dict
def extract(
config_file=None,
data_dirs=None,
file_format=None,
annotation_file=None,
label... | 38.350211 | 94 | 0.609308 |
7aa39a0c6c910f53f2c83404c11ec76eeeecf9c6 | 4,238 | py | Python | eospy/utils.py | BrentDouglasB1/eospy | ed55d652f5dcc9e45917273e6bc14b37791e772d | [
"MIT"
] | null | null | null | eospy/utils.py | BrentDouglasB1/eospy | ed55d652f5dcc9e45917273e6bc14b37791e772d | [
"MIT"
] | null | null | null | eospy/utils.py | BrentDouglasB1/eospy | ed55d652f5dcc9e45917273e6bc14b37791e772d | [
"MIT"
] | null | null | null | from binascii import hexlify
import struct
import hashlib
import six
from .exceptions import InvalidKeyFile
def parse_key_file(filename, first_key=True):
keys=[]
with open(filename) as fo:
lines = fo.readlines()
for line in lines:
if line.startswith('Private'):
try:... | 27.699346 | 124 | 0.53327 |
a75f26cb7a4c11e137064cf1ee2a7ef5d0799f55 | 159 | py | Python | benedict/core/find.py | next-franciscoalgaba/python-benedict | 81ff459304868327238c322a0a8a203d9d5d4314 | [
"MIT"
] | 365 | 2019-05-21T05:50:30.000Z | 2022-03-29T11:35:35.000Z | benedict/core/find.py | next-franciscoalgaba/python-benedict | 81ff459304868327238c322a0a8a203d9d5d4314 | [
"MIT"
] | 78 | 2019-11-16T12:22:54.000Z | 2022-03-14T12:21:30.000Z | benedict/core/find.py | next-franciscoalgaba/python-benedict | 81ff459304868327238c322a0a8a203d9d5d4314 | [
"MIT"
] | 26 | 2019-12-16T06:34:12.000Z | 2022-02-28T07:16:41.000Z | # -*- coding: utf-8 -*-
def find(d, keys, default=None):
for key in keys:
if key in d:
return d.get(key, default)
return default
| 17.666667 | 38 | 0.540881 |
2dbfeb368ab644aeeb2f22f33264aa68e30e7bf2 | 15,888 | py | Python | tests/integration/callbacks/test_wildcards.py | winnerNick/dash | 52eb81c50f6646b28aed1dfaf90c4a91bfa63e31 | [
"MIT"
] | 54 | 2020-06-13T07:26:12.000Z | 2022-03-20T15:57:08.000Z | tests/integration/callbacks/test_wildcards.py | winnerNick/dash | 52eb81c50f6646b28aed1dfaf90c4a91bfa63e31 | [
"MIT"
] | 6 | 2020-06-12T17:08:37.000Z | 2022-03-01T05:01:36.000Z | tests/integration/callbacks/test_wildcards.py | winnerNick/dash | 52eb81c50f6646b28aed1dfaf90c4a91bfa63e31 | [
"MIT"
] | 8 | 2020-12-15T10:56:59.000Z | 2022-03-18T00:24:05.000Z | from multiprocessing import Value
import pytest
import re
from selenium.webdriver.common.keys import Keys
import dash_html_components as html
import dash_core_components as dcc
import dash
from dash.dependencies import Input, Output, State, ALL, ALLSMALLER, MATCH
def css_escape(s):
sel = re.sub("[\\{\\}\\\"\\'.:... | 34.765864 | 87 | 0.570179 |
622dc69bfec62a34c046907e26cdc1bf74c6ef22 | 1,152 | py | Python | bin/create_package.py | netsec/pytan | 29a3484d21cb90d8896275febd1c535e4f3cdc7e | [
"MIT"
] | null | null | null | bin/create_package.py | netsec/pytan | 29a3484d21cb90d8896275febd1c535e4f3cdc7e | [
"MIT"
] | null | null | null | bin/create_package.py | netsec/pytan | 29a3484d21cb90d8896275febd1c535e4f3cdc7e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- mode: Python; tab-width: 4; indent-tabs-mode: nil; -*-
# ex: set tabstop=4
# Please do not change the two lines above. See PEP 8, PEP 263.
'''Create a package object from command line arguments'''
__author__ = 'Jim Olsen <jim.olsen@tanium.com>'
__version__ = '2.1.5'
import os
import sys
sys... | 32.914286 | 81 | 0.736979 |
4932c2929920f436d5399c80ea0eb74382173114 | 7,590 | py | Python | src/color_jitter.py | jangirrishabh/look-closer | 91647b429a5e8f85fe29079035d4f51772df8382 | [
"MIT"
] | 15 | 2022-01-20T01:04:35.000Z | 2022-01-29T09:30:50.000Z | src/color_jitter.py | jangirrishabh/look-closer | 91647b429a5e8f85fe29079035d4f51772df8382 | [
"MIT"
] | 1 | 2022-03-24T23:44:11.000Z | 2022-03-27T21:59:24.000Z | src/color_jitter.py | jangirrishabh/look-closer | 91647b429a5e8f85fe29079035d4f51772df8382 | [
"MIT"
] | 1 | 2022-01-29T09:30:50.000Z | 2022-01-29T09:30:50.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import math
import numpy as np
import numbers
import random
import time
def random_color_jitter(x):
b,c,h,w = x.shape
transform = ColorJitter(
brightness=0.4,
contrast=0.4,
saturation=0.4,
hue=0.5,
batch_size=b,
stack_size=c//3
)
ret... | 36.490385 | 105 | 0.550198 |
a321635cd25320e4bd2b4bf2dea9148288a059aa | 3,770 | py | Python | train_tacotron.py | HappyBall/asr_guided_tacotron | be36f0895b81e338c5c51a7ab6d421fbf3aa055b | [
"MIT"
] | 5 | 2018-08-02T13:44:11.000Z | 2020-04-27T23:48:21.000Z | train_tacotron.py | HappyBall/asr_guided_tacotron | be36f0895b81e338c5c51a7ab6d421fbf3aa055b | [
"MIT"
] | 1 | 2019-08-19T06:47:26.000Z | 2020-05-24T01:18:22.000Z | train_tacotron.py | HappyBall/asr_guided_tacotron | be36f0895b81e338c5c51a7ab6d421fbf3aa055b | [
"MIT"
] | 5 | 2019-02-18T16:39:47.000Z | 2021-08-19T14:10:43.000Z | '''
modified from
https://www.github.com/kyubyong/tacotron
'''
import os
import sys
from hyperparams import Hyperparams as hp
import tensorflow as tf
from tqdm import tqdm
from utils import *
from graph import Graph
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_string("keep_tr... | 42.840909 | 242 | 0.61565 |
74553cec552cbf074d3c85e6848c73e44f6dc5ff | 3,627 | py | Python | spartan/model/CubeFlowPlus/CubeFlowPlus.py | vishalbelsare/spartan2 | c9e48a8e74c719a5633e71983e5bd10f0b6385c1 | [
"BSD-3-Clause"
] | 50 | 2020-08-24T15:21:37.000Z | 2022-03-09T09:18:17.000Z | spartan/model/CubeFlowPlus/CubeFlowPlus.py | vishalbelsare/spartan2 | c9e48a8e74c719a5633e71983e5bd10f0b6385c1 | [
"BSD-3-Clause"
] | 16 | 2020-08-24T15:20:46.000Z | 2021-12-20T03:13:40.000Z | spartan/model/CubeFlowPlus/CubeFlowPlus.py | vishalbelsare/spartan2 | c9e48a8e74c719a5633e71983e5bd10f0b6385c1 | [
"BSD-3-Clause"
] | 15 | 2020-08-24T15:13:16.000Z | 2022-02-26T15:25:05.000Z | from .._model import DMmodel
from .res_util import *
from ...util.basicutil import param_default
from .. import CubeFlow
class CubeFlowPlus(DMmodel):
def __init__(self, tensorList:list):
self.amt_tensor, self.cmt_tensor = tensorList[0], tensorList[1]
def __str__(self):
return str(vars(sel... | 42.670588 | 141 | 0.659222 |
86a44fcc33b38090593e3226eddb19f8fa2b10bf | 821 | py | Python | src/main.py | ULTRAJSRM/challenge-python-01 | cd39e9b85314f3eb08c397847dd5b3efc8a67974 | [
"MIT"
] | null | null | null | src/main.py | ULTRAJSRM/challenge-python-01 | cd39e9b85314f3eb08c397847dd5b3efc8a67974 | [
"MIT"
] | null | null | null | src/main.py | ULTRAJSRM/challenge-python-01 | cd39e9b85314f3eb08c397847dd5b3efc8a67974 | [
"MIT"
] | null | null | null | # Resolve the problem!!
PALINDROMES = [
'Acaso hubo buhos aca',
'A la catalana banal atacala',
'Amar da drama',
]
NOT_PALINDROMES = [
'Hola como estas',
'Platzi'
'Oscar',
]
def is_palindrome(palindrome):
one_word = palindrome.replace(" ", "")
one_word_mirror = one_word[::-1]
if ... | 17.847826 | 51 | 0.609013 |
ad04be9792798b1affa690a651db292e6e005d06 | 28,021 | py | Python | venv/lib/python3.5/site-packages/google/protobuf/internal/well_known_types_test.py | unnikrishnankgs/va | dc429f560dce399fd11cdf3471b152e59ca89d76 | [
"BSD-2-Clause"
] | 1 | 2017-12-05T15:35:47.000Z | 2017-12-05T15:35:47.000Z | venv/lib/python3.5/site-packages/google/protobuf/internal/well_known_types_test.py | unnikrishnankgs/va | dc429f560dce399fd11cdf3471b152e59ca89d76 | [
"BSD-2-Clause"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | venv/lib/python3.5/site-packages/google/protobuf/internal/well_known_types_test.py | unnikrishnankgs/va | dc429f560dce399fd11cdf3471b152e59ca89d76 | [
"BSD-2-Clause"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.000Z | #! /usr/bin/env python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ... | 38.437586 | 79 | 0.70258 |
29d0f18e4dd68e6f3277bbbcf793d7afc1579312 | 63 | py | Python | tests/__init__.py | SekouDiaoNlp/mlconjug | 840e990bd96b56785a68712e9729582ede168ec2 | [
"MIT"
] | 59 | 2018-06-26T10:46:01.000Z | 2022-03-21T17:33:51.000Z | tests/__init__.py | SekouDiaoNlp/mlconjug | 840e990bd96b56785a68712e9729582ede168ec2 | [
"MIT"
] | 736 | 2017-10-11T17:35:18.000Z | 2022-03-31T14:57:10.000Z | tests/__init__.py | SekouDiaoNlp/mlconjug | 840e990bd96b56785a68712e9729582ede168ec2 | [
"MIT"
] | 9 | 2018-06-26T10:46:03.000Z | 2022-02-22T07:40:14.000Z | # -*- coding: utf-8 -*-
"""Unit test package for mlconjug."""
| 15.75 | 37 | 0.571429 |
adee4503327e1b6330465c24d08f456b6d02adbc | 2,866 | py | Python | pyasn1_modules/rfc6955.py | pysnmp/pyasn1-modules | 93f5699988fbb090be13aaa339498c128ba7dedb | [
"BSD-2-Clause"
] | null | null | null | pyasn1_modules/rfc6955.py | pysnmp/pyasn1-modules | 93f5699988fbb090be13aaa339498c128ba7dedb | [
"BSD-2-Clause"
] | null | null | null | pyasn1_modules/rfc6955.py | pysnmp/pyasn1-modules | 93f5699988fbb090be13aaa339498c128ba7dedb | [
"BSD-2-Clause"
] | null | null | null | #
# This file is part of pyasn1-modules software.
#
# Created by Russ Housley.
#
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
# Diffie-Hellman Proof-of-Possession Algorithms
#
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc6955.txt
#
from pyasn1.type import n... | 19.364865 | 80 | 0.734124 |
a3f0220d2e0ec92d2fea550f593a18b567322fe6 | 41,447 | py | Python | extern/patched_smplx/patched_smplx/body_models.py | wangxihao/rgbd-kinect-pose | 03180723c99759ba2500bcd42b5fe7a1d26eb507 | [
"MIT"
] | 1 | 2022-02-07T06:12:26.000Z | 2022-02-07T06:12:26.000Z | extern/patched_smplx/patched_smplx/body_models.py | wangxihao/rgbd-kinect-pose | 03180723c99759ba2500bcd42b5fe7a1d26eb507 | [
"MIT"
] | null | null | null | extern/patched_smplx/patched_smplx/body_models.py | wangxihao/rgbd-kinect-pose | 03180723c99759ba2500bcd42b5fe7a1d26eb507 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is
# holder of all proprietary rights on this computer program.
# You can only use this computer program if you have closed
# a license agreement with MPG or you get the right to use the computer
# program from someone who is... | 42.728866 | 86 | 0.569305 |
289d03fd3a78072e9344f01958c2c279a5179efe | 9,092 | py | Python | modules/Manager.py | jurajkula/IBT | 7b09f6d331433bfbf3e7955754a36b69b332bb4e | [
"MIT"
] | 3 | 2019-05-16T18:54:49.000Z | 2019-10-21T11:12:50.000Z | modules/Manager.py | jurajkula/IBT | 7b09f6d331433bfbf3e7955754a36b69b332bb4e | [
"MIT"
] | null | null | null | modules/Manager.py | jurajkula/IBT | 7b09f6d331433bfbf3e7955754a36b69b332bb4e | [
"MIT"
] | null | null | null | import os
import time
from os import mkdir
from os.path import isdir
from threading import Lock
import cv2
import imutils
from modules.Camera import Detect
from modules.Camera.CameraHandler import CameraHandler
from modules.Config import Config
from modules.Fusion import Fusion
from modules.Logger.Logger import Logge... | 34.439394 | 114 | 0.478883 |
6a78a0d6a89af81b09d44bae20e394257c35dfbd | 411 | py | Python | vehiculo/migrations/0020_auto_20180528_1634.py | gusanare1/site1 | 97508d84cb964eaf92166434e53febb67e595589 | [
"Apache-2.0"
] | null | null | null | vehiculo/migrations/0020_auto_20180528_1634.py | gusanare1/site1 | 97508d84cb964eaf92166434e53febb67e595589 | [
"Apache-2.0"
] | null | null | null | vehiculo/migrations/0020_auto_20180528_1634.py | gusanare1/site1 | 97508d84cb964eaf92166434e53febb67e595589 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.5 on 2018-05-28 21:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vehiculo', '0019_auto_20180528_1632'),
]
operations = [
migrations.AlterField(
model_name='carro',
name='imagen_nomb... | 21.631579 | 68 | 0.608273 |
0634298ec1e3158b3dafc021121e9f643e3cb222 | 20,902 | py | Python | test/test_metalearning/pyMetaLearn/test_meta_features.py | tuggeluk/auto-sklearn | 202918e5641701c696b995039d06bfec81973cc6 | [
"BSD-3-Clause"
] | 1 | 2017-11-04T05:33:23.000Z | 2017-11-04T05:33:23.000Z | test/test_metalearning/pyMetaLearn/test_meta_features.py | tuggeluk/auto-sklearn | 202918e5641701c696b995039d06bfec81973cc6 | [
"BSD-3-Clause"
] | null | null | null | test/test_metalearning/pyMetaLearn/test_meta_features.py | tuggeluk/auto-sklearn | 202918e5641701c696b995039d06bfec81973cc6 | [
"BSD-3-Clause"
] | null | null | null | import os
import tempfile
from six import StringIO
from unittest import TestCase
import unittest
import arff
import numpy as np
import scipy.sparse
from sklearn.preprocessing.imputation import Imputer
from sklearn.datasets import make_multilabel_classification
from sklearn.externals.joblib import Memory
from autoskle... | 43.365145 | 95 | 0.616974 |
5e135965cc150198d30f6579d41b6058cc05f711 | 14,879 | py | Python | androidtv/firetv.py | diosdog/python-androidtv | 8cc6a7654c9bd8f3acd08601c51c165aada49f78 | [
"MIT"
] | null | null | null | androidtv/firetv.py | diosdog/python-androidtv | 8cc6a7654c9bd8f3acd08601c51c165aada49f78 | [
"MIT"
] | null | null | null | androidtv/firetv.py | diosdog/python-androidtv | 8cc6a7654c9bd8f3acd08601c51c165aada49f78 | [
"MIT"
] | null | null | null | """Communicate with an Amazon Fire TV device via ADB over a network.
ADB Debugging must be enabled.
"""
from .basetv import BaseTV
from . import constants
# Apps
APP_PACKAGE_LAUNCHER = "com.amazon.tv.launcher"
APP_PACKAGE_SETTINGS = "com.amazon.tv.settings"
# Intents
INTENT_LAUNCH = "android.intent.category.LAUNC... | 40.105121 | 156 | 0.488406 |
385f9599b9974565c130da232e5194163f19950c | 10,901 | py | Python | tests/unit/modules/linux_acl_test.py | pass-by-value/salt | 2ede44fe54516242e10fe428629d5f5a18e5f7ea | [
"Apache-2.0",
"MIT"
] | 2 | 2015-09-21T14:13:30.000Z | 2016-02-12T11:33:46.000Z | tests/unit/modules/linux_acl_test.py | pass-by-value/salt | 2ede44fe54516242e10fe428629d5f5a18e5f7ea | [
"Apache-2.0",
"MIT"
] | 1 | 2019-09-06T13:57:28.000Z | 2019-09-06T13:57:28.000Z | tests/unit/modules/linux_acl_test.py | pass-by-value/salt | 2ede44fe54516242e10fe428629d5f5a18e5f7ea | [
"Apache-2.0",
"MIT"
] | 2 | 2017-01-05T16:14:59.000Z | 2019-01-31T23:15:25.000Z | # -*- coding: utf-8 -*-
# Import Pytohn libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting import skipIf, TestCase
from salttesting.helpers import ensure_in_syspath
from salttesting.mock import NO_MOCK, NO_MOCK_REASON, MagicMock
ensure_in_syspath('../../')
# Import salt libs
from... | 54.778894 | 160 | 0.704981 |
cde486280d60137efcaf8f2934f2b0e07aad134f | 269 | py | Python | .slash/enchant.py | SMX-I/Chat-Commands | 54bdb98f27716b0b76c4d176f2f7b86983959420 | [
"MIT"
] | null | null | null | .slash/enchant.py | SMX-I/Chat-Commands | 54bdb98f27716b0b76c4d176f2f7b86983959420 | [
"MIT"
] | null | null | null | .slash/enchant.py | SMX-I/Chat-Commands | 54bdb98f27716b0b76c4d176f2f7b86983959420 | [
"MIT"
] | null | null | null | import servers
import itemfetch from servers
async def on_message():
if message.content.startswith('/enchant'):
then:
itemfetch.enchant('ih#0000')
then:
print('Item successfully enchanted')
then:
end;
| 19.214286 | 44 | 0.583643 |
406abff53af4ac8e267258559f1a7f8cf5ace7fa | 458 | py | Python | 0_basic/set_scope.py | ZQPei/tvm_schedule_examples | 7d362940a4e09d8df8e80b16b2a4a81307ec98b2 | [
"MIT"
] | null | null | null | 0_basic/set_scope.py | ZQPei/tvm_schedule_examples | 7d362940a4e09d8df8e80b16b2a4a81307ec98b2 | [
"MIT"
] | null | null | null | 0_basic/set_scope.py | ZQPei/tvm_schedule_examples | 7d362940a4e09d8df8e80b16b2a4a81307ec98b2 | [
"MIT"
] | 1 | 2022-03-28T03:16:14.000Z | 2022-03-28T03:16:14.000Z | import tvm
n = 1024
dtype = "float32"
A = tvm.te.placeholder((n, n), dtype=dtype, name='A')
k = tvm.te.reduce_axis((0, n), name='k')
B = tvm.te.compute((n,), lambda i: tvm.te.sum(A[i, k], axis=k), name='B')
C = tvm.te.compute((n,), lambda i: B[i] + 10, name='C')
s = tvm.te.create_schedule(C.op)
print(tvm.lower(s, [A... | 25.444444 | 73 | 0.600437 |
bda1136a001682ae4250973eda9f7ba24dc312c0 | 22,540 | py | Python | utils/aolib_imtable.py | tensor-flo/ambient-sound-self-supervision | 72e6944107620fb8c3ef4b428a2dfb1765e59492 | [
"MIT"
] | 7 | 2019-12-24T10:41:43.000Z | 2021-05-12T03:00:34.000Z | utils/aolib_imtable.py | tensor-flo/ambient-sound-self-supervision | 72e6944107620fb8c3ef4b428a2dfb1765e59492 | [
"MIT"
] | 5 | 2019-12-19T11:38:13.000Z | 2022-03-12T00:09:54.000Z | utils/aolib_imtable.py | tensor-flo/ambient-sound-self-supervision | 72e6944107620fb8c3ef4b428a2dfb1765e59492 | [
"MIT"
] | 2 | 2020-05-08T02:06:28.000Z | 2020-11-04T08:54:22.000Z | import numpy as np, sys, datetime, tempfile, glob
import tempfile, webbrowser, os, pylab, random
import aolib_util as ut, aolib_img as ig
def get_url():
# set this to be the URL of your web server (if you have one)
return None
def get_www_path():
# set this to be the directory hosted by a public web server (if ... | 35.273865 | 298 | 0.60244 |
6fdc12a20b0e5451164fa23dba985d45cfac230f | 707 | py | Python | var/spack/repos/builtin/packages/py-atomicwrites/package.py | MiddelkoopT/spack | 4d94c4c4600f42a7a3bb3d06ec879140bc259304 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-atomicwrites/package.py | MiddelkoopT/spack | 4d94c4c4600f42a7a3bb3d06ec879140bc259304 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-atomicwrites/package.py | MiddelkoopT/spack | 4d94c4c4600f42a7a3bb3d06ec879140bc259304 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyAtomicwrites(PythonPackage):
"""Atomic file writes."""
homepage = "https://github.c... | 35.35 | 95 | 0.745403 |
6d7c70510897330a843038abab96db8c24f568c3 | 4,067 | py | Python | benchmark/synthetic_tree.py | DebolinaHalder/FairForest | 36b7a29f867e9a7ae0a13e8bcdd8d67e71233e48 | [
"MIT"
] | null | null | null | benchmark/synthetic_tree.py | DebolinaHalder/FairForest | 36b7a29f867e9a7ae0a13e8bcdd8d67e71233e48 | [
"MIT"
] | null | null | null | benchmark/synthetic_tree.py | DebolinaHalder/FairForest | 36b7a29f867e9a7ae0a13e8bcdd8d67e71233e48 | [
"MIT"
] | null | null | null | #%%
import numpy as np
import pandas as pd
from scipy.special import logit
from fairforest import d_tree, random_tree
from fairforest import utils
import warnings
import matplotlib.pyplot as plt
#%%
warnings.simplefilter("ignore")
#%%
#np.random.seed(10)
#%%
def build_dataset(total_sample,number_of_correlated_featur... | 36.63964 | 195 | 0.723383 |
900b29e17791af5605f22461d96b5fa7bfb1e819 | 14,463 | py | Python | panda/models/dataset.py | newsapps/panda | 7553fd8cbc9c9c92a1b8be2e073141ec1b2ef903 | [
"MIT"
] | 4 | 2015-07-28T19:01:03.000Z | 2018-12-21T01:57:03.000Z | panda/models/dataset.py | NUKnightLab/panda | c8b81151cad9f23ecd439e4354e86cca1eb49bb1 | [
"MIT"
] | null | null | null | panda/models/dataset.py | NUKnightLab/panda | c8b81151cad9f23ecd439e4354e86cca1eb49bb1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from itertools import chain
from urllib import unquote
from django.conf import settings
from django.db import models
from django.utils.timezone import now
from panda import solr, utils
from panda.exceptions import DataImportError, DatasetLockedError
from panda.fields import JSONField
from pand... | 34.766827 | 128 | 0.599599 |
a703387fb851bb634c033912216c7a75a1f8983b | 4,027 | py | Python | yocto/poky/bitbake/lib/bb/ui/uihelper.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 2 | 2019-03-27T08:11:14.000Z | 2020-02-22T20:40:24.000Z | yocto/poky/bitbake/lib/bb/ui/uihelper.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 39 | 2016-08-23T11:23:28.000Z | 2017-04-07T08:00:52.000Z | yocto/poky/bitbake/lib/bb/ui/uihelper.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 1 | 2021-09-10T08:10:12.000Z | 2021-09-10T08:10:12.000Z | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2007 Richard Purdie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License versi... | 39.871287 | 118 | 0.624286 |
3c20b00630aec6ac53ab39808483d5ee819315dc | 3,880 | py | Python | live/RpycHost/rpyc/core/async.py | faroit/midihack | 5ce927576c4967499e164d95262a8391173c23ab | [
"CC0-1.0"
] | 4 | 2016-03-13T14:14:21.000Z | 2016-09-11T11:54:36.000Z | live/RpycHost/rpyc/core/async.py | faroit/midihack | 5ce927576c4967499e164d95262a8391173c23ab | [
"CC0-1.0"
] | null | null | null | live/RpycHost/rpyc/core/async.py | faroit/midihack | 5ce927576c4967499e164d95262a8391173c23ab | [
"CC0-1.0"
] | 1 | 2018-09-09T08:37:44.000Z | 2018-09-09T08:37:44.000Z | import time
class AsyncResultTimeout(Exception):
"""an exception that represents an :class:`AsyncResult` that has timed out"""
pass
class AsyncResult(object):
"""*AsyncResult* represents a computation that occurs in the background and
will eventually have a result. Use the :attr:`value` property to a... | 32.605042 | 81 | 0.578351 |
ccd6cca8a8c8d84cad5d4bb4644728c6693b744c | 2,504 | py | Python | monitor/system/migrations/0002_battery.py | SunWind2000/battery-monitor | ec8c58382389dc5bfe791aee0ab609a3c514ed8a | [
"MIT"
] | null | null | null | monitor/system/migrations/0002_battery.py | SunWind2000/battery-monitor | ec8c58382389dc5bfe791aee0ab609a3c514ed8a | [
"MIT"
] | null | null | null | monitor/system/migrations/0002_battery.py | SunWind2000/battery-monitor | ec8c58382389dc5bfe791aee0ab609a3c514ed8a | [
"MIT"
] | null | null | null | # Generated by Django 3.2.12 on 2022-03-06 03:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('system', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Battery',
fields=[
('id', ... | 47.245283 | 117 | 0.54353 |
cd44af213de461e05afc777a826d50ca61d30523 | 2,152 | py | Python | rollservice/migrations/0001_initial.py | stallmanifold/pnpdr | 49c84845e0a702e87f954135db070727cc77c2cc | [
"Apache-2.0",
"MIT"
] | null | null | null | rollservice/migrations/0001_initial.py | stallmanifold/pnpdr | 49c84845e0a702e87f954135db070727cc77c2cc | [
"Apache-2.0",
"MIT"
] | null | null | null | rollservice/migrations/0001_initial.py | stallmanifold/pnpdr | 49c84845e0a702e87f954135db070727cc77c2cc | [
"Apache-2.0",
"MIT"
] | null | null | null | # Generated by Django 2.0.4 on 2018-04-23 07:00
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 41.384615 | 149 | 0.603625 |
46f37dfcf52512619089d9162790aceb2e4d9839 | 1,442 | py | Python | wekzeug/serving_and_testing.py | amirongit/notecode | 3ce453531eaf4674d9a15e59510fa8dea77704fd | [
"Unlicense"
] | null | null | null | wekzeug/serving_and_testing.py | amirongit/notecode | 3ce453531eaf4674d9a15e59510fa8dea77704fd | [
"Unlicense"
] | null | null | null | wekzeug/serving_and_testing.py | amirongit/notecode | 3ce453531eaf4674d9a15e59510fa8dea77704fd | [
"Unlicense"
] | null | null | null | from io import BytesIO
from werkzeug.test import Client
from werkzeug.testapp import test_app
# werkzeug provides a Client class to simulate requests to a WSGI application,
# which has methods to make different types of requests and manage cookies.
sample_client = Client(test_app)
# the client request methods return... | 36.974359 | 78 | 0.749653 |
cfad255c7bf5286f6403e1991d66ab52ba19b51b | 1,372 | py | Python | video.py | zftan0709/CarND-BehavioralCloning | c933a8fd7e0d2f908485f056a29d31f007ef1a17 | [
"MIT"
] | null | null | null | video.py | zftan0709/CarND-BehavioralCloning | c933a8fd7e0d2f908485f056a29d31f007ef1a17 | [
"MIT"
] | null | null | null | video.py | zftan0709/CarND-BehavioralCloning | c933a8fd7e0d2f908485f056a29d31f007ef1a17 | [
"MIT"
] | null | null | null | from moviepy.editor import ImageSequenceClip
import argparse
import os
IMAGE_EXT = ['jpeg', 'gif', 'png', 'jpg']
def main():
parser = argparse.ArgumentParser(description='Create driving video.')
parser.add_argument(
'image_folder',
type=str,
default='',
help='Path to image fol... | 31.181818 | 118 | 0.664723 |
0a759ea7c7eceba21d1b84f98b6c87a99eac9df5 | 752 | py | Python | core/liteflow/core/models/workflow_step.py | USerik/liteflow | 752ac12e3472083ea11742815c0120ee725501fd | [
"MIT"
] | 26 | 2018-11-13T01:27:15.000Z | 2022-02-10T09:42:23.000Z | core/liteflow/core/models/workflow_step.py | USerik/liteflow | 752ac12e3472083ea11742815c0120ee725501fd | [
"MIT"
] | 1 | 2021-08-11T09:55:43.000Z | 2021-08-11T09:55:43.000Z | core/liteflow/core/models/workflow_step.py | USerik/liteflow | 752ac12e3472083ea11742815c0120ee725501fd | [
"MIT"
] | 11 | 2019-05-22T13:04:52.000Z | 2022-03-31T06:09:04.000Z | from typing import List, TypeVar, Generic
from .step_outcome import StepOutcome
from .execution_pointer import ExecutionPointer
T = TypeVar('T')
class WorkflowStep(Generic[T]):
RETRY = 0
SUSPEND = 1
TERMINATE = 2
COMPENSATE = 3
def __init__(self, body: T):
self.id = None
self.bo... | 22.787879 | 57 | 0.634309 |
eaa562dff247dffd841ac1403263d9ff9fd95bdc | 133 | py | Python | XMLHttpRequest/resources/requri.py | watilde/web-platform-tests | 97e16bef6d6599ae805521e2007a9430a12aa144 | [
"BSD-3-Clause"
] | 4 | 2020-09-09T15:28:01.000Z | 2021-12-01T00:59:56.000Z | XMLHttpRequest/resources/requri.py | watilde/web-platform-tests | 97e16bef6d6599ae805521e2007a9430a12aa144 | [
"BSD-3-Clause"
] | 1 | 2021-03-31T20:23:55.000Z | 2021-03-31T20:23:55.000Z | XMLHttpRequest/resources/requri.py | watilde/web-platform-tests | 97e16bef6d6599ae805521e2007a9430a12aa144 | [
"BSD-3-Clause"
] | 1 | 2020-03-31T17:20:54.000Z | 2020-03-31T17:20:54.000Z | def main(request, response):
if "full" in request.GET:
return request.url
else:
return request.request_path
| 19 | 35 | 0.639098 |
6c2e8d574c6c0b3799bfcef4d109af0b98d01321 | 4,188 | py | Python | {{cookiecutter.project_slug}}/config/settings/base.py | bjornkri/cookiecutter-django-gulp-react | 66f462fee7618868874adb0226b878df436cae96 | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/config/settings/base.py | bjornkri/cookiecutter-django-gulp-react | 66f462fee7618868874adb0226b878df436cae96 | [
"MIT"
] | 17 | 2017-12-02T15:55:55.000Z | 2018-10-01T10:10:31.000Z | {{cookiecutter.project_slug}}/config/settings/base.py | bjornkri/cookiecutter-django-gulp-react | 66f462fee7618868874adb0226b878df436cae96 | [
"MIT"
] | 1 | 2018-12-07T12:54:24.000Z | 2018-12-07T12:54:24.000Z | """
Django settings for {{cookiecutter.project_name}} project.
Generated by 'django-admin startproject' using Django 1.11.7.
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/se... | 28.297297 | 98 | 0.686485 |
ffe00485b1e8e80520a687899c7c12eab7c9408a | 9,970 | py | Python | fairlearn/widget/_fairlearn_dashboard.py | imatiach-msft/fairlearn | 72f2943b03fc5c70542a96755b4cec0eb1e60388 | [
"MIT"
] | null | null | null | fairlearn/widget/_fairlearn_dashboard.py | imatiach-msft/fairlearn | 72f2943b03fc5c70542a96755b4cec0eb1e60388 | [
"MIT"
] | 6 | 2021-03-11T00:38:07.000Z | 2022-02-27T07:50:00.000Z | fairlearn/widget/_fairlearn_dashboard.py | Acornagain/fair_regression_revised | 0e458fed0ec4c9eb3e8e17609da4bbd9563cbc96 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation and contributors.
# Licensed under the MIT License.
"""Defines the fairlearn dashboard class."""
from ._fairlearn_widget import FairlearnWidget
from fairlearn.metrics import (
true_negative_rate_group_summary,
false_positive_rate_group_summary,
false_negative_rate_gro... | 39.563492 | 95 | 0.571815 |
af070e3d030e9196b3ced128809e846c3658ff76 | 1,434 | py | Python | Codes/Day-094/Space-Invaders/player.py | MdGhulamAzadAnsari/100-Days-of-Code | 8ff993b2e3f7aecefde28cb443355e5fb4d6fbc6 | [
"MIT"
] | 3 | 2021-01-15T15:49:20.000Z | 2021-03-17T03:17:41.000Z | Codes/Day-094/Space-Invaders/player.py | MdGhulamAzadAnsari/100-Days-of-Code | 8ff993b2e3f7aecefde28cb443355e5fb4d6fbc6 | [
"MIT"
] | 2 | 2021-06-10T18:28:21.000Z | 2021-09-28T08:26:47.000Z | codes/Day-093/Space-Invaders/player.py | GhulamAzad/100-Days-of-Code | 9533d80a6bc6ce70123126615f0671f979573a67 | [
"MIT"
] | null | null | null | import pygame
from ship import Ship
import os
# Player player
YELLOW_SPACE_SHIP = pygame.image.load(
os.path.join("assets", "pixel_ship_yellow.png"))
YELLOW_LASER = pygame.image.load(
os.path.join("assets", "pixel_laser_yellow.png"))
class Player(Ship):
def __init__(self, x, y, health=100):
super... | 34.142857 | 119 | 0.577406 |
f0f0db94833c2c92108d086caccad8e316cd11ff | 15,634 | py | Python | aiohttp/web_urldispatcher.py | flying-sheep/aiohttp | 04191d9e44bd55a25be516fb246986141a5bdea5 | [
"Apache-2.0"
] | null | null | null | aiohttp/web_urldispatcher.py | flying-sheep/aiohttp | 04191d9e44bd55a25be516fb246986141a5bdea5 | [
"Apache-2.0"
] | null | null | null | aiohttp/web_urldispatcher.py | flying-sheep/aiohttp | 04191d9e44bd55a25be516fb246986141a5bdea5 | [
"Apache-2.0"
] | null | null | null | import abc
import asyncio
import collections
import mimetypes
import re
import os
import inspect
from urllib.parse import urlencode, unquote
from . import hdrs
from .abc import AbstractRouter, AbstractMatchInfo
from .protocol import HttpVersion11
from .web_exceptions import HTTPMethodNotAllowed, HTTPNotFound, HTTPNo... | 31.143426 | 79 | 0.5907 |
241d6cabe4787dc4567b167368551942a6ff1b53 | 294 | py | Python | setup.py | britt0508/ExplainedKinshipCorrect | e0e255ff9531af1436bb9a9fe07256e72a0061f7 | [
"BSD-Source-Code"
] | null | null | null | setup.py | britt0508/ExplainedKinshipCorrect | e0e255ff9531af1436bb9a9fe07256e72a0061f7 | [
"BSD-Source-Code"
] | null | null | null | setup.py | britt0508/ExplainedKinshipCorrect | e0e255ff9531af1436bb9a9fe07256e72a0061f7 | [
"BSD-Source-Code"
] | null | null | null | from setuptools import setup
setup(
name='ExplainedKinshipCorrect',
version='3.14',
packages=['stylegan'],
# package_dir={'': 'stylegan'},
url='',
license='',
author='Gebruiker',
author_email='b.e.van.leeuwen@student.vu.nl',
description='Setup for colab'
)
| 21 | 49 | 0.632653 |
5c8911d80e9ab2733f281224a64f52e1c36fedc8 | 2,421 | py | Python | fastpt/RG_ani.py | zhaotingchen/FAST-PT | f7fab86bf8a1a14e97c1edb83def82e241798c0f | [
"MIT"
] | 16 | 2016-09-22T10:59:41.000Z | 2021-12-19T14:45:16.000Z | fastpt/RG_ani.py | zhaotingchen/FAST-PT | f7fab86bf8a1a14e97c1edb83def82e241798c0f | [
"MIT"
] | 20 | 2018-10-24T16:46:03.000Z | 2021-07-01T13:57:47.000Z | fastpt/RG_ani.py | zhaotingchen/FAST-PT | f7fab86bf8a1a14e97c1edb83def82e241798c0f | [
"MIT"
] | 17 | 2016-09-21T18:31:21.000Z | 2021-08-23T14:09:42.000Z | ''' This is the code I use to make animaitons of the RG flow.
The code reads in data in the same format RG_<integration type>.py
outputs.
You may get some warnings for taking log of zero and such. So, far these
have not ruined any of the output
J. E. McEwen (c) 2016
'''
import numpy as np
import matplotlib.... | 22.839623 | 92 | 0.686906 |
8d0db49b167680c6bc35a5409cb7698bb926cbd1 | 3,672 | py | Python | Code/XGBoost_oversampling.py | srlakhe/SecureNLP-Classification-of-Relevant-Sentences-to-Malware | f522132006c32f5344971aaa61ddb4bd2ab13eac | [
"MIT"
] | 5 | 2018-04-12T13:49:54.000Z | 2021-03-03T13:17:55.000Z | Code/XGBoost_oversampling.py | srlakhe/SecureNLP-Classification-of-Relevant-Sentences-to-Malware | f522132006c32f5344971aaa61ddb4bd2ab13eac | [
"MIT"
] | 1 | 2021-04-15T02:13:29.000Z | 2021-04-15T02:13:29.000Z | Code/XGBoost_oversampling.py | srlakhe/SecureNLP-Classification-of-Relevant-Sentences-to-Malware | f522132006c32f5344971aaa61ddb4bd2ab13eac | [
"MIT"
] | 1 | 2018-11-05T02:50:54.000Z | 2018-11-05T02:50:54.000Z | #This is only CNN, with SMOTE oversampling
#python imports
import numpy as np
import codecs
import nltk
from nltk.corpus import stopwords
from os import listdir
import random
import scipy
import h5py
#keras imports
from keras.models import Sequential
from keras.layers import Conv1D, MaxPooling1D, Dropout, Dense, Flat... | 31.930435 | 110 | 0.748366 |
1640bf2e252292aa4d4c64cdb921a4ee56cf618f | 5,851 | py | Python | old/spider/run.py | zyk1995/pyzhihu | aead240e15d9e7725a39201c98d19ae5dff093fa | [
"MIT"
] | null | null | null | old/spider/run.py | zyk1995/pyzhihu | aead240e15d9e7725a39201c98d19ae5dff093fa | [
"MIT"
] | 7 | 2020-02-12T00:35:08.000Z | 2021-09-07T23:51:48.000Z | old/spider/run.py | zyk1995/pyzhihu | aead240e15d9e7725a39201c98d19ae5dff093fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Description
- 实现多线程,主线程和若干工作线程。
- 主线程:维护一个已爬取用户的set,用于去重;从响应队列中取出关注用户的列表,去重后放入任务队列。
- 工作线程:从任务队列获取url token,爬取用户信息后,存入csv文件;并生成响应信息放入响应队列。
Info
- author : "zyk"
- github : "1251134350@qq.com"
- date : "2017.11.24"
"""
import time
import os
import json
from threading ... | 29.700508 | 116 | 0.559733 |
d800e752eb6e10bd4f022588814fd90034006254 | 2,709 | py | Python | tests/parsers/syslog_plugins/cron.py | jonathan-greig/plaso | b88a6e54c06a162295d09b016bddbfbfe7ca9070 | [
"Apache-2.0"
] | 6 | 2015-07-30T11:07:24.000Z | 2021-07-23T07:12:30.000Z | tests/parsers/syslog_plugins/cron.py | jonathan-greig/plaso | b88a6e54c06a162295d09b016bddbfbfe7ca9070 | [
"Apache-2.0"
] | null | null | null | tests/parsers/syslog_plugins/cron.py | jonathan-greig/plaso | b88a6e54c06a162295d09b016bddbfbfe7ca9070 | [
"Apache-2.0"
] | 1 | 2021-07-23T07:12:37.000Z | 2021-07-23T07:12:37.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the cron syslog plugin."""
import unittest
from tests.parsers.syslog_plugins import test_lib
class CronSyslogPluginTest(test_lib.SyslogPluginTestCase):
"""Tests for the cron syslog plugin."""
def testParse(self):
"""Tests the parsing functionality... | 32.25 | 77 | 0.696567 |
dbbee8d8e9b80225537e10a124bd0b35374e3ea0 | 31,412 | py | Python | plugins/modules/oci_bds_instance_actions.py | hanielburton/oci-ansible-collection | dfdffde637f746d346ba35569be8c3a3407022f2 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_bds_instance_actions.py | hanielburton/oci-ansible-collection | dfdffde637f746d346ba35569be8c3a3407022f2 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_bds_instance_actions.py | hanielburton/oci-ansible-collection | dfdffde637f746d346ba35569be8c3a3407022f2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2017, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 39.021118 | 160 | 0.555425 |
7e4d6a746e52ed838bb94f8d70e4215bc3b1e1fd | 2,000 | py | Python | robotpy_ext/common_drivers/navx/registerio_i2c.py | twinters007/robotpy-wpilib-utilities | d2e18c16fc97a469e0621521e0fbed0093610d6e | [
"MIT",
"BSD-3-Clause"
] | 2 | 2017-01-16T03:10:57.000Z | 2017-01-16T03:11:00.000Z | robotpy_ext/common_drivers/navx/registerio_i2c.py | twinters007/robotpy-wpilib-utilities | d2e18c16fc97a469e0621521e0fbed0093610d6e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | robotpy_ext/common_drivers/navx/registerio_i2c.py | twinters007/robotpy-wpilib-utilities | d2e18c16fc97a469e0621521e0fbed0093610d6e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # validated: 2017-02-19 DS 3b0fc57cd0e0 roborio/java/navx_frc/src/com/kauailabs/navx/frc/RegisterIO_I2C.java
#----------------------------------------------------------------------------
# Copyright (c) Kauai Labs 2015. All Rights Reserved.
#
# Created in support of Team 2465 (Kauaibots). Go Purple Wave!
#
# Open Sour... | 29.411765 | 108 | 0.5235 |
a026501d4e5dd4848ce15eb6a6f4e8b1b1eb6574 | 2,194 | py | Python | pte_module.py | trulsedv/pokemon_type_effectiveness | 250863d59c737931fef5a78484af085ed7d5b7ac | [
"MIT"
] | null | null | null | pte_module.py | trulsedv/pokemon_type_effectiveness | 250863d59c737931fef5a78484af085ed7d5b7ac | [
"MIT"
] | null | null | null | pte_module.py | trulsedv/pokemon_type_effectiveness | 250863d59c737931fef5a78484af085ed7d5b7ac | [
"MIT"
] | null | null | null | import pandas as pd
def main():
list_effectiveness = import_effectiveness()
list_types = get_types(list_effectiveness)
li = find_n_way_double(list_effectiveness, list_types, 16)
for row in li:
print(row)
print(len(li))
def import_effectiveness():
path = 'effectiveness.csv'
df = p... | 28.493506 | 83 | 0.531905 |
14bba0789994325226ca202505a9dfb3ddd95431 | 4,356 | py | Python | pineboolib/fllegacy/FLDiskCache.py | Miguel-J/pineboo-buscar | 41a2f3ee0425d163619b78f32544c4b4661d5fa7 | [
"MIT"
] | null | null | null | pineboolib/fllegacy/FLDiskCache.py | Miguel-J/pineboo-buscar | 41a2f3ee0425d163619b78f32544c4b4661d5fa7 | [
"MIT"
] | null | null | null | pineboolib/fllegacy/FLDiskCache.py | Miguel-J/pineboo-buscar | 41a2f3ee0425d163619b78f32544c4b4661d5fa7 | [
"MIT"
] | null | null | null | from PyQt5 import QtCore
from PyQt5.QtCore import Qt
from pineboolib import decorators
from pineboolib.flcontrols import ProjectClass
AQ_USRHOME = "." # FIXME
class FLDiskCache(ProjectClass):
absoluteDirPath = ""
@decorators.BetaImplementation
def aqDiskCacheFind(self, key, string):
return se... | 34.299213 | 74 | 0.55854 |
97b31bd0be8974b64e98a3504d9e87897a7917d2 | 657 | py | Python | main.py | Zikil/bot-purewater-python | 4643c7187fb84c888fdff6db2ad3aa24a1a40728 | [
"Apache-2.0"
] | null | null | null | main.py | Zikil/bot-purewater-python | 4643c7187fb84c888fdff6db2ad3aa24a1a40728 | [
"Apache-2.0"
] | null | null | null | main.py | Zikil/bot-purewater-python | 4643c7187fb84c888fdff6db2ad3aa24a1a40728 | [
"Apache-2.0"
] | null | null | null |
# A very simple Flask Hello World app for you to get started with...
from flask import Flask, request, json
from settings import *
import messageHandler
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello from Flask! Hii'
@app.route('/', methods=['POST'])
def processing():
... | 24.333333 | 69 | 0.624049 |
8c5c501753cb8f170ae84b73dd868657f67f041b | 3,555 | py | Python | nuitka/nodes/shapes/ShapeMixins.py | em3ndez/Nuitka | a5a036a94c1842d1cd72f27c0c67461798fdf977 | [
"Apache-2.0"
] | 1 | 2019-09-09T19:27:43.000Z | 2019-09-09T19:27:43.000Z | nuitka/nodes/shapes/ShapeMixins.py | em3ndez/Nuitka | a5a036a94c1842d1cd72f27c0c67461798fdf977 | [
"Apache-2.0"
] | 1 | 2021-01-05T09:01:31.000Z | 2021-01-05T09:01:31.000Z | nuitka/nodes/shapes/ShapeMixins.py | em3ndez/Nuitka | a5a036a94c1842d1cd72f27c0c67461798fdf977 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 20.549133 | 78 | 0.661885 |
46b268266e14d9a013564e9c304d3ac148aba127 | 2,807 | py | Python | src/aperiodic-tilings/wangtile.py | wlbksy/pywonderland | 9e31411ecd203e1398a48a32fd4f8b7a398a2158 | [
"MIT"
] | null | null | null | src/aperiodic-tilings/wangtile.py | wlbksy/pywonderland | 9e31411ecd203e1398a48a32fd4f8b7a398a2158 | [
"MIT"
] | null | null | null | src/aperiodic-tilings/wangtile.py | wlbksy/pywonderland | 9e31411ecd203e1398a48a32fd4f8b7a398a2158 | [
"MIT"
] | null | null | null | """
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Draw Wang Tiles with Pyglet and GLSL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Code exported from srtuss's shadertoy project at
"https://www.shadertoy.com/view/Wds3z7"
"""
import sys
sys.path.append("../glslhelpers")
import time
import pyglet
pyglet.options["debug_gl"] = Fal... | 30.182796 | 96 | 0.562879 |
ff8286d0345810f3664e08dbee69b64192b882fb | 816 | py | Python | final/smalltest/foto.py | h3ct0rjs/ArtificialIntelligence | 7aead133b548c806052b6a0dbcb7259523cb2a75 | [
"MIT"
] | 1 | 2019-08-31T18:54:50.000Z | 2019-08-31T18:54:50.000Z | final/smalltest/foto.py | h3ct0rjs/ArtificialIntelligence | 7aead133b548c806052b6a0dbcb7259523cb2a75 | [
"MIT"
] | null | null | null | final/smalltest/foto.py | h3ct0rjs/ArtificialIntelligence | 7aead133b548c806052b6a0dbcb7259523cb2a75 | [
"MIT"
] | null | null | null | import pygame
import pygame.camera
from pygame.locals import *
DEVICE = '/dev/video0'
SIZE = (640, 480)
FILENAME = 'capture.png'
def camstream():
pygame.init()
pygame.camera.init()
display = pygame.display.set_mode(SIZE, 0)
camera = pygame.camera.Camera(DEVICE, SIZE)
camera.start()
screen = pyg... | 26.322581 | 60 | 0.615196 |
88a846241ee66a89766283d6e25fed707417ddb1 | 4,867 | py | Python | corehq/apps/linked_domain/tests/test_linked_case_claim.py | dankohn/commcare-hq | 42c40ad5881485d5192aab3dea5696942ee40810 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/linked_domain/tests/test_linked_case_claim.py | dankohn/commcare-hq | 42c40ad5881485d5192aab3dea5696942ee40810 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/linked_domain/tests/test_linked_case_claim.py | dankohn/commcare-hq | 42c40ad5881485d5192aab3dea5696942ee40810 | [
"BSD-3-Clause"
] | null | null | null | import json
from mock import patch
from tastypie.models import ApiKey
from corehq.apps.case_search.models import (
CaseSearchConfig,
CaseSearchQueryAddition,
FuzzyProperties,
IgnorePatterns,
)
from corehq.apps.domain.shortcuts import create_domain
from corehq.apps.linked_domain.decorators import REMOT... | 42.321739 | 107 | 0.709677 |
ab14bf89c585651a06eced7722cfcbe66127234f | 5,955 | py | Python | covid_forecasting_joint_learning/model/train.py | R-N/covid-forecasting-joint-learning | cb2edad1f3df987e523a8b8e0252c2265b1e5b23 | [
"MIT"
] | null | null | null | covid_forecasting_joint_learning/model/train.py | R-N/covid-forecasting-joint-learning | cb2edad1f3df987e523a8b8e0252c2265b1e5b23 | [
"MIT"
] | null | null | null | covid_forecasting_joint_learning/model/train.py | R-N/covid-forecasting-joint-learning | cb2edad1f3df987e523a8b8e0252c2265b1e5b23 | [
"MIT"
] | null | null | null | import torch
from torch import nn
import contextlib
from .loss import MSSELoss
from .loss_common import rmsse, reduce
from .util import LINE_PROFILER
import numpy as np
from ..pipeline import sird
dummy_context = contextlib.nullcontext()
def dummy():
pass
def __eval(
samples,
loss_fn,
weights,
... | 27.697674 | 99 | 0.605709 |
b3fa386fc9b55094646e488238b9aa37a76a6434 | 401 | py | Python | tests/roots/test-apidoc-toc/mypackage/main.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 1 | 2021-06-17T13:38:42.000Z | 2021-06-17T13:38:42.000Z | tests/roots/test-apidoc-toc/mypackage/main.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | null | null | null | tests/roots/test-apidoc-toc/mypackage/main.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 1 | 2021-07-23T12:09:13.000Z | 2021-07-23T12:09:13.000Z | #!/usr/bin/env python
import os
import mod_resource
import mod_something
if __name__ == "__main__":
print("Hello, world! -> something returns: {}".format(mod_something.something()))
res_path = \
os.path.join(os.path.dirname(mod_resource.__file__), 'resource.txt')
with open(res_path) as f:
... | 25.0625 | 85 | 0.670823 |
5835a98a3909c8ea485f135fa42e6cbde92f2054 | 6,547 | py | Python | optimization/optimization.py | jussiks/optimization | 85bd3d9ac5ce9295143b487e64698149363580bc | [
"MIT"
] | 1 | 2020-06-23T07:12:16.000Z | 2020-06-23T07:12:16.000Z | optimization/optimization.py | jussiks/optimization | 85bd3d9ac5ce9295143b487e64698149363580bc | [
"MIT"
] | null | null | null | optimization/optimization.py | jussiks/optimization | 85bd3d9ac5ce9295143b487e64698149363580bc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Class definitions for optimization problems and solutions
author: jussiks
"""
import inspect
import math
import random
import numpy as np
from typing import List, Any
class Problem:
def __init__(self, objective_function, constraint_function=None,
variable_bounds=None):... | 34.457895 | 103 | 0.624561 |
d23104a17d1035d99f1695d851b725b28a832e9e | 114 | py | Python | WebSocket_Chat_Room/chat_room_v001/lib/CUSTOMIZED_SESSION/settings.py | MMingLeung/Python_Study | 4ff1d02d2b6dd54e96f7179fa000548936b691e7 | [
"MIT"
] | 3 | 2017-12-27T14:08:17.000Z | 2018-02-10T13:01:08.000Z | WebSocket_Chat_Room/chat_room_v001/lib/CUSTOMIZED_SESSION/settings.py | MMingLeung/Python_Study | 4ff1d02d2b6dd54e96f7179fa000548936b691e7 | [
"MIT"
] | 4 | 2017-05-24T10:37:05.000Z | 2021-06-10T18:35:32.000Z | WebSocket_Chat_Room/chat_room_v001/lib/CUSTOMIZED_SESSION/settings.py | MMingLeung/Python_Study | 4ff1d02d2b6dd54e96f7179fa000548936b691e7 | [
"MIT"
] | 1 | 2018-02-14T19:05:30.000Z | 2018-02-14T19:05:30.000Z | SESSION_ENGINE = 'lib.CUSTOMIZED_SESSION.my_session.CachedSession'
EXPIRE_TIME = 300
SESSION_ID = '__session_id__' | 38 | 66 | 0.842105 |
aae66de89827167a4f52c32d5328d28f21611e59 | 5,505 | py | Python | kivymd/uix/spinner.py | abang90/testapp | 908fa868847b5d48e4ded38ccc910b9500bd23b9 | [
"MIT"
] | 18 | 2020-03-14T18:26:45.000Z | 2022-02-26T13:36:26.000Z | kivymd/uix/spinner.py | abang90/testapp | 908fa868847b5d48e4ded38ccc910b9500bd23b9 | [
"MIT"
] | 1 | 2020-05-15T10:09:15.000Z | 2020-05-15T10:09:15.000Z | kivymd/uix/spinner.py | abang90/testapp | 908fa868847b5d48e4ded38ccc910b9500bd23b9 | [
"MIT"
] | 2 | 2020-03-15T13:09:58.000Z | 2020-03-16T20:13:49.000Z | """
Components/Spinner
==================
.. rubric:: Circular progress indicator in Google's Material Design.
Usage
-----
.. code-block:: python
from kivy.lang import Builder
from kivymd.app import MDApp
KV = '''
Screen:
MDSpinner:
size_hint: None, None
size: dp(4... | 27.80303 | 93 | 0.613442 |
743814d04d8bb2a0d61101942abcc375f94cc40e | 2,836 | py | Python | common.py | parallel-fs-utils/fs-drift | 69b46925b9d13756c3928cddfec70e46ad5eedef | [
"Apache-2.0"
] | 6 | 2015-11-11T02:18:28.000Z | 2022-02-07T14:35:35.000Z | common.py | parallel-fs-utils/fs-drift | 69b46925b9d13756c3928cddfec70e46ad5eedef | [
"Apache-2.0"
] | 23 | 2020-01-06T19:00:33.000Z | 2022-03-21T11:42:16.000Z | common.py | parallel-fs-utils/fs-drift | 69b46925b9d13756c3928cddfec70e46ad5eedef | [
"Apache-2.0"
] | 4 | 2017-04-13T11:21:19.000Z | 2019-12-22T18:45:22.000Z | # common.py - shared symbols and globals
import os, errno
# exception class so you know where exception came from
class FsDriftException(Exception):
pass
NOTOK = 1
OK = 0
BYTES_PER_KiB = 1 << 10
BYTES_PER_MiB = 1 << 20
KiB_PER_GiB = 1 << 20
MiB_PER_GiB = 1 << 10
USEC_PER_SEC = 1000000
FD_UNDEFINED = -1
class ... | 24.033898 | 87 | 0.632581 |
0488fadc27dcf2d47f57fbedbb055a16650382ab | 10,953 | py | Python | ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/docker/docker_login.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 1 | 2019-04-16T21:23:15.000Z | 2019-04-16T21:23:15.000Z | ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/docker/docker_login.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 5 | 2020-02-26T20:10:50.000Z | 2021-09-23T23:23:18.000Z | ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/docker/docker_login.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# (c) 2016 Olaf Kilian <olaf.kilian@symanex.com>
# Chris Houseknecht, <house@redhat.com>
# James Tanner, <jtanner@redhat.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_func... | 32.990964 | 121 | 0.629508 |
e0527569e75117558bcca4f2ac6ad29d3612d3bc | 248 | py | Python | minifier/__init__.py | Nu11ify/Kreusada-Cogs | 63eaf414f9e00ecfd82b393120c977ebda29bea8 | [
"MIT"
] | null | null | null | minifier/__init__.py | Nu11ify/Kreusada-Cogs | 63eaf414f9e00ecfd82b393120c977ebda29bea8 | [
"MIT"
] | null | null | null | minifier/__init__.py | Nu11ify/Kreusada-Cogs | 63eaf414f9e00ecfd82b393120c977ebda29bea8 | [
"MIT"
] | null | null | null | import json
import pathlib
from .minifier import Minifier
with open(pathlib.Path(__file__).parent / "info.json") as fp:
__red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"]
def setup(bot):
bot.add_cog(Minifier(bot)) | 24.8 | 78 | 0.766129 |
6889a81699e7d1e6ceeceaad1bb40e5bf538b227 | 37,548 | py | Python | backend/bot/modules/tosurnament/post_result.py | NezzarClp/Tosurnament | 7aa750f6f663ae0f3f875d5fb50a35b422bd0dd2 | [
"MIT"
] | null | null | null | backend/bot/modules/tosurnament/post_result.py | NezzarClp/Tosurnament | 7aa750f6f663ae0f3f875d5fb50a35b422bd0dd2 | [
"MIT"
] | null | null | null | backend/bot/modules/tosurnament/post_result.py | NezzarClp/Tosurnament | 7aa750f6f663ae0f3f875d5fb50a35b422bd0dd2 | [
"MIT"
] | null | null | null | """Post results commands"""
import math
import re
from discord.ext import commands
from discord.utils import escape_markdown
from bot.modules.tosurnament import module as tosurnament
from common.databases.bracket import Bracket
from common.databases.players_spreadsheet import TeamInfo
from common.databases.schedules_s... | 45.512727 | 120 | 0.639395 |
17b5036692120152df5268fc371f1cfe7ffc7d86 | 4,819 | py | Python | tool/optimizers/brute_force_optimizer.py | Lattice-Automation/icor-codon-optimization | 9a90ab0839ade255d00ccfb64463186fcef1a17d | [
"MIT"
] | 5 | 2021-08-10T17:17:27.000Z | 2022-03-20T03:41:47.000Z | tool/optimizers/brute_force_optimizer.py | Lattice-Automation/icor-codon-optimization | 9a90ab0839ade255d00ccfb64463186fcef1a17d | [
"MIT"
] | 2 | 2021-12-09T17:45:21.000Z | 2022-03-25T22:26:48.000Z | tool/optimizers/brute_force_optimizer.py | Lattice-Automation/icor-codon-optimization | 9a90ab0839ade255d00ccfb64463186fcef1a17d | [
"MIT"
] | 4 | 2021-12-04T14:33:26.000Z | 2021-12-29T03:47:51.000Z | '''
Generates a sequence of codons and then iterates through the sequence, constantly adjusting the current codon to maximize CAI.
Goal of this is to find a combination of codons to maximize CAI (achieve 1.0 CAI).
'''
# Import modules
import os
from Bio import SeqIO
from Bio.Seq import Seq
import random
import numpy a... | 31.292208 | 831 | 0.547209 |
84568d3428c8e9437a6b6bfea830f9839d012514 | 2,527 | py | Python | valentinesday_helperfiles/valentines_scraping.py | jill-augustine/ShinyTweetyPeople | 7e8db99f6f869f787757e268edb97c3a3c42ecc8 | [
"MIT"
] | null | null | null | valentinesday_helperfiles/valentines_scraping.py | jill-augustine/ShinyTweetyPeople | 7e8db99f6f869f787757e268edb97c3a3c42ecc8 | [
"MIT"
] | null | null | null | valentinesday_helperfiles/valentines_scraping.py | jill-augustine/ShinyTweetyPeople | 7e8db99f6f869f787757e268edb97c3a3c42ecc8 | [
"MIT"
] | null | null | null | import os
os.chdir('..')
import json
import time
import requests
import logging
import logging.config
with open('logging_conf.json', 'r') as f:
logConfDict = json.load(f)
logging.config.dictConfig(logConfDict)
logger = logging.getLogger('ScrapingLogger')
import pandas as pd
import numpy as np
import datetime as dt... | 29.729412 | 111 | 0.643055 |
5d65273dadc970b015fa265e6d75dc5312e11b2d | 1,920 | py | Python | openpeerpower/components/gc100/switch.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | openpeerpower/components/gc100/switch.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | openpeerpower/components/gc100/switch.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Support for switches using GC100."""
import voluptuous as vol
from openpeerpower.components.switch import PLATFORM_SCHEMA
from openpeerpower.const import DEVICE_DEFAULT_NAME
import openpeerpower.helpers.config_validation as cv
from openpeerpower.helpers.entity import ToggleEntity
from . import CONF_PORTS, DATA_GC1... | 30 | 84 | 0.676042 |
8e0042695e5f7920c256d339497c230de03ebc30 | 30 | py | Python | client/src/repository/__init__.py | y-yu/qrand | b041c3c9cccaf20ee24a0ad90c81b89d3dc753bf | [
"MIT"
] | 3 | 2020-02-02T09:04:21.000Z | 2020-02-09T07:25:59.000Z | client/src/repository/__init__.py | y-yu/qrand | b041c3c9cccaf20ee24a0ad90c81b89d3dc753bf | [
"MIT"
] | null | null | null | client/src/repository/__init__.py | y-yu/qrand | b041c3c9cccaf20ee24a0ad90c81b89d3dc753bf | [
"MIT"
] | null | null | null | from . import qrand_api_caller | 30 | 30 | 0.866667 |
07aea4d596fd8eca9ab8db7f03668dc634e517f8 | 5,108 | py | Python | src/packagedcode/plugin_package.py | jimjag/scancode-toolk | c100d815ca2f49d165c322762549612df601bea7 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2021-03-08T15:02:16.000Z | 2021-03-08T15:02:16.000Z | src/packagedcode/plugin_package.py | sthagen/scancode-toolkit | dcf593e524773afcc9f5c19429403775a6c49d2e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | src/packagedcode/plugin_package.py | sthagen/scancode-toolkit | dcf593e524773afcc9f5c19429403775a6c49d2e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | #
# Copyright (c) nexB Inc. and others. All rights reserved.
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/scancode-toolkit for support or download.
# See https://aboutcode.org for more in... | 34.748299 | 99 | 0.669734 |
c47a2db6fee947bbbd82c9261a935559a17d5887 | 221 | py | Python | python/test/server/protocol/test_crc.py | scrutinydebugger/scrutiny | 7530790ae40f20c3008fe196e39cab07c4b73445 | [
"MIT"
] | 1 | 2021-04-18T02:58:59.000Z | 2021-04-18T02:58:59.000Z | python/test/server/protocol/test_crc.py | scrutinydebugger/scrutiny | 7530790ae40f20c3008fe196e39cab07c4b73445 | [
"MIT"
] | null | null | null | python/test/server/protocol/test_crc.py | scrutinydebugger/scrutiny | 7530790ae40f20c3008fe196e39cab07c4b73445 | [
"MIT"
] | null | null | null | import unittest
from scrutiny.server.protocol.crc32 import crc32
class TestCRC(unittest.TestCase):
def test_crc32(self):
data = bytes([1,2,3,4,5,6,7,8,9,10])
self.assertEqual(crc32(data), 622876539) | 24.555556 | 48 | 0.696833 |
85c20e5c5acccd71646843f3d7c9ba112d295180 | 2,983 | py | Python | weather.py | cdle/PagerMaid_Plugins | d77ce5d7e798f354128dc05306659b2896f0ee8e | [
"MIT"
] | 1 | 2022-02-25T15:57:20.000Z | 2022-02-25T15:57:20.000Z | weather.py | cdle/PagerMaid_Plugins | d77ce5d7e798f354128dc05306659b2896f0ee8e | [
"MIT"
] | null | null | null | weather.py | cdle/PagerMaid_Plugins | d77ce5d7e798f354128dc05306659b2896f0ee8e | [
"MIT"
] | 2 | 2022-02-25T15:57:22.000Z | 2022-03-04T01:18:56.000Z | import json
import datetime
from requests import get
from pagermaid import version
from pagermaid.listener import listener
from pagermaid.utils import obtain_message, alias_command
icons = {
"01d": "🌞",
"01n": "🌚",
"02d": "⛅️",
"02n": "⛅️",
"03d": "☁️",
"03n": "☁️",
"04d": "☁️",
"04n"... | 35.511905 | 119 | 0.550117 |
ec1161638c0866cdbfb4d6533648e56fdbc47567 | 813 | py | Python | keys/aws/s3.py | sarquaz/keys | c63c5423234e963c2890358c79e0ab860ca38e50 | [
"MIT"
] | 1 | 2020-01-14T03:53:23.000Z | 2020-01-14T03:53:23.000Z | keys/aws/s3.py | sarquaz/keys | c63c5423234e963c2890358c79e0ab860ca38e50 | [
"MIT"
] | null | null | null | keys/aws/s3.py | sarquaz/keys | c63c5423234e963c2890358c79e0ab860ca38e50 | [
"MIT"
] | null | null | null | import logging
class S3(object):
"""S3 logic"""
def __init__(self, bucket_name='bucket', **kwargs):
super(S3, self).__init__()
self._logger = logging.getLogger(type(self).__name__)
self._logger.debug("init with kwargs %s" % str(kwargs))
if 'bucket_name' in kwar... | 23.228571 | 63 | 0.511685 |
2354c78aaa4afbab8db4f5c01a70fb1720800579 | 631 | py | Python | src/evaluating_rewards/scripts/distances/__init__.py | HumanCompatibleAI/evaluating_rewards | 7b99ec9b415d805bd77041f2f7807d112dec9802 | [
"Apache-2.0"
] | 42 | 2020-04-27T06:54:39.000Z | 2022-02-10T00:59:53.000Z | src/evaluating_rewards/scripts/distances/__init__.py | HumanCompatibleAI/evaluating-rewards | 7b99ec9b415d805bd77041f2f7807d112dec9802 | [
"Apache-2.0"
] | 49 | 2019-11-07T22:01:35.000Z | 2021-02-08T17:27:36.000Z | src/evaluating_rewards/scripts/distances/__init__.py | HumanCompatibleAI/evaluating_rewards | 7b99ec9b415d805bd77041f2f7807d112dec9802 | [
"Apache-2.0"
] | 2 | 2020-10-06T12:17:31.000Z | 2021-06-22T18:03:02.000Z | # Copyright 2020 Adam Gleave
#
# 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 wr... | 39.4375 | 74 | 0.751189 |
d30f347d0971b2edcbdb4193bd7ce752291fb195 | 704 | py | Python | robots/catkin_ws/build/lilibot_controller/catkin_generated/pkg.installspace.context.pc.py | sunzhon/Lilibot | 8fc9e5e0beea87bd25743a9c28f9419dbbc7479c | [
"BSD-3-Clause"
] | 3 | 2020-12-06T08:46:45.000Z | 2021-07-28T13:28:53.000Z | robots/catkin_ws/build/lilibot_controller/catkin_generated/pkg.installspace.context.pc.py | sunzhon/Lilibot | 8fc9e5e0beea87bd25743a9c28f9419dbbc7479c | [
"BSD-3-Clause"
] | 1 | 2020-10-03T07:25:14.000Z | 2020-10-03T07:25:14.000Z | robots/catkin_ws/build/lilibot_controller/catkin_generated/pkg.installspace.context.pc.py | sunzhon/Lilibot | 8fc9e5e0beea87bd25743a9c28f9419dbbc7479c | [
"BSD-3-Clause"
] | 1 | 2021-07-21T07:45:51.000Z | 2021-07-21T07:45:51.000Z | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/suntao/workspace/stbot/lilibot/robots/catkin_ws/install/include".split(';') if "/home/suntao/workspace/stbot/lilibot/robots/catkin_ws/install/include" != "" else []
PROJECT_CATKIN_DEPENDS = "rosc... | 78.222222 | 205 | 0.796875 |
d3c64eddff7b6ff61b8dfde418a8e5514a5f4541 | 1,380 | py | Python | __init__.py | stuartlangridge/bio-calendar-mycroft | eaee5d7df4915576b4dd518f85e89f45922661a0 | [
"Apache-2.0"
] | null | null | null | __init__.py | stuartlangridge/bio-calendar-mycroft | eaee5d7df4915576b4dd518f85e89f45922661a0 | [
"Apache-2.0"
] | null | null | null | __init__.py | stuartlangridge/bio-calendar-mycroft | eaee5d7df4915576b4dd518f85e89f45922661a0 | [
"Apache-2.0"
] | null | null | null | """
List tech events happening in Birmingham over the next few days.
Uses the back end published for the Alexa Flash Briefing.
"""
from adapt.intent import IntentBuilder
from mycroft.skills.core import MycroftSkill, intent_handler
from mycroft.util.log import LOG
import requests
from requests import RequestException
F... | 31.363636 | 82 | 0.632609 |
a4723dbca3bfeb9031682a428a003e38a5572bb5 | 291 | py | Python | acwx/wx/graph/__init__.py | duelafn/python-acwx | 8c9fe7920b3d1060e4be63a6a90dfccba10a1801 | [
"MIT"
] | null | null | null | acwx/wx/graph/__init__.py | duelafn/python-acwx | 8c9fe7920b3d1060e4be63a6a90dfccba10a1801 | [
"MIT"
] | null | null | null | acwx/wx/graph/__init__.py | duelafn/python-acwx | 8c9fe7920b3d1060e4be63a6a90dfccba10a1801 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Author: Dean Serenevy <dean@serenevy.net>
# This software is Copyright (c) 2014 CMM, Inc.
from __future__ import division, absolute_import, print_function, unicode_literals
from acwx.wx.graph.graph import *
from acwx.wx.graph.series import *
| 36.375 | 82 | 0.697595 |
468af5e5e81f45903c82413c5a89a17c8cac13cd | 1,473 | py | Python | preliminary_contest/deep_learning/helper/preprocess.py | YihaoChan/2021-Tianchi-GAIIC-Track1-Rank-3 | a79a8ae4bc0f8b2662f71df4caaa7fa382735f9f | [
"Apache-2.0"
] | 22 | 2021-06-04T13:01:08.000Z | 2022-02-18T13:19:46.000Z | preliminary_contest/deep_learning/helper/preprocess.py | YihaoChan/2021-Tianchi-GAIIC-Track1-Rank-3 | a79a8ae4bc0f8b2662f71df4caaa7fa382735f9f | [
"Apache-2.0"
] | null | null | null | preliminary_contest/deep_learning/helper/preprocess.py | YihaoChan/2021-Tianchi-GAIIC-Track1-Rank-3 | a79a8ae4bc0f8b2662f71df4caaa7fa382735f9f | [
"Apache-2.0"
] | 2 | 2021-06-06T09:41:08.000Z | 2021-06-09T01:05:10.000Z | import pandas as pd
import directory
from tqdm import tqdm
def train_pro(train_set_path):
if train_set_path != directory.TRAIN_SET_PATH:
raise ValueError('Train_set_path error.')
train_df = pd.read_csv(train_set_path, header=None)
train_df.columns = ['report_ID', 'description', 'region']
tr... | 27.792453 | 92 | 0.670061 |
41b8953309665dfb5b4accd97201d59f80acf3a6 | 6,978 | py | Python | caet5/models/mtf_model.py | LeoLaugier/self_supervised_t5_style_transfer | f40bc68fc300874e110bbba5af954df2881d62f8 | [
"Apache-2.0"
] | 16 | 2020-07-09T06:52:00.000Z | 2022-03-06T13:47:09.000Z | caet5/models/mtf_model.py | LeoLaugier/self_supervised_t5_style_transfer | f40bc68fc300874e110bbba5af954df2881d62f8 | [
"Apache-2.0"
] | 3 | 2021-09-14T12:04:09.000Z | 2022-03-02T14:05:33.000Z | caet5/models/mtf_model.py | LeoLaugier/self_supervised_t5_style_transfer | f40bc68fc300874e110bbba5af954df2881d62f8 | [
"Apache-2.0"
] | 3 | 2021-03-20T00:29:16.000Z | 2021-12-29T01:18:03.000Z | import functools
import gin
import t5
from t5.models.mtf_model import MtfModel
from t5.models.mtf_model import _get_latest_checkpoint_from_dir, _operative_config_path
from mesh_tensorflow.transformer import utils
from mesh_tensorflow_caet5.utils import eval_model_ll, infer_model_ll, train_model_ll
from caet5.data.util... | 56.274194 | 119 | 0.689166 |
c295a542885c020fe416c3fc001409044bd392e1 | 19,627 | py | Python | examples/rllib/multiagent_exps/bayesian_1_env.py | eugenevinitsky/bayesian_reasoning_traffic | de3c14f03fed9cab913bb692877851320a3b6843 | [
"MIT"
] | 2 | 2020-12-03T21:13:39.000Z | 2022-03-13T09:12:43.000Z | examples/rllib/multiagent_exps/bayesian_1_env.py | eugenevinitsky/bayesian_reasoning_traffic | de3c14f03fed9cab913bb692877851320a3b6843 | [
"MIT"
] | null | null | null | examples/rllib/multiagent_exps/bayesian_1_env.py | eugenevinitsky/bayesian_reasoning_traffic | de3c14f03fed9cab913bb692877851320a3b6843 | [
"MIT"
] | 1 | 2021-02-05T16:51:34.000Z | 2021-02-05T16:51:34.000Z | import argparse
import json
import numpy as np
from gym.spaces import Tuple
import ray
try:
from ray.rllib.agents.agent import get_agent_class
except ImportError:
from ray.rllib.agents.registry import get_agent_class
from ray.rllib.agents.ddpg.td3 import TD3Trainer
from ray.rllib.env.group_agents_wrapper impor... | 33.550427 | 100 | 0.627554 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.