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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18e8503b78654356f0c5aa6679c6af2a2edc0171 | 623 | py | Python | zom/manage.py | Neha-Prabhu/Zomato-clone | 4d57f784c6de91780a171fe4e2853ccb20c8e8ca | [
"MIT"
] | null | null | null | zom/manage.py | Neha-Prabhu/Zomato-clone | 4d57f784c6de91780a171fe4e2853ccb20c8e8ca | [
"MIT"
] | null | null | null | zom/manage.py | Neha-Prabhu/Zomato-clone | 4d57f784c6de91780a171fe4e2853ccb20c8e8ca | [
"MIT"
] | 1 | 2020-08-09T11:54:26.000Z | 2020-08-09T11:54:26.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'zom.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportErro... | 28.318182 | 73 | 0.680578 |
294397673ffc2d8e60a9a7d65c476eb07bff12cc | 255 | py | Python | computer_vision/object_measurement/capture_image.py | Gabriellgpc/my_personal_projects | 0d23d31dbb61538bac1ff8bf75d5c3cd5701f833 | [
"MIT"
] | null | null | null | computer_vision/object_measurement/capture_image.py | Gabriellgpc/my_personal_projects | 0d23d31dbb61538bac1ff8bf75d5c3cd5701f833 | [
"MIT"
] | null | null | null | computer_vision/object_measurement/capture_image.py | Gabriellgpc/my_personal_projects | 0d23d31dbb61538bac1ff8bf75d5c3cd5701f833 | [
"MIT"
] | 1 | 2021-04-08T14:44:53.000Z | 2021-04-08T14:44:53.000Z | import cv2
video = cv2.VideoCapture('/dev/video0')
while True:
ok, img = video.read()
cv2.imshow('Camera', img)
key = cv2.waitKey(1) & 0xFF
if key == ord('q'):
break
if key == ord('s'):
cv2.imwrite('imagem.png', img) | 19.615385 | 39 | 0.556863 |
87849717de45da49562e5a74545d3d7563e8948d | 34,997 | py | Python | src/m1.py | jenhong20/CircleChanger | 3560f21966982a9def353acd2185c4c7a358cd8e | [
"MIT"
] | null | null | null | src/m1.py | jenhong20/CircleChanger | 3560f21966982a9def353acd2185c4c7a358cd8e | [
"MIT"
] | null | null | null | src/m1.py | jenhong20/CircleChanger | 3560f21966982a9def353acd2185c4c7a358cd8e | [
"MIT"
] | null | null | null | """
A problem in which to practice:
-- IMPLEMENTING a CLASS
-- using SEQUENCES
Authors: Valerie Galluzzi, David Mutchler, Dave Fisher, Amanda Stouder,
their colleagues and YOUR_NAME_HERE.
""" # TODO: 1. PUT YOUR NAME IN THE ABOVE LINE.
import rosegraphics as rg
import random
import sys
import time
impor... | 41.124559 | 84 | 0.568706 |
53a0eb4d82fe20e306e8e61ed3138d0c69125471 | 495 | py | Python | gcloud/fixtures/pubsub.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 2 | 2017-03-01T20:09:06.000Z | 2019-02-08T17:10:16.000Z | gcloud/fixtures/pubsub.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 40 | 2015-10-10T15:02:21.000Z | 2020-03-17T22:32:04.000Z | gcloud/fixtures/pubsub.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 2 | 2018-11-14T21:50:58.000Z | 2022-03-07T20:59:27.000Z | from etl_framework.testing.fixtures import FixtureInterface
from gcloud.datastores.utils.pubsub_messages import PublisherMessage
from gcloud.datastores.pubsub import PubsubPublisher
class PubsubFixture(FixtureInterface):
def load(self):
messages = [PublisherMessage(**row) for row in self.data]
pu... | 30.9375 | 68 | 0.737374 |
1c5be247486d51c8a81e7542cb2d582d68fb70e8 | 759 | py | Python | build_interactive_webapps_python_scripts_using_streamlit/02_interactive_webapps_streamlit_pandas/003b_interactive_webapps_streamlit_pandas.py | bflaven/BlogArticlesExamples | 5df2dfc26170ffbbade78ba136bf3172391e3b2a | [
"MIT"
] | 5 | 2018-05-03T08:16:02.000Z | 2021-09-04T03:44:24.000Z | build_interactive_webapps_python_scripts_using_streamlit/02_interactive_webapps_streamlit_pandas/003b_interactive_webapps_streamlit_pandas.py | bflaven/BlogArticlesExamples | 5df2dfc26170ffbbade78ba136bf3172391e3b2a | [
"MIT"
] | 1 | 2022-01-28T19:27:19.000Z | 2022-01-28T19:27:19.000Z | build_interactive_webapps_python_scripts_using_streamlit/02_interactive_webapps_streamlit_pandas/003b_interactive_webapps_streamlit_pandas.py | bflaven/BlogArticlesExamples | 5df2dfc26170ffbbade78ba136bf3172391e3b2a | [
"MIT"
] | 2 | 2020-09-10T13:33:27.000Z | 2022-02-09T11:07:38.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
[path]
cd /Users/brunoflaven/Documents/01_work/blog_articles/build_interactive_webapps_python_scripts_using_streamlit/02_interactive_webapps_streamlit/
[file]
streamlit run 003b_interactive_webapps_streamlit_pandas.py
# more on infos and apps on
https://streamlit.io... | 18.071429 | 144 | 0.740448 |
cb6b828cd2c9c508ce9e6eed647357b0696721e4 | 959 | py | Python | simulator/ui/inside.py | ondiiik/meteoink | 9bc7af929de12ed5eb2fafd64fcfe447f07b6eeb | [
"MIT"
] | 2 | 2021-05-27T13:32:16.000Z | 2022-03-30T01:23:34.000Z | simulator/ui/inside.py | ondiiik/meteoink | 9bc7af929de12ed5eb2fafd64fcfe447f07b6eeb | [
"MIT"
] | null | null | null | simulator/ui/inside.py | ondiiik/meteoink | 9bc7af929de12ed5eb2fafd64fcfe447f07b6eeb | [
"MIT"
] | null | null | null | from ui import UiFrame, Vect
from config import location
class UiInside(UiFrame):
def __init__(self, ofs, dim):
super().__init__(ofs, dim)
def draw(self, ui, args):
tab, connection = args
# Type celsius symbol
ui.text(50, '°C', Vect(111, -5))
... | 33.068966 | 119 | 0.52659 |
9604a44809fba891b5adec1176811019270e32ed | 2,029 | py | Python | tests/python/pants_test/engine/test_engine.py | WamBamBoozle/pants | 98cadfa1a5d337146903eb66548cfe955f2627b3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/engine/test_engine.py | WamBamBoozle/pants | 98cadfa1a5d337146903eb66548cfe955f2627b3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/engine/test_engine.py | WamBamBoozle/pants | 98cadfa1a5d337146903eb66548cfe955f2627b3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.base.exce... | 32.725806 | 93 | 0.715623 |
ea737a9133bcfd7a90118a3ca2bd09c8d9a9420e | 1,136 | py | Python | data/p4VQE/R1/benchmark/startPyquil63.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R1/benchmark/startPyquil63.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R1/benchmark/startPyquil63.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=9
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=1
pro... | 22.72 | 64 | 0.606514 |
8da2e4bf7a93b58899243b47b133e2c4018c5a05 | 1,440 | py | Python | app/user/serializers.py | Aries922/recipe-api | 332f7f4407d358c76ba55b80b0ed56003b571827 | [
"MIT"
] | null | null | null | app/user/serializers.py | Aries922/recipe-api | 332f7f4407d358c76ba55b80b0ed56003b571827 | [
"MIT"
] | null | null | null | app/user/serializers.py | Aries922/recipe-api | 332f7f4407d358c76ba55b80b0ed56003b571827 | [
"MIT"
] | null | null | null | 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):
class Meta:
model = get_user_model()
fields = ('email', 'password', 'name')
extra_... | 28.8 | 74 | 0.641667 |
78b63af5e8e8f3101a50dc6f782c6abdb2cfba0e | 1,769 | py | Python | tensorflow/python/ops/control_flow_v2_toggles_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/python/ops/control_flow_v2_toggles_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 1,056 | 2019-12-15T01:20:31.000Z | 2022-02-10T02:06:28.000Z | tensorflow/python/ops/control_flow_v2_toggles_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.311111 | 80 | 0.773318 |
955090bb5e79cecd3eff01cd518f92bc8cba5692 | 2,755 | py | Python | code/stack_functions.py | 6one2/Stack_PublicSurvey | 3d9e659b3bc8b0b491931086eb9392bcfcc8f9c1 | [
"FTL"
] | null | null | null | code/stack_functions.py | 6one2/Stack_PublicSurvey | 3d9e659b3bc8b0b491931086eb9392bcfcc8f9c1 | [
"FTL"
] | null | null | null | code/stack_functions.py | 6one2/Stack_PublicSurvey | 3d9e659b3bc8b0b491931086eb9392bcfcc8f9c1 | [
"FTL"
] | null | null | null | import pandas as pd
import numpy as np
from collections import defaultdict
from forex_python.converter import CurrencyRates, CurrencyCodes
from forex_python.bitcoin import BtcConverter
def convert2USD_today(cur_name_from: str, amount: float):
'''
Use forex_python to convert the currencies found in the dataset... | 32.797619 | 106 | 0.618512 |
f3db36794ec3a7ebbbc9ec3b3d2d8ecf50977401 | 9,854 | py | Python | script.module.uncoded/lib/resources/lib/sources/en/xmovies.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:38:10.000Z | 2019-03-05T09:38:10.000Z | script.module.uncoded/lib/resources/lib/sources/en/xmovies.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | null | null | null | script.module.uncoded/lib/resources/lib/sources/en/xmovies.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2021-11-05T20:48:09.000Z | 2021-11-05T20:48:09.000Z | # NEEDS FIXING
# -*- coding: utf-8 -*-
'''
Covenant Add-on
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version... | 45.410138 | 172 | 0.502233 |
3a038b32fb5a9dd4198b72b0ac349cbc7c0942dd | 4,226 | py | Python | NNTreeJussi_Test.py | timohart7/tau-vehicle-37 | 7b849b7d019b70ca2afef87cbbcbd596dccbba77 | [
"MIT"
] | null | null | null | NNTreeJussi_Test.py | timohart7/tau-vehicle-37 | 7b849b7d019b70ca2afef87cbbcbd596dccbba77 | [
"MIT"
] | null | null | null | NNTreeJussi_Test.py | timohart7/tau-vehicle-37 | 7b849b7d019b70ca2afef87cbbcbd596dccbba77 | [
"MIT"
] | null | null | null | import os
import numpy as np
import matplotlib.pyplot as plt
import sklearn
from sklearn import model_selection
import cv2
import tensorflow as tf
import tensorflow.keras
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.layers import Dense, Activation, Flatten
from tensorflow.k... | 30.185714 | 94 | 0.683152 |
c9f7d72ad0ae91c18a6eeec1ce7eb4e52dfbcf3d | 324 | py | Python | biobrary/amino_acids_mw.py | benjaminfang/fbio | cb033df257682f41919a99202340d846a2ee9f5d | [
"MIT"
] | 4 | 2019-01-31T07:41:41.000Z | 2019-07-03T01:09:04.000Z | biobrary/amino_acids_mw.py | benjaminfang/biolib | 660ee48205509522e0fbbde287a4456bcd94e448 | [
"MIT"
] | null | null | null | biobrary/amino_acids_mw.py | benjaminfang/biolib | 660ee48205509522e0fbbde287a4456bcd94e448 | [
"MIT"
] | null | null | null | amino_acids_mw = {'F':165.19, 'L':131.17, 'I':131.175, 'M':149.21, 'V':117.15,
'S':105.093, 'P':115.13, 'T':119.12, 'A':89.094, 'Y':181.19,
'H':155.15, 'Q':146.14, 'N':146.14, 'K':146.19, 'D':133.11,
'E':147.13, 'C':121.16, 'W':204.23, 'R':174.20, 'G':75.07, '*'... | 64.8 | 84 | 0.419753 |
3e575d217ca966ae596dcccac09c039850fd6979 | 6,696 | py | Python | src/ggrc_workflows/models/cycle.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc_workflows/models/cycle.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc_workflows/models/cycle.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Module contains a workflow Cycle model
"""
import itertools
from sqlalchemy import orm, inspect
from ggrc import db
from ggrc.models import mixins
from ggrc.models import reflection
from ggrc.fulltext i... | 28.987013 | 79 | 0.62037 |
e80d2d337db1acf71861ab0ce6d6de98686a4c70 | 4,907 | py | Python | raksha/openstack/common/scheduler/filters/json_filter.py | DPaaS-Raksha/raksha | e4e482865d2860473bc0a80e10d76bb127e9f6c5 | [
"Apache-2.0"
] | 8 | 2015-03-19T20:22:44.000Z | 2021-04-11T06:00:52.000Z | raksha/openstack/common/scheduler/filters/json_filter.py | DPaaS-Raksha/raksha | e4e482865d2860473bc0a80e10d76bb127e9f6c5 | [
"Apache-2.0"
] | 1 | 2015-07-21T23:05:23.000Z | 2016-03-16T08:11:54.000Z | raksha/openstack/common/scheduler/filters/json_filter.py | DPaaS-Raksha/raksha | e4e482865d2860473bc0a80e10d76bb127e9f6c5 | [
"Apache-2.0"
] | 5 | 2015-10-09T17:42:24.000Z | 2021-03-11T18:33:00.000Z | # Copyright (c) 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 32.496689 | 78 | 0.594457 |
cae1c60718f4ecb1eace53bc91c999b60ab46121 | 1,195 | py | Python | tests/test_asce/test_rlre.py | Layty/dlms-cosem | 95b67054a1dfb928e960547b0246b7b6794f0594 | [
"MIT"
] | 1 | 2021-08-20T09:19:07.000Z | 2021-08-20T09:19:07.000Z | tests/test_asce/test_rlre.py | Layty/dlms-cosem | 95b67054a1dfb928e960547b0246b7b6794f0594 | [
"MIT"
] | null | null | null | tests/test_asce/test_rlre.py | Layty/dlms-cosem | 95b67054a1dfb928e960547b0246b7b6794f0594 | [
"MIT"
] | null | null | null | import pytest
from dlms_cosem import enumerations
from dlms_cosem.protocol import xdlms
from dlms_cosem.protocol.acse import ReleaseResponseApdu
class TestDecodeRLRE:
def test_simple(self):
data = b"c\x03\x80\x01\x00"
rlre = ReleaseResponseApdu.from_bytes(data)
assert rlre.reason == enume... | 39.833333 | 108 | 0.740586 |
1aa336f6d66cb5c03f986e551dd4db9a7fc9e1c2 | 1,599 | py | Python | lego/apps/meetings/tests/test_notifications.py | mathiazom/lego | 4c6c80fbe023b67bf68548ad806af4ff944da92c | [
"MIT"
] | null | null | null | lego/apps/meetings/tests/test_notifications.py | mathiazom/lego | 4c6c80fbe023b67bf68548ad806af4ff944da92c | [
"MIT"
] | 71 | 2021-11-01T04:47:36.000Z | 2022-03-31T04:25:04.000Z | lego/apps/meetings/tests/test_notifications.py | wahello/lego | a0b02f3abc997fe96326e9c9c05b49847170041b | [
"MIT"
] | null | null | null | from unittest.mock import patch
from lego.apps.meetings.models import Meeting
from lego.apps.meetings.notifications import MeetingInvitationNotification
from lego.apps.users.models import User
from lego.utils.test_utils import BaseTestCase
@patch("lego.utils.email.django_send_mail")
class MeetingInvitationNotificati... | 35.533333 | 77 | 0.707317 |
f0aac3b0beaa5e4c7ffcac2807094c227b275801 | 637 | py | Python | pesquisa_e_ordenacao/quick_sort.py | Rudigus/besteirinhas-python | 70f93dd522770a46966656980cd9f0d559aa8b0f | [
"MIT"
] | null | null | null | pesquisa_e_ordenacao/quick_sort.py | Rudigus/besteirinhas-python | 70f93dd522770a46966656980cd9f0d559aa8b0f | [
"MIT"
] | null | null | null | pesquisa_e_ordenacao/quick_sort.py | Rudigus/besteirinhas-python | 70f93dd522770a46966656980cd9f0d559aa8b0f | [
"MIT"
] | null | null | null | from utils.plotter import plot
from utils.generator import getRandomList
from timeit import timeit
from utils.line import Line
from utils.sorter import quickSort
# Change this value to switch from and to test mode
testMode = False
testDivisor = 100
counts = [100000, 200000, 400000, 700000, 1000000, 5000000]
if testM... | 28.954545 | 84 | 0.761381 |
78853fe4051db93ba19c4c684fbc8c8e6a97690c | 13,087 | py | Python | codes/nlper/utils/fn.py | jimme0421/NLPer-Arsenal | 4d1b01556ec8ff5b4a92752de91fbfd27e9ebdee | [
"MIT"
] | 2 | 2022-02-17T03:15:00.000Z | 2022-03-14T12:52:11.000Z | codes/nlper/utils/fn.py | yanqiangmiffy/NLPer-Arsenal | 3bdef107c7499731535a24e4b9cff46fa543775f | [
"MIT"
] | null | null | null | codes/nlper/utils/fn.py | yanqiangmiffy/NLPer-Arsenal | 3bdef107c7499731535a24e4b9cff46fa543775f | [
"MIT"
] | null | null | null | import warnings
from typing import List
import os
import re
import random
import time
import multiprocessing as mp
import psutil
import pynvml
import numpy as np
import torch
from prettytable import PrettyTable
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
def seed_everything(seed... | 37.823699 | 124 | 0.557729 |
3f79199a33594e121ee05d29efc7a570ed3e1d59 | 1,482 | py | Python | tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py | major/gapic-generator-python | 68515c4c1444875f151a971b595e9dc837ddf47c | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py | major/gapic-generator-python | 68515c4c1444875f151a971b595e9dc837ddf47c | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py | major/gapic-generator-python | 68515c4c1444875f151a971b595e9dc837ddf47c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 32.217391 | 85 | 0.755735 |
14cc65e066578a0c51ba70fcca698f8d9e9a5005 | 126 | py | Python | docs/xref_map.py | jabooth/menpodetect | fd3c52a87a2327a2f0ad17fdd1fd1861bc9f4330 | [
"BSD-3-Clause"
] | 27 | 2015-03-14T22:54:13.000Z | 2021-03-14T04:37:12.000Z | docs/xref_map.py | jabooth/menpodetect | fd3c52a87a2327a2f0ad17fdd1fd1861bc9f4330 | [
"BSD-3-Clause"
] | 11 | 2015-04-13T08:31:36.000Z | 2021-03-09T06:14:45.000Z | docs/xref_map.py | jabooth/menpodetect | fd3c52a87a2327a2f0ad17fdd1fd1861bc9f4330 | [
"BSD-3-Clause"
] | 28 | 2015-02-02T16:50:03.000Z | 2020-05-14T06:51:17.000Z | xref_map = {
'as_vector': ('function', 'menpo.base.Vectorizable.as_vector'),
'Affine': ('class', 'menpo.transform.Affine'),
}
| 25.2 | 63 | 0.68254 |
4a058d51d256f1621e5245dd9fedb9b54ad36fab | 5,320 | py | Python | pullbug/github_bug.py | ncr4/pullbug | 393722558b2e997051fe1c86ea04951f635ef5e7 | [
"MIT"
] | null | null | null | pullbug/github_bug.py | ncr4/pullbug | 393722558b2e997051fe1c86ea04951f635ef5e7 | [
"MIT"
] | null | null | null | pullbug/github_bug.py | ncr4/pullbug | 393722558b2e997051fe1c86ea04951f635ef5e7 | [
"MIT"
] | null | null | null | import os
import requests
import logging
from pullbug.logger import PullBugLogger
from pullbug.messages import Messages
GITHUB_TOKEN = os.getenv('GITHUB_TOKEN')
GITHUB_OWNER = os.getenv('GITHUB_OWNER')
GITHUB_HEADERS = {
'Authorization': f'token {GITHUB_TOKEN}',
'Content-Type': 'application/json; charset=utf-8... | 41.24031 | 130 | 0.594549 |
507985eca12500a1cd436b5e7cd8591cd816abd7 | 2,907 | py | Python | pyrevolve/spec/msgs/robot_pb2.py | MRebolle/Battery-Robot | 1b97e8c77cf7eff7d5cc7e417b4e5ec97e4011e7 | [
"Apache-1.1"
] | null | null | null | pyrevolve/spec/msgs/robot_pb2.py | MRebolle/Battery-Robot | 1b97e8c77cf7eff7d5cc7e417b4e5ec97e4011e7 | [
"Apache-1.1"
] | null | null | null | pyrevolve/spec/msgs/robot_pb2.py | MRebolle/Battery-Robot | 1b97e8c77cf7eff7d5cc7e417b4e5ec97e4011e7 | [
"Apache-1.1"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: robot.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflect... | 32.662921 | 279 | 0.74785 |
2be4eab93ba28742b8192a138250b621964e6c61 | 409 | py | Python | drf_vue_template/wsgi.py | soltanoff/drf_vue_template | 2269f045fc5557bbca168a806d7ca37a7298837a | [
"MIT"
] | null | null | null | drf_vue_template/wsgi.py | soltanoff/drf_vue_template | 2269f045fc5557bbca168a806d7ca37a7298837a | [
"MIT"
] | 1 | 2021-10-04T05:38:08.000Z | 2021-10-05T07:20:59.000Z | drf_vue_template/wsgi.py | soltanoff/drf_vue_template | 2269f045fc5557bbca168a806d7ca37a7298837a | [
"MIT"
] | 2 | 2019-09-25T10:22:26.000Z | 2020-07-29T16:34:20.000Z | """
WSGI config for drf_vue_template 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.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJA... | 24.058824 | 78 | 0.794621 |
dc9911850529e6fd28a0989d47a2105b82be08e1 | 264 | py | Python | PhysicsTools/HepMCCandAlgos/python/allMuonsGenParticlesMatch_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | PhysicsTools/HepMCCandAlgos/python/allMuonsGenParticlesMatch_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | PhysicsTools/HepMCCandAlgos/python/allMuonsGenParticlesMatch_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
allMuonsGenParticlesMatch = cms.EDFilter("MCTruthDeltaRMatcher",
src = cms.InputTag("allMuons"),
distMin = cms.double(0.15),
matchPDGId = cms.vint32(13),
matched = cms.InputTag("genParticleCandidates")
)
| 24 | 64 | 0.727273 |
ef4d5f6322b7ae79b051795b5af7e6f7f1e55550 | 2,992 | py | Python | tensorflow/compiler/tests/bucketize_op_test.py | elielhojman/tensorflow | 163aae337c875efce2518c3cd0fecb61968fe408 | [
"Apache-2.0"
] | 8 | 2017-03-20T12:04:21.000Z | 2021-06-24T20:34:30.000Z | tensorflow/compiler/tests/bucketize_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 4 | 2019-08-14T22:32:51.000Z | 2020-03-09T14:59:18.000Z | tensorflow/compiler/tests/bucketize_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 4 | 2019-11-11T13:46:27.000Z | 2020-03-14T05:36:53.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.873418 | 80 | 0.64004 |
721bd1bc8f48bc8577268df664009d754a151acb | 80 | py | Python | Python/car.py | andresrueda90/POO-Curso-Platiz | aa2d5fd408a998f70b0bc9d8b3d55015d9a5edf9 | [
"Apache-2.0"
] | null | null | null | Python/car.py | andresrueda90/POO-Curso-Platiz | aa2d5fd408a998f70b0bc9d8b3d55015d9a5edf9 | [
"Apache-2.0"
] | null | null | null | Python/car.py | andresrueda90/POO-Curso-Platiz | aa2d5fd408a998f70b0bc9d8b3d55015d9a5edf9 | [
"Apache-2.0"
] | null | null | null | class Car:
id = int
license = str
driver = str
passegenger = int | 16 | 21 | 0.575 |
cbc91cde3d68ce38a6389f1b1437e7063a1c86fc | 1,038 | py | Python | var/spack/repos/builtin/packages/py-azure-keyvault-secrets/package.py | carlabguillen/spack | 7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/py-azure-keyvault-secrets/package.py | carlabguillen/spack | 7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/py-azure-keyvault-secrets/package.py | carlabguillen/spack | 7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class PyAzureKeyvaultSecrets(PythonPackage):
"""Microsoft Azure Key Vault Secrets Client Library for Python."""
... | 49.428571 | 110 | 0.702312 |
02114772f45ee06185341627dc2a244badc0466d | 1,354 | py | Python | codiga/common.py | codiga/clitool | bc138668d603f5fd1f6caaf89f683974a0f8e2b7 | [
"BSD-2-Clause"
] | 2 | 2021-04-28T18:56:05.000Z | 2021-07-25T12:10:46.000Z | codiga/common.py | codiga/clitool | bc138668d603f5fd1f6caaf89f683974a0f8e2b7 | [
"BSD-2-Clause"
] | 2 | 2019-04-25T02:32:34.000Z | 2019-07-13T20:49:51.000Z | codiga/common.py | codeinspectorio/citool | 61fd033015080e4d2b100f120f4bf137bf85b082 | [
"BSD-2-Clause"
] | 2 | 2021-05-25T16:36:13.000Z | 2021-10-04T23:03:20.000Z | import logging
log = logging.getLogger('codiga')
GRADE_EXCELLENT = "EXCELLENT"
GRADE_GOOD = "GOOD"
GRADE_NEUTRAL = "NEUTRAL"
GRADE_WARNING = "WARNING"
GRADE_CRITICAL = "CRITICAL"
GRADE_UNKNOWN = "UNKNOWN"
GRADE_UNAVAILABLE = "UNAVAILABLE"
def is_grade_lower(grade, minimum_grade):
"""
return is a given grade... | 23.754386 | 88 | 0.654357 |
1746c2dcab28cfdedbf3b99376eae1e2fd341295 | 648 | py | Python | dashboard/dashboard/oauth2_decorator.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 1 | 2019-11-01T23:31:22.000Z | 2019-11-01T23:31:22.000Z | dashboard/dashboard/oauth2_decorator.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 6 | 2020-07-19T21:51:44.000Z | 2022-02-13T08:22:58.000Z | dashboard/dashboard/oauth2_decorator.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 1 | 2020-07-24T18:22:03.000Z | 2020-07-24T18:22:03.000Z | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides oauth2 decorators in a mockable way."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_imp... | 32.4 | 72 | 0.79321 |
a9ea9b2a04859c44152ab27bc664721ebc0fa98f | 2,924 | py | Python | tests/compilation/request/test_request_body_compiled_urlencoded.py | lasta/preacher | 5e50f8eb930fac72a788e7614eb5a85903f7bde6 | [
"MIT"
] | null | null | null | tests/compilation/request/test_request_body_compiled_urlencoded.py | lasta/preacher | 5e50f8eb930fac72a788e7614eb5a85903f7bde6 | [
"MIT"
] | null | null | null | tests/compilation/request/test_request_body_compiled_urlencoded.py | lasta/preacher | 5e50f8eb930fac72a788e7614eb5a85903f7bde6 | [
"MIT"
] | null | null | null | from unittest.mock import NonCallableMock, sentinel
from pytest import raises
from preacher.compilation.error import CompilationError, NamedNode
from preacher.compilation.request.request_body import RequestBodyCompiled
from preacher.compilation.request.request_body import UrlencodedRequestBodyCompiled
PKG = 'preache... | 36.098765 | 84 | 0.794118 |
c094913d513179f9f8714e66fa7bf720f180bbc1 | 47,791 | py | Python | nipy/labs/group/spatial_relaxation_onesample.py | neurospin/nipy | cc54600a0dca1e003ad393bc05c46f91eef30a68 | [
"BSD-3-Clause"
] | 1 | 2016-03-08T15:01:06.000Z | 2016-03-08T15:01:06.000Z | nipy/labs/group/spatial_relaxation_onesample.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | null | null | null | nipy/labs/group/spatial_relaxation_onesample.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#####################################################################################
# BAYESIAN MODEL SELECTION FOR ACTIVATION DETECTION ON FMRI GROUP DATA
# Merlin Keller, 2009
import numpy as np
import ... | 44.291937 | 189 | 0.504593 |
4870c0ad7fa8099cb1d7f6efc8c755fef7cdc5fb | 3,230 | py | Python | examples/blowout_wake/analysis.py | ax3l/hipace | ff25dda59fe3de2ff70c49f6b53e52aead04ef60 | [
"BSD-3-Clause-LBNL"
] | null | null | null | examples/blowout_wake/analysis.py | ax3l/hipace | ff25dda59fe3de2ff70c49f6b53e52aead04ef60 | [
"BSD-3-Clause-LBNL"
] | null | null | null | examples/blowout_wake/analysis.py | ax3l/hipace | ff25dda59fe3de2ff70c49f6b53e52aead04ef60 | [
"BSD-3-Clause-LBNL"
] | null | null | null | #! /usr/bin/env python3
# This Python analysis script is part of the code Hipace++
#
# It compares the transverse field By with the theoretical value, plots both
# the simulation result and the theory on the same plot, and asserts that the
# difference is small.
#
# To use it, run the simulation and execute this scrip... | 40.375 | 133 | 0.68452 |
5ab0249d0d751559412e02669927a1b4d81f2d33 | 1,666 | py | Python | examples/plot_map.py | Huite/contextily | 14d4fb5f18eeb5ef6266885c9b1b5c5513f63021 | [
"BSD-3-Clause"
] | 182 | 2020-04-08T15:56:50.000Z | 2022-03-24T15:02:19.000Z | examples/plot_map.py | Huite/contextily | 14d4fb5f18eeb5ef6266885c9b1b5c5513f63021 | [
"BSD-3-Clause"
] | 126 | 2016-09-28T22:18:00.000Z | 2020-04-08T12:45:36.000Z | examples/plot_map.py | Huite/contextily | 14d4fb5f18eeb5ef6266885c9b1b5c5513f63021 | [
"BSD-3-Clause"
] | 43 | 2016-09-28T19:59:36.000Z | 2022-01-20T17:03:53.000Z | """
Downloading and Plotting Maps
-----------------------------
Plotting maps with Contextily.
Contextily is designed to pull map tile information from the web. In many
cases we want to go from a location to a map of that location as quickly
as possible. There are two main ways to do this with Contextily.
Searching ... | 31.433962 | 79 | 0.614046 |
4ed7dc19a79afe73f6614a8f8057fcda8c14d8bd | 215 | py | Python | trebelge/trebelge/doctype/ubl_tr_despatchline_summary/ubl_tr_despatchline_summary.py | Framras/trebelge | 362179925dc688ad8ea008f532de72e67e49941b | [
"MIT"
] | 6 | 2019-12-21T21:15:50.000Z | 2021-12-30T21:59:53.000Z | trebelge/trebelge/doctype/ubl_tr_despatchline_summary/ubl_tr_despatchline_summary.py | Framras/trebelge | 362179925dc688ad8ea008f532de72e67e49941b | [
"MIT"
] | null | null | null | trebelge/trebelge/doctype/ubl_tr_despatchline_summary/ubl_tr_despatchline_summary.py | Framras/trebelge | 362179925dc688ad8ea008f532de72e67e49941b | [
"MIT"
] | 3 | 2020-01-05T19:32:40.000Z | 2021-11-03T14:11:21.000Z | # Copyright (c) 2022, Framras AS-Izmir and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class UBLTRDespatchLineSummary(Document):
pass
| 23.888889 | 55 | 0.804651 |
52a9b7691220caab9a1c8eca5c6ca93d1888b2a5 | 4,279 | py | Python | examples/cifar_generator_cnn.py | sohan/hyperas | 1d62178e6edaed0899fe61ab3bf0115164424c82 | [
"MIT"
] | 1 | 2017-02-28T03:08:45.000Z | 2017-02-28T03:08:45.000Z | examples/cifar_generator_cnn.py | soheilb/hyperas | 1d62178e6edaed0899fe61ab3bf0115164424c82 | [
"MIT"
] | null | null | null | examples/cifar_generator_cnn.py | soheilb/hyperas | 1d62178e6edaed0899fe61ab3bf0115164424c82 | [
"MIT"
] | 1 | 2020-02-28T21:03:42.000Z | 2020-02-28T21:03:42.000Z | from __future__ import print_function
from hyperopt import Trials, STATUS_OK, tpe
from hyperas import optim
from hyperas.distributions import uniform
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
f... | 37.535088 | 94 | 0.6595 |
a8509561fe0c699ce065673ed8f046f82620c302 | 51,224 | py | Python | src/transformers/models/layoutlm/modeling_layoutlm.py | HimashiRathnayake/adapter-transformers | d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4 | [
"Apache-2.0"
] | 50,404 | 2019-09-26T09:55:55.000Z | 2022-03-31T23:07:49.000Z | src/transformers/models/layoutlm/modeling_layoutlm.py | HimashiRathnayake/adapter-transformers | d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4 | [
"Apache-2.0"
] | 13,179 | 2019-09-26T10:10:57.000Z | 2022-03-31T23:17:08.000Z | src/transformers/models/layoutlm/modeling_layoutlm.py | HimashiRathnayake/adapter-transformers | d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4 | [
"Apache-2.0"
] | 13,337 | 2019-09-26T10:49:38.000Z | 2022-03-31T23:06:17.000Z | # coding=utf-8
# Copyright 2018 The Microsoft Research Asia LayoutLM Team Authors and the HuggingFace Inc. team.
#
# 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/... | 42.651124 | 164 | 0.658031 |
a6526d41acb8c5a8ee40ed159f738863d09c292c | 327 | py | Python | packages/pyright-internal/src/tests/samples/genericTypes68.py | martindemello/pyright | 4fe3f1f7c08f139715701fdf746183062b5165ff | [
"MIT"
] | 4,391 | 2019-05-07T01:18:57.000Z | 2022-03-31T20:45:44.000Z | packages/pyright-internal/src/tests/samples/genericTypes68.py | martindemello/pyright | 4fe3f1f7c08f139715701fdf746183062b5165ff | [
"MIT"
] | 2,740 | 2019-05-07T03:29:30.000Z | 2022-03-31T12:57:46.000Z | packages/pyright-internal/src/tests/samples/genericTypes68.py | martindemello/pyright | 4fe3f1f7c08f139715701fdf746183062b5165ff | [
"MIT"
] | 455 | 2019-05-07T12:55:14.000Z | 2022-03-31T17:09:15.000Z | # This sample tests the case where a constrained TypeVar is assigned
# to another constrained TypeVar or a union that contains a constrained
# TypeVar.
from os import PathLike
from typing import AnyStr
def func(path: AnyStr | PathLike[AnyStr]) -> AnyStr:
...
def thing(value: AnyStr) -> AnyStr:
return func(... | 21.8 | 71 | 0.737003 |
482f02531474020a976e7e1b7d89f0fc68271596 | 2,444 | py | Python | app/forms/page.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 11 | 2015-04-23T21:57:56.000Z | 2019-04-28T12:48:58.000Z | app/forms/page.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 1 | 2016-10-05T14:10:58.000Z | 2016-10-05T14:12:23.000Z | app/forms/page.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 3 | 2016-10-05T14:00:42.000Z | 2019-01-16T14:33:43.000Z | from flask_babel import lazy_gettext as _
from flask_wtf import FlaskForm
from wtforms import BooleanField, StringField, TextAreaField, SubmitField, \
RadioField
from wtforms.ext.sqlalchemy.fields import QuerySelectMultipleField
from wtforms.validators import Optional
from app.forms.fields import CustomFormSelectF... | 35.42029 | 79 | 0.675532 |
19ebdb1eb8d9318c7dc8457a7c170e14999e9575 | 2,365 | py | Python | AutotestWebD/apps/interface/services/HTTP_interface_debugService.py | yangjourney/sosotest | 2e88099a829749910ca325253c9b1a2e368d21a0 | [
"MIT"
] | 422 | 2019-08-18T05:04:20.000Z | 2022-03-31T06:49:19.000Z | AutotestWebD/apps/interface/services/HTTP_interface_debugService.py | LinSongJian1985/sosotest | 091863dee531b5726650bb63efd6f169267cbeb4 | [
"MIT"
] | 10 | 2019-10-24T09:55:38.000Z | 2021-09-29T17:28:43.000Z | AutotestWebD/apps/interface/services/HTTP_interface_debugService.py | LinSongJian1985/sosotest | 091863dee531b5726650bb63efd6f169267cbeb4 | [
"MIT"
] | 202 | 2019-08-18T05:04:27.000Z | 2022-03-30T05:57:18.000Z | import apps.common.func.InitDjango
from all_models.models import TbHttpInterface,TbHttpInterfaceDebug
from django.db import connection
from django.forms.models import model_to_dict
from apps.common.func.CommonFunc import *
from apps.common.config import commonWebConfig
class HTTP_interfaceDebugService(object):
@s... | 38.145161 | 90 | 0.655391 |
8b968ffed313f67876bebdb3463ef51939213611 | 2,884 | py | Python | Natural Language Processsing/NLP Course in Python/Topic 12 - Sentiment Analysis/sentiment_mod.py | bilwa496/NLP-Basics-Intermediate | 84e37827b2512345c1227be772e2d69034524ca0 | [
"MIT"
] | null | null | null | Natural Language Processsing/NLP Course in Python/Topic 12 - Sentiment Analysis/sentiment_mod.py | bilwa496/NLP-Basics-Intermediate | 84e37827b2512345c1227be772e2d69034524ca0 | [
"MIT"
] | null | null | null | Natural Language Processsing/NLP Course in Python/Topic 12 - Sentiment Analysis/sentiment_mod.py | bilwa496/NLP-Basics-Intermediate | 84e37827b2512345c1227be772e2d69034524ca0 | [
"MIT"
] | null | null | null | import random
import pickle
import nltk
from nltk.classify.scikitlearn import SklearnClassifier
from nltk.classify import ClassifierI
from nltk.tokenize import word_tokenize
from nltk.tag import pos_tag
from sklearn.naive_bayes import MultinomialNB, BernoulliNB
from sklearn.linear_model import LogisticRegression, SGD... | 26.458716 | 79 | 0.75 |
6c9abebaf6be06c27af946066c187f79c02b0bd2 | 1,706 | py | Python | profiles_api/migrations/0001_initial.py | Pathomhpong/profiles-rest-api | 697bc0dd7397c498abb09dd7a8c8f75c172a3088 | [
"MIT"
] | null | null | null | profiles_api/migrations/0001_initial.py | Pathomhpong/profiles-rest-api | 697bc0dd7397c498abb09dd7a8c8f75c172a3088 | [
"MIT"
] | null | null | null | profiles_api/migrations/0001_initial.py | Pathomhpong/profiles-rest-api | 697bc0dd7397c498abb09dd7a8c8f75c172a3088 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-07-14 10:08
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0011_update_proxy_permissions'),
]
operations = [
migrations.CreateModel(
name='UserProfile',
... | 50.176471 | 266 | 0.638921 |
4fc420ca3bdf5e01b2801b6d5d1fc789d43d4c07 | 4,311 | py | Python | azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure/mgmt/trafficmanager/traffic_manager_management_client.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 54 | 2016-03-25T17:25:01.000Z | 2018-10-22T17:27:54.000Z | azure/mgmt/trafficmanager/traffic_manager_management_client.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 ... | 43.989796 | 105 | 0.727673 |
031a14eb4733c18fc97b38c9471ab6dc9aec2706 | 1,350 | py | Python | dqn_zoo/rainbow_flare/run_atari_test.py | WendyShang/dqn_zoo | 465aedaee48a6e13cb141808abf23876a1b21e4e | [
"Apache-2.0"
] | 3 | 2021-02-04T23:13:51.000Z | 2021-11-06T10:21:50.000Z | dqn_zoo/rainbow_flare/run_atari_test.py | WendyShang/dqn_zoo | 465aedaee48a6e13cb141808abf23876a1b21e4e | [
"Apache-2.0"
] | null | null | null | dqn_zoo/rainbow_flare/run_atari_test.py | WendyShang/dqn_zoo | 465aedaee48a6e13cb141808abf23876a1b21e4e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Limited. 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 ... | 30 | 80 | 0.711111 |
279842e17481bd2416e89b34001cba7883a4b2a5 | 3,610 | py | Python | lliregistration_back/foundation/migrations/0004_auto_20191203_1519.py | ydang5/final-project-back | ae8b0ff2b340b521b70e3b0c25ab8cb4b64ac453 | [
"BSD-3-Clause"
] | null | null | null | lliregistration_back/foundation/migrations/0004_auto_20191203_1519.py | ydang5/final-project-back | ae8b0ff2b340b521b70e3b0c25ab8cb4b64ac453 | [
"BSD-3-Clause"
] | null | null | null | lliregistration_back/foundation/migrations/0004_auto_20191203_1519.py | ydang5/final-project-back | ae8b0ff2b340b521b70e3b0c25ab8cb4b64ac453 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.6 on 2019-12-03 15:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('foundation', '0003_auto_20191203_1506'),
]
operations = [
migrations.AlterField(
model_name='llistudentdata',
name='... | 36.464646 | 146 | 0.58892 |
05a1a37a0312a72550e7acc3ade270a867fe27d7 | 1,549 | py | Python | packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickfont.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickfont.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/bar/marker/colorbar/_tickfont.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="tickfont", parent_name="bar.marker.colorbar", **kwargs
):
super(TickfontValidator, self).__init__(
plotly_name=plotly_name,
pare... | 38.725 | 81 | 0.556488 |
12564cb2146557d4de461fa5ac80c69753492884 | 3,712 | py | Python | src/user_info.py | nothinghope3/instabot.py | a4f5e52d13bad2c45a24fb8e5049ba79e8ad2eb6 | [
"MIT"
] | 3 | 2021-01-09T04:09:44.000Z | 2021-08-16T17:00:44.000Z | src/user_info.py | nothinghope3/instabot.py | a4f5e52d13bad2c45a24fb8e5049ba79e8ad2eb6 | [
"MIT"
] | null | null | null | src/user_info.py | nothinghope3/instabot.py | a4f5e52d13bad2c45a24fb8e5049ba79e8ad2eb6 | [
"MIT"
] | 2 | 2022-01-02T11:36:09.000Z | 2022-03-09T09:54:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import json
import random
import time
import re
def get_user_info(self, username):
current_user = username
log_string = "Getting user info : %s" % current_user
self.write_log(log_string)
if self.login_status == 1:
url_tag = self.url... | 38.268041 | 93 | 0.535291 |
0b2970d84ad4532a57662fbb006e47357f080511 | 511 | py | Python | whats_fresh/urls.py | osu-cass/whats-fresh-api | 0ace76c3d7d423e95d5e3b3c7cd0f74abcf975bd | [
"Apache-2.0"
] | 4 | 2015-08-20T19:38:03.000Z | 2016-01-20T18:52:24.000Z | whats_fresh/urls.py | osu-cass/whats-fresh-api | 0ace76c3d7d423e95d5e3b3c7cd0f74abcf975bd | [
"Apache-2.0"
] | 39 | 2015-01-08T23:50:47.000Z | 2021-01-05T20:19:15.000Z | whats_fresh/urls.py | osu-cass/whats-fresh-api | 0ace76c3d7d423e95d5e3b3c7cd0f74abcf975bd | [
"Apache-2.0"
] | 8 | 2015-03-07T23:52:30.000Z | 2015-12-25T04:25:23.000Z | from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
(r'^', include('whats_fresh.whats_fresh_api.urls')),
)
if settings.DEBUG:
# Allow stati... | 26.894737 | 64 | 0.65362 |
8ee77f8af7f4f737fcd8d5dd5c2a5abc41f6105e | 1,161 | py | Python | final_project/machinetranslation/translator.py | Giulio987/xzceb-flask_eng_fr | 704386931e032c6c149eaed3b39b874395d25618 | [
"Apache-2.0"
] | null | null | null | final_project/machinetranslation/translator.py | Giulio987/xzceb-flask_eng_fr | 704386931e032c6c149eaed3b39b874395d25618 | [
"Apache-2.0"
] | null | null | null | final_project/machinetranslation/translator.py | Giulio987/xzceb-flask_eng_fr | 704386931e032c6c149eaed3b39b874395d25618 | [
"Apache-2.0"
] | null | null | null | #import json
import os
from ibm_watson import LanguageTranslatorV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from dotenv import load_dotenv
load_dotenv()
apikey = os.environ['apikey']
url = os.environ['url']
authenticator = IAMAuthenticator(apikey)
language_translator = LanguageTranslatorV3(
... | 29.769231 | 99 | 0.728682 |
4297231d77d1dd0fc298fe508723210a3c32aa7b | 4,734 | py | Python | CSScoring.py | E10-10/Product-Clustering | 39dd49c3dbc25d5ae4a8c7ba523a603ad7a7274d | [
"MIT"
] | null | null | null | CSScoring.py | E10-10/Product-Clustering | 39dd49c3dbc25d5ae4a8c7ba523a603ad7a7274d | [
"MIT"
] | null | null | null | CSScoring.py | E10-10/Product-Clustering | 39dd49c3dbc25d5ae4a8c7ba523a603ad7a7274d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: <encoding name> -*-
"""
CSScoring.py: Collection of tools for cgn-data-21-1
Capstone Project: Product Clustering
Functions:
f_score_i(cl_real_i, cl_pred_i):
return: 2*len(s_intsec) / (len(s_pred)+len(s_real))
recall_i(cl_real_i, cl_pred_i):
retu... | 30.346154 | 105 | 0.644487 |
633b8aeaafc9bbbe503811ad6a5059abbadeebd8 | 82 | py | Python | Simulation/GUI/src/gui/program /program_frame.py | fontysrobotics/ARMinor-2020-Maniputaltor-with-FOC-and-FPGA | 7a130fc62d0d5b22b585f2a7481636ae79e36b6d | [
"BSD-3-Clause"
] | 5 | 2020-08-30T14:20:54.000Z | 2022-03-25T07:29:59.000Z | Simulation/GUI/src/gui/program /program_frame.py | fontysrobotics/ARMinor-2020-Maniputaltor-with-FOC-and-FPGA | 7a130fc62d0d5b22b585f2a7481636ae79e36b6d | [
"BSD-3-Clause"
] | 3 | 2021-06-08T21:59:37.000Z | 2022-01-13T02:59:57.000Z | Simulation/GUI/src/gui/program /program_frame.py | fontysrobotics/ARMinor-2020-Maniputaltor-with-FOC-and-FPGA | 7a130fc62d0d5b22b585f2a7481636ae79e36b6d | [
"BSD-3-Clause"
] | 3 | 2020-07-03T10:23:40.000Z | 2020-11-11T03:31:07.000Z | # frame for the GUI related to programming the robot arm
# todo programming frame
| 27.333333 | 56 | 0.792683 |
eb3953658284222e3b47a25083479627c5fe3102 | 1,021 | py | Python | tensorflow/python/compiler/xla/__init__.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/python/compiler/xla/__init__.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 1,056 | 2019-12-15T01:20:31.000Z | 2022-02-10T02:06:28.000Z | tensorflow/python/compiler/xla/__init__.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.84 | 80 | 0.72478 |
3bff6b32e6075c00c1ddc81d07120e02fc09fb8a | 29,476 | py | Python | python/dgl/frame.py | shouhengtuo/dgl | 43c0a5471ed26887f265c9308d37e32b29857e27 | [
"Apache-2.0"
] | null | null | null | python/dgl/frame.py | shouhengtuo/dgl | 43c0a5471ed26887f265c9308d37e32b29857e27 | [
"Apache-2.0"
] | null | null | null | python/dgl/frame.py | shouhengtuo/dgl | 43c0a5471ed26887f265c9308d37e32b29857e27 | [
"Apache-2.0"
] | 1 | 2020-09-07T02:11:42.000Z | 2020-09-07T02:11:42.000Z | """Columnar storage for DGLGraph."""
from __future__ import absolute_import
from collections import namedtuple
from collections.abc import MutableMapping
import numpy as np
from . import backend as F
from .base import DGLError, dgl_warning
from .init import zero_initializer
from . import utils
class Scheme(namedtup... | 33.268623 | 94 | 0.57976 |
a301cdf056c2d2ec71e99d860985b637d5fca24c | 1,086 | py | Python | ctypes_generation/definitions/ntstatus_template.py | IMULMUL/PythonForWindows | 61e027a678d5b87aa64fcf8a37a6661a86236589 | [
"BSD-3-Clause"
] | 479 | 2016-01-08T00:53:34.000Z | 2022-03-22T10:28:19.000Z | ctypes_generation/definitions/ntstatus_template.py | IMULMUL/PythonForWindows | 61e027a678d5b87aa64fcf8a37a6661a86236589 | [
"BSD-3-Clause"
] | 38 | 2017-12-29T17:09:04.000Z | 2022-01-31T08:27:47.000Z | ctypes_generation/definitions/ntstatus_template.py | IMULMUL/PythonForWindows | 61e027a678d5b87aa64fcf8a37a6661a86236589 | [
"BSD-3-Clause"
] | 103 | 2016-01-10T01:32:17.000Z | 2021-12-24T17:21:06.000Z | import sys
import ctypes
from .flag import Flag
is_py3 = (sys.version_info.major >= 3)
class NtStatusException(WindowsError):
ALL_STATUS = {}
def __init__(self , code):
try:
x = self.ALL_STATUS[code]
except KeyError:
x = (code, 'UNKNOW_ERROR', 'Error non documented in n... | 29.351351 | 86 | 0.584715 |
9dae7f2a7ecc825f61acbbcc35f63a18dc8f09fc | 54,388 | py | Python | rapid7vmconsole/models/policy_override_submitter.py | pdeardorff-r7/vm-console-client-python | 4bee83aa4db2b328ba6894cebac55743f922ce5a | [
"MIT"
] | null | null | null | rapid7vmconsole/models/policy_override_submitter.py | pdeardorff-r7/vm-console-client-python | 4bee83aa4db2b328ba6894cebac55743f922ce5a | [
"MIT"
] | null | null | null | rapid7vmconsole/models/policy_override_submitter.py | pdeardorff-r7/vm-console-client-python | 4bee83aa4db2b328ba6894cebac55743f922ce5a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
InsightVM API
# Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses ... | 238.54386 | 48,045 | 0.49726 |
7fb15a6d4da97b9b8236b688ebeb958245985b2d | 6,817 | py | Python | salt/utils/openstack/swift.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 2 | 2017-09-17T21:10:35.000Z | 2019-08-26T03:00:12.000Z | salt/utils/openstack/swift.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/utils/openstack/swift.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 3 | 2021-02-23T08:12:48.000Z | 2021-02-23T08:13:13.000Z | # -*- coding: utf-8 -*-
'''
Swift utility class
===================
Author: Anthony Stanton <anthony.stanton@gmail.com>
'''
# Import python libs
import logging
from sys import stdout
from os import makedirs
from os.path import dirname, isdir
from errno import EEXIST
# Get logging started
log = logging.getLogger(__nam... | 29.008511 | 111 | 0.526918 |
c6465f75c629db4b76d78d7095b3f33c40283f7b | 185 | py | Python | run.py | galactaknife/webchat | eff610365128989ff2d58a6d75a51d735b16dd98 | [
"Apache-2.0"
] | 2 | 2021-03-13T15:27:19.000Z | 2021-03-13T15:27:21.000Z | run.py | galactaknife/webchat | eff610365128989ff2d58a6d75a51d735b16dd98 | [
"Apache-2.0"
] | null | null | null | run.py | galactaknife/webchat | eff610365128989ff2d58a6d75a51d735b16dd98 | [
"Apache-2.0"
] | null | null | null | from __init__ import create_app, socketio
# Get app instance
app = create_app()
# Run app through socketio
if __name__ == "__main__":
socketio.run(app, host="0.0.0.0", port=5000)
| 20.555556 | 48 | 0.713514 |
227cd6fd3f5cfff5b9275faaa6f8257c7f0a19e6 | 400 | py | Python | main.py | chucoding/Notion2Github | 820aace4e6f52a42adf2587f5c77ef768c4e1586 | [
"MIT"
] | null | null | null | main.py | chucoding/Notion2Github | 820aace4e6f52a42adf2587f5c77ef768c4e1586 | [
"MIT"
] | null | null | null | main.py | chucoding/Notion2Github | 820aace4e6f52a42adf2587f5c77ef768c4e1586 | [
"MIT"
] | null | null | null | from fastapi import FastAPI
from fastapi.logger import logger
from api import export_svg
app = FastAPI()
@app.get('/')
def hello_world():
logger.debug('hello_world')
return 'Hello World!'
@app.get('/calendar')
def show_calendar():
return export_svg.write()
if __name__ == '__main__':
import uvicorn... | 21.052632 | 79 | 0.695 |
98074a197618f76796753cf2d19fceba91c9c32c | 64,669 | py | Python | GenEO/precond.py | gouarin/DDM_elasticity | d72b284fcc9d98b437d580f1b2a94b99250fa6e5 | [
"BSD-3-Clause"
] | 9 | 2018-05-29T10:53:43.000Z | 2021-10-11T02:30:59.000Z | GenEO/precond.py | gouarin/DDM_elasticity | d72b284fcc9d98b437d580f1b2a94b99250fa6e5 | [
"BSD-3-Clause"
] | null | null | null | GenEO/precond.py | gouarin/DDM_elasticity | d72b284fcc9d98b437d580f1b2a94b99250fa6e5 | [
"BSD-3-Clause"
] | 1 | 2019-12-31T16:14:48.000Z | 2019-12-31T16:14:48.000Z | # Authors:
# Loic Gouarin <loic.gouarin@cmap.polytechnique.fr>
# Nicole Spillane <nicole.spillane@cmap.polytechnique.fr>
#
# License: BSD 3 clause
from .assembling import buildElasticityMatrix
from .bc import bcApplyWestMat, bcApplyWest_vec
from .cg import cg
from .projection import projection, GenEO_V0, minima... | 43.69527 | 293 | 0.600597 |
401c4d078a76dac21366d7cb1fb9c12daafe629a | 559 | py | Python | Maths_And_Stats/Algebra/LCM/LCM.py | arslantalib3/algo_ds_101 | a1293f407e00b8346f93e8770727f769e7add00e | [
"MIT"
] | 182 | 2020-10-01T17:16:42.000Z | 2021-10-04T17:52:49.000Z | Maths_And_Stats/Algebra/LCM/LCM.py | arslantalib3/algo_ds_101 | a1293f407e00b8346f93e8770727f769e7add00e | [
"MIT"
] | 759 | 2020-10-01T00:12:21.000Z | 2021-10-04T19:35:11.000Z | Maths_And_Stats/Algebra/LCM/LCM.py | arslantalib3/algo_ds_101 | a1293f407e00b8346f93e8770727f769e7add00e | [
"MIT"
] | 1,176 | 2020-10-01T16:02:13.000Z | 2021-10-04T19:20:19.000Z | def lcm(x:int, y:int) -> int:
'''
Input: 2 integers x and y
Output: The smallest integer which is divisible by both x and y
'''
greater = max(x,y)
lesser = min(x,y)
multiple = 1
while ((greater * multiple) % lesser != 0):
# I use <greater * multiple> instead of <lesser * multiple> because gre... | 23.291667 | 116 | 0.615385 |
de1da973a80509f566975799e63c9aedec30eb3a | 436 | py | Python | A3 - RL/rl_assignments/rl4_hyperparameters_and_environment/student_4_2_1.py | NickSmyr/ai-player-agents | f8972d02c53a2ba566b541b1270a0637e3d3e5c7 | [
"MIT"
] | null | null | null | A3 - RL/rl_assignments/rl4_hyperparameters_and_environment/student_4_2_1.py | NickSmyr/ai-player-agents | f8972d02c53a2ba566b541b1270a0637e3d3e5c7 | [
"MIT"
] | null | null | null | A3 - RL/rl_assignments/rl4_hyperparameters_and_environment/student_4_2_1.py | NickSmyr/ai-player-agents | f8972d02c53a2ba566b541b1270a0637e3d3e5c7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# rewards: [golden_fish, jellyfish_1, jellyfish_2, ... , step]
rewards = [10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 1000]
# Q learning learning rate
alpha = 0.1
# Q learning discount rate
gamma = 0.1
# Epsilon initial
epsilon_initial = 1.0
# Epsilon final
epsilon_final = 0.0
... | 18.956522 | 75 | 0.678899 |
a50b82a1479a923e9778c17eaebc8937201aa750 | 62,396 | py | Python | pytorch3d/renderer/cameras.py | tobyclh/pytorch3d | cac6cb1b7813a4f09a05e0ade43c63292bb08b79 | [
"BSD-3-Clause"
] | 1 | 2021-11-17T01:46:24.000Z | 2021-11-17T01:46:24.000Z | pytorch3d/renderer/cameras.py | tobyclh/pytorch3d | cac6cb1b7813a4f09a05e0ade43c63292bb08b79 | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/renderer/cameras.py | tobyclh/pytorch3d | cac6cb1b7813a4f09a05e0ade43c63292bb08b79 | [
"BSD-3-Clause"
] | 1 | 2022-01-05T15:03:24.000Z | 2022-01-05T15:03:24.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import math
import warnings
from typing import List, Optional, Sequence, Tuple, Union
import numpy as np
import ... | 37.792853 | 103 | 0.592859 |
cd7a545035a8a2632537032d9128821167d55f23 | 665 | py | Python | internos/activityinfo/migrations/0106_auto_20200206_1444.py | UNICEFLebanonInnovation/Staging-Neuro | aac1e4f335ff4ec32041f989a9c22f8581a4961a | [
"MIT"
] | null | null | null | internos/activityinfo/migrations/0106_auto_20200206_1444.py | UNICEFLebanonInnovation/Staging-Neuro | aac1e4f335ff4ec32041f989a9c22f8581a4961a | [
"MIT"
] | null | null | null | internos/activityinfo/migrations/0106_auto_20200206_1444.py | UNICEFLebanonInnovation/Staging-Neuro | aac1e4f335ff4ec32041f989a9c22f8581a4961a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2020-02-06 12:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('activityinfo', '0105_auto_20200206_1435'),
]
operations = [
migrations.Alt... | 25.576923 | 74 | 0.613534 |
492aff2a89642db7db9e303a7ae1268e65bc30a5 | 4,913 | py | Python | year2021/python/day4.py | Infekma/Infekma-Advent-Of-Code | 4078d076f250b22c1dc3271a5fd74d31b6fb8b77 | [
"MIT"
] | null | null | null | year2021/python/day4.py | Infekma/Infekma-Advent-Of-Code | 4078d076f250b22c1dc3271a5fd74d31b6fb8b77 | [
"MIT"
] | null | null | null | year2021/python/day4.py | Infekma/Infekma-Advent-Of-Code | 4078d076f250b22c1dc3271a5fd74d31b6fb8b77 | [
"MIT"
] | null | null | null | import aocd
import csv
from numpy import matrixlib
YEAR = 2021
DAY = 4
# simple class representation for single value on the bingo board
class BingoEntry:
def __init__(self, value):
self.value = int(value)
self.isMarked = False
# checks if this entry matches the provided value
# if the en... | 32.322368 | 95 | 0.621209 |
ffaaade5da2a5be04529af54bacac0ef586742f1 | 74,901 | py | Python | airflow/www/views.py | rahul342/airflow | 2107dc97ca0b17131ad5cbda6c91301acf5a6079 | [
"Apache-2.0"
] | null | null | null | airflow/www/views.py | rahul342/airflow | 2107dc97ca0b17131ad5cbda6c91301acf5a6079 | [
"Apache-2.0"
] | null | null | null | airflow/www/views.py | rahul342/airflow | 2107dc97ca0b17131ad5cbda6c91301acf5a6079 | [
"Apache-2.0"
] | null | null | null | import sys
import os
import socket
from functools import wraps
from datetime import datetime, timedelta
import dateutil.parser
import copy
from itertools import chain, product
from past.utils import old_div
from past.builtins import basestring
import inspect
import traceback
import sqlalchemy as sqla
from sqlalche... | 34.468937 | 101 | 0.536348 |
baaf58bddd668d5332b78340221fc5ae8415aada | 984 | py | Python | examples/classes/toys_with_info_hiding.py | bjucps/cps110 | da67f832aeded810fad011a6675d049a2201b2b3 | [
"MIT"
] | null | null | null | examples/classes/toys_with_info_hiding.py | bjucps/cps110 | da67f832aeded810fad011a6675d049a2201b2b3 | [
"MIT"
] | null | null | null | examples/classes/toys_with_info_hiding.py | bjucps/cps110 | da67f832aeded810fad011a6675d049a2201b2b3 | [
"MIT"
] | 5 | 2020-02-06T20:35:55.000Z | 2022-02-10T23:01:20.000Z | class Toy:
def __init__(self, newdescr: str, newlovable: float):
self.__description = newdescr
self.__lovable = newlovable
def getDescription(self) -> str:
return self.__description
def getLovable(self) -> float:
return self.__lovable
def setDescription(self, newdescr:... | 21.866667 | 82 | 0.635163 |
1aa74ccea974596bc4368ab55748a2644d5bd00e | 582 | py | Python | app.py | Mycheny/simbert | 833398f95cff23be5e303e561a0ea39a5b73c4c7 | [
"Apache-2.0"
] | null | null | null | app.py | Mycheny/simbert | 833398f95cff23be5e303e561a0ea39a5b73c4c7 | [
"Apache-2.0"
] | null | null | null | app.py | Mycheny/simbert | 833398f95cff23be5e303e561a0ea39a5b73c4c7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @File app.py
# @Time 2020/12/7 17:24
# @Author wcy
# @Software: PyCharm
# @Site
import json
import os
from flask import Blueprint, jsonify, request, Flask
from simbert import gen_synonyms
os.environ["CUDA_VISIBLE_DEVICES"] = "3"
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
@app... | 21.555556 | 52 | 0.646048 |
5e7a184fbab8de60b20867a4e647091083a302ab | 20,525 | py | Python | salt/modules/pillar.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | null | null | null | salt/modules/pillar.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | null | null | null | salt/modules/pillar.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:42:31.000Z | 2019-06-10T17:42:31.000Z | # -*- coding: utf-8 -*-
'''
Extract the pillar data for this minion
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import collections
# Import third party libs
import copy
import os
import copy
import logging
from salt.ext import six
# Import salt libs
import salt.p... | 33.104839 | 105 | 0.623484 |
87b2299b4e6a9771fc52ea07cd4193d49ff6d7a6 | 5,846 | py | Python | django_extensions/management/commands/drop_test_database.py | todaycode/django-ext | 213abda56cf95a3fe4059de106dd7106935fe72a | [
"MIT"
] | null | null | null | django_extensions/management/commands/drop_test_database.py | todaycode/django-ext | 213abda56cf95a3fe4059de106dd7106935fe72a | [
"MIT"
] | null | null | null | django_extensions/management/commands/drop_test_database.py | todaycode/django-ext | 213abda56cf95a3fe4059de106dd7106935fe72a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import logging
import warnings
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS
from django.db.backends.base.creation import TEST_DATABASE_PREFIX
from six.moves import input
from django_extension... | 38.20915 | 122 | 0.605542 |
1a5cd497ec9c3e22326a1639cfed468c652cda25 | 607 | py | Python | tests/test_colorchanger.py | wcchristian/pi-tv-colorchange | 8e6d51dd3c9835bf35dd0b8de10c65adf048c782 | [
"MIT"
] | null | null | null | tests/test_colorchanger.py | wcchristian/pi-tv-colorchange | 8e6d51dd3c9835bf35dd0b8de10c65adf048c782 | [
"MIT"
] | 12 | 2019-05-25T02:57:34.000Z | 2019-06-19T03:04:34.000Z | tests/test_colorchanger.py | wcchristian/pi-tv-colorchange | 8e6d51dd3c9835bf35dd0b8de10c65adf048c782 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import MagicMock
from colorchanger import colorchanger
class MyTestCase(unittest.TestCase):
@staticmethod
def test_set_hue_color():
# Given
hue_light_id = 1
rgb_color = (0, 255, 0)
colorchanger.hue_bridge.set_light = MagicMock(return_value=No... | 24.28 | 84 | 0.686985 |
bb04809805afba0f681673359c6b31ae62b0ee2b | 5,082 | py | Python | hw/ip/otbn/dv/rig/rig/gens/bad_branch.py | y-srini/opentitan | b46a08d07671c9d6c020e54fb44424f1611c43a0 | [
"Apache-2.0"
] | null | null | null | hw/ip/otbn/dv/rig/rig/gens/bad_branch.py | y-srini/opentitan | b46a08d07671c9d6c020e54fb44424f1611c43a0 | [
"Apache-2.0"
] | 1 | 2022-02-15T22:20:51.000Z | 2022-02-15T22:20:51.000Z | hw/ip/otbn/dv/rig/rig/gens/bad_branch.py | y-srini/opentitan | b46a08d07671c9d6c020e54fb44424f1611c43a0 | [
"Apache-2.0"
] | 1 | 2021-12-04T06:08:11.000Z | 2021-12-04T06:08:11.000Z | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import random
from typing import Optional
from shared.operand import ImmOperandType, RegOperandType
from shared.insn_yaml import InsnsFile
from ..config import Config
fro... | 36.042553 | 82 | 0.617277 |
08c15f906ef35f42451e358f33ceea13926f91fb | 23,353 | py | Python | electrum_plcu/submarine_swaps.py | plc-ultima/electrum-plcu | 149e53db286d831b5aba78983c4f9d4c0ff485a5 | [
"MIT"
] | null | null | null | electrum_plcu/submarine_swaps.py | plc-ultima/electrum-plcu | 149e53db286d831b5aba78983c4f9d4c0ff485a5 | [
"MIT"
] | null | null | null | electrum_plcu/submarine_swaps.py | plc-ultima/electrum-plcu | 149e53db286d831b5aba78983c4f9d4c0ff485a5 | [
"MIT"
] | null | null | null | import asyncio
import json
import os
from typing import TYPE_CHECKING, Optional, Dict, Union
from decimal import Decimal
import math
import attr
from .crypto import sha256, hash_160
from .ecc import ECPrivkey
from .bitcoin import (script_to_p2wsh, opcodes, p2wsh_nested_script, push_script,
is_se... | 42.928309 | 137 | 0.642359 |
7090e1b10146ef4c5d847f5f61e77af035ffb594 | 3,917 | py | Python | run_with_submitit.py | gstoica27/Swin-Transformer | 79ef4e0284f95d25a9bb64cfc72d6d683aab0bef | [
"MIT"
] | null | null | null | run_with_submitit.py | gstoica27/Swin-Transformer | 79ef4e0284f95d25a9bb64cfc72d6d683aab0bef | [
"MIT"
] | null | null | null | run_with_submitit.py | gstoica27/Swin-Transformer | 79ef4e0284f95d25a9bb64cfc72d6d683aab0bef | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
A script to run multinode training with submitit.
"""
import argparse
import os
import uuid
from pathlib import Path
import main as swin
import submitit
# Please change path before use - one time set up
LOGS_PATH = "/nethome/bdevnani3/raid/Swi... | 29.231343 | 87 | 0.668624 |
c1f9d5463739584cbd046f0a4236e5a84c56b8ff | 30,177 | py | Python | tests/test_jutil.py | karpierz/jtypes.javabridge | ee519456d4048e55a0696c28bdf3c727667b5b50 | [
"BSD-3-Clause"
] | null | null | null | tests/test_jutil.py | karpierz/jtypes.javabridge | ee519456d4048e55a0696c28bdf3c727667b5b50 | [
"BSD-3-Clause"
] | null | null | null | tests/test_jutil.py | karpierz/jtypes.javabridge | ee519456d4048e55a0696c28bdf3c727667b5b50 | [
"BSD-3-Clause"
] | null | null | null | '''test_jutil.py - test the high-level interface
python-javabridge is licensed under the BSD license. See the
accompanying file LICENSE for details.
Copyright (c) 2003-2009 Massachusetts Institute of Technology
Copyright (c) 2009-2013 Broad Institute
All rights reserved.
'''
from __future__ import absolute_import
... | 42.865057 | 114 | 0.602843 |
c525dd8ae57209a92b408f189d82f91f17b6c90a | 243 | py | Python | setup.py | khickey25/medical_image_interpretability_scratch_work | d88266a458ebf2812c7cccb1efa115de98e0db52 | [
"MIT"
] | null | null | null | setup.py | khickey25/medical_image_interpretability_scratch_work | d88266a458ebf2812c7cccb1efa115de98e0db52 | [
"MIT"
] | null | null | null | setup.py | khickey25/medical_image_interpretability_scratch_work | d88266a458ebf2812c7cccb1efa115de98e0db52 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='Scratch work for medial image interpretability analysis project',
author='Kevin',
license='MIT',
)
| 22.090909 | 82 | 0.695473 |
1ff05f68c8287dede2e6cba6f861241154151cb1 | 3,813 | py | Python | IMPORTANT_INFO.py | vasetousa/Python-fundamentals | 3180c03de28b4f4d36d966221719069a7e18e521 | [
"MIT"
] | null | null | null | IMPORTANT_INFO.py | vasetousa/Python-fundamentals | 3180c03de28b4f4d36d966221719069a7e18e521 | [
"MIT"
] | null | null | null | IMPORTANT_INFO.py | vasetousa/Python-fundamentals | 3180c03de28b4f4d36d966221719069a7e18e521 | [
"MIT"
] | null | null | null | #
#
# s = "Count, the number of spaces"
# print(s.count(' '))
#
#
# word = "Hello My World"
# print(word.count('l')) # count how many times l is in the string
#
#
# print(word.find("H")) # find the word H in the string
#
# print(word.index("World")) # find the letters World in the string
#
#
#
# word = "Hello World"... | 31.775 | 127 | 0.618148 |
2852770c058867d8826914a383790fce5d75f2f3 | 3,336 | py | Python | Data Structures and Algorithms/Linked List/01. Singly Linked List.py | luckyrabbit85/Python | ed134fd70b4a7b84b183b87b85ad5190f54c9526 | [
"MIT"
] | 1 | 2021-07-15T18:40:26.000Z | 2021-07-15T18:40:26.000Z | Data Structures and Algorithms/Linked List/01. Singly Linked List.py | luckyrabbit85/Python | ed134fd70b4a7b84b183b87b85ad5190f54c9526 | [
"MIT"
] | null | null | null | Data Structures and Algorithms/Linked List/01. Singly Linked List.py | luckyrabbit85/Python | ed134fd70b4a7b84b183b87b85ad5190f54c9526 | [
"MIT"
] | null | null | null | class Node:
def __init__(self, value=None):
self.value = value
self.next = None
class SLinkedList:
def __init__(self):
self.head = None
self.tail = None
def __iter__(self):
node = self.head
while node:
yield node
node = node.next
... | 29.263158 | 58 | 0.506595 |
0a7be655332cca09ba8fb4f0516f2b57bc6d6e3e | 16,802 | py | Python | conans/test/integration/profile_test.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | conans/test/integration/profile_test.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | conans/test/integration/profile_test.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | import unittest
from conans.client import tools
from conans.test.utils.tools import TestClient
from conans.test.utils.cpp_test_files import cpp_hello_conan_files
from conans.util.files import save, load
import os
from conans.paths import CONANFILE
from collections import OrderedDict
from conans.test.utils.test_files i... | 42.753181 | 99 | 0.630461 |
17b8d225b55dd70bbc9ecb294ae455be7b0559d9 | 3,599 | py | Python | sdk/identity/azure-identity/azure/identity/aio/_internal/get_token_mixin.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1 | 2021-09-16T02:33:52.000Z | 2021-09-16T02:33:52.000Z | sdk/identity/azure-identity/azure/identity/aio/_internal/get_token_mixin.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2 | 2021-08-24T15:32:30.000Z | 2021-08-24T23:21:34.000Z | sdk/identity/azure-identity/azure/identity/aio/_internal/get_token_mixin.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1 | 2016-04-19T22:15:47.000Z | 2016-04-19T22:15:47.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import abc
import logging
import time
from typing import TYPE_CHECKING
from ..._constants import DEFAULT_REFRESH_OFFSET, DEFAULT_TOKEN_REFRESH_RETRY_DELAY
from ..._inte... | 39.988889 | 120 | 0.626841 |
50b9e1b032ee610aebe972988439ee6e9d6d90b3 | 3,980 | py | Python | src/data/dataClean_bang.py | rockpiyush/Prediction-house-pricing | eb8bd5160624bd925389235fee4e33df41eacd19 | [
"MIT"
] | null | null | null | src/data/dataClean_bang.py | rockpiyush/Prediction-house-pricing | eb8bd5160624bd925389235fee4e33df41eacd19 | [
"MIT"
] | null | null | null | src/data/dataClean_bang.py | rockpiyush/Prediction-house-pricing | eb8bd5160624bd925389235fee4e33df41eacd19 | [
"MIT"
] | 4 | 2018-02-09T15:24:21.000Z | 2020-04-30T09:01:00.000Z | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.preprocessing import StandardScaler
from scipy.stats import norm
from scipy import stats
df_test = pd.read_csv("../../test.csv")
df_train = pd.read_csv("../../train.csv")
#查看目标数据详细信息
#count 1460.000000
#mea... | 32.892562 | 141 | 0.732161 |
daba1a8cc7d86fdeacce5834b4c188aaa8cc25c8 | 412 | py | Python | deleting_face.py | olgOk/AngelHack-Hackathon-June2019 | bd44bb9a27df25bb31a4d70d9c3cbb5530717ec7 | [
"MIT"
] | null | null | null | deleting_face.py | olgOk/AngelHack-Hackathon-June2019 | bd44bb9a27df25bb31a4d70d9c3cbb5530717ec7 | [
"MIT"
] | null | null | null | deleting_face.py | olgOk/AngelHack-Hackathon-June2019 | bd44bb9a27df25bb31a4d70d9c3cbb5530717ec7 | [
"MIT"
] | null | null | null | import boto3
if __name__ == "__main__":
collectionId='Gamers'
faces=["d5e10426-1383-4674-8025-384a6fff661b"]
client=boto3.client('rekognition')
response=client.delete_faces(CollectionId=collectionId,
FaceIds=faces)
print(str(len(response['DeletedFaces'])) + ' ... | 27.466667 | 73 | 0.628641 |
29e1dc095b78a27ca945dda23d00f70a09926053 | 44 | py | Python | beat_evaluation_toolbox/__init__.py | Fhrozen/Beat-Tracking-Evaluation-Toolbox | 652521cc8cb82c794f28975731d93e736a40f09c | [
"MIT"
] | null | null | null | beat_evaluation_toolbox/__init__.py | Fhrozen/Beat-Tracking-Evaluation-Toolbox | 652521cc8cb82c794f28975731d93e736a40f09c | [
"MIT"
] | null | null | null | beat_evaluation_toolbox/__init__.py | Fhrozen/Beat-Tracking-Evaluation-Toolbox | 652521cc8cb82c794f28975731d93e736a40f09c | [
"MIT"
] | null | null | null | from beat_evaluation_toolbox.main import *
| 22 | 43 | 0.840909 |
cad39b9d21d487ae3d06dad3eae3e452ba8051e3 | 3,426 | py | Python | aoc/year_2021/day_05/solver.py | logan-connolly/AoC | 23f47e72abaf438cc97897616be4d6b057a01bf3 | [
"MIT"
] | 2 | 2020-12-06T10:59:52.000Z | 2021-09-29T22:14:03.000Z | aoc/year_2021/day_05/solver.py | logan-connolly/AoC | 23f47e72abaf438cc97897616be4d6b057a01bf3 | [
"MIT"
] | null | null | null | aoc/year_2021/day_05/solver.py | logan-connolly/AoC | 23f47e72abaf438cc97897616be4d6b057a01bf3 | [
"MIT"
] | 2 | 2021-09-29T22:14:18.000Z | 2022-01-18T02:20:26.000Z | """This is the Solution for Year 2021 Day 05"""
import itertools
from collections import Counter
from dataclasses import dataclass
from aoc.abstracts.solver import Answers, StrLines
@dataclass(frozen=True)
class Point:
"""Immutable point that will define x and y on 2D plane"""
x: int
y: int
@dataclas... | 31.145455 | 83 | 0.66725 |
c604690602a1802ebd8d2d45cf47322e205d3b58 | 2,997 | py | Python | sprox/metadata.py | carl-wallace/sprox | 69c8639b86318c28bbaad36125232d144d8be380 | [
"MIT"
] | 3 | 2015-07-03T16:31:22.000Z | 2018-04-19T04:26:02.000Z | sprox/metadata.py | carl-wallace/sprox | 69c8639b86318c28bbaad36125232d144d8be380 | [
"MIT"
] | 8 | 2015-02-23T23:01:50.000Z | 2021-07-06T14:10:26.000Z | sprox/metadata.py | carl-wallace/sprox | 69c8639b86318c28bbaad36125232d144d8be380 | [
"MIT"
] | 7 | 2015-06-14T04:07:53.000Z | 2020-04-28T13:50:50.000Z | """
matadata Module
This contains the class which defines the generic interface for metadata.
Basically, it provides an interface for how data is extracted from the provider
for widget generation.
Copyright (c) 2008 Christopher Perkins
Original Version by Christopher Perkins 2007
Released under MIT license.
"""
from ... | 30.896907 | 97 | 0.67701 |
87d36134a2850ce9a0335e3009b54e86f60c9e49 | 4,539 | py | Python | SBW_Classification_PyTorch/extension/normalization/cdWhiteningSigma.py | huangleiBuaa/StochasticityBW | 11db7ed0238f0c7cd5f6e336a087fc1d0427b1e6 | [
"BSD-2-Clause"
] | 8 | 2020-03-23T15:46:13.000Z | 2022-03-25T03:11:17.000Z | SBW_Classification_PyTorch/extension/normalization/cdWhiteningSigma.py | huangleiBuaa/StochasticityBW | 11db7ed0238f0c7cd5f6e336a087fc1d0427b1e6 | [
"BSD-2-Clause"
] | null | null | null | SBW_Classification_PyTorch/extension/normalization/cdWhiteningSigma.py | huangleiBuaa/StochasticityBW | 11db7ed0238f0c7cd5f6e336a087fc1d0427b1e6 | [
"BSD-2-Clause"
] | 1 | 2022-03-25T03:11:20.000Z | 2022-03-25T03:11:20.000Z | import torch.nn
from torch.nn import Parameter
__all__ = ['cdWhiteningSigma', 'CDWhiteningSigma']
class CDWhiteningSigma_Single(torch.nn.Module):
def __init__(self, num_features, dim=4, eps=1e-3, momentum=0.1, affine=True,
*args, **kwargs):
super(CDWhiteningSigma_Single, self).__init__... | 38.466102 | 133 | 0.614893 |
c1f69f27d2ac1911207c5c18ec8dfd08a5b6b074 | 670 | py | Python | venv/Scripts/django-admin.py | LucasHollas/CRUD_Django | a0add0fa382f19ed76b1cc7dac654e5f5e8e4a91 | [
"MIT"
] | null | null | null | venv/Scripts/django-admin.py | LucasHollas/CRUD_Django | a0add0fa382f19ed76b1cc7dac654e5f5e8e4a91 | [
"MIT"
] | null | null | null | venv/Scripts/django-admin.py | LucasHollas/CRUD_Django | a0add0fa382f19ed76b1cc7dac654e5f5e8e4a91 | [
"MIT"
] | null | null | null | #!d:\Python\venv\Scripts\python.exe
# When the django-admin.py deprecation ends, remove this script.
import warnings
from django.core import management
try:
from django.utils.deprecation import RemovedInDjango40Warning
except ImportError:
raise ImportError(
'django-admin.py was deprecated in Django 3.... | 30.454545 | 80 | 0.722388 |
77901b0343ff7459765ef4b3a5560079fbe4b1c6 | 5,822 | py | Python | RealData/Pumbed/main.py | Ikerlz/dcd | 056e5c4060f9d655ce4f6234b86481ae4b3f7106 | [
"MIT"
] | null | null | null | RealData/Pumbed/main.py | Ikerlz/dcd | 056e5c4060f9d655ce4f6234b86481ae4b3f7106 | [
"MIT"
] | null | null | null | RealData/Pumbed/main.py | Ikerlz/dcd | 056e5c4060f9d655ce4f6234b86481ae4b3f7106 | [
"MIT"
] | null | null | null | #!/home/lizhe/anaconda3/envs/pyspark/bin/python
from simulationfunc import *
from scipy.io import loadmat
from math import ceil
from pyspark import SparkContext
from pyspark import SparkConf
import os
import warnings
warnings.filterwarnings('ignore')
os.environ['JAVA_HOME'] = '/usr/lib/jvm/jdk8u252'
# Spark Environme... | 41.585714 | 110 | 0.63157 |
eea46bf69b00c9d69a175aad7ee44aad5445c0e8 | 6,487 | py | Python | code/tcp_server.py | Reydan46/Sonoff_Devices_DIY_Tools | 3ff3a5991cbb01e28559beb296fd4b39ef5d2f7c | [
"BSD-3-Clause"
] | null | null | null | code/tcp_server.py | Reydan46/Sonoff_Devices_DIY_Tools | 3ff3a5991cbb01e28559beb296fd4b39ef5d2f7c | [
"BSD-3-Clause"
] | null | null | null | code/tcp_server.py | Reydan46/Sonoff_Devices_DIY_Tools | 3ff3a5991cbb01e28559beb296fd4b39ef5d2f7c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This module is about server threads
class:
SeverThreadForQT:(Based on QThread)
"""
import json
from socket import *
from PySide2.QtCore import *
class SeverThreadForQT(QThread):
"""
This class handles data transfer using sockets directly
__init__... | 36.240223 | 95 | 0.517034 |
6324631c4820d1f310805cb2aa6db3e3a6a092a1 | 2,696 | py | Python | lib/rucio/db/sqla/migrate_repo/versions/0f1adb7a599a_create_transfer_hops_table.py | cfenell/rucio-1 | bf83b9d52e204f3bc912c42f2e149f18413e59e5 | [
"Apache-2.0"
] | null | null | null | lib/rucio/db/sqla/migrate_repo/versions/0f1adb7a599a_create_transfer_hops_table.py | cfenell/rucio-1 | bf83b9d52e204f3bc912c42f2e149f18413e59e5 | [
"Apache-2.0"
] | null | null | null | lib/rucio/db/sqla/migrate_repo/versions/0f1adb7a599a_create_transfer_hops_table.py | cfenell/rucio-1 | bf83b9d52e204f3bc912c42f2e149f18413e59e5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 CERN
#
# 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... | 40.238806 | 127 | 0.700668 |
a841837c81eecb77a166b30c29f91dd507506b88 | 12,418 | py | Python | nova/tests/unit/objects/test_migration.py | bopopescu/TestNova | fb6a183b54f87cc078dc6de5be89711ec0d9ac26 | [
"Apache-2.0"
] | 1 | 2018-08-19T02:13:16.000Z | 2018-08-19T02:13:16.000Z | nova/tests/unit/objects/test_migration.py | bopopescu/TestNova | fb6a183b54f87cc078dc6de5be89711ec0d9ac26 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/objects/test_migration.py | bopopescu/TestNova | fb6a183b54f87cc078dc6de5be89711ec0d9ac26 | [
"Apache-2.0"
] | 1 | 2020-07-22T22:13:56.000Z | 2020-07-22T22:13:56.000Z | # Copyright 2013 IBM Corp.
#
# 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... | 43.118056 | 78 | 0.636334 |
25f67b24dc255d0483dfad2a82ecccbdf60842e0 | 601 | py | Python | 038.Decorators_with_arguments/decorator_finish.py | adrija-bhandari/tutorials.python.Corey-Schafer-Python-Tutorial | 450d11f81c85793666a166f91892d3fc7de1dcdb | [
"MIT"
] | null | null | null | 038.Decorators_with_arguments/decorator_finish.py | adrija-bhandari/tutorials.python.Corey-Schafer-Python-Tutorial | 450d11f81c85793666a166f91892d3fc7de1dcdb | [
"MIT"
] | null | null | null | 038.Decorators_with_arguments/decorator_finish.py | adrija-bhandari/tutorials.python.Corey-Schafer-Python-Tutorial | 450d11f81c85793666a166f91892d3fc7de1dcdb | [
"MIT"
] | null | null | null | def prefix_decorator(prefix):
def decorator_function(original_function):
def wrapper_function(*args, **kwargs):
print(prefix, 'Executed Before', original_function.__name__)
result = original_function(*args, **kwargs)
print(prefix, 'Executed After', original_function.__nam... | 33.388889 | 77 | 0.678869 |
add8fba36f8806dcdee27f5d571324ed56384b4c | 468 | py | Python | data/scripts/templates/object/static/structure/general/shared_cave_stalagmite_tato_s01_small.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/static/structure/general/shared_cave_stalagmite_tato_s01_small.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/static/structure/general/shared_cave_stalagmite_tato_s01_small.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Static()
result.template = "object/static/structure/general/shared_cave_stalagmite_tato_s01_small.iff"
result.att... | 27.529412 | 94 | 0.737179 |
56c455d9c2d105ad4f8f51886464a4d29ce9b20d | 42,307 | py | Python | src/v5.1/resources/swagger_client/api/student_section_associations_api.py | xmarcosx/edfi-notebook | 0564ebdf1d0f45a9d25056e7e61369f0a837534d | [
"Apache-2.0"
] | 2 | 2021-04-27T17:18:17.000Z | 2021-04-27T19:14:39.000Z | src/v5.1/resources/swagger_client/api/student_section_associations_api.py | xmarcosx/edfi-notebook | 0564ebdf1d0f45a9d25056e7e61369f0a837534d | [
"Apache-2.0"
] | null | null | null | src/v5.1/resources/swagger_client/api/student_section_associations_api.py | xmarcosx/edfi-notebook | 0564ebdf1d0f45a9d25056e7e61369f0a837534d | [
"Apache-2.0"
] | 1 | 2022-01-06T09:43:11.000Z | 2022-01-06T09:43:11.000Z | # coding: utf-8
"""
Ed-Fi Operational Data Store API
The Ed-Fi ODS / API enables applications to read and write education data stored in an Ed-Fi ODS through a secure REST interface. *** > *Note: Consumers of ODS / API information should sanitize all data for display and storage. The ODS / API provides reas... | 56.635877 | 493 | 0.666675 |
672d39424dc1b4840b07509056858df35fc9f4de | 6,739 | py | Python | gwa_maid/routes.py | laikaah/gwa-maid-backend | aab7c191cac0d98e71b93e9c3507710aef8542b8 | [
"MIT"
] | null | null | null | gwa_maid/routes.py | laikaah/gwa-maid-backend | aab7c191cac0d98e71b93e9c3507710aef8542b8 | [
"MIT"
] | null | null | null | gwa_maid/routes.py | laikaah/gwa-maid-backend | aab7c191cac0d98e71b93e9c3507710aef8542b8 | [
"MIT"
] | null | null | null | from flask import jsonify, request
from gwa_maid import app, bcrypt, db
from gwa_maid.helpers import get_user_from_token, tokenize
from gwa_maid.models import Assessment, AssessmentClass, Subject, User
@app.route('/')
def index():
return 'Welcome!'
@app.route('/verify_token', methods=['POST'])
def verify():
... | 26.956 | 100 | 0.689271 |
f5ccad099a14810cec31dc033bf1ed6cf0ac3a0b | 1,012 | py | Python | rouge_papier_v2/rouge_papier_v2/util.py | BambooPalace/text-summarization | 17ac68598563492b5e8959493b2bf1b137f78a5a | [
"MIT"
] | 54 | 2019-09-20T12:31:10.000Z | 2022-03-19T12:21:32.000Z | rouge_papier_v2/rouge_papier_v2/util.py | huaweicould-ei/ExtSummLongDoc | 43da8584a1ec5df6ed31a844285a12b71eb2b4a8 | [
"MIT"
] | 9 | 2019-11-25T06:17:11.000Z | 2022-03-23T04:08:53.000Z | rouge_papier_v2/rouge_papier_v2/util.py | huaweicould-ei/ExtSummLongDoc | 43da8584a1ec5df6ed31a844285a12b71eb2b4a8 | [
"MIT"
] | 12 | 2019-12-08T10:06:05.000Z | 2022-03-06T08:10:53.000Z | import os
import tempfile
import shutil
def make_simple_config_text(system_and_summary_paths):
lines = []
for system_path, summary_paths in system_and_summary_paths:
line = "{} {}".format(system_path, " ".join(summary_paths))
lines.append(line)
return "\n".join(lines)
class TempFileManage... | 26.631579 | 67 | 0.603755 |
5ec2157e66e8b9bef6d638fb23c142ff8493d6c8 | 16,400 | py | Python | sabnzbd/bpsmeter.py | jcfp/sabnzbd | 5b3d932232cd512166b14bca40b20c221ef3be61 | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | sabnzbd/bpsmeter.py | jcfp/sabnzbd | 5b3d932232cd512166b14bca40b20c221ef3be61 | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | sabnzbd/bpsmeter.py | jcfp/sabnzbd | 5b3d932232cd512166b14bca40b20c221ef3be61 | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | #!/usr/bin/python3 -OO
# Copyright 2007-2020 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any late... | 35.652174 | 149 | 0.559939 |
4107814077d1fabc5034590e495aac321ead9606 | 8,031 | py | Python | test/test_storage_mongo.py | goodtiding5/flask-track-usage | 1ace3261c935b7071af7322afbd2150d4d991c8c | [
"BSD-3-Clause"
] | 46 | 2015-01-13T10:24:35.000Z | 2022-02-13T04:58:34.000Z | test/test_storage_mongo.py | goodtiding5/flask-track-usage | 1ace3261c935b7071af7322afbd2150d4d991c8c | [
"BSD-3-Clause"
] | 42 | 2015-01-08T22:20:52.000Z | 2022-01-14T08:25:01.000Z | test/test_storage_mongo.py | goodtiding5/flask-track-usage | 1ace3261c935b7071af7322afbd2150d4d991c8c | [
"BSD-3-Clause"
] | 27 | 2015-03-11T19:56:24.000Z | 2022-03-24T15:59:51.000Z | # Copyright (c) 2013-2018 Steve Milner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# (1) Redistributions of source code must retain the above copyright
# notice, this list of condi... | 36.671233 | 93 | 0.670153 |
6772f47be90751a8ab2cbacfba1c7b99baa2b64a | 102 | py | Python | caiman/models.py | Rockstreet/usman_min | c15145a444cbc913a1349b69dffc0b8a45e38dbb | [
"MIT"
] | null | null | null | caiman/models.py | Rockstreet/usman_min | c15145a444cbc913a1349b69dffc0b8a45e38dbb | [
"MIT"
] | null | null | null | caiman/models.py | Rockstreet/usman_min | c15145a444cbc913a1349b69dffc0b8a45e38dbb | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.translation import ugettext_lazy as _, ugettext
| 10.2 | 65 | 0.784314 |
40ff73a50e428a34204355c8944416160e034ae7 | 749 | py | Python | alembic/versions/20210317_233807_.py | sasano8/magnet-migrade | b5669b34a6a3b845df8df96dfedaf967df6b88e2 | [
"MIT"
] | null | null | null | alembic/versions/20210317_233807_.py | sasano8/magnet-migrade | b5669b34a6a3b845df8df96dfedaf967df6b88e2 | [
"MIT"
] | 4 | 2021-03-24T23:38:22.000Z | 2021-03-31T07:24:30.000Z | alembic/versions/20210317_233807_.py | sasano8/magnet-migrade | b5669b34a6a3b845df8df96dfedaf967df6b88e2 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 20210317_233807
Revises: 20210317_233703
Create Date: 2021-03-17 23:38:07.486793
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "20210317_233807"
down_revision = "20210317_233703"
branch_labels = None
depends_on = None
def upgra... | 22.029412 | 81 | 0.664887 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.