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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
43e5588b3ab0e41f5558ef90e5cdfc3ea00f94c9 | 2,535 | py | Python | precommit-pylint.py | zinok/precommit-pylint | 217fc9d96aca4cbe9e799a4810a48eee142d958f | [
"MIT"
] | 1 | 2021-08-13T18:01:20.000Z | 2021-08-13T18:01:20.000Z | precommit-pylint.py | zinok/precommit-pylint | 217fc9d96aca4cbe9e799a4810a48eee142d958f | [
"MIT"
] | null | null | null | precommit-pylint.py | zinok/precommit-pylint | 217fc9d96aca4cbe9e799a4810a48eee142d958f | [
"MIT"
] | 3 | 2019-02-27T10:08:35.000Z | 2022-01-19T11:05:53.000Z | #!/usr/bin/env python3
import argparse
import contextlib
import io
import os
import re
from pylint.lint import Run as pylint_run
_IGNORE_REGEXP = re.compile(
r'Ignoring entire file \(file-ignored\)'
)
def _check_ignore(pylint_output):
"""Check the python file whether ignored
If the file is ignored retu... | 25.09901 | 86 | 0.631558 |
0f612e3d46d4f0ec55a9db47bdd8c53c3ee1389b | 909 | py | Python | solutions/301_remove_invalid_parentheses.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/301_remove_invalid_parentheses.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/301_remove_invalid_parentheses.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | class Solution:
def removeInvalidParentheses(self, s: str) -> List[str]:
"""BFS
Running Time: O(n * 2^n) where n is the length of s.
"""
res = []
lvl = set([s])
while lvl:
nlvl = set()
for sstr in lvl:
if self._is_valid(sstr):
... | 26.735294 | 60 | 0.353135 |
601e2fbb37406087387e8ec36a539ef5816a0a16 | 10,211 | py | Python | src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/__init__.py | viewdy/phantomjs | eddb0db1d253fd0c546060a4555554c8ee08c13c | [
"BSD-3-Clause"
] | 1 | 2021-02-09T10:24:31.000Z | 2021-02-09T10:24:31.000Z | src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/__init__.py | mrampersad/phantomjs | dca6f77a36699eb4e1c46f7600cca618f01b0ac3 | [
"BSD-3-Clause"
] | null | null | null | src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/__init__.py | mrampersad/phantomjs | dca6f77a36699eb4e1c46f7600cca618f01b0ac3 | [
"BSD-3-Clause"
] | 1 | 2017-03-19T13:03:23.000Z | 2017-03-19T13:03:23.000Z | # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# 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 conditions and... | 53.742105 | 278 | 0.717168 |
520cddfeb122010d0d133bf66a62f4a6f71a957e | 394 | py | Python | python_teste/python_aulas/aula_100.py | BrunoDantasMoreira/projectsPython | bd73ab0b3c067456407f227ed2ece42e7f21ddfc | [
"MIT"
] | 1 | 2020-07-27T14:18:08.000Z | 2020-07-27T14:18:08.000Z | python_teste/python_aulas/aula_100.py | BrunoDantasMoreira/projectsPython | bd73ab0b3c067456407f227ed2ece42e7f21ddfc | [
"MIT"
] | null | null | null | python_teste/python_aulas/aula_100.py | BrunoDantasMoreira/projectsPython | bd73ab0b3c067456407f227ed2ece42e7f21ddfc | [
"MIT"
] | null | null | null | from random import randint
lista = []
def sorteia():
print('Sorteando 5 valores da lista: ', end='')
for c in range(0, 5):
s = randint(1, 10)
lista.append(s)
print(s, end=' ')
def somapar():
soma = 0
for a in lista:
if a % 2 == 0:
soma += a
print(f'\nS... | 16.416667 | 65 | 0.530457 |
7346b62d9cb76bee842bc9e96024b35a72959148 | 2,038 | py | Python | setup.py | motmot/pycamiface | 1e9777ab77ebb5aa0495e35113eb83ee54c785c1 | [
"BSD-3-Clause"
] | 4 | 2015-01-17T13:39:48.000Z | 2018-08-20T17:02:34.000Z | setup.py | motmot/pycamiface | 1e9777ab77ebb5aa0495e35113eb83ee54c785c1 | [
"BSD-3-Clause"
] | null | null | null | setup.py | motmot/pycamiface | 1e9777ab77ebb5aa0495e35113eb83ee54c785c1 | [
"BSD-3-Clause"
] | null | null | null | import setuptools # required for namespace_packages option, below
from distutils.core import setup
import os, sys
package_data={}
ext_modules = []
build_ctypes_based_wrappers = True
include_shlibs_for_ctypes = False
if sys.platform.startswith('linux'):
include_shlibs_for_ctypes = False
ctypes_backends = ['mega'... | 34.542373 | 96 | 0.657998 |
97a8e142ece0f864ae35cb8622b44c9c37706fe8 | 664 | py | Python | training_test.py | jepetersohn/haikuna-matata | 417933c302f2b871650920805565f7a4bb154045 | [
"MIT"
] | 6 | 2017-01-22T03:15:01.000Z | 2019-12-01T16:19:36.000Z | training_test.py | hollabaq86/haikuna-matata | 247589b72dbc6d9063e1d98fe86bc264ad5e01b5 | [
"MIT"
] | 3 | 2017-01-15T01:32:04.000Z | 2017-01-16T00:25:46.000Z | training_test.py | hollabaq86/haikuna-matata | 247589b72dbc6d9063e1d98fe86bc264ad5e01b5 | [
"MIT"
] | 6 | 2017-01-19T21:49:55.000Z | 2021-04-14T09:57:17.000Z | import unittest
import training
class TestTrainingMethods(unittest.TestCase):
def test_favor_unigram(self):
from models import Unigram
training.favorUnigram("the", "quick")
unigram = Unigram.query.filter(Unigram.word1 == "the", Unigram.word2 == "quick").first()
print int(unigram.count)
self.asse... | 28.869565 | 92 | 0.713855 |
41d94e2d1bfe6b0aa8ba50a5c42020dbb3a79239 | 21,124 | py | Python | constrained_decoding/translation_model/nematus_tm.py | chrishokamp/constrained_decoding | 187846cea4d2aeee6867781b8ceb04cd02d79a4e | [
"MIT"
] | 73 | 2017-04-25T16:38:23.000Z | 2022-02-21T21:39:50.000Z | constrained_decoding/translation_model/nematus_tm.py | Brucewuzhang/constrained_decoding | 187846cea4d2aeee6867781b8ceb04cd02d79a4e | [
"MIT"
] | 6 | 2017-04-24T13:07:38.000Z | 2020-03-12T08:58:01.000Z | constrained_decoding/translation_model/nematus_tm.py | Brucewuzhang/constrained_decoding | 187846cea4d2aeee6867781b8ceb04cd02d79a4e | [
"MIT"
] | 20 | 2017-06-16T08:11:50.000Z | 2021-12-06T01:36:41.000Z | """
Implements AbstractConstrainedTM for Nematus NMT models
"""
import copy
import json
import codecs
import logging
import numpy
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from theano import shared
from nematus.theano_util import (load_params, init_theano_params)
from nematus.nmt import (... | 41.097276 | 121 | 0.600549 |
5f1c0f36bf46fac38f028c60153e4cb16c090648 | 980 | py | Python | tests/acceptance/steps/content.py | Valdis880/acceptanceTesting | 1a8de0adb45ebb46e4791aba7458c3fc412cfdb1 | [
"MIT"
] | null | null | null | tests/acceptance/steps/content.py | Valdis880/acceptanceTesting | 1a8de0adb45ebb46e4791aba7458c3fc412cfdb1 | [
"MIT"
] | null | null | null | tests/acceptance/steps/content.py | Valdis880/acceptanceTesting | 1a8de0adb45ebb46e4791aba7458c3fc412cfdb1 | [
"MIT"
] | null | null | null | from behave import *
from acceptanceTesting.tests.acceptance.page_model.base_page import BasePage
from acceptanceTesting.tests.acceptance.page_model.blog_page import BlogPage
use_step_matcher('re')
@then('There is a title shown on the page')
def step_impl(context):
page = BasePage(context.driver)
assert pag... | 28.823529 | 76 | 0.736735 |
c0dba0a6ad3167ebad1b3fb08afe8c633f7d03fe | 2,686 | py | Python | yt_dlp/extractor/uplynk.py | kevinoconnor7/yt-dlp | 73d829c144601c105f7ee1a3d8f2aed6d8e1b76d | [
"Unlicense"
] | 5 | 2021-08-24T17:08:12.000Z | 2022-03-03T13:06:09.000Z | yt_dlp/extractor/uplynk.py | kevinoconnor7/yt-dlp | 73d829c144601c105f7ee1a3d8f2aed6d8e1b76d | [
"Unlicense"
] | 1 | 2021-07-01T13:07:07.000Z | 2021-07-01T13:07:07.000Z | yt_dlp/extractor/uplynk.py | kevinoconnor7/yt-dlp | 73d829c144601c105f7ee1a3d8f2aed6d8e1b76d | [
"Unlicense"
] | 1 | 2022-02-05T11:57:47.000Z | 2022-02-05T11:57:47.000Z | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
float_or_none,
ExtractorError,
)
class UplynkIE(InfoExtractor):
IE_NAME = 'uplynk'
_VALID_URL = r'https?://.*?\.uplynk\.com/(?P<path>ext/[0-9a-f]{32}/(?P<external_id>[^/?&]+)|(?P... | 37.305556 | 168 | 0.600149 |
5cde65cde1def61721f0a8042ff0ae735bc0b641 | 1,144 | py | Python | src/shear.py | WeixuanZ/materials-modelling | 3b08acca078b511f25241307a97a44c305369d8c | [
"MIT"
] | null | null | null | src/shear.py | WeixuanZ/materials-modelling | 3b08acca078b511f25241307a97a44c305369d8c | [
"MIT"
] | null | null | null | src/shear.py | WeixuanZ/materials-modelling | 3b08acca078b511f25241307a97a44c305369d8c | [
"MIT"
] | null | null | null | """Calculations related to shear
Attributes:
cu_cell (CuCell): instance of CuCell class with default lattice vector size
"""
import numpy as np
try:
from UnitCell import CuCell
from util import map_func
except ModuleNotFoundError:
from .UnitCell import CuCell
from .util import map_func
cu_cell = ... | 24.340426 | 93 | 0.626748 |
77751d41eaee771736db329fff4b556c9db9cdf9 | 1,458 | py | Python | pcat2py/class/20cd8a84-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/20cd8a84-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/20cd8a84-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
################################################################################
# 20cd8a84-5cc5-11e4-af55-00155d01fe08
#
# Justin Dierking
# justindierking@hardbitsolutions.com
# phnomcobra@gmail.com
#
# 10/24/2014 Original Construction
################################################################... | 38.368421 | 161 | 0.613855 |
45fb1af1135c965b014d9df88288fb79edbfe1f1 | 1,999 | py | Python | supriya/commands/ControlBusGetRequest.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/commands/ControlBusGetRequest.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/commands/ControlBusGetRequest.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import supriya.osc
from supriya.commands.Request import Request
from supriya.enums import RequestId
class ControlBusGetRequest(Request):
"""
A /c_get request.
::
>>> import supriya
>>> server = supriya.Server.default().boot()
>>> request = supriya.commands.ControlBusGetRequest(
... | 24.084337 | 68 | 0.530265 |
4c7477631dfb91cb0919121e4d062d0699582a0f | 87 | py | Python | HackerRank Solutions/Python/Math/Mod Divmod.py | DevashishPathrabe/Competetive-Coding | 91049459359854b7834cbfb31415682600dc9c57 | [
"MIT"
] | null | null | null | HackerRank Solutions/Python/Math/Mod Divmod.py | DevashishPathrabe/Competetive-Coding | 91049459359854b7834cbfb31415682600dc9c57 | [
"MIT"
] | null | null | null | HackerRank Solutions/Python/Math/Mod Divmod.py | DevashishPathrabe/Competetive-Coding | 91049459359854b7834cbfb31415682600dc9c57 | [
"MIT"
] | null | null | null | a, b = (int(input()) for _ in range(2))
print(a // b)
print(a % b)
print(divmod(a, b))
| 17.4 | 39 | 0.563218 |
2d0044f7c17f5af59e67ca3922e46a7911ccddf9 | 597 | py | Python | backend/apps/projects/efficiency/urls.py | wuchaofan1654/tester | ff38d42e06cbdfa04882e8e95ada2dd93e6609f2 | [
"MIT"
] | null | null | null | backend/apps/projects/efficiency/urls.py | wuchaofan1654/tester | ff38d42e06cbdfa04882e8e95ada2dd93e6609f2 | [
"MIT"
] | null | null | null | backend/apps/projects/efficiency/urls.py | wuchaofan1654/tester | ff38d42e06cbdfa04882e8e95ada2dd93e6609f2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Create by sandy at 16:34 09/12/2021
Description: ToDo
"""
from django.urls import re_path
from rest_framework.routers import DefaultRouter
from apps.projects.efficiency.views import EfficiencyModelViewSet, ModuleModelViewSet
router = DefaultRouter()
router.register(r'efficiency', Efficienc... | 27.136364 | 85 | 0.760469 |
2b5da4bec5aa2234b103ad88870d379417c85086 | 3,412 | py | Python | app/modules/core/context.py | JohJohan/silverback | e27bc5d238d2b34955a470a8e8327ae44022b78b | [
"Apache-2.0"
] | null | null | null | app/modules/core/context.py | JohJohan/silverback | e27bc5d238d2b34955a470a8e8327ae44022b78b | [
"Apache-2.0"
] | null | null | null | app/modules/core/context.py | JohJohan/silverback | e27bc5d238d2b34955a470a8e8327ae44022b78b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Silverbackhq
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 35.915789 | 87 | 0.662368 |
eaa3565c2aa71e4fe5ee35963e260560a219a138 | 7,942 | py | Python | fuzzinator/ui/tui/reporter_dialogs.py | renatahodovan/fuzzinator | 49e6cf1b5dad59e82f7bed5f14b23dbd7c520ad0 | [
"BSD-3-Clause"
] | 202 | 2016-10-21T00:19:59.000Z | 2022-03-07T07:05:57.000Z | fuzzinator/ui/tui/reporter_dialogs.py | renatahodovan/fuzzinator | 49e6cf1b5dad59e82f7bed5f14b23dbd7c520ad0 | [
"BSD-3-Clause"
] | 16 | 2016-11-27T05:36:25.000Z | 2021-08-10T14:42:48.000Z | fuzzinator/ui/tui/reporter_dialogs.py | renatahodovan/fuzzinator | 49e6cf1b5dad59e82f7bed5f14b23dbd7c520ad0 | [
"BSD-3-Clause"
] | 43 | 2016-10-21T00:19:31.000Z | 2022-03-07T07:06:54.000Z | # Copyright (c) 2016-2021 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import logging
from urwid import *
from ...config import config_... | 42.244681 | 141 | 0.61521 |
db0175eccf28b616908cd1a01b1babaf48a947c7 | 2,606 | py | Python | observations/r/bomsoi2001.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 199 | 2017-07-24T01:34:27.000Z | 2022-01-29T00:50:55.000Z | observations/r/bomsoi2001.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 46 | 2017-09-05T19:27:20.000Z | 2019-01-07T09:47:26.000Z | observations/r/bomsoi2001.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 45 | 2017-07-26T00:10:44.000Z | 2022-03-16T20:44:59.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def bomsoi2001(path):
"""Southern Oscillation Index Data
The Southern ... | 25.300971 | 74 | 0.707598 |
bbc4a6ec48245a11a9c76cc8b5858656a6548443 | 6,294 | py | Python | unittest/scripts/auto/py_adminapi/scripts/dba_upgrade_metadata_norecord.py | mueller/mysql-shell | 29bafc5692bd536a12c4e41c54cb587375fe52cf | [
"Apache-2.0"
] | null | null | null | unittest/scripts/auto/py_adminapi/scripts/dba_upgrade_metadata_norecord.py | mueller/mysql-shell | 29bafc5692bd536a12c4e41c54cb587375fe52cf | [
"Apache-2.0"
] | 1 | 2021-09-12T22:07:06.000Z | 2021-09-12T22:07:06.000Z | unittest/scripts/auto/py_adminapi/scripts/dba_upgrade_metadata_norecord.py | mueller/mysql-shell | 29bafc5692bd536a12c4e41c54cb587375fe52cf | [
"Apache-2.0"
] | null | null | null | #@ {not real_host_is_loopback}
#@<> Snapshot File Name {VER(<8.0.0)}
snapshot_file = 'metadata-1.0.1-5.7.27-snapshot.sql'
#@<> Snapshot File Name {VER(>=8.0.0)}
snapshot_file = 'metadata-1.0.1-8.0.17-snapshot.sql'
#@ Creates the sample cluster
testutil.deploy_sandbox(__mysql_sandbox_port1, "root", {'report_host': ho... | 58.277778 | 129 | 0.791389 |
bf2313fb4ccbb8cf5aa7a20fab775af41a3ea549 | 2,363 | py | Python | config/presets/Modes/Python/S - Big City Scroll/main.py | The-XOR/EYESY_OS | 6a5e3d0bc5574ba2311e0c7e81c600c3af7a3e34 | [
"BSD-3-Clause"
] | 18 | 2021-03-06T05:39:30.000Z | 2022-03-25T17:59:23.000Z | presets/Modes/Python/S - Big City Scroll/main.py | jqrsound/EYESY_OS_for_RasPiSound | ac117b91cd84ad4c0566bd1a7d4c7b1ccc01cf62 | [
"BSD-3-Clause"
] | null | null | null | presets/Modes/Python/S - Big City Scroll/main.py | jqrsound/EYESY_OS_for_RasPiSound | ac117b91cd84ad4c0566bd1a7d4c7b1ccc01cf62 | [
"BSD-3-Clause"
] | 4 | 2021-03-14T18:38:42.000Z | 2021-07-11T14:31:18.000Z | import os
import pygame
import math
import time
last_point = [240, 160]
y1 = 640
x = 640
width = 25
XR = 320
YR = 240
def setup(screen, etc):
global XR, YR
XR = etc.xres
YR = etc.yres
pass
def draw(screen, etc):
global last_point, x, y1, width, XR, YR
etc.color_picker_bg(etc.knob5)
for i... | 31.932432 | 81 | 0.484554 |
04a1a4fa4fa0f6205ef00d604fb3b281a753929e | 1,968 | py | Python | lib/galaxy/schema/fields.py | rhpvorderman/galaxy | 178015f8eff0b0c7a59c0d6756658f6428222837 | [
"CC-BY-3.0"
] | 47 | 2015-10-21T23:30:30.000Z | 2022-03-09T06:51:32.000Z | lib/galaxy/schema/fields.py | rhpvorderman/galaxy | 178015f8eff0b0c7a59c0d6756658f6428222837 | [
"CC-BY-3.0"
] | 2 | 2022-02-28T02:36:23.000Z | 2022-03-02T13:17:41.000Z | lib/galaxy/schema/fields.py | rhpvorderman/galaxy | 178015f8eff0b0c7a59c0d6756658f6428222837 | [
"CC-BY-3.0"
] | 35 | 2015-10-30T13:09:40.000Z | 2021-05-03T23:17:46.000Z | import re
from pydantic import (
Field,
)
ENCODED_DATABASE_ID_PATTERN = re.compile('f?[0-9a-f]+')
ENCODED_ID_LENGTH_MULTIPLE = 16
class EncodedDatabaseIdField(str):
"""
Encoded Database ID validation.
"""
@classmethod
def __get_validators__(cls):
# one or more validators may be yiel... | 30.276923 | 82 | 0.633638 |
aa10f062cb33dd34630d212adfeceadb55ca95aa | 4,832 | py | Python | xl_tensorflow/utils/hyperparams_flags.py | Lannister-Xiaolin/xl_tensorflow | 99e0f458769ee1e45ebf55c789961e40f7d2eeac | [
"Apache-2.0"
] | null | null | null | xl_tensorflow/utils/hyperparams_flags.py | Lannister-Xiaolin/xl_tensorflow | 99e0f458769ee1e45ebf55c789961e40f7d2eeac | [
"Apache-2.0"
] | 1 | 2020-11-13T18:52:23.000Z | 2020-11-13T18:52:23.000Z | xl_tensorflow/utils/hyperparams_flags.py | Lannister-Xiaolin/xl_tensorflow | 99e0f458769ee1e45ebf55c789961e40f7d2eeac | [
"Apache-2.0"
] | null | null | null | # 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... | 37.457364 | 80 | 0.683361 |
8d945b6e07dbbfa7352c98142f2cb2f6eb8e1203 | 24 | py | Python | python/Exercicios/ex001.py | Robert-Marchinhaki/primeiros-passos-Python | 515c2c418bfb941bd9af14cf598eca7fe2985592 | [
"MIT"
] | null | null | null | python/Exercicios/ex001.py | Robert-Marchinhaki/primeiros-passos-Python | 515c2c418bfb941bd9af14cf598eca7fe2985592 | [
"MIT"
] | null | null | null | python/Exercicios/ex001.py | Robert-Marchinhaki/primeiros-passos-Python | 515c2c418bfb941bd9af14cf598eca7fe2985592 | [
"MIT"
] | null | null | null | # print('Olá, mundo!')
| 8 | 22 | 0.541667 |
24c540fd567ba153174116d8c8fb197d0d698863 | 2,688 | py | Python | custom/ilsgateway/tests/test_webusers_sync.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | 1 | 2017-02-10T03:14:51.000Z | 2017-02-10T03:14:51.000Z | custom/ilsgateway/tests/test_webusers_sync.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | null | null | null | custom/ilsgateway/tests/test_webusers_sync.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime
import json
import os
from django.test import TestCase
from corehq.apps.commtrack.tests.util import bootstrap_domain as initial_bootstrap
from corehq.apps.users.models import WebUser, UserRole
from custom.ilsgateway.api import ILSUser
from custom.logistics.commtrack import sync_ilsgateway_... | 43.354839 | 87 | 0.700149 |
525a40b0fcaa9e64167f94c0582ab62814fe2039 | 2,328 | py | Python | src/som/primitives/known.py | smarr/RTruffleSOM | 1efc698577830ff3fcd1607e7155d9c6423e8804 | [
"MIT"
] | 9 | 2015-02-03T23:24:23.000Z | 2020-06-28T23:49:59.000Z | src/som/primitives/known.py | SOM-st/RTruffleSOM | 1efc698577830ff3fcd1607e7155d9c6423e8804 | [
"MIT"
] | null | null | null | src/som/primitives/known.py | SOM-st/RTruffleSOM | 1efc698577830ff3fcd1607e7155d9c6423e8804 | [
"MIT"
] | 2 | 2016-08-28T23:25:20.000Z | 2016-08-30T16:49:50.000Z | from rpython.rlib.unroll import unrolling_iterable
from ..interp_type import is_ast_interpreter, is_bytecode_interpreter
"""Captures the known primitives at load time of this module, i.e., at compile
time with RPython.
"""
EXPECTED_NUMBER_OF_PRIMITIVE_FILES = 13 if is_ast_interpreter() else 11
class PrimitivesN... | 31.459459 | 78 | 0.667526 |
05b0c7cd8a987849068c8d409a494959c1b79627 | 26,896 | py | Python | toontown/building/DistributedDoor.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 99 | 2019-11-02T22:25:00.000Z | 2022-02-03T03:48:00.000Z | toontown/building/DistributedDoor.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 42 | 2019-11-03T05:31:08.000Z | 2022-03-16T22:50:32.000Z | toontown/building/DistributedDoor.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 57 | 2019-11-03T07:47:37.000Z | 2022-03-22T00:41:49.000Z | from toontown.toonbase.ToonBaseGlobal import *
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from direct.distributed.ClockDelta import *
from toontown.toonbase import ToontownGlobals
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.... | 41.062595 | 360 | 0.635931 |
18e990c5cc1958bb33df2e7ba46bff9934c0309c | 20,135 | py | Python | qtp_target_gene/validate.py | charles-cowart/qtp-target-gene | b8a12eb8cd375a885e7a6f342e6a03796aadcfcc | [
"BSD-3-Clause"
] | null | null | null | qtp_target_gene/validate.py | charles-cowart/qtp-target-gene | b8a12eb8cd375a885e7a6f342e6a03796aadcfcc | [
"BSD-3-Clause"
] | null | null | null | qtp_target_gene/validate.py | charles-cowart/qtp-target-gene | b8a12eb8cd375a885e7a6f342e6a03796aadcfcc | [
"BSD-3-Clause"
] | 1 | 2019-08-30T18:22:58.000Z | 2019-08-30T18:22:58.000Z | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 40.924797 | 80 | 0.584107 |
ddcc5e3d0967ca24b7e571b3d0fb391063970a74 | 2,188 | py | Python | test/scons-time/run/option/help.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | 1 | 2019-09-18T06:37:02.000Z | 2019-09-18T06:37:02.000Z | test/scons-time/run/option/help.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | null | null | null | test/scons-time/run/option/help.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to us... | 33.151515 | 108 | 0.71298 |
9a9ec3ba5eae623be7e7b2e2f2caa66506e99e56 | 15,278 | py | Python | venv/Lib/site-packages/traits/observation/tests/test_observe.py | richung99/digitizePlots | 6b408c820660a415a289726e3223e8f558d3e18b | [
"MIT"
] | 1 | 2022-01-18T17:56:51.000Z | 2022-01-18T17:56:51.000Z | venv/Lib/site-packages/traits/observation/tests/test_observe.py | richung99/digitizePlots | 6b408c820660a415a289726e3223e8f558d3e18b | [
"MIT"
] | null | null | null | venv/Lib/site-packages/traits/observation/tests/test_observe.py | richung99/digitizePlots | 6b408c820660a415a289726e3223e8f558d3e18b | [
"MIT"
] | null | null | null | # (C) Copyright 2005-2021 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... | 27.330948 | 79 | 0.571344 |
6e5d2066c9c9271da1e0e42125b6f76abbe44e29 | 1,349 | py | Python | web-server/constants.py | valgarn/fraud-detection-framework | 52ce63a41af42de541354f32a3fb4bae773f2f86 | [
"Apache-2.0"
] | null | null | null | web-server/constants.py | valgarn/fraud-detection-framework | 52ce63a41af42de541354f32a3fb4bae773f2f86 | [
"Apache-2.0"
] | null | null | null | web-server/constants.py | valgarn/fraud-detection-framework | 52ce63a41af42de541354f32a3fb4bae773f2f86 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Fraud Detection Framework 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 requ... | 28.104167 | 79 | 0.784285 |
3969797ceddd88bff171157462e576fffe239745 | 6,165 | py | Python | src/ebay_rest/api/commerce_notification/models/subscription_payload_detail.py | gbm001/ebay_rest | 077d3478423ccd80ff35e0361821d6a11180bc54 | [
"MIT"
] | null | null | null | src/ebay_rest/api/commerce_notification/models/subscription_payload_detail.py | gbm001/ebay_rest | 077d3478423ccd80ff35e0361821d6a11180bc54 | [
"MIT"
] | null | null | null | src/ebay_rest/api/commerce_notification/models/subscription_payload_detail.py | gbm001/ebay_rest | 077d3478423ccd80ff35e0361821d6a11180bc54 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Notification API
The eBay Notification API enables management of the entire end-to-end eBay notification experience by allowing users to:<ul><li>Browse for supported notification topics and retrieve topic details</li><li>Create, configure, and manage notification destination endpionts</li>... | 36.47929 | 442 | 0.636983 |
68efa54fc3fd50df8ac1a3fec57e7e04ef8ef9ab | 347 | py | Python | palletier/__init__.py | valiot/palletier | 9950bd0637f0c73a0add6a79e945dbcaffc948b7 | [
"MIT"
] | 8 | 2018-11-17T09:11:13.000Z | 2021-06-18T12:13:14.000Z | palletier/__init__.py | DisruptiveAngels/palletier | 9950bd0637f0c73a0add6a79e945dbcaffc948b7 | [
"MIT"
] | 4 | 2018-03-20T03:18:02.000Z | 2018-08-27T11:26:59.000Z | palletier/__init__.py | DisruptiveAngels/palletier | 9950bd0637f0c73a0add6a79e945dbcaffc948b7 | [
"MIT"
] | 3 | 2017-12-29T10:27:25.000Z | 2018-06-14T23:17:29.000Z | # -*- coding: utf-8 -*-
"""Top-level package for palletier."""
__author__ = """Alan Velasco"""
__email__ = 'alanvelasco.a@gmail.com'
__version__ = '0.1.0'
from palletier.box import Box
from palletier.pallet import Pallet
from palletier.packedpallet import PackedPallet
from palletier.palletier import Solver
from pall... | 24.785714 | 47 | 0.763689 |
f8f363c83ee6956756b8e2a7058c4745b134ff00 | 385 | py | Python | ccms/wsgi.py | esbozos/centinela-cms | cf47e9a42d851c2f56895472de736ebd9fccda6b | [
"MIT"
] | 2 | 2015-09-22T04:13:22.000Z | 2015-10-08T05:21:52.000Z | ccms/wsgi.py | esbozos/centinela_cms | cf47e9a42d851c2f56895472de736ebd9fccda6b | [
"MIT"
] | null | null | null | ccms/wsgi.py | esbozos/centinela_cms | cf47e9a42d851c2f56895472de736ebd9fccda6b | [
"MIT"
] | null | null | null | """
WSGI config for ccms 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/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS... | 22.647059 | 78 | 0.781818 |
aa0882db4cac11a4026562e12fe747695f49349f | 6,541 | py | Python | ote_sdk/ote_sdk/entities/label.py | bes-dev/training_extensions | 7b016e3bd02ae7c74d60fd5a0ae0912a42ef87cb | [
"Apache-2.0"
] | 775 | 2019-03-01T02:13:33.000Z | 2020-09-07T22:49:15.000Z | ote_sdk/ote_sdk/entities/label.py | bes-dev/training_extensions | 7b016e3bd02ae7c74d60fd5a0ae0912a42ef87cb | [
"Apache-2.0"
] | 229 | 2019-02-28T21:37:08.000Z | 2020-09-07T15:11:49.000Z | ote_sdk/ote_sdk/entities/label.py | bes-dev/training_extensions | 7b016e3bd02ae7c74d60fd5a0ae0912a42ef87cb | [
"Apache-2.0"
] | 290 | 2019-02-28T20:32:11.000Z | 2020-09-07T05:51:41.000Z | # Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
"""This module define the label entity."""
import datetime
from enum import Enum, auto
from typing import Optional
from ote_sdk.entities.color import Color
from ote_sdk.entities.id import ID
from ote_sdk.utils.time_utils import now
... | 30.004587 | 118 | 0.633542 |
f56823dfa82d3763b3e7ee7661c6d0225d283a2e | 287 | py | Python | setup.py | badbayesian/pymarket | 6517c296e2c025ccd04ae0447e4f466db5f36831 | [
"MIT"
] | null | null | null | setup.py | badbayesian/pymarket | 6517c296e2c025ccd04ae0447e4f466db5f36831 | [
"MIT"
] | null | null | null | setup.py | badbayesian/pymarket | 6517c296e2c025ccd04ae0447e4f466db5f36831 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="pymarket",
version="0.1",
description="Market simulation",
url="http://github.com/badbayesian/pymarket",
author="Daniel Silva-Inclan",
author_email="badbayesian@gmail.com",
license="MIT",
package=["pymarket"],
)
| 22.076923 | 49 | 0.66899 |
2e0845bddf7e2e0ce767428f0303dee4c6e037fa | 5,632 | py | Python | pandas/computation/align.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 29 | 2015-01-08T19:20:37.000Z | 2021-04-20T08:25:56.000Z | pandas/computation/align.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 5 | 2021-03-19T08:36:48.000Z | 2022-01-13T01:52:34.000Z | pandas/computation/align.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 22 | 2015-01-02T12:14:20.000Z | 2021-10-13T09:22:30.000Z | """Core eval alignment algorithms
"""
import warnings
from functools import partial, wraps
from pandas.compat import zip, range
import numpy as np
import pandas as pd
from pandas import compat
import pandas.core.common as com
from pandas.computation.common import _result_type_many
def _align_core_single_unary_op(t... | 30.608696 | 79 | 0.604226 |
761fe21c4f875e583228fd6094d85b7bc527b4af | 841 | py | Python | userbot/plugins/selfdestruct.py | techyminati/DeOXy | 014efbf6ba4ba31525f996e935279e8918c8ba96 | [
"Apache-2.0"
] | 2 | 2020-08-02T17:20:12.000Z | 2020-11-02T23:28:05.000Z | userbot/plugins/selfdestruct.py | techyminati/DeOXy | 014efbf6ba4ba31525f996e935279e8918c8ba96 | [
"Apache-2.0"
] | null | null | null | userbot/plugins/selfdestruct.py | techyminati/DeOXy | 014efbf6ba4ba31525f996e935279e8918c8ba96 | [
"Apache-2.0"
] | 6 | 2020-08-17T16:11:18.000Z | 2020-11-03T16:06:46.000Z | # For @UniBorg
# courtesy Yasir siddiqui
"""Self Destruct Plugin
.sd <time in seconds> <text>
"""
import time
from telethon.errors import rpcbaseerrors
from userbot.utils import admin_cmd
import importlib.util
@borg.on(admin_cmd("sd", outgoing=True ))
async def selfdestruct(destroy):
""" For .sd command, mak... | 25.484848 | 85 | 0.601665 |
89f1f44eeb38ac5029e2fd61d790bf6f7585b6c7 | 615 | py | Python | contrib/qt_translations.py | NarubyRiverlione/spice | 5fafc3410372b964bf5dc9535d02cb2377e73ee2 | [
"MIT"
] | null | null | null | contrib/qt_translations.py | NarubyRiverlione/spice | 5fafc3410372b964bf5dc9535d02cb2377e73ee2 | [
"MIT"
] | null | null | null | contrib/qt_translations.py | NarubyRiverlione/spice | 5fafc3410372b964bf5dc9535d02cb2377e73ee2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Helpful little script that spits out a comma-separated list of
# language codes for Qt icons that should be included
# in binary Dune Spice distributions
import glob
import os
import re
import sys
if len(sys.argv) != 3:
sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.... | 26.73913 | 104 | 0.679675 |
ee26c54b9e788dd089a57e890b56b57f84bd326c | 432 | py | Python | album.py | ChiuAlfredo/Spotify_playlist | d1911b3417863cababa1cad47ceb685b40afcb86 | [
"MIT"
] | 1 | 2021-09-24T13:26:43.000Z | 2021-09-24T13:26:43.000Z | album.py | ChiuAlfredo/Spotify_playlist | d1911b3417863cababa1cad47ceb685b40afcb86 | [
"MIT"
] | null | null | null | album.py | ChiuAlfredo/Spotify_playlist | d1911b3417863cababa1cad47ceb685b40afcb86 | [
"MIT"
] | null | null | null | class Album:
"""Track represents a piece of music."""
def __init__(self, album_name, id, artist):
"""
:param name (str): Album name
:param id (int): Spotify Album id
:param artist (str): Artist who created the track
"""
self.album_name = album_name
... | 24 | 58 | 0.532407 |
30777d9b300e92a111030e8f287eca55b7d360f2 | 4,796 | py | Python | PuppeteerLibrary/playwright/playwright_context.py | sdvicorp/robotframework-puppeteer | af6fa68b04c3cdac3a7662cffda6da2a5ace38d1 | [
"Apache-2.0"
] | null | null | null | PuppeteerLibrary/playwright/playwright_context.py | sdvicorp/robotframework-puppeteer | af6fa68b04c3cdac3a7662cffda6da2a5ace38d1 | [
"Apache-2.0"
] | null | null | null | PuppeteerLibrary/playwright/playwright_context.py | sdvicorp/robotframework-puppeteer | af6fa68b04c3cdac3a7662cffda6da2a5ace38d1 | [
"Apache-2.0"
] | null | null | null | import asyncio
from PuppeteerLibrary.custom_elements.base_page import BasePage
from PuppeteerLibrary.playwright.custom_elements.playwright_page import PlaywrightPage
from PuppeteerLibrary.playwright.async_keywords.playwright_checkbox import PlaywrightCheckbox
from PuppeteerLibrary.playwright.async_keywords.playwright_m... | 43.207207 | 111 | 0.741451 |
05fa51960b9020988d06646b51f25006809abcad | 546 | py | Python | 09/9.4.py | abe-101/ThinkPython-2 | bcebb1e9b3cc63c403f59c3cc0f33017bb017363 | [
"MIT"
] | 1 | 2021-12-16T16:46:47.000Z | 2021-12-16T16:46:47.000Z | 09/9.4.py | abe-101/ThinkPython-2 | bcebb1e9b3cc63c403f59c3cc0f33017bb017363 | [
"MIT"
] | null | null | null | 09/9.4.py | abe-101/ThinkPython-2 | bcebb1e9b3cc63c403f59c3cc0f33017bb017363 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Exercise 9.4. Write a function named uses_only that takes a word and a string of letters, and
that returns True if the word contains only letters in the list. Can you make a sentence using only
the letters acefhlo? Other than “Hoe alfalfa”?
"""
def uses_only(word, available):
for letter in w... | 28.736842 | 99 | 0.697802 |
bf8ef307ff7bfe20bb677f7af7babce8e160eef0 | 67 | py | Python | ml3d/torch/modules/metrics/__init__.py | hummat/Open3D-ML | 165e5df875cdd1ddf5d404e5d65d9c4cac66acd9 | [
"MIT"
] | null | null | null | ml3d/torch/modules/metrics/__init__.py | hummat/Open3D-ML | 165e5df875cdd1ddf5d404e5d65d9c4cac66acd9 | [
"MIT"
] | null | null | null | ml3d/torch/modules/metrics/__init__.py | hummat/Open3D-ML | 165e5df875cdd1ddf5d404e5d65d9c4cac66acd9 | [
"MIT"
] | null | null | null | from .semseg_metric import SemSegMetric
__all__ = ['SemSegMetric'] | 22.333333 | 39 | 0.80597 |
c9ec64684caf4360adba9bd69345809ffa9c68a0 | 102 | py | Python | library/test/test_compiler/testcorpus/06_funcall_varargs.py | creativemindplus/skybison | d1740e08d8de85a0a56b650675717da67de171a0 | [
"CNRI-Python-GPL-Compatible"
] | 278 | 2021-08-31T00:46:51.000Z | 2022-02-13T19:43:28.000Z | library/test/test_compiler/testcorpus/06_funcall_varargs.py | creativemindplus/skybison | d1740e08d8de85a0a56b650675717da67de171a0 | [
"CNRI-Python-GPL-Compatible"
] | 9 | 2021-11-05T22:28:43.000Z | 2021-11-23T08:39:04.000Z | library/test/test_compiler/testcorpus/06_funcall_varargs.py | tekknolagi/skybison | bea8fc2af0a70e7203b4c19f36c14a745512a335 | [
"CNRI-Python-GPL-Compatible"
] | 12 | 2021-08-31T07:49:54.000Z | 2021-10-08T01:09:01.000Z | # Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
c = (a, b)
fun(a, b, *c)
| 25.5 | 76 | 0.627451 |
ec914eb691ee32903b8a79e74c36137bf567011a | 10,264 | py | Python | eve/methods/patch.py | ehiggs/eve | b174c7dcb1e93151daadc08948a387e2dd4b0328 | [
"BSD-3-Clause"
] | null | null | null | eve/methods/patch.py | ehiggs/eve | b174c7dcb1e93151daadc08948a387e2dd4b0328 | [
"BSD-3-Clause"
] | null | null | null | eve/methods/patch.py | ehiggs/eve | b174c7dcb1e93151daadc08948a387e2dd4b0328 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
eve.methods.patch
~~~~~~~~~~~~~~~~~
This module implements the PATCH method.
:copyright: (c) 2017 by Nicola Iarocci.
:license: BSD, see LICENSE for more details.
"""
from copy import deepcopy
from flask import current_app as app, abort
from werkzeug import exceptions
... | 35.515571 | 84 | 0.654034 |
be45f09e08b1b776cb0db2e6990d490ea30795f5 | 6,986 | py | Python | python/src/nnabla/utils/nvml.py | isabella232/nnabla | 82a3c6fed382f889d1a4a429c696bb8cedf6ce79 | [
"Apache-2.0"
] | null | null | null | python/src/nnabla/utils/nvml.py | isabella232/nnabla | 82a3c6fed382f889d1a4a429c696bb8cedf6ce79 | [
"Apache-2.0"
] | null | null | null | python/src/nnabla/utils/nvml.py | isabella232/nnabla | 82a3c6fed382f889d1a4a429c696bb8cedf6ce79 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Sony Corporation.
# Copyright 2021 Sony Group Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 29.854701 | 117 | 0.704552 |
326fb4f27aeecba4743a87fee3dc14dac3fd609a | 20,621 | py | Python | pyro/infer/mcmc/hmc.py | gavincangan/pyro | d9115a6da7edd7e3fecd6b89a850cc137d7e7e9a | [
"MIT"
] | null | null | null | pyro/infer/mcmc/hmc.py | gavincangan/pyro | d9115a6da7edd7e3fecd6b89a850cc137d7e7e9a | [
"MIT"
] | null | null | null | pyro/infer/mcmc/hmc.py | gavincangan/pyro | d9115a6da7edd7e3fecd6b89a850cc137d7e7e9a | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import math
from collections import OrderedDict
import torch
from torch.distributions import biject_to, constraints
import pyro
import pyro.distributions as dist
import pyro.poutine as poutine
from pyro.distributions.util import eye_like
from pyro.infe... | 46.339326 | 107 | 0.631153 |
9bc453a1e2394ac82257be073fb5e41cc951302a | 3,374 | py | Python | project/170 solver copy/collect.py | AnthonyNg404/Algo | 7b1e9f3a70d3bd64ef31a3e19f7cfbb2d6997cd1 | [
"Unlicense"
] | null | null | null | project/170 solver copy/collect.py | AnthonyNg404/Algo | 7b1e9f3a70d3bd64ef31a3e19f7cfbb2d6997cd1 | [
"Unlicense"
] | null | null | null | project/170 solver copy/collect.py | AnthonyNg404/Algo | 7b1e9f3a70d3bd64ef31a3e19f7cfbb2d6997cd1 | [
"Unlicense"
] | null | null | null | import networkx as nx
from parse import read_input_file, write_output_file
from utils import is_valid_solution, calculate_score
import sys
from os.path import basename, normpath
import glob
import heapq
import os
import copy
import random
import utils
import parse
def read_output_file(G, path):
"""
Parses and ... | 34.080808 | 95 | 0.634558 |
6e87cffb7a0c2bfad22f662dd66b989140dd80db | 2,863 | py | Python | setup.py | miroag/mfs | acb5b619864c2199c28b75e1800d3b2d3bf43dcc | [
"MIT"
] | null | null | null | setup.py | miroag/mfs | acb5b619864c2199c28b75e1800d3b2d3bf43dcc | [
"MIT"
] | 11 | 2017-12-06T13:07:04.000Z | 2017-12-15T10:38:17.000Z | setup.py | miroag/mfs | acb5b619864c2199c28b75e1800d3b2d3bf43dcc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import io
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
from setuptools import find_packages
fro... | 32.534091 | 102 | 0.598323 |
8cabc63f960da28af0d1133f1374b1258c5dd14e | 573 | py | Python | bokeh/themes/__init__.py | isaacmg/bokeh | 1025d1177b8e636c36f6160da4bd2fbf8ca51962 | [
"BSD-3-Clause"
] | 1 | 2018-09-19T02:08:13.000Z | 2018-09-19T02:08:13.000Z | bokeh/themes/__init__.py | isaacmg/bokeh | 1025d1177b8e636c36f6160da4bd2fbf8ca51962 | [
"BSD-3-Clause"
] | null | null | null | bokeh/themes/__init__.py | isaacmg/bokeh | 1025d1177b8e636c36f6160da4bd2fbf8ca51962 | [
"BSD-3-Clause"
] | 1 | 2020-06-17T05:47:16.000Z | 2020-06-17T05:47:16.000Z | ''' Provides API for loading themes
'''
from __future__ import absolute_import
from os.path import dirname, realpath, join
from .theme import Theme
_THIS_DIR = dirname(realpath(__file__))
_FP_FMT = join(_THIS_DIR, '{0}.json')
LIGHT_MINIMAL = 'light_minimal'
DARK_MINIMAL = 'dark_minimal'
CALIBER = 'caliber'
defaul... | 22.92 | 65 | 0.755672 |
258f41025076dfc2bab8ae417cca8be86413aefc | 4,183 | py | Python | examples/inheritance/concrete.py | gujun4990/sqlalchemy | 057bae2295feb86529a04f09cd2f3d4c2c6d88a8 | [
"MIT"
] | 1 | 2018-04-02T18:41:52.000Z | 2018-04-02T18:41:52.000Z | examples/inheritance/concrete.py | gujun4990/sqlalchemy | 057bae2295feb86529a04f09cd2f3d4c2c6d88a8 | [
"MIT"
] | null | null | null | examples/inheritance/concrete.py | gujun4990/sqlalchemy | 057bae2295feb86529a04f09cd2f3d4c2c6d88a8 | [
"MIT"
] | 3 | 2017-09-26T13:59:24.000Z | 2020-12-04T17:51:54.000Z | """Concrete-table (table-per-class) inheritance example."""
from sqlalchemy import Column, Integer, String, \
ForeignKey, create_engine, inspect, or_
from sqlalchemy.orm import relationship, Session, with_polymorphic
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.ext.declarative import Con... | 25.820988 | 69 | 0.647143 |
9bf084de68e97f7d6215676e99ff04e96cea10c0 | 5,906 | py | Python | noaa.py | WillDignazio/NOAATides | ed928c1c2507f546f0645f6a46a719a86ee3e657 | [
"MIT"
] | null | null | null | noaa.py | WillDignazio/NOAATides | ed928c1c2507f546f0645f6a46a719a86ee3e657 | [
"MIT"
] | null | null | null | noaa.py | WillDignazio/NOAATides | ed928c1c2507f546f0645f6a46a719a86ee3e657 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
Copyright (C) 2016 William Ziener-Dignazio
NOAA Tidal Data Retriever
Usage: python noaa.py
This program uses the exposed public API via noaa.gov to build a CSV file
consisting of tidal data since January 1, 2000 to the current date.
The online NOAA api has a max retrieval period of approximate... | 36.012195 | 91 | 0.724009 |
0a973e7f3dd327991b4804d1907e2ce45e7a9d47 | 2,808 | py | Python | deploy/test/sp_test6_7.py | zhexiao/mnet | 51e64e6c5181702f90d4f68efb5e4ba8f20dff7b | [
"Apache-2.0"
] | 19 | 2019-04-05T03:39:51.000Z | 2021-11-09T10:55:58.000Z | deploy/test/sp_test6_7.py | zhexiao/mnet | 51e64e6c5181702f90d4f68efb5e4ba8f20dff7b | [
"Apache-2.0"
] | 3 | 2017-08-04T07:37:31.000Z | 2021-06-10T19:42:58.000Z | deploy/test/sp_test6_7.py | zhexiao/mnet | 51e64e6c5181702f90d4f68efb5e4ba8f20dff7b | [
"Apache-2.0"
] | 11 | 2017-08-02T09:14:45.000Z | 2021-05-07T15:33:07.000Z | """
./bin/spark-submit --packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.4 /vagrant/mnet/deploy/test/sp_test6.py
spark-sql-kafka-0-10_2.11:2.4.4 ===> 2.11代表scala版本,2.4.4代表spark版本
kafka:kafka_2.11-2.3.0.tgz
spark:spark-2.4.4-bin-hadoop2.7.tgz
"""
from pyspark.sql import SparkSession
from pyspark.sql.functions i... | 29.557895 | 116 | 0.694801 |
b6081eeaefd34c9d424d8d6c19a5ef818dca0e99 | 2,458 | py | Python | examples/split_csv_data.py | PaccMann/paccmann_datasets | 0cb0cee349ffab8e227f09f7df0a8bca6a71f22e | [
"MIT"
] | 14 | 2019-11-01T12:45:56.000Z | 2022-03-11T15:38:31.000Z | examples/split_csv_data.py | PaccMann/paccmann_datasets | 0cb0cee349ffab8e227f09f7df0a8bca6a71f22e | [
"MIT"
] | 74 | 2019-11-12T19:36:27.000Z | 2022-02-28T08:19:37.000Z | examples/split_csv_data.py | PaccMann/paccmann_datasets | 0cb0cee349ffab8e227f09f7df0a8bca6a71f22e | [
"MIT"
] | 2 | 2021-08-14T11:15:07.000Z | 2021-08-25T06:42:01.000Z | #!/usr/bin/env python3
"""Split in train and test a .csv."""
import argparse
import logging
import sys
from pytoda.data_splitter import csv_data_splitter
# setting up logging
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logger = logging.getLogger('split_csv_data')
# define the parser arguments
parser =... | 23.188679 | 76 | 0.631814 |
78212c4051f404373ae6a09ea3ed70f92c7fc21f | 2,457 | py | Python | students/views.py | BendalPrathmesh/E-learning-platform | 0ff3dd90be5d0df0e820836ed321e61ba176d20e | [
"MIT"
] | null | null | null | students/views.py | BendalPrathmesh/E-learning-platform | 0ff3dd90be5d0df0e820836ed321e61ba176d20e | [
"MIT"
] | null | null | null | students/views.py | BendalPrathmesh/E-learning-platform | 0ff3dd90be5d0df0e820836ed321e61ba176d20e | [
"MIT"
] | null | null | null | from django.core.urlresolvers import reverse_lazy
from django.views.generic.edit import CreateView
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import authenticate, login
from django.views.generic.edit import FormView
from django.views.generic.list import ListView
from django.vi... | 36.132353 | 82 | 0.693529 |
b2ab51153b86961aed80d3f0a5284667ac33e8bf | 216 | py | Python | tests/conftest.py | rafalcode/HapDab | 4a0a300aefea923e07c08ff4c8ebc5e05fa6095c | [
"MIT"
] | 1 | 2021-02-07T07:23:36.000Z | 2021-02-07T07:23:36.000Z | tests/conftest.py | rafalcode/HapDab | 4a0a300aefea923e07c08ff4c8ebc5e05fa6095c | [
"MIT"
] | 27 | 2018-01-29T18:45:10.000Z | 2018-03-05T13:31:20.000Z | tests/conftest.py | rafalcode/HapDab | 4a0a300aefea923e07c08ff4c8ebc5e05fa6095c | [
"MIT"
] | 1 | 2018-10-16T16:52:27.000Z | 2018-10-16T16:52:27.000Z | import pytest
import os
import hapdab as dab
import locuspocus as lp
import minus80.Tools as m80Tools
@pytest.fixture(scope='module')
def ACGTFasta():
x = lp.Fasta.from_file('data/ACGT.fasta')
return x
| 14.4 | 46 | 0.731481 |
1d3bfaad2650118652268fff4875250be564387a | 784 | py | Python | release/pipeline/dags/istio_daily_master.py | oulinbao/istio | 91a85fa9917b45705d8a24ede6c1f167b61e4019 | [
"Apache-2.0"
] | 15 | 2018-01-26T22:25:37.000Z | 2022-03-29T14:32:59.000Z | release/pipeline/dags/istio_daily_master.py | oulinbao/istio | 91a85fa9917b45705d8a24ede6c1f167b61e4019 | [
"Apache-2.0"
] | 5 | 2020-09-04T10:54:34.000Z | 2021-06-02T02:24:49.000Z | release/pipeline/dags/istio_daily_master.py | oulinbao/istio | 91a85fa9917b45705d8a24ede6c1f167b61e4019 | [
"Apache-2.0"
] | 5 | 2020-07-06T20:11:51.000Z | 2022-01-25T13:26:21.000Z | """Airfow DAG used is the daily release pipeline.
Copyright 2017 Istio 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
... | 30.153846 | 72 | 0.797194 |
19ba011caa3ecb79b26b68b77f040bdb38da6c13 | 1,179 | py | Python | src/numpy/linalg.py | mumupy/pythonlearn | 5be03d156f11af2467a6052a476de4b706f7d53a | [
"Apache-2.0"
] | 9 | 2019-10-25T03:50:02.000Z | 2022-03-22T13:22:11.000Z | src/numpy/linalg.py | mumupy/pythonlearn | 5be03d156f11af2467a6052a476de4b706f7d53a | [
"Apache-2.0"
] | 11 | 2019-12-11T14:47:54.000Z | 2022-02-10T00:23:57.000Z | src/numpy/linalg.py | mumupy/pythonlearn | 5be03d156f11af2467a6052a476de4b706f7d53a | [
"Apache-2.0"
] | 1 | 2021-04-20T07:30:42.000Z | 2021-04-20T07:30:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/9/21 14:42
# @Author : ganliang
# @File : linalg.py
# @Desc : 线性代数
import numpy as np
a = np.array([[1, 2], [3, 4]])
b = np.array([[11, 12], [13, 14]])
print ("dot函数在是二维矩阵的时候就是矩阵相乘")
print (np.matrix(a) * np.matrix(b))
print ("dot下标元素的乘积和")
print... | 21.833333 | 76 | 0.562341 |
33e263f67551c0707048d12548b457e2fc1b4c73 | 2,571 | py | Python | tests/023.py | abawchen/leetcode | 41d3b172a7694a46a860fbcb0565a3acccd000f2 | [
"MIT"
] | null | null | null | tests/023.py | abawchen/leetcode | 41d3b172a7694a46a860fbcb0565a3acccd000f2 | [
"MIT"
] | null | null | null | tests/023.py | abawchen/leetcode | 41d3b172a7694a46a860fbcb0565a3acccd000f2 | [
"MIT"
] | null | null | null | import unittest
import sys
sys.path.append('./')
solutions = __import__('solutions.023_merge_k_sorted_lists', fromlist='*')
helper = __import__('utils.helper', fromlist='*')
class Test021(unittest.TestCase):
def test_sortListsHead(self):
s = solutions.Solution()
l1 = helper.constructListNode([1... | 32.544304 | 86 | 0.577596 |
cc18ef2f86f79587e77483bcf37a881fd2f2155c | 1,993 | py | Python | utils.py | intellivoid/Friendly-Telegram-Lydia | c252d723f8913a14c4c382171e82d727988a4cbe | [
"WTFPL"
] | null | null | null | utils.py | intellivoid/Friendly-Telegram-Lydia | c252d723f8913a14c4c382171e82d727988a4cbe | [
"WTFPL"
] | null | null | null | utils.py | intellivoid/Friendly-Telegram-Lydia | c252d723f8913a14c4c382171e82d727988a4cbe | [
"WTFPL"
] | null | null | null | import os
from . import __main__
from telethon.tl.types import PeerUser, PeerChat, PeerChannel
def get_args(message):
try:
message = message.message
except AttributeError:
pass
if not message:
return False
return list(filter(lambda x: len(x) > 0, message.split(' ')))[1:]
def get... | 32.145161 | 107 | 0.644255 |
d2e70bdd79effa9f4ad7f14df86e05a7d0a805af | 1,095 | py | Python | scripts/Combine_Data/combine_data_nonimputed.py | UoMResearchIT/UoM_AQ_Data_Tools | 7c4dd37e130157885634d14ae764cc1cbcf42313 | [
"MIT"
] | 1 | 2020-04-10T17:33:27.000Z | 2020-04-10T17:33:27.000Z | scripts/Combine_Data/combine_data_nonimputed.py | UoMResearchIT/UoM_AQ_Data_Tools | 7c4dd37e130157885634d14ae764cc1cbcf42313 | [
"MIT"
] | 8 | 2020-10-13T16:06:49.000Z | 2021-02-19T14:56:32.000Z | scripts/Combine_Data/combine_data_nonimputed.py | UoMResearchIT/UoM_AQ_Data_Tools | 7c4dd37e130157885634d14ae764cc1cbcf42313 | [
"MIT"
] | null | null | null | import pandas as pd
aurn_file='../AURN_Data_Download/AURN_data/aurn_processed_daily_2016-2019.csv'
emep_file='../EMEP_Data_Extraction/EMEP_data/emep_daily_data_2016-2019.csv'
poll_file='../MEDMI_Data_Download/full_data/pollen_2016-2019.csv'
met_file='../Data_Processing/MEDMI_Met_data/Met_ppd_daily_mean_max_temp_RH_pr... | 45.625 | 108 | 0.816438 |
9c0ac1e00d733a66861d028bd5c36525e5bd35b1 | 991 | py | Python | Snake3Equipe1/config.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | 2 | 2021-01-24T01:04:34.000Z | 2021-05-06T16:25:53.000Z | Snake3Equipe1/config.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | null | null | null | Snake3Equipe1/config.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | 3 | 2021-01-26T21:35:43.000Z | 2021-05-06T16:06:47.000Z | import pygame
from pygame.mixer import Sound
from itertools import cycle
pygame.init()
BLINK_EVENT = pygame.USEREVENT + 0
BACKGROUND_COLOR = (0, 0, 0)
block_size = 32
fps = 10
screen_dimensions = (1280, 720)
game_clock = pygame.time.Clock()
# SOUNDS AND FONTS
game_over = pygame.mixer.Sound('./assets/team_I.game-over... | 26.078947 | 114 | 0.631685 |
43d47f9ca4d894ca02acf57a75b3e783bc86d197 | 5,500 | py | Python | pythonforandroid/util.py | strubbi77/python-for-android | 230fb66449f18217efa440b942ab6659f3f62edc | [
"MIT"
] | null | null | null | pythonforandroid/util.py | strubbi77/python-for-android | 230fb66449f18217efa440b942ab6659f3f62edc | [
"MIT"
] | null | null | null | pythonforandroid/util.py | strubbi77/python-for-android | 230fb66449f18217efa440b942ab6659f3f62edc | [
"MIT"
] | null | null | null | import contextlib
from os.path import exists, join
from os import getcwd, chdir, makedirs, walk, uname
import io
import json
import shutil
import sys
from fnmatch import fnmatch
from tempfile import mkdtemp
try:
from urllib.request import FancyURLopener
except ImportError:
from urllib import FancyURLopener
fro... | 30.054645 | 105 | 0.634545 |
204a8d14e453b2ac3b2e1a6b9179d1e3dcadb2b7 | 4,573 | py | Python | functional/tests/identity/v3/test_project.py | ankur-gupta91/osc-ip-cap | 9a64bbc31fcc0872f52ad2d92c550945eea5cc97 | [
"Apache-2.0"
] | null | null | null | functional/tests/identity/v3/test_project.py | ankur-gupta91/osc-ip-cap | 9a64bbc31fcc0872f52ad2d92c550945eea5cc97 | [
"Apache-2.0"
] | null | null | null | functional/tests/identity/v3/test_project.py | ankur-gupta91/osc-ip-cap | 9a64bbc31fcc0872f52ad2d92c550945eea5cc97 | [
"Apache-2.0"
] | null | null | null | # 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
# d... | 40.114035 | 78 | 0.593921 |
54ec822f17dfe32585c57e0524c30366d87bc0ee | 2,156 | py | Python | contents/5.2_Prioritized_Replay_DQN/run_MountainCar.py | woluo/Reinforcement-learning-with-tensorflow | ec1a0d27635207c89d7638a4fd2b490ccaec644b | [
"MIT"
] | null | null | null | contents/5.2_Prioritized_Replay_DQN/run_MountainCar.py | woluo/Reinforcement-learning-with-tensorflow | ec1a0d27635207c89d7638a4fd2b490ccaec644b | [
"MIT"
] | null | null | null | contents/5.2_Prioritized_Replay_DQN/run_MountainCar.py | woluo/Reinforcement-learning-with-tensorflow | ec1a0d27635207c89d7638a4fd2b490ccaec644b | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
The DQN improvement: Prioritized Experience Replay (based on https://arxiv.org/abs/1511.05952)
View more on my tutorial page: https://morvanzhou.github.io/tutorials/
Using:
Tensorflow: 1.0
gym: 0.8.0
"""
import gym
from RL_brain import DQNPrioritizedReplay
import matpl... | 25.666667 | 101 | 0.654453 |
adadb441634d82e1e2f5b2af7e50e62dc2922411 | 7,846 | py | Python | DataGenerator/DataGeneratorVideo.py | shamanDevel/IsosurfaceSuperresolution | 0658e67b7ca9f633547c65e3e16f93d2e0c5a4a2 | [
"MIT"
] | 7 | 2019-10-14T09:36:57.000Z | 2022-02-27T05:13:28.000Z | DataGenerator/DataGeneratorVideo.py | shamanDevel/IsosurfaceSuperresolution | 0658e67b7ca9f633547c65e3e16f93d2e0c5a4a2 | [
"MIT"
] | null | null | null | DataGenerator/DataGeneratorVideo.py | shamanDevel/IsosurfaceSuperresolution | 0658e67b7ca9f633547c65e3e16f93d2e0c5a4a2 | [
"MIT"
] | 3 | 2020-01-07T16:49:17.000Z | 2021-06-23T14:21:00.000Z | import os
import os.path
import random
import numpy as np
import numpy.linalg
import subprocess
import imageio
import cv2 as cv
########################################
# CONFIGURATION
########################################
renderer = '../bin/GPURenderer.exe'
datasetPath = '../../data/volumes/vbx/'
descriptorFile = ... | 43.348066 | 148 | 0.585266 |
67fbedc311fadc67d54925dfc5f2b298813a35c0 | 930 | py | Python | math/1363_largest_multiple_of_three/1363_largest_multiple_of_three.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 6 | 2019-09-16T01:50:44.000Z | 2020-09-17T08:52:25.000Z | math/1363_largest_multiple_of_three/1363_largest_multiple_of_three.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | null | null | null | math/1363_largest_multiple_of_three/1363_largest_multiple_of_three.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 4 | 2020-02-07T12:43:16.000Z | 2021-04-11T06:38:55.000Z | import collections
class Solution(object):
def largestMultipleOfThree(self, A):
total = sum(A)
count = collections.Counter(A)
A.sort(reverse=1)
def f(i):
if count[i]:
A.remove(i)
count[i] -= 1
if not A:
return ... | 28.181818 | 63 | 0.444086 |
9bb9e00b2e28f703fca426405052649857745e92 | 3,858 | py | Python | src/main.py | jsun1590/chess.com-bot | 2c13aaec86dba875a938d4ee799757e9ccba8a9f | [
"MIT"
] | 7 | 2021-12-11T01:46:14.000Z | 2022-03-19T21:58:25.000Z | src/main.py | jsun1590/chess.com-bot | 2c13aaec86dba875a938d4ee799757e9ccba8a9f | [
"MIT"
] | 4 | 2021-11-08T10:44:08.000Z | 2022-03-18T13:16:51.000Z | src/main.py | jsun1590/chess.com-bot | 2c13aaec86dba875a938d4ee799757e9ccba8a9f | [
"MIT"
] | 3 | 2021-09-13T04:42:07.000Z | 2022-03-13T01:44:01.000Z | import chess
import chess.engine
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from pywinauto import application
import time
import os
import sys
import glob
from get_fen import get_fen
running_script_directory = os.path.dirname(os.path.realpath(__file__))
os.chdir(run... | 35.722222 | 156 | 0.675998 |
06afa90738db4214d2b605cee91b4c1bf5293039 | 4,472 | py | Python | charlesbot_broadcast_message/broadcast_message.py | Thezone1975/charlesbot-broadcast-message | dc42228776db54c4710b146f1c77c971c47a8da8 | [
"MIT"
] | 1 | 2018-09-15T05:00:12.000Z | 2018-09-15T05:00:12.000Z | charlesbot_broadcast_message/broadcast_message.py | Thezone1975/charlesbot-broadcast-message | dc42228776db54c4710b146f1c77c971c47a8da8 | [
"MIT"
] | null | null | null | charlesbot_broadcast_message/broadcast_message.py | Thezone1975/charlesbot-broadcast-message | dc42228776db54c4710b146f1c77c971c47a8da8 | [
"MIT"
] | 1 | 2019-06-18T09:50:35.000Z | 2019-06-18T09:50:35.000Z | from charlesbot.util.slack import get_robot_channel_membership
from charlesbot.util.slack import get_robot_group_membership
from charlesbot.util.parse import parse_msg_with_prefix
from charlesbot.util.parse import does_msg_contain_prefix
from charlesbot.base_plugin import BasePlugin
from charlesbot.slack.slack_attachme... | 40.654545 | 115 | 0.653846 |
22e142b3ac73c50dedd0d373ac1685a0f6066d31 | 795 | py | Python | binlin/utils/input_output.py | UKPLab/inlg2019-revisiting-binlin | 250196403ee4050cac78c547add90087ea04243f | [
"Apache-2.0"
] | 1 | 2021-12-15T08:44:35.000Z | 2021-12-15T08:44:35.000Z | binlin/utils/input_output.py | UKPLab/inlg2019-revisiting-binlin | 250196403ee4050cac78c547add90087ea04243f | [
"Apache-2.0"
] | 3 | 2021-03-19T04:07:44.000Z | 2022-01-13T01:40:50.000Z | binlin/utils/input_output.py | UKPLab/inlg2019-revisiting-binlin | 250196403ee4050cac78c547add90087ea04243f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import logging
import string
logger = logging.getLogger('main')
def check_file_exists(fname):
if not os.path.exists(os.path.abspath(fname)):
logger.warning("%s does not exist!" % (fname))
return False
return True
def readlines(fn, no_... | 23.382353 | 114 | 0.626415 |
3d345f5279f94a452879b9de9eaea36b42737e7e | 4,205 | py | Python | model-optimizer/extensions/front/tf/mvn_unrolled.py | anton-potapov/openvino | 84119afe9a8c965e0a0cd920fff53aee67b05108 | [
"Apache-2.0"
] | 1 | 2021-07-30T17:03:50.000Z | 2021-07-30T17:03:50.000Z | model-optimizer/extensions/front/tf/mvn_unrolled.py | anton-potapov/openvino | 84119afe9a8c965e0a0cd920fff53aee67b05108 | [
"Apache-2.0"
] | 4 | 2021-04-01T08:29:48.000Z | 2021-08-30T16:12:52.000Z | model-optimizer/extensions/front/tf/mvn_unrolled.py | anton-potapov/openvino | 84119afe9a8c965e0a0cd920fff53aee67b05108 | [
"Apache-2.0"
] | 3 | 2021-03-09T08:27:29.000Z | 2021-04-07T04:58:54.000Z | """
Copyright (C) 2017-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | 39.299065 | 118 | 0.592866 |
8ff64bfed0c283f17d32d3c38c8eb83fcc26136e | 3,139 | py | Python | code/process/processor.py | canerdogan/deep-trading-agent | 37b56f2202f2c5030169ddf303d6d5dcb5139991 | [
"MIT"
] | 1 | 2018-02-28T03:33:07.000Z | 2018-02-28T03:33:07.000Z | code/process/processor.py | canerdogan/deep-trading-agent | 37b56f2202f2c5030169ddf303d6d5dcb5139991 | [
"MIT"
] | null | null | null | code/process/processor.py | canerdogan/deep-trading-agent | 37b56f2202f2c5030169ddf303d6d5dcb5139991 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from talib.abstract import *
from utils.constants import *
from utils.strings import *
from utils.util import print_and_log_message, print_and_log_message_list
class Processor:
'''Preprocessor for Bitcoin prices dataset as obtained by following the procedure
described i... | 42.418919 | 121 | 0.643836 |
d06661395eb18cbe55bca17c03bbda01d8e37298 | 12,702 | py | Python | theano/gof/optdb.py | royxue/Theano | 626104a8c2b16898d270dc99e16a3ddb4a74678e | [
"BSD-3-Clause"
] | 2 | 2015-01-20T04:53:37.000Z | 2015-01-20T04:53:40.000Z | theano/gof/optdb.py | RoyXue/Theano | 626104a8c2b16898d270dc99e16a3ddb4a74678e | [
"BSD-3-Clause"
] | null | null | null | theano/gof/optdb.py | RoyXue/Theano | 626104a8c2b16898d270dc99e16a3ddb4a74678e | [
"BSD-3-Clause"
] | null | null | null | import sys
import numpy
from theano.compat.python2x import DefaultOrderedDict
from theano.misc.ordered_set import OrderedSet
from theano.compat.six import StringIO
from theano.gof import opt
from theano.configparser import AddConfigVar, FloatParam
from theano import config
AddConfigVar('optdb.position_cutoff',
... | 38.144144 | 90 | 0.598646 |
cdf5d3e7dedf487f33134899cfbf017519208b5c | 15,339 | py | Python | b2sdk/sync/action.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/sync/action.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/sync/action.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | ######################################################################
#
# File: b2sdk/sync/action.py
#
# Copyright 2019 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
from abc import ABCMeta, abstrac... | 31.626804 | 120 | 0.628007 |
f2f85e010517f5c4c92e925263433b9ce77ba626 | 3,197 | py | Python | pympc/create_pycoeman_config_run_massive_potree_converter.py | iyush1993/Massive-PotreeConverter | f43eb8bb1eccc9b2409a2f5e71f4cc95df7adfc0 | [
"Apache-2.0"
] | null | null | null | pympc/create_pycoeman_config_run_massive_potree_converter.py | iyush1993/Massive-PotreeConverter | f43eb8bb1eccc9b2409a2f5e71f4cc95df7adfc0 | [
"Apache-2.0"
] | null | null | null | pympc/create_pycoeman_config_run_massive_potree_converter.py | iyush1993/Massive-PotreeConverter | f43eb8bb1eccc9b2409a2f5e71f4cc95df7adfc0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import argparse, os
from lxml import etree
def run(inputFolder, outputFile, outputFormat, levels, spacing, extent):
# Check user parameters
if not os.path.isdir(inputFolder):
raise Exception(inputFolder + ' does not exist')
if os.path.isfile(outputFile):
raise Exception(ou... | 51.564516 | 247 | 0.6797 |
94e16b99ff3c5cdbaacb4e8b66aeebcfb8fe44eb | 2,187 | py | Python | cmd/updateMultipleEndpoints.py | robertchoi80/tks-client | ba7cb9b3e937e2e2784f8c06c2f49fb819837bf3 | [
"MIT"
] | null | null | null | cmd/updateMultipleEndpoints.py | robertchoi80/tks-client | ba7cb9b3e937e2e2784f8c06c2f49fb819837bf3 | [
"MIT"
] | null | null | null | cmd/updateMultipleEndpoints.py | robertchoi80/tks-client | ba7cb9b3e937e2e2784f8c06c2f49fb819837bf3 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import argparse
import git
import ruamel.yaml
import os
import sys
print("Entering updateMultipleEndpoint script..")
parser = argparse.ArgumentParser()
parser.add_argument('current_cluster', type=str,
help="cluster name to which the endpoints are added")
parser.add_argument('endpoint_l... | 28.402597 | 104 | 0.712391 |
b13a1a7078a9f86859d9fb8dcb8208379ac34995 | 149 | py | Python | crafting/Recipe.py | uuk0/mcpython-3 | 6dc7fc9f2610c999c9b690536b867a78eff25699 | [
"MIT"
] | null | null | null | crafting/Recipe.py | uuk0/mcpython-3 | 6dc7fc9f2610c999c9b690536b867a78eff25699 | [
"MIT"
] | null | null | null | crafting/Recipe.py | uuk0/mcpython-3 | 6dc7fc9f2610c999c9b690536b867a78eff25699 | [
"MIT"
] | null | null | null | import globals as G
class IRecipe:
pass
class Crafting(IRecipe):
def __init__(self, inputs, outputs, stay=[], convert=[]):
pass
| 12.416667 | 61 | 0.637584 |
2c1d5431ab7a84805e6133f3fac61e89e1dcf72a | 3,858 | py | Python | src/util/vec.py | nrbabcock/HeartOfGold | 279f473da091de937614f8824fbb1f8e65b2d1a3 | [
"MIT"
] | null | null | null | src/util/vec.py | nrbabcock/HeartOfGold | 279f473da091de937614f8824fbb1f8e65b2d1a3 | [
"MIT"
] | null | null | null | src/util/vec.py | nrbabcock/HeartOfGold | 279f473da091de937614f8824fbb1f8e65b2d1a3 | [
"MIT"
] | null | null | null | import math
from typing import Union
from rlbot.utils.structures.game_data_struct import Vector3
class Vec3:
"""
This class should provide you with all the basic vector operations that you need, but feel free to extend its
functionality when needed.
The vectors found in the GameTickPacket will be fla... | 33.842105 | 118 | 0.589425 |
8eddce3d12ab38f6157a064775149f07cdd7e4e4 | 560 | py | Python | compiler/uniquifyGDS.py | im-world/OpenRAM | f66aac3264598eeae31225c62b6a4af52412d407 | [
"BSD-3-Clause"
] | 335 | 2018-03-13T21:05:22.000Z | 2022-03-30T07:53:25.000Z | compiler/uniquifyGDS.py | im-world/OpenRAM | f66aac3264598eeae31225c62b6a4af52412d407 | [
"BSD-3-Clause"
] | 87 | 2018-03-06T00:55:51.000Z | 2022-03-30T19:38:29.000Z | compiler/uniquifyGDS.py | im-world/OpenRAM | f66aac3264598eeae31225c62b6a4af52412d407 | [
"BSD-3-Clause"
] | 95 | 2018-03-14T16:22:55.000Z | 2022-03-24T00:34:37.000Z | #!/usr/bin/env python3
import sys
from gdsMill import gdsMill
if len(sys.argv) < 4:
print("Script to prefix every instance and structure with the root cell name to provide unique namespace, but skip cells that begin with the library prefix.")
print("Usage: {0} <library prefix> in.gds out.gds".format(sys.argv[... | 28 | 162 | 0.742857 |
b5b8a0b0c6f78210e02fd6fb20104a1566e81934 | 1,521 | py | Python | test/functional/feature_reindex.py | MiracleCity/MiracleCity | 7520173d387085b0b3e4d24ac4791d7179ee2c58 | [
"MIT"
] | null | null | null | test/functional/feature_reindex.py | MiracleCity/MiracleCity | 7520173d387085b0b3e4d24ac4791d7179ee2c58 | [
"MIT"
] | null | null | null | test/functional/feature_reindex.py | MiracleCity/MiracleCity | 7520173d387085b0b3e4d24ac4791d7179ee2c58 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Copyright (c) 2017-2018 The Miracle Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test running miracled with -reindex and -reindex-... | 36.214286 | 106 | 0.708087 |
86423780f2645e5eca1b551b0559b73fc7dcbd48 | 5,973 | py | Python | src/lib/common/mtmodule.py | williamwmarx/mtx | 31548b60a4e88124b0384350cbec8df1d88975cb | [
"CC0-1.0"
] | null | null | null | src/lib/common/mtmodule.py | williamwmarx/mtx | 31548b60a4e88124b0384350cbec8df1d88975cb | [
"CC0-1.0"
] | null | null | null | src/lib/common/mtmodule.py | williamwmarx/mtx | 31548b60a4e88124b0384350cbec8df1d88975cb | [
"CC0-1.0"
] | null | null | null | from abc import ABC, abstractmethod
import os
import struct
import yaml
import multiprocessing
from functools import partial, wraps
from types import GeneratorType
from typing import Generator
from itertools import islice, chain
from pathlib import Path
from lib.common.util import hashdict, get_batch_size, batch
from ... | 28.442857 | 118 | 0.678888 |
f0ff5e91674e0e72e6e6e666bd599b8da3a5aa82 | 115,684 | py | Python | sympy/core/function.py | bertiewooster/sympy | 7f72eb9bc20b4b24ade8436f98c51ae6be883e08 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/function.py | bertiewooster/sympy | 7f72eb9bc20b4b24ade8436f98c51ae6be883e08 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/function.py | bertiewooster/sympy | 7f72eb9bc20b4b24ade8436f98c51ae6be883e08 | [
"BSD-3-Clause"
] | null | null | null | """
There are three types of functions implemented in SymPy:
1) defined functions (in the sense that they can be evaluated) like
exp or sin; they have a name and a body:
f = exp
2) undefined function which have a name but no body. Undefined
functions can be defined using a Function cla... | 34.17548 | 165 | 0.560743 |
8cbf699e0d9a284d81f1263a05a2964f1f06d7e4 | 14,438 | py | Python | python/ray/serve/controller.py | jamesanto/ray | f640758c852b9eece756d3d2a562af78273a9f36 | [
"Apache-2.0"
] | 1 | 2020-05-30T21:01:17.000Z | 2020-05-30T21:01:17.000Z | python/ray/serve/controller.py | jamesanto/ray | f640758c852b9eece756d3d2a562af78273a9f36 | [
"Apache-2.0"
] | 66 | 2019-12-10T22:30:09.000Z | 2022-03-05T08:04:38.000Z | python/ray/serve/controller.py | majacQ/ray | bc08c6cdcc7ddf4da751ca2a972defd3db509061 | [
"Apache-2.0"
] | 1 | 2020-01-16T20:52:25.000Z | 2020-01-16T20:52:25.000Z | import asyncio
from collections import defaultdict
import inspect
from typing import Dict, Any, Optional, Set, Tuple
import ray
from ray.actor import ActorHandle
from ray.serve.async_goal_manager import AsyncGoalManager
from ray.serve.backend_state import BackendState
from ray.serve.backend_worker import create_backen... | 42.715976 | 79 | 0.632013 |
ef06c8d7fd0de8d6dbc5e1842e423c70b5f84850 | 1,836 | py | Python | extensions/interactions/NumericExpressionInput/NumericExpressionInput.py | Tim810306/oppia | 6f90044d12dbe0979c999265cbe46f267c4c592d | [
"Apache-2.0"
] | 4 | 2021-09-16T16:46:53.000Z | 2022-02-06T13:00:14.000Z | extensions/interactions/NumericExpressionInput/NumericExpressionInput.py | Tim810306/oppia | 6f90044d12dbe0979c999265cbe46f267c4c592d | [
"Apache-2.0"
] | 80 | 2020-10-31T09:14:46.000Z | 2021-01-12T23:38:15.000Z | extensions/interactions/NumericExpressionInput/NumericExpressionInput.py | Tim810306/oppia | 6f90044d12dbe0979c999265cbe46f267c4c592d | [
"Apache-2.0"
] | 1 | 2017-12-06T19:41:49.000Z | 2017-12-06T19:41:49.000Z | # coding: utf-8
#
# Copyright 2020 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... | 32.210526 | 74 | 0.674292 |
cf96d0a4bf8e3e165a3e7d2480225748326b19b8 | 52 | py | Python | dirchromatic/logger/__init__.py | karlding/dirchromatic | 4b375d65cc7b233b105e574d9f4604398af10b0d | [
"MIT"
] | 6 | 2017-09-28T16:29:48.000Z | 2020-05-19T17:59:36.000Z | dirchromatic/logger/__init__.py | karlding/dirchromatic | 4b375d65cc7b233b105e574d9f4604398af10b0d | [
"MIT"
] | null | null | null | dirchromatic/logger/__init__.py | karlding/dirchromatic | 4b375d65cc7b233b105e574d9f4604398af10b0d | [
"MIT"
] | 1 | 2020-05-01T20:45:57.000Z | 2020-05-01T20:45:57.000Z | from .logger import Logger
from .level import Level
| 17.333333 | 26 | 0.807692 |
75c74a2b343f5f57adda38c1a13131e625cc987a | 2,521 | py | Python | tests/test_calling_convention_analysis.py | MarSoft/angr | c46e848d4921dafca8d4c304bfadcad4d043bda9 | [
"BSD-2-Clause"
] | 2 | 2020-04-29T02:39:42.000Z | 2020-04-29T08:07:44.000Z | tests/test_calling_convention_analysis.py | MarSoft/angr | c46e848d4921dafca8d4c304bfadcad4d043bda9 | [
"BSD-2-Clause"
] | 2 | 2018-11-13T16:19:16.000Z | 2018-12-10T15:45:53.000Z | tests/test_calling_convention_analysis.py | MarSoft/angr | c46e848d4921dafca8d4c304bfadcad4d043bda9 | [
"BSD-2-Clause"
] | 1 | 2020-11-18T16:39:13.000Z | 2020-11-18T16:39:13.000Z |
import logging
import os
import nose.tools
import archinfo
import angr
from angr.calling_conventions import SimStackArg, SimRegArg, SimCCCdecl, SimCCSystemVAMD64
test_location = os.path.join(os.path.dirname(os.path.realpath(str(__file__))), '..', '..',
'binaries',
... | 26.260417 | 114 | 0.618405 |
eb2e42d534ab7f9cf90d0a1e1af8b788186d81b0 | 240 | py | Python | apps/employee/api/serializers.py | LHerdy/People_Manager | e35ba2333a26e1cf35b7234af10f3c849eaa0270 | [
"MIT"
] | null | null | null | apps/employee/api/serializers.py | LHerdy/People_Manager | e35ba2333a26e1cf35b7234af10f3c849eaa0270 | [
"MIT"
] | 1 | 2021-08-15T15:02:10.000Z | 2021-08-15T15:02:25.000Z | apps/employee/api/serializers.py | LHerdy/People_Manager | e35ba2333a26e1cf35b7234af10f3c849eaa0270 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from apps.employee.models import Employee
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
fields = ['name', 'departament', 'company', 'user']
| 24 | 59 | 0.725 |
d9094b140b01769d671ab7396958e4e7d79c5511 | 1,061 | py | Python | djangofiles/BlogProject/blog/migrations/0005_auto_20190523_2013.py | manvith263/tricalidee | 69cf66a416be7917eb8cbb3562cff7d5a66df088 | [
"BSD-3-Clause"
] | 1 | 2021-05-11T01:52:35.000Z | 2021-05-11T01:52:35.000Z | djangofiles/BlogProject/blog/migrations/0005_auto_20190523_2013.py | manvith263/tricalidee | 69cf66a416be7917eb8cbb3562cff7d5a66df088 | [
"BSD-3-Clause"
] | null | null | null | djangofiles/BlogProject/blog/migrations/0005_auto_20190523_2013.py | manvith263/tricalidee | 69cf66a416be7917eb8cbb3562cff7d5a66df088 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2 on 2019-05-23 18:13
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('blog', '0004_comment'),
]
operations = [
migrations.RenameField(
model_name='comment',
ol... | 26.525 | 93 | 0.566447 |
4844af7a0597625f3e714ff282ab5ee50ed76639 | 3,812 | py | Python | sdk/python/pulumi_azure_native/portal/get_tenant_configuration.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/portal/get_tenant_configuration.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/portal/get_tenant_configuration.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__a... | 37.009709 | 193 | 0.685729 |
442f0d5a383034f8e73f42a0e06f21b1df6306e0 | 34,415 | py | Python | vnpy/gateway/huobis/huobis_gateway.py | hardywu/vnpy | 81ab73dc57d12a3ff7c74c73665513b46fc0f668 | [
"MIT"
] | 1 | 2021-05-14T12:57:08.000Z | 2021-05-14T12:57:08.000Z | vnpy/gateway/huobis/huobis_gateway.py | hardywu/vnpy | 81ab73dc57d12a3ff7c74c73665513b46fc0f668 | [
"MIT"
] | null | null | null | vnpy/gateway/huobis/huobis_gateway.py | hardywu/vnpy | 81ab73dc57d12a3ff7c74c73665513b46fc0f668 | [
"MIT"
] | 1 | 2021-06-14T13:26:41.000Z | 2021-06-14T13:26:41.000Z | """
火币合约接口
"""
import re
import urllib
import base64
import json
import zlib
import hashlib
import hmac
import sys
from copy import copy
from datetime import datetime, timedelta
from threading import Lock
from typing import Sequence
import pytz
from typing import Dict, List, Any
from time import sleep
from vnpy.event... | 28.232158 | 137 | 0.53529 |
21c3a9bcd87ddcf5a8255a035df555cb564f80fc | 777 | py | Python | checkov/cloudformation/checks/resource/aws/CloudWatchLogGroupRetention.py | jamesholland-uk/checkov | d73fd4bd7096d48ab3434a92a177bcc55605460a | [
"Apache-2.0"
] | 4,013 | 2019-12-09T13:16:54.000Z | 2022-03-31T14:31:01.000Z | checkov/cloudformation/checks/resource/aws/CloudWatchLogGroupRetention.py | jamesholland-uk/checkov | d73fd4bd7096d48ab3434a92a177bcc55605460a | [
"Apache-2.0"
] | 1,258 | 2019-12-17T09:55:51.000Z | 2022-03-31T19:17:17.000Z | checkov/cloudformation/checks/resource/aws/CloudWatchLogGroupRetention.py | jamesholland-uk/checkov | d73fd4bd7096d48ab3434a92a177bcc55605460a | [
"Apache-2.0"
] | 638 | 2019-12-19T08:57:38.000Z | 2022-03-30T21:38:37.000Z | from checkov.common.models.enums import CheckCategories
from checkov.cloudformation.checks.resource.base_resource_value_check import BaseResourceValueCheck
from checkov.common.models.consts import ANY_VALUE
class CloudWatchLogGroupRetention(BaseResourceValueCheck):
def __init__(self):
name = "Ensure that ... | 35.318182 | 105 | 0.764479 |
e94841ae21a0452a009383767c8d35499fc0b4db | 357 | py | Python | pos_backend/order/migrations/0002_auto_20201027_0751.py | ZeroExistence/pos-backend | 38c7795de08f6a5fd7359ab54a5f802939ca438f | [
"MIT"
] | null | null | null | pos_backend/order/migrations/0002_auto_20201027_0751.py | ZeroExistence/pos-backend | 38c7795de08f6a5fd7359ab54a5f802939ca438f | [
"MIT"
] | null | null | null | pos_backend/order/migrations/0002_auto_20201027_0751.py | ZeroExistence/pos-backend | 38c7795de08f6a5fd7359ab54a5f802939ca438f | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-27 07:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('order', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='orderitem',
old_name='transaction',
... | 18.789474 | 47 | 0.577031 |
013797e47b3bddaa2be791106762236f0a86892a | 17,259 | py | Python | sdk/python/pulumi_azure/datafactory/integration_runtime_managed.py | adnang/pulumi-azure | 32360d2f1e41e27d7fdd6522cb26d65e531f279f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/datafactory/integration_runtime_managed.py | adnang/pulumi-azure | 32360d2f1e41e27d7fdd6522cb26d65e531f279f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/datafactory/integration_runtime_managed.py | adnang/pulumi-azure | 32360d2f1e41e27d7fdd6522cb26d65e531f279f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Integr... | 73.75641 | 462 | 0.721131 |
a14e3a36be8d1e2c0e020a4e6f7b1efd2f5f739b | 3,692 | py | Python | chrome/common/extensions/docs/server2/render_servlet.py | pozdnyakov/chromium-crosswalk | 0fb25c7278bf1d93e53a3b0bcb75aa8b99d4b26e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/common/extensions/docs/server2/render_servlet.py | pozdnyakov/chromium-crosswalk | 0fb25c7278bf1d93e53a3b0bcb75aa8b99d4b26e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/common/extensions/docs/server2/render_servlet.py | pozdnyakov/chromium-crosswalk | 0fb25c7278bf1d93e53a3b0bcb75aa8b99d4b26e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright 2013 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 fnmatch import fnmatch
import logging
import mimetypes
import traceback
from urlparse import urlsplit
from branch_utility import BranchUtility
from fil... | 34.185185 | 78 | 0.681744 |
04b67322edd0a572e8de8323c9f14836dbe7c222 | 610 | py | Python | mopo/static/__init__.py | xtwentian3/mopo | 2bdf0db3862a4510b9511327ef0b23cc6ec10405 | [
"MIT"
] | null | null | null | mopo/static/__init__.py | xtwentian3/mopo | 2bdf0db3862a4510b9511327ef0b23cc6ec10405 | [
"MIT"
] | null | null | null | mopo/static/__init__.py | xtwentian3/mopo | 2bdf0db3862a4510b9511327ef0b23cc6ec10405 | [
"MIT"
] | null | null | null | import sys
import os
import importlib
import pdb
def import_fns(path, file, fns_name='StaticFns'):
full_path = os.path.join(path, file)
import_path = full_path.replace('/', '.')
module = importlib.import_module(import_path)
fns = getattr(module, fns_name)
return fns
# cwd = 'mopo/static'
cwd = '.'
files = os.li... | 22.592593 | 62 | 0.677049 |
f66c822db1c07e801d08726d00d41dd9d99d6104 | 270 | py | Python | configs/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV3_Flat_ycbvPbr_SO/FlowNet512_1.5AugCosyAAEGray_AggressiveV3_Flat_Pbr_06_07TunaFishCan_bop_test.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 33 | 2021-12-15T07:11:47.000Z | 2022-03-29T08:58:32.000Z | configs/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV3_Flat_ycbvPbr_SO/FlowNet512_1.5AugCosyAAEGray_AggressiveV3_Flat_Pbr_06_07TunaFishCan_bop_test.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 3 | 2021-12-15T11:39:54.000Z | 2022-03-29T07:24:23.000Z | configs/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV3_Flat_ycbvPbr_SO/FlowNet512_1.5AugCosyAAEGray_AggressiveV3_Flat_Pbr_06_07TunaFishCan_bop_test.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | null | null | null | _base_ = "./FlowNet512_1.5AugCosyAAEGray_AggressiveV3_Flat_Pbr_01_02MasterChefCan_bop_test.py"
OUTPUT_DIR = "output/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV3_Flat_ycbvPbr_SO/06_07TunaFishCan"
DATASETS = dict(TRAIN=("ycbv_007_tuna_fish_can_train_pbr",))
| 67.5 | 113 | 0.877778 |
7d1736071592c5faaeacc63fbac10d8c99aff338 | 5,028 | py | Python | addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py | Cyp/glTF-Blender-IO | 232018e779469912e68ae876a9e02ad4cd258b5b | [
"Apache-2.0"
] | null | null | null | addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py | Cyp/glTF-Blender-IO | 232018e779469912e68ae876a9e02ad4cd258b5b | [
"Apache-2.0"
] | null | null | null | addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py | Cyp/glTF-Blender-IO | 232018e779469912e68ae876a9e02ad4cd258b5b | [
"Apache-2.0"
] | 1 | 2019-08-23T16:10:36.000Z | 2019-08-23T16:10:36.000Z | # Copyright 2018 The glTF-Blender-IO authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 38.090909 | 118 | 0.716985 |
34db0cd82d836345ef6de0b3d12580248640be03 | 13,693 | py | Python | test/test_pinserver.py | valerio-vaccaro/blind_pin_server | 8cf4e9b3e8ba8d7ee074253aac3154fec16d4a9e | [
"MIT"
] | 4 | 2021-01-18T07:58:28.000Z | 2021-11-17T22:03:37.000Z | test/test_pinserver.py | valerio-vaccaro/blind_pin_server | 8cf4e9b3e8ba8d7ee074253aac3154fec16d4a9e | [
"MIT"
] | 5 | 2021-01-05T14:30:30.000Z | 2021-12-15T10:18:54.000Z | test/test_pinserver.py | valerio-vaccaro/blind_pin_server | 8cf4e9b3e8ba8d7ee074253aac3154fec16d4a9e | [
"MIT"
] | 5 | 2021-02-19T09:30:16.000Z | 2022-03-29T21:34:00.000Z | import unittest
import os
import json
import time
from multiprocessing import Process
from hmac import compare_digest
import requests
from ..client import PINClientECDH
from ..server import PINServerECDH
from ..pindb import PINDb
from ..flaskserver import app
from ..flaskserver import SESSION_LIFETIME
from wallycore... | 37.825967 | 79 | 0.648434 |
be5d5d4851c0b3294a155ac7e273c99d207aaac5 | 11,178 | pyw | Python | example_program.pyw | zach-king/GlyphyType | dd930730af4396ad7d5ac12d5011a35a1f5ab9bc | [
"MIT"
] | null | null | null | example_program.pyw | zach-king/GlyphyType | dd930730af4396ad7d5ac12d5011a35a1f5ab9bc | [
"MIT"
] | null | null | null | example_program.pyw | zach-king/GlyphyType | dd930730af4396ad7d5ac12d5011a35a1f5ab9bc | [
"MIT"
] | null | null | null | from PyQt4 import QtCore, QtGui
class ScribbleArea(QtGui.QWidget):
"""
this scales the image but it's not good, too many refreshes really mess it up!!!
"""
def __init__(self, parent=None):
super(ScribbleArea, self).__init__(parent)
self.setAttribute(QtCore.Qt.WA_StaticContents)
... | 35.150943 | 107 | 0.61299 |
5eae892104b1d574b63481bd1496293f84cf82eb | 1,272 | py | Python | locallibrary/urls.py | byronvhughey/django_local_library | 1429b95b3a4fe38af3722c352a3d05c8b332cd9b | [
"MIT"
] | null | null | null | locallibrary/urls.py | byronvhughey/django_local_library | 1429b95b3a4fe38af3722c352a3d05c8b332cd9b | [
"MIT"
] | null | null | null | locallibrary/urls.py | byronvhughey/django_local_library | 1429b95b3a4fe38af3722c352a3d05c8b332cd9b | [
"MIT"
] | null | null | null | """locallibrary URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cla... | 39.75 | 79 | 0.724843 |
c3d9e228e57c118418379984383ae31e82ad75da | 3,319 | py | Python | easy_rec/python/input/tfrecord_input.py | xia-huang-411303/EasyRec | 7b2050dddc0bfec9e551e2199a36414a3ee82588 | [
"Apache-2.0"
] | 61 | 2021-08-19T06:10:03.000Z | 2021-10-09T06:44:54.000Z | easy_rec/python/input/tfrecord_input.py | xia-huang-411303/EasyRec | 7b2050dddc0bfec9e551e2199a36414a3ee82588 | [
"Apache-2.0"
] | 41 | 2021-09-08T03:02:42.000Z | 2021-09-29T09:00:57.000Z | easy_rec/python/input/tfrecord_input.py | xia-huang-411303/EasyRec | 7b2050dddc0bfec9e551e2199a36414a3ee82588 | [
"Apache-2.0"
] | 11 | 2021-08-20T06:19:08.000Z | 2021-10-02T14:55:39.000Z | # -*- encoding:utf-8 -*-
# Copyright (c) Alibaba, Inc. and its affiliates.
import logging
import tensorflow as tf
from easy_rec.python.input.input import Input
if tf.__version__ >= '2.0':
tf = tf.compat.v1
class TFRecordInput(Input):
def __init__(self,
data_config,
feature_config... | 37.292135 | 80 | 0.662248 |
f99ea854ace14a1770f64c6e2c33871b52ef5d31 | 7,515 | py | Python | r2r/env_config.py | google-research/valan | 9fc6e38f411e6cb76408bf033cdc056ace980973 | [
"Apache-2.0"
] | 71 | 2019-09-16T20:20:45.000Z | 2022-03-31T09:33:33.000Z | r2r/env_config.py | google-research/valan | 9fc6e38f411e6cb76408bf033cdc056ace980973 | [
"Apache-2.0"
] | 2 | 2020-01-16T12:05:37.000Z | 2021-04-12T17:38:09.000Z | r2r/env_config.py | google-research/valan | 9fc6e38f411e6cb76408bf033cdc056ace980973 | [
"Apache-2.0"
] | 16 | 2019-09-25T07:00:43.000Z | 2022-01-16T11:32:54.000Z | # coding=utf-8
# Copyright 2019 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 agreed to ... | 35.616114 | 79 | 0.720958 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.