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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9ddb0735682f82abe1e460ba5b03219087d0df7f | 578 | py | Python | models/__init__.py | gheyret/EfficientConformer | b28a0aaa3b182f72abaccbeb12df0402adf96097 | [
"Apache-2.0"
] | 101 | 2021-09-06T03:52:37.000Z | 2022-03-17T07:57:43.000Z | models/__init__.py | entn-at/EfficientConformer | d75c2dc74c44941ca34c62b4196488d34a4fb3a0 | [
"Apache-2.0"
] | 11 | 2021-09-13T05:52:33.000Z | 2022-02-18T04:40:50.000Z | models/__init__.py | entn-at/EfficientConformer | d75c2dc74c44941ca34c62b4196488d34a4fb3a0 | [
"Apache-2.0"
] | 17 | 2021-09-06T01:34:28.000Z | 2022-03-24T06:36:46.000Z | # Copyright 2021, Maxime Burchi.
#
# 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 writi... | 44.461538 | 74 | 0.762976 |
ed83fa9e3cd212e66ac48ece23ab4795bb4b9705 | 3,512 | py | Python | sdk/python/pulumi_azure_nextgen/cache/v20180301/get_firewall_rule.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/cache/v20180301/get_firewall_rule.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/cache/v20180301/get_firewall_rule.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 32.82243 | 138 | 0.639522 |
a621aa65645c9af8357857baf67d28345fef1cc6 | 3,740 | py | Python | custom_components/nicehash_excavator/mining_rig.py | MesserschmittX/hacs-nicehash-excavator | c8be5963fe05f4f3fc793a770d30fb2575d3a163 | [
"MIT"
] | 2 | 2022-02-05T04:56:29.000Z | 2022-02-07T03:54:26.000Z | custom_components/nicehash_excavator/mining_rig.py | MesserschmittX/hacs-nicehash-excavator | c8be5963fe05f4f3fc793a770d30fb2575d3a163 | [
"MIT"
] | 1 | 2022-02-22T13:42:13.000Z | 2022-03-15T20:39:11.000Z | custom_components/nicehash_excavator/mining_rig.py | MesserschmittX/ha-nicehash-excavator-monitor | c8be5963fe05f4f3fc793a770d30fb2575d3a163 | [
"MIT"
] | null | null | null | """A MiningRig that connects several devices."""
from __future__ import annotations
import datetime
import homeassistant
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import Callable, HomeAssistant
from .const import (
CONFIG_ENABLE_DEBUG_LOGGING,
CONFIG_HOST_ADDRESS,
CONFI... | 33.392857 | 87 | 0.648128 |
891f79b460fd8459e8d99bcad48dfe652a95daae | 52,603 | py | Python | corehq/apps/hqwebapp/models.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | corehq/apps/hqwebapp/models.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/hqwebapp/models.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | from django.template.loader import render_to_string
from django.utils.safestring import mark_safe, mark_for_escaping
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_noop, ugettext_lazy
from corehq import toggles, privileges
fr... | 36.682706 | 124 | 0.552858 |
21e22300ea1e8761d356bebad801cbe21c71eeae | 4,299 | py | Python | desktop/core/ext-py/python-ldap-2.3.13/Doc/conf.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/ext-py/python-ldap-2.3.13/Doc/conf.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/core/ext-py/python-ldap-2.3.13/Doc/conf.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | # -*- coding: utf-8 -*-
#
# python-ldap documentation build configuration file, created by
# sphinx-quickstart on Sat Mar 29 15:08:17 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that ar... | 32.08209 | 83 | 0.701559 |
8158d3028459530aa21ebcb6248c60a91c922905 | 4,220 | py | Python | src/networks/imagenet_WideResNet.py | bjfranks/Classification-AD | 4eecd6648bb6b54662944921924c8960c2ca236c | [
"MIT"
] | 27 | 2020-05-30T16:27:31.000Z | 2022-03-28T16:45:25.000Z | src/networks/imagenet_WideResNet.py | bjfranks/Classification-AD | 4eecd6648bb6b54662944921924c8960c2ca236c | [
"MIT"
] | 3 | 2021-04-22T10:01:55.000Z | 2022-01-13T02:50:31.000Z | src/networks/imagenet_WideResNet.py | bjfranks/Classification-AD | 4eecd6648bb6b54662944921924c8960c2ca236c | [
"MIT"
] | 7 | 2020-06-15T16:31:23.000Z | 2022-03-23T09:33:32.000Z | import torch.nn as nn
from base.base_net import BaseNet
from networks.cbam import CBAM
from torch.nn import init
# Credits to: https://github.com/hendrycks/ss-ood
class ImageNet_WideResNet(BaseNet):
def __init__(self, rep_dim=256):
self.inplanes = 64
super().__init__()
self.rep_dim = re... | 31.729323 | 100 | 0.565877 |
ee665819058bb9a8616cb39831b88d061db4d1a9 | 10,183 | py | Python | newskylabs/tools/bookblock/logic/page.py | newskylabs/nsl-bookblock | 77ff0b0ff7ad4f0487fb656d99819ed39b011c08 | [
"Apache-2.0"
] | null | null | null | newskylabs/tools/bookblock/logic/page.py | newskylabs/nsl-bookblock | 77ff0b0ff7ad4f0487fb656d99819ed39b011c08 | [
"Apache-2.0"
] | null | null | null | newskylabs/tools/bookblock/logic/page.py | newskylabs/nsl-bookblock | 77ff0b0ff7ad4f0487fb656d99819ed39b011c08 | [
"Apache-2.0"
] | null | null | null | """newskylabs/tools/bookblock/logic/page.py:
Page.
"""
__author__ = "Dietrich Bollmann"
__email__ = "dietrich@formgames.org"
__copyright__ = "Copyright 2019 Dietrich Bollmann"
__license__ = "Apache License 2.0, http://www.apache.org/licenses/LICENSE-2.0"
__date__ = "2019/10/18"
import sys... | 30.216617 | 93 | 0.513306 |
1e3afe0b46a3037aa60bbad4115e947d217098e0 | 1,738 | py | Python | examples/system/ulp/example_test.py | MagicInstall/esp-idf-NathanReeves-pio | b5efeeb5c00dff3f71f59db8849d399787f91c72 | [
"Apache-2.0"
] | 8 | 2021-04-17T23:30:54.000Z | 2022-02-12T19:10:34.000Z | examples/system/ulp/example_test.py | MagicInstall/esp-idf-NathanReeves-pio | b5efeeb5c00dff3f71f59db8849d399787f91c72 | [
"Apache-2.0"
] | null | null | null | examples/system/ulp/example_test.py | MagicInstall/esp-idf-NathanReeves-pio | b5efeeb5c00dff3f71f59db8849d399787f91c72 | [
"Apache-2.0"
] | 3 | 2021-08-02T07:11:55.000Z | 2021-11-09T06:02:05.000Z | from __future__ import unicode_literals
import re
import time
import ttfw_idf
from tiny_test_fw import Utility
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32'])
def test_examples_ulp(env, extra_data):
dut = env.get_dut('ulp', 'examples/system/ulp')
dut.start_app()
dut.expect_all(... | 37.782609 | 111 | 0.617376 |
b7efe5c3b4e0c60c0a27031651fd7fa59ab21345 | 64,306 | py | Python | rst2pdf/createpdf.py | oz123/rst2pdf | 9979c04a2cc88dce9aaf8312a6031796ead4943d | [
"MIT"
] | null | null | null | rst2pdf/createpdf.py | oz123/rst2pdf | 9979c04a2cc88dce9aaf8312a6031796ead4943d | [
"MIT"
] | null | null | null | rst2pdf/createpdf.py | oz123/rst2pdf | 9979c04a2cc88dce9aaf8312a6031796ead4943d | [
"MIT"
] | 1 | 2019-12-09T13:14:20.000Z | 2019-12-09T13:14:20.000Z | # -*- coding: utf-8 -*-
#$URL$
#$Date$
#$Revision$
# See LICENSE.txt for licensing terms
# Some fragments of code are copied from Reportlab under this license:
#
#####################################################################################
#
# Copyright (c) 2000-2008, ReportLab Inc.
# All rights ... | 38.368735 | 155 | 0.579961 |
0feb7fdcedee598b43f07983d1e7685de126022e | 3,205 | py | Python | qiskit_nature/results/vibrational_structure_result.py | Cryoris/qiskit-nature | c24a85140eb514628e2b9b1a5f0e03a689f8ade7 | [
"Apache-2.0"
] | null | null | null | qiskit_nature/results/vibrational_structure_result.py | Cryoris/qiskit-nature | c24a85140eb514628e2b9b1a5f0e03a689f8ade7 | [
"Apache-2.0"
] | null | null | null | qiskit_nature/results/vibrational_structure_result.py | Cryoris/qiskit-nature | c24a85140eb514628e2b9b1a5f0e03a689f8ade7 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 37.705882 | 91 | 0.697036 |
5cb71f035ce8ecbc7029d6f1bc9b9af93a27c046 | 646 | py | Python | Lab3/persistentClient.py | LucaGuffanti/FCI | 3a26b877d06939786eeca9749b99b5df9e270915 | [
"Unlicense"
] | null | null | null | Lab3/persistentClient.py | LucaGuffanti/FCI | 3a26b877d06939786eeca9749b99b5df9e270915 | [
"Unlicense"
] | null | null | null | Lab3/persistentClient.py | LucaGuffanti/FCI | 3a26b877d06939786eeca9749b99b5df9e270915 | [
"Unlicense"
] | null | null | null | # vogliamo terminare la connessione nell'invio di un punto
# applicazione client persistente tcp
from socket import *
# identifico il welcome socket del server, come coppia di IP e Porta
serverName = '192.168.1.3'
serverPort = 12000
clientSocket = socket(AF_INET, SOCK_STREAM)
clientSocket.connect((serverName, serv... | 22.275862 | 68 | 0.718266 |
544aa480ceae8bc6fc79799d28e36280349591cd | 15,487 | py | Python | fred/turbine.py | TUDelft-DataDrivenControl/FRED | f837f4a126e693519fa5ab7c913cb26570ca5278 | [
"MIT"
] | null | null | null | fred/turbine.py | TUDelft-DataDrivenControl/FRED | f837f4a126e693519fa5ab7c913cb26570ca5278 | [
"MIT"
] | null | null | null | fred/turbine.py | TUDelft-DataDrivenControl/FRED | f837f4a126e693519fa5ab7c913cb26570ca5278 | [
"MIT"
] | null | null | null | from fenics import *
import fred.conf as conf
if conf.with_adjoint:
from fenics_adjoint import *
from pyadjoint import Block
from pyadjoint.overloaded_function import overload_function
import numpy as np
import scipy.interpolate
import logging
logger = logging.getLogger("cm.turbine")
import os
def read_rosco_... | 38.524876 | 137 | 0.613741 |
ae176ee5f87d531b3b0b840f2accc49f52cbdde7 | 18,808 | py | Python | sympy/core/tests/test_sympify.py | harsh-98/sympy | 53fc684467088cdf0acccb6ad770cbde97e32268 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/tests/test_sympify.py | harsh-98/sympy | 53fc684467088cdf0acccb6ad770cbde97e32268 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/tests/test_sympify.py | harsh-98/sympy | 53fc684467088cdf0acccb6ad770cbde97e32268 | [
"BSD-3-Clause"
] | null | null | null | from sympy import (Symbol, exp, Integer, Float, sin, cos, log, Poly, Lambda,
Function, I, S, N, sqrt, srepr, Rational, Tuple, Matrix, Interval, Add, Mul,
Pow, Or, true, false, Abs, pi, Range)
from sympy.abc import x, y
from sympy.core.sympify import sympify, _sympify, SympifyError, kernS
from sympy.core.decorat... | 31.087603 | 106 | 0.595704 |
b06f15b55274f93b6baaf3357575243970c6af00 | 232 | py | Python | server/apps/main/admin.py | JKHeadley/django-aws-template | 3133a8c2184bd85c3c4e7e185e1f5ca07fa31fc6 | [
"MIT"
] | null | null | null | server/apps/main/admin.py | JKHeadley/django-aws-template | 3133a8c2184bd85c3c4e7e185e1f5ca07fa31fc6 | [
"MIT"
] | null | null | null | server/apps/main/admin.py | JKHeadley/django-aws-template | 3133a8c2184bd85c3c4e7e185e1f5ca07fa31fc6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
class ContactMessageAdmin(admin.ModelAdmin):
list_display = ('id', 'name', 'email')
"""
Register Admin Pages
"""
admin.site.register(ContactMessage, ContactMessageAdmin)
| 19.333333 | 56 | 0.75 |
65d6bd5d9864e4fc366ae7c292ef1cef5bda0651 | 9,948 | py | Python | app/services/simulation_service.py | MrDanCoelho/Desafio-Python | a7a65628e9e9d541f24b5c9684c247c7d5fa645d | [
"MIT"
] | null | null | null | app/services/simulation_service.py | MrDanCoelho/Desafio-Python | a7a65628e9e9d541f24b5c9684c247c7d5fa645d | [
"MIT"
] | null | null | null | app/services/simulation_service.py | MrDanCoelho/Desafio-Python | a7a65628e9e9d541f24b5c9684c247c7d5fa645d | [
"MIT"
] | null | null | null | from app.domain.models.resultado_model import resultado_model
from app.domain.models.propriedade_model import propriedade_model
from app.domain.enums.enum_tipo_jogador import enum_tipo_jogador
from app.domain.models.jogador_model import jogador_model
import time
import random
class simulation_service:
def jogador... | 44.213333 | 124 | 0.602935 |
15ae2a43e15b412824b297ac8aa929f9ea29b4ed | 2,122 | py | Python | fim/graph/resources/networkx_arm.py | fabric-testbed/InformationModel | 6f01e208b2cf5f8b721d16a48e4df97ce0b727bc | [
"MIT"
] | 6 | 2020-07-14T22:52:53.000Z | 2021-09-25T09:20:25.000Z | fim/graph/resources/networkx_arm.py | fabric-testbed/InformationModel | 6f01e208b2cf5f8b721d16a48e4df97ce0b727bc | [
"MIT"
] | 69 | 2020-10-09T10:32:36.000Z | 2022-03-28T16:18:11.000Z | fim/graph/resources/networkx_arm.py | fabric-testbed/InformationModel | 6f01e208b2cf5f8b721d16a48e4df97ce0b727bc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# 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 ... | 37.22807 | 91 | 0.744581 |
fc6ea967a894190f7ed6e90d6f5d4a07971e67de | 37,591 | py | Python | corehq/apps/locations/tests/test_location_fixtures.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | corehq/apps/locations/tests/test_location_fixtures.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 94 | 2020-12-11T06:57:31.000Z | 2022-03-15T10:24:06.000Z | corehq/apps/locations/tests/test_location_fixtures.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | null | null | null | import os
import uuid
from collections import namedtuple
from datetime import datetime, timedelta
from xml.etree import cElementTree as ElementTree
from django.test import TestCase
import mock
from casexml.apps.phone.models import SimplifiedSyncLog
from casexml.apps.phone.restore import RestoreParams
from casexml.ap... | 40.595032 | 126 | 0.656381 |
12ea67d8fcaa8bad424993e9716a65194a1a355a | 16,035 | py | Python | test/parallel/test_tensorflow_keras.py | zarzen/horovod | d3c93d7b97c6158f003dad9aa377fe2bbf194e38 | [
"Apache-2.0"
] | 3 | 2021-01-31T11:18:18.000Z | 2021-06-01T03:01:24.000Z | test/parallel/test_tensorflow_keras.py | zarzen/horovod | d3c93d7b97c6158f003dad9aa377fe2bbf194e38 | [
"Apache-2.0"
] | 6 | 2019-10-22T17:19:13.000Z | 2020-05-20T20:53:02.000Z | test/parallel/test_tensorflow_keras.py | zarzen/horovod | d3c93d7b97c6158f003dad9aa377fe2bbf194e38 | [
"Apache-2.0"
] | 4 | 2019-10-03T20:40:16.000Z | 2020-11-17T15:23:28.000Z | # Copyright 2018 Uber Technologies, 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 applica... | 38.638554 | 107 | 0.564266 |
ca307617ebe6c5165262ed3a09b1e91470229299 | 13,138 | py | Python | analytics/test/client.py | gokulsg/analytics-python | ab5c9188c21b16dc9b280f2d2123461bfec0c9bf | [
"Unlicense",
"MIT"
] | 1 | 2021-05-13T21:52:37.000Z | 2021-05-13T21:52:37.000Z | analytics/test/client.py | gokulsg/analytics-python | ab5c9188c21b16dc9b280f2d2123461bfec0c9bf | [
"Unlicense",
"MIT"
] | null | null | null | analytics/test/client.py | gokulsg/analytics-python | ab5c9188c21b16dc9b280f2d2123461bfec0c9bf | [
"Unlicense",
"MIT"
] | null | null | null | from datetime import date, datetime
import unittest
import time
import six
import mock
from analytics.version import VERSION
from analytics.client import Client
class TestClient(unittest.TestCase):
def fail(self, e, batch):
"""Mark the failure handler"""
self.failed = True
def setUp(self):
... | 37.537143 | 79 | 0.602603 |
8047fd8a27e75283f014ce87c529ead34bea762a | 50,522 | py | Python | stella/bytecode.py | squisher/stella | d9f0b2ebbd853b31c6f75cd0f0286037da4bcaf9 | [
"Apache-2.0"
] | 11 | 2015-08-03T17:37:46.000Z | 2021-05-26T07:29:36.000Z | stella/bytecode.py | squisher/stella | d9f0b2ebbd853b31c6f75cd0f0286037da4bcaf9 | [
"Apache-2.0"
] | 1 | 2016-09-17T01:46:13.000Z | 2016-09-17T01:46:13.000Z | stella/bytecode.py | squisher/stella | d9f0b2ebbd853b31c6f75cd0f0286037da4bcaf9 | [
"Apache-2.0"
] | 3 | 2016-05-21T19:17:16.000Z | 2019-05-10T17:35:37.000Z | # Copyright 2013-2015 David Mohr
#
# 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 writi... | 29.912374 | 95 | 0.570959 |
9bb38f2434749a1319e22cbe7fe64f5127f2215a | 387 | py | Python | C_Tut/C_Tut/wsgi.py | jaydeep11/C-tutorial-web-application | 3ec0225efda834fe93a678d887044906124de59b | [
"MIT"
] | null | null | null | C_Tut/C_Tut/wsgi.py | jaydeep11/C-tutorial-web-application | 3ec0225efda834fe93a678d887044906124de59b | [
"MIT"
] | null | null | null | C_Tut/C_Tut/wsgi.py | jaydeep11/C-tutorial-web-application | 3ec0225efda834fe93a678d887044906124de59b | [
"MIT"
] | null | null | null | """
WSGI config for C_Tut 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/2.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTING... | 22.764706 | 78 | 0.782946 |
3bb222999fa0ba43d398d4190cd0f65e97bc5944 | 414 | py | Python | tests/test_methods/test_reminders.py | jackwardell/SlackTime | c40be4854a26084e1a368a975e220d613c14d8d8 | [
"Apache-2.0"
] | 2 | 2020-09-24T00:07:13.000Z | 2020-09-27T19:27:06.000Z | tests/test_methods/test_reminders.py | jackwardell/SlackTime | c40be4854a26084e1a368a975e220d613c14d8d8 | [
"Apache-2.0"
] | null | null | null | tests/test_methods/test_reminders.py | jackwardell/SlackTime | c40be4854a26084e1a368a975e220d613c14d8d8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
def test_reminders_add(slack_time):
assert slack_time.reminders.add
def test_reminders_complete(slack_time):
assert slack_time.reminders.complete
def test_reminders_delete(slack_time):
assert slack_time.reminders.delete
def test_reminders_info(slack_time):
assert slack_ti... | 18.818182 | 40 | 0.785024 |
e437418eaad1f373f20f46455354c82526bc5573 | 2,317 | py | Python | juriscraper/DeferringList.py | EvandoBlanco/juriscraper | 3d16af258620d4ba1b4827f66ef69e8a2c5a0484 | [
"BSD-2-Clause"
] | 228 | 2015-01-23T04:41:39.000Z | 2022-03-30T09:52:20.000Z | juriscraper/DeferringList.py | EvandoBlanco/juriscraper | 3d16af258620d4ba1b4827f66ef69e8a2c5a0484 | [
"BSD-2-Clause"
] | 331 | 2015-01-05T18:53:40.000Z | 2022-03-29T23:43:30.000Z | juriscraper/DeferringList.py | EvandoBlanco/juriscraper | 3d16af258620d4ba1b4827f66ef69e8a2c5a0484 | [
"BSD-2-Clause"
] | 84 | 2015-01-03T01:19:21.000Z | 2022-03-01T08:09:32.000Z | from juriscraper.AbstractSite import logger
class DeferringList(object):
"""This object can be used to do deferred loading of meta data in the case
that a piece of meta data requires some special work to obtain.
Note that since this inherits from object (rather than list), it won't be
sorted by the _... | 34.58209 | 78 | 0.608977 |
7498aa48a6076fa6ddd43850db6855041150a7cd | 1,409 | py | Python | main_precalculate_M_arrayjob.py | aalto-ics-kepaco/pairwiseMKL | 99ebfa880ad57356bf4086f20e38c481672ac115 | [
"MIT"
] | 9 | 2018-07-10T13:58:52.000Z | 2020-04-19T16:37:12.000Z | main_precalculate_M_arrayjob.py | aalto-ics-kepaco/pairwiseMKL | 99ebfa880ad57356bf4086f20e38c481672ac115 | [
"MIT"
] | 1 | 2018-10-16T06:04:20.000Z | 2018-10-16T06:04:20.000Z | main_precalculate_M_arrayjob.py | aalto-ics-kepaco/pairwiseMKL | 99ebfa880ad57356bf4086f20e38c481672ac115 | [
"MIT"
] | 3 | 2019-12-10T08:27:48.000Z | 2021-08-09T13:13:00.000Z | from sys import argv, exit
import os
import numpy as np
from pairwisemkl.learner.compute_M__arrayjob import *
try:
id_in = int(argv[1])
except:
exit()
data_path = './drug_response_data'
# Drug kernels
# Read file names of drug kernels
fn_kd = open(data_path + '/Drug_kernels/Drug_kernel_file_names.... | 26.092593 | 78 | 0.706175 |
b11db85820b4c96c3c4d507f6227e886445d42d8 | 3,462 | py | Python | web_manage/student/migrations/0001_initial.py | chicken-noodle/mysite | 6973edd1357a2490f7f47e5ce427af5b144fb50a | [
"bzip2-1.0.6"
] | 1 | 2019-09-02T02:14:51.000Z | 2019-09-02T02:14:51.000Z | web_manage/student/migrations/0001_initial.py | chicken-noodle/mysite | 6973edd1357a2490f7f47e5ce427af5b144fb50a | [
"bzip2-1.0.6"
] | null | null | null | web_manage/student/migrations/0001_initial.py | chicken-noodle/mysite | 6973edd1357a2490f7f47e5ce427af5b144fb50a | [
"bzip2-1.0.6"
] | 1 | 2019-09-02T03:33:06.000Z | 2019-09-02T03:33:06.000Z | # Generated by Django 2.2.3 on 2019-08-28 12:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('all', '0001_initial'),
('competition', '0001_initial'),
]
operations = [
migrat... | 54.09375 | 136 | 0.616696 |
18657b4cbe05493bf0d70963921435cb3deb7e83 | 276 | py | Python | cit-api/pipeline/migrations/0125_merge_20210309_2137.py | bcgov/CIT | b9db4f169b52e9a6293b3ee1e61935888074215a | [
"Apache-2.0"
] | 10 | 2020-11-12T15:13:40.000Z | 2022-03-05T22:33:08.000Z | cit-api/pipeline/migrations/0125_merge_20210309_2137.py | bcgov/CIT | b9db4f169b52e9a6293b3ee1e61935888074215a | [
"Apache-2.0"
] | 28 | 2020-07-17T16:33:55.000Z | 2022-03-21T16:24:25.000Z | cit-api/pipeline/migrations/0125_merge_20210309_2137.py | bcgov/CIT | b9db4f169b52e9a6293b3ee1e61935888074215a | [
"Apache-2.0"
] | 5 | 2020-11-02T23:39:53.000Z | 2022-03-01T19:09:45.000Z | # Generated by Django 2.2.16 on 2021-03-09 21:37
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('pipeline', '0124_auto_20210309_1650'),
('pipeline', '0123_auto_20210303_2236'),
]
operations = [
]
| 18.4 | 48 | 0.652174 |
30d07d1ac5d0e6b9606dd8567a8eb731dd0a3d52 | 564 | py | Python | Python_PI/Clase16.py | Alex8Navas/PythonPI | 5f1eff48e8a28f364f5f0dbf25d7a4968a0025bd | [
"CC0-1.0"
] | null | null | null | Python_PI/Clase16.py | Alex8Navas/PythonPI | 5f1eff48e8a28f364f5f0dbf25d7a4968a0025bd | [
"CC0-1.0"
] | null | null | null | Python_PI/Clase16.py | Alex8Navas/PythonPI | 5f1eff48e8a28f364f5f0dbf25d7a4968a0025bd | [
"CC0-1.0"
] | null | null | null | # Clase 16. Curso Píldoras Informáticas.
# Control de Flujo. Bucles 3.
for i in range(5):
print(f"EL valor de la vriable es {i}")
for i in range(0, 50, 5): # De 0 a 50 (excluido) de cinco en cinco
print(f"EL valor de la vriable es {i}")
print(len("Markus"))
print("\nAutentificación del Correo")
Aut... | 24.521739 | 67 | 0.648936 |
438971bb4ff3b0e238e246909afed0bed8b7dab8 | 7,859 | py | Python | lib/places_classifier.py | joelpob/photos-gallery | 84417a776485cf699d21c67e92b7fbd77c7fb97a | [
"MIT"
] | 2 | 2020-08-08T10:30:47.000Z | 2020-11-28T21:37:41.000Z | lib/places_classifier.py | joelpob/photos-gallery | 84417a776485cf699d21c67e92b7fbd77c7fb97a | [
"MIT"
] | null | null | null | lib/places_classifier.py | joelpob/photos-gallery | 84417a776485cf699d21c67e92b7fbd77c7fb97a | [
"MIT"
] | null | null | null | # PlacesCNN to predict the scene category, attribute, and class activation map in a single pass
# by Bolei Zhou, sep 2, 2017
# updated, making it compatible to pytorch 1.x in a hacky way
# updated, cleaned it up, class'ified it, self contained
import torch
from torch.autograd import Variable as V
import torchvision.mo... | 40.510309 | 114 | 0.602494 |
30025dfaca3723d9418bc34042fbaaf85ab81137 | 5,929 | py | Python | tests/unit/modules/test_win_dns_client.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2019-09-17T17:48:55.000Z | 2019-09-17T17:48:55.000Z | tests/unit/modules/test_win_dns_client.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/unit/modules/test_win_dns_client.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: Jayesh Kariya <jayeshk@saltstack.com>
'''
# Import Python Libs
from __future__ import absolute_import, unicode_literals, print_function
import types
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase, s... | 33.88 | 89 | 0.595885 |
c0111ce7dd44450e33d4743ee55a93c0754446bd | 51,634 | py | Python | nova/conf/compute.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | 1 | 2021-06-10T17:08:14.000Z | 2021-06-10T17:08:14.000Z | nova/conf/compute.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | null | null | null | nova/conf/compute.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | null | null | null | # needs:check_deprecation_status
# Copyright 2015 Huawei Technology corp.
# Copyright 2015 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License a... | 34.982385 | 83 | 0.740927 |
c3bf76bc115781e2d1b3d853a430f799457767f1 | 926 | py | Python | var/spack/repos/builtin/packages/r-later/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/r-later/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/r-later/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 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 RLater(RPackage):
"""Utilities for Scheduling Functions to Execute Later with Event Loops.... | 37.04 | 97 | 0.733261 |
4c076308e6cdc168e614c9eb1a37c3c0f96078e4 | 1,664 | py | Python | api/main.py | folksilva/hawknest | bd074da8cdac1020009c8b83ee648c8b253e66f0 | [
"Apache-2.0"
] | null | null | null | api/main.py | folksilva/hawknest | bd074da8cdac1020009c8b83ee648c8b253e66f0 | [
"Apache-2.0"
] | null | null | null | api/main.py | folksilva/hawknest | bd074da8cdac1020009c8b83ee648c8b253e66f0 | [
"Apache-2.0"
] | 1 | 2019-05-07T13:26:51.000Z | 2019-05-07T13:26:51.000Z | """
Data models:
TYPE:
- _id = ObjectId do tipo
- name = Nome do tipo
- level = Nível de acesso do tipo
- groups = Grupos com acesso ao tipo
GROUP
- _id = ObjectId do grupo
- name = Nome do grupo
- users = Usuários no grupo
PERMISSIONS
- _id = ObjectId da permissão (fixo como 'main')
- employees = Usuários com níve... | 26 | 68 | 0.754207 |
63e4f20a2d2e22691cc77b65e7fe762d410b11ed | 652 | py | Python | deltalanguage/test/test_wiring.py | riverlane/deltalanguage | 41c3cfa88ed3f17956645c18566c2147a4bdd74c | [
"MIT"
] | 16 | 2021-01-06T17:44:51.000Z | 2022-01-06T12:07:07.000Z | deltalanguage/test/test_wiring.py | riverlane/deltalanguage | 41c3cfa88ed3f17956645c18566c2147a4bdd74c | [
"MIT"
] | null | null | null | deltalanguage/test/test_wiring.py | riverlane/deltalanguage | 41c3cfa88ed3f17956645c18566c2147a4bdd74c | [
"MIT"
] | 4 | 2021-03-25T20:35:08.000Z | 2021-09-06T13:10:58.000Z | """Testing wiring of the graph."""
import unittest
import deltalanguage as dl
from deltalanguage.test._node_lib import terminate_non_const
class NoOutputTest(unittest.TestCase):
def test_error_thrown(self):
"""Nodes without output ports cannot produce output.
.. note::
This is ver... | 24.148148 | 75 | 0.657975 |
f63136f539ff5c08f745d9a0bb716291fe249ad2 | 13,084 | py | Python | arcanelab/ouroboros/migrations/0001_initial.py | luismasuelli/arcanelab-ouroboros | 8a7b6003234a244cd4198c842ba69fdd76e2255c | [
"MIT"
] | null | null | null | arcanelab/ouroboros/migrations/0001_initial.py | luismasuelli/arcanelab-ouroboros | 8a7b6003234a244cd4198c842ba69fdd76e2255c | [
"MIT"
] | null | null | null | arcanelab/ouroboros/migrations/0001_initial.py | luismasuelli/arcanelab-ouroboros | 8a7b6003234a244cd4198c842ba69fdd76e2255c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-07-19 00:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import arcanelab.ouroboros.fields
import arcanelab.ouroboros.models
class Migration(migrations.Migrati... | 75.630058 | 827 | 0.657979 |
c9a7275608d601c1bd4b661e6154f41b450a9d7e | 1,758 | py | Python | app/user/serializers.py | PhusionDev/recipe-app-api | 8a2b0d7340cb2b214aaee979a8d22e59ecd17dea | [
"MIT"
] | null | null | null | app/user/serializers.py | PhusionDev/recipe-app-api | 8a2b0d7340cb2b214aaee979a8d22e59ecd17dea | [
"MIT"
] | null | null | null | app/user/serializers.py | PhusionDev/recipe-app-api | 8a2b0d7340cb2b214aaee979a8d22e59ecd17dea | [
"MIT"
] | null | null | null | """User Serializer Module"""
from django.contrib.auth import get_user_model, authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
"""Serializer for the users object"""
class Meta:
model = get_us... | 30.842105 | 74 | 0.646758 |
fa354fea724873e17b099aa1dcf236f31379f647 | 1,522 | py | Python | oracle/arxiv/create_arxiv_jsonl.py | Yale-LILY/DYLE | 0955035f244948b4b3a0dd49ff495ce3a99fd169 | [
"MIT"
] | 2 | 2021-12-31T08:29:51.000Z | 2022-01-24T13:13:24.000Z | oracle/arxiv/create_arxiv_jsonl.py | Yale-LILY/DYLE | 0955035f244948b4b3a0dd49ff495ce3a99fd169 | [
"MIT"
] | null | null | null | oracle/arxiv/create_arxiv_jsonl.py | Yale-LILY/DYLE | 0955035f244948b4b3a0dd49ff495ce3a99fd169 | [
"MIT"
] | 2 | 2021-10-31T02:51:36.000Z | 2021-12-25T00:32:49.000Z | import json
from tqdm import tqdm
from nltk.tokenize import sent_tokenize, word_tokenize
import os.path
from datasets import load_dataset
mode = "test"
dataset = load_dataset("scientific_papers", "arxiv", split=mode)
source_content = [data_entity["article"] for data_entity in dataset]
target_content = [dat... | 26.241379 | 96 | 0.664258 |
fc50f3cbeb8ec2e2d21782c552c5e8feb02d1f56 | 586 | py | Python | StatTables/Python Data Generation/Chi-Squared.py | LukeBaal/PublicProjects | e9aae06b95189b69d642a6eaae53e3d970452e66 | [
"MIT"
] | null | null | null | StatTables/Python Data Generation/Chi-Squared.py | LukeBaal/PublicProjects | e9aae06b95189b69d642a6eaae53e3d970452e66 | [
"MIT"
] | null | null | null | StatTables/Python Data Generation/Chi-Squared.py | LukeBaal/PublicProjects | e9aae06b95189b69d642a6eaae53e3d970452e66 | [
"MIT"
] | null | null | null | import csv
data = open("Chi-Squared_Dist.csv", "w")
data.write("k, x, p\n")
with open('Book1.csv', 'rb') as csvfile:
reader = csv.reader(csvfile)
file_list = list(reader)
del file_list[0]
for row in file_list:
del row[-1]
p = file_list[0]
del file_list[0]
p = p[1:]
k = []
for item in file_list:
... | 16.742857 | 73 | 0.59727 |
c117259b61bae755ab17eb57a4955ea6e41f2b35 | 719 | py | Python | tobiko/common/_utils.py | FedericoRessi/tobiko | 188825386dc30197a37b7fe8be03318c73abbc48 | [
"Apache-2.0"
] | 1 | 2022-01-11T20:50:06.000Z | 2022-01-11T20:50:06.000Z | tobiko/common/_utils.py | FedericoRessi/tobiko | 188825386dc30197a37b7fe8be03318c73abbc48 | [
"Apache-2.0"
] | null | null | null | tobiko/common/_utils.py | FedericoRessi/tobiko | 188825386dc30197a37b7fe8be03318c73abbc48 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Red Hat
#
# 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 ... | 37.842105 | 78 | 0.730181 |
c8ac8d81f2153bded0f17da97fdfaaad0676fff5 | 1,295 | py | Python | api/handler/statistic_handler.py | WeiShiwei/tornado_glearn | 5e74bbaaee4d2b8c5abf3b60cffbe54694a3bc6f | [
"Apache-2.0"
] | null | null | null | api/handler/statistic_handler.py | WeiShiwei/tornado_glearn | 5e74bbaaee4d2b8c5abf3b60cffbe54694a3bc6f | [
"Apache-2.0"
] | null | null | null | api/handler/statistic_handler.py | WeiShiwei/tornado_glearn | 5e74bbaaee4d2b8c5abf3b60cffbe54694a3bc6f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
u"""
Description: Report statistic information.
User: Jerry.Fang
Date: 14-01-06
"""
import traceback
from api.handler.base_handler import BaseHandler
import ujson
from statistic.heart_beat import HeartReqProcess
from statistic.stat_info_querier import StatInfoQuerier
class HeartRequestHandler(BaseHandl... | 30.833333 | 97 | 0.657143 |
4e44460d78954fa06a699eb293a4fe50d522616b | 4,482 | py | Python | spikeextractors/extractors/openephysextractors/openephysextractors.py | alowet/spikeextractors | 3e5a175a5523a3eb3578f96b0fffebee54108d9f | [
"MIT"
] | null | null | null | spikeextractors/extractors/openephysextractors/openephysextractors.py | alowet/spikeextractors | 3e5a175a5523a3eb3578f96b0fffebee54108d9f | [
"MIT"
] | null | null | null | spikeextractors/extractors/openephysextractors/openephysextractors.py | alowet/spikeextractors | 3e5a175a5523a3eb3578f96b0fffebee54108d9f | [
"MIT"
] | null | null | null | from spikeextractors import RecordingExtractor, SortingExtractor
from pathlib import Path
import numpy as np
from spikeextractors.extraction_tools import check_get_traces_args, check_valid_unit_id, check_get_ttl_args
try:
import pyopenephys
HAVE_OE = True
except ImportError:
HAVE_OE = False
class OpenEp... | 47.680851 | 147 | 0.708835 |
2c5aa8fece7af8980af14ecd8425d7a680b2027c | 3,542 | py | Python | rapiduino/exceptions.py | samwedge/rapiduino | 2e991fa568128ac46babda135e67280d99b46ce2 | [
"Apache-2.0"
] | 3 | 2017-01-31T23:26:10.000Z | 2022-02-28T16:36:15.000Z | rapiduino/exceptions.py | samwedge/rapiduino | 2e991fa568128ac46babda135e67280d99b46ce2 | [
"Apache-2.0"
] | null | null | null | rapiduino/exceptions.py | samwedge/rapiduino | 2e991fa568128ac46babda135e67280d99b46ce2 | [
"Apache-2.0"
] | null | null | null | from typing import Optional, Tuple
import rapiduino
class SerialConnectionSendDataError(Exception):
def __init__(self, n_bytes_intended: int, n_bytes_actual: int) -> None:
message = (
f"Transmitted {n_bytes_actual} bytes "
f"but expected to transmit {n_bytes_intended} bytes"
... | 33.733333 | 84 | 0.662902 |
25e668c2b419a56e877f4a7ab63d7ecca07ed8de | 1,221 | py | Python | label_studio/data_import/urls.py | cdpath/label-studio | 68d0a05b335d090160ec45a253dd4ca386de536a | [
"Apache-2.0"
] | 3 | 2021-07-16T03:48:21.000Z | 2022-01-10T04:58:25.000Z | label_studio/data_import/urls.py | cdpath/label-studio | 68d0a05b335d090160ec45a253dd4ca386de536a | [
"Apache-2.0"
] | 6 | 2022-02-21T15:19:35.000Z | 2022-03-07T15:25:16.000Z | label_studio/data_import/urls.py | cdpath/label-studio | 68d0a05b335d090160ec45a253dd4ca386de536a | [
"Apache-2.0"
] | 1 | 2021-08-18T15:07:47.000Z | 2021-08-18T15:07:47.000Z | """This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.
"""
from django.urls import path, include
from . import api
app_name = 'data_import'
_api_urlpatterns = [
path('file-upload/<int:pk>', api.File... | 40.7 | 168 | 0.714988 |
bb47c6596c058a2a62fb0414404a0fd43eebd29e | 505 | py | Python | DeepRL/utilities/__init__.py | Rafapia/Deep-Reinforcement-Learning-Algorithms-with-PyTorch | a0d584cbdc068b9e0d0f025df153103bcf16a6e0 | [
"MIT"
] | null | null | null | DeepRL/utilities/__init__.py | Rafapia/Deep-Reinforcement-Learning-Algorithms-with-PyTorch | a0d584cbdc068b9e0d0f025df153103bcf16a6e0 | [
"MIT"
] | null | null | null | DeepRL/utilities/__init__.py | Rafapia/Deep-Reinforcement-Learning-Algorithms-with-PyTorch | a0d584cbdc068b9e0d0f025df153103bcf16a6e0 | [
"MIT"
] | null | null | null | __all__ = ["data_structures", "grammar_algorithms",
"Deepmind_RMS_Prop", "Memory_Shaper", "OU_Noise", "Parallel_Experience_Generator", "Tensorboard", "Utility_Functions"]
from .data_structures import *
from .grammar_algorithms import *
from .Deepmind_RMS_Prop import DM_RMSprop
from .Memory_Shaper import Me... | 42.083333 | 129 | 0.819802 |
7d65aed92a1bfd61cef5b347be38932d46f915db | 4,696 | py | Python | cloudify_aws/ec2/resources/customer_gateway.py | cloudify-cosmo/cloudify-aws-plugin | 958c84cd4b95ce739ecfab2ba944c380bd4fe836 | [
"Apache-2.0"
] | 13 | 2015-05-28T23:21:05.000Z | 2022-03-20T05:38:20.000Z | cloudify_aws/ec2/resources/customer_gateway.py | cloudify-cosmo/cloudify-aws-plugin | 958c84cd4b95ce739ecfab2ba944c380bd4fe836 | [
"Apache-2.0"
] | 49 | 2015-01-04T16:05:34.000Z | 2022-03-27T11:35:13.000Z | cloudify_aws/ec2/resources/customer_gateway.py | cloudify-cosmo/cloudify-aws-plugin | 958c84cd4b95ce739ecfab2ba944c380bd4fe836 | [
"Apache-2.0"
] | 41 | 2015-01-21T17:16:05.000Z | 2022-03-31T06:47:48.000Z | # Copyright (c) 2018 Cloudify Platform Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 35.044776 | 77 | 0.68207 |
4a76b643aaa444a2ece81d418b5ae3c554e65f4d | 15,308 | py | Python | search/modules/mix_op.py | AhmadQasim/proxylessnas-dense | efaf150fc2a4eee2d8e9df664bad9eb4cf653c3e | [
"Apache-2.0"
] | null | null | null | search/modules/mix_op.py | AhmadQasim/proxylessnas-dense | efaf150fc2a4eee2d8e9df664bad9eb4cf653c3e | [
"Apache-2.0"
] | null | null | null | search/modules/mix_op.py | AhmadQasim/proxylessnas-dense | efaf150fc2a4eee2d8e9df664bad9eb4cf653c3e | [
"Apache-2.0"
] | 1 | 2021-05-12T04:49:28.000Z | 2021-05-12T04:49:28.000Z | # ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware
# Han Cai, Ligeng Zhu, Song Han
# International Conference on Learning Representations (ICLR), 2019.
import numpy as np
from torch.nn.parameter import Parameter
import torch.nn.functional as F
from search.modules.layers import *
# return... | 46.957055 | 120 | 0.608571 |
6a84a3b7ed9e138b9563a21a17b9a8b727518a23 | 994 | py | Python | matury/2021pr_operon/zad43.py | bartekpacia/informatyka-frycz | 6fdbbdea0c6b6a710378f22e90d467c9f91e64aa | [
"MIT"
] | 2 | 2021-03-06T22:09:44.000Z | 2021-03-14T14:41:03.000Z | matury/2021pr_operon/zad43.py | bartekpacia/informatyka-frycz | 6fdbbdea0c6b6a710378f22e90d467c9f91e64aa | [
"MIT"
] | 1 | 2020-03-25T15:42:47.000Z | 2020-10-06T21:41:14.000Z | matury/2021pr_operon/zad43.py | bartekpacia/informatyka-frycz | 6fdbbdea0c6b6a710378f22e90d467c9f91e64aa | [
"MIT"
] | null | null | null | from typing import List
with open("dane.txt", "r") as f:
liczby = [int(line) for line in f.readlines()]
def remove(k: int, nums_list: List[int]):
i = k - 1
while i < len(nums_list):
del nums_list[i]
i = i + (k - 1)
def gen_lucky_numbers(high: int) -> List[int]:
lucky_nums = list(ra... | 21.148936 | 52 | 0.586519 |
52bacc1c1dbdced546629cd966121877e98f144c | 141 | py | Python | kleat/__init__.py | zyxue/kleat3 | 861b02797937eea51e99f9c29d195fb3e7dea376 | [
"MIT"
] | null | null | null | kleat/__init__.py | zyxue/kleat3 | 861b02797937eea51e99f9c29d195fb3e7dea376 | [
"MIT"
] | null | null | null | kleat/__init__.py | zyxue/kleat3 | 861b02797937eea51e99f9c29d195fb3e7dea376 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for kleat3."""
__author__ = """Zhuyi Xue"""
__email__ = 'zxue@bcgsc.ca'
__version__ = '3.0.0'
| 17.625 | 35 | 0.609929 |
b3cc237cd091dbbf845559bae7f5c5d8c66223bb | 7,929 | py | Python | monailabel/datastore/utils/convert.py | IntroAI-termproject/MONAILabel | 6a0fcc797e24aff1a1582088bae71973b2b6582e | [
"Apache-2.0"
] | 214 | 2021-04-30T15:37:47.000Z | 2022-03-27T12:38:58.000Z | monailabel/datastore/utils/convert.py | IntroAI-termproject/MONAILabel | 6a0fcc797e24aff1a1582088bae71973b2b6582e | [
"Apache-2.0"
] | 325 | 2021-04-30T15:59:16.000Z | 2022-03-31T19:39:38.000Z | monailabel/datastore/utils/convert.py | IntroAI-termproject/MONAILabel | 6a0fcc797e24aff1a1582088bae71973b2b6582e | [
"Apache-2.0"
] | 50 | 2021-05-05T13:57:45.000Z | 2022-03-16T21:01:25.000Z | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 35.716216 | 116 | 0.646614 |
7d6f30f92534c4de5abfcb2d7a3709bff898a739 | 311 | py | Python | conanInstall.py | odant/test_versions_conan_packages | b0f91f31cf277f0854c8fd28ed3aa4ce1109ad15 | [
"MIT"
] | null | null | null | conanInstall.py | odant/test_versions_conan_packages | b0f91f31cf277f0854c8fd28ed3aa4ce1109ad15 | [
"MIT"
] | null | null | null | conanInstall.py | odant/test_versions_conan_packages | b0f91f31cf277f0854c8fd28ed3aa4ce1109ad15 | [
"MIT"
] | null | null | null | from pathlib import Path
from conanRunner import conanRunner
def conanInstall(conanfile, installFolder):
print("\n")
conanfile = str(conanfile)
installFolder = str(installFolder)
args = ["install", conanfile, "--install-folder", installFolder]
for s in conanRunner(args):
print(s)
| 25.916667 | 68 | 0.70418 |
8f1ba727572a6d53d9beb79c7e80939f8d8a4ac8 | 553 | py | Python | 2-Medium/numsSameConsecDiff.py | Sma-Das/Leetcode | 6f9b8f069e2ef198408abd6780fd0697a8bebada | [
"MIT"
] | null | null | null | 2-Medium/numsSameConsecDiff.py | Sma-Das/Leetcode | 6f9b8f069e2ef198408abd6780fd0697a8bebada | [
"MIT"
] | null | null | null | 2-Medium/numsSameConsecDiff.py | Sma-Das/Leetcode | 6f9b8f069e2ef198408abd6780fd0697a8bebada | [
"MIT"
] | null | null | null | from functools import cache
def numsSameConsecDiff(n, k):
@cache
def builder(curr, rem, delta, string=""):
if not 0 <= curr <= 9:
return ""
elif not rem:
return string
return builder(curr+delta, rem-1, delta, string + str(curr)) + builder(curr-delta, rem-1, -del... | 26.333333 | 125 | 0.562387 |
1fb266c18d648c6ac8f7016bc6b5948cf8a44bf3 | 20,274 | py | Python | intersight/models/storage_flex_util_virtual_drive.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/models/storage_flex_util_virtual_drive.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/models/storage_flex_util_virtual_drive.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-262
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class StorageFlexUtilVirtualDrive(object):
"""
NOTE... | 29.382609 | 403 | 0.623705 |
c732c12f87e3aa35753087b68822ce20532f469c | 6,838 | py | Python | sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_security_solutions_reference_data_operations.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | 1 | 2020-03-05T18:10:35.000Z | 2020-03-05T18:10:35.000Z | sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_security_solutions_reference_data_operations.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | 2 | 2020-03-03T23:11:13.000Z | 2020-03-30T18:50:55.000Z | sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_security_solutions_reference_data_operations.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.818182 | 184 | 0.686751 |
09bfb25c937cc010066059dc97724cf30acd4bc1 | 3,713 | py | Python | sdks/python/http_client/v1/polyaxon_sdk/models/v1_parallel_kind.py | jjasonkal/polyaxon | 8454b29b2b971b965de8a7bf63afdd48f07d6d53 | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_parallel_kind.py | jjasonkal/polyaxon | 8454b29b2b971b965de8a7bf63afdd48f07d6d53 | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_parallel_kind.py | jjasonkal/polyaxon | 8454b29b2b971b965de8a7bf63afdd48f07d6d53 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 28.343511 | 85 | 0.590897 |
12a353f670f36552a74937a8d7515f410d0e48af | 5,059 | py | Python | tests/bdd/features/volume/nexus-info/test_feature.py | Abhinandan-Purkait-Bolt/mayastor-control-plane | ae4b39b42cc54bf8520f0256568e5d8635eb4f39 | [
"Apache-2.0"
] | null | null | null | tests/bdd/features/volume/nexus-info/test_feature.py | Abhinandan-Purkait-Bolt/mayastor-control-plane | ae4b39b42cc54bf8520f0256568e5d8635eb4f39 | [
"Apache-2.0"
] | 1 | 2022-03-31T10:26:45.000Z | 2022-03-31T10:26:45.000Z | tests/bdd/features/volume/nexus-info/test_feature.py | Abhinandan-Purkait-Bolt/mayastor-control-plane | ae4b39b42cc54bf8520f0256568e5d8635eb4f39 | [
"Apache-2.0"
] | null | null | null | """Persistent Nexus Info feature tests."""
from pytest_bdd import (
given,
scenario,
then,
when,
)
import pytest
from common.deployer import Deployer
from common.apiclient import ApiClient
from common.etcd import Etcd
from openapi.model.create_pool_body import CreatePoolBody
from openapi.model.creat... | 29.934911 | 87 | 0.749951 |
1ee91f0e50d1aa820f8c45da5b0bff6499f63b25 | 12,937 | py | Python | software/build_tools/ramfs.py | mike42/65816-computer | 9250b6dedc4757e8548d8dd6defce34ca6e03a8f | [
"CC-BY-4.0"
] | null | null | null | software/build_tools/ramfs.py | mike42/65816-computer | 9250b6dedc4757e8548d8dd6defce34ca6e03a8f | [
"CC-BY-4.0"
] | null | null | null | software/build_tools/ramfs.py | mike42/65816-computer | 9250b6dedc4757e8548d8dd6defce34ca6e03a8f | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
"""
ramfs.py: Create ramfs images for 65816 computer.
"""
import argparse
import os.path
import sys
from dataclasses import dataclass
from struct import unpack_from, pack, unpack
from typing import Optional
@dataclass
class Inode:
SIZE_BYTES = 128
TYPE_FREE = 0
TYPE_FILE = 1
TYPE... | 38.61791 | 141 | 0.606168 |
6f40b78353ff5393194cfabced9ef9c0cf98a891 | 7,974 | py | Python | radian/lineedit/prompt.py | randy3k/ride | 8a052daebaa8f03a9fff95eb38d45a32ac43bed9 | [
"MIT"
] | 1,051 | 2018-12-20T19:35:43.000Z | 2022-03-31T19:44:35.000Z | radian/lineedit/prompt.py | randy3k/ride | 8a052daebaa8f03a9fff95eb38d45a32ac43bed9 | [
"MIT"
] | 255 | 2018-12-19T13:51:01.000Z | 2022-03-31T09:33:43.000Z | radian/lineedit/prompt.py | randy3k/ride | 8a052daebaa8f03a9fff95eb38d45a32ac43bed9 | [
"MIT"
] | 54 | 2019-03-13T02:25:31.000Z | 2022-03-15T16:21:50.000Z | from .buffer import ModalBuffer
from prompt_toolkit import PromptSession
from prompt_toolkit.application import Application
from prompt_toolkit.application.current import get_app
from prompt_toolkit.auto_suggest import DynamicAutoSuggest
from prompt_toolkit.completion import DynamicCompleter, ThreadedCompleter
from pr... | 33.64557 | 93 | 0.628668 |
271e21e6522fa655063b850d8ba69c633fbf8498 | 2,186 | py | Python | web/controller/nodata.py | Liuyanglong/monitor-portal | ce020f636e6179b3eb685660bd7e505ed41f2f9b | [
"Apache-2.0"
] | null | null | null | web/controller/nodata.py | Liuyanglong/monitor-portal | ce020f636e6179b3eb685660bd7e505ed41f2f9b | [
"Apache-2.0"
] | null | null | null | web/controller/nodata.py | Liuyanglong/monitor-portal | ce020f636e6179b3eb685660bd7e505ed41f2f9b | [
"Apache-2.0"
] | 1 | 2022-02-21T09:46:36.000Z | 2022-02-21T09:46:36.000Z | # -*- coding:utf-8 -*-
__author__ = 'niean'
from web import app
from flask import request, g, render_template, jsonify
from web.model.nodata import Nodata
from frame.params import required_chk
from frame.config import UIC_ADDRESS
@app.route('/nodatas')
def nodatas_get():
g.menu = 'nodatas'
page = int(request.... | 26.658537 | 86 | 0.574565 |
ff91c7953c1fb73e4c389ccfb60a00ee94dde957 | 7,780 | py | Python | bip_utils/conf/bip49_coin_conf.py | spletnik/bip_utils | d0fa0290e31a8a69fd5644ceb09e096deb515dfd | [
"MIT"
] | null | null | null | bip_utils/conf/bip49_coin_conf.py | spletnik/bip_utils | d0fa0290e31a8a69fd5644ceb09e096deb515dfd | [
"MIT"
] | null | null | null | bip_utils/conf/bip49_coin_conf.py | spletnik/bip_utils | d0fa0290e31a8a69fd5644ceb09e096deb515dfd | [
"MIT"
] | null | null | null | # Copyright (c) 2021 Emanuele Bellocchia
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish,... | 41.382979 | 113 | 0.769152 |
bbb1ee1ab1087417f6d5fef069c817ebdd114162 | 302 | py | Python | main.py | Trimatix-indie/SuperDeckBreaker | 6c5f0a6593df5e7f6807b1e2b09aff65dcf8a6fc | [
"MIT"
] | 5 | 2020-12-04T19:52:16.000Z | 2021-03-19T19:56:05.000Z | main.py | KroeteTroete/GOF2BountyBot-1 | f7f276a1b0a8fa376fab3d48e0a1f3989e15c80d | [
"MIT"
] | 783 | 2021-01-22T20:54:48.000Z | 2022-03-29T08:22:49.000Z | main.py | Trimatix-indie/SuperDeckBreaker | 6c5f0a6593df5e7f6807b1e2b09aff65dcf8a6fc | [
"MIT"
] | 5 | 2020-12-05T13:47:08.000Z | 2022-01-20T22:13:20.000Z | import sys
from bot.cfg import configurator
# Load config if one is given
if len(sys.argv) > 1:
configurator.loadCfg(sys.argv[1])
# initialize bot config
configurator.init()
# load and run bot
from bot import bot
status = bot.run()
# return exit status code for bot restarting
sys.exit(status)
| 17.764706 | 44 | 0.741722 |
024ce74ffbb9202e0e661931d0a1f9e2828f0bee | 3,869 | py | Python | narada/__init__.py | rahul-verma/narada | 7a96c96bd46c29329dc8493cbd5aa2b68e03ce7c | [
"Apache-2.0"
] | null | null | null | narada/__init__.py | rahul-verma/narada | 7a96c96bd46c29329dc8493cbd5aa2b68e03ce7c | [
"Apache-2.0"
] | null | null | null | narada/__init__.py | rahul-verma/narada | 7a96c96bd46c29329dc8493cbd5aa2b68e03ce7c | [
"Apache-2.0"
] | 1 | 2020-09-05T10:00:32.000Z | 2020-09-05T10:00:32.000Z | import time
import os
from flask import Flask, request, Response
from flask_restful import Api, Resource
from waitress import serve
from uuid import uuid4
MY_DIR = os.path.dirname(os.path.realpath(__file__))
RES_DIR = os.path.join(MY_DIR, "res")
items = []
ditems = dict()
class Item(Resource):
def __get_item_if_e... | 28.448529 | 117 | 0.640993 |
154b141f4e0130b235747baa87315c2715f21d9a | 1,410 | py | Python | demo/utils.py | JZZ-NOTE/ERNIE | ff89c2a6baef9fd662a5b847224ca39e67d6ad11 | [
"Apache-2.0"
] | 3,712 | 2019-07-19T08:40:57.000Z | 2022-03-31T08:52:43.000Z | demo/utils.py | JZZ-NOTE/ERNIE | ff89c2a6baef9fd662a5b847224ca39e67d6ad11 | [
"Apache-2.0"
] | 541 | 2019-07-21T08:57:11.000Z | 2022-03-22T12:13:28.000Z | demo/utils.py | JZZ-NOTE/ERNIE | ff89c2a6baef9fd662a5b847224ca39e67d6ad11 | [
"Apache-2.0"
] | 857 | 2019-07-19T08:40:52.000Z | 2022-03-30T03:23:27.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 31.333333 | 105 | 0.739007 |
e787cfd832538ba181c4390750f200e5944a5cc7 | 4,141 | py | Python | escalate/rest_api/tests/model_tests/workflow/outcome.py | darkreactions/ESCALATE | 0020da00b81a2dd80d1c9fd72d2edf92b519e605 | [
"MIT"
] | 11 | 2020-09-29T13:59:02.000Z | 2022-03-23T04:57:52.000Z | escalate/rest_api/tests/model_tests/workflow/outcome.py | darkreactions/ESCALATE | 0020da00b81a2dd80d1c9fd72d2edf92b519e605 | [
"MIT"
] | 95 | 2019-11-18T20:10:49.000Z | 2022-03-31T17:09:49.000Z | escalate/rest_api/tests/model_tests/workflow/outcome.py | darkreactions/ESCALATE | 0020da00b81a2dd80d1c9fd72d2edf92b519e605 | [
"MIT"
] | 2 | 2021-11-26T18:22:08.000Z | 2022-03-31T11:57:10.000Z | from ..model_tests_utils import (
status_codes,
DELETE,
PUT,
POST,
GET,
ERROR,
random_model_dict,
check_status_code,
compare_data
)
from core.models import (
OutcomeTemplate,
ExperimentTemplate,
)
outcome_test_data = {}
outcome_tests = [
##----TEST 0----##
#creates an expe... | 27.791946 | 105 | 0.416808 |
c0100b2ab299aa11e70c5121481281f676b87f85 | 3,753 | py | Python | kps2d_detection/test.py | abrichr/cvToolkit | 7f559138c27fedf9e3e3929cd4d6e4f8198d4c51 | [
"MIT"
] | null | null | null | kps2d_detection/test.py | abrichr/cvToolkit | 7f559138c27fedf9e3e3929cd4d6e4f8198d4c51 | [
"MIT"
] | null | null | null | kps2d_detection/test.py | abrichr/cvToolkit | 7f559138c27fedf9e3e3929cd4d6e4f8198d4c51 | [
"MIT"
] | null | null | null | import os
import cv2
from tqdm import tqdm
from pose_utils import draw_img17, resize_img, draw_img18, convert18
from argparse import ArgumentParser
import numpy as np
MAXTORSO = 0
def action_recgnition(kps, thred=0.1):
global MAXTORSO
average_score = kps[:,2].sum() / 17
assert average_score > thred, 'averag... | 32.634783 | 123 | 0.617373 |
4759192cad01dd49c5e7d84c97428627bc1bb5b4 | 963 | py | Python | aa_comp.py | victoria-rees/learning_python | 0ddb2044632b12b093d45dcc257458edf49d3d4f | [
"MIT"
] | null | null | null | aa_comp.py | victoria-rees/learning_python | 0ddb2044632b12b093d45dcc257458edf49d3d4f | [
"MIT"
] | null | null | null | aa_comp.py | victoria-rees/learning_python | 0ddb2044632b12b093d45dcc257458edf49d3d4f | [
"MIT"
] | null | null | null | # Make a program that reports the amino acid composition in a file of proteins
import mcb185
import sys
count = {}
total = 0
for name, seq in mcb185.read_fasta(sys.argv[1]):
for aa in (seq):
if aa == '*': continue
if aa in count: count[aa] += 1
else: count[aa] = 1
total += 1
for aa in count:
print(aa, count... | 17.509091 | 78 | 0.757009 |
16339cc7f9c1e6097705a3a275be673a60253423 | 2,528 | py | Python | examples/low_order_moms_dense_batch.py | agorshk/daal4py | 58a9b2301c47cd2d5144a403a59c210e10b75f8f | [
"Apache-2.0"
] | null | null | null | examples/low_order_moms_dense_batch.py | agorshk/daal4py | 58a9b2301c47cd2d5144a403a59c210e10b75f8f | [
"Apache-2.0"
] | null | null | null | examples/low_order_moms_dense_batch.py | agorshk/daal4py | 58a9b2301c47cd2d5144a403a59c210e10b75f8f | [
"Apache-2.0"
] | null | null | null | #*******************************************************************************
# Copyright 2014-2020 Intel Corporation
# All Rights Reserved.
#
# This software is licensed under the Apache License, Version 2.0 (the
# "License"), the following terms apply:
#
# You may not use this file except in compliance with... | 38.892308 | 109 | 0.640823 |
0ce1ea3469be9f6ffdf563b8f67fa374158ffb04 | 1,110 | py | Python | app/api/model/vote.py | ChegeBryan/politico | 746ef4c76931928ef145593092c8b391421a50fd | [
"MIT"
] | 1 | 2021-09-08T13:17:03.000Z | 2021-09-08T13:17:03.000Z | app/api/model/vote.py | ChegeBryan/politico | 746ef4c76931928ef145593092c8b391421a50fd | [
"MIT"
] | 62 | 2019-02-04T07:08:32.000Z | 2021-05-06T19:49:03.000Z | app/api/model/vote.py | ChegeBryan/politico | 746ef4c76931928ef145593092c8b391421a50fd | [
"MIT"
] | 5 | 2019-02-11T18:21:14.000Z | 2022-02-25T07:41:07.000Z | """ Vote database model and methods """
import datetime as dt
class Vote:
""" Vote class for and methods for database manipulation """
def __init__(self, office, candidate):
self.office = office
self.candidate = candidate
self.created_on = dt.datetime.now()
def add_vote(self, us... | 27.75 | 77 | 0.595495 |
bc1e2ddde81d9c3cafd73d62e6785b87568c7ff4 | 4,971 | py | Python | docs/conf.py | pacilab/Longbow | efd5eaaf35a812415d15760cde07f3ca274d6a96 | [
"BSD-3-Clause"
] | 17 | 2017-02-07T09:48:23.000Z | 2021-12-23T17:56:47.000Z | docs/conf.py | pacilab/Longbow | efd5eaaf35a812415d15760cde07f3ca274d6a96 | [
"BSD-3-Clause"
] | 130 | 2016-09-30T09:12:31.000Z | 2019-08-09T13:37:02.000Z | docs/conf.py | jimboid/Longbow | 626dba54180078360b2f3ffd2c7290688d78f4be | [
"BSD-3-Clause"
] | 5 | 2018-04-17T07:52:13.000Z | 2021-05-28T18:05:30.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.875776 | 82 | 0.659022 |
db6fd4b718109771b009351fa3f6bd6fe4671d28 | 4,096 | py | Python | test/aaa_profiling/test_misc.py | Dreamsorcerer/sqlalchemy | 153671df9d4cd7f2cdb3e14e6221f529269885d9 | [
"MIT"
] | 1 | 2020-12-09T21:56:16.000Z | 2020-12-09T21:56:16.000Z | test/aaa_profiling/test_misc.py | Dreamsorcerer/sqlalchemy | 153671df9d4cd7f2cdb3e14e6221f529269885d9 | [
"MIT"
] | 1 | 2021-01-25T09:53:34.000Z | 2021-01-25T09:53:35.000Z | test/aaa_profiling/test_misc.py | Dreamsorcerer/sqlalchemy | 153671df9d4cd7f2cdb3e14e6221f529269885d9 | [
"MIT"
] | 2 | 2021-01-10T10:49:52.000Z | 2021-01-13T09:34:27.000Z | from sqlalchemy import Column
from sqlalchemy import Enum
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import select
from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy import testing
from sqlalchemy.orm import join as ormjoin
fr... | 31.507692 | 77 | 0.601807 |
c1d0441d107e61b91a9b02a73008f9f393e15db8 | 21,570 | py | Python | envs/robosuite/robosuite/environments/manipulation/two_arm_peg_in_hole.py | hzm2016/assistive-gym-robosuite | 5c529f4444cc386383618bfa584341740a8468f9 | [
"MIT"
] | 1 | 2021-11-22T07:45:28.000Z | 2021-11-22T07:45:28.000Z | envs/robosuite/robosuite/environments/manipulation/two_arm_peg_in_hole.py | hzm2016/assistive-gym-robosuite | 5c529f4444cc386383618bfa584341740a8468f9 | [
"MIT"
] | null | null | null | envs/robosuite/robosuite/environments/manipulation/two_arm_peg_in_hole.py | hzm2016/assistive-gym-robosuite | 5c529f4444cc386383618bfa584341740a8468f9 | [
"MIT"
] | null | null | null | import numpy as np
from envs.robosuite.robosuite.utils import transform_utils as T
from envs.robosuite.robosuite.environments.manipulation.two_arm_env import TwoArmEnv
from envs.robosuite.robosuite.utils.mjcf_utils import CustomMaterial, array_to_string, find_elements
from envs.robosuite.robosuite.utils.observables im... | 43.053892 | 119 | 0.632267 |
287d99c740ffac16d24b46065afb2245cff530c2 | 8,180 | py | Python | sdk/identity/azure-identity/azure/identity/_credentials/default.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/identity/azure-identity/azure/identity/_credentials/default.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/identity/azure-identity/azure/identity/_credentials/default.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 1 | 2019-04-05T18:17:43.000Z | 2019-04-05T18:17:43.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import logging
import os
from .._constants import EnvironmentVariables
from .._internal import get_default_authority, normalize_authority
from .browser import Interacti... | 56.413793 | 120 | 0.741076 |
4138a57a394acc6f2b8252e25fb26b89e5f6ed92 | 855 | py | Python | setup.py | piger/wikiquote2fortune | 7ba2b5d076cbeb6c01dd6df8b5bd0936f130bb42 | [
"BSD-3-Clause"
] | 1 | 2020-07-07T09:53:13.000Z | 2020-07-07T09:53:13.000Z | setup.py | piger/wikiquote2fortune | 7ba2b5d076cbeb6c01dd6df8b5bd0936f130bb42 | [
"BSD-3-Clause"
] | null | null | null | setup.py | piger/wikiquote2fortune | 7ba2b5d076cbeb6c01dd6df8b5bd0936f130bb42 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
wikiquote2fortune
-----------------
wikiquote2fortune is a little script that can fetch a wikiquote page and extract
quotes to create a fortune(6) file.
"""
from setuptools import setup, find_packages
setup(
name='wikiquote2fortune',
version='0.2.0',
description="Create a for... | 23.75 | 80 | 0.626901 |
293f95cf75c69f485a369ae7b6d3c3d5647644ae | 7,379 | py | Python | tutorials/micro/micro_tflite.py | maxtnuk/incubator-tvm | 050a836b18c419213f34b8ac76afced425d9d70e | [
"Apache-2.0"
] | 2 | 2019-11-13T01:17:41.000Z | 2020-05-15T19:06:52.000Z | tutorials/micro/micro_tflite.py | maxtnuk/incubator-tvm | 050a836b18c419213f34b8ac76afced425d9d70e | [
"Apache-2.0"
] | null | null | null | tutorials/micro/micro_tflite.py | maxtnuk/incubator-tvm | 050a836b18c419213f34b8ac76afced425d9d70e | [
"Apache-2.0"
] | 2 | 2020-11-26T00:35:02.000Z | 2020-12-07T03:15:56.000Z | # 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 u... | 34.32093 | 112 | 0.693454 |
604591ca21cc6a047b625fedd8a51de2a90c6bc1 | 19,849 | py | Python | lib/matplotlib/tests/test_collections.py | gatagat/matplotlib | b8ea343d33da614d199e80e6df047bca9b2f08a1 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2019-04-15T09:40:53.000Z | 2019-04-15T09:40:53.000Z | lib/matplotlib/tests/test_collections.py | gatagat/matplotlib | b8ea343d33da614d199e80e6df047bca9b2f08a1 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/tests/test_collections.py | gatagat/matplotlib | b8ea343d33da614d199e80e6df047bca9b2f08a1 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | """
Tests specific to the collections module.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import io
from nose.tools import assert_equal
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
import ma... | 32.917081 | 79 | 0.644113 |
47fe98c2e9e934cf82a7e20835eea8e2bd9bb065 | 1,723 | py | Python | configs/_base_/models/retinanet_r50_fpn.py | evgps/mmdetection_trashcan | aaf4237c2c0d473425cdc7b741d3009177b79751 | [
"Apache-2.0"
] | 367 | 2022-01-14T03:32:25.000Z | 2022-03-31T04:48:20.000Z | configs/_base_/models/retinanet_r50_fpn.py | evgps/mmdetection_trashcan | aaf4237c2c0d473425cdc7b741d3009177b79751 | [
"Apache-2.0"
] | 170 | 2020-09-08T12:29:06.000Z | 2022-03-31T18:28:09.000Z | configs/_base_/models/retinanet_r50_fpn.py | evgps/mmdetection_trashcan | aaf4237c2c0d473425cdc7b741d3009177b79751 | [
"Apache-2.0"
] | 61 | 2021-07-30T07:51:41.000Z | 2022-03-30T14:40:02.000Z | # model settings
model = dict(
type='RetinaNet',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
... | 28.245902 | 56 | 0.525247 |
3497b3c1c96b5f1aa6c11c252dea98cce0f32d74 | 5,836 | py | Python | plugins/openstack/pyparts/agent_exceptions.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | 12 | 2020-06-02T14:22:40.000Z | 2021-04-07T15:58:09.000Z | plugins/openstack/pyparts/agent_exceptions.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | 72 | 2020-06-09T00:35:19.000Z | 2021-09-29T11:00:41.000Z | plugins/openstack/pyparts/agent_exceptions.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | 43 | 2020-06-05T15:09:37.000Z | 2021-09-25T12:28:28.000Z | import os
import re
from core import constants
from core.searchtools import SearchDef
from core.plugins.openstack import (
OpenstackEventChecksBase,
AGENT_ERROR_KEY_BY_TIME,
)
from core.searchtools import FileSearcher
YAML_PRIORITY = 7
class AgentExceptionChecks(OpenstackEventChecksBase):
def __init__(... | 39.432432 | 78 | 0.546607 |
f31c87e666a7efcc14ebd7d1895c70c28831e19c | 1,210 | py | Python | example_3.py | z86961027/pycatia | 5dd9b7eb5d21f2261198d6a2af489abafb2f5f32 | [
"MIT"
] | null | null | null | example_3.py | z86961027/pycatia | 5dd9b7eb5d21f2261198d6a2af489abafb2f5f32 | [
"MIT"
] | null | null | null | example_3.py | z86961027/pycatia | 5dd9b7eb5d21f2261198d6a2af489abafb2f5f32 | [
"MIT"
] | null | null | null | #! /usr/bin/python3.6
"""
Example 3:
Find all points in the CATPart and print to console -> and export to csv.
"""
import csv
from pycatia import CATIAApplication
from pycatia import CATIAMeasurable
from pycatia import create_measurable
from pycatia import create_spa_workbench
catia = CATIAApplication()
... | 26.304348 | 77 | 0.733884 |
82854899d2370738e644db4c11407e44676546de | 3,118 | py | Python | data/p2DJ/New/program/qiskit/class/startQiskit_Class158.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/qiskit/class/startQiskit_Class158.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/qiskit/class/startQiskit_Class158.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=2
# total number=11
import cirq
import qiskit
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy a... | 28.09009 | 80 | 0.618345 |
57a0e15c4d3fd56a25836efeaae7fd39ea617ef6 | 13,693 | py | Python | code/venv/lib/python3.6/site-packages/sqlparse/lexer.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | null | null | null | code/venv/lib/python3.6/site-packages/sqlparse/lexer.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | 10 | 2020-06-05T19:42:26.000Z | 2022-03-11T23:38:35.000Z | code/venv/lib/python3.6/site-packages/sqlparse/lexer.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com
#
# This module is part of python-sqlparse and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php.
"""SQL Lexer"""
# This code is based on the SqlLexer in pygments.
# http://pygments.org/
# It's s... | 37.930748 | 125 | 0.482071 |
9913923cb7807d6ac8130a8c6e2f18e59d2e8a0f | 11,762 | py | Python | pandas/core/dtypes/missing.py | cclauss/pandas | 692b5eeeff9b8e8c750f3e64db0c39dc149a73e8 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | 1 | 2021-05-10T10:02:04.000Z | 2021-05-10T10:02:04.000Z | pandas/core/dtypes/missing.py | cclauss/pandas | 692b5eeeff9b8e8c750f3e64db0c39dc149a73e8 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/core/dtypes/missing.py | cclauss/pandas | 692b5eeeff9b8e8c750f3e64db0c39dc149a73e8 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | """
missing types & inference
"""
import numpy as np
from pandas._libs import lib
from pandas._libs.tslib import NaT, iNaT
from .generic import (ABCMultiIndex, ABCSeries,
ABCIndexClass, ABCGeneric)
from .common import (is_string_dtype, is_datetimelike,
is_datetimelike_v_numeri... | 29.113861 | 79 | 0.616052 |
f8bf6d3b5d5a71532178fcda5c0fe8d1c4ea3956 | 1,863 | py | Python | puzzleSequenceLogic.py | yanamal/html-hax-clean | 03aefcef767cf982075598af7332b2aa4ef363a7 | [
"MIT"
] | null | null | null | puzzleSequenceLogic.py | yanamal/html-hax-clean | 03aefcef767cf982075598af7332b2aa4ef363a7 | [
"MIT"
] | null | null | null | puzzleSequenceLogic.py | yanamal/html-hax-clean | 03aefcef767cf982075598af7332b2aa4ef363a7 | [
"MIT"
] | null | null | null | import json, logging
from google.appengine.api import users
from flask import Flask
from user import UserProfile
app = Flask(__name__)
# given the name of a puzzle the user has just completed,
# generate a completion message for the user (as a short HTML snippet).
# The message includes a link to the next puzzle the... | 43.325581 | 143 | 0.690284 |
8edb2826354210c52545291b0af389d6dc66fa0b | 55 | py | Python | mechmat/properties/thermal/__init__.py | mecheng/mechmat | 2c3bc43dce85d4827450a8ad69311ca49bb0d035 | [
"MIT"
] | 1 | 2019-05-13T09:19:13.000Z | 2019-05-13T09:19:13.000Z | mechmat/properties/thermal/__init__.py | mecheng/mechmat | 2c3bc43dce85d4827450a8ad69311ca49bb0d035 | [
"MIT"
] | 25 | 2019-05-24T18:59:38.000Z | 2021-06-01T23:44:25.000Z | mechmat/properties/thermal/__init__.py | jellespijker/mechmat | 2c3bc43dce85d4827450a8ad69311ca49bb0d035 | [
"MIT"
] | 1 | 2020-09-06T12:38:08.000Z | 2020-09-06T12:38:08.000Z | from mechmat.properties.thermal.thermal import Thermal
| 27.5 | 54 | 0.872727 |
9605e1919ab5c1b5ff33b3e313ed150f5a117178 | 2,574 | py | Python | scripts/changelog.py | FrNecas/deployment | 59a95f2b6b94014b5f4a17a2af47f92c8c79d5f7 | [
"MIT"
] | null | null | null | scripts/changelog.py | FrNecas/deployment | 59a95f2b6b94014b5f4a17a2af47f92c8c79d5f7 | [
"MIT"
] | null | null | null | scripts/changelog.py | FrNecas/deployment | 59a95f2b6b94014b5f4a17a2af47f92c8c79d5f7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
import re
from typing import List, Optional
import click
from git import Commit, Repo
NOT_IMPORTANT_VALUES = ["n/a", "none", "none.", ""]
RELEASE_NOTES_TAG = "RELEASE NOTES"
RELEASE_NOTES_RE = f"{RELEASE_NOTES_TAG}... | 29.930233 | 74 | 0.67094 |
a062f7d901df1c14266fcdfa4f15e8371916cab1 | 4,490 | py | Python | parl_practice/PyGame/Snake/DQN/train.py | fluffyrita/ReinforcementLearning | 8ec3394dd884b7ba742856129b7923d77e38573a | [
"MIT"
] | 1 | 2021-08-20T03:38:28.000Z | 2021-08-20T03:38:28.000Z | parl_practice/PyGame/Snake/DQN/train.py | fluffyrita/ReinforcementLearning | 8ec3394dd884b7ba742856129b7923d77e38573a | [
"MIT"
] | 1 | 2021-03-11T16:31:35.000Z | 2021-03-11T16:31:35.000Z | parl_practice/PyGame/Snake/DQN/train.py | fluffyrita/ReinforcementLearning | 8ec3394dd884b7ba742856129b7923d77e38573a | [
"MIT"
] | 1 | 2021-03-11T14:01:43.000Z | 2021-03-11T14:01:43.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 31.843972 | 118 | 0.653229 |
99176030bd394092342caa48aa766d4fb840cd2d | 951 | py | Python | keyboard-termux.py | fossabot/currency-converter | 5b82106758dcc3c3184524e84b1cf449fb0a6d86 | [
"MIT"
] | 1 | 2020-04-19T11:25:06.000Z | 2020-04-19T11:25:06.000Z | keyboard-termux.py | fossabot/currency-converter | 5b82106758dcc3c3184524e84b1cf449fb0a6d86 | [
"MIT"
] | 1 | 2020-04-19T04:39:11.000Z | 2020-04-19T04:39:11.000Z | keyboard-termux.py | fossabot/currency-converter | 5b82106758dcc3c3184524e84b1cf449fb0a6d86 | [
"MIT"
] | 5 | 2020-02-21T08:36:44.000Z | 2020-04-19T04:35:56.000Z | import os
from time import sleep
a ='\033[92m'
b ='\033[91m'
c ='\033[0m'
os.system('clear')
print(a+'\t Advanced Shortcut Termux ')
print(b+'\t Dimas Lanjaka')
print('\t https://www.webmanajemen.com')
print('\t Facebook : https://fb.me/dimaslanjaka1')
print('\t https://github.com/dimaslanjaka')
print(a+'+'*40)
print... | 25.026316 | 126 | 0.633018 |
178d054d8accffbaf02aa4d05de42ef23aba7fd0 | 2,484 | py | Python | wrapper.py | sevmardi/LunarLander | 154902829da0d559c0720b94fd38c09d9d0713b5 | [
"MIT"
] | null | null | null | wrapper.py | sevmardi/LunarLander | 154902829da0d559c0720b94fd38c09d9d0713b5 | [
"MIT"
] | null | null | null | wrapper.py | sevmardi/LunarLander | 154902829da0d559c0720b94fd38c09d9d0713b5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Environment wrapper class for Reinforcement Learning PA - Spring 2018
Details:
File name: wrapper.py
Author: Anna Latour
Date created: 19 March 2018
Date last modified: 19 March 2018
Python Version: 3.4
Description:
Implementation of a... | 28.551724 | 128 | 0.648953 |
a9053e8a421437e81c3825d5444c790d86395035 | 488 | py | Python | processing_scripts/icon_generator/to_icons.py | CorentG/Pokecube-Issues-and-Wiki | 690af5d8499561f65f761fd49fbf5fc2bc85c4c3 | [
"MIT"
] | 24 | 2019-02-02T20:37:53.000Z | 2022-02-09T13:51:41.000Z | processing_scripts/icon_generator/to_icons.py | CorentG/Pokecube-Issues-and-Wiki | 690af5d8499561f65f761fd49fbf5fc2bc85c4c3 | [
"MIT"
] | 671 | 2018-08-20T08:46:35.000Z | 2022-03-26T00:11:43.000Z | processing_scripts/icon_generator/to_icons.py | CorentG/Pokecube-Issues-and-Wiki | 690af5d8499561f65f761fd49fbf5fc2bc85c4c3 | [
"MIT"
] | 68 | 2018-09-25T21:03:40.000Z | 2022-02-25T19:59:51.000Z | from PIL import Image
import PIL
import os
from glob import glob
imgs = [y for x in os.walk(".") for y in glob(os.path.join(x[0], '*.png'))]
size = 32, 32
lastdir = None
for file in imgs:
img = Image.open(file)
img = img.resize(size,resample=PIL.Image.HAMMING)
file = file.replace('img', 'icon', 1)
dir... | 21.217391 | 75 | 0.604508 |
9803bb9cc17e555df28cbe75b2393cf01e5c0bdf | 2,264 | py | Python | distanceFinder.py | Deoy12/Fun_Projects | 46355da4f4d98a3bfe7bc423291ea862c6f0e48f | [
"MIT"
] | null | null | null | distanceFinder.py | Deoy12/Fun_Projects | 46355da4f4d98a3bfe7bc423291ea862c6f0e48f | [
"MIT"
] | null | null | null | distanceFinder.py | Deoy12/Fun_Projects | 46355da4f4d98a3bfe7bc423291ea862c6f0e48f | [
"MIT"
] | null | null | null | import requests
import json
from bs4 import BeautifulSoup
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
headers = {
'user-agent': user_agent,
}
source = requests.get('https://www.zillow.com/berkeley-ca/apartments/', he... | 45.28 | 195 | 0.599382 |
b6c7946862178bf722ff6dd24b0703f8449118f6 | 2,037 | py | Python | data_raw/wikidata/wd_ciic_edit.py | FellowsFreiesWissen/- | 3e74e6531985b0e9ba2e34bf1f6a1224cc7b52f3 | [
"MIT"
] | 1 | 2021-02-08T20:33:41.000Z | 2021-02-08T20:33:41.000Z | data_raw/wikidata/wd_ciic_edit.py | FellowsFreiesWissen/- | 3e74e6531985b0e9ba2e34bf1f6a1224cc7b52f3 | [
"MIT"
] | null | null | null | data_raw/wikidata/wd_ciic_edit.py | FellowsFreiesWissen/- | 3e74e6531985b0e9ba2e34bf1f6a1224cc7b52f3 | [
"MIT"
] | 1 | 2021-01-01T17:23:40.000Z | 2021-01-01T17:23:40.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = "Florian Thiery"
__copyright__ = "MIT Licence 2021, Florian Thiery"
__credits__ = ["Florian Thiery"]
__license__ = "MIT"
__version__ = "1.0"
__maintainer__ = "Florian Thiery"
__email__ = "mail@fthiery.de"
__status__ = "1.0"
__update__ = "2021-05-01"
# import depe... | 28.690141 | 125 | 0.568483 |
f0cad5002c777e0ad4d70047ba761b65b8028046 | 325 | py | Python | Python/namecheck.py | BirendraRokaha/Learn2020 | 5da92b1947a266f009f9cd371dd6a03610b95c9b | [
"MIT"
] | null | null | null | Python/namecheck.py | BirendraRokaha/Learn2020 | 5da92b1947a266f009f9cd371dd6a03610b95c9b | [
"MIT"
] | 11 | 2021-04-08T19:55:39.000Z | 2022-03-02T09:51:03.000Z | Python/namecheck.py | BirendraRokaha/Learn2020 | 5da92b1947a266f009f9cd371dd6a03610b95c9b | [
"MIT"
] | null | null | null | # check if the gien name is in the list
name_list = ['Ram','Hari','Sita', 'Gita', 'Rita']
a = [i.lower() for i in name_list]
print(a)
b = input("Enter the name to check: ")
c = b.lower()
if c in a:
print(f"Success, the name {c} exists in the list.")
else:
print(f"Sorry, the name {c} doesnot exist on the lis... | 21.666667 | 60 | 0.624615 |
1edd8bfc43da05339c38a2950ab114530e8280c9 | 8,216 | py | Python | modules/model/db_connection.py | fmawelle/ediViewer | f96269303440595bf6de91852c2ffe4483aa3dcb | [
"MIT"
] | null | null | null | modules/model/db_connection.py | fmawelle/ediViewer | f96269303440595bf6de91852c2ffe4483aa3dcb | [
"MIT"
] | null | null | null | modules/model/db_connection.py | fmawelle/ediViewer | f96269303440595bf6de91852c2ffe4483aa3dcb | [
"MIT"
] | null | null | null | import os
import sqlite3
from sqlite3 import Error
from modules.utility import Utility
class Connection:
conn = None
def create_connection(self):
database_absolute_path = ''
connection_successful = False
conn = None
databases_dir = os.path.join(os.getcwd(), 'databases')
... | 41.705584 | 120 | 0.568038 |
5d08daf6fd9baa7577f3307e27a45051ed35317e | 774 | py | Python | 02_collatz.py | tommirrington/52167-Programming-and-Scripting | b1c6d7d4c641abe67ccee4051f969c975dea3555 | [
"Apache-2.0"
] | null | null | null | 02_collatz.py | tommirrington/52167-Programming-and-Scripting | b1c6d7d4c641abe67ccee4051f969c975dea3555 | [
"Apache-2.0"
] | null | null | null | 02_collatz.py | tommirrington/52167-Programming-and-Scripting | b1c6d7d4c641abe67ccee4051f969c975dea3555 | [
"Apache-2.0"
] | null | null | null | # Tom Mirrington 2018-02-12
# Ecercise 2 submission
#prompt user for an integer
n = int(input("Please enter a positive integer: "))
#satisfy the condition that n is a positive integer
#determine if the value is an even number, if even then divide by 2
#if the value is not an even number or 1 then it must be odd ther... | 27.642857 | 105 | 0.669251 |
f031ea1a505bff35c6c383cc610f1f60dfb63f84 | 8,668 | py | Python | src/oci/opsi/models/update_operations_insights_warehouse_user_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/opsi/models/update_operations_insights_warehouse_user_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/opsi/models/update_operations_insights_warehouse_user_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 37.686957 | 245 | 0.696931 |
a747db14e2471e19c7374237ecb0c7d0d314391e | 767 | py | Python | python/ql/test/experimental/dataflow/fieldflow/test.py | saumyaagrawal2001/codeql | ec9ef968b7ad54b40a8976776653cac3c4d1e0b5 | [
"MIT"
] | 2 | 2021-06-13T07:04:31.000Z | 2021-06-13T07:04:34.000Z | python/ql/test/experimental/dataflow/fieldflow/test.py | minato371000/codeql | 339c0721c5e1ac25bea75dd4168616ec488c4238 | [
"MIT"
] | null | null | null | python/ql/test/experimental/dataflow/fieldflow/test.py | minato371000/codeql | 339c0721c5e1ac25bea75dd4168616ec488c4238 | [
"MIT"
] | null | null | null | from python.ql.test.experimental.dataflow.testDefinitions import *
# Preamble
class MyObj(object):
def __init__(self, foo):
self.foo = foo
class NestedObj(object):
def __init__(self):
self.obj = MyObj("OK")
def getObj(self):
return self.obj
def setFoo(obj, x):
SINK_F(ob... | 13.45614 | 66 | 0.614081 |
de6a8f5195db87b7b19984cb908685e9749e3743 | 3,100 | py | Python | data/p2DJ/New/R2/benchmark/startQiskit_QC48.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startQiskit_QC48.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startQiskit_QC48.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=2
# total number=10
import cirq
import qiskit
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy a... | 28.181818 | 82 | 0.624516 |
82f9b77686b2bdd65f64f9b076ac595d7b250d43 | 3,183 | py | Python | Python/selenium webscrapping/country_check.py | SitramSoft/programming_practice | 5c4131582634b5dc5a586be891bf645ab7dc5f9a | [
"MIT"
] | null | null | null | Python/selenium webscrapping/country_check.py | SitramSoft/programming_practice | 5c4131582634b5dc5a586be891bf645ab7dc5f9a | [
"MIT"
] | null | null | null | Python/selenium webscrapping/country_check.py | SitramSoft/programming_practice | 5c4131582634b5dc5a586be891bf645ab7dc5f9a | [
"MIT"
] | null | null | null | # Check if USA is member of WHO website
# - go to https://www.who.int/
# - click on "Countries"
# - click on "All Countries"
# - Filter by region: type 'americas' and click on 'Region of Americas'
# - Assert if 'United States of America' is on the page
# Prerequisites:
# Installing Selenium libraries - https://www.... | 39.7875 | 152 | 0.775055 |
ce380dc9ea814c3484731d61037d8fa7818e0693 | 22,484 | py | Python | airflow/contrib/utils/gcp_field_validator.py | Ryan-Miao/airflow | a2aca8714fac014ed7da97229d7877f1bc6e5a59 | [
"Apache-2.0"
] | 3 | 2019-03-28T05:59:39.000Z | 2019-10-03T22:05:25.000Z | airflow/contrib/utils/gcp_field_validator.py | Ryan-Miao/airflow | a2aca8714fac014ed7da97229d7877f1bc6e5a59 | [
"Apache-2.0"
] | 7 | 2019-03-27T07:58:14.000Z | 2020-02-12T17:42:33.000Z | airflow/contrib/utils/gcp_field_validator.py | Ryan-Miao/airflow | a2aca8714fac014ed7da97229d7877f1bc6e5a59 | [
"Apache-2.0"
] | 2 | 2018-11-01T22:36:10.000Z | 2019-11-23T13:36:53.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 51.926097 | 105 | 0.665762 |
ade262ad607ce248e470ac45933df37b204f11f2 | 5,382 | py | Python | tests/generator/test_rom.py | venustar1228/cactus-blockchain | a2fec724eb19489898ffa306d4203de11edb94b0 | [
"Apache-2.0"
] | 20 | 2021-07-16T18:08:13.000Z | 2022-03-20T02:38:39.000Z | tests/generator/test_rom.py | Cactus-Network/cactus-blockchain | 9eef13171dff764bd0549de1479d775272e16bcc | [
"Apache-2.0"
] | 29 | 2021-07-17T00:38:18.000Z | 2022-03-29T19:11:48.000Z | tests/generator/test_rom.py | venustar1228/cactus-blockchain | a2fec724eb19489898ffa306d4203de11edb94b0 | [
"Apache-2.0"
] | 21 | 2021-07-17T02:18:57.000Z | 2022-03-15T08:26:56.000Z | from clvm_tools import binutils
from clvm_tools.clvmc import compile_clvm_text
from cactus.full_node.generator import run_generator
from cactus.full_node.mempool_check_conditions import get_name_puzzle_conditions
from cactus.types.blockchain_format.program import Program, SerializedProgram
from cactus.types.blockchain... | 39.573529 | 120 | 0.745448 |
be4e4f72b3ce4e27129f6b40c3cad23771a3024b | 4,811 | py | Python | video_processing_mediapipe.py | crisdeodates/AI-OSSDC-VisionAI-Core | 17c3b480ef41add5bd58093a59ccea41035791e0 | [
"Apache-2.0"
] | 66 | 2019-04-02T00:05:36.000Z | 2022-03-20T07:18:45.000Z | video_processing_mediapipe.py | liflo/OSSDC-VisionAI-Core | 17c3b480ef41add5bd58093a59ccea41035791e0 | [
"Apache-2.0"
] | null | null | null | video_processing_mediapipe.py | liflo/OSSDC-VisionAI-Core | 17c3b480ef41add5bd58093a59ccea41035791e0 | [
"Apache-2.0"
] | 17 | 2021-02-08T22:52:28.000Z | 2022-01-15T11:52:14.000Z | import traceback
import cv2
import numpy as np
import sys
import argparse
from datetime import datetime
import os
# MediaPipe algorithms in Python
# https://google.github.io/mediapipe/getting_started/python.html
# Install steps:
# pip install mediapipe
# Status: working
import mediapipe as mp
mp_drawing = mp.soluti... | 37.585938 | 98 | 0.672417 |
0a597c0d4bc8fc167b8d3a90a218cf16ec688899 | 7,035 | py | Python | Lib/site-packages/PyQt5/examples/itemviews/simpledommodel.py | heylenz/python27 | bee49fa9d65b8ab7d591146a5b6cd47aeb41d940 | [
"bzip2-1.0.6",
"MIT"
] | 2 | 2020-11-09T23:56:54.000Z | 2021-07-29T23:15:59.000Z | PyQt5_gpl-5.8/examples/itemviews/simpledommodel.py | ArjandeV/iracing-overlay | 6286348d78f1538f64928ec867cafc65124eea3d | [
"MIT"
] | null | null | null | PyQt5_gpl-5.8/examples/itemviews/simpledommodel.py | ArjandeV/iracing-overlay | 6286348d78f1538f64928ec867cafc65124eea3d | [
"MIT"
] | 1 | 2020-02-14T21:43:29.000Z | 2020-02-14T21:43:29.000Z | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENS... | 31.266667 | 78 | 0.603127 |
23342b18e21c9f8799a4dff86aba7126d1ce09c2 | 1,110 | py | Python | src/app/beer_garden/api/http/handlers/vbeta/event.py | hazmat345/beer-garden | a5fd3eee303d80b6a16d93c89fe8ff42fe39bfbd | [
"MIT"
] | null | null | null | src/app/beer_garden/api/http/handlers/vbeta/event.py | hazmat345/beer-garden | a5fd3eee303d80b6a16d93c89fe8ff42fe39bfbd | [
"MIT"
] | null | null | null | src/app/beer_garden/api/http/handlers/vbeta/event.py | hazmat345/beer-garden | a5fd3eee303d80b6a16d93c89fe8ff42fe39bfbd | [
"MIT"
] | null | null | null | from brewtils.schema_parser import SchemaParser
from beer_garden.api.http.authorization import Permissions, authenticated
from beer_garden.api.http.base_handler import BaseHandler
from beer_garden.events import publish
class EventPublisherAPI(BaseHandler):
parser = SchemaParser()
@authenticated(permissions... | 27.073171 | 86 | 0.592793 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.