hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d7c4301e9525afa3df161c4bb149791dda0f63f5 | 7,781 | py | Python | flask_app/helpers/preprocess_text.py | julien-bonnefoy/website | a00d70697cc3a367dcdb32ca62ed29493029cf91 | [
"Apache-2.0"
] | null | null | null | flask_app/helpers/preprocess_text.py | julien-bonnefoy/website | a00d70697cc3a367dcdb32ca62ed29493029cf91 | [
"Apache-2.0"
] | null | null | null | flask_app/helpers/preprocess_text.py | julien-bonnefoy/website | a00d70697cc3a367dcdb32ca62ed29493029cf91 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from tqdm import trange
from IPython.display import display, HTML
from sklearn.feature_extraction.text import CountVectorizer
from tqdm.notebook import tqdm
def drop_na_values(df, subset=None):
n_rows_before = df.shape[0]
for column in subset:
if column is None:
print(f... | 32.693277 | 208 | 0.63488 |
f13d79ed30319f0877f9a5a62f67ce60849a359b | 2,733 | py | Python | test/acceptance/e2e/delete_node/features/terrain.py | jesuspg/fiware-sdc | 1ceb1a4c2f9b0d9ec2c79155f960d5100a35f17d | [
"Apache-2.0"
] | null | null | null | test/acceptance/e2e/delete_node/features/terrain.py | jesuspg/fiware-sdc | 1ceb1a4c2f9b0d9ec2c79155f960d5100a35f17d | [
"Apache-2.0"
] | null | null | null | test/acceptance/e2e/delete_node/features/terrain.py | jesuspg/fiware-sdc | 1ceb1a4c2f9b0d9ec2c79155f960d5100a35f17d | [
"Apache-2.0"
] | 1 | 2018-03-05T23:30:48.000Z | 2018-03-05T23:30:48.000Z | # -*- coding: utf-8 -*-
# Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U
#
# This file is part of FI-WARE project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at:
#
# http://w... | 35.493506 | 112 | 0.765459 |
6ed4132e5f12bdfc28f8e532278f3ee257f4c3ef | 688 | py | Python | Etap 3/Logia08/Zad4.py | aszokalski/Logia | 5e29745b01623df8a2f162f143656a76056af407 | [
"MIT"
] | null | null | null | Etap 3/Logia08/Zad4.py | aszokalski/Logia | 5e29745b01623df8a2f162f143656a76056af407 | [
"MIT"
] | null | null | null | Etap 3/Logia08/Zad4.py | aszokalski/Logia | 5e29745b01623df8a2f162f143656a76056af407 | [
"MIT"
] | null | null | null | def anagramy(lista):
wynik = []
slista = set(lista)
processed = []
for slowo in lista:
if slowo in processed:
continue
slowa = an(slowo)
grupa = list(slowa & slista)
wynik.append(grupa)
processed += grupa
return wynik
def an(slowo):
w... | 20.235294 | 61 | 0.556686 |
8b8eb4b6e39df0b1e8ba8b7ef51c9d2dc7e5212c | 22,556 | py | Python | catalyst/pipeline/engine.py | nongnoobjung/catalyst | 94583c2684ca5e43b3a21296789dd21378be66aa | [
"Apache-2.0"
] | 1 | 2018-01-25T23:49:06.000Z | 2018-01-25T23:49:06.000Z | catalyst/pipeline/engine.py | nongnoobjung/catalyst | 94583c2684ca5e43b3a21296789dd21378be66aa | [
"Apache-2.0"
] | null | null | null | catalyst/pipeline/engine.py | nongnoobjung/catalyst | 94583c2684ca5e43b3a21296789dd21378be66aa | [
"Apache-2.0"
] | null | null | null | """
Compute Engine definitions for the Pipeline API.
"""
from abc import (
ABCMeta,
abstractmethod,
)
from uuid import uuid4
from six import (
iteritems,
with_metaclass,
)
from numpy import array
from pandas import DataFrame, MultiIndex
from toolz import groupby, juxt
from toolz.curried.operator import... | 36.736156 | 79 | 0.600949 |
da07e1c62cf90ec6316c5e7dc07ebe2e08a980e6 | 33,766 | py | Python | venv/Lib/site-packages/PyInstaller/building/build_main.py | Gabs-Leo/Kay-O.Time.Limiter | 5cdc6ebd0a5117478d3bc5d3883098b4a532d671 | [
"MIT"
] | 6 | 2021-07-14T03:23:17.000Z | 2021-08-07T05:07:21.000Z | PyInstaller/building/build_main.py | 416426/pyinstaller | 0f2b2e921433ab5a510c7efdb21d9c1d7cfbc645 | [
"Apache-2.0"
] | null | null | null | PyInstaller/building/build_main.py | 416426/pyinstaller | 0f2b2e921433ab5a510c7efdb21d9c1d7cfbc645 | [
"Apache-2.0"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2005-2021, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | 44.487484 | 108 | 0.624326 |
2ce1c9641cc200b42b3792c5786ab1b371cd19ee | 6,492 | py | Python | plaso/output/tln.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | 2 | 2016-02-18T12:46:29.000Z | 2022-03-13T03:04:59.000Z | plaso/output/tln.py | CNR-ITTIG/plasodfaxp | 923797fc00664fa9e3277781b0334d6eed5664fd | [
"Apache-2.0"
] | null | null | null | plaso/output/tln.py | CNR-ITTIG/plasodfaxp | 923797fc00664fa9e3277781b0334d6eed5664fd | [
"Apache-2.0"
] | 6 | 2016-12-18T08:05:36.000Z | 2021-04-06T14:19:11.000Z | # -*- coding: utf-8 -*-
"""Output module for the TLN format.
For documentation on the TLN format see: http://forensicswiki.org/wiki/TLN
"""
from plaso.lib import errors
from plaso.lib import timelib
from plaso.output import interface
from plaso.output import manager
class TLNBaseOutputModule(interface.LinearOutputM... | 32.138614 | 80 | 0.702557 |
2f59e4b60daab186d9eefcb05aad1c483eaf084c | 781 | py | Python | tests/test-full/extensions/test.py | robjwells/majestic | cdfb91c595055e975be84afc6ec04fe22ebddc51 | [
"MIT"
] | null | null | null | tests/test-full/extensions/test.py | robjwells/majestic | cdfb91c595055e975be84afc6ec04fe22ebddc51 | [
"MIT"
] | null | null | null | tests/test-full/extensions/test.py | robjwells/majestic | cdfb91c595055e975be84afc6ec04fe22ebddc51 | [
"MIT"
] | null | null | null | import majestic
def process_posts_and_pages(*, posts, pages, settings):
"""Dummy process function that sets an attribute on each object"""
for post in posts:
post.test_attr = 'post'
for page in pages:
page.test_attr = 'page'
new_page = majestic.Page(title='extension test', body='',
... | 33.956522 | 72 | 0.629962 |
e6867b24584f2ae1b7b8df686629defbd2bcd6ef | 8,503 | py | Python | custom_components/xiaomi_cloud_map_extractor/xiaomi_vacuum_map_parser/const.py | licheng5625/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor | d1af6a71e8287c6f3f4002367146d42451efa1cb | [
"MIT"
] | null | null | null | custom_components/xiaomi_cloud_map_extractor/xiaomi_vacuum_map_parser/const.py | licheng5625/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor | d1af6a71e8287c6f3f4002367146d42451efa1cb | [
"MIT"
] | null | null | null | custom_components/xiaomi_cloud_map_extractor/xiaomi_vacuum_map_parser/const.py | licheng5625/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor | d1af6a71e8287c6f3f4002367146d42451efa1cb | [
"MIT"
] | null | null | null | DOMAIN = "xiaomi_cloud_map_extractor"
PLATFORMS = ["camera"]
CONF_ATTRIBUTES = "attributes"
CONF_AUTO_UPDATE = "auto_update"
CONF_AVAILABLE_API_DREAME = "dreame"
CONF_AVAILABLE_API_ROIDMI = "roidmi"
CONF_AVAILABLE_API_VIOMI = "viomi"
CONF_AVAILABLE_API_XIAOMI = "xiaomi"
CONF_AVAILABLE_COUNTRIES = ["cn", "de", "us", "r... | 37.959821 | 120 | 0.777255 |
c1ecd0ac58789121a022c7b0a427d59e8ff0ef16 | 1,374 | py | Python | appengine/predator/analysis/predator.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | 1 | 2018-01-02T05:47:07.000Z | 2018-01-02T05:47:07.000Z | appengine/predator/analysis/predator.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | appengine/predator/analysis/predator.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 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.
from analysis.culprit import Culprit
# TODO(http://crbug.com/659346): write coverage tests.
class Predator(object): # pragma: no cover
"""The Main entry ... | 37.135135 | 78 | 0.720524 |
fcffbeed35687c5a50c1a6954488354ef689e4b0 | 677 | py | Python | 7. Event Handling/virtual_event.py | samujjwaal/Tkinter-GUI-Course | 9ed492f49507333eec54b8b9262262def03fe00f | [
"MIT"
] | null | null | null | 7. Event Handling/virtual_event.py | samujjwaal/Tkinter-GUI-Course | 9ed492f49507333eec54b8b9262262def03fe00f | [
"MIT"
] | null | null | null | 7. Event Handling/virtual_event.py | samujjwaal/Tkinter-GUI-Course | 9ed492f49507333eec54b8b9262262def03fe00f | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import ttk
root = Tk()
entry = ttk.Entry(root)
entry.pack()
# bind built in virtual events
entry.bind("<<Copy>>", lambda e: print("Copy"))
entry.bind("<<Paste>>", lambda e: print("Paste"))
# define custom virtual event
entry.event_add("<<OddNumber>>", "1", "3", "5", "7", "9")
# b... | 22.566667 | 59 | 0.691285 |
e4f55010fa5b6db24a535d5c002d279fa530c739 | 3,237 | py | Python | notebooks/tfx_pipelines/pipeline/solutions/pipeline/runner.py | ghostofsheep/asl-ml-immersion | 4ed74c9fb67d570a498219b347b905e82f525d6e | [
"Apache-2.0"
] | null | null | null | notebooks/tfx_pipelines/pipeline/solutions/pipeline/runner.py | ghostofsheep/asl-ml-immersion | 4ed74c9fb67d570a498219b347b905e82f525d6e | [
"Apache-2.0"
] | null | null | null | notebooks/tfx_pipelines/pipeline/solutions/pipeline/runner.py | ghostofsheep/asl-ml-immersion | 4ed74c9fb67d570a498219b347b905e82f525d6e | [
"Apache-2.0"
] | 1 | 2021-11-10T02:54:02.000Z | 2021-11-10T02:54:02.000Z | # Lint as: python2, python3
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 31.427184 | 88 | 0.72629 |
7941028c41441115c5951efdd014ed949ca5c0a9 | 14,534 | py | Python | OmniMarkupLib/Renderers/libs/pygments/lexers/idl.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 652 | 2015-07-26T00:00:17.000Z | 2022-02-24T18:30:04.000Z | OmniMarkupLib/Renderers/libs/pygments/lexers/idl.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 82 | 2015-01-15T12:30:43.000Z | 2022-01-06T02:56:53.000Z | OmniMarkupLib/Renderers/libs/pygments/lexers/idl.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 99 | 2015-01-14T19:53:45.000Z | 2021-08-11T15:17:26.000Z | # -*- coding: utf-8 -*-
"""
pygments.lexers.idl
~~~~~~~~~~~~~~~~~~~
Lexers for IDL.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, words
from pygments.token import Text, Comment, Oper... | 55.262357 | 79 | 0.58862 |
d1f7706c2bdcd02b997bd03433be71eaf2145c87 | 13,070 | py | Python | app/train_integratedml_bin.py | intersystems-community/iris-ml-suite | d82868e6d83cb7fb8da2a98dd98cf7c6d28d1210 | [
"MIT"
] | null | null | null | app/train_integratedml_bin.py | intersystems-community/iris-ml-suite | d82868e6d83cb7fb8da2a98dd98cf7c6d28d1210 | [
"MIT"
] | null | null | null | app/train_integratedml_bin.py | intersystems-community/iris-ml-suite | d82868e6d83cb7fb8da2a98dd98cf7c6d28d1210 | [
"MIT"
] | 1 | 2020-09-09T21:48:37.000Z | 2020-09-09T21:48:37.000Z | import jaydebeapi
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from sklearn.preprocessing import MultiLabelBinarizer
from sklearn.model_selection import train_test_split
from pandas import DataFrame
import re, string
import pickle
import json
from sklearn.linear_model ... | 51.456693 | 5,310 | 0.657077 |
54ae8cfd9d0be07a46ac814aba753cffafd883fc | 12,329 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_gtp_ie_allow_list.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_gtp_ie_allow_list.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_gtp_ie_allow_list.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019-2020 Fortinet, Inc.
#
# 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 th... | 31.371501 | 144 | 0.593884 |
97e5d354a6cc0e58440e88a7f95883c4c9f06d6d | 9,020 | py | Python | tests/inspectdb/tests.py | huicheese/Django-test | eb866b3c4c61eb990e68f4b6a02cb1b7d948adbd | [
"BSD-3-Clause"
] | 118 | 2015-01-03T15:42:32.000Z | 2022-02-01T02:58:38.000Z | tests/inspectdb/tests.py | huicheese/Django-test | eb866b3c4c61eb990e68f4b6a02cb1b7d948adbd | [
"BSD-3-Clause"
] | 18 | 2015-01-14T07:51:48.000Z | 2021-10-14T01:19:26.000Z | tests/inspectdb/tests.py | huicheese/Django-test | eb866b3c4c61eb990e68f4b6a02cb1b7d948adbd | [
"BSD-3-Clause"
] | 70 | 2015-01-01T00:33:24.000Z | 2021-12-10T03:43:07.000Z | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import re
from django.core.management import call_command
from django.db import connection
from django.test import TestCase, skipUnlessDBFeature
from django.utils.unittest import expectedFailure
from django.utils.six import PY3, StringIO
if connection... | 50.960452 | 118 | 0.667738 |
b775cd418d33bc5c80d9ec1581ecd24cef40cdfd | 14,248 | py | Python | train.py | kevinghst/UDA_sup | c970622370d5de6b8c48b458cb8b4fe59e37effb | [
"Apache-2.0"
] | null | null | null | train.py | kevinghst/UDA_sup | c970622370d5de6b8c48b458cb8b4fe59e37effb | [
"Apache-2.0"
] | null | null | null | train.py | kevinghst/UDA_sup | c970622370d5de6b8c48b458cb8b4fe59e37effb | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 SanghunYun, Korea University.
# (Strongly inspired by Dong-Hyun Lee, Kakao Brain)
#
# Except load and save function, the whole codes of file has been modified and added by
# SanghunYun, Korea University for UDA.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this... | 40.477273 | 216 | 0.566887 |
8c87775ec72d65dbc462a55041e05078cb0cdfd9 | 3,032 | py | Python | py/qaviton/utils/databases/sqlite.py | qaviton/qaviton | 112f1620af36e09031909bd36b7e388df577b75b | [
"Apache-2.0"
] | 9 | 2018-09-06T10:27:55.000Z | 2020-01-02T16:50:13.000Z | py/qaviton/utils/databases/sqlite.py | idanhakimi/qaviton | 6ed17e4131c35cae902b95498e60de53e5b05a56 | [
"Apache-2.0"
] | 6 | 2019-06-05T09:44:21.000Z | 2022-03-11T23:26:41.000Z | py/qaviton/utils/databases/sqlite.py | idanhakimi/qaviton | 6ed17e4131c35cae902b95498e60de53e5b05a56 | [
"Apache-2.0"
] | 9 | 2018-09-21T14:47:40.000Z | 2021-12-21T01:37:20.000Z | import sqlite3
class DataBase:
"""
a very simple implementation
to create local SQLite database connection
specified by db_file
you can integrate your database with your custom commands class
example usage:
class command:
get_users = '''SELECT user_id, password FROM users;... | 34.850575 | 97 | 0.582784 |
052e420f9122cd31306e4ccc3fa0c4c9567e303b | 171 | py | Python | django_decadence/apps.py | ksiazkowicz/django-decadence | 0a29a7c748feb0d98cb8f4783a93159fc290ea67 | [
"MIT"
] | 1 | 2019-08-26T11:30:02.000Z | 2019-08-26T11:30:02.000Z | django_decadence/apps.py | ksiazkowicz/django-decadence | 0a29a7c748feb0d98cb8f4783a93159fc290ea67 | [
"MIT"
] | null | null | null | django_decadence/apps.py | ksiazkowicz/django-decadence | 0a29a7c748feb0d98cb8f4783a93159fc290ea67 | [
"MIT"
] | 1 | 2021-02-21T13:30:16.000Z | 2021-02-21T13:30:16.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class DjangoDecadenceConfig(AppConfig):
name = 'django_decadence'
| 19 | 39 | 0.760234 |
5bccc1112d4e1e5f5f99d31f812d04d9445a560f | 326 | py | Python | Python/P1.py | tinkpo/Curso-Introducci-n-a-la-Computaci-n-para-Matem-ticos | 72b5db944c759c0d977553fa1bc15a11ac110909 | [
"MIT"
] | null | null | null | Python/P1.py | tinkpo/Curso-Introducci-n-a-la-Computaci-n-para-Matem-ticos | 72b5db944c759c0d977553fa1bc15a11ac110909 | [
"MIT"
] | null | null | null | Python/P1.py | tinkpo/Curso-Introducci-n-a-la-Computaci-n-para-Matem-ticos | 72b5db944c759c0d977553fa1bc15a11ac110909 | [
"MIT"
] | null | null | null | x=list(input("Ingrese la lista "))
i=0
j=1
a=[0]
b=[0]
while(i<=len(x)-2):
if(x[i]==x[i+1]):
j=j+1
b.append(x[i])
a.append(j)
else:
j=1
i=i+1
print('La longitud de la meseta mas larga es: ', max(a), '\n', 'Y el numero de la meseta mas larga es :', b[a.index(max(a... | 21.733333 | 126 | 0.48773 |
62b58b1e8ea77c8b210add38e81cda63ee33ca59 | 1,606 | py | Python | angstrom/2019/misc/TI-1337/wrapper.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2019/misc/TI-1337/wrapper.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2019/misc/TI-1337/wrapper.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/env python3
"""
Wrapper that filters all input to the calculator program to make sure it follows the blacklist.
It is not necessary to fully understand this code. Just know it doesn't allow any of the characters in the following string:
"()[]{}_.#\"\'\\ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Check ti1337.py to see what ... | 40.15 | 124 | 0.722914 |
4900292d68396da77072f843b5d6304a0b873c26 | 8,089 | py | Python | client/commands/kill.py | KevinHock/pyre-check | 09b0f53e23353b16a59ef76d8e5c5b78bdf08447 | [
"MIT"
] | 5 | 2019-02-14T19:46:47.000Z | 2020-01-16T05:48:45.000Z | client/commands/kill.py | KevinHock/pyre-check | 09b0f53e23353b16a59ef76d8e5c5b78bdf08447 | [
"MIT"
] | null | null | null | client/commands/kill.py | KevinHock/pyre-check | 09b0f53e23353b16a59ef76d8e5c5b78bdf08447 | [
"MIT"
] | 2 | 2019-02-14T19:46:23.000Z | 2020-07-13T03:53:04.000Z | # Copyright (c) 2016-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import logging
import os
import shutil
import signal
import subprocess
import tempfile
from itertools import chain
from pathlib impo... | 36.936073 | 90 | 0.525281 |
a99175618d146a1a89d3cb72ee925b6693d162b3 | 5,495 | py | Python | infinisdk/entry_point.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | infinisdk/entry_point.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | infinisdk/entry_point.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | import sys
import arrow
import dateutil
import pkg_resources
import click
import logbook
from infinisdk import Q
from infinisdk.infinibox import InfiniBox
from infinisdk.core.config import config
_logger = logbook.Logger('sdk-cli')
logbook.set_datetime_format('local')
_DEFAULT_CONSOLE_LEVEL = logbook.INFO
CUSTOMIZE... | 38.971631 | 119 | 0.688808 |
d4f82812d661a7cee86e5299a37dc1b5e2272f7f | 766 | py | Python | garnahata_in_ua/elastic_models.py | dchaplinsky/ragoogle | dccb3d29334c3220ea12c46c725c443c8bd725c0 | [
"MIT"
] | 3 | 2018-06-10T21:20:56.000Z | 2021-04-04T11:21:06.000Z | garnahata_in_ua/elastic_models.py | dchaplinsky/ragoogle | dccb3d29334c3220ea12c46c725c443c8bd725c0 | [
"MIT"
] | 7 | 2018-08-14T20:54:49.000Z | 2020-06-05T18:17:30.000Z | garnahata_in_ua/elastic_models.py | dchaplinsky/ragoogle | dccb3d29334c3220ea12c46c725c443c8bd725c0 | [
"MIT"
] | 3 | 2018-06-27T12:53:13.000Z | 2020-09-25T19:41:46.000Z | from elasticsearch_dsl import DocType, Index
from django.template.loader import render_to_string
GARNAHATA_INDEX = "garnahata_ownerships"
garnahata_idx = Index(GARNAHATA_INDEX)
@garnahata_idx.doc_type
class ElasticGarnahataModel(DocType):
def render_infocard(self):
from .apps import GarnahataInUaConfig ... | 28.37037 | 68 | 0.652742 |
b0796fcd875d83fe3917ce53b4923c5be0d9198b | 220 | py | Python | firmware/Heat controller/copy_hex.py | atoomnetmarc/IoT12 | 7706f69758a800da70bf8034a91a331206706824 | [
"Apache-2.0"
] | 1 | 2021-11-11T23:48:05.000Z | 2021-11-11T23:48:05.000Z | firmware/Heat controller/copy_hex.py | atoomnetmarc/IoT12 | 7706f69758a800da70bf8034a91a331206706824 | [
"Apache-2.0"
] | null | null | null | firmware/Heat controller/copy_hex.py | atoomnetmarc/IoT12 | 7706f69758a800da70bf8034a91a331206706824 | [
"Apache-2.0"
] | 1 | 2021-09-17T16:21:44.000Z | 2021-09-17T16:21:44.000Z | Import("env", "projenv")
from shutil import copyfile
def copyhex(*args, **kwargs):
copyfile(str(kwargs['target'][0]), 'hex/'+env['BOARD_MCU']+'.hex')
env.AddPostAction("$BUILD_DIR/${PROGNAME}.hex", copyhex)
| 27.5 | 71 | 0.659091 |
87202ac59b086ceb020b206ffbef6bda08878afe | 3,773 | py | Python | scripts/train.py | MathieuTuli/autoHyper | d7410741b5963518d704f422c0502695885a4093 | [
"MIT"
] | 9 | 2021-11-30T18:58:05.000Z | 2022-03-07T16:55:54.000Z | scripts/train.py | MathieuTuli/autoHyper | d7410741b5963518d704f422c0502695885a4093 | [
"MIT"
] | null | null | null | scripts/train.py | MathieuTuli/autoHyper | d7410741b5963518d704f422c0502695885a4093 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020
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, distribute, s... | 37.356436 | 78 | 0.666578 |
6528b23649338721a5302ac7c4e4eac3dafd00da | 2,674 | py | Python | tests/pyquil_algorithms.py | myQLM/myqlm-interop | 9d77cb7c719f82be05d9f88493522940b8142124 | [
"Apache-2.0"
] | 5 | 2020-09-09T09:44:31.000Z | 2021-07-02T09:49:21.000Z | tests/pyquil_algorithms.py | myQLM/myqlm-interop | 9d77cb7c719f82be05d9f88493522940b8142124 | [
"Apache-2.0"
] | null | null | null | tests/pyquil_algorithms.py | myQLM/myqlm-interop | 9d77cb7c719f82be05d9f88493522940b8142124 | [
"Apache-2.0"
] | 3 | 2020-07-10T17:51:47.000Z | 2021-04-13T16:33:44.000Z | #!/usr/bin/env python
# -*- 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... | 33.848101 | 98 | 0.698205 |
22e77b272f6ea6aaa771a9c4cca37612ab23834a | 2,463 | py | Python | ucr/core/architecture/neck/craft_fpn.py | DocYard-ai/UCR | 7618aa336f56e71d9fd8cdc2d591e3d138e3dc68 | [
"Apache-2.0"
] | 10 | 2021-04-06T15:57:20.000Z | 2021-11-14T23:00:13.000Z | ucr/core/architecture/neck/craft_fpn.py | felixdittrich92/UCR | 7618aa336f56e71d9fd8cdc2d591e3d138e3dc68 | [
"Apache-2.0"
] | 5 | 2021-04-22T10:28:17.000Z | 2022-03-02T07:47:53.000Z | ucr/core/architecture/neck/craft_fpn.py | felixdittrich92/UCR | 7618aa336f56e71d9fd8cdc2d591e3d138e3dc68 | [
"Apache-2.0"
] | 2 | 2021-04-30T10:27:51.000Z | 2021-08-02T15:12:10.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
class CRAFTFPN(nn.Module):
def __init__(self, in_channels):
super(CRAFTFPN, self).__init__()
""" U network """
... | 28.976471 | 79 | 0.566788 |
862468a2902b8b4459a357c84fbd337084831be0 | 13,188 | py | Python | presalytics/lib/tools/ooxml_tools.py | presalytics/python-client | 5d80b78562126feeeb49af4738e2c1aed12dce3a | [
"MIT"
] | 4 | 2020-02-21T16:30:46.000Z | 2021-01-12T12:22:03.000Z | presalytics/lib/tools/ooxml_tools.py | presalytics/python-client | 5d80b78562126feeeb49af4738e2c1aed12dce3a | [
"MIT"
] | 4 | 2019-12-28T19:30:08.000Z | 2020-03-31T19:27:45.000Z | presalytics/lib/tools/ooxml_tools.py | presalytics/python-client | 5d80b78562126feeeb49af4738e2c1aed12dce3a | [
"MIT"
] | null | null | null | import datetime
import typing
import logging
import presalytics
import presalytics.story.outline
import presalytics.client.api
import presalytics.lib.widgets.ooxml
import presalytics.lib.themes.ooxml
if typing.TYPE_CHECKING:
from presalytics.client.presalytics_story import Story
from presalytics.client.presaly... | 42.405145 | 148 | 0.676752 |
778e25cefe986106444c960ba91e891457ec86a5 | 655 | py | Python | tests/node/test_softsign.py | gglin001/onnx_jax | 08e2a1181250db48f4436f6430903fc895a3a1d6 | [
"Apache-2.0"
] | 9 | 2021-04-12T02:37:14.000Z | 2022-03-28T23:31:40.000Z | tests/node/test_softsign.py | gglin001/onnx-jax | 08e2a1181250db48f4436f6430903fc895a3a1d6 | [
"Apache-2.0"
] | null | null | null | tests/node/test_softsign.py | gglin001/onnx-jax | 08e2a1181250db48f4436f6430903fc895a3a1d6 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import onnx
from tests.tools import expect
class Softsign:
@staticmethod
def export(): # type: () -> None
node = onnx.helper.make_node(
'Softsign',
inputs=['x'],
outputs=['y'],
)
x = np.array([-1, 0, 1]).astype(np.float32)
... | 24.259259 | 75 | 0.546565 |
5c04973bd78a53d1fd0b81f3c91ccb08213f3f9f | 1,096 | py | Python | setup.py | cscutcher/snapper_systemd_boot | 0a86e6c089c2ef7f39e45a191cc91c960c6b69b5 | [
"Apache-2.0",
"MIT"
] | 8 | 2019-04-25T03:01:25.000Z | 2022-03-27T12:25:05.000Z | setup.py | cscutcher/snapper_systemd_boot | 0a86e6c089c2ef7f39e45a191cc91c960c6b69b5 | [
"Apache-2.0",
"MIT"
] | null | null | null | setup.py | cscutcher/snapper_systemd_boot | 0a86e6c089c2ef7f39e45a191cc91c960c6b69b5 | [
"Apache-2.0",
"MIT"
] | 3 | 2021-12-06T12:54:44.000Z | 2022-02-10T19:29:18.000Z | from setuptools import setup, find_packages
setup(
name="snapper_systemd_boot",
description="Generate systemd-boot entries from snapper btrfs snapshots.",
version="0.1.0-prealpha1",
packages=find_packages(),
install_requires=[
"reprutils",
"argh",
"sh",
],
extras_requ... | 30.444444 | 78 | 0.583942 |
cf2fb4fd93a921bf43b393d6a5a6df5ec1343484 | 659 | py | Python | hardware/opentrons_hardware/drivers/can_bus/__init__.py | anuwrag/opentrons | 28c8d76a19e367c6bd38f5290faaa32abf378715 | [
"Apache-2.0"
] | 2 | 2015-11-10T17:49:51.000Z | 2016-01-15T04:43:37.000Z | hardware/opentrons_hardware/drivers/can_bus/__init__.py | anuwrag/opentrons | 28c8d76a19e367c6bd38f5290faaa32abf378715 | [
"Apache-2.0"
] | null | null | null | hardware/opentrons_hardware/drivers/can_bus/__init__.py | anuwrag/opentrons | 28c8d76a19e367c6bd38f5290faaa32abf378715 | [
"Apache-2.0"
] | null | null | null | """Can bus drivers package."""
from .driver import CanDriver
from .can_messenger import CanMessenger, WaitableCallback
from opentrons_hardware.firmware_bindings.message import CanMessage
from opentrons_hardware.firmware_bindings.arbitration_id import (
ArbitrationId,
ArbitrationIdParts,
)
from opentrons_hardwa... | 21.966667 | 67 | 0.738998 |
c1472854c47858e22cd1ec64e55dbb3463499dd1 | 1,061 | py | Python | share/lib/python/neuron/rxd/options.py | shhong/nrn | 0d64e94330c6072529e31033d579b270f742454e | [
"BSD-3-Clause"
] | null | null | null | share/lib/python/neuron/rxd/options.py | shhong/nrn | 0d64e94330c6072529e31033d579b270f742454e | [
"BSD-3-Clause"
] | 1 | 2022-03-25T13:30:45.000Z | 2022-03-25T13:30:45.000Z | share/lib/python/neuron/rxd/options.py | shhong/nrn | 0d64e94330c6072529e31033d579b270f742454e | [
"BSD-3-Clause"
] | 1 | 2018-12-18T13:52:16.000Z | 2018-12-18T13:52:16.000Z | from .rxdException import RxDException
import re
#TODO: This option is not currently observed
use_reaction_contribution_to_jacobian = True
concentration_nodes_3d = "surface"
# how far inside must a voxel be to be consider inside
# the value is necessary to account for floating point precision
ics_distance_threshold... | 27.921053 | 73 | 0.789821 |
8d35cdc7cdc8a4cbe5898a04cbf45731dd5b6360 | 2,262 | py | Python | retinopathy_test/models/run_prediction.py | vykozlov/retinopathy_test | f75491f0ebe5373f7401a83abe24abbf58c4bd64 | [
"MIT"
] | null | null | null | retinopathy_test/models/run_prediction.py | vykozlov/retinopathy_test | f75491f0ebe5373f7401a83abe24abbf58c4bd64 | [
"MIT"
] | null | null | null | retinopathy_test/models/run_prediction.py | vykozlov/retinopathy_test | f75491f0ebe5373f7401a83abe24abbf58c4bd64 | [
"MIT"
] | null | null | null | import os, argparse, sys
import tensorflow as tf
import tensorflow.contrib
import numpy as np
import glob
# The original freeze_graph function
# from tensorflow.python.tools.freeze_graph import freeze_graph
dir = os.path.dirname(os.path.realpath(__file__))
from tensorflow.contrib import predictor
import cv2
def load... | 37.081967 | 168 | 0.683024 |
331195d8ee6fa39e2b682c860a6fe795656824e5 | 500 | py | Python | User/migrations/0005_auto_20210705_1037.py | judeakinwale/SMS-backup | 30636591b43bec94e7406f4c02fde402a5a2e38f | [
"MIT"
] | null | null | null | User/migrations/0005_auto_20210705_1037.py | judeakinwale/SMS-backup | 30636591b43bec94e7406f4c02fde402a5a2e38f | [
"MIT"
] | null | null | null | User/migrations/0005_auto_20210705_1037.py | judeakinwale/SMS-backup | 30636591b43bec94e7406f4c02fde402a5a2e38f | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-07-05 10:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0004_auto_20210705_1029'),
]
operations = [
migrations.RemoveField(
model_name='biodata',
name='matric_no',
... | 21.73913 | 63 | 0.57 |
8f35fb83a01a9cb9110d5d081f9d0de5da9130ff | 3,489 | py | Python | floris/wake.py | WISDEM/FLORIS | 0df374de787e4035e7081fa2a454d0eeabded2f8 | [
"Apache-2.0"
] | 19 | 2017-11-07T11:15:47.000Z | 2020-12-22T08:40:51.000Z | floris/wake.py | WISDEM/FLORIS | 0df374de787e4035e7081fa2a454d0eeabded2f8 | [
"Apache-2.0"
] | 28 | 2017-11-27T17:45:41.000Z | 2019-05-08T22:01:10.000Z | floris/wake.py | WISDEM/FLORIS | 0df374de787e4035e7081fa2a454d0eeabded2f8 | [
"Apache-2.0"
] | 27 | 2017-11-16T19:53:20.000Z | 2021-04-19T18:38:58.000Z | # Copyright 2017 NREL
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distribu... | 31.432432 | 90 | 0.656635 |
f79ebe83193b665d8b3e89be6a5363f09d2a83dd | 904 | py | Python | ACME/linear_problem/add_constraints.py | mauriziokovacic/ACME | 2615b66dd4addfd5c03d9d91a24c7da414294308 | [
"MIT"
] | 3 | 2019-10-23T23:10:55.000Z | 2021-09-01T07:30:14.000Z | ACME/linear_problem/add_constraints.py | mauriziokovacic/ACME-Python | 2615b66dd4addfd5c03d9d91a24c7da414294308 | [
"MIT"
] | null | null | null | ACME/linear_problem/add_constraints.py | mauriziokovacic/ACME-Python | 2615b66dd4addfd5c03d9d91a24c7da414294308 | [
"MIT"
] | 1 | 2020-07-11T11:35:43.000Z | 2020-07-11T11:35:43.000Z | from ..utility.cat import *
from ..utility.issparse import *
from ..math.unitvec import *
def add_constraints(A, hard=None, soft=None):
"""
Adds hard and soft constraints to the given constraints matrix
Parameters
----------
A : Tensor or SparseTensor
the (N,M,) constraints matri... | 25.828571 | 87 | 0.581858 |
505753f2e1e7596e49511e02f53b2cb67aa11842 | 1,025 | py | Python | manage.py | MahmoudRizk/twemo | 51a5022c32f402a7fcc7c5a09b30f2fc5a15b60c | [
"MIT"
] | null | null | null | manage.py | MahmoudRizk/twemo | 51a5022c32f402a7fcc7c5a09b30f2fc5a15b60c | [
"MIT"
] | null | null | null | manage.py | MahmoudRizk/twemo | 51a5022c32f402a7fcc7c5a09b30f2fc5a15b60c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure tha... | 33.064516 | 77 | 0.654634 |
83dc6587a25795d6879646e05cd154a428a8c31b | 1,090 | py | Python | examples/plotting/file/brewer.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 1 | 2020-05-26T15:21:22.000Z | 2020-05-26T15:21:22.000Z | examples/plotting/file/brewer.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 1 | 2021-12-15T17:32:31.000Z | 2021-12-21T18:11:05.000Z | examples/plotting/file/brewer.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 1 | 2021-12-20T05:50:00.000Z | 2021-12-20T05:50:00.000Z | ''' A plot of randomly stacked area styled using the Brewer palette
from the `brewer` dictionary.
.. bokeh-example-metadata::
:apis: bokeh.palettes.brewer
:refs: :ref:`userguide_styling` > :ref:`userguide_styling_using_palettes`
:keywords: brewer, palettes, patches
'''
import numpy as np
import pandas as... | 27.25 | 77 | 0.695413 |
8ac721b06a5b2c3fb83b086c3e843a73f677ac93 | 6,470 | py | Python | launch_BURN.py | Km3888/oyster | 391ae4ba3fedc4354fa3688654211899a72465b0 | [
"MIT"
] | null | null | null | launch_BURN.py | Km3888/oyster | 391ae4ba3fedc4354fa3688654211899a72465b0 | [
"MIT"
] | 1 | 2020-04-01T16:35:43.000Z | 2020-04-01T16:35:43.000Z | launch_BURN.py | Km3888/oyster | 391ae4ba3fedc4354fa3688654211899a72465b0 | [
"MIT"
] | null | null | null | """
Launcher for experiments with PEARL
"""
import os
import pathlib
import numpy as np
import click
import json
import torch
from rlkit.envs import ENVS
from rlkit.envs.wrappers import NormalizedBoxEnv
from rlkit.torch.sac.policies import TanhGaussianPolicy
from rlkit.torch.networks import FlattenMlp, MlpEncoder, Re... | 35.944444 | 161 | 0.681607 |
be739ca5230ecfbeb3d8542ed80fb414d7a4ae49 | 8,655 | py | Python | pygcn/ABC_gcn.py | d222nguy/project_602 | 0ce7a3ad0083b22977b558d4d2aceeca839df249 | [
"MIT"
] | null | null | null | pygcn/ABC_gcn.py | d222nguy/project_602 | 0ce7a3ad0083b22977b558d4d2aceeca839df249 | [
"MIT"
] | null | null | null | pygcn/ABC_gcn.py | d222nguy/project_602 | 0ce7a3ad0083b22977b558d4d2aceeca839df249 | [
"MIT"
] | null | null | null | import numpy as np
from scipy import optimize
from deap.benchmarks import schwefel
from abc import ABCMeta
from abc import abstractmethod
from six import add_metaclass
import matplotlib.pyplot as plt
from copy import deepcopy
import config
@add_metaclass(ABCMeta)
class ObjectiveFunction(object):
def __init__(self... | 41.018957 | 166 | 0.640324 |
82694510539a1a46ec030f7d07157bd06002c820 | 18,761 | py | Python | simulator/models/cifar10_models_v2.py | vlad-user/parallel-tempering | 42ebecdea2a597e706382462dc90aab7e7ca098f | [
"MIT"
] | null | null | null | simulator/models/cifar10_models_v2.py | vlad-user/parallel-tempering | 42ebecdea2a597e706382462dc90aab7e7ca098f | [
"MIT"
] | null | null | null | simulator/models/cifar10_models_v2.py | vlad-user/parallel-tempering | 42ebecdea2a597e706382462dc90aab7e7ca098f | [
"MIT"
] | null | null | null | import sys
import os
import tensorflow as tf
from simulator.graph.device_placer import _gpu_device_name
from simulator.simulator_utils import DTYPE
from simulator.models.helpers import DEFAULT_INITIALIZER
from simulator.models import utils
def lenet5_with_dropout_original(graph, verbose=False):
with graph.as_defa... | 41.232967 | 107 | 0.459197 |
10a39aa4d9a637ca25faa9350e5ed69acf3d1425 | 362 | py | Python | cpmd/webServer/publish.py | computePods/majorDomo | 0d59f105592c375f16dcd7dcb6ec5bbbae25ce5f | [
"Apache-2.0"
] | null | null | null | cpmd/webServer/publish.py | computePods/majorDomo | 0d59f105592c375f16dcd7dcb6ec5bbbae25ce5f | [
"Apache-2.0"
] | null | null | null | cpmd/webServer/publish.py | computePods/majorDomo | 0d59f105592c375f16dcd7dcb6ec5bbbae25ce5f | [
"Apache-2.0"
] | null | null | null | from typing import Optional, List
from fastapi import FastAPI
from pydantic import BaseModel
# WebServer interface definition....
class NatsMsg(BaseModel):
subject: str
message: List
def addPublishInterface(self) :
@self.app.put("/publish")
async def update_item(msg: NatsMsg):
await self.natsClient.sendM... | 20.111111 | 42 | 0.740331 |
8d1a9fd570630604ecbb41e2cac21e21583c3456 | 30,598 | py | Python | grr/client/grr_response_client/client_actions/artifact_collector_test.py | magnologan/grr | 06eeb071e9a925b34f67caf776c3330b39154850 | [
"Apache-2.0"
] | null | null | null | grr/client/grr_response_client/client_actions/artifact_collector_test.py | magnologan/grr | 06eeb071e9a925b34f67caf776c3330b39154850 | [
"Apache-2.0"
] | null | null | null | grr/client/grr_response_client/client_actions/artifact_collector_test.py | magnologan/grr | 06eeb071e9a925b34f67caf776c3330b39154850 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Tests the client artifactor collection."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import glob
import io
import os
from absl import app
from future.builtins import filter
import mock
import psutil
from grr_response_client... | 40.68883 | 80 | 0.726943 |
5943ef5f212bc77fbfcf1eeacb37ada6136d107d | 1,995 | py | Python | pytests/bucket_collections/collection_ops_specs/dgm_load.py | bkumaran/TAF | 27f39eb913fa89b55cdd88ee1c7ef0bb8c094407 | [
"Apache-2.0"
] | 9 | 2019-02-19T05:55:00.000Z | 2022-01-20T10:37:28.000Z | pytests/bucket_collections/collection_ops_specs/dgm_load.py | bkumaran/TAF | 27f39eb913fa89b55cdd88ee1c7ef0bb8c094407 | [
"Apache-2.0"
] | 2 | 2019-02-19T07:28:54.000Z | 2019-06-18T11:22:29.000Z | pytests/bucket_collections/collection_ops_specs/dgm_load.py | bkumaran/TAF | 27f39eb913fa89b55cdd88ee1c7ef0bb8c094407 | [
"Apache-2.0"
] | 155 | 2018-11-13T14:57:07.000Z | 2022-03-28T11:53:22.000Z | from collections_helper.collections_spec_constants import MetaCrudParams
spec = {
# Scope/Collection ops params
MetaCrudParams.COLLECTIONS_TO_FLUSH: 0,
MetaCrudParams.COLLECTIONS_TO_DROP: 0,
MetaCrudParams.SCOPES_TO_DROP: 0,
MetaCrudParams.SCOPES_TO_ADD_PER_BUCKET: 0,
MetaCrudParams.COLLECTION... | 38.365385 | 72 | 0.768421 |
4b1102300ca699753ab61e7fdfe78d2ecc40fa86 | 3,185 | py | Python | env/lib/python3.7/site-packages/masonite/api/controllers/TokenController.py | Kolawole39/masonite-guides-tutorial | 9a21cc635291a42f0722f69925be1809bb20e01c | [
"MIT"
] | null | null | null | env/lib/python3.7/site-packages/masonite/api/controllers/TokenController.py | Kolawole39/masonite-guides-tutorial | 9a21cc635291a42f0722f69925be1809bb20e01c | [
"MIT"
] | null | null | null | env/lib/python3.7/site-packages/masonite/api/controllers/TokenController.py | Kolawole39/masonite-guides-tutorial | 9a21cc635291a42f0722f69925be1809bb20e01c | [
"MIT"
] | null | null | null | import jwt
import pendulum
from masonite.auth import Auth, Sign
from masonite.helpers import password as bcrypt_password
from masonite.helpers.misc import random_string
from masonite.request import Request
from ..exceptions import NoApiTokenFound
from config.application import KEY
class TokenController:
"""Plac... | 32.835052 | 104 | 0.564521 |
2a3d709d854f76703bc896061f66a2d51a4e1f7a | 277 | py | Python | toontown/safezone/DistributedOZTreasureAI.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 99 | 2019-11-02T22:25:00.000Z | 2022-02-03T03:48:00.000Z | toontown/safezone/DistributedOZTreasureAI.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 42 | 2019-11-03T05:31:08.000Z | 2022-03-16T22:50:32.000Z | toontown/safezone/DistributedOZTreasureAI.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 57 | 2019-11-03T07:47:37.000Z | 2022-03-22T00:41:49.000Z | from . import DistributedSZTreasureAI
class DistributedOZTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI):
def __init__(self, air, treasurePlanner, x, y, z):
DistributedSZTreasureAI.DistributedSZTreasureAI.__init__(self, air, treasurePlanner, x, y, z)
| 39.571429 | 101 | 0.801444 |
17185ed1b6e940eb169dc89527637bd47234e51e | 936 | py | Python | constants.py | triplejberger/Queue | 0d0a62dc8d690abe2ddadc6c425bec36108bae38 | [
"MIT"
] | null | null | null | constants.py | triplejberger/Queue | 0d0a62dc8d690abe2ddadc6c425bec36108bae38 | [
"MIT"
] | null | null | null | constants.py | triplejberger/Queue | 0d0a62dc8d690abe2ddadc6c425bec36108bae38 | [
"MIT"
] | null | null | null | # General
BUILDINGS = 'buildings'
UNITS = 'units'
RESEARCH = 'tech'
AGE_UP_TIMES = 'age_up_times'
CIV = 'civilization'
PLAYER_ID = 'player_id'
BUILDING_ID = 'building_id'
TECHNOLOGY_ID = 'technology_id'
UNIT_ID = 'unit_id'
DEQUEUE_EVENTS_AT_INITIAL_TC = 'dequeue_event_at_initial_TC'
INITIAL_TC_ID = 'initial_TC_id'
# B... | 18.352941 | 60 | 0.775641 |
bd602cd1b4ed580f6e307a2ea3851d40bd3dcbb3 | 48,286 | py | Python | tests/validation/tests/v3_api/test_workload.py | arthurh4/rancher | 1e7e336de5ee546a8dd8291211af5cff8754f6f7 | [
"Apache-2.0"
] | 3 | 2021-01-19T20:20:27.000Z | 2021-01-19T21:35:40.000Z | tests/validation/tests/v3_api/test_workload.py | arthurh4/rancher | 1e7e336de5ee546a8dd8291211af5cff8754f6f7 | [
"Apache-2.0"
] | 15 | 2021-04-03T21:35:06.000Z | 2022-01-01T00:16:14.000Z | tests/validation/tests/v3_api/test_workload.py | rcairesoliveira43/rancher | 5da52c07665ac0950dc23f42227095d3ba429c74 | [
"Apache-2.0"
] | 1 | 2022-01-13T09:47:59.000Z | 2022-01-13T09:47:59.000Z | import pytest
from .common import * # NOQA
from rancher import ApiError
namespace = {"p_client": None, "ns": None, "cluster": None, "project": None}
RBAC_ROLES = [CLUSTER_OWNER, PROJECT_MEMBER, PROJECT_OWNER,
PROJECT_READ_ONLY, CLUSTER_MEMBER]
WORKLOAD_TYPES = ["daemonSet", "statefulSet", "cronJob", "j... | 42.244969 | 84 | 0.633579 |
e527eb09a7a12e5107bf7c394f67efac898c8cce | 5,260 | py | Python | tests/test_imagenet_format.py | IRDonch/datumaro | d029e67549b7359c887bd15039997bd8bbae7c0c | [
"MIT"
] | 237 | 2020-09-07T14:29:26.000Z | 2022-03-31T12:53:48.000Z | tests/test_imagenet_format.py | IRDonch/datumaro | d029e67549b7359c887bd15039997bd8bbae7c0c | [
"MIT"
] | 330 | 2020-09-09T21:27:29.000Z | 2022-03-31T12:36:18.000Z | tests/test_imagenet_format.py | IRDonch/datumaro | d029e67549b7359c887bd15039997bd8bbae7c0c | [
"MIT"
] | 63 | 2020-09-09T07:44:28.000Z | 2022-03-17T16:07:26.000Z | from unittest import TestCase
import os.path as osp
import numpy as np
from datumaro.components.annotation import (
AnnotationType, Label, LabelCategories,
)
from datumaro.components.dataset import Dataset
from datumaro.components.extractor import DatasetItem
from datumaro.plugins.imagenet_format import ImagenetC... | 36.527778 | 81 | 0.611977 |
cd7bef90235e07665b34d64e798dffdb7699cc0f | 22,177 | py | Python | raiden/tests/conftest.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | raiden/tests/conftest.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | 12 | 2019-08-09T19:12:17.000Z | 2019-12-05T15:49:29.000Z | raiden/tests/conftest.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | # pylint: disable=wrong-import-position,redefined-outer-name,unused-wildcard-import,wildcard-import
from gevent import monkey # isort:skip # noqa
monkey.patch_all(subprocess=False, thread=False) # isort:skip # noqa
import signal # isort:skip # noqa
import pytest # isort:skip
# Execute these before the other impo... | 38.236207 | 99 | 0.678947 |
daac9dae8067d03f06d44a328d731533d307dac0 | 288 | py | Python | CVContent.py | alpaylan/cvdl | bb4981af134770074460e620c2c65054d62cf32b | [
"MIT"
] | 33 | 2021-12-19T16:51:26.000Z | 2022-03-10T12:07:20.000Z | CVContent.py | onuratakan/cvdl | bb4981af134770074460e620c2c65054d62cf32b | [
"MIT"
] | null | null | null | CVContent.py | onuratakan/cvdl | bb4981af134770074460e620c2c65054d62cf32b | [
"MIT"
] | 4 | 2021-12-19T18:26:12.000Z | 2022-01-11T15:46:29.000Z |
class CVContent:
"""
CV Content is defined as a set of sections, including
"Header" as a special section type. Each section
conforms a Schema defined in the CV Schema Document(CVSD)
using a set of pre-defined data types.
"""
def __init__(self):
pass
| 24 | 61 | 0.663194 |
232bed1d48af38703954fb1a4e79fd4294e2b7be | 14,715 | py | Python | from_3b1b/old/counting_in_binary.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from_3b1b/old/counting_in_binary.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from_3b1b/old/counting_in_binary.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import itertools as it
from copy import deepcopy
import sys
from manim2.imports import *
from script_wrapper import command_line_create_scene
MOVIE_PREFIX = "counting_in_binary/"
BASE_HAND_FILE = os.path.join(VIDEO_DIR, MOVIE_PREFIX, "Base.mp4")
FORCED_FRAME_DURATION = 0.02
... | 30.720251 | 115 | 0.539925 |
263ba45d23a8bbff839009a8420cac0bdeaf378f | 1,373 | py | Python | create_connect.py | christophschubert/ccloud-python-api | 077e58f60a05b5df6cfbda700a3fb05dcaa10ec6 | [
"Apache-2.0"
] | null | null | null | create_connect.py | christophschubert/ccloud-python-api | 077e58f60a05b5df6cfbda700a3fb05dcaa10ec6 | [
"Apache-2.0"
] | null | null | null | create_connect.py | christophschubert/ccloud-python-api | 077e58f60a05b5df6cfbda700a3fb05dcaa10ec6 | [
"Apache-2.0"
] | null | null | null | import argparse
import ccloud
parser = argparse.ArgumentParser(description='Set up local connect cluster.')
parser.add_argument('--kafka-cluster', dest='kafka', metavar'lkc-xxxx', required=True, help='logical Kafka cluster to connect to')
parser.add_argument('--connect-group-id', dest='group_id', metavar='id', requi... | 30.511111 | 132 | 0.737072 |
8649de3e2a37c3bcec04cdb9e198446597691c78 | 13,053 | py | Python | duo_auth/vendor/duo_client_python/tests/test_admin.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | duo_auth/vendor/duo_client_python/tests/test_admin.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | duo_auth/vendor/duo_client_python/tests/test_admin.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import unittest
import warnings
from . import util
import duo_client.admin
class TestAdmin(unittest.TestCase):
def setUp(self):
self.client = duo_client.admin.Admin(
'test_ikey', 'test_akey', 'example.com')
self.client.account_id = 'DA01234567890... | 40.039877 | 80 | 0.586532 |
a8adda23c6be1cbba71574297ec354a1dbe487b7 | 5,389 | py | Python | plugins/modules/ovirt_group.py | mnecas/ansible_collections_ovirt | 99d97cc72fafa580e1934d44dd751a94ba840718 | [
"Apache-2.0"
] | null | null | null | plugins/modules/ovirt_group.py | mnecas/ansible_collections_ovirt | 99d97cc72fafa580e1934d44dd751a94ba840718 | [
"Apache-2.0"
] | null | null | null | plugins/modules/ovirt_group.py | mnecas/ansible_collections_ovirt | 99d97cc72fafa580e1934d44dd751a94ba840718 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | 28.973118 | 114 | 0.652997 |
b4668175155dbf7e60bdc884ce3307fde13019d5 | 4,128 | py | Python | test/functional/feature_minchainwork.py | patentcoin/patentcoin | 5dd4ba6cf18946be6be0f564952a55358c81fe95 | [
"MIT"
] | 1 | 2021-12-11T19:14:32.000Z | 2021-12-11T19:14:32.000Z | test/functional/feature_minchainwork.py | Cryptogits/patentcoin | 5dd4ba6cf18946be6be0f564952a55358c81fe95 | [
"MIT"
] | null | null | null | test/functional/feature_minchainwork.py | Cryptogits/patentcoin | 5dd4ba6cf18946be6be0f564952a55358c81fe95 | [
"MIT"
] | 2 | 2020-06-27T10:26:01.000Z | 2021-12-11T15:33:50.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test logic for setting nMinimumChainWork on command line.
Nodes don't consider themselves out of "init... | 45.362637 | 108 | 0.698643 |
ea944c82bb12f999c40cd26c90c2a596a58bd720 | 1,020 | py | Python | src/crypt1.py | xiaonanln/python-usaco | 8f0fef19cb5f89232d985f79d955f0de5ef4e10d | [
"MIT"
] | null | null | null | src/crypt1.py | xiaonanln/python-usaco | 8f0fef19cb5f89232d985f79d955f0de5ef4e10d | [
"MIT"
] | null | null | null | src/crypt1.py | xiaonanln/python-usaco | 8f0fef19cb5f89232d985f79d955f0de5ef4e10d | [
"MIT"
] | null | null | null | """
ID: isaiahl1
LANG: PYTHON2
TASK: crypt1
"""
TASK = 'crypt1'
def readints(fin):
return tuple(int(x) for x in fin.readline().split())
def readint(fin):
return int(fin.readline())
def main(fin, fout):
N = readint(fin)
digits = readints(fin)
count = 0
print 'digits', digits
for a in digits:
if a == 0: cont... | 17 | 59 | 0.562745 |
a3f8ffe9c342d0388cb2c63ce70edfa290ec2731 | 3,795 | py | Python | alexber/rpsgame/app.py | alex-ber/RocketPaperScissorsGame | c38c82a17d508c892c686454864ee2356f441d1a | [
"BSD-2-Clause"
] | null | null | null | alexber/rpsgame/app.py | alex-ber/RocketPaperScissorsGame | c38c82a17d508c892c686454864ee2356f441d1a | [
"BSD-2-Clause"
] | 1 | 2019-03-20T10:35:36.000Z | 2019-03-21T12:46:44.000Z | alexber/rpsgame/app.py | alex-ber/RocketPaperScissorsGame | c38c82a17d508c892c686454864ee2356f441d1a | [
"BSD-2-Clause"
] | null | null | null | import logging.config
from collections import OrderedDict
from alexber.rpsgame import app_conf as conf
from alexber.rpsgame.app_create_instance import importer, create_instance
def _create_player_factory(player_d):
assert player_d is not None
def factory_player():
name_player = player_d.get(conf.NAME... | 29.648438 | 97 | 0.549671 |
e643ad353a143ce04f071646c88bd4d22490f221 | 1,544 | py | Python | python/books/hard_way/p32/ex39.py | ShenJinXiang/example | 9d3bdf73079092791d3f96d73573ee51d66774ab | [
"MIT"
] | null | null | null | python/books/hard_way/p32/ex39.py | ShenJinXiang/example | 9d3bdf73079092791d3f96d73573ee51d66774ab | [
"MIT"
] | null | null | null | python/books/hard_way/p32/ex39.py | ShenJinXiang/example | 9d3bdf73079092791d3f96d73573ee51d66774ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# create a mapping of state to abbreviation
states = {
'Oregon': 'OR',
'Florida': 'FL',
'California': 'CA',
'New York': 'NY',
'Michigan': 'MI'
}
# create a basic set of states and some cities in them
cities = {'CA': 'San Francisco', 'MI': 'Detroit', 'FL': 'Jacksonville', 'NY... | 26.62069 | 107 | 0.646373 |
187f7cef9029e014e09c9e1979a02437efc73876 | 5,069 | py | Python | tests/gateways/disk/test_delete.py | richmoore1962/conda | ef36713bfeca5b9a8505ff8ae6d7899c2d7c6306 | [
"BSD-3-Clause"
] | 1 | 2017-06-11T01:32:33.000Z | 2017-06-11T01:32:33.000Z | tests/gateways/disk/test_delete.py | richmoore1962/conda | ef36713bfeca5b9a8505ff8ae6d7899c2d7c6306 | [
"BSD-3-Clause"
] | 1 | 2019-04-02T23:35:13.000Z | 2019-04-02T23:35:13.000Z | tests/gateways/disk/test_delete.py | richmoore1962/conda | ef36713bfeca5b9a8505ff8ae6d7899c2d7c6306 | [
"BSD-3-Clause"
] | 1 | 2020-12-31T08:15:39.000Z | 2020-12-31T08:15:39.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from errno import ENOENT
import os
from os.path import isdir, isfile, islink, join, lexists
import pytest
from conda.compat import TemporaryDirectory
from conda.gateways.disk.create import create_link
from cond... | 30.353293 | 82 | 0.657526 |
8f800cd19c6adff568a5298e5cc74bbe6dc6cc9c | 2,112 | py | Python | pyoutline/outline/executor.py | srbhss/OpenCue | c0b8aeab0ea324c3c46541d98b4a968230c668eb | [
"Apache-2.0"
] | null | null | null | pyoutline/outline/executor.py | srbhss/OpenCue | c0b8aeab0ea324c3c46541d98b4a968230c668eb | [
"Apache-2.0"
] | 2 | 2019-10-02T23:58:20.000Z | 2020-03-30T19:18:48.000Z | pyoutline/outline/executor.py | srbhss/OpenCue | c0b8aeab0ea324c3c46541d98b4a968230c668eb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 Sony Pictures Imageworks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 28.16 | 75 | 0.633523 |
8006931c21ea8c3f27c4af3630c7fc44db363826 | 1,311 | py | Python | swtstore/classes/views/app.py | janastu/swtstore | 7326138bf2fbf2a4ed8c7300c68092f91709dfc2 | [
"BSD-2-Clause"
] | 2 | 2015-04-28T00:35:21.000Z | 2016-02-11T19:31:15.000Z | swtstore/classes/views/app.py | janastu/swtstore | 7326138bf2fbf2a4ed8c7300c68092f91709dfc2 | [
"BSD-2-Clause"
] | 9 | 2015-02-02T11:24:23.000Z | 2017-12-29T07:49:07.000Z | swtstore/classes/views/app.py | janastu/swtstore | 7326138bf2fbf2a4ed8c7300c68092f91709dfc2 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding utf-8 -*-
# classes/views/apps.py
from flask import Module, request, render_template, redirect,\
url_for, abort
from werkzeug.security import gen_salt
from swtstore.classes.models import Client, User
from swtstore.classes.utils import urlnorm
app = Module(__name__)
@app.route('/register', method... | 29.133333 | 76 | 0.623188 |
856327a242acb8b83b1abe381a66212bee36dc9c | 71,690 | py | Python | core/controllers/suggestion_test.py | EishaMazhar/oppia | ab4f3cf20764b27f567798e4b1184471aaf7f73b | [
"Apache-2.0"
] | 1 | 2020-09-30T17:55:05.000Z | 2020-09-30T17:55:05.000Z | core/controllers/suggestion_test.py | gitter-badger/oppia | 7d8e659264582d7ce74bc6c139e597b82bca0e04 | [
"Apache-2.0"
] | 1 | 2020-05-27T06:08:17.000Z | 2020-05-27T06:08:17.000Z | core/controllers/suggestion_test.py | gitter-badger/oppia | 7d8e659264582d7ce74bc6c139e597b82bca0e04 | [
"Apache-2.0"
] | 1 | 2018-03-20T14:12:31.000Z | 2018-03-20T14:12:31.000Z | # coding: utf-8
#
# Copyright 2018 The Oppia 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 requi... | 41.391455 | 111 | 0.60205 |
db2b70ef1b086a4f2912233a9df83803b5a5843a | 6,528 | py | Python | bpy_lambda/2.78/scripts/addons_contrib/cmu_mocap_browser/__init__.py | resultant-gamedev/bpy_lambda | c8cf46c10c69e74a0892b621d76c62edaa5b04bc | [
"MIT"
] | null | null | null | bpy_lambda/2.78/scripts/addons_contrib/cmu_mocap_browser/__init__.py | resultant-gamedev/bpy_lambda | c8cf46c10c69e74a0892b621d76c62edaa5b04bc | [
"MIT"
] | null | null | null | bpy_lambda/2.78/scripts/addons_contrib/cmu_mocap_browser/__init__.py | resultant-gamedev/bpy_lambda | c8cf46c10c69e74a0892b621d76c62edaa5b04bc | [
"MIT"
] | 1 | 2019-11-24T18:43:42.000Z | 2019-11-24T18:43:42.000Z | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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.
#
# This program is distrib... | 37.734104 | 80 | 0.633885 |
3524ddca590cbb63983c3249f1b5ccf01c782510 | 6,894 | py | Python | this is crazy airline 6 upgraded.py | Abhay-Sastha-S/twitter-sentiment-analysis-cbse | 4bb39ef645cc00df332d33f56adc214ce81b2397 | [
"MIT"
] | null | null | null | this is crazy airline 6 upgraded.py | Abhay-Sastha-S/twitter-sentiment-analysis-cbse | 4bb39ef645cc00df332d33f56adc214ce81b2397 | [
"MIT"
] | null | null | null | this is crazy airline 6 upgraded.py | Abhay-Sastha-S/twitter-sentiment-analysis-cbse | 4bb39ef645cc00df332d33f56adc214ce81b2397 | [
"MIT"
] | null | null | null | import pandas as pd
project_data_file_raw = open("C:/Users/MSI/Desktop/project_twitter_data updated.csv")
results_data_file = open("C:/Users/MSI/Desktop/resulting_data.csv", "w+")
project_data_file = open("C:/Users/MSI/Desktop/project_twitter_data_filtered.csv", 'r+')
project_data_file.truncate(0)
results_data... | 39.170455 | 247 | 0.632289 |
e97c7053b712437ddd9adb3801c6bf654177920e | 2,717 | py | Python | PersonManage/role/views.py | ahriknow/ahriknow | 817b5670c964e01ffe19ed182ce0a7b42e17ce09 | [
"MIT"
] | null | null | null | PersonManage/role/views.py | ahriknow/ahriknow | 817b5670c964e01ffe19ed182ce0a7b42e17ce09 | [
"MIT"
] | 3 | 2021-03-19T01:28:43.000Z | 2021-04-08T19:57:19.000Z | PersonManage/role/views.py | ahriknow/ahriknow | 817b5670c964e01ffe19ed182ce0a7b42e17ce09 | [
"MIT"
] | null | null | null | from django.conf import settings
from redis import StrictRedis
from rest_framework.response import Response
from rest_framework.views import APIView
from PersonManage.role.models import Role
from PersonManage.role.serializer import OneRole, ManyRole
from PersonManage.jurisdiction.models import Jurisdiction
class Role... | 46.844828 | 92 | 0.560177 |
d280ab15421e54a7b67d4fd6e756157f8cd08783 | 1,315 | py | Python | qiskit/utils/units.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 11 | 2019-06-27T09:53:29.000Z | 2021-03-02T04:40:30.000Z | qiskit/utils/units.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 24 | 2021-01-27T08:20:27.000Z | 2021-07-06T09:42:28.000Z | qiskit/utils/units.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 4 | 2019-08-05T15:35:33.000Z | 2020-09-18T18:55:02.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# 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 derivative wo... | 25.784314 | 77 | 0.613688 |
42395a5378bd8c6f7ab333908bac7a974d27cf53 | 2,750 | py | Python | tensorlayer/layers/extend.py | Windaway/tensorlayer | 7afd8f0a39a4f1864a82e508f7a326fc998dc033 | [
"Apache-2.0"
] | 1 | 2019-05-16T13:27:57.000Z | 2019-05-16T13:27:57.000Z | tensorlayer/layers/extend.py | Helilysyt/tensorlayer | 2dc4482a13aff3833a246b4d85b69a5d9079f01d | [
"Apache-2.0"
] | null | null | null | tensorlayer/layers/extend.py | Helilysyt/tensorlayer | 2dc4482a13aff3833a246b4d85b69a5d9079f01d | [
"Apache-2.0"
] | 1 | 2021-04-13T06:34:48.000Z | 2021-04-13T06:34:48.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
import tensorflow as tf
from tensorlayer import logging
from tensorlayer.decorators import deprecated_alias
from tensorlayer.layers.core import Layer
__all__ = [
'ExpandDims',
'Tile',
]
class ExpandDims(Layer):
"""
The :class:`ExpandDims` class inserts a d... | 25.462963 | 90 | 0.581091 |
bc2d148f4d4666dafb99a6f4e156fae150b8487b | 243 | py | Python | 01_basic/exercise_068.py | sideroff/python-exercises | 6a9cc55735d977a71697204c734b3ade84a0c4fd | [
"MIT"
] | null | null | null | 01_basic/exercise_068.py | sideroff/python-exercises | 6a9cc55735d977a71697204c734b3ade84a0c4fd | [
"MIT"
] | 4 | 2020-03-24T18:00:07.000Z | 2021-06-02T00:51:22.000Z | 01_basic/exercise_068.py | sideroff/python-exercises | 6a9cc55735d977a71697204c734b3ade84a0c4fd | [
"MIT"
] | null | null | null | from math import sqrt
def main():
digit = int(input("Choose an int: "))
sum_of_digits = sum(list(map(int, list(str(digit)))))
print("The sum of the digits in %i is %i" % (digit, sum_of_digits))
if __name__ == '__main__': main() | 24.3 | 71 | 0.63786 |
7179969513adacbfeb949c1c273d73332aca36a1 | 42,217 | py | Python | src/azure-cli-core/azure/cli/core/__init__.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | 1 | 2016-09-15T23:10:48.000Z | 2016-09-15T23:10:48.000Z | src/azure-cli-core/azure/cli/core/__init__.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | null | null | null | src/azure-cli-core/azure/cli/core/__init__.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 49.901891 | 120 | 0.63112 |
79974320f4093fec90a2f9bff2924fdcaaa3d6db | 101 | py | Python | python/y2019/d24/__main__.py | luke-dixon/aoc | 94851a5866a1ef29e3ba10098160cba883882683 | [
"MIT"
] | 1 | 2021-01-12T20:04:01.000Z | 2021-01-12T20:04:01.000Z | python/y2019/d24/__main__.py | luke-dixon/aoc | 94851a5866a1ef29e3ba10098160cba883882683 | [
"MIT"
] | null | null | null | python/y2019/d24/__main__.py | luke-dixon/aoc | 94851a5866a1ef29e3ba10098160cba883882683 | [
"MIT"
] | null | null | null | import sys
from .day24 import Day24
if __name__ == '__main__':
Day24(args=sys.argv[1:]).main()
| 14.428571 | 35 | 0.673267 |
3f8e6cab1d9cd448331778dafe73793da7999b2d | 5,328 | py | Python | model/optimizers_lib/bgd_optimizer.py | ksasi/La-MAML | 05fff370282312e87eceda51dbe8c1678e2ac1e2 | [
"Apache-2.0"
] | 51 | 2020-10-24T16:11:58.000Z | 2022-03-10T06:39:04.000Z | model/optimizers_lib/bgd_optimizer.py | Johswald/La-MAML | cff3524b0f23b932d574931c3a7495c42cbd8d9d | [
"Apache-2.0"
] | 2 | 2020-12-09T06:42:45.000Z | 2021-04-24T05:52:52.000Z | model/optimizers_lib/bgd_optimizer.py | Johswald/La-MAML | cff3524b0f23b932d574931c3a7495c42cbd8d9d | [
"Apache-2.0"
] | 17 | 2020-11-24T20:21:18.000Z | 2022-01-20T19:45:57.000Z | import torch
from torch.optim.optimizer import Optimizer
class BGD(Optimizer):
"""Implements BGD.
A simple usage of BGD would be:
for samples, labels in batches:
for mc_iter in range(mc_iters):
optimizer.randomize_weights()
output = model.forward(samples)
loss = ... | 47.571429 | 119 | 0.584835 |
cec3047405310e1e8c50a96dac4d084ca7db5a1e | 28,556 | py | Python | python-siren/siren/interface/classGridTable.py | zliobaite/redescription-China | cab8ee08f21a0207bed5b48fd3493a3909d2a5ad | [
"MIT"
] | null | null | null | python-siren/siren/interface/classGridTable.py | zliobaite/redescription-China | cab8ee08f21a0207bed5b48fd3493a3909d2a5ad | [
"MIT"
] | null | null | null | python-siren/siren/interface/classGridTable.py | zliobaite/redescription-China | cab8ee08f21a0207bed5b48fd3493a3909d2a5ad | [
"MIT"
] | null | null | null | import wx
import wx.grid
### from wx import grid
### from wx import Size, Brush, Colour, NullBrush, NullPen
### from wx import DC, EVT_KEY_UP, NORMAL_FONT, SOLID, TRANSPARENT_PEN
import re, colorsys, random, datetime, math
from ..reremi.toolICList import ICList
from ..reremi.classData import ColM, NA_str_def
from ..r... | 37.085714 | 184 | 0.557291 |
c0e096adbfefa21d8ff915e8ac347b9cec7d82a3 | 2,494 | py | Python | twitch.py | mtejada/twitchplayscoffeeedition | a66b7070b28181851e0750506cbcfa04d23e0728 | [
"MIT"
] | null | null | null | twitch.py | mtejada/twitchplayscoffeeedition | a66b7070b28181851e0750506cbcfa04d23e0728 | [
"MIT"
] | null | null | null | twitch.py | mtejada/twitchplayscoffeeedition | a66b7070b28181851e0750506cbcfa04d23e0728 | [
"MIT"
] | null | null | null | import socket
import sys
import re
class Twitch:
user = ""
oauth = ""
s = None
def twitch_login_status(self, data):
if not re.match(r'^:(testserver\.local|tmi\.twitch\.tv) NOTICE \* :Login unsuccessful\r\n$', data.decode()):
return True
else:
return False
d... | 32.38961 | 127 | 0.526864 |
f79235052c732b4573c21ea4fe42b9568ef62eaf | 1,370 | py | Python | Chapter_3/Chapter_3_1_4_2.py | flytian/python_machinelearning | 004707c3e66429f102272a7da97e532255cca293 | [
"Apache-2.0"
] | null | null | null | Chapter_3/Chapter_3_1_4_2.py | flytian/python_machinelearning | 004707c3e66429f102272a7da97e532255cca293 | [
"Apache-2.0"
] | null | null | null | Chapter_3/Chapter_3_1_4_2.py | flytian/python_machinelearning | 004707c3e66429f102272a7da97e532255cca293 | [
"Apache-2.0"
] | null | null | null | # coding = utf-8
# 从sklearn.datasets中导入20类新闻文本抓取器。
from sklearn.datasets import fetch_20newsgroups
# 导入numpy,并且重命名为np。
import numpy as np
# 使用新闻抓取器从互联网上下载所有数据,并且存储在变量news中。
news = fetch_20newsgroups(subset='all')
# 从sklearn.cross_validation导入train_test_split用来分割数据。
from sklearn.cross_validation import train_test_spl... | 31.136364 | 105 | 0.751825 |
107fd7d2b07a1de86d9a61186f1e8a09a7d173bb | 6,607 | py | Python | tests/pytests/integration/reactor/test_reactor.py | WeDoSoftware/salt | cfd83e7cd63636f1f23230b9ebf5db496e93fd95 | [
"Apache-2.0"
] | null | null | null | tests/pytests/integration/reactor/test_reactor.py | WeDoSoftware/salt | cfd83e7cd63636f1f23230b9ebf5db496e93fd95 | [
"Apache-2.0"
] | null | null | null | tests/pytests/integration/reactor/test_reactor.py | WeDoSoftware/salt | cfd83e7cd63636f1f23230b9ebf5db496e93fd95 | [
"Apache-2.0"
] | null | null | null | """
tests.pytests.integration.reactor.test_reactor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test Salt's reactor system
"""
import logging
import pathlib
import time
import pytest
import salt.utils.event
import salt.utils.reactor
from salt.serializers import yaml
from tests.support.helpers import PRE_PYTEST_SKI... | 32.707921 | 104 | 0.67262 |
843497db467876b9471930678ffb35592f59fec2 | 1,548 | py | Python | examples/AdCreativePreviewsEdge.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | examples/AdCreativePreviewsEdge.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | examples/AdCreativePreviewsEdge.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | 1 | 2018-09-24T14:04:48.000Z | 2018-09-24T14:04:48.000Z | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 38.7 | 76 | 0.781008 |
95cce9d0961eb918b9549b1815f3e7049d43f2d1 | 4,627 | py | Python | src/backend/build_models/build_emnist_balanced_model.py | Nauheimer/swtp-ocr | 5590a510bfee81f2ac48ea4b56ea6c6bd48607be | [
"Apache-2.0"
] | null | null | null | src/backend/build_models/build_emnist_balanced_model.py | Nauheimer/swtp-ocr | 5590a510bfee81f2ac48ea4b56ea6c6bd48607be | [
"Apache-2.0"
] | null | null | null | src/backend/build_models/build_emnist_balanced_model.py | Nauheimer/swtp-ocr | 5590a510bfee81f2ac48ea4b56ea6c6bd48607be | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import os
#os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
import numpy as np
import pandas as pd
from random import randint
import matplotlib.pyplot as plt
from tensorflow.python.keras.layers.core import Dropout
keras = tf.keras
""" loads each data from emnist dataset. The csv m... | 35.868217 | 109 | 0.681219 |
bda521c2b8ae22ba551f8aeee907bb169f966f42 | 502 | py | Python | app.py | piian/bilibili_video | 4740653aab2b8255e325716e1ca3c6b62723b2c3 | [
"MIT"
] | null | null | null | app.py | piian/bilibili_video | 4740653aab2b8255e325716e1ca3c6b62723b2c3 | [
"MIT"
] | 2 | 2021-04-06T18:11:25.000Z | 2021-06-02T02:41:51.000Z | app.py | piian/bilibili_video | 4740653aab2b8255e325716e1ca3c6b62723b2c3 | [
"MIT"
] | null | null | null | import os
import time
from flask import Flask
import api
import video
app = Flask(__name__, instance_relative_config=True)
app.config.from_mapping(
SECRET_KEY='dev',
DATABASE=os.path.join(app.instance_path, 'video.db'),
)
app.debug = True
@app.template_filter('datetime')
def filter_datetime(s):
return ... | 18.592593 | 61 | 0.729084 |
cf2bd6096db6f39f066ffef15b070cf86aef00f0 | 5,008 | py | Python | users/views.py | Yuri-Lima/SharePay | 18547053f7e86571366abf4ec4310bf1553395c5 | [
"MIT"
] | 1 | 2021-06-14T00:42:52.000Z | 2021-06-14T00:42:52.000Z | users/views.py | Yuri-Lima/SharePay | 18547053f7e86571366abf4ec4310bf1553395c5 | [
"MIT"
] | 72 | 2021-06-08T14:18:23.000Z | 2021-07-19T05:33:40.000Z | users/views.py | Yuri-Lima/SharePay | 18547053f7e86571366abf4ec4310bf1553395c5 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import UserManager
from users.models import CustomUser
from django.urls import reverse_lazy
from django.views.generic.edit import DeleteView, UpdateView
from django.shortcuts import render
from django.http.response import HttpResponseRedirect
from allauth.account import signals
... | 33.610738 | 134 | 0.708267 |
4b7bdb993b1001e68db11274ee1b9e24ed7f7fc8 | 1,190 | py | Python | fostool/task/logger.py | meng-zha/FOST | 2fc32ded470cc465a64f46a2c06c2a081e02f3e5 | [
"MIT"
] | 181 | 2021-11-12T09:17:54.000Z | 2022-03-22T05:53:35.000Z | fostool/task/logger.py | meng-zha/FOST | 2fc32ded470cc465a64f46a2c06c2a081e02f3e5 | [
"MIT"
] | 12 | 2021-11-12T16:50:47.000Z | 2022-03-07T09:22:16.000Z | fostool/task/logger.py | meng-zha/FOST | 2fc32ded470cc465a64f46a2c06c2a081e02f3e5 | [
"MIT"
] | 41 | 2021-11-13T14:33:49.000Z | 2022-03-11T04:19:58.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# coding:utf-8
from __future__ import absolute_import, division, print_function
import logging
import os,sys
class PackagePathFilter(logging.Filter):
def filter(self, record):
"""add relative path to record
"""
pathna... | 32.162162 | 90 | 0.652941 |
331a0fcd42f72cce35cf4aa601c6be78b75eab21 | 7,139 | py | Python | qiskit/transpiler/passes/scheduling/asap.py | QAMP-Spring-2022-Transpiler-Hackathon/qiskit-terra | aee0dc4d538991560f212411db92cde5f511f65b | [
"Apache-2.0"
] | 1,456 | 2017-08-05T16:33:05.000Z | 2018-06-05T04:15:35.000Z | qiskit/transpiler/passes/scheduling/asap.py | QAMP-Spring-2022-Transpiler-Hackathon/qiskit-terra | aee0dc4d538991560f212411db92cde5f511f65b | [
"Apache-2.0"
] | 365 | 2017-08-04T06:09:16.000Z | 2018-06-05T08:33:37.000Z | qiskit/transpiler/passes/scheduling/asap.py | QAMP-Spring-2022-Transpiler-Hackathon/qiskit-terra | aee0dc4d538991560f212411db92cde5f511f65b | [
"Apache-2.0"
] | 463 | 2017-08-05T04:10:01.000Z | 2018-06-05T06:43:21.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# 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 derivative wo... | 41.028736 | 101 | 0.517299 |
c6e3f20dfa7543bdfb515a1f84daaa3d41f2ed6c | 276 | py | Python | BIT MANIPULATION/Missing Number/Code.py | HassanRahim26/LEETCODE | c0ec81b037ff7b2d6e6030ac9835c21ed825100f | [
"MIT"
] | 3 | 2021-08-31T11:02:28.000Z | 2022-01-17T08:07:00.000Z | BIT MANIPULATION/Missing Number/Code.py | HassanRahim26/LEETCODE | c0ec81b037ff7b2d6e6030ac9835c21ed825100f | [
"MIT"
] | null | null | null | BIT MANIPULATION/Missing Number/Code.py | HassanRahim26/LEETCODE | c0ec81b037ff7b2d6e6030ac9835c21ed825100f | [
"MIT"
] | null | null | null | # PROBLEM LINK:- https://leetcode.com/problems/missing-number/
class Solution:
def missingNumber(self, nums: List[int]) -> int:
n = len(nums)
i = 0
for x in nums:
n ^= x;
n ^= i
i += 1
return n
| 21.230769 | 62 | 0.463768 |
04ed2808c5626e82429bc6009be797ff87908cfa | 52,833 | py | Python | lbry/wallet/ledger.py | freakypie/lbry-sdk | 2cc7e5dfdcc3ba2dfbdf165c5aaf1569795aa920 | [
"MIT"
] | null | null | null | lbry/wallet/ledger.py | freakypie/lbry-sdk | 2cc7e5dfdcc3ba2dfbdf165c5aaf1569795aa920 | [
"MIT"
] | null | null | null | lbry/wallet/ledger.py | freakypie/lbry-sdk | 2cc7e5dfdcc3ba2dfbdf165c5aaf1569795aa920 | [
"MIT"
] | null | null | null | import os
import copy
import time
import asyncio
import logging
from datetime import datetime
from functools import partial
from operator import itemgetter
from collections import defaultdict
from binascii import hexlify, unhexlify
from typing import Dict, Tuple, Type, Iterable, List, Optional, DefaultDict, NamedTuple
... | 43.881229 | 119 | 0.596597 |
d85eacb006b6ff34ec06ca166b36599b314cde19 | 987 | py | Python | app/core/admin.py | krismwas/ingredients | 33c5718117c0bc2fd65d16fd1fdfbfae69840d62 | [
"MIT"
] | null | null | null | app/core/admin.py | krismwas/ingredients | 33c5718117c0bc2fd65d16fd1fdfbfae69840d62 | [
"MIT"
] | null | null | null | app/core/admin.py | krismwas/ingredients | 33c5718117c0bc2fd65d16fd1fdfbfae69840d62 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import ugettext as _
from core.models import User, Ingredient, Tag, Recipe
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
... | 24.675 | 64 | 0.524823 |
ff6cdf74e5bcaf7a4e87069779bea66494b9b37d | 2,316 | py | Python | compiler_gym/util/timer.py | thecoblack/CompilerGym | ade54e2f1829cf41722decb0942a4d6fd3102c2c | [
"MIT"
] | null | null | null | compiler_gym/util/timer.py | thecoblack/CompilerGym | ade54e2f1829cf41722decb0942a4d6fd3102c2c | [
"MIT"
] | null | null | null | compiler_gym/util/timer.py | thecoblack/CompilerGym | ade54e2f1829cf41722decb0942a4d6fd3102c2c | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from time import time
from typing import Callable, Optional
from absl.logging import skip_log_prefix
def humanize_duration(seconds: float) -... | 26.318182 | 82 | 0.582038 |
4b2441c71feef22adf22f4e5e44d413c9b118abe | 616 | py | Python | src/appstore/views.py | revanth-reddy/ns-3-Appstore | 32ac93acf1c9a721adf9f43c0799d6daff9beb7f | [
"MIT"
] | null | null | null | src/appstore/views.py | revanth-reddy/ns-3-Appstore | 32ac93acf1c9a721adf9f43c0799d6daff9beb7f | [
"MIT"
] | null | null | null | src/appstore/views.py | revanth-reddy/ns-3-Appstore | 32ac93acf1c9a721adf9f43c0799d6daff9beb7f | [
"MIT"
] | null | null | null | from django.views import generic
from django.shortcuts import render
from apps.models import App, Tag
from apps.views import findTags
def homePage(request):
new_releases = App.objects.all().filter(active=True).order_by('-latest_release_date')[:4]
top_tags, not_top_tags = findTags()
context = {
'new... | 29.333333 | 93 | 0.717532 |
7c20fda064db53476d100b8b6a3bc454a07fca32 | 19,661 | py | Python | pyracmon/graph/graph.py | sozu/py-pyracmon | 4a7789ae5432a3197c58ae194de4b8065bbc2846 | [
"MIT"
] | null | null | null | pyracmon/graph/graph.py | sozu/py-pyracmon | 4a7789ae5432a3197c58ae194de4b8065bbc2846 | [
"MIT"
] | null | null | null | pyracmon/graph/graph.py | sozu/py-pyracmon | 4a7789ae5432a3197c58ae194de4b8065bbc2846 | [
"MIT"
] | null | null | null | from typing import *
from .identify import neverPolicy
from .template import GraphTemplate
def new_graph(template: GraphTemplate, *bases: GraphTemplate):
"""
Create a graph from a template.
Use this function instead of invoking constructor directly.
:param template: A template of a graph.
:param... | 35.108929 | 134 | 0.560602 |
abf145709e7fb615ea54f862b9b790f0474bbd58 | 1,176 | py | Python | migrations/versions/e42c76e8aa8e_local_path_and_yd_path_removed_from_db.py | ShiawasenaHoshi/telegram_photo_saver_bot | 7b9b20ed89268da9c64f94958bdf935c18cc85f8 | [
"MIT"
] | null | null | null | migrations/versions/e42c76e8aa8e_local_path_and_yd_path_removed_from_db.py | ShiawasenaHoshi/telegram_photo_saver_bot | 7b9b20ed89268da9c64f94958bdf935c18cc85f8 | [
"MIT"
] | 1 | 2021-06-02T02:33:29.000Z | 2021-06-02T02:33:29.000Z | migrations/versions/e42c76e8aa8e_local_path_and_yd_path_removed_from_db.py | ShiawasenaHoshi/telegram_photo_saver_bot | 7b9b20ed89268da9c64f94958bdf935c18cc85f8 | [
"MIT"
] | null | null | null | """local_path and yd_path removed from db
Revision ID: e42c76e8aa8e
Revises: a336639792e2
Create Date: 2019-11-15 18:27:45.236183
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e42c76e8aa8e'
down_revision = 'a336639792e2'
branch_labels = None
depends_on = Non... | 31.783784 | 92 | 0.693027 |
b0bbf51fabf126f2ff5b4d5d947c9b52cdc725c2 | 549 | py | Python | namingalgorithm/urls.py | Amrithasuresh/BPPRC | 6ee01914a612d65f7084db7ce377da3bab682e66 | [
"BSD-3-Clause"
] | 2 | 2020-01-10T18:36:37.000Z | 2020-01-10T18:42:41.000Z | namingalgorithm/urls.py | Amrithasuresh/BPPRC | 6ee01914a612d65f7084db7ce377da3bab682e66 | [
"BSD-3-Clause"
] | 12 | 2020-06-05T23:39:18.000Z | 2022-03-12T00:48:18.000Z | namingalgorithm/urls.py | Amrithasuresh/BPPRC_v1 | 6ee01914a612d65f7084db7ce377da3bab682e66 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from namingalgorithm import views
urlpatterns = [
path('submit_home/', views.submit_home, name='submit_home'),
path('submit/', views.submit, name='submit'),
path('naming_algorithm/', views.naming_algorithm, name='naming_algorithm'),
... | 39.214286 | 79 | 0.734062 |
4716ea102ac70ac4793728bb7ff886169c472113 | 49,485 | py | Python | src/marshmallow/schema.py | theirix/marshmallow | 43db1072f94ae6af40cbedc058f1c02f3cedb379 | [
"MIT"
] | null | null | null | src/marshmallow/schema.py | theirix/marshmallow | 43db1072f94ae6af40cbedc058f1c02f3cedb379 | [
"MIT"
] | null | null | null | src/marshmallow/schema.py | theirix/marshmallow | 43db1072f94ae6af40cbedc058f1c02f3cedb379 | [
"MIT"
] | null | null | null | """The :class:`Schema` class, including its metaclass and options (class Meta)."""
from collections import defaultdict, OrderedDict
from collections.abc import Mapping
from functools import lru_cache
import datetime as dt
import uuid
import decimal
import copy
import inspect
import json
import typing
import warnings
f... | 40.231707 | 97 | 0.584339 |
628a5bf65aee34084af7ff08939f96a0ae9dd24d | 166 | py | Python | accounting/calculations/admin.py | m-molecula741/web-accounting-service-for-enterprises | 6d60abf4f7d95b2b02c40979bfe253e8f311b8b5 | [
"Apache-2.0"
] | null | null | null | accounting/calculations/admin.py | m-molecula741/web-accounting-service-for-enterprises | 6d60abf4f7d95b2b02c40979bfe253e8f311b8b5 | [
"Apache-2.0"
] | null | null | null | accounting/calculations/admin.py | m-molecula741/web-accounting-service-for-enterprises | 6d60abf4f7d95b2b02c40979bfe253e8f311b8b5 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import AccInfo, Income, Expenses
admin.site.register(AccInfo)
admin.site.register(Income)
admin.site.register(Expenses) | 27.666667 | 45 | 0.825301 |
b70cf7ce6eedaef70d468a807c678dbced03bd99 | 3,709 | py | Python | utils/multithreadeddownloader.py | kaustubhhiware/swift | 7089c4e05fd831b864de46ee37b681a6249909e3 | [
"MIT"
] | null | null | null | utils/multithreadeddownloader.py | kaustubhhiware/swift | 7089c4e05fd831b864de46ee37b681a6249909e3 | [
"MIT"
] | null | null | null | utils/multithreadeddownloader.py | kaustubhhiware/swift | 7089c4e05fd831b864de46ee37b681a6249909e3 | [
"MIT"
] | null | null | null | """
Performs Multithreaded download
"""
import urllib3
import logging
import os
import sys
import shutil
import threading
import pathlib
from utils import misc
from utils import request
from utils import constants
from utils import calculation
class MultithreadedDownloader:
"""
Main class providing interf... | 36.009709 | 99 | 0.571852 |
fc7752c444843770bea7d4787963de010a58d57d | 58,557 | py | Python | python/paddle/optimizer/lr.py | ikingye/Paddle | 766b35152713d4410d4c5b05a3fa5e5a64a6fa60 | [
"Apache-2.0"
] | null | null | null | python/paddle/optimizer/lr.py | ikingye/Paddle | 766b35152713d4410d4c5b05a3fa5e5a64a6fa60 | [
"Apache-2.0"
] | null | null | null | python/paddle/optimizer/lr.py | ikingye/Paddle | 766b35152713d4410d4c5b05a3fa5e5a64a6fa60 | [
"Apache-2.0"
] | null | null | null | # 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 applic... | 40.135024 | 167 | 0.552846 |
39d69130f273553e775f424452d4442ac16da4e4 | 5,445 | py | Python | office365/graph_client.py | andreas-j-hauser/Office365-REST-Python-Client | 4bf8ee0b65985980b50fc3b74b32fd2db34561ba | [
"MIT"
] | null | null | null | office365/graph_client.py | andreas-j-hauser/Office365-REST-Python-Client | 4bf8ee0b65985980b50fc3b74b32fd2db34561ba | [
"MIT"
] | null | null | null | office365/graph_client.py | andreas-j-hauser/Office365-REST-Python-Client | 4bf8ee0b65985980b50fc3b74b32fd2db34561ba | [
"MIT"
] | null | null | null | from office365.actions.download_content_query import DownloadContentQuery
from office365.actions.search_query import SearchQuery
from office365.actions.upload_content_query import UploadContentQuery
from office365.directory.directory import Directory
from office365.directory.directoryObjectCollection import DirectoryOb... | 37.8125 | 102 | 0.72562 |
6c828d7b0ceacb1400a52a0c44d6d5e12702c982 | 10,914 | py | Python | xlmhg/mhg.py | flo-compbio/xlmhg | c29d913386443396254774b8cff5cff2b5731323 | [
"BSD-3-Clause"
] | 15 | 2015-05-22T23:58:25.000Z | 2021-12-31T03:01:54.000Z | xlmhg/mhg.py | flo-compbio/xlmhg | c29d913386443396254774b8cff5cff2b5731323 | [
"BSD-3-Clause"
] | 6 | 2016-07-18T05:02:04.000Z | 2021-08-04T09:53:35.000Z | xlmhg/mhg.py | flo-compbio/xlmhg | c29d913386443396254774b8cff5cff2b5731323 | [
"BSD-3-Clause"
] | 1 | 2015-05-24T13:10:10.000Z | 2015-05-24T13:10:10.000Z | # Copyright (c) 2016-2019 Florian Wagner
#
# This file is part of XL-mHG.
"""XL-mHG Python implementation."""
import numpy as np
DEFAULT_TOL = 1e-12
def is_equal(a, b, tol):
"""Ratio test to check if two floating point numbers are equal.
Parameters
----------
a: float
The first floating po... | 30.066116 | 99 | 0.48195 |
b7f4039a92939c501636083557c32e37d82c9539 | 1,349 | py | Python | helpers/volatilityCube.py | neoyung/IrLib | 942793c49a477c9f5747410be74daf868391f289 | [
"MIT"
] | 1 | 2021-10-04T03:15:50.000Z | 2021-10-04T03:15:50.000Z | helpers/volatilityCube.py | neoyung/IrLib | 942793c49a477c9f5747410be74daf868391f289 | [
"MIT"
] | null | null | null | helpers/volatilityCube.py | neoyung/IrLib | 942793c49a477c9f5747410be74daf868391f289 | [
"MIT"
] | null | null | null | from irLib.mathTools.estimationEngine import linearInterpolatorND
import numpy as np
class volatilityCube:
def __init__(self, tenorIndex, strikeIndex, time2MaturityIndex, volatilityValues):
self.tenorIndex = tenorIndex
self.strikeIndex = strikeIndex
self.time2MaturityIndex = time2MaturityI... | 46.517241 | 139 | 0.682728 |
3f59e0d26f10064566eda8e33975ec03537292b7 | 4,942 | py | Python | tools/cygprofile/patch_orderfile_unittest.py | zipated/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools/cygprofile/patch_orderfile_unittest.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools/cygprofile/patch_orderfile_unittest.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env vpython
# 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.
import unittest
import patch_orderfile
import symbol_extractor
class TestPatchOrderFile(unittest.TestCase):
def testRemoveSuffixe... | 39.536 | 74 | 0.610684 |
d25a0d6b387da86a9c67ea6317bbb7f33a9cffe2 | 632 | py | Python | anyfunction.py | PRASAD-DANGARE/PYTHON | 36214f7dc3762d327e5a29e40752edeb098249c8 | [
"MIT"
] | 1 | 2021-06-07T07:55:28.000Z | 2021-06-07T07:55:28.000Z | anyfunction.py | PRASAD-DANGARE/PYTHON | 36214f7dc3762d327e5a29e40752edeb098249c8 | [
"MIT"
] | null | null | null | anyfunction.py | PRASAD-DANGARE/PYTHON | 36214f7dc3762d327e5a29e40752edeb098249c8 | [
"MIT"
] | null | null | null | # python program to know the effect of any() and all() function
'''
Function Name : Use Of Any And All Functions.
Function Date : 28 Aug 2020
Function Author : Prasad Dangare
Input : String
Output : String
'''
from numpy import*
a = array([1, 2, 3, 0])
b = array([0, 2, ... | 21.793103 | 69 | 0.56962 |
e5e86327b95e2e7ea18208fcc0d7e9173f249363 | 32,126 | py | Python | test/functional/fundrawtransaction.py | andyfreer/dash | 351fbf65efc9459cb69a3c843cc205a8b94c95b3 | [
"MIT"
] | 20 | 2019-07-24T07:07:49.000Z | 2021-09-06T15:25:55.000Z | test/functional/fundrawtransaction.py | andyfreer/dash | 351fbf65efc9459cb69a3c843cc205a8b94c95b3 | [
"MIT"
] | 13 | 2019-10-15T13:32:33.000Z | 2021-12-03T14:48:49.000Z | test/functional/fundrawtransaction.py | andyfreer/dash | 351fbf65efc9459cb69a3c843cc205a8b94c95b3 | [
"MIT"
] | 35 | 2019-07-17T22:36:45.000Z | 2021-06-02T15:36:46.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the fundrawtransaction RPC."""
from test_framework.test_framework import BitcoinTestFramework
fro... | 44.619444 | 214 | 0.570286 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.