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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5c7e3ec13f3ef324ea8af2fbefe8b8d9b2dcf24d | 3,322 | py | Python | scripts/apache_status_analyze.py | JaccyLi/zabbix | d306ba996e425ff280dee3232dba0c17c8e542bd | [
"MIT"
] | 8 | 2016-08-03T08:30:43.000Z | 2019-12-28T10:14:37.000Z | scripts/apache_status_analyze.py | xiaomatech/zabbix | d306ba996e425ff280dee3232dba0c17c8e542bd | [
"MIT"
] | null | null | null | scripts/apache_status_analyze.py | xiaomatech/zabbix | d306ba996e425ff280dee3232dba0c17c8e542bd | [
"MIT"
] | 6 | 2017-11-18T07:17:29.000Z | 2019-12-28T10:14:39.000Z | #!/usr/bin/python
import urllib
import os
from tempfile import mkstemp
import StringIO
import csv
import commands
import parser
def fetchURL(url, user=None, passwd=None):
if user and passwd:
parts = url.split('://')
url = parts[0] + "://" + user + ":" + passwd + "@" + parts[1]
conn = urllib.u... | 26.790323 | 74 | 0.493076 |
7ae8452578937e7eda499f0648ab69a2682daf41 | 2,112 | py | Python | azure/servicefabric/models/deployed_service_package_health_state.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure/servicefabric/models/deployed_service_package_health_state.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 2 | 2016-09-30T21:40:24.000Z | 2017-11-10T18:16:18.000Z | azure/servicefabric/models/deployed_service_package_health_state.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.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 ... | 44.93617 | 156 | 0.682765 |
1993db469c944ce48e5a0436038c21a857a2f161 | 12,458 | py | Python | tools/asm_module.py | sgsaenger/emscripten | beee1d65f05187412d59d74952bb1d03251c59fb | [
"MIT"
] | 1 | 2021-02-10T04:30:14.000Z | 2021-02-10T04:30:14.000Z | tools/asm_module.py | sgsaenger/emscripten | beee1d65f05187412d59d74952bb1d03251c59fb | [
"MIT"
] | null | null | null | tools/asm_module.py | sgsaenger/emscripten | beee1d65f05187412d59d74952bb1d03251c59fb | [
"MIT"
] | null | null | null | # Copyright 2013 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
from __future__ import print_function
import sys, re, itertools
from... | 37.637462 | 140 | 0.626104 |
58f8da69d006d74248528c3a27ea331c1bb10451 | 10,634 | py | Python | src/meltano/cli/config.py | hashdeps/meltano | 19c52ea35c226a3a95e6ba523b93637a878328cc | [
"MIT"
] | null | null | null | src/meltano/cli/config.py | hashdeps/meltano | 19c52ea35c226a3a95e6ba523b93637a878328cc | [
"MIT"
] | null | null | null | src/meltano/cli/config.py | hashdeps/meltano | 19c52ea35c226a3a95e6ba523b93637a878328cc | [
"MIT"
] | null | null | null | import json
import tempfile
from pathlib import Path
import click
import dotenv
from meltano.core.db import project_engine
from meltano.core.plugin import PluginType
from meltano.core.plugin.error import PluginNotFoundError
from meltano.core.plugin.settings_service import PluginSettingsService
from meltano.core.plugin... | 32.126888 | 113 | 0.642468 |
bb22dab5fa3e2f88e5477c45e2137388fb743b3b | 924 | py | Python | sa/profiles/Eltex/ESR/get_arp.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | sa/profiles/Eltex/ESR/get_arp.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | sa/profiles/Eltex/ESR/get_arp.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Eltex.ESR.get_arp
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# --------------------------------------------------------------... | 31.862069 | 71 | 0.451299 |
6d9c0343ae01b54c84483b849c72ef60929c89f2 | 2,580 | py | Python | swig/python/gdal-utils/osgeo_utils/samples/gcps2wld.py | sthagen/OSGeo-gdal | 07631e3f3352f4f7453344b1cb73c6b681609d38 | [
"Apache-2.0"
] | null | null | null | swig/python/gdal-utils/osgeo_utils/samples/gcps2wld.py | sthagen/OSGeo-gdal | 07631e3f3352f4f7453344b1cb73c6b681609d38 | [
"Apache-2.0"
] | null | null | null | swig/python/gdal-utils/osgeo_utils/samples/gcps2wld.py | sthagen/OSGeo-gdal | 07631e3f3352f4f7453344b1cb73c6b681609d38 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# ******************************************************************************
# $Id$
#
# Name: gcps2wld
# Project: GDAL Python Interface
# Purpose: Translate the set of GCPs on a file into first order approximation
# in world file format.
# Author: Frank Warmerdam, warm... | 35.833333 | 80 | 0.635271 |
ebf50753edd31ba12443e1fe40ddb66b72d4d3e0 | 2,167 | py | Python | covid19api.py | Mitrajit/covid19-twitter | db491d0c9b40e00971224763d3f213d6c528547b | [
"MIT"
] | 3 | 2021-05-12T15:32:30.000Z | 2021-06-03T04:50:10.000Z | covid19api.py | Mitrajit/covid19-twitter | db491d0c9b40e00971224763d3f213d6c528547b | [
"MIT"
] | 1 | 2021-06-09T07:46:19.000Z | 2021-06-09T07:46:19.000Z | covid19api.py | Mitrajit/covid19-twitter | db491d0c9b40e00971224763d3f213d6c528547b | [
"MIT"
] | null | null | null | # Thanks to covid19india for providing the data
import json, ssl, sys
import urllib.request, urllib.parse, urllib.error
import datetime
def fetch_data(url):
ctx = ssl.create_default_context()
# ctx.check_hostname = False
# ctx.verify_mode = ssl.CERT_NONE
print('Retrieving', url)
uh = urllib.reques... | 44.22449 | 146 | 0.659898 |
13aabd42471183a40eedb8f16b9a85fc2165c6cf | 3,988 | py | Python | moto/sqs/models.py | tinyclues/moto | 8612e9d78223d56949eba53ef32bedc4bde0e7de | [
"Apache-2.0"
] | null | null | null | moto/sqs/models.py | tinyclues/moto | 8612e9d78223d56949eba53ef32bedc4bde0e7de | [
"Apache-2.0"
] | null | null | null | moto/sqs/models.py | tinyclues/moto | 8612e9d78223d56949eba53ef32bedc4bde0e7de | [
"Apache-2.0"
] | null | null | null | import hashlib
import time
import re
from moto.core import BaseBackend
from moto.core.utils import camelcase_to_underscores, get_random_message_id
from .utils import generate_receipt_handle
class Message(object):
def __init__(self, message_id, body):
self.id = message_id
self.body = body
... | 31.401575 | 82 | 0.617352 |
34f64af93f57d7edcb81d6b9febcaff1c77507ef | 44,951 | py | Python | openstack_dashboard/dashboards/admin/networks/tests.py | hashsos/hashcloudos-horizon | 0cc080ca6777e4a1dac5cbcc6143202baddab176 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/networks/tests.py | hashsos/hashcloudos-horizon | 0cc080ca6777e4a1dac5cbcc6143202baddab176 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/networks/tests.py | hashsos/hashcloudos-horizon | 0cc080ca6777e4a1dac5cbcc6143202baddab176 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 NEC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 46.198356 | 79 | 0.574025 |
574811c675152bbff8656b551092f5838402212a | 1,899 | py | Python | waitlist/utility/jinja2/__init__.py | kimnnmadsen/eve-inc-waitlist | c3e4853c5563a95edbf105c11e73d481595fb3ab | [
"MIT"
] | null | null | null | waitlist/utility/jinja2/__init__.py | kimnnmadsen/eve-inc-waitlist | c3e4853c5563a95edbf105c11e73d481595fb3ab | [
"MIT"
] | 1 | 2020-02-18T05:11:20.000Z | 2020-02-18T05:29:10.000Z | waitlist/utility/jinja2/__init__.py | kimnnmadsen/eve-inc-waitlist | c3e4853c5563a95edbf105c11e73d481595fb3ab | [
"MIT"
] | null | null | null | from datetime import datetime
from sqlalchemy.inspection import inspect
from flask import request
from flask_login import current_user
from typing import Callable, Dict, Any
from waitlist.base import app
from waitlist.data.version import version
from waitlist.permissions import perm_manager
from waitlist.utility.con... | 35.830189 | 101 | 0.727751 |
535d292f45dbc25cafd561f4aa891465a5c8ddf8 | 2,478 | py | Python | package/scripts/elastic_master.py | simileas/elasticsearch-ambari | 03b9af27cbf243961e5944d9274f935139c846c4 | [
"MIT"
] | null | null | null | package/scripts/elastic_master.py | simileas/elasticsearch-ambari | 03b9af27cbf243961e5944d9274f935139c846c4 | [
"MIT"
] | null | null | null | package/scripts/elastic_master.py | simileas/elasticsearch-ambari | 03b9af27cbf243961e5944d9274f935139c846c4 | [
"MIT"
] | null | null | null | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | 30.975 | 72 | 0.682405 |
e477125fe60cee2007c142d69d8a3a47e4c2b928 | 10,520 | py | Python | docs/conf.py | verri/i3pystatus | eaa16030af0d7b2007eceed5e6d992c5afac2cfa | [
"MIT"
] | null | null | null | docs/conf.py | verri/i3pystatus | eaa16030af0d7b2007eceed5e6d992c5afac2cfa | [
"MIT"
] | null | null | null | docs/conf.py | verri/i3pystatus | eaa16030af0d7b2007eceed5e6d992c5afac2cfa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# i3pystatus documentation build configuration file, created by
# sphinx-quickstart on Mon Oct 14 17:41:37 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | 28.980716 | 91 | 0.701141 |
2c0b627d39ccdf58500bdb6ee3cd6dff6624cef0 | 6,022 | py | Python | scons-local/scons-local-2.3.6/SCons/Tool/textfile.py | rdadolf/msms | ef1dcf345234a8241f12b7952801bde9d7b406b8 | [
"BSD-3-Clause"
] | null | null | null | scons-local/scons-local-2.3.6/SCons/Tool/textfile.py | rdadolf/msms | ef1dcf345234a8241f12b7952801bde9d7b406b8 | [
"BSD-3-Clause"
] | null | null | null | scons-local/scons-local-2.3.6/SCons/Tool/textfile.py | rdadolf/msms | ef1dcf345234a8241f12b7952801bde9d7b406b8 | [
"BSD-3-Clause"
] | null | null | null | # -*- python -*-
#
# Copyright (c) 2001 - 2015 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, co... | 34.215909 | 107 | 0.664895 |
b228a76d732305fa5a5692241824a6ef37ea7c09 | 5,976 | py | Python | meerkat_api/test/test_alerts.py | meerkat-code/meerkat_api | 9ab617498e52df5a49b993ee1c931071eab6ab92 | [
"MIT"
] | null | null | null | meerkat_api/test/test_alerts.py | meerkat-code/meerkat_api | 9ab617498e52df5a49b993ee1c931071eab6ab92 | [
"MIT"
] | 11 | 2016-06-22T17:05:49.000Z | 2018-04-12T12:56:50.000Z | meerkat_api/test/test_alerts.py | who-emro/meerkat_api | 9ab617498e52df5a49b993ee1c931071eab6ab92 | [
"MIT"
] | 1 | 2020-08-06T22:46:58.000Z | 2020-08-06T22:46:58.000Z | #!/usr/bin/env python3
"""
Meerkat API Tests
Unit tests for the alerts resource in Meerkat API
"""
import json, unittest, meerkat_api
from meerkat_api.test import settings
from datetime import datetime
from meerkat_api.test import db_util
class MeerkatAPIAlertsTestCase(unittest.TestCase):
def setUp(self):
... | 43.304348 | 102 | 0.601238 |
db6c8d2395256453ba1bf07ca94d7df5eb6cd69d | 1,450 | py | Python | tests/test_configuration.py | paultiplady/pylot | 6e1a599d046f8fa1efd8bedaafb97e486dea5b65 | [
"MIT"
] | null | null | null | tests/test_configuration.py | paultiplady/pylot | 6e1a599d046f8fa1efd8bedaafb97e486dea5b65 | [
"MIT"
] | 2 | 2017-12-02T18:38:37.000Z | 2021-06-01T21:32:34.000Z | tests/test_configuration.py | paultiplady/pylot | 6e1a599d046f8fa1efd8bedaafb97e486dea5b65 | [
"MIT"
] | null | null | null | import logging
import pytest
from pylot.configuration import Field, Configuration, ConfigurationError
logging.basicConfig(level=logging.INFO, format=' %(message)s')
class SimpleConfig(Configuration):
foo = Field()
class DefaultConfig(Configuration):
foo = Field()
bar = Field(default='BAR')
def test... | 25 | 96 | 0.683448 |
1b1520a398d7fba6b4950cf6e13997c3d280fb30 | 461 | py | Python | web_test - lipei/data/login_data.py | wl027728/web_demo_wl | 52bae068afc4bd67f6a2e5b1d29ab7e78f1776f8 | [
"MIT"
] | null | null | null | web_test - lipei/data/login_data.py | wl027728/web_demo_wl | 52bae068afc4bd67f6a2e5b1d29ab7e78f1776f8 | [
"MIT"
] | null | null | null | web_test - lipei/data/login_data.py | wl027728/web_demo_wl | 52bae068afc4bd67f6a2e5b1d29ab7e78f1776f8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Create Time: 2019/8/24 21:30
Author: 作者
"""
#TASK:3008972840230636上传完成,正在下载上传结果
user_info_error = [('','123456','请输入手机号'),
('18684720553','','请输入密码'),
('182684720553','python','请输入正确的手机号')
]
user_info_invalidate = [('186847205... | 30.733333 | 69 | 0.544469 |
4756cf16ad63b0a47b7cf75fe169fe1fbbdfcea5 | 2,595 | py | Python | test/metrics/android_lmk_reason.py | nicomazz/perfetto | fb875c61cf00ded88a3f46cb562ab943129cb7af | [
"Apache-2.0"
] | 2 | 2020-03-09T04:39:32.000Z | 2020-03-09T09:12:02.000Z | test/metrics/android_lmk_reason.py | nicomazz/perfetto | fb875c61cf00ded88a3f46cb562ab943129cb7af | [
"Apache-2.0"
] | 6 | 2021-03-01T21:03:47.000Z | 2022-02-26T01:51:15.000Z | test/metrics/android_lmk_reason.py | nicomazz/perfetto | fb875c61cf00ded88a3f46cb562ab943129cb7af | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (C) 2018 The Android Open Source Project
#
# 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 ... | 36.549296 | 80 | 0.776879 |
37d51b182848af2d2ab758100d4a9c22df2d18ef | 7,357 | py | Python | src/python/pants/backend/go/util_rules/build_pkg_target.py | wimax-grapl/pants | 0aabd417a772ea4e39999c4415c67db40de679a4 | [
"Apache-2.0"
] | 1,806 | 2015-01-05T07:31:00.000Z | 2022-03-31T11:35:41.000Z | src/python/pants/backend/go/util_rules/build_pkg_target.py | wimax-grapl/pants | 0aabd417a772ea4e39999c4415c67db40de679a4 | [
"Apache-2.0"
] | 9,565 | 2015-01-02T19:01:59.000Z | 2022-03-31T23:25:16.000Z | src/python/pants/backend/go/util_rules/build_pkg_target.py | riisi/pants | b33327389fab67c47b919710ea32f20ca284b1a6 | [
"Apache-2.0"
] | 443 | 2015-01-06T20:17:57.000Z | 2022-03-31T05:28:17.000Z | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import dataclasses
from dataclasses import dataclass
from pants.backend.go.target_types import (
GoImportPathField,
GoPackageSourcesField,
... | 41.564972 | 99 | 0.727742 |
e50e2fe7092f2ab8e83a0e7f0b14cbeda9fadaf0 | 3,955 | py | Python | tf_agents/policies/actor_policy.py | Bhaney44/agents | e5fd5b19ba86fbc5980c9f8e173ce959f8b7bb45 | [
"Apache-2.0"
] | 2 | 2021-02-16T14:20:53.000Z | 2021-02-16T16:38:03.000Z | tf_agents/policies/actor_policy.py | Bhaney44/agents | e5fd5b19ba86fbc5980c9f8e173ce959f8b7bb45 | [
"Apache-2.0"
] | null | null | null | tf_agents/policies/actor_policy.py | Bhaney44/agents | e5fd5b19ba86fbc5980c9f8e173ce959f8b7bb45 | [
"Apache-2.0"
] | 1 | 2020-08-18T13:32:15.000Z | 2020-08-18T13:32:15.000Z | # coding=utf-8
# Copyright 2018 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 36.62037 | 79 | 0.726928 |
3d91ed78ac73a2d54036a9fccc304d7492464a6b | 4,899 | py | Python | src/data/_pull_data.py | joaopfonseca/solve-iwmi | f5bd309513c6752d1472e13089bcfbf54ec7e7a2 | [
"MIT"
] | 2 | 2020-11-14T22:35:15.000Z | 2021-09-04T15:02:08.000Z | src/data/_pull_data.py | kanav-mehra/solve-iwmi | d1db518a71f3343f39bfa14eb9234b033e7335eb | [
"MIT"
] | null | null | null | src/data/_pull_data.py | kanav-mehra/solve-iwmi | d1db518a71f3343f39bfa14eb9234b033e7335eb | [
"MIT"
] | 3 | 2020-11-22T20:56:28.000Z | 2022-01-24T07:48:53.000Z | """
Downloads and stores tweets as .json files in its raw format.
The data is stored "as is". The remaining ETL steps can be found
in separate scripts.
"""
import logging
import json
from searchtweets import (
load_credentials,
gen_rule_payload,
collect_results,
ResultStream
)
import os
log_fmt = '%(... | 27.835227 | 78 | 0.642172 |
9d6ff7242245b63a9ef47f0878305fd35e1b0c4a | 31,519 | py | Python | Compiler/path_oram.py | ggessner/SCALE-MAMBA | d8bc74e910f531d9514ea267c29bb35a769a9de5 | [
"BSD-2-Clause"
] | 15 | 2020-01-10T02:40:04.000Z | 2022-03-30T14:10:18.000Z | Compiler/path_oram.py | ggessner/SCALE-MAMBA | d8bc74e910f531d9514ea267c29bb35a769a9de5 | [
"BSD-2-Clause"
] | 6 | 2019-06-10T13:20:34.000Z | 2019-07-10T17:28:52.000Z | Compiler/path_oram.py | athenarc/SCALE-MAMBA | 18fa886d820bec7e441448357b8f09e2be0e7c9e | [
"BSD-2-Clause"
] | 6 | 2020-02-19T13:21:22.000Z | 2021-12-04T19:58:03.000Z | if '_Array' not in dir():
from oram import *
import permutation
_Array = Array
import oram
#import pdb
class Counter(object):
def __init__(self, val=0, max_val=None, size=None, value_type=sgf2n):
if value_type is sgf2n:
if isinstance(val, int):
val = 1 << val
... | 40.986996 | 152 | 0.557759 |
449fd9f4b2fc750be6d8271a25028575554f8906 | 1,222 | py | Python | sitechecker.py | Dexter-Maine/Eeveaem | ba9b551971d64274a7e5dd5ac87f820a96ab5060 | [
"MIT"
] | null | null | null | sitechecker.py | Dexter-Maine/Eeveaem | ba9b551971d64274a7e5dd5ac87f820a96ab5060 | [
"MIT"
] | null | null | null | sitechecker.py | Dexter-Maine/Eeveaem | ba9b551971d64274a7e5dd5ac87f820a96ab5060 | [
"MIT"
] | null | null | null | #Used to make requests
import urllib.request
import time
target = "https://etherscan.io/address/0x53d284357ec70ce289d6d64134dfac8e511c8a3d"
addition = 1
counter = 1000
total_pages = 3618502788666131106986593281521497120401173883721090761956411348172442546699
found = False
while True:
if found == False:
#no... | 31.333333 | 131 | 0.703764 |
24dd342635418dbcca90fbb52fbc34bd59325fee | 3,783 | py | Python | web/webapp.py | nextthingco/factory-fixtures | 1c2aae661fd5ba5cb498099f9bc572d73487d2f8 | [
"MIT"
] | 12 | 2015-10-07T12:50:56.000Z | 2016-03-01T14:09:37.000Z | web/webapp.py | nextthingco/factory-fixtures | 1c2aae661fd5ba5cb498099f9bc572d73487d2f8 | [
"MIT"
] | 1 | 2016-05-18T16:29:23.000Z | 2016-05-18T16:29:23.000Z | web/webapp.py | nextthingco/factory-fixtures | 1c2aae661fd5ba5cb498099f9bc572d73487d2f8 | [
"MIT"
] | 7 | 2019-06-01T16:18:18.000Z | 2021-10-05T00:39:53.000Z | from flask import Flask, render_template, request, jsonify, send_from_directory
from flask_socketio import SocketIO, emit
from flasher import call_repeatedly
from flasher import RunState
from flasher import Controller
import requests
import json
import logging
import sys
from web import XioView
app = Flask(__name__,s... | 39 | 285 | 0.693365 |
685da21834492a98516fd97a8a8282e8ab2af8d8 | 8,812 | py | Python | integrations/acquisition/covidcast/test_fill_is_latest_issue.py | zhuoran-Cheng16/delphi-epidata | e257f6ac7ef88fab39fbec90c5e9122e24151937 | [
"MIT"
] | null | null | null | integrations/acquisition/covidcast/test_fill_is_latest_issue.py | zhuoran-Cheng16/delphi-epidata | e257f6ac7ef88fab39fbec90c5e9122e24151937 | [
"MIT"
] | null | null | null | integrations/acquisition/covidcast/test_fill_is_latest_issue.py | zhuoran-Cheng16/delphi-epidata | e257f6ac7ef88fab39fbec90c5e9122e24151937 | [
"MIT"
] | null | null | null | """Integration tests for covidcast's direction updating."""
# standard library
import unittest
# third party
import mysql.connector
# first party
from delphi_utils import Nans
from delphi.epidata.client.delphi_epidata import Epidata
from delphi.epidata.acquisition.covidcast.fill_is_latest_issue import main
import de... | 46.136126 | 105 | 0.596232 |
65a1e32663d68853c24906e1b5759cb23acb1286 | 23 | py | Python | src/azure/__init__.py | natrodrigues/face-recognition | 00c78bea55d2738913cf5475056c2faf05fe960e | [
"MIT"
] | null | null | null | src/azure/__init__.py | natrodrigues/face-recognition | 00c78bea55d2738913cf5475056c2faf05fe960e | [
"MIT"
] | null | null | null | src/azure/__init__.py | natrodrigues/face-recognition | 00c78bea55d2738913cf5475056c2faf05fe960e | [
"MIT"
] | null | null | null | from . import api, main | 23 | 23 | 0.73913 |
538dedbe7a7fdb884b7adc5a034a74794b1dba54 | 38,490 | py | Python | Scripts/Restriction/ranacompiler.py | biostu24/biopython | fa9a625f11940ff681bfea12f91c21899a50046d | [
"BSD-3-Clause"
] | null | null | null | Scripts/Restriction/ranacompiler.py | biostu24/biopython | fa9a625f11940ff681bfea12f91c21899a50046d | [
"BSD-3-Clause"
] | null | null | null | Scripts/Restriction/ranacompiler.py | biostu24/biopython | fa9a625f11940ff681bfea12f91c21899a50046d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Restriction Analysis Libraries.
# Copyright (C) 2004. Frederic Sohm.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# This script is used to produce the dictiona... | 37.51462 | 79 | 0.501819 |
5f4da4484b1c59be0737399caad6a709bc4c97cd | 852 | py | Python | mmpose/models/heads/__init__.py | jerrywgz/mmpose | 31d25a9c50c88834a40c8b719e475ad19e23389b | [
"Apache-2.0"
] | 1 | 2021-02-02T03:08:40.000Z | 2021-02-02T03:08:40.000Z | mmpose/models/heads/__init__.py | connor-john/mmpose | f5eabbf33ba514a1ddaf914e835d6abc7accee39 | [
"Apache-2.0"
] | null | null | null | mmpose/models/heads/__init__.py | connor-john/mmpose | f5eabbf33ba514a1ddaf914e835d6abc7accee39 | [
"Apache-2.0"
] | null | null | null | from .ae_higher_resolution_head import AEHigherResolutionHead
from .ae_simple_head import AESimpleHead
from .deeppose_regression_head import DeepposeRegressionHead
from .hmr_head import HMRMeshHead
from .interhand_3d_head import Interhand3DHead
from .temporal_regression_head import TemporalRegressionHead
from .topdown_... | 47.333333 | 76 | 0.81338 |
fcf7d9ed8124d135e7cdbbd41ffdea887f05b4cd | 1,956 | py | Python | scrapy/demo/items.py | PrashanjeetH/Scrapy-EDx | 744ad6950893d1310cc525aaa4ac02b0a90d9a63 | [
"MIT"
] | null | null | null | scrapy/demo/items.py | PrashanjeetH/Scrapy-EDx | 744ad6950893d1310cc525aaa4ac02b0a90d9a63 | [
"MIT"
] | null | null | null | scrapy/demo/items.py | PrashanjeetH/Scrapy-EDx | 744ad6950893d1310cc525aaa4ac02b0a90d9a63 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
import scrapy
from scrapy.loader.processors import MapCompose, TakeFirst
from w3lib.html import remove_tags
class DemoItem(scrapy.Item):
# define the fields for ... | 30.5625 | 58 | 0.644172 |
b81f0ad25bc5c6ccf1775e580f59b86a851fb950 | 344 | py | Python | configs/_base_/models/regnet/regnetx_1.6gf.py | YuxinZou/mmclassification | 2037260ea6c98a3b115e97727e1151a1c2c32f7a | [
"Apache-2.0"
] | 1,190 | 2020-07-10T01:16:01.000Z | 2022-03-31T09:48:38.000Z | configs/_base_/models/regnet/regnetx_1.6gf.py | YuxinZou/mmclassification | 2037260ea6c98a3b115e97727e1151a1c2c32f7a | [
"Apache-2.0"
] | 702 | 2020-07-13T13:31:33.000Z | 2022-03-31T06:48:04.000Z | configs/_base_/models/regnet/regnetx_1.6gf.py | YuxinZou/mmclassification | 2037260ea6c98a3b115e97727e1151a1c2c32f7a | [
"Apache-2.0"
] | 502 | 2020-07-10T02:40:55.000Z | 2022-03-31T02:07:09.000Z | # model settings
model = dict(
type='ImageClassifier',
backbone=dict(type='RegNet', arch='regnetx_1.6gf'),
neck=dict(type='GlobalAveragePooling'),
head=dict(
type='LinearClsHead',
num_classes=1000,
in_channels=912,
loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
... | 26.461538 | 60 | 0.616279 |
1fd9deb4e88efaad1fecb27980b82dd1dc8ec2c8 | 3,821 | py | Python | Clustering/advclassify.py | luoshao23/ML_algorithm | 6e94fdd0718cd892118fd036c7c5851cf3e6d796 | [
"MIT"
] | 4 | 2017-06-19T06:33:38.000Z | 2019-01-31T12:07:12.000Z | Clustering/advclassify.py | luoshao23/ML_algorithm | 6e94fdd0718cd892118fd036c7c5851cf3e6d796 | [
"MIT"
] | null | null | null | Clustering/advclassify.py | luoshao23/ML_algorithm | 6e94fdd0718cd892118fd036c7c5851cf3e6d796 | [
"MIT"
] | 1 | 2017-12-06T08:41:06.000Z | 2017-12-06T08:41:06.000Z | import math
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
class matchrow(object):
"""docstring for matchrow"""
def __init__(self, row, allnum=False):
if allnum:
self.data = [float(row[i]) for i in xrange(len(row) - 1)]
else:
self.data = row[:-... | 23.441718 | 111 | 0.52604 |
62c022ef981881003a68291d39c92276d5a98c87 | 3,826 | py | Python | resources/sksl/update_fuzzer.py | stayf/skia | 454c04e8f3b45ba0c518cbdd49f67bfb95d83c35 | [
"BSD-3-Clause"
] | 6,304 | 2015-01-05T23:45:12.000Z | 2022-03-31T09:48:13.000Z | resources/sksl/update_fuzzer.py | stayf/skia | 454c04e8f3b45ba0c518cbdd49f67bfb95d83c35 | [
"BSD-3-Clause"
] | 67 | 2016-04-18T13:30:02.000Z | 2022-03-31T23:06:55.000Z | resources/sksl/update_fuzzer.py | stayf/skia | 454c04e8f3b45ba0c518cbdd49f67bfb95d83c35 | [
"BSD-3-Clause"
] | 1,231 | 2015-01-05T03:17:39.000Z | 2022-03-31T22:54:58.000Z | #!/usr/bin/env python
#
# Copyright 2021 Google LLC
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This tool updates the OSS-Fuzz corpus using Google Cloud's 'gsutil' tool.
# You will need to be given access to the Google Storage fuzzer repo (at
# gs://skia-f... | 48.43038 | 99 | 0.582593 |
db8c266220597a299fab026848d100bfb8a267ba | 7,205 | py | Python | binpy/verbose.py | colinpearse/binscripts | 2c9a2cfb5182ba226f5ce74665792d71748d13cf | [
"MIT"
] | null | null | null | binpy/verbose.py | colinpearse/binscripts | 2c9a2cfb5182ba226f5ce74665792d71748d13cf | [
"MIT"
] | null | null | null | binpy/verbose.py | colinpearse/binscripts | 2c9a2cfb5182ba226f5ce74665792d71748d13cf | [
"MIT"
] | null | null | null |
"""
Copyright (c) 2005-2019 Colin Pearse.
All scripts are free in the binscripts repository but please refer to the
LICENSE file at the top-level directory for the conditions of distribution.
Name: verbose.py
Description: Implement verbosity. Full description and test at the bottom.
"""
from __... | 34.146919 | 122 | 0.607217 |
5fb6658f37689d0f062d741f4c7f65d27a2ad678 | 37,992 | py | Python | instances/passenger_demand/pas-20210421-2109-int18e/95.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int18e/95.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int18e/95.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 4034
passenger_arriving = (
(6, 9, 9, 1, 0, 0, 10, 9, 4, 2, 5, 0), # 0
(6, 8, 7, 2, 3, 0, 6, 16, 9, 3, 4, 0), # 1
(8, 11, 6, 5, 1, 0, 6, 5, 8, 5, 4, 0), # 2
(6, 8, 12, 2, 0, 0, 9, 10, 8, 5, 3, 0), # 3
(3, 12, 10, 5, 3, 0, 9, 9, 7, 4, 1, 0), # 4
(7, 12, 5, 5, 0, 0, 5, 16,... | 113.408955 | 213 | 0.729838 |
a169a8f84d28f6989172b86c210e55d8ffe9c862 | 3,942 | py | Python | collage/settings.py | estherndichu/django1 | 3d3e8b41ece0df368ee3ee31816cb893cca2e76b | [
"Unlicense"
] | null | null | null | collage/settings.py | estherndichu/django1 | 3d3e8b41ece0df368ee3ee31816cb893cca2e76b | [
"Unlicense"
] | null | null | null | collage/settings.py | estherndichu/django1 | 3d3e8b41ece0df368ee3ee31816cb893cca2e76b | [
"Unlicense"
] | null | null | null | """
Django settings for collage project.
Generated by 'django-admin startproject' using Django 1.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/
"""
import os
i... | 24.949367 | 91 | 0.672248 |
6a4de2bedcf8bcfbd8e479673fa227cf50ce5bc7 | 1,749 | py | Python | app/gaia/place/models.py | mohit4/Gaia | b951c1e23351dc51e74c947f8e125028582d9406 | [
"MIT"
] | null | null | null | app/gaia/place/models.py | mohit4/Gaia | b951c1e23351dc51e74c947f8e125028582d9406 | [
"MIT"
] | null | null | null | app/gaia/place/models.py | mohit4/Gaia | b951c1e23351dc51e74c947f8e125028582d9406 | [
"MIT"
] | null | null | null | from django.db import models
from django.urls import reverse
from base.models import BaseModel
from timeline.models import Timeline
class Place(BaseModel):
"""
A place is a location in space where characters can live and events can happen.
One place can have many other places.
A place is the most imp... | 37.212766 | 117 | 0.712979 |
c6a29383b1d46f9ef1182ec45b7ab62affa4d327 | 6,272 | py | Python | tacker/manager.py | mail2nsrajesh/tacker | dce6690659836c2885f1cf8227c19be234f8fe25 | [
"Apache-2.0"
] | null | null | null | tacker/manager.py | mail2nsrajesh/tacker | dce6690659836c2885f1cf8227c19be234f8fe25 | [
"Apache-2.0"
] | null | null | null | tacker/manager.py | mail2nsrajesh/tacker | dce6690659836c2885f1cf8227c19be234f8fe25 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 VMware, Inc
# 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 a... | 32.666667 | 81 | 0.64493 |
3e70bf0cefff7617ea7f4e5cab3b250d7cf653ba | 5,112 | py | Python | office365/sharepoint/views/view.py | vgrem/Office365-REST-Python-Client | 9975f44b3ce02dd56e321f89fdbafa14a83e532f | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/sharepoint/views/view.py | vgrem/Office365-REST-Python-Client | 9975f44b3ce02dd56e321f89fdbafa14a83e532f | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/sharepoint/views/view.py | vgrem/Office365-REST-Python-Client | 9975f44b3ce02dd56e321f89fdbafa14a83e532f | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | from office365.runtime.client_result import ClientResult
from office365.runtime.queries.service_operation_query import ServiceOperationQuery
from office365.runtime.paths.resource_path import ResourcePath
from office365.runtime.paths.service_operation import ServiceOperationPath
from office365.sharepoint.base_entity imp... | 35.255172 | 117 | 0.653365 |
8279de13ba0a9164fd1e8781486b847dce5369bc | 10,874 | py | Python | numba/tests/test_obj_lifetime.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | numba/tests/test_obj_lifetime.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | numba/tests/test_obj_lifetime.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import collections
import sys
import weakref
import gc
import unittest
from numba.core.controlflow import CFGraph, Loop
from numba.core.compiler import compile_extra, compile_isolated, Flags
from numba.core import types
from numba.tests.support import TestCase
enable_pyobj_flags = Flags()
enable_pyobj_flags.set("enab... | 27.953728 | 81 | 0.539452 |
ad826ecfd8a4cd622a6364c452cfda1e0a6446a0 | 845 | py | Python | scripts/maildump.py | mxdzi/miscellaneous | 788ff3203c7349501616a31181ef8b546fdd3b91 | [
"MIT"
] | null | null | null | scripts/maildump.py | mxdzi/miscellaneous | 788ff3203c7349501616a31181ef8b546fdd3b91 | [
"MIT"
] | null | null | null | scripts/maildump.py | mxdzi/miscellaneous | 788ff3203c7349501616a31181ef8b546fdd3b91 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import imaplib
import os
IMAP = ''
LOGIN = ''
PASSWORD = ''
SAVE_DIR = 'dump'
mbox = imaplib.IMAP4_SSL(IMAP)
status, [msg] = mbox.login(LOGIN, PASSWORD)
print('Login: ', status)
os.makedirs(SAVE_DIR)
folders = [(x.decode('ascii')).split(' "/" ')[1][1:-1] for x in mbox.list()[1]]
for folder ... | 23.472222 | 106 | 0.591716 |
d787feba7f07038476c436a9ce80403b0d0c64c2 | 1,498 | py | Python | fiftyone/core/evaluation.py | FLIR/fiftyone | eeed8bc9dbdada0530036ae5b3afbbe7ab423ce3 | [
"Apache-2.0"
] | 1,130 | 2020-08-12T13:19:04.000Z | 2022-03-31T19:54:31.000Z | fiftyone/core/evaluation.py | FLIR/fiftyone | eeed8bc9dbdada0530036ae5b3afbbe7ab423ce3 | [
"Apache-2.0"
] | 844 | 2020-08-11T20:11:38.000Z | 2022-03-31T14:59:15.000Z | fiftyone/core/evaluation.py | FLIR/fiftyone | eeed8bc9dbdada0530036ae5b3afbbe7ab423ce3 | [
"Apache-2.0"
] | 161 | 2020-08-24T01:46:09.000Z | 2022-03-30T07:02:32.000Z | """
Evaluation runs framework.
| Copyright 2017-2021, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
|
"""
from fiftyone.core.runs import Run, RunInfo, RunConfig, RunResults
class EvaluationInfo(RunInfo):
"""Information about an evaluation that has been run on a dataset.
Args:
key: the evalua... | 22.358209 | 77 | 0.680908 |
beed858e89ebdda78d925a8f4a29ff6a842a1beb | 914 | py | Python | docs/jnpr_healthbot_swagger/test/test_rule_schema_byoi.py | minefuto/healthbot-py-client | bb81452c974456af44299aebf32a73abeda8a943 | [
"Apache-2.0"
] | 10 | 2019-10-23T12:54:37.000Z | 2022-02-07T19:24:30.000Z | docs/jnpr_healthbot_swagger/test/test_rule_schema_byoi.py | minefuto/healthbot-py-client | bb81452c974456af44299aebf32a73abeda8a943 | [
"Apache-2.0"
] | 5 | 2019-09-30T04:29:25.000Z | 2022-02-16T12:21:06.000Z | docs/jnpr_healthbot_swagger/test/test_rule_schema_byoi.py | minefuto/healthbot-py-client | bb81452c974456af44299aebf32a73abeda8a943 | [
"Apache-2.0"
] | 4 | 2019-09-30T01:17:48.000Z | 2020-08-25T07:27:54.000Z | # coding: utf-8
"""
Healthbot APIs
API interface for Healthbot application # noqa: E501
OpenAPI spec version: 1.0.0
Contact: healthbot-hackers@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagge... | 22.292683 | 87 | 0.71116 |
8d81bd7c72485d4552764eeed5637db98b8b3fdf | 10,170 | py | Python | tests/ut/python/dataset/test_datasets_mnist.py | dongkcs/mindspore | cd7df6dbf463ff3128e9181e9d0c779cecb81320 | [
"Apache-2.0"
] | 55 | 2020-12-17T10:26:06.000Z | 2022-03-28T07:18:26.000Z | tests/ut/python/dataset/test_datasets_mnist.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 1 | 2020-12-29T06:46:38.000Z | 2020-12-29T06:46:38.000Z | tests/ut/python/dataset/test_datasets_mnist.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 14 | 2021-01-29T02:39:47.000Z | 2022-03-23T05:00:26.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 36.981818 | 112 | 0.682694 |
8dc6fd6bbfe87981db6358c75ddf16b3cc3f6927 | 685 | py | Python | migrations/versions/69233168a099_.py | kaochiuan/flask-restful-store | 37508a3df9c2e9f8ad3022606a00285268c4a2ca | [
"MIT"
] | null | null | null | migrations/versions/69233168a099_.py | kaochiuan/flask-restful-store | 37508a3df9c2e9f8ad3022606a00285268c4a2ca | [
"MIT"
] | null | null | null | migrations/versions/69233168a099_.py | kaochiuan/flask-restful-store | 37508a3df9c2e9f8ad3022606a00285268c4a2ca | [
"MIT"
] | null | null | null | """empty message
Revision ID: 69233168a099
Revises: 178695a29dca
Create Date: 2018-12-21 23:23:42.120840
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '69233168a099'
down_revision = '178695a29dca'
branch_labels = None
depends_on = None
def upgrade():
# ... | 23.62069 | 105 | 0.69635 |
c28e4600f5241c41e4da7f130b314fbcf32e909f | 1,232 | py | Python | src/distinguish.py | frederikblais/Facial-Recognition | d1933f51ee9ed893df091aabae744d0c67cc3239 | [
"MIT"
] | null | null | null | src/distinguish.py | frederikblais/Facial-Recognition | d1933f51ee9ed893df091aabae744d0c67cc3239 | [
"MIT"
] | null | null | null | src/distinguish.py | frederikblais/Facial-Recognition | d1933f51ee9ed893df091aabae744d0c67cc3239 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import face_recognition
import os
pathToImage = '.venv/ImageAttendance'
listOfImages = os.listdir(pathToImage)
print(listOfImages)
path = '.venv/ImageAttendance'
images = []
classNames = []
studentNames = []
myList = os.listdir(path)
print(myList)
for studentImg in myList:
curImg = ... | 23.692308 | 78 | 0.737013 |
9ae39c9a81107d5a7e281043d1ba7a1445b76941 | 6,009 | py | Python | train.py | watanka/CRAFTS-implementation | bc514638755fe798a0d5eb583d6d477e8eb55bff | [
"Apache-2.0"
] | 1 | 2021-11-16T15:52:58.000Z | 2021-11-16T15:52:58.000Z | train.py | watanka/CRAFTS-implementation | bc514638755fe798a0d5eb583d6d477e8eb55bff | [
"Apache-2.0"
] | null | null | null | train.py | watanka/CRAFTS-implementation | bc514638755fe798a0d5eb583d6d477e8eb55bff | [
"Apache-2.0"
] | null | null | null | import os
import sys
import torch
import torch.utils.data as data
import cv2
import numpy as np
import scipy.io as scio
import argparse
import time
import torch.nn as nn
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torch.optim as optim
import random
import h5py
import re
# from test impor... | 36.418182 | 162 | 0.644533 |
5f0d70fdad92ba4f554d971710b60f2f9e8d9298 | 718 | py | Python | examples/textless_nlp/gslm/unit2speech/tacotron2/symbols.py | Shiguang-Guo/fairseq | c9d3df5679d0829cda8fc3c818b6cab52b78dc37 | [
"MIT"
] | 16,259 | 2018-05-02T02:31:30.000Z | 2022-03-31T21:50:23.000Z | examples/textless_nlp/gslm/unit2speech/tacotron2/symbols.py | Shiguang-Guo/fairseq | c9d3df5679d0829cda8fc3c818b6cab52b78dc37 | [
"MIT"
] | 3,863 | 2018-05-02T13:42:39.000Z | 2022-03-31T19:03:32.000Z | examples/textless_nlp/gslm/unit2speech/tacotron2/symbols.py | Shiguang-Guo/fairseq | c9d3df5679d0829cda8fc3c818b6cab52b78dc37 | [
"MIT"
] | 4,796 | 2018-05-02T07:55:51.000Z | 2022-03-31T14:46:45.000Z | """ from https://github.com/keithito/tacotron """
'''
Defines the set of symbols used in text input to the model.
The default is a set of ASCII characters that works well for English or text that has been run through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details. '''
from . i... | 37.789474 | 195 | 0.725627 |
56f44b143f841ce07b542bd6993bab29b33bf19f | 37,913 | py | Python | instances/passenger_demand/pas-20210421-2109-int14000000000000001e/23.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int14000000000000001e/23.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int14000000000000001e/23.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 3268
passenger_arriving = (
(10, 7, 8, 4, 1, 0, 7, 6, 8, 9, 3, 0), # 0
(2, 11, 7, 3, 3, 0, 5, 8, 7, 4, 2, 0), # 1
(8, 7, 5, 1, 1, 0, 12, 5, 2, 6, 2, 0), # 2
(3, 3, 8, 7, 0, 0, 6, 10, 8, 7, 0, 0), # 3
(4, 7, 6, 4, 0, 0, 6, 7, 3, 4, 1, 0), # 4
(6, 6, 9, 3, 2, 0, 4, 8, 9, 8... | 113.173134 | 212 | 0.729275 |
fee7ff294136cc306e441db7d7b5d8aed65dab80 | 62,863 | py | Python | pygments/lexers/_mapping.py | Morphclue/pygments | 643a356c535efd35753614b843e9562c3a73a135 | [
"BSD-2-Clause"
] | null | null | null | pygments/lexers/_mapping.py | Morphclue/pygments | 643a356c535efd35753614b843e9562c3a73a135 | [
"BSD-2-Clause"
] | null | null | null | pygments/lexers/_mapping.py | Morphclue/pygments | 643a356c535efd35753614b843e9562c3a73a135 | [
"BSD-2-Clause"
] | null | null | null | """
pygments.lexers._mapping
~~~~~~~~~~~~~~~~~~~~~~~~
Lexer mapping definitions. This file is generated by itself. Everytime
you change something on a builtin lexer definition, run this script from
the lexers folder to update it.
Do not alter the LEXERS dictionary by hand.
:copyright: Cop... | 109.90035 | 351 | 0.577892 |
6aa56ec8b0e1c7dd897b97ce4520afa909a2b523 | 65,655 | py | Python | tests/regressiontests/forms/tests/widgets.py | skyl/django | 843e7450ddcb820b2bdc6d47d6c4aab9820a46c4 | [
"BSD-3-Clause"
] | 1 | 2021-11-22T17:41:19.000Z | 2021-11-22T17:41:19.000Z | tests/regressiontests/forms/tests/widgets.py | skyl/django | 843e7450ddcb820b2bdc6d47d6c4aab9820a46c4 | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/forms/tests/widgets.py | skyl/django | 843e7450ddcb820b2bdc6d47d6c4aab9820a46c4 | [
"BSD-3-Clause"
] | 1 | 2021-09-14T06:09:11.000Z | 2021-09-14T06:09:11.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import copy
import datetime
from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.urlresolvers import reverse
from django.forms import *
from django.forms.widg... | 58.36 | 674 | 0.627081 |
da16a95f60a2c0ba6a7fb40c0b1d4ac2458bea6f | 9,126 | py | Python | wasm2ppci.py | almarklein/pywasm | d0638d529e9658d1bb727e80fd135151d5775b59 | [
"BSD-2-Clause"
] | 35 | 2017-08-30T08:10:23.000Z | 2022-01-14T11:59:19.000Z | wasm2ppci.py | almarklein/wasmfun | d0638d529e9658d1bb727e80fd135151d5775b59 | [
"BSD-2-Clause"
] | 1 | 2018-06-18T10:21:41.000Z | 2018-06-18T10:21:41.000Z | wasm2ppci.py | almarklein/pywasm | d0638d529e9658d1bb727e80fd135151d5775b59 | [
"BSD-2-Clause"
] | 4 | 2018-01-25T11:38:56.000Z | 2018-12-26T01:58:26.000Z |
from time import perf_counter
import logging
from ppci import ir
from ppci import irutils
from ppci import common
from ppci.binutils import debuginfo
import wasmfun
class PPCIGen:
def __init__(self):
self.builder = irutils.Builder()
self.blocknr = 0
def g... | 34.437736 | 117 | 0.523888 |
f8804201c8c29eba480d65c36e2b44302f96bbc0 | 1,338 | py | Python | etm_study/etm/shell/all_func.py | tonybutzer/et-surgery | 9614660afb8b6cb6157b141f2c5b90b189bc40a3 | [
"MIT"
] | null | null | null | etm_study/etm/shell/all_func.py | tonybutzer/et-surgery | 9614660afb8b6cb6157b141f2c5b90b189bc40a3 | [
"MIT"
] | null | null | null | etm_study/etm/shell/all_func.py | tonybutzer/et-surgery | 9614660afb8b6cb6157b141f2c5b90b189bc40a3 | [
"MIT"
] | 1 | 2021-01-22T20:26:05.000Z | 2021-01-22T20:26:05.000Z | def lapply_brick(original_list,var_name,originalfolder,tiffolder,data_source,to_clip,bounds, pad_factor):
print('def lapply_brick(original_list,var_name,originalfolder,tiffolder,data_source,to_clip,bounds, pad_factor):')
def grepfxn(pattern,files):
print('def grepfxn(pattern,files):')
def s3_push_delete_l... | 23.892857 | 118 | 0.773543 |
449a3e7474e59e795a2fb47a17751657f008cb79 | 2,511 | py | Python | src/uberjob/progress/_composite_progress_observer.py | twosigma/uberjob | e8afcadf8ca0cca8583b4d24ca13d000ccbf52c6 | [
"Apache-2.0"
] | 11 | 2020-09-27T13:15:29.000Z | 2022-03-08T17:13:07.000Z | src/uberjob/progress/_composite_progress_observer.py | twosigma/uberjob | e8afcadf8ca0cca8583b4d24ca13d000ccbf52c6 | [
"Apache-2.0"
] | 8 | 2020-11-13T21:52:11.000Z | 2022-02-05T20:59:51.000Z | src/uberjob/progress/_composite_progress_observer.py | twosigma/uberjob | e8afcadf8ca0cca8583b4d24ca13d000ccbf52c6 | [
"Apache-2.0"
] | 2 | 2021-05-18T01:22:50.000Z | 2021-06-16T17:43:19.000Z | #
# Copyright 2020 Two Sigma Open Source, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 41.163934 | 98 | 0.704102 |
d5f10979389809d16c3883585afce6189c0e2ce4 | 2,775 | py | Python | varer/migrations/0002_auto_20141219_2258.py | cybernetisk/internsystem | b81faa0deef08153032e56d5740173e5a6cf3ad9 | [
"MIT"
] | null | null | null | varer/migrations/0002_auto_20141219_2258.py | cybernetisk/internsystem | b81faa0deef08153032e56d5740173e5a6cf3ad9 | [
"MIT"
] | 38 | 2017-12-21T10:10:54.000Z | 2022-03-07T20:54:37.000Z | varer/migrations/0002_auto_20141219_2258.py | cybernetisk/internsystem | b81faa0deef08153032e56d5740173e5a6cf3ad9 | [
"MIT"
] | 6 | 2018-06-01T21:04:34.000Z | 2020-01-14T15:26:26.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('varer', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='leverandør',
name='komm... | 31.896552 | 100 | 0.567207 |
dd0f35ccbfab95b95870a42ee33207ca353a51f1 | 5,972 | py | Python | pylibscrypt/test_properties.py | jvarho/pylibscrypt | 46f9c0a2f2c909a5765f748f2c188e336af221ed | [
"0BSD"
] | 19 | 2015-02-03T22:25:09.000Z | 2021-09-01T05:25:44.000Z | pylibscrypt/test_properties.py | jvarho/pylibscrypt | 46f9c0a2f2c909a5765f748f2c188e336af221ed | [
"0BSD"
] | 16 | 2015-06-03T15:52:43.000Z | 2019-03-24T16:47:52.000Z | pylibscrypt/test_properties.py | jvarho/pylibscrypt | 46f9c0a2f2c909a5765f748f2c188e336af221ed | [
"0BSD"
] | 3 | 2015-05-26T01:39:20.000Z | 2017-12-15T23:44:19.000Z | # Copyright (c) 2017-2021, Jan Varho
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL... | 34.72093 | 82 | 0.65288 |
316a10ae9df906e57314e7e27b800194d0342bc9 | 3,872 | py | Python | build/ARM/python/m5/internal/param_VoltageDomain.py | Jakgn/gem5_test | 0ba7cc5213cf513cf205af7fc995cf679ebc1a3f | [
"BSD-3-Clause"
] | null | null | null | build/ARM/python/m5/internal/param_VoltageDomain.py | Jakgn/gem5_test | 0ba7cc5213cf513cf205af7fc995cf679ebc1a3f | [
"BSD-3-Clause"
] | null | null | null | build/ARM/python/m5/internal/param_VoltageDomain.py | Jakgn/gem5_test | 0ba7cc5213cf513cf205af7fc995cf679ebc1a3f | [
"BSD-3-Clause"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.11
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path impo... | 35.522936 | 136 | 0.708161 |
73218d317c04892c27068c35290a1fa941553d7b | 1,094 | py | Python | tests/test_examples.py | sruon/moviepy | 9505f9a409a3f130897e26ac91a40dd5caa2880e | [
"MIT"
] | null | null | null | tests/test_examples.py | sruon/moviepy | 9505f9a409a3f130897e26ac91a40dd5caa2880e | [
"MIT"
] | null | null | null | tests/test_examples.py | sruon/moviepy | 9505f9a409a3f130897e26ac91a40dd5caa2880e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import pytest
import numpy as np
try:
import matplotlib
except ImportError:
matplotlib = None
from moviepy.video.io.bindings import mplfig_to_npimage
from moviepy.video.VideoClip import VideoClip
from .test_helper import PYTHON_VERSION, TMP_DIR, TRAVIS
@pytest.mark.skipif(not matp... | 29.567568 | 77 | 0.693784 |
09f7e683c04799b164cc06bd60cfc4583638419a | 2,633 | py | Python | tests/core/database/test_database_over_ipc_manager.py | Bhargavasomu/trinity | c4e387465b222f8a870966f0eacf7a68fa5aee7a | [
"MIT"
] | null | null | null | tests/core/database/test_database_over_ipc_manager.py | Bhargavasomu/trinity | c4e387465b222f8a870966f0eacf7a68fa5aee7a | [
"MIT"
] | null | null | null | tests/core/database/test_database_over_ipc_manager.py | Bhargavasomu/trinity | c4e387465b222f8a870966f0eacf7a68fa5aee7a | [
"MIT"
] | 2 | 2019-09-05T01:31:56.000Z | 2019-09-17T09:09:16.000Z | import logging
import multiprocessing
from multiprocessing.managers import (
BaseManager,
)
import tempfile
import pytest
from eth.chains.ropsten import ROPSTEN_GENESIS_HEADER
from eth.db.atomic import (
AtomicDB,
)
from eth.db.chain import (
ChainDB,
)
from trinity.db.manager import (
get_chaindb_ma... | 23.300885 | 80 | 0.696544 |
2a46a0e3c3c7f9ae30116d30e828e72413cd70cf | 4,973 | py | Python | glow/coupling.py | mjsong32/GlowRED | 5189b299452e39b99e63ad2d024d2754d66cf3d5 | [
"MIT"
] | 2 | 2019-08-30T12:10:55.000Z | 2021-07-08T20:50:44.000Z | glow/coupling.py | mjsong32/GlowRED | 5189b299452e39b99e63ad2d024d2754d66cf3d5 | [
"MIT"
] | null | null | null | glow/coupling.py | mjsong32/GlowRED | 5189b299452e39b99e63ad2d024d2754d66cf3d5 | [
"MIT"
] | 1 | 2021-05-12T17:15:31.000Z | 2021-05-12T17:15:31.000Z | import torch
import torch.nn as nn
import numpy as np
from .net import NN
# device
if torch.cuda.is_available():
device = "cuda"
else:
device = "cpu"
class CouplingLayer(nn.Module):
def __init__(self, channels, coupling, device, nn_init_last_zeros=False):
super(CouplingLayer, self)._... | 47.361905 | 213 | 0.499899 |
83a7c30f13f42e789547807399425dfaa21721ec | 3,090 | py | Python | tools/TWM_ROUTES_ANALYZER_GRID/new_routes.py | uahservtel/uah-gist-mutraff-bastra | b5a4eab4763e1cf9d914c4af8a77426391e71e31 | [
"Xnet",
"Linux-OpenIB",
"X11"
] | 3 | 2019-11-20T15:22:27.000Z | 2021-06-13T07:52:14.000Z | tools/TWM_ROUTES_ANALYZER_GRID/new_routes.py | uahservtel/uah-gist-mutraff-bastra | b5a4eab4763e1cf9d914c4af8a77426391e71e31 | [
"Xnet",
"Linux-OpenIB",
"X11"
] | null | null | null | tools/TWM_ROUTES_ANALYZER_GRID/new_routes.py | uahservtel/uah-gist-mutraff-bastra | b5a4eab4763e1cf9d914c4af8a77426391e71e31 | [
"Xnet",
"Linux-OpenIB",
"X11"
] | null | null | null | new_routes={}
new_routes[63]="180049722 125233795#0 125233795#1 22725997#4 23957429#0 23957429#1 23957428#2 23957428#3 23957428#4 23957447 23904701#1 23904701#2 23904701#3 23904701#4 77806028#0 77806028#1 77806028#2 77806028#3 77806026#3 77806026#4 77806016#0 77806016#1 77806016#2 77806016#3 77806016#4 19916359#7 19916... | 772.5 | 1,552 | 0.812621 |
b05b81b51a1466ec82cc6d13943a63948a19b640 | 268 | py | Python | apps/sales/classes/__init__.py | DaniFBN/autonomous_chef_back | c16966fe4113106c6738b5ea49519fda4729b88d | [
"MIT"
] | null | null | null | apps/sales/classes/__init__.py | DaniFBN/autonomous_chef_back | c16966fe4113106c6738b5ea49519fda4729b88d | [
"MIT"
] | null | null | null | apps/sales/classes/__init__.py | DaniFBN/autonomous_chef_back | c16966fe4113106c6738b5ea49519fda4729b88d | [
"MIT"
] | null | null | null | import apps.sales.classes.auxiliary_recipe_model
import apps.sales.classes.recipe_ingredient_model
import apps.sales.classes.recipe_model
import apps.sales.classes.recipe_packaging_model
import apps.sales.classes.sale_model
import apps.sales.classes.sale_recipe_model
| 38.285714 | 49 | 0.88806 |
03486936dea57e1f63189069d92306c364cb58cf | 1,430 | py | Python | examine_rsa.py | 519seven/cs627 | eebfeec27b8d544aaacc6293b82e923ba1324be7 | [
"BSD-2-Clause"
] | null | null | null | examine_rsa.py | 519seven/cs627 | eebfeec27b8d544aaacc6293b82e923ba1324be7 | [
"BSD-2-Clause"
] | null | null | null | examine_rsa.py | 519seven/cs627 | eebfeec27b8d544aaacc6293b82e923ba1324be7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
''' Copyright 519seven 2020
Input: private key in pkcs1 or 8 format
Output: decimal representations of key data
HEX if --hex is passed in '''
import argparse
import sys
from Crypto.PublicKey import RSA
def get_args():
''' Build argument object '''
parser ... | 25.535714 | 70 | 0.567133 |
2e575745a2fbaecaf297d99586cdd01045aec4a9 | 1,847 | py | Python | madlibs_generator.py | codeslash21/madlib_game | 0b21434f3b7d4cce426aa33ca319036f96f211fb | [
"MIT"
] | null | null | null | madlibs_generator.py | codeslash21/madlib_game | 0b21434f3b7d4cce426aa33ca319036f96f211fb | [
"MIT"
] | null | null | null | madlibs_generator.py | codeslash21/madlib_game | 0b21434f3b7d4cce426aa33ca319036f96f211fb | [
"MIT"
] | null | null | null | import sys
print('##Mad Libs is a phrasal template word game where one player prompts others for a list of words to substitute')
print('for blanks in a story,before reading the – often comical or nonsensical – story aloud')
# String for the Test:
t1 = "Hi, my name is NAME and I really like to VERB PLURALNOUN. I am al... | 39.297872 | 129 | 0.688684 |
3e68d35164b23345c18280390177c7e720f66aaf | 4,992 | py | Python | my_timesaver_utils/profiling.py | butchtm/my_timesaver_utils | eb1b84c89ce61c2f079e306e196f1945aa3b084d | [
"Apache-2.0"
] | 5 | 2020-10-19T23:35:26.000Z | 2021-03-25T15:19:40.000Z | my_timesaver_utils/profiling.py | butchtm/my_timesaver_utils | eb1b84c89ce61c2f079e306e196f1945aa3b084d | [
"Apache-2.0"
] | 2 | 2021-09-28T05:02:23.000Z | 2022-02-26T09:33:55.000Z | my_timesaver_utils/profiling.py | butchtm/my_timesaver_utils | eb1b84c89ce61c2f079e306e196f1945aa3b084d | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_profiling.ipynb (unless otherwise specified).
__all__ = ['profile_call', 'print_prof_data', 'clear_prof_data', 'get_prof_data', 'start_record', 'end_record',
'is_recording', 'save_prof_data', 'load_prof_data']
# Internal Cell
import time
import warnings
fr... | 32.415584 | 111 | 0.663662 |
6839467bc9b9b9abd473a70fe5b4c8d10aeed14e | 374 | py | Python | rendereasy/cnawhatsapp/skins/rendereasy_cnawhatsapp_templates/getPastasRaiz.py | lflrocha/rendereasy.cnawhatsapp | 717ebedd922cfcc6ac57bb81fb525bb003805efd | [
"Unlicense"
] | null | null | null | rendereasy/cnawhatsapp/skins/rendereasy_cnawhatsapp_templates/getPastasRaiz.py | lflrocha/rendereasy.cnawhatsapp | 717ebedd922cfcc6ac57bb81fb525bb003805efd | [
"Unlicense"
] | null | null | null | rendereasy/cnawhatsapp/skins/rendereasy_cnawhatsapp_templates/getPastasRaiz.py | lflrocha/rendereasy.cnawhatsapp | 717ebedd922cfcc6ac57bb81fb525bb003805efd | [
"Unlicense"
] | null | null | null | ## Script (Python) "getPastasRaiz"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
path={ "query": "/automator", 'depth': 1 }
pastas = context.portal_catalog.searchResults(Type=['Folder'], sort_on="getObjPositionInParent"... | 26.714286 | 133 | 0.748663 |
616697f24ed642e8e0f076e9b13555e2bd19dd9f | 7,811 | py | Python | plex/plugins/IPTV.bundle/Contents/Code/xmltv_parser.py | blac3kman/mediaServer | e52b9d695179390672b6a82c223078aa4c060f1f | [
"MIT"
] | null | null | null | plex/plugins/IPTV.bundle/Contents/Code/xmltv_parser.py | blac3kman/mediaServer | e52b9d695179390672b6a82c223078aa4c060f1f | [
"MIT"
] | null | null | null | plex/plugins/IPTV.bundle/Contents/Code/xmltv_parser.py | blac3kman/mediaServer | e52b9d695179390672b6a82c223078aa4c060f1f | [
"MIT"
] | null | null | null | # XMLTV files parser for Plex IPTV plug-in that plays live streams (like IPTV) from a M3U playlist
# Copyright © 2013-2018 Valdas Vaitiekaitis
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, e... | 48.515528 | 128 | 0.468186 |
70203f2468e67c7d2e1bb8645150eb9b623487fa | 1,097 | py | Python | pincer/objects/events/channel.py | shivamdurgbuns/Pincer | aa27d6d65023ea62a2d0c09c1e9bc0fe4763e0c3 | [
"MIT"
] | null | null | null | pincer/objects/events/channel.py | shivamdurgbuns/Pincer | aa27d6d65023ea62a2d0c09c1e9bc0fe4763e0c3 | [
"MIT"
] | null | null | null | pincer/objects/events/channel.py | shivamdurgbuns/Pincer | aa27d6d65023ea62a2d0c09c1e9bc0fe4763e0c3 | [
"MIT"
] | null | null | null | # Copyright Pincer 2021-Present
# Full MIT License can be found in `LICENSE` at the project root.
from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING
from ...utils.api_object import APIObject
from ...utils.types import MISSING, APINullable
if TYPE_CHECKING:
from... | 30.472222 | 79 | 0.738377 |
1449829cf0d4b0529af288516a92a634b9ceb230 | 1,078 | py | Python | src/baserow/types.py | NiklasRosenstein/python-baserow-client | 5338a7b42156fca862c8b48a018b23824384ff4a | [
"MIT"
] | 4 | 2021-09-13T19:58:54.000Z | 2022-03-16T21:37:53.000Z | src/baserow/types.py | NiklasRosenstein/python-baserow-client | 5338a7b42156fca862c8b48a018b23824384ff4a | [
"MIT"
] | 6 | 2021-09-14T23:28:56.000Z | 2021-10-22T00:12:43.000Z | src/baserow/types.py | NiklasRosenstein/python-baserow-client | 5338a7b42156fca862c8b48a018b23824384ff4a | [
"MIT"
] | 2 | 2021-09-13T20:59:08.000Z | 2021-11-28T10:03:35.000Z |
import dataclasses
import enum
import typing as t
from databind.core.annotations import union
T = t.TypeVar('T')
class Permissions(enum.Enum):
MEMBER = enum.auto()
ADMIN = enum.auto()
@dataclasses.dataclass
class User:
id: int
first_name: str
username: str
is_staff: bool
language: str
@dataclasse... | 13.820513 | 50 | 0.727273 |
a9e235c05bf7d5bd586953cf0903530aeb6a782c | 26,903 | py | Python | isi_sdk_9_0_0/isi_sdk_9_0_0/models/cluster_node_drive.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_9_0_0/isi_sdk_9_0_0/models/cluster_node_drive.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_9_0_0/isi_sdk_9_0_0/models/cluster_node_drive.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 10
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_9_0_0.models.cluste... | 35.727756 | 365 | 0.615879 |
052e27892b38015144f6d4c66974318539462852 | 6,129 | py | Python | src/tests/ftest/osa/osa_dmg_negative_test.py | dpquigl/daos | 3da4f93916e05c8e184e8ae1b175b2e2b6703e18 | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/osa/osa_dmg_negative_test.py | dpquigl/daos | 3da4f93916e05c8e184e8ae1b175b2e2b6703e18 | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/osa/osa_dmg_negative_test.py | dpquigl/daos | 3da4f93916e05c8e184e8ae1b175b2e2b6703e18 | [
"BSD-2-Clause-Patent"
] | null | null | null | #!/usr/bin/python
"""
(C) Copyright 2020-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
from osa_utils import OSAUtils
from test_utils_pool import TestPool
from apricot import skipForTicket
class OSADmgNegativeTest(OSAUtils):
# pylint: disable=too-many-ancestors
"""
Test Cla... | 40.058824 | 78 | 0.519661 |
0989e57917da594a9b5561e62cddb662f3a15c84 | 1,185 | py | Python | python/fedml/constants.py | eliaskousk/FedML | e30d5dd3cc84c8a369c828a6f6ef097b3cf67b1a | [
"Apache-2.0"
] | null | null | null | python/fedml/constants.py | eliaskousk/FedML | e30d5dd3cc84c8a369c828a6f6ef097b3cf67b1a | [
"Apache-2.0"
] | null | null | null | python/fedml/constants.py | eliaskousk/FedML | e30d5dd3cc84c8a369c828a6f6ef097b3cf67b1a | [
"Apache-2.0"
] | null | null | null | # FedML TRAINING PLATFORM
FEDML_TRAINING_PLATFORM_SIMULATION = "simulation"
FEDML_TRAINING_PLATFORM_CROSS_SILO = "cross_silo"
FEDML_TRAINING_PLATFORM_CROSS_DEVICE = "cross_device"
FEDML_TRAINING_PLATFORM_DISTRIBUTED = "distributed"
# FedML SIMULATION TYPE
FEDML_SIMULATION_TYPE_SP = "single_process"
FEDML_SIMULATION_TY... | 38.225806 | 75 | 0.860759 |
b0f433f4836619873d0903e09101fbab0fa598ac | 1,632 | py | Python | src/pquery.py | shw079/HMDB-Protein-Scraper | 2f264f2b6715d478eec8a5868b974786f524238d | [
"MIT"
] | null | null | null | src/pquery.py | shw079/HMDB-Protein-Scraper | 2f264f2b6715d478eec8a5868b974786f524238d | [
"MIT"
] | null | null | null | src/pquery.py | shw079/HMDB-Protein-Scraper | 2f264f2b6715d478eec8a5868b974786f524238d | [
"MIT"
] | null | null | null | from urllib.parse import quote
from urllib.request import urlopen
import re
class ProteinQuery:
def __init__(self, query):
self.query = quote(query)
self._page = 1
self._request = 'https://hmdb.ca/unearth/q?button=&query={}&searcher=proteins'.format(self.query)
self.res = []
d... | 36.266667 | 125 | 0.47549 |
3c13f96e53507549fc01da89bb3edd4d451278e7 | 14,096 | py | Python | test/lens/util/test_lens_util.py | AshKelly/PyAutoLens | 043795966338a655339e61782253ad67cc3c14e6 | [
"MIT"
] | null | null | null | test/lens/util/test_lens_util.py | AshKelly/PyAutoLens | 043795966338a655339e61782253ad67cc3c14e6 | [
"MIT"
] | null | null | null | test/lens/util/test_lens_util.py | AshKelly/PyAutoLens | 043795966338a655339e61782253ad67cc3c14e6 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from autolens.data.array import grids
from autolens.data.array import mask
from autolens.data.array.util import mapping_util
from autolens.model.profiles import light_profiles as lp
from autolens.model.profiles import mass_profiles as mp
from autolens.model.galaxy import galaxy as g
fr... | 48.439863 | 134 | 0.626632 |
6994bfc404e4186f12946b13f5b82312ce2b8a37 | 1,005 | py | Python | journey_speech/request_interface.py | tatanpoker09/Journey | 74b84c953de2d32bf360e30b5431b73aa5de6599 | [
"MIT"
] | 15 | 2021-11-14T02:59:15.000Z | 2022-02-03T03:05:22.000Z | journey_speech/request_interface.py | tatanpoker09/Journey | 74b84c953de2d32bf360e30b5431b73aa5de6599 | [
"MIT"
] | 1 | 2022-01-18T18:27:14.000Z | 2022-01-18T18:27:14.000Z | journey_speech/request_interface.py | tatanpoker09/Journey | 74b84c953de2d32bf360e30b5431b73aa5de6599 | [
"MIT"
] | null | null | null | import requests
import json
nlp_url = "http://journey_nlp:7150/parse"
backend_url = "http://backend:8080/dialogue/"
def nlp_process(message_text):
body = {"text": message_text}
response = requests.post(nlp_url, json=body)
return response.json()
def send_response_to_backend(response):
prompt = respo... | 31.40625 | 87 | 0.658706 |
883240cbf4dfe123e65ab2847c27466118506794 | 2,451 | py | Python | gradient_free_optimizers/optimizers/base_optimizer.py | 0liu/Gradient-Free-Optimizers | d057bb5e2521cae3dd19737a57fe9412a166e380 | [
"MIT"
] | 860 | 2020-06-10T08:53:41.000Z | 2022-03-30T14:22:20.000Z | gradient_free_optimizers/optimizers/base_optimizer.py | 0liu/Gradient-Free-Optimizers | d057bb5e2521cae3dd19737a57fe9412a166e380 | [
"MIT"
] | 24 | 2021-01-25T08:06:54.000Z | 2022-01-24T13:46:48.000Z | gradient_free_optimizers/optimizers/base_optimizer.py | 0liu/Gradient-Free-Optimizers | d057bb5e2521cae3dd19737a57fe9412a166e380 | [
"MIT"
] | 52 | 2020-06-25T09:36:15.000Z | 2022-03-18T18:11:52.000Z | # Author: Simon Blanke
# Email: simon.blanke@yahoo.com
# License: MIT License
import random
import numpy as np
from .search_tracker import SearchTracker
from ..converter import Converter
from ..results_manager import ResultsManager
def get_n_inits(initialize):
n_inits = 0
for key_ in initialize.keys():
... | 26.354839 | 74 | 0.609955 |
1d4f3b15216d83663497b58d76db3cc06cfa991e | 3,387 | py | Python | app/core/routers/publication.py | muhis/publications-server | 8a958676d4a733b1ddd64112bc2baa9492a065fb | [
"MIT"
] | 1 | 2021-08-23T21:13:09.000Z | 2021-08-23T21:13:09.000Z | app/core/routers/publication.py | muhis/publications-server | 8a958676d4a733b1ddd64112bc2baa9492a065fb | [
"MIT"
] | null | null | null | app/core/routers/publication.py | muhis/publications-server | 8a958676d4a733b1ddd64112bc2baa9492a065fb | [
"MIT"
] | null | null | null |
from app.core import exceptions
from app.core.models.pydantic.author import AuthorOut
from app.core.models.tortoise import author
from app.core.models.tortoise.author import Author
from app.core.models.pydantic.publication import PublicationIn
from fastapi import APIRouter
from starlette.exceptions import HTTPExceptio... | 45.16 | 116 | 0.805137 |
5bedfd34d60e5c46e1492d2428cb8e541424dfa6 | 733 | py | Python | modules/src/bye.py | anamayagarodia/JARVIS-on-Messenger | d7198db0afe99cf3c0f7aacd5d5a16641deba809 | [
"MIT"
] | 6 | 2017-05-17T23:46:16.000Z | 2017-05-18T19:50:15.000Z | modules/src/bye.py | anamayagarodia/JARVIS-on-Messenger | d7198db0afe99cf3c0f7aacd5d5a16641deba809 | [
"MIT"
] | null | null | null | modules/src/bye.py | anamayagarodia/JARVIS-on-Messenger | d7198db0afe99cf3c0f7aacd5d5a16641deba809 | [
"MIT"
] | 2 | 2018-08-06T06:03:58.000Z | 2020-01-08T07:57:37.000Z | import random
from templates.text import TextTemplate
def process(input, entities=None):
greetings = [
'Have a good day, sir.',
'Wonderful, I think it\'s time for my evening nap...',
'Bye to you as well, sir.',
'It was my pleasure talking to you.',
'Oh, please do not go!',
... | 33.318182 | 88 | 0.60573 |
24ec7f6ec74445c449077f94c85eb27f5a3a458c | 1,798 | py | Python | fpga-rfnoc/testbenches/noc_block_channelizer_tb/shared_tools/python/mls.py | pjvalla/theseus-cores | d7014c95a3e617f1802a04346ebdf40d484bf4a2 | [
"MIT"
] | 9 | 2019-05-24T12:19:29.000Z | 2021-12-14T05:37:50.000Z | fpga-rfnoc/testbenches/noc_block_channelizer_tb/shared_tools/python/mls.py | pjvalla/theseus-cores | d7014c95a3e617f1802a04346ebdf40d484bf4a2 | [
"MIT"
] | 1 | 2019-08-09T10:44:15.000Z | 2019-08-09T10:44:15.000Z | fpga-rfnoc/testbenches/noc_block_channelizer_tb/shared_tools/python/mls.py | pjvalla/theseus-cores | d7014c95a3e617f1802a04346ebdf40d484bf4a2 | [
"MIT"
] | 3 | 2021-01-07T13:20:31.000Z | 2021-01-10T13:58:36.000Z | #!/usr/bin/env python
"""Module providing the functionality to generate Maximal Length Sequences.
Based on wiki's description and polynomial representation.
http://en.wikipedia.org/wiki/Maximum_length_sequence
"""
import numpy
import pdb
bittaps = {2: [1], 3: [2], 4: [3], 5: [2], 6: [5], 7: [6], 8: [4, 5, 6],
... | 25.685714 | 78 | 0.602892 |
dfac1d2f22994f44562c9a617189df1bf87e7b57 | 3,884 | py | Python | djangocms_navigation/cms_config.py | jonathan-s/djangocms-navigation | a6ad941ba2c17354a7e897b1660dfb9f005f0f2e | [
"BSD-3-Clause"
] | null | null | null | djangocms_navigation/cms_config.py | jonathan-s/djangocms-navigation | a6ad941ba2c17354a7e897b1660dfb9f005f0f2e | [
"BSD-3-Clause"
] | null | null | null | djangocms_navigation/cms_config.py | jonathan-s/djangocms-navigation | a6ad941ba2c17354a7e897b1660dfb9f005f0f2e | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from cms.app_base import CMSAppConfig, CMSAppExtension
from cms.models import Page
from .models import MenuContent, MenuItem
from .utils import purge_menu_cache
class NavigationCMSExtension(CMSAppExtension):
def __init__(se... | 34.371681 | 100 | 0.708805 |
d109585ec8679f698bbd8281a0734e25b521b8a4 | 768 | py | Python | cw_multiples_of_3_or_5.py | bowen0701/python-algorithms-data-structures | e625f59a9fc59e4728825078d4434a7968a724e5 | [
"BSD-2-Clause"
] | 8 | 2019-03-18T06:37:24.000Z | 2022-01-30T07:50:58.000Z | cw_multiples_of_3_or_5.py | bowen0701/python-algorithms-data-structures | e625f59a9fc59e4728825078d4434a7968a724e5 | [
"BSD-2-Clause"
] | null | null | null | cw_multiples_of_3_or_5.py | bowen0701/python-algorithms-data-structures | e625f59a9fc59e4728825078d4434a7968a724e5 | [
"BSD-2-Clause"
] | null | null | null | """Codewars: Multiples of 3 or 5
6 kyu
URL: https://www.codewars.com/kata/514b92a657cdc65150000006/
If we list all the natural numbers below 10 that are multiples of 3 or 5,
we get 3, 5, 6 and 9. The sum of these multiples is 23.
Finish the solution so that it returns the sum of all the multiples of 3 or 5
below the... | 21.942857 | 77 | 0.638021 |
020c7a8a6111f87a21e9f186835b1408bb3e82cd | 3,634 | py | Python | tests/test_iwp.py | pnkraemer/tornadox | 86a1d22ab53220627c7c504c937b0185f825db6f | [
"MIT"
] | 9 | 2022-02-18T14:39:25.000Z | 2022-03-10T11:56:42.000Z | tests/test_iwp.py | pnkraemer/tornadox | 86a1d22ab53220627c7c504c937b0185f825db6f | [
"MIT"
] | 2 | 2022-03-01T06:55:45.000Z | 2022-03-10T06:25:12.000Z | tests/test_iwp.py | pnkraemer/tornadox | 86a1d22ab53220627c7c504c937b0185f825db6f | [
"MIT"
] | null | null | null | import jax.numpy as jnp
import pytest
import tornadox
@pytest.fixture
def iwp():
return tornadox.iwp.IntegratedWienerTransition(
wiener_process_dimension=1, num_derivatives=2
)
@pytest.fixture
def dt():
return 0.1
@pytest.fixture
def ah_22_ibm(dt):
return jnp.array(
[
... | 27.119403 | 88 | 0.682168 |
2199ef7d9bb7b1cc0edc74d28c336036c727503c | 1,168 | py | Python | notion_clipper/models.py | ironslob/notion-clipper-bot | 8fcce50d99e88fbf01fba3741dde207743d53c62 | [
"MIT"
] | 3 | 2021-06-02T09:55:41.000Z | 2021-11-18T02:19:00.000Z | notion_clipper/models.py | ironslob/notion-clipper-bot | 8fcce50d99e88fbf01fba3741dde207743d53c62 | [
"MIT"
] | null | null | null | notion_clipper/models.py | ironslob/notion-clipper-bot | 8fcce50d99e88fbf01fba3741dde207743d53c62 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask_dance.consumer.storage.sqla import OAuthConsumerMixin
from sqlalchemy import Column, JSON, ForeignKey, Text, DateTime, BigInteger, TIMESTAMP
from sqlalchemy.orm import relationship
from .database import Base
import logging
logger = logging.getLogger(__name__)
class TelegramUser(B... | 33.371429 | 87 | 0.755993 |
713c5a592661d15e9fea4cf9a36fe802d8cda1f5 | 4,950 | py | Python | model/torchsummary/torchsummary.py | z1021190674/GMAUResNeXt_RS | a8a7444bf30e509cefc01b3be4b0587d367cda2e | [
"MIT"
] | 1 | 2022-03-23T11:54:33.000Z | 2022-03-23T11:54:33.000Z | model/torchsummary/torchsummary.py | z1021190674/GMAUResNeXt_RS | a8a7444bf30e509cefc01b3be4b0587d367cda2e | [
"MIT"
] | null | null | null | model/torchsummary/torchsummary.py | z1021190674/GMAUResNeXt_RS | a8a7444bf30e509cefc01b3be4b0587d367cda2e | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.autograd import Variable
from collections import OrderedDict
import numpy as np
def summary(model, input_size, batch_size=-1, device=torch.device('cuda:0'), dtypes=None):
result, params_info = summary_string(
model, input_size, batch_size, device, dtypes)
... | 38.976378 | 97 | 0.542222 |
7ae7ee284e368a9f36b30c6b4c2e8f59711f61c5 | 8,777 | py | Python | ice/pypi/setup.py | zeroc-ice/ice-packaging | 795d50ff1e1148d5209e2ca5a7692bfddb5c05ca | [
"BSD-3-Clause"
] | 9 | 2015-07-28T14:00:00.000Z | 2021-07-29T00:03:52.000Z | ice/pypi/setup.py | zeroc-ice/ice-packaging | 795d50ff1e1148d5209e2ca5a7692bfddb5c05ca | [
"BSD-3-Clause"
] | 19 | 2018-04-30T18:53:17.000Z | 2022-01-14T16:25:54.000Z | ice/pypi/setup.py | zeroc-ice/ice-packaging | 795d50ff1e1148d5209e2ca5a7692bfddb5c05ca | [
"BSD-3-Clause"
] | 13 | 2015-11-19T01:36:31.000Z | 2021-04-29T14:27:45.000Z | #
# Copyright (c) ZeroC, Inc. All rights reserved.
#
# Always prefer setuptools over distutils
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
from distutils.command.build_ext import build_ext
import sys, os, shutil, fnmatch
pl... | 34.285156 | 118 | 0.636664 |
037903f053beacb65a1fcdd42c1278e0c7f25143 | 85 | py | Python | cfd_trading/core/__init__.py | vitrvm/cfd_trading | d0880a12c805d150df6058764c153712da177b3a | [
"MIT"
] | 2 | 2021-04-20T16:37:55.000Z | 2021-08-09T10:27:43.000Z | cfd_trading/core/__init__.py | vitrvm/cfd_trading | d0880a12c805d150df6058764c153712da177b3a | [
"MIT"
] | null | null | null | cfd_trading/core/__init__.py | vitrvm/cfd_trading | d0880a12c805d150df6058764c153712da177b3a | [
"MIT"
] | 1 | 2021-07-11T22:51:37.000Z | 2021-07-11T22:51:37.000Z | __version__ = '0.0.1'
from cfd_trading.core import broker
__all__ = broker.__all__ | 14.166667 | 35 | 0.764706 |
e06728d615ee14276eebd545c774e2f0ca18e0d9 | 3,834 | py | Python | tests/unit/bokeh/util/test_hex.py | samwill/bokeh | 228132eba4b696b91b2a77f7e9d07771ba868093 | [
"BSD-3-Clause"
] | 1 | 2021-10-30T00:32:00.000Z | 2021-10-30T00:32:00.000Z | tests/unit/bokeh/util/test_hex.py | samwill/bokeh | 228132eba4b696b91b2a77f7e9d07771ba868093 | [
"BSD-3-Clause"
] | 3 | 2021-09-08T03:16:42.000Z | 2022-03-12T00:57:18.000Z | tests/unit/bokeh/util/test_hex.py | samwill/bokeh | 228132eba4b696b91b2a77f7e9d07771ba868093 | [
"BSD-3-Clause"
] | 2 | 2021-01-12T18:22:24.000Z | 2021-10-30T00:32:02.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 34.854545 | 78 | 0.353678 |
c7caadb1925c473f12422c5af547cc1ea88d5300 | 6,091 | py | Python | blackJack.py | shadow5og/blackjack_game_in_python | bce70003a97547e30e19d862b4dd6d3142d1fdbf | [
"MIT"
] | null | null | null | blackJack.py | shadow5og/blackjack_game_in_python | bce70003a97547e30e19d862b4dd6d3142d1fdbf | [
"MIT"
] | null | null | null | blackJack.py | shadow5og/blackjack_game_in_python | bce70003a97547e30e19d862b4dd6d3142d1fdbf | [
"MIT"
] | null | null | null | ############### Blackjack Project ####################
from art import logo
from random import choice
from replit import clear
#Difficulty Normal 😎: Use all Hints below to complete the project.
#Difficulty Hard 🤔: Use only Hints 1, 2, 3 to complete the project.
#Difficulty Extra Hard 😭: Only use Hints 1 & 2 to compl... | 41.435374 | 448 | 0.667542 |
1d5d6e64678130e0265b09af0bb31eba3582323a | 399 | py | Python | PokerServer/wsgi.py | farodey/PokerServer | 81659950c8287f3f4b8f7b7e7a0b6632be23b6e3 | [
"MIT"
] | null | null | null | PokerServer/wsgi.py | farodey/PokerServer | 81659950c8287f3f4b8f7b7e7a0b6632be23b6e3 | [
"MIT"
] | null | null | null | PokerServer/wsgi.py | farodey/PokerServer | 81659950c8287f3f4b8f7b7e7a0b6632be23b6e3 | [
"MIT"
] | null | null | null | """
WSGI config for PokerServer project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_S... | 23.470588 | 78 | 0.789474 |
3db549de9581ad1e8b09723a54d8d4e936eafb41 | 3,817 | py | Python | ocw_import/tasks.py | mitodl/ocw-studio | 949f96ec0647064f8d495ebdd22d66eea7d024a5 | [
"BSD-3-Clause"
] | 2 | 2020-08-07T15:55:41.000Z | 2021-08-16T18:28:09.000Z | ocw_import/tasks.py | mitodl/ocw-studio | 949f96ec0647064f8d495ebdd22d66eea7d024a5 | [
"BSD-3-Clause"
] | 924 | 2020-08-10T17:54:19.000Z | 2022-03-31T21:15:17.000Z | ocw_import/tasks.py | mitodl/ocw-studio | 949f96ec0647064f8d495ebdd22d66eea7d024a5 | [
"BSD-3-Clause"
] | null | null | null | """ Tasks for OCW course site import """
import logging
import celery
from django.conf import settings
from mitol.common.utils.collections import chunks
from main.celery import app
from main.tasks import chord_finisher
from ocw_import.api import fetch_ocw2hugo_course_paths, import_ocw2hugo_course
from websites.consta... | 33.191304 | 97 | 0.691905 |
01fb53c7a228173aebeceb00fff6791b7eac2c76 | 1,680 | py | Python | codes/11_logout.py | panniangyan/conduit | df2ee5a158511211e7490d6a23bc6b61490da66d | [
"MIT"
] | null | null | null | codes/11_logout.py | panniangyan/conduit | df2ee5a158511211e7490d6a23bc6b61490da66d | [
"MIT"
] | null | null | null | codes/11_logout.py | panniangyan/conduit | df2ee5a158511211e7490d6a23bc6b61490da66d | [
"MIT"
] | 1 | 2021-08-02T12:44:03.000Z | 2021-08-02T12:44:03.000Z | from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import urllib
browser = webdriver.Chrome("/usr/bin/chromedriver")
browser.get("http://localhost:1667")
brow... | 33.6 | 99 | 0.731548 |
fd09901308202bf35374c880605b75fd98d88d98 | 1,681 | py | Python | display/PDA TM4301B 480x272/module.py | automaate/gfx3.8 | 55bf94302f00c8d513c84d910185cef2ca6b5be2 | [
"0BSD"
] | null | null | null | display/PDA TM4301B 480x272/module.py | automaate/gfx3.8 | 55bf94302f00c8d513c84d910185cef2ca6b5be2 | [
"0BSD"
] | null | null | null | display/PDA TM4301B 480x272/module.py | automaate/gfx3.8 | 55bf94302f00c8d513c84d910185cef2ca6b5be2 | [
"0BSD"
] | null | null | null | # coding: utf-8
##############################################################################
# Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
#
# Subject to your compliance with these terms, you may use Microchip software
# and any derivatives exclusively with Microchip products. It is your
... | 57.965517 | 119 | 0.699584 |
4fe94acbec31d4215a9216a4c9b0ee737ef69c19 | 1,747 | py | Python | rally_openstack/services/key_manager/barbican.py | msimonin/rally-openstack | fc899c7262125e4739139f708a830ef975f386a6 | [
"Apache-2.0"
] | null | null | null | rally_openstack/services/key_manager/barbican.py | msimonin/rally-openstack | fc899c7262125e4739139f708a830ef975f386a6 | [
"Apache-2.0"
] | null | null | null | rally_openstack/services/key_manager/barbican.py | msimonin/rally-openstack | fc899c7262125e4739139f708a830ef975f386a6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Red Hat, Inc. <http://www.redhat.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 34.94 | 78 | 0.66743 |
a5f9fa2d72817e06b635a73ccd6d80f2358d047d | 2,571 | py | Python | emv/test/test_cap.py | przemobe/python-emv | 286e8aa5fa65b83771e0f9eacba68c6b133ed424 | [
"MIT"
] | 72 | 2017-01-04T21:21:19.000Z | 2022-03-27T06:57:43.000Z | emv/test/test_cap.py | soic1/python-emv | 286e8aa5fa65b83771e0f9eacba68c6b133ed424 | [
"MIT"
] | 20 | 2016-12-20T18:36:17.000Z | 2021-12-27T14:12:21.000Z | emv/test/test_cap.py | soic1/python-emv | 286e8aa5fa65b83771e0f9eacba68c6b133ed424 | [
"MIT"
] | 22 | 2017-01-04T18:36:11.000Z | 2022-03-31T01:25:43.000Z | from emv.protocol.response import RAPDU
from emv.protocol.structures import TLV
from emv.util import unformat_bytes
from emv.cap import get_cap_value, get_arqc_req
from emv.test.fixtures import APP_DATA
# Issuer Proprietary Bitmap used in Barclays cards
BARCLAYS_IPB = unformat_bytes("80 00 FF 00 00 00 00 00 01 FF FF... | 37.26087 | 88 | 0.645663 |
3381632b03993b935a92f2a3b20ad38776243d45 | 966 | py | Python | tests/test_downloadermiddleware_httpauth.py | HyunTruth/scrapy | 9bc5fab870aaee23905057002276fc0e1a48485f | [
"BSD-3-Clause"
] | 8 | 2021-02-01T07:55:19.000Z | 2021-03-22T18:17:47.000Z | tests/test_downloadermiddleware_httpauth.py | HyunTruth/scrapy | 9bc5fab870aaee23905057002276fc0e1a48485f | [
"BSD-3-Clause"
] | 48 | 2018-11-08T01:31:33.000Z | 2019-03-08T01:18:18.000Z | tests/test_downloadermiddleware_httpauth.py | HyunTruth/scrapy | 9bc5fab870aaee23905057002276fc0e1a48485f | [
"BSD-3-Clause"
] | 3 | 2017-10-11T01:07:20.000Z | 2019-10-07T02:01:11.000Z | import unittest
from scrapy.http import Request
from scrapy.downloadermiddlewares.httpauth import HttpAuthMiddleware
from scrapy.spiders import Spider
class TestSpider(Spider):
http_user = 'foo'
http_pass = 'bar'
class HttpAuthMiddlewareTest(unittest.TestCase):
def setUp(self):
self.mw = HttpA... | 29.272727 | 77 | 0.681159 |
52dd836d699e1ac6b5df9becb7662ce1ead661ae | 16,388 | py | Python | virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_certificate.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_certificate.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_certificate.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
#
# (c) 2016, Kevin Coming (@waffie1)
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | 31.274809 | 84 | 0.56761 |
38fc0bab279a5c378428b94d683d5d3704f839ed | 165,630 | py | Python | api_tests/collections/test_views.py | mdicgovbr/osf.io | 5959d3a29f73acc520e2ae7b56d270db8b519072 | [
"Apache-2.0"
] | null | null | null | api_tests/collections/test_views.py | mdicgovbr/osf.io | 5959d3a29f73acc520e2ae7b56d270db8b519072 | [
"Apache-2.0"
] | 7 | 2019-03-11T18:59:10.000Z | 2019-03-15T13:54:20.000Z | api_tests/collections/test_views.py | mdicgovbr/osf.io | 5959d3a29f73acc520e2ae7b56d270db8b519072 | [
"Apache-2.0"
] | null | null | null | import pytest
from urlparse import urlparse
from django.utils.timezone import now
from api.base.settings.defaults import API_BASE
from framework.auth.core import Auth
from osf_tests.factories import (
CollectionFactory,
NodeFactory,
RegistrationFactory,
PreprintFactory,
ProjectFactory,
AuthUse... | 36.708777 | 226 | 0.617895 |
6fe57f5726cebfaacd79161da04583946fcaecab | 9,892 | py | Python | ibis/backends/impala/tests/conftest.py | hdfkndkndknknknvklsbljsbsmb/ibis | dbacd7a52ca062529fb7bf6dec51b98d7199d1dc | [
"Apache-2.0"
] | null | null | null | ibis/backends/impala/tests/conftest.py | hdfkndkndknknknvklsbljsbsmb/ibis | dbacd7a52ca062529fb7bf6dec51b98d7199d1dc | [
"Apache-2.0"
] | null | null | null | ibis/backends/impala/tests/conftest.py | hdfkndkndknknknvklsbljsbsmb/ibis | dbacd7a52ca062529fb7bf6dec51b98d7199d1dc | [
"Apache-2.0"
] | 1 | 2021-09-20T07:51:20.000Z | 2021-09-20T07:51:20.000Z | import inspect
import os
import warnings
from pathlib import Path
import impala
import pytest
import ibis
import ibis.expr.types as ir
import ibis.util as util
from ibis import options
from ibis.backends.tests.base import (
BackendTest,
RoundAwayFromZero,
UnorderedComparator,
)
from ibis.tests.expr.mocks ... | 24.979798 | 79 | 0.652952 |
2425c969c7e8472ce62038d0d3d13ff9256b19ad | 826 | py | Python | hellopy/utils/Singlist.py | odys-z/hello | 39ca67cae34eb4bc4cbd848a06b3c0d65a995954 | [
"MIT"
] | null | null | null | hellopy/utils/Singlist.py | odys-z/hello | 39ca67cae34eb4bc4cbd848a06b3c0d65a995954 | [
"MIT"
] | 3 | 2021-04-17T18:36:24.000Z | 2022-03-04T20:30:09.000Z | hellopy/utils/Singlist.py | odys-z/hello | 39ca67cae34eb4bc4cbd848a06b3c0d65a995954 | [
"MIT"
] | null | null | null | from typing import List
# Definition for singly-linked list.
class ListNode:
def __init__(self, val=0, nxt = None):
self.val = val
self.next = nxt
class Eq(object):
@staticmethod
def assertStrArr(a: List[str], b : ListNode):
if a is None and b is None:
return
if ... | 30.592593 | 88 | 0.495157 |
026cb7ccd8345f9e54f10893832ff5f85753aedb | 10,744 | py | Python | tests/utils/test_yaml.py | mkosiarc/osbs-client | b941fd6f0fe6954afba44b192691dfea6026e517 | [
"BSD-3-Clause"
] | 32 | 2015-09-17T18:30:20.000Z | 2018-12-29T18:10:14.000Z | tests/utils/test_yaml.py | mkosiarc/osbs-client | b941fd6f0fe6954afba44b192691dfea6026e517 | [
"BSD-3-Clause"
] | 624 | 2015-07-13T14:12:06.000Z | 2019-05-29T14:43:48.000Z | tests/utils/test_yaml.py | mkosiarc/osbs-client | b941fd6f0fe6954afba44b192691dfea6026e517 | [
"BSD-3-Clause"
] | 29 | 2015-09-18T10:06:48.000Z | 2019-04-10T10:19:41.000Z | """
Copyright (c) 2020 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import absolute_import
from flexmock import flexmock
from textwrap import dedent
from osbs.utils.yaml import (read_yaml,
... | 30.264789 | 94 | 0.556497 |
a90758c5924297a86448099f717dcb9e3cad5233 | 513 | py | Python | test/test20.py | zhouyuanmin/MyDemo | 664977a6243992c77931e58b98f5262745759d1a | [
"MIT"
] | null | null | null | test/test20.py | zhouyuanmin/MyDemo | 664977a6243992c77931e58b98f5262745759d1a | [
"MIT"
] | null | null | null | test/test20.py | zhouyuanmin/MyDemo | 664977a6243992c77931e58b98f5262745759d1a | [
"MIT"
] | null | null | null | """20. (1)假设某门面出租,在租赁合同中规定的首年租金为100000块,租金每年涨5%。在控制台打印出10年时间,每一年租金会分别涨到多少钱?
(2) 如果某打工人想租下了该店面,花费了30万进行装修,开始通过销售服装获取收入。
第一个月刨除房租、水电、人工开销,能有收入5000块。
生意越来越好做,假设能够勉强维持每月收入7%递增,那需要多久的辛勤劳动,就能收回成本?
本题中,所有金额保留两位小数。
"""
rent = 100000
for i in range(10):
print("第" + str(i + 1) + "年租金为:", round(rent * (1 + 0.05) ** i, 2))
mo... | 25.65 | 75 | 0.658869 |
5ea489e8e4297011564998c5c0dbccba0be5a4f2 | 1,811 | py | Python | config/phishing/mc.universocraft.com/consola.py | wrrulos/mcptool | 1dbf2a1a68f3c944167b3bda69fdda27e5ca279a | [
"MIT"
] | 39 | 2021-01-23T01:35:48.000Z | 2022-03-28T19:27:30.000Z | config/phishing/mc.universocraft.com/consola.py | wrrulos/mcptool | 1dbf2a1a68f3c944167b3bda69fdda27e5ca279a | [
"MIT"
] | 5 | 2021-11-22T05:46:09.000Z | 2022-03-04T08:11:51.000Z | config/phishing/mc.universocraft.com/consola.py | wrrulos/mcptool | 1dbf2a1a68f3c944167b3bda69fdda27e5ca279a | [
"MIT"
] | 6 | 2021-01-25T14:52:03.000Z | 2022-03-20T12:30:26.000Z | ###############################
# Consola mc.universocraft.com
###############################
import platform
import sys
import socket
import os
from colorama import Fore, init
from time import sleep
init()
so = platform.system()
os.system("title Consola: mc.universocraft.com")
rojo = Fore.RED
l... | 31.224138 | 95 | 0.376035 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.