hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c3551ee0553f10a72ff85a89b3a75edbe3228ac
2,630
py
Python
plugins/modules/snmp_property.py
robertcsapo/dnacenter-ansible
33f776f8c0bc7113da73191c301dd1807e6b4a43
[ "MIT" ]
null
null
null
plugins/modules/snmp_property.py
robertcsapo/dnacenter-ansible
33f776f8c0bc7113da73191c301dd1807e6b4a43
[ "MIT" ]
null
null
null
plugins/modules/snmp_property.py
robertcsapo/dnacenter-ansible
33f776f8c0bc7113da73191c301dd1807e6b4a43
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: snmp_property short_description: Manage SnmpProperty objects of Discovery description: - Returns SNMP properties....
27.395833
101
0.702281
DOCUMENTATION = r""" --- module: snmp_property short_description: Manage SnmpProperty objects of Discovery description: - Returns SNMP properties. - Adds SNMP properties. version_added: '1.0.0' author: Rafael Campos (@racampos) options: payload: description: - An object to send in the Request body. ...
true
true
1c35527632154c510f110f3ebe027e62bcd3c139
9,322
py
Python
WWW/pycopia/WWW/website.py
kdart/pycopia3
8a7c820f096245411eabbb72345e4f30a35988b6
[ "Apache-2.0" ]
3
2018-11-26T15:00:20.000Z
2022-01-28T23:17:58.000Z
WWW/pycopia/WWW/website.py
kdart/pycopia3
8a7c820f096245411eabbb72345e4f30a35988b6
[ "Apache-2.0" ]
null
null
null
WWW/pycopia/WWW/website.py
kdart/pycopia3
8a7c820f096245411eabbb72345e4f30a35988b6
[ "Apache-2.0" ]
1
2018-11-26T15:00:21.000Z
2018-11-26T15:00:21.000Z
#!/usr/bin/python3.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by app...
31.6
78
0.63141
import sys import os import socket import traceback from pycopia import basicconfig from pycopia import logging from pycopia import passwd from pycopia import proctools from pycopia.OS import procutils LTCONFIG = "/etc/pycopia/lighttpd/lighttpd.conf" SITE_CONFIG = "/etc/pycopia/website.conf" LIGHTT...
true
true
1c3552d4de8a30c043890bd176251ff14e9a9c7f
10,537
py
Python
keystone-moon/keystone/token/providers/fernet/utils.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
null
null
null
keystone-moon/keystone/token/providers/fernet/utils.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
null
null
null
keystone-moon/keystone/token/providers/fernet/utils.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
1
2021-03-21T11:38:30.000Z
2021-03-21T11:38:30.000Z
# 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 # distributed under t...
38.881919
79
0.662617
import os import stat from cryptography import fernet from oslo_config import cfg from oslo_log import log from keystone.i18n import _LE, _LW, _LI LOG = log.getLogger(__name__) CONF = cfg.CONF def validate_key_repository(requires_write=False): # in as None because we don't set allow_no_value...
true
true
1c35532eedb22971424928ef62d8037c39a834ae
4,061
py
Python
test/circuit/test_european_call_pricing_objective.py
SooluThomas/qiskit-finance
3e25551b55cdfebfeba1b3889a1cb930b83e57e3
[ "Apache-2.0" ]
1
2021-08-04T14:36:22.000Z
2021-08-04T14:36:22.000Z
test/circuit/test_european_call_pricing_objective.py
SooluThomas/qiskit-finance
3e25551b55cdfebfeba1b3889a1cb930b83e57e3
[ "Apache-2.0" ]
null
null
null
test/circuit/test_european_call_pricing_objective.py
SooluThomas/qiskit-finance
3e25551b55cdfebfeba1b3889a1cb930b83e57e3
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
33.561983
97
0.657474
import unittest from test import QiskitFinanceTestCase import numpy as np from qiskit.utils import algorithm_globals, QuantumInstance from qiskit.algorithms import IterativeAmplitudeEstimation, EstimationProblem from qiskit.circuit.library import LinearAmplitudeFunction, TwoLocal from qiskit.quantum_info...
true
true
1c3553a19ff3ad671fcce5a890853439829c43a3
184
py
Python
Job-Interviews/Python/Bitwise/Problem1.py
JuanPabloMontoya271/ITC
f5899e7a8fed4e9f90e97bb3af635a276d9cf13a
[ "MIT" ]
1
2020-11-02T15:18:16.000Z
2020-11-02T15:18:16.000Z
Job-Interviews/Python/Bitwise/Problem1.py
JuanPabloMontoya271/ITC
f5899e7a8fed4e9f90e97bb3af635a276d9cf13a
[ "MIT" ]
null
null
null
Job-Interviews/Python/Bitwise/Problem1.py
JuanPabloMontoya271/ITC
f5899e7a8fed4e9f90e97bb3af635a276d9cf13a
[ "MIT" ]
1
2021-10-30T14:18:29.000Z
2021-10-30T14:18:29.000Z
#Count number of 1 bits in a number def count(n): counter = 0 while n: counter+= n&1 n>>=1 return counter count(10) print(bin(10>>2), bin(10))
15.333333
36
0.527174
def count(n): counter = 0 while n: counter+= n&1 n>>=1 return counter count(10) print(bin(10>>2), bin(10))
true
true
1c3554bbe05bcb3a6f3a5c0a1b58842c1085fb45
181
py
Python
config/views.py
joway/python-china
cb3a61ff335c887d2ec65e5948647e056f652eac
[ "MIT" ]
null
null
null
config/views.py
joway/python-china
cb3a61ff335c887d2ec65e5948647e056f652eac
[ "MIT" ]
null
null
null
config/views.py
joway/python-china
cb3a61ff335c887d2ec65e5948647e056f652eac
[ "MIT" ]
null
null
null
from django.shortcuts import render def home(request): return render(request, 'index.html', locals()) def topic(request): return render(request, 'topic.html', locals())
18.1
50
0.707182
from django.shortcuts import render def home(request): return render(request, 'index.html', locals()) def topic(request): return render(request, 'topic.html', locals())
true
true
1c3554f915c34409018ac1e4a215ca1f4cbbbd61
314
py
Python
Scripts/core/native/__init__.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/core/native/__init__.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/core/native/__init__.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Core\native\__init__.py # Compiled at: 2014-12-16 01:27:05 # Size of source mod 2**32: 114 bytes pass
44.857143
107
0.719745
pass
true
true
1c3555912590c942e48bfd569e8e2f6c17ba0cf1
23,759
py
Python
dpaygo/storage.py
dpays/dpaygo
d0473799e8e9432a618736a281146d23eb433bf4
[ "MIT" ]
null
null
null
dpaygo/storage.py
dpays/dpaygo
d0473799e8e9432a618736a281146d23eb433bf4
[ "MIT" ]
null
null
null
dpaygo/storage.py
dpays/dpaygo
d0473799e8e9432a618736a281146d23eb433bf4
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import bytes from builtins import object from dpaygographenebase.py23 import py23_bytes, bytes_types im...
35.094535
107
0.593038
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import bytes from builtins import object from dpaygographenebase.py23 import py23_bytes, bytes_types import shutil import time import os import sqlite3 from...
true
true
1c3555f8149df493963d51cf18f6e2dc9ec2720b
2,273
py
Python
examples/django_app/example_app/views.py
maclogan/VirtualPenPal
6e95f48d876aea151cd445b3e36ad69be03d5780
[ "BSD-3-Clause" ]
null
null
null
examples/django_app/example_app/views.py
maclogan/VirtualPenPal
6e95f48d876aea151cd445b3e36ad69be03d5780
[ "BSD-3-Clause" ]
null
null
null
examples/django_app/example_app/views.py
maclogan/VirtualPenPal
6e95f48d876aea151cd445b3e36ad69be03d5780
[ "BSD-3-Clause" ]
null
null
null
from django.views.generic.base import TemplateView from django.shortcuts import render, redirect from django.contrib.auth import ( authenticate, login, logout, get_user_model ) from django.views import generic from django.views.generic import View from .forms import UserForm class ChatterBotAppView...
31.136986
71
0.591289
from django.views.generic.base import TemplateView from django.shortcuts import render, redirect from django.contrib.auth import ( authenticate, login, logout, get_user_model ) from django.views import generic from django.views.generic import View from .forms import UserForm class ChatterBotAppView...
true
true
1c3556598e817b2bc6a79c16780907a026826a2c
822
py
Python
VideoDisplay_24bit/tests/ppm_to_8bit.py
willy-vvu/vlla
88b4cfbe1c1f358ad96e7dfeb3fed125402eaa55
[ "MIT" ]
1
2017-03-06T23:57:12.000Z
2017-03-06T23:57:12.000Z
VideoDisplay_24bit/tests/ppm_to_8bit.py
willy-vvu/vlla
88b4cfbe1c1f358ad96e7dfeb3fed125402eaa55
[ "MIT" ]
null
null
null
VideoDisplay_24bit/tests/ppm_to_8bit.py
willy-vvu/vlla
88b4cfbe1c1f358ad96e7dfeb3fed125402eaa55
[ "MIT" ]
2
2017-11-20T14:08:52.000Z
2018-11-08T23:08:50.000Z
# Usage: # python ppm_to_8bit.py > /dev/ttyACM1 import fileinput linecount = 0 maxcolor = 256 currentbyte = 0 allbytes = [] for line in fileinput.input(): if line[0] == "#": continue elif linecount < 2: pass #print line,linecount elif linecount == 2: maxcolor = int(line) ...
23.485714
54
0.574209
import fileinput linecount = 0 maxcolor = 256 currentbyte = 0 allbytes = [] for line in fileinput.input(): if line[0] == "#": continue elif linecount < 2: pass elif linecount == 2: maxcolor = int(line) elif (linecount % 3 == 0): currentbyt...
false
true
1c3556be885e65be6142efcd0b8f6d82f18ddbe3
6,004
py
Python
twitchio/ext/pubsub/models.py
tesence/TwitchIO
3362a916f5facb2ee9c271c663d229947ae69f0b
[ "MIT" ]
null
null
null
twitchio/ext/pubsub/models.py
tesence/TwitchIO
3362a916f5facb2ee9c271c663d229947ae69f0b
[ "MIT" ]
null
null
null
twitchio/ext/pubsub/models.py
tesence/TwitchIO
3362a916f5facb2ee9c271c663d229947ae69f0b
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2017-2021 TwitchIO 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...
34.113636
118
0.665057
import datetime from typing import List, Optional from twitchio import PartialUser, Client, Channel, CustomReward __all__ = ( "PoolError", "PoolFull", "PubSubMessage", "PubSubBitsMessage", "PubSubBitsBadgeMessage", "PubSubChatMessage", "PubSubBadgeEntitlement", "PubSubChannelPointsMe...
true
true
1c35570e864a58b65e4579108d82304f11faf769
12,093
py
Python
PyStacks/test/templates/test_rds.py
0xack13/PyStacks
13136c43089c241680beb216a233d1846119dd7c
[ "MIT" ]
11
2018-02-15T04:27:05.000Z
2020-10-02T11:20:08.000Z
PyStacks/test/templates/test_rds.py
0xack13/PyStacks
13136c43089c241680beb216a233d1846119dd7c
[ "MIT" ]
3
2018-02-15T05:46:54.000Z
2018-03-05T04:46:51.000Z
PyStacks/test/templates/test_rds.py
0xack13/PyStacks
13136c43089c241680beb216a233d1846119dd7c
[ "MIT" ]
8
2018-03-05T04:40:41.000Z
2021-02-22T08:07:58.000Z
import unittest from PyStacks.PyStacks.template import templateCF class TestTemplate(unittest.TestCase): def test_templateCF_RDSParameterGroup(self): resources = { 'rdsparamsgroup': { 'TestRDSParamGroup': { 'description': 'Some Description...', ...
38.512739
79
0.291987
import unittest from PyStacks.PyStacks.template import templateCF class TestTemplate(unittest.TestCase): def test_templateCF_RDSParameterGroup(self): resources = { 'rdsparamsgroup': { 'TestRDSParamGroup': { 'description': 'Some Description...', ...
true
true
1c35579873b9f27211078b0748c5ed1087adda4a
6,056
py
Python
sb_service/daemons/PostProcessDaemon.py
isabella232/scorebot
71f26a73b04c419ed0ccfbe73575d4b02fa26595
[ "Apache-2.0" ]
63
2019-11-22T23:54:21.000Z
2020-10-15T16:42:34.000Z
sb_service/daemons/PostProcessDaemon.py
isabella232/scorebot
71f26a73b04c419ed0ccfbe73575d4b02fa26595
[ "Apache-2.0" ]
null
null
null
sb_service/daemons/PostProcessDaemon.py
isabella232/scorebot
71f26a73b04c419ed0ccfbe73575d4b02fa26595
[ "Apache-2.0" ]
11
2019-11-23T04:41:15.000Z
2021-06-10T15:14:21.000Z
import time import traceback from django.db import connection from django.db.backends.base.base import BaseDatabaseWrapper from django.db.utils import OperationalError from django.utils import timezone from external_tools.github.GithubConfig import GithubConfig from external_tools.github.GithubPullRequest import Githu...
47.3125
121
0.591645
import time import traceback from django.db import connection from django.db.backends.base.base import BaseDatabaseWrapper from django.db.utils import OperationalError from django.utils import timezone from external_tools.github.GithubConfig import GithubConfig from external_tools.github.GithubPullRequest import Githu...
true
true
1c3558d607658f8dea73cab624fa5807f1ade4f4
4,544
py
Python
plots.py
olihawkins/penguin-models
fabecdf6336390fc50e67cfd8494ade69fc3ef7f
[ "BSD-3-Clause" ]
1
2021-05-05T10:17:01.000Z
2021-05-05T10:17:01.000Z
plots.py
olihawkins/penguin-models
fabecdf6336390fc50e67cfd8494ade69fc3ef7f
[ "BSD-3-Clause" ]
null
null
null
plots.py
olihawkins/penguin-models
fabecdf6336390fc50e67cfd8494ade69fc3ef7f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """A module for plotting penguins data for modelling with scikit-learn.""" # Imports --------------------------------------------------------------------- import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pandas as pd # Constants -----------------------------...
28.759494
79
0.574604
import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pandas as pd SPECIES_COLORS = { 'Adelie': '#4daf4a', 'Gentoo': '#ffb000', 'Chinstrap': '#0084f7' } X_AXIS = [30, 60] Y_AXIS = [12, 22] plt.style.use('./style/eda.mplstyle') def get_contour_data(model, pip...
true
true
1c3558edc6a9d9cc7f4e211516fa662ff2a8b455
6,049
py
Python
stanCode_projects/name_searching_system/babygraphics.py
kenhuang1204/stanCode_projects
f697a34a1c54a864c1140cb0f2f76e2d70b45698
[ "MIT" ]
null
null
null
stanCode_projects/name_searching_system/babygraphics.py
kenhuang1204/stanCode_projects
f697a34a1c54a864c1140cb0f2f76e2d70b45698
[ "MIT" ]
null
null
null
stanCode_projects/name_searching_system/babygraphics.py
kenhuang1204/stanCode_projects
f697a34a1c54a864c1140cb0f2f76e2d70b45698
[ "MIT" ]
null
null
null
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE: babygraphics.py draws the lines and name data such as names, years, and ranks on a canvas, which illustrates how the trend of the searched names change. """ import tkinter import babynames import baby...
40.597315
145
0.633824
import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', 'data/full/baby-1940.txt', 'data/full/baby-1950.txt', 'data/full/baby-1960.txt', 'data/full/baby-1970.txt', 'data/...
true
true
1c3559ca49687ba7b8b184f1d128f1a7deafa9c6
597
py
Python
days/d01.py
masenius/aoc-2021
e2fcfe26e17e883ddd1e61dd33ad6b391f4c0490
[ "MIT" ]
null
null
null
days/d01.py
masenius/aoc-2021
e2fcfe26e17e883ddd1e61dd33ad6b391f4c0490
[ "MIT" ]
null
null
null
days/d01.py
masenius/aoc-2021
e2fcfe26e17e883ddd1e61dd33ad6b391f4c0490
[ "MIT" ]
null
null
null
import pytest def p1(data): return sum(data[i] > data[i - 1] for i in range(1, len(data))) def p2(data): return p1([sum(data[i - 2:i + 1]) for i in range(2, len(data))]) @pytest.fixture def test_data(): return [199, 200, 208, 210, 200, 207, 240, 269, 260, 263] def test_p1(test_data): assert p1(t...
17.558824
68
0.58459
import pytest def p1(data): return sum(data[i] > data[i - 1] for i in range(1, len(data))) def p2(data): return p1([sum(data[i - 2:i + 1]) for i in range(2, len(data))]) @pytest.fixture def test_data(): return [199, 200, 208, 210, 200, 207, 240, 269, 260, 263] def test_p1(test_data): assert p1(t...
true
true
1c355a9e57d2a0de1f15a469085d3b3ddf19e0e7
6,130
py
Python
hplip-3.20.3/ui5/nodevicesdialog_base.py
Deril-Pana/wikiBlackcoinNL
9633307f0b485c27feae5da242944adf450e8963
[ "MIT" ]
null
null
null
hplip-3.20.3/ui5/nodevicesdialog_base.py
Deril-Pana/wikiBlackcoinNL
9633307f0b485c27feae5da242944adf450e8963
[ "MIT" ]
1
2021-11-20T16:33:39.000Z
2021-11-20T16:33:39.000Z
hplip-3.20.3/ui5/nodevicesdialog_base.py
Deril-Pana/wikiBlackcoinNL
9633307f0b485c27feae5da242944adf450e8963
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/gaurav/work_qt5/src_qt5/ui5/nodevicesdialog_base.ui' # # Created by: PyQt5 UI code generator 5.4.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_NoDevicesDialog_base(obje...
83.972603
607
0.717455
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_NoDevicesDialog_base(object): def setupUi(self, NoDevicesDialog_base): NoDevicesDialog_base.setObjectName("NoDevicesDialog_base") NoDevicesDialog_base.resize(539, 335) self.gridlayout = QtWidgets.QGridLayout(NoDevicesDialog_base) ...
true
true
1c355b35c10d1e9bedeeb5e047f7d7b8d18570ba
274
py
Python
tea_admin/tea_admin/doctype/salary_structure/test_salary_structure.py
nivedita05/Tea-Admin
4267cfa9d0c97e586bd9b5401e310bcd8ec93268
[ "MIT" ]
null
null
null
tea_admin/tea_admin/doctype/salary_structure/test_salary_structure.py
nivedita05/Tea-Admin
4267cfa9d0c97e586bd9b5401e310bcd8ec93268
[ "MIT" ]
null
null
null
tea_admin/tea_admin/doctype/salary_structure/test_salary_structure.py
nivedita05/Tea-Admin
4267cfa9d0c97e586bd9b5401e310bcd8ec93268
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('Salary Structure') class TestSalaryStructure(unittest.TestCase): pass
21.076923
60
0.777372
from __future__ import unicode_literals import frappe import unittest class TestSalaryStructure(unittest.TestCase): pass
true
true
1c355b495ba17df4e961b1648a3e26342aad799f
9,053
py
Python
src/d1_local_cache/ocache/models.py
vdave/d1_local_cache
0aedfb0e91b17c26f995d4ac614531d5ea50f38b
[ "Apache-2.0" ]
null
null
null
src/d1_local_cache/ocache/models.py
vdave/d1_local_cache
0aedfb0e91b17c26f995d4ac614531d5ea50f38b
[ "Apache-2.0" ]
null
null
null
src/d1_local_cache/ocache/models.py
vdave/d1_local_cache
0aedfb0e91b17c26f995d4ac614531d5ea50f38b
[ "Apache-2.0" ]
null
null
null
''' Created on May 29, 2013 @author: vieglais Provides SQLAlchemy ORM models for simple representation of object formats and system metadata in a relational database. Note that this does not provide a full decomposition of the system metadata. The primary goals are to support an updateable local cache of system meta...
29.392857
82
0.627306
''' Created on May 29, 2013 @author: vieglais Provides SQLAlchemy ORM models for simple representation of object formats and system metadata in a relational database. Note that this does not provide a full decomposition of the system metadata. The primary goals are to support an updateable local cache of system meta...
false
true
1c355c32ed7f483f2ec6556256cbeccaa11ab0bf
1,488
py
Python
python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext_with_fuse_all_reduce_cpu.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
11
2016-08-29T07:43:26.000Z
2016-08-29T07:51:24.000Z
python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext_with_fuse_all_reduce_cpu.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext_with_fuse_all_reduce_cpu.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
1
2021-12-09T08:59:17.000Z
2021-12-09T08:59:17.000Z
# Copyright (c) 2019 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 appli...
36.292683
74
0.731855
from __future__ import print_function import paddle.fluid as fluid fluid.core._set_fuse_parameter_group_size(3) fluid.core._set_fuse_parameter_memory_size(131072) import unittest import seresnext_net from seresnext_test_base import TestResnetBase, DeviceType from functools import partial class TestRes...
true
true
1c355c88e357d81dc7fa2ee4552113bcf39d70b6
264
py
Python
application/docs/views.py
meshack-mbuvi/ride-my-way-api
2e091f020e774cad4891427a2de91a7a2c29def1
[ "MIT" ]
null
null
null
application/docs/views.py
meshack-mbuvi/ride-my-way-api
2e091f020e774cad4891427a2de91a7a2c29def1
[ "MIT" ]
19
2018-06-23T17:08:37.000Z
2018-07-23T17:37:55.000Z
application/docs/views.py
meshack-mbuvi/ride-my-way-api
2e091f020e774cad4891427a2de91a7a2c29def1
[ "MIT" ]
null
null
null
from flask import Blueprint, render_template docs = Blueprint('docs', __name__, static_folder='static', template_folder='templates') @docs.route('/api/v1/docs') def index(): "Show an index template" return render_template('docs.html')
22
58
0.685606
from flask import Blueprint, render_template docs = Blueprint('docs', __name__, static_folder='static', template_folder='templates') @docs.route('/api/v1/docs') def index(): return render_template('docs.html')
true
true
1c355f1ba7b5ff636b60f1fae401e09fa7f4783c
2,938
py
Python
lambda/s3trigger.py
CurryEleison/lambda-metrics
0954273a1aec0f8c8ea867383e33a9acc9c785cf
[ "MIT" ]
null
null
null
lambda/s3trigger.py
CurryEleison/lambda-metrics
0954273a1aec0f8c8ea867383e33a9acc9c785cf
[ "MIT" ]
null
null
null
lambda/s3trigger.py
CurryEleison/lambda-metrics
0954273a1aec0f8c8ea867383e33a9acc9c785cf
[ "MIT" ]
null
null
null
import boto3 import numpy as np import logging import pandas as pd import datetime from AwsElbLogUtil import LogDataFrame from CloudWatchUtil import CustomMetricSender logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def send_random(event, context): data = np.random.randn(5) logging.info(d...
51.54386
208
0.465623
import boto3 import numpy as np import logging import pandas as pd import datetime from AwsElbLogUtil import LogDataFrame from CloudWatchUtil import CustomMetricSender logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def send_random(event, context): data = np.random.randn(5) logging.info(d...
true
true
1c355f6286858803c3e1246758b476717339cf14
270,565
py
Python
cinder/db/sqlalchemy/api.py
elastx/cinder
00519aef92258275b68b78355734cda31c354839
[ "Apache-2.0" ]
3
2015-04-02T21:44:36.000Z
2016-04-29T21:19:04.000Z
cinder/db/sqlalchemy/api.py
elastx/cinder
00519aef92258275b68b78355734cda31c354839
[ "Apache-2.0" ]
3
2016-04-29T21:45:26.000Z
2016-05-04T19:41:23.000Z
cinder/db/sqlalchemy/api.py
elastx/cinder
00519aef92258275b68b78355734cda31c354839
[ "Apache-2.0" ]
4
2016-01-27T00:25:52.000Z
2021-03-25T19:54:08.000Z
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2014 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
37.058622
79
0.626855
import collections from collections import abc import datetime as dt import functools import itertools import re import sys import uuid from oslo_config import cfg from oslo_db import api as oslo_db_api from oslo_db import exception as db_exc from oslo_db import options from oslo_db.sqlalchemy impor...
true
true
1c355fb927a239cc73cf7a4f7868e0075f4fe900
3,445
py
Python
baselines/DT.py
skully-coder/COVID-19_TLSTM
7ae6b3e1d8edbcb593b1c5f70001e075b7d29c0f
[ "MIT" ]
null
null
null
baselines/DT.py
skully-coder/COVID-19_TLSTM
7ae6b3e1d8edbcb593b1c5f70001e075b7d29c0f
[ "MIT" ]
null
null
null
baselines/DT.py
skully-coder/COVID-19_TLSTM
7ae6b3e1d8edbcb593b1c5f70001e075b7d29c0f
[ "MIT" ]
null
null
null
from math import log import operator import pickle import numpy as np def load_pkl(path): with open(path, 'rb') as f: obj = pickle.load(f) return obj def calcShannonEnt(dataSet): numEntries = len(dataSet) labelCounts = {} for featVec in dataSet: currentLabel = featVec[-1] ...
29.956522
88
0.65283
from math import log import operator import pickle import numpy as np def load_pkl(path): with open(path, 'rb') as f: obj = pickle.load(f) return obj def calcShannonEnt(dataSet): numEntries = len(dataSet) labelCounts = {} for featVec in dataSet: currentLabel = featVec[-1] ...
true
true
1c35605295ad86b98f91e271e63a15929fccf02a
146
py
Python
python/1060.py
josevictorp81/Uri-questions-solutions
99e9bacb088ce59f58fb05531bb02f2fcffe26eb
[ "MIT" ]
3
2019-09-24T00:15:47.000Z
2019-09-25T02:52:27.000Z
python/1060.py
josevictorp81/Uri-questions-solutions
99e9bacb088ce59f58fb05531bb02f2fcffe26eb
[ "MIT" ]
1
2021-03-16T00:16:11.000Z
2021-03-16T00:16:11.000Z
python/1060.py
josevictorp81/Uri-questions-solutions
99e9bacb088ce59f58fb05531bb02f2fcffe26eb
[ "MIT" ]
4
2019-10-19T12:56:03.000Z
2019-10-23T23:24:06.000Z
positivos = 0 for i in range(6): num = float(input()) if num > 0: positivos += 1 print('{} valores positivos'.format(positivos))
18.25
47
0.59589
positivos = 0 for i in range(6): num = float(input()) if num > 0: positivos += 1 print('{} valores positivos'.format(positivos))
true
true
1c356055f04e858ea20a24787b214e11e6a0e77c
2,668
py
Python
src/you_get/extractors/toutiao.py
adger-me/you-get
b32741ad8e57b3a02a1006d27e87eb5b879f1c90
[ "MIT" ]
46,956
2015-01-01T08:48:41.000Z
2022-03-31T13:38:03.000Z
src/you_get/extractors/toutiao.py
adger-me/you-get
b32741ad8e57b3a02a1006d27e87eb5b879f1c90
[ "MIT" ]
2,477
2015-01-02T18:12:33.000Z
2022-03-31T10:44:24.000Z
src/you_get/extractors/toutiao.py
adger-me/you-get
b32741ad8e57b3a02a1006d27e87eb5b879f1c90
[ "MIT" ]
10,750
2015-01-03T01:33:16.000Z
2022-03-31T06:36:28.000Z
#!/usr/bin/env python import binascii import random from json import loads from urllib.parse import urlparse from ..common import * try: from base64 import decodebytes except ImportError: from base64 import decodestring decodebytes = decodestring __all__ = ['toutiao_download', ] def random_with_n_digi...
30.666667
118
0.622939
import binascii import random from json import loads from urllib.parse import urlparse from ..common import * try: from base64 import decodebytes except ImportError: from base64 import decodestring decodebytes = decodestring __all__ = ['toutiao_download', ] def random_with_n_digits(n): return ran...
true
true
1c3561068eda230b12b956d0a336505c8afd6252
4,758
py
Python
landlab/ca/little_ca_test.py
awickert/landlab
496de56717a5877db96f354a1b1285bfabe8b56f
[ "MIT" ]
1
2015-08-17T19:29:50.000Z
2015-08-17T19:29:50.000Z
landlab/ca/little_ca_test.py
awickert/landlab
496de56717a5877db96f354a1b1285bfabe8b56f
[ "MIT" ]
1
2018-04-07T08:24:56.000Z
2018-04-07T13:52:03.000Z
landlab/ca/little_ca_test.py
awickert/landlab
496de56717a5877db96f354a1b1285bfabe8b56f
[ "MIT" ]
2
2017-07-03T20:21:13.000Z
2018-09-06T23:58:19.000Z
#!/usr/env/python """Test the creation and execution of a CellLab-CTS model. Tests the creation and execution of a CellLab-CTS model, by creating a simple two-state CA on a small grid. Created by Greg Tucker, May 2015 """ from __future__ import print_function import time from landlab import RasterModelGrid from land...
33.507042
78
0.617276
from __future__ import print_function import time from landlab import RasterModelGrid from landlab.ca.celllab_cts import Transition, CAPlotter from landlab.ca.raster_cts import RasterCTS def setup_transition_list(): xn_list = [] xn_list.append(Transition((0, 0, ...
true
true
1c356129c86245e6d6b2a1086167507fd3b53e4d
5,010
py
Python
src/engine/SCons/Tool/suncxx.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
1
2020-03-21T05:24:47.000Z
2020-03-21T05:24:47.000Z
src/engine/SCons/Tool/suncxx.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
3
2019-01-15T20:40:02.000Z
2021-02-13T03:16:34.000Z
src/engine/SCons/Tool/suncxx.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
1
2021-08-04T12:32:39.000Z
2021-08-04T12:32:39.000Z
"""SCons.Tool.sunc++ Tool-specific initialization for C++ on SunOS / Solaris. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person...
31.708861
82
0.622156
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import SCons import os import re import subprocess import SCons.Tool.cxx cplusplus = SCons.Tool.cxx package_info = {} def get_package_info(package_name, pkginfo, pkgchk): try: return package_info[package_name] e...
true
true
1c3561e7b874b6135c54fef21f4e3e4264ca964d
844
py
Python
example/tests/test_generic_validation.py
sha016/django-rest-framework-json-api
c4337f15f59811c4e72f33cf6eb3a4667cb4b197
[ "BSD-2-Clause" ]
1,011
2015-07-23T00:39:13.000Z
2022-03-25T11:05:08.000Z
example/tests/test_generic_validation.py
sha016/django-rest-framework-json-api
c4337f15f59811c4e72f33cf6eb3a4667cb4b197
[ "BSD-2-Clause" ]
819
2015-07-21T13:43:30.000Z
2022-03-20T22:01:51.000Z
example/tests/test_generic_validation.py
sha016/django-rest-framework-json-api
c4337f15f59811c4e72f33cf6eb3a4667cb4b197
[ "BSD-2-Clause" ]
345
2015-07-21T14:29:26.000Z
2022-03-22T03:25:04.000Z
from django.urls import reverse from example.tests import TestBase class GenericValidationTest(TestBase): """ Test that a non serializer specific validation can be thrown and formatted """ def setUp(self): super().setUp() self.url = reverse("user-validation", kwargs={"pk": self.miles...
24.823529
78
0.513033
from django.urls import reverse from example.tests import TestBase class GenericValidationTest(TestBase): def setUp(self): super().setUp() self.url = reverse("user-validation", kwargs={"pk": self.miles.pk}) def test_generic_validation_error(self): response = self.client.get(self.url...
true
true
1c35621a48378e7e3a0b61da50a1d27e81d7655e
701
py
Python
migrations/versions/53ceac12ff90_.py
excalibur1987/team-management
ed6dfaf83280dad947edb31b404680d6083d7e62
[ "MIT" ]
1
2021-06-05T16:18:10.000Z
2021-06-05T16:18:10.000Z
migrations/versions/53ceac12ff90_.py
excalibur1987/flask-api-backend-boilerplate
3f0933599f12b9632a3fc697eb3dde534ec93ce1
[ "MIT" ]
null
null
null
migrations/versions/53ceac12ff90_.py
excalibur1987/flask-api-backend-boilerplate
3f0933599f12b9632a3fc697eb3dde534ec93ce1
[ "MIT" ]
null
null
null
"""empty message Revision ID: 53ceac12ff90 Revises: 516ff6933e39 Create Date: 2021-05-09 13:37:35.869550 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "53ceac12ff90" down_revision = "ff1d1d2b820d" branch_labels = None depends_on = None def upgrade(): # #...
22.612903
81
0.673324
import sqlalchemy as sa from alembic import op revision = "53ceac12ff90" down_revision = "ff1d1d2b820d" branch_labels = None depends_on = None def upgrade():
true
true
1c3562ada2bdfb7e4f0e742bb9c9d2cbc170b385
6,163
py
Python
third_party/catapult/telemetry/telemetry/internal/browser/browser_finder.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/catapult/telemetry/telemetry/internal/browser/browser_finder.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/catapult/telemetry/telemetry/internal/browser/browser_finder.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright 2012 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. """Finds browsers that can be controlled by telemetry.""" import logging from telemetry import decorators from telemetry.internal.backends.chrome import an...
34.238889
78
0.730651
import logging from telemetry import decorators from telemetry.internal.backends.chrome import android_browser_finder from telemetry.internal.backends.chrome import cros_browser_finder from telemetry.internal.backends.chrome import desktop_browser_finder from telemetry.internal.browser import browser_finder_excep...
true
true
1c35643725c62acf5a6e83ad13f91afbf70ad8f1
141,514
py
Python
black.py
springstan/black
4b449e7471c31ae2d3a890510322c40594cacc8f
[ "MIT" ]
1
2019-12-04T02:19:18.000Z
2019-12-04T02:19:18.000Z
black.py
springstan/black
4b449e7471c31ae2d3a890510322c40594cacc8f
[ "MIT" ]
2
2021-02-02T22:55:26.000Z
2021-06-02T02:26:29.000Z
black.py
springstan/black
4b449e7471c31ae2d3a890510322c40594cacc8f
[ "MIT" ]
null
null
null
import ast import asyncio from concurrent.futures import Executor, ProcessPoolExecutor from contextlib import contextmanager from datetime import datetime from enum import Enum from functools import lru_cache, partial, wraps import io import itertools import logging from multiprocessing import Manager, freeze_support i...
33.952495
122
0.608639
import ast import asyncio from concurrent.futures import Executor, ProcessPoolExecutor from contextlib import contextmanager from datetime import datetime from enum import Enum from functools import lru_cache, partial, wraps import io import itertools import logging from multiprocessing import Manager, freeze_support i...
true
true
1c3564422d77b03205d0fe05c2c1da9dd9d93280
2,096
py
Python
gcepub.py
litebook/litebook
3e0fc6daa62a4782a4a1103fe41b9bc56e677e00
[ "Python-2.0" ]
20
2015-01-27T04:50:16.000Z
2019-12-09T02:23:15.000Z
gcepub.py
litebook/litebook
3e0fc6daa62a4782a4a1103fe41b9bc56e677e00
[ "Python-2.0" ]
1
2020-11-26T04:10:27.000Z
2021-01-03T22:36:12.000Z
gcepub.py
hujun-open/litebook
3e0fc6daa62a4782a4a1103fe41b9bc56e677e00
[ "Python-2.0" ]
2
2017-05-09T06:56:00.000Z
2020-11-20T15:23:16.000Z
#------------------------------------------------------------------------------- # Name: gcepub # Purpose: extract the catalog from epub string # # Author: Hu Jun # # Created: 29/01/2011 # Copyright: (c) Hu Jun 2011 # Licence: Apache2 #------------------------------------------------...
27.946667
106
0.532443
import xml.parsers.expat import re import HTMLParser class GCEPUB: def __init__(self,instr): self.ecount=0 self.start_e=False self.rlist={} self.start_txt=False self.cur_txt='' self.cur_url='' self.instr=instr self.Pars...
false
true
1c3566a8da172b2be984d3cd544181a39dcaeebe
4,256
py
Python
azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/express_route_service_providers_operations.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/express_route_service_providers_operations.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/express_route_service_providers_operations.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
41.320388
148
0.645207
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from .. import models class ExpressRouteServiceProvidersOperations(object): models = models def __init__(self, client, config, serializer, deserializer): self._client = client ...
true
true
1c3567fa76301f500220e63d1bfa3d3d32bc4fe7
797
py
Python
build/common.py
iguoyr/chaos-mesh
13590d3494d7686a43ae5d52c2902fcbb7acb81a
[ "Apache-2.0" ]
null
null
null
build/common.py
iguoyr/chaos-mesh
13590d3494d7686a43ae5d52c2902fcbb7acb81a
[ "Apache-2.0" ]
null
null
null
build/common.py
iguoyr/chaos-mesh
13590d3494d7686a43ae5d52c2902fcbb7acb81a
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Chaos Mesh 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 agreed to in writi...
26.566667
74
0.720201
export_env_variables = [ "HTTP_PROXY", "HTTPS_PROXY", "GOPROXY", "UI", "LDFLAGS", "CRATES_MIRROR", "GO_BUILD_CACHE", "LDFLAGS", ]
true
true
1c356b10ccbb315212dfd39936b221fd2442f8f8
1,306
py
Python
aiotdlib/api/functions/get_chat_notification_settings_exceptions.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
37
2021-05-04T10:41:41.000Z
2022-03-30T13:48:05.000Z
aiotdlib/api/functions/get_chat_notification_settings_exceptions.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
13
2021-07-17T19:54:51.000Z
2022-02-26T06:50:00.000Z
aiotdlib/api/functions/get_chat_notification_settings_exceptions.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
7
2021-09-22T21:27:11.000Z
2022-02-20T02:33:19.000Z
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # ...
39.575758
117
0.556662
from __future__ import annotations from pydantic import Field from ..base_object import BaseObject from ..types import NotificationSettingsScope class GetChatNotificationSettingsExceptions(BaseObject): ID: str = Field("getChatNotificationSettingsExceptions", alias="@type") scope: NotificationSettingsScope ...
true
true
1c356edfccab0f3d653cbb144107522f8b7422ce
11,954
py
Python
qa/rpc-tests/p2p-acceptblock.py
josephsalimin/dogecoin
0ca38088628e2f9385776fc0ea52234f86a8a5e9
[ "MIT" ]
3
2021-05-15T15:30:40.000Z
2021-05-15T15:30:50.000Z
qa/rpc-tests/p2p-acceptblock.py
josephsalimin/dogecoin
0ca38088628e2f9385776fc0ea52234f86a8a5e9
[ "MIT" ]
1
2021-05-22T13:52:29.000Z
2021-05-22T14:05:23.000Z
qa/rpc-tests/p2p-acceptblock.py
josephsalimin/garudacoin
0ca38088628e2f9385776fc0ea52234f86a8a5e9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-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. from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from...
42.692857
107
0.657771
from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import time from test_framework.blocktools import create_block, create_coinbase class TestNode(NodeConnCB): def __init__(self): NodeConnCB.__init__(self) se...
true
true
1c356f9f653fa9074e5403e150307fe4402f031b
2,463
py
Python
home/wasa/.config/ranger/colorschemes/black.py
wasamasa/dotfiles
bbbdfdef90ad96258fd91aa046d9c9a406ecd8ee
[ "Unlicense" ]
11
2016-01-01T16:36:54.000Z
2019-10-05T08:38:28.000Z
home/wasa/.config/ranger/colorschemes/black.py
wasamasa/dotfiles
bbbdfdef90ad96258fd91aa046d9c9a406ecd8ee
[ "Unlicense" ]
null
null
null
home/wasa/.config/ranger/colorschemes/black.py
wasamasa/dotfiles
bbbdfdef90ad96258fd91aa046d9c9a406ecd8ee
[ "Unlicense" ]
3
2017-07-27T15:32:00.000Z
2019-03-25T01:38:28.000Z
# Copyright (C) 2009, 2010, 2011 Roman Zimbelmann <romanz@lavabit.com> # This software is distributed under the terms of the GNU GPL version 3. from ranger.gui.colorscheme import ColorScheme from ranger.gui.color import * class Default(ColorScheme): progress_bar_color = black def use(self, context): fg, bg, att...
21.232759
72
0.642306
from ranger.gui.colorscheme import ColorScheme from ranger.gui.color import * class Default(ColorScheme): progress_bar_color = black def use(self, context): fg, bg, attr = default_colors if context.reset: return default_colors elif context.in_browser: if context.selected: attr = reverse else...
true
true
1c35710b2cef0d92c7de221b7f909da16e1b497c
2,889
py
Python
server.py
kurodenjiro/bert-extractive-summarizer-vietnamese
f316ca4eaf142dc306086d434d5bba31e1718131
[ "MIT" ]
27
2019-12-06T06:17:12.000Z
2022-02-08T02:57:22.000Z
server.py
nguyenhothanhtam/bert-extractive-summarizer-vietnamese
f316ca4eaf142dc306086d434d5bba31e1718131
[ "MIT" ]
1
2020-01-28T05:16:46.000Z
2020-03-12T09:05:47.000Z
server.py
nguyenhothanhtam/bert-extractive-summarizer-vietnamese
f316ca4eaf142dc306086d434d5bba31e1718131
[ "MIT" ]
11
2019-12-06T06:48:11.000Z
2021-07-12T02:45:40.000Z
from flask import Flask from flask import request, jsonify, abort, make_response from flask_cors import CORS import nltk nltk.download('punkt') from nltk import tokenize from typing import List import argparse from summarizer import Summarizer app = Flask(__name__) CORS(app) class Parser(object): def __init__(...
31.064516
114
0.628245
from flask import Flask from flask import request, jsonify, abort, make_response from flask_cors import CORS import nltk nltk.download('punkt') from nltk import tokenize from typing import List import argparse from summarizer import Summarizer app = Flask(__name__) CORS(app) class Parser(object): def __init__(...
true
true
1c35736839de6098a178f6638a6100d0d931d311
463
py
Python
data/scripts/templates/object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.iff" result.attr...
27.235294
89
0.734341
true
true
1c357403ff98f63e9f914ae91abc215018fb5b99
10,620
py
Python
lib/log/reader.py
kustodian/aerospike-admin
931ee55ccd65ba3e20e6611a0294c92b09e8cfcb
[ "Apache-2.0" ]
null
null
null
lib/log/reader.py
kustodian/aerospike-admin
931ee55ccd65ba3e20e6611a0294c92b09e8cfcb
[ "Apache-2.0" ]
null
null
null
lib/log/reader.py
kustodian/aerospike-admin
931ee55ccd65ba3e20e6611a0294c92b09e8cfcb
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-2018 Aerospike, 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 or agreed to in writ...
34.480519
221
0.512712
import datetime import re import time import logging from lib.utils.util import shell_command from lib.utils.constants import DT_FMT DT_TO_MINUTE_FMT = "%b %d %Y %H:%M" DT_TIME_FMT = "%H:%M:%S" DATE_SEG = 0 DATE_SEPARATOR = "-" YEAR = 0 MONTH = 1 DATE = 2 TIME_SEG = 1 TIME_SEPARATOR = ":" HH = 0 MM = 1...
true
true
1c3576cd54023c4cac8155d1c7efed0c38748869
8,443
py
Python
win32/bin/Lib/lib2to3/fixes/fix_metaclass.py
nmercier/linux-cross-gcc
a5b0028fd2b72ec036a4725e93ba29d73cb753a6
[ "BSD-3-Clause" ]
3
2015-10-31T10:39:25.000Z
2019-04-27T20:19:33.000Z
win32/bin/Lib/lib2to3/fixes/fix_metaclass.py
nmercier/linux-cross-gcc
a5b0028fd2b72ec036a4725e93ba29d73cb753a6
[ "BSD-3-Clause" ]
2
2016-12-12T05:54:58.000Z
2016-12-12T05:55:44.000Z
win32/bin/Lib/lib2to3/fixes/fix_metaclass.py
nmercier/linux-cross-gcc
a5b0028fd2b72ec036a4725e93ba29d73cb753a6
[ "BSD-3-Clause" ]
null
null
null
"""Fixer for __metaclass__ = X -> (metaclass=X) methods. The various forms of classef (inherits nothing, inherits once, inherints many) don't parse the same in the CST so we look at ALL classes for a __metaclass__ and if we find one normalize the inherits to all be an arglist. For one-liner clas...
36.868996
81
0.574559
from .. import fixer_base from ..pygram import token from ..fixer_util import Name, syms, Node, Leaf def has_metaclass(parent): for node in parent.children: if node.type == syms.suite: return has_metaclass(node) elif node.type == syms.simple_stmt and node.children: ...
true
true
1c3576f304149d2feb21fca90c610701e782e463
7,309
py
Python
protoflow/utils/data.py
theblackfly/protoflow
02a77e59f6afc8d462a738874d06eca810911166
[ "MIT" ]
3
2020-10-07T05:04:05.000Z
2021-02-10T15:04:55.000Z
protoflow/utils/data.py
theblackfly/protoflow
02a77e59f6afc8d462a738874d06eca810911166
[ "MIT" ]
5
2020-04-09T13:36:15.000Z
2020-12-17T16:30:50.000Z
protoflow/utils/data.py
theblackfly/protoflow
02a77e59f6afc8d462a738874d06eca810911166
[ "MIT" ]
2
2020-10-01T21:48:16.000Z
2021-04-10T18:20:25.000Z
"""ProtoFlow data utilities.""" import hashlib import os import shutil import tarfile import zipfile import requests import six from six.moves.urllib.error import HTTPError, URLError from tensorflow.python.keras.utils.io_utils import path_to_string from tqdm import tqdm def _extract_archive(file_path, path=".", arc...
33.072398
78
0.583801
import hashlib import os import shutil import tarfile import zipfile import requests import six from six.moves.urllib.error import HTTPError, URLError from tensorflow.python.keras.utils.io_utils import path_to_string from tqdm import tqdm def _extract_archive(file_path, path=".", archive_format="auto"): if arch...
true
true
1c35782b600897baf619499fe88cd4250bd51dd4
63
py
Python
test/test_interfaces.py
jiayiliu/gradio
6fa11437c09845322df3b47f732a924338d17862
[ "Apache-2.0" ]
5,481
2019-05-27T06:18:02.000Z
2022-03-31T20:33:43.000Z
test/test_interfaces.py
kanavanand/gradio
5eaa4b1e8b8971d1973b596b3d53aaa99739a07c
[ "Apache-2.0" ]
652
2019-06-18T20:16:03.000Z
2022-03-31T19:36:16.000Z
test/test_interfaces.py
kanavanand/gradio
5eaa4b1e8b8971d1973b596b3d53aaa99739a07c
[ "Apache-2.0" ]
366
2019-07-03T00:32:02.000Z
2022-03-31T11:32:01.000Z
import unittest if __name__ == '__main__': unittest.main()
15.75
26
0.698413
import unittest if __name__ == '__main__': unittest.main()
true
true
1c35792105a982e5498ceea5705f65e05efe0cc9
3,201
py
Python
samples/19.custom-dialogs/app.py
hangdong/botbuilder-python
8ff979a58fadc4356d76b9ce577f94da3245f664
[ "MIT" ]
null
null
null
samples/19.custom-dialogs/app.py
hangdong/botbuilder-python
8ff979a58fadc4356d76b9ce577f94da3245f664
[ "MIT" ]
null
null
null
samples/19.custom-dialogs/app.py
hangdong/botbuilder-python
8ff979a58fadc4356d76b9ce577f94da3245f664
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import asyncio import sys from datetime import datetime from flask import Flask, request, Response from botbuilder.core import ( BotFrameworkAdapter, BotFrameworkAdapterSettings, ConversationState, MemoryStor...
31.382353
88
0.707591
import asyncio import sys from datetime import datetime from flask import Flask, request, Response from botbuilder.core import ( BotFrameworkAdapter, BotFrameworkAdapterSettings, ConversationState, MemoryStorage, TurnContext, UserState, ) from botbuilder.schema import Activity, ActivityTypes...
true
true
1c35796495a6efe9aa4ee9bb6b30b875bd60a38d
21
py
Python
examples/__init__.py
krvss/graph-talk
b420bc5b57c7dc25008428bf7c0ebfcbebd61b72
[ "Apache-2.0" ]
null
null
null
examples/__init__.py
krvss/graph-talk
b420bc5b57c7dc25008428bf7c0ebfcbebd61b72
[ "Apache-2.0" ]
null
null
null
examples/__init__.py
krvss/graph-talk
b420bc5b57c7dc25008428bf7c0ebfcbebd61b72
[ "Apache-2.0" ]
1
2018-01-11T09:23:46.000Z
2018-01-11T09:23:46.000Z
__author__ = 'krvss'
10.5
20
0.714286
__author__ = 'krvss'
true
true
1c3579c52b094c65f1192091953fefc03b1d7d27
14,473
py
Python
airflow/providers/elasticsearch/log/es_task_handler.py
markhatch/airflow
1d170f899bcc87110e55192517270ec89d511ca8
[ "Apache-2.0" ]
null
null
null
airflow/providers/elasticsearch/log/es_task_handler.py
markhatch/airflow
1d170f899bcc87110e55192517270ec89d511ca8
[ "Apache-2.0" ]
null
null
null
airflow/providers/elasticsearch/log/es_task_handler.py
markhatch/airflow
1d170f899bcc87110e55192517270ec89d511ca8
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
39.116216
128
0.644994
import logging import sys from collections import defaultdict from datetime import datetime from operator import attrgetter from time import time from typing import List, Optional, Tuple, Union from urllib.parse import quote import elasticsearch import pendulum from elasticsearch_dsl import Search ...
true
true
1c357aaabd26ad1c9b7e06b63dbb6707448fb6a2
7,407
py
Python
src/plugins/EU_ZH/fetcher.py
johnharveymath/fetchers-python
c0049c2ea5731c850c5dbcf9602b51d7393a92f6
[ "Apache-2.0" ]
4
2020-04-03T16:20:08.000Z
2020-07-06T10:16:44.000Z
src/plugins/EU_ZH/fetcher.py
johnharveymath/fetchers-python
c0049c2ea5731c850c5dbcf9602b51d7393a92f6
[ "Apache-2.0" ]
15
2020-04-28T19:47:58.000Z
2020-10-20T12:18:59.000Z
src/plugins/EU_ZH/fetcher.py
yuewu57/fetchers-python
1f5fc7b64f43142991ad0d901b0840b3e8ef1382
[ "Apache-2.0" ]
26
2020-03-31T13:14:50.000Z
2021-06-23T21:02:54.000Z
# Copyright (C) 2020 University of Oxford # # 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 t...
43.828402
158
0.622924
import logging import pandas as pd import os import sys __all__ = ('EU_ZH_Fetcher',) from utils.fetcher.base_epidemiology import BaseEpidemiologyFetcher logger = logging.getLogger(__name__) class EU_ZH_Fetcher(BaseEpidemiologyFetcher): LOAD_PLUGIN = True SOURCE = 'EU_ZH' def fetch(self,...
true
true
1c357c2992598df82ed165439dc034969fe00854
4,343
py
Python
messente_api/models/statistics_report_success.py
messente/messente-api-python
154abca9e6a226a5c97d8052c3f2631765503426
[ "Apache-2.0" ]
null
null
null
messente_api/models/statistics_report_success.py
messente/messente-api-python
154abca9e6a226a5c97d8052c3f2631765503426
[ "Apache-2.0" ]
null
null
null
messente_api/models/statistics_report_success.py
messente/messente-api-python
154abca9e6a226a5c97d8052c3f2631765503426
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Messente API [Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure yo...
32.654135
473
0.606954
import inspect import pprint import re import six from messente_api.configuration import Configuration class StatisticsReportSuccess(object): openapi_types = { 'reports': 'list[StatisticsReport]' } attribute_map = { 'reports': 'reports' } def __init__(self, reports=None, ...
true
true
1c357c6fa74d5dc80c0005bc82d8ce47b5068ddd
612,712
py
Python
python/paddle/fluid/layers/nn.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
2
2021-11-12T11:31:12.000Z
2021-12-05T10:30:28.000Z
python/paddle/fluid/layers/nn.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/layers/nn.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
1
2021-10-09T10:57:17.000Z
2021-10-09T10:57:17.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
39.662869
946
0.577482
from __future__ import print_function import os import inspect import warnings import numpy as np import six import paddle from ..layer_helper import LayerHelper from ..initializer import Normal, Constant, NumpyArrayInitializer from ..framework import Variable, OpProtoHolder, in_dygraph_mode, dygraph_on...
true
true
1c357d3712292b01ee95a5bca2342315acb4f8ef
623
py
Python
dojo/db_migrations/0147_rename_sslyze_parser.py
dant24/django-DefectDojo
caf5c91b3f8870d5f466dfaaf5a3a096f8812ad9
[ "BSD-3-Clause" ]
249
2016-09-06T21:04:40.000Z
2018-01-19T15:59:44.000Z
dojo/db_migrations/0147_rename_sslyze_parser.py
dant24/django-DefectDojo
caf5c91b3f8870d5f466dfaaf5a3a096f8812ad9
[ "BSD-3-Clause" ]
255
2016-09-06T21:36:37.000Z
2018-01-19T19:57:57.000Z
dojo/db_migrations/0147_rename_sslyze_parser.py
dant24/django-DefectDojo
caf5c91b3f8870d5f466dfaaf5a3a096f8812ad9
[ "BSD-3-Clause" ]
152
2016-09-06T21:04:54.000Z
2018-01-18T08:52:24.000Z
from django.db import migrations def rename_sslyze_parser(apps, schema_editor): Test_Type_model = apps.get_model('dojo', 'Test_Type') try: test_type_sslyze = Test_Type_model.objects.get(name='SSLyze 3 Scan (JSON)') test_type_sslyze.name = 'SSLyze Scan (JSON)' test_type_sslyze.save() ...
25.958333
83
0.678973
from django.db import migrations def rename_sslyze_parser(apps, schema_editor): Test_Type_model = apps.get_model('dojo', 'Test_Type') try: test_type_sslyze = Test_Type_model.objects.get(name='SSLyze 3 Scan (JSON)') test_type_sslyze.name = 'SSLyze Scan (JSON)' test_type_sslyze.save() ...
true
true
1c357d50e73856ed1bfaef590c993ed6007d7fe2
618
py
Python
opencv_detector.py
MingyaoLiu/Jetson-Nano-Projects
45f82ec7e5b99eab9e0bd6cae190cbf453cfe766
[ "MIT" ]
1
2019-04-20T21:55:05.000Z
2019-04-20T21:55:05.000Z
opencv_detector.py
MingyaoLiu/Jetson-Nano-Projects
45f82ec7e5b99eab9e0bd6cae190cbf453cfe766
[ "MIT" ]
3
2020-11-27T16:27:22.000Z
2021-04-06T17:53:28.000Z
opencv_detector.py
MingyaoLiu/Jetson-Nano-Projects
45f82ec7e5b99eab9e0bd6cae190cbf453cfe766
[ "MIT" ]
null
null
null
import numpy as np import cv2 as cv face_cascade = cv.CascadeClassifier('1.xml') eye_cascade = cv.CascadeClassifier('1.xml') img = cv.imread('1.jpeg') gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray, 1.3, 5) for (x, y, w, h) in faces: cv.rectangle(img, (x, y), (x+w, y+h), (25...
30.9
73
0.645631
import numpy as np import cv2 as cv face_cascade = cv.CascadeClassifier('1.xml') eye_cascade = cv.CascadeClassifier('1.xml') img = cv.imread('1.jpeg') gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray, 1.3, 5) for (x, y, w, h) in faces: cv.rectangle(img, (x, y), (x+w, y+h), (25...
true
true
1c357d575a08ef8dd6defe03e0126b0442f5c31b
3,410
py
Python
pyMSpec/test/test_mass_spectrum.py
SpatialMetabolomics/pyMS
52c4dce2c4c0eba3c6d447565f3296252f882f9e
[ "Apache-2.0" ]
5
2017-12-18T06:03:51.000Z
2019-04-05T21:12:54.000Z
pyMSpec/test/test_mass_spectrum.py
alexandrovteam/pyMS
52c4dce2c4c0eba3c6d447565f3296252f882f9e
[ "Apache-2.0" ]
null
null
null
pyMSpec/test/test_mass_spectrum.py
alexandrovteam/pyMS
52c4dce2c4c0eba3c6d447565f3296252f882f9e
[ "Apache-2.0" ]
3
2018-10-23T13:13:19.000Z
2021-02-22T09:19:26.000Z
""" Created on 27.08.2015 @author: Dominik Fay """ import unittest import numpy from numpy.ma.testutils import assert_array_equal from .. import mass_spectrum class MassSpectrumTest(unittest.TestCase): def test_init(self): """Check that spectrum is empty on initialization.""" ms = mass_spectrum...
36.276596
110
0.66217
import unittest import numpy from numpy.ma.testutils import assert_array_equal from .. import mass_spectrum class MassSpectrumTest(unittest.TestCase): def test_init(self): ms = mass_spectrum.MassSpectrum() mzs, ints = ms.get_spectrum() assert_array_equal([], mzs) assert_array_equ...
true
true
1c357dafad42d78510fe46f36e8b335ca5dd5326
4,748
py
Python
rose-blend/tests/test.py
exjam/rose-tools
bcc642b914696381082248b639f29299d17d8282
[ "MIT" ]
11
2018-02-09T04:25:07.000Z
2021-08-08T03:09:02.000Z
rose-blend/tests/test.py
wjsassi/rose-tools
31b5316e28c6fb0add6daa84d3d05eff516d6a8f
[ "MIT" ]
1
2021-04-21T03:09:43.000Z
2021-04-21T03:09:43.000Z
rose-blend/tests/test.py
wjsassi/rose-tools
31b5316e28c6fb0add6daa84d3d05eff516d6a8f
[ "MIT" ]
7
2018-07-08T20:35:15.000Z
2022-03-01T22:49:39.000Z
import os import sys import unittest DIR = os.path.abspath(os.path.dirname(__file__)) ROOT_DIR = os.path.dirname(DIR) DATA_DIR = os.path.join(DIR, "data") # Manually manipulate path so avoid `bpy` imports in `io_rose` module sys.path.append(os.path.join(ROOT_DIR, "io_rose")) from rose.him import * from rose.til impo...
35.17037
69
0.644693
import os import sys import unittest DIR = os.path.abspath(os.path.dirname(__file__)) ROOT_DIR = os.path.dirname(DIR) DATA_DIR = os.path.join(DIR, "data") sys.path.append(os.path.join(ROOT_DIR, "io_rose")) from rose.him import * from rose.til import * from rose.zmd import * from rose.zms import * from rose.zon impo...
true
true
1c357db9b0173d6e6f11b16fa2da985d60fb859e
94,502
py
Python
integration_test/util.py
lynix94/nbase-arc
4de3c20ebd2f5ed13ab83dbc6a608f44e812ca78
[ "Apache-2.0" ]
176
2015-12-30T08:44:30.000Z
2022-03-15T08:10:39.000Z
integration_test/util.py
lynix94/nbase-arc
4de3c20ebd2f5ed13ab83dbc6a608f44e812ca78
[ "Apache-2.0" ]
35
2016-03-24T08:29:51.000Z
2021-12-09T20:06:39.000Z
integration_test/util.py
lynix94/nbase-arc
4de3c20ebd2f5ed13ab83dbc6a608f44e812ca78
[ "Apache-2.0" ]
65
2015-12-30T09:05:13.000Z
2022-03-15T08:10:43.000Z
# # Copyright 2015 Naver Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
30.357212
186
0.583173
import os import subprocess import stat import config import constant as c import telnetlib import socket import random import signal import smr_mgmt import redis_mgmt import gateway_mgmt import sys import time import datetime import telnet import json import inspect import testbase import load_generato...
false
true
1c3580ad808a99cdfced82b0c66ab16a489c9b1f
1,548
py
Python
diff_movie.py
benmontet/K2-noise
a4b682cdf33f85d2dffc4cef115dcedacfccb4b4
[ "MIT" ]
1
2019-05-15T09:14:15.000Z
2019-05-15T09:14:15.000Z
diff_movie.py
benmontet/K2-noise
a4b682cdf33f85d2dffc4cef115dcedacfccb4b4
[ "MIT" ]
null
null
null
diff_movie.py
benmontet/K2-noise
a4b682cdf33f85d2dffc4cef115dcedacfccb4b4
[ "MIT" ]
null
null
null
#Create a movie of the frames import numpy as np from utils_simple import TIME, FLUX, QUALITY import matplotlib.pyplot as plt from matplotlib.cm import get_cmap #Limit ourselves 10-40 for more detail FLUX = FLUX[:, 15:35, 15:35] time = TIME - 1860 diffs = np.diff(FLUX, axis=0) base = "frames/{:0>3d}.png" bin = ge...
29.207547
102
0.656977
import numpy as np from utils_simple import TIME, FLUX, QUALITY import matplotlib.pyplot as plt from matplotlib.cm import get_cmap FLUX = FLUX[:, 15:35, 15:35] time = TIME - 1860 diffs = np.diff(FLUX, axis=0) base = "frames/{:0>3d}.png" bin = get_cmap("binary") div = get_cmap("bwr") def update_qual(qual): ...
true
true
1c3580e2d29806b0375466fb2f8a062a91c33992
3,961
py
Python
dax/tests/unit_test_autoprocessor.py
DecisionNeurosciencePsychopathology/dax
4ae68d07128bc61058797f4f09a3a112f351ce21
[ "MIT" ]
28
2015-05-31T22:01:54.000Z
2022-01-14T12:18:48.000Z
dax/tests/unit_test_autoprocessor.py
DecisionNeurosciencePsychopathology/dax
4ae68d07128bc61058797f4f09a3a112f351ce21
[ "MIT" ]
218
2015-01-14T15:09:58.000Z
2022-03-30T17:03:46.000Z
dax/tests/unit_test_autoprocessor.py
DecisionNeurosciencePsychopathology/dax
4ae68d07128bc61058797f4f09a3a112f351ce21
[ "MIT" ]
26
2015-01-08T15:48:15.000Z
2022-01-31T14:58:34.000Z
from unittest import TestCase import io import yaml from dax.processors import AutoProcessor from dax.tests import unit_test_entity_common as common from dax import XnatUtils from dax import yaml_doc class ConnectionStringUnitTest(TestCase): def test_a_xpath(self): print((XnatUtils.InterfaceTemp.A_X...
34.745614
77
0.677102
from unittest import TestCase import io import yaml from dax.processors import AutoProcessor from dax.tests import unit_test_entity_common as common from dax import XnatUtils from dax import yaml_doc class ConnectionStringUnitTest(TestCase): def test_a_xpath(self): print((XnatUtils.InterfaceTemp.A_X...
true
true
1c35830de691ae2c04afec42015310a01c8779c4
1,345
py
Python
remindForApproval.py
Kratosc3/GittigidiyorEntegre
17f011cfec49b3adb2b05f1b3ea559c7a7495c29
[ "MIT" ]
null
null
null
remindForApproval.py
Kratosc3/GittigidiyorEntegre
17f011cfec49b3adb2b05f1b3ea559c7a7495c29
[ "MIT" ]
null
null
null
remindForApproval.py
Kratosc3/GittigidiyorEntegre
17f011cfec49b3adb2b05f1b3ea559c7a7495c29
[ "MIT" ]
null
null
null
from zeep import Client from zeep.transports import Transport from zeep import xsd from zeep import helpers import xmltodict import json class remindForApproval: def __init__(self,apiKey = '',sign = '',time = '',saleCode = 21321,lang = '',session = None): # Zeep Client client = Clie...
36.351351
189
0.596283
from zeep import Client from zeep.transports import Transport from zeep import xsd from zeep import helpers import xmltodict import json class remindForApproval: def __init__(self,apiKey = '',sign = '',time = '',saleCode = 21321,lang = '',session = None): client = Client(wsdl="https...
true
true
1c358366a8e6e839414c44203ddea07b6333090d
931
py
Python
21.dirac-dice/py/part2.py
rolandbernard/adventofcode-2021
9249815af62d0fcf79b71357330a1456ea3be1ed
[ "BSD-2-Clause" ]
null
null
null
21.dirac-dice/py/part2.py
rolandbernard/adventofcode-2021
9249815af62d0fcf79b71357330a1456ea3be1ed
[ "BSD-2-Clause" ]
null
null
null
21.dirac-dice/py/part2.py
rolandbernard/adventofcode-2021
9249815af62d0fcf79b71357330a1456ea3be1ed
[ "BSD-2-Clause" ]
null
null
null
import sys from collections import defaultdict from functools import cache pos = tuple(int(l[-1]) for l in sys.stdin.read().strip().split('\n')) prob = defaultdict(lambda: 0) for i in range(1, 4): for j in range(1, 4): for k in range(1, 4): prob[i + j + k] += 1 def applyStep(pos, points, pl...
25.861111
69
0.529538
import sys from collections import defaultdict from functools import cache pos = tuple(int(l[-1]) for l in sys.stdin.read().strip().split('\n')) prob = defaultdict(lambda: 0) for i in range(1, 4): for j in range(1, 4): for k in range(1, 4): prob[i + j + k] += 1 def applyStep(pos, points, pl...
true
true
1c35838db2784a1cadbfa55a5a2c5676e49f705e
7,527
py
Python
autolab_core/dual_quaternion.py
shivamvats/autolab_core
cda081d2e07e3fe6cc9f3e8c86eea92330910d20
[ "Apache-2.0" ]
68
2017-07-02T22:14:47.000Z
2022-03-30T19:09:37.000Z
autolab_core/dual_quaternion.py
shivamvats/autolab_core
cda081d2e07e3fe6cc9f3e8c86eea92330910d20
[ "Apache-2.0" ]
14
2017-06-29T18:27:12.000Z
2022-02-02T20:59:02.000Z
autolab_core/dual_quaternion.py
shivamvats/autolab_core
cda081d2e07e3fe6cc9f3e8c86eea92330910d20
[ "Apache-2.0" ]
35
2017-07-17T01:44:59.000Z
2022-03-30T19:09:28.000Z
""" Class to handle dual quaternions and their interpolations Implementation details inspired by Ben Kenwright's "A Beginners Guide to Dual-Quaternions" http://cs.gmu.edu/~jmlien/teaching/cs451/uploads/Main/dual-quaternion.pdf Author: Jacky Liang """ from numbers import Number import numpy as np from .transformations ...
29.402344
86
0.57048
from numbers import Number import numpy as np from .transformations import quaternion_multiply, quaternion_conjugate class DualQuaternion(object): def __init__( self, qr=[1, 0, 0, 0], qd=[0, 0, 0, 0], enforce_unit_norm=True ): self.qr = qr self.qd = qd if enforce_unit_norm: ...
true
true
1c3583babedf94c5ecb7f0ee8b82f2f755e2da54
9,608
py
Python
pyslam/feature_r2d2.py
dysdsyd/VO_benchmark
a7602edab934419c1ec73618ee655e18026f834f
[ "Apache-2.0" ]
2
2021-09-11T09:13:31.000Z
2021-11-03T01:39:56.000Z
pyslam/feature_r2d2.py
dysdsyd/VO_benchmark
a7602edab934419c1ec73618ee655e18026f834f
[ "Apache-2.0" ]
null
null
null
pyslam/feature_r2d2.py
dysdsyd/VO_benchmark
a7602edab934419c1ec73618ee655e18026f834f
[ "Apache-2.0" ]
null
null
null
""" * This file is part of PYSLAM. * Adapted from https://raw.githubusercontent.com/naver/r2d2/master/extract.py, see the licence therein. * * Copyright (C) 2016-present Luigi Freda <luigi dot freda at gmail dot com> * * PYSLAM is free software: you can redistribute it and/or modify * it under the terms of the GNU ...
36.393939
146
0.560262
import config config.cfg.set_lib('r2d2') import os, pdb from PIL import Image import numpy as np import torch import cv2 from threading import RLock from r2d2.tools import common from r2d2.tools.dataloader import norm_RGB from r2d2.nets.patchnet import * import argparse from utils_sys import Printer kVerbos...
true
true
1c3584d9e2de243024676c411867a89907337846
642
py
Python
tmc/ui/prompt.py
jgke/tmc.py
a061d199ecce0274c1fa554fb065e13647d9862b
[ "MIT" ]
null
null
null
tmc/ui/prompt.py
jgke/tmc.py
a061d199ecce0274c1fa554fb065e13647d9862b
[ "MIT" ]
null
null
null
tmc/ui/prompt.py
jgke/tmc.py
a061d199ecce0274c1fa554fb065e13647d9862b
[ "MIT" ]
null
null
null
def yn_prompt(msg, default=True): """ Prompts the user for yes or no. """ ret = custom_prompt(msg, ["y", "n"], "y" if default else "n") if ret == "y": return True return False def custom_prompt(msg, options, default): """ Prompts the user with custom options. """ format...
25.68
72
0.563863
def yn_prompt(msg, default=True): ret = custom_prompt(msg, ["y", "n"], "y" if default else "n") if ret == "y": return True return False def custom_prompt(msg, options, default): formatted_options = [ x.upper() if x == default else x.lower() for x in options ] sure = input("{0} ...
true
true
1c3585df2004cca2bbaff017c9833ed1e71eb017
4,903
py
Python
tensorflow/compiler/tests/extract_image_patches_op_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/compiler/tests/extract_image_patches_op_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/compiler/tests/extract_image_patches_op_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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...
32.686667
81
0.562309
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.compiler.tests import xla_test from tensorflow.python.framework import dtypes from tensorflow.python.ops import array_ops from tensorflow.python.plat...
true
true
1c35865c5c84b4c27bfc95f86f6862f0433e9a24
6,387
py
Python
ludwig/utils/loss_utils.py
ludwig-ai/ludw
b9d95bbdb474bc22260269de1bc094bc5455f37c
[ "Apache-2.0" ]
970
2020-12-17T15:09:20.000Z
2022-03-31T22:58:03.000Z
ludwig/utils/loss_utils.py
ludwig-ai/ludw
b9d95bbdb474bc22260269de1bc094bc5455f37c
[ "Apache-2.0" ]
503
2020-12-16T21:44:40.000Z
2022-03-31T18:21:52.000Z
ludwig/utils/loss_utils.py
ludwig-ai/ludw
b9d95bbdb474bc22260269de1bc094bc5455f37c
[ "Apache-2.0" ]
145
2020-12-18T07:38:30.000Z
2022-03-29T19:05:08.000Z
import torch def rmspe_loss(targets: torch.Tensor, predictions: torch.Tensor) -> torch.Tensor: """Root mean square percentage error.""" loss = torch.sqrt(torch.mean(((targets - predictions).float() / targets) ** 2)) return loss def mean_confidence_penalty(probabilities: torch.Tensor, num_classes: int) -...
31.776119
106
0.60811
import torch def rmspe_loss(targets: torch.Tensor, predictions: torch.Tensor) -> torch.Tensor: loss = torch.sqrt(torch.mean(((targets - predictions).float() / targets) ** 2)) return loss def mean_confidence_penalty(probabilities: torch.Tensor, num_classes: int) -> torch.Tensor: max_entropy = torch.log(t...
true
true
1c3586bf286862eddfc75f853f4893e56deed7fb
6,750
py
Python
robit/core/cron.py
stratusadv/robit
7e0414d0ed3d98bb2c9a8785bf36961ac08f1d27
[ "MIT" ]
null
null
null
robit/core/cron.py
stratusadv/robit
7e0414d0ed3d98bb2c9a8785bf36961ac08f1d27
[ "MIT" ]
1
2021-11-01T18:51:04.000Z
2021-11-01T18:51:04.000Z
robit/core/cron.py
stratusadv/robit
7e0414d0ed3d98bb2c9a8785bf36961ac08f1d27
[ "MIT" ]
null
null
null
import ast from datetime import datetime, timedelta import calendar from robit.core.clock import CREATED_DATE_FORMAT class Cron: def __init__( self, value: str, utc_offset: int = 0, ): self.value = value self.utc_offset = utc_offset cron_list = self...
30.542986
129
0.531556
import ast from datetime import datetime, timedelta import calendar from robit.core.clock import CREATED_DATE_FORMAT class Cron: def __init__( self, value: str, utc_offset: int = 0, ): self.value = value self.utc_offset = utc_offset cron_list = self...
true
true
1c35884aea0a87075d7d5594df270a3e982a4767
738
py
Python
cancertype_prediction/plot_param_opt.py
DPBayes/dp-representation-transfer
0c8389cc36659a7606bceac2531eaef7663ac49c
[ "MIT" ]
1
2021-12-09T03:45:18.000Z
2021-12-09T03:45:18.000Z
cancertype_prediction/plot_param_opt.py
DPBayes/dp-representation-transfer
0c8389cc36659a7606bceac2531eaef7663ac49c
[ "MIT" ]
1
2019-10-03T19:32:29.000Z
2019-10-04T14:09:28.000Z
cancertype_prediction/plot_param_opt.py
DPBayes/dp-representation-transfer
0c8389cc36659a7606bceac2531eaef7663ac49c
[ "MIT" ]
1
2019-10-15T07:16:42.000Z
2019-10-15T07:16:42.000Z
import numpy as np import matplotlib.pyplot as plt x = np.load("param_opt/opt_params.npy") y = np.load("param_opt/opt_results.npy") domain = [ {'name': 'learning_rate_log10', 'type': 'continuous', 'domain': (-5,-1)}, {'name': 'n_hidden_layers', 'type': 'discrete', 'domain': [1, 2, 3]}, # {'name': 'repr_dim', 'ty...
29.52
95
0.607046
import numpy as np import matplotlib.pyplot as plt x = np.load("param_opt/opt_params.npy") y = np.load("param_opt/opt_results.npy") domain = [ {'name': 'learning_rate_log10', 'type': 'continuous', 'domain': (-5,-1)}, {'name': 'n_hidden_layers', 'type': 'discrete', 'domain': [1, 2, 3]}, {'name': 'repr_dim', 'ty...
true
true
1c3589620f3ae4c5d749e81bd94ab6a5f97a9f58
551
py
Python
aiotf/__init__.py
brunoalano/aiotf
78a6b67694c4c3245f14003bd3d3f0450ac9cad2
[ "MIT" ]
8
2018-11-28T12:13:25.000Z
2021-11-08T11:19:01.000Z
aiotf/__init__.py
brunoalano/aiotf
78a6b67694c4c3245f14003bd3d3f0450ac9cad2
[ "MIT" ]
null
null
null
aiotf/__init__.py
brunoalano/aiotf
78a6b67694c4c3245f14003bd3d3f0450ac9cad2
[ "MIT" ]
null
null
null
from .__version__ import __title__, __description__, __url__, __version__ from .__version__ import __author__, __author_email__, __license__ from .__version__ import __copyright__ # Set default logging handler to avoid "No handler found" warnings. import logging try: # Python 2.7+ from logging import NullHandler ex...
30.611111
73
0.798548
from .__version__ import __title__, __description__, __url__, __version__ from .__version__ import __author__, __author_email__, __license__ from .__version__ import __copyright__ import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): def emit(self, recor...
true
true
1c358a6e7c8cd62a3bef6015d49d8d740a1f2af8
66
py
Python
caching/__init__.py
remohammadi/django-cache-machine
da5f6edf1600a28cb6ad7f9f7ad8104f1748e674
[ "BSD-3-Clause" ]
1
2019-02-10T19:33:37.000Z
2019-02-10T19:33:37.000Z
caching/__init__.py
remohammadi/django-cache-machine
da5f6edf1600a28cb6ad7f9f7ad8104f1748e674
[ "BSD-3-Clause" ]
null
null
null
caching/__init__.py
remohammadi/django-cache-machine
da5f6edf1600a28cb6ad7f9f7ad8104f1748e674
[ "BSD-3-Clause" ]
null
null
null
VERSION = (0, '8', '1') __version__ = '.'.join(map(str, VERSION))
22
41
0.575758
VERSION = (0, '8', '1') __version__ = '.'.join(map(str, VERSION))
true
true
1c358bac3573d104c1bedc36acc256cb7d1a0465
423
py
Python
setup.py
human-ui/gym-minigrid
66a89abf236030b8a9d84a51f62acbc7605e01cd
[ "BSD-3-Clause" ]
null
null
null
setup.py
human-ui/gym-minigrid
66a89abf236030b8a9d84a51f62acbc7605e01cd
[ "BSD-3-Clause" ]
1
2020-01-06T08:49:05.000Z
2020-01-07T08:31:11.000Z
setup.py
human-ui/gym-minigrid
66a89abf236030b8a9d84a51f62acbc7605e01cd
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup setup( name='gym_minigrid', version='0.0.5', keywords='memory, environment, agent, rl, openaigym, openai-gym, gym', url='https://github.com/maximecb/gym-minigrid', description='Minimalistic gridworld package for OpenAI Gym', packages=['gym_minigrid'], install_re...
24.882353
74
0.612293
from setuptools import setup setup( name='gym_minigrid', version='0.0.5', keywords='memory, environment, agent, rl, openaigym, openai-gym, gym', url='https://github.com/maximecb/gym-minigrid', description='Minimalistic gridworld package for OpenAI Gym', packages=['gym_minigrid'], install_re...
true
true
1c358c09ae78dec70f326486988c762b5b1893f8
17,071
py
Python
PythonAPI/carissma_project/lib/python3.5/site-packages/matplotlib/tests/test_colorbar.py
AbdulHoffmann/carla_carissma
8d382769ffa02a6c61a22c57160285505f5ff0a4
[ "MIT" ]
366
2019-04-07T20:34:48.000Z
2022-03-29T07:35:38.000Z
venv/lib/python3.7/site-packages/matplotlib/tests/test_colorbar.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
12
2018-12-06T22:06:49.000Z
2022-02-25T17:40:44.000Z
venv/lib/python3.7/site-packages/matplotlib/tests/test_colorbar.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
64
2018-04-25T08:51:57.000Z
2022-01-29T14:13:57.000Z
import numpy as np import pytest from matplotlib import rc_context from matplotlib.testing.decorators import image_comparison import matplotlib.pyplot as plt from matplotlib.colors import BoundaryNorm, LogNorm, PowerNorm from matplotlib.cm import get_cmap from matplotlib.colorbar import ColorbarBase from matplotlib.ti...
38.020045
78
0.600785
import numpy as np import pytest from matplotlib import rc_context from matplotlib.testing.decorators import image_comparison import matplotlib.pyplot as plt from matplotlib.colors import BoundaryNorm, LogNorm, PowerNorm from matplotlib.cm import get_cmap from matplotlib.colorbar import ColorbarBase from matplotlib.ti...
true
true
1c358c3ca06193a459088b7dc742ecfcfbfc9389
4,118
py
Python
tests/graph/test_stpg_heuristics.py
GiliardGodoi/steiner-problem-with-evol
6b34f0342b791ae6c65b6d016c37a4d45ab5cdad
[ "MIT" ]
null
null
null
tests/graph/test_stpg_heuristics.py
GiliardGodoi/steiner-problem-with-evol
6b34f0342b791ae6c65b6d016c37a4d45ab5cdad
[ "MIT" ]
5
2021-01-26T17:28:32.000Z
2021-03-14T13:46:48.000Z
tests/graph/test_stpg_heuristics.py
GiliardGodoi/steiner-problem-with-evol
6b34f0342b791ae6c65b6d016c37a4d45ab5cdad
[ "MIT" ]
1
2021-01-25T16:35:59.000Z
2021-01-25T16:35:59.000Z
import random import unittest from collections import deque from os import path from ga4stpg.graph.graph import UndirectedWeightedGraph as Graph from ga4stpg.graph.reader import ReaderORLibrary from ga4stpg.graph.steiner import (prunning_mst, shortest_path, shortest_path_origin_prim,...
29.84058
95
0.610248
import random import unittest from collections import deque from os import path from ga4stpg.graph.graph import UndirectedWeightedGraph as Graph from ga4stpg.graph.reader import ReaderORLibrary from ga4stpg.graph.steiner import (prunning_mst, shortest_path, shortest_path_origin_prim,...
true
true
1c358d00e0e7644e712c729d73ae6ea489028eb9
6,888
py
Python
ros/src/tl_detector/tl_detector.py
kingmbm1118/selfdriving9_Capstone
37e4613290df63e4ea55853bf93822da9e00b695
[ "MIT" ]
1
2020-08-04T01:59:44.000Z
2020-08-04T01:59:44.000Z
ros/src/tl_detector/tl_detector.py
kingmbm1118/selfdriving9_Capstone
37e4613290df63e4ea55853bf93822da9e00b695
[ "MIT" ]
12
2019-12-16T22:19:56.000Z
2022-03-12T00:06:22.000Z
ros/src/tl_detector/tl_detector.py
kingmbm1118/selfdriving9_Capstone
37e4613290df63e4ea55853bf93822da9e00b695
[ "MIT" ]
2
2019-11-27T18:53:10.000Z
2019-11-28T18:17:32.000Z
#!/usr/bin/env python import rospy import os from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier im...
37.434783
132
0.642857
import rospy import os from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier import TLClassifier imp...
true
true
1c358d5c277563ebf7ec4e31a4234472b1bb6da1
389
py
Python
week06/week06/wsgi.py
fuengfa/CS459
cf8b8dcdb94ebcb894551174e5223b857425e1f6
[ "BSD-2-Clause" ]
null
null
null
week06/week06/wsgi.py
fuengfa/CS459
cf8b8dcdb94ebcb894551174e5223b857425e1f6
[ "BSD-2-Clause" ]
null
null
null
week06/week06/wsgi.py
fuengfa/CS459
cf8b8dcdb94ebcb894551174e5223b857425e1f6
[ "BSD-2-Clause" ]
null
null
null
""" WSGI config for week06 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTIN...
22.882353
78
0.784062
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "week06.settings") application = get_wsgi_application()
true
true
1c358d63343780b4bc592c3310d68823d9e3ed92
6,650
py
Python
Python/utils/trimesh.py
hpbader42/Klampt
89faaef942c0c6fca579a3770314c6610e2ac772
[ "BSD-3-Clause" ]
null
null
null
Python/utils/trimesh.py
hpbader42/Klampt
89faaef942c0c6fca579a3770314c6610e2ac772
[ "BSD-3-Clause" ]
null
null
null
Python/utils/trimesh.py
hpbader42/Klampt
89faaef942c0c6fca579a3770314c6610e2ac772
[ "BSD-3-Clause" ]
1
2019-07-01T08:48:32.000Z
2019-07-01T08:48:32.000Z
from klampt.vectorops import * import math #import numpy def rotationMatrix(x,y,z,rads): c = math.cos(rads) s = math.sin(rads) #cross = numpy.matrix([[0.0,-z,y],[z,0.0,-x],[-y,x,0.0]]) #return numpy.eye(3)+c*cross-s*cross*cross; val = [[c,0.0,0.0],[0.0,c,0.0],[0.0,0.0,c]] rrt = [[x*x,x*y,x*z],[...
31.367925
109
0.521203
from klampt.vectorops import * import math def rotationMatrix(x,y,z,rads): c = math.cos(rads) s = math.sin(rads) val = [[c,0.0,0.0],[0.0,c,0.0],[0.0,0.0,c]] rrt = [[x*x,x*y,x*z],[y*x,y*y,y*z],[z*x,z*y,z*z]] cross = [[0.0,-z,y],[z,0.0,-x],[-y,x,0.0]] for i in range(3): for j i...
true
true
1c358e0ca080cd6799da1d56d8825177021aec6e
121
py
Python
platform/core/polyaxon/polyflow/apps.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
platform/core/polyaxon/polyflow/apps.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
platform/core/polyaxon/polyflow/apps.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class PolyflowConfig(AppConfig): name = 'polyflow' verbose_name = 'Polyflow'
17.285714
33
0.735537
from django.apps import AppConfig class PolyflowConfig(AppConfig): name = 'polyflow' verbose_name = 'Polyflow'
true
true
1c358e4113ad9f6e9b8502c37297313a1c2eefbf
5,416
py
Python
octopus/tests/BTC/test_explorer.py
SillyTin/octopus
5ad30f4affaa209a6ccc03c406c41c820dab62dc
[ "MIT" ]
212
2018-06-29T10:13:42.000Z
2020-02-16T07:55:47.000Z
octopus/tests/BTC/test_explorer.py
b-mueller/octopus
249f2afa37859bf645bc0251502ac104c4b37ec7
[ "MIT" ]
12
2018-07-05T08:50:12.000Z
2020-01-16T08:41:49.000Z
octopus/tests/BTC/test_explorer.py
b-mueller/octopus
249f2afa37859bf645bc0251502ac104c4b37ec7
[ "MIT" ]
34
2018-06-28T11:49:02.000Z
2020-02-05T07:42:33.000Z
from octopus.platforms.BTC.explorer import BitcoinExplorerRPC from octopus.platforms.BTC.explorer import RPC_USER, RPC_PASSWORD, RPC_HOST import unittest class BitcoinExplorerTestCase(unittest.TestCase): explorer = BitcoinExplorerRPC(host=('%s:%s@%s' % (RPC_USER, RPC_PASSWORD, RPC_HOST))) blockhash = '0000...
51.09434
465
0.723227
from octopus.platforms.BTC.explorer import BitcoinExplorerRPC from octopus.platforms.BTC.explorer import RPC_USER, RPC_PASSWORD, RPC_HOST import unittest class BitcoinExplorerTestCase(unittest.TestCase): explorer = BitcoinExplorerRPC(host=('%s:%s@%s' % (RPC_USER, RPC_PASSWORD, RPC_HOST))) blockhash = '0000...
true
true
1c35909cfc3500db75b7730f3679f74a40141835
2,119
py
Python
Hessian/models/c1.py
Bhaskers-Blu-Org1/model-sanitization
1eff7e9f35e4fd194ffc83a55e4f6688ca9bb5c3
[ "Apache-2.0" ]
15
2020-05-04T15:28:36.000Z
2021-12-31T02:34:12.000Z
Hessian/models/c1.py
Bhaskers-Blu-Org1/model-sanitization
1eff7e9f35e4fd194ffc83a55e4f6688ca9bb5c3
[ "Apache-2.0" ]
1
2020-05-14T04:56:22.000Z
2020-05-27T14:10:12.000Z
Hessian/models/c1.py
IBM/model-sanitization
1eff7e9f35e4fd194ffc83a55e4f6688ca9bb5c3
[ "Apache-2.0" ]
4
2020-06-29T15:18:57.000Z
2022-03-27T17:04:07.000Z
from __future__ import print_function import numpy as np import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable class c1_model(nn.Module): def __init__(self, num_classes=1...
32.6
95
0.596508
from __future__ import print_function import numpy as np import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable class c1_model(nn.Module): def __init__(self, num_classes=1...
true
true
1c3591614ba26c792bb2d02a3e14a8f342bd3969
1,915
py
Python
test/functional/rpc_signmessage.py
BlockStamp/bstnew
f3775b14874a78c3fd811616752f2c07415b04ee
[ "MIT" ]
37
2018-11-29T13:13:40.000Z
2020-12-10T00:39:21.000Z
test/functional/rpc_signmessage.py
BlockStamp/bstnew
f3775b14874a78c3fd811616752f2c07415b04ee
[ "MIT" ]
6
2018-11-27T19:07:36.000Z
2019-07-13T06:28:39.000Z
test/functional/rpc_signmessage.py
BlockStamp/bstnew
f3775b14874a78c3fd811616752f2c07415b04ee
[ "MIT" ]
6
2018-05-28T07:58:46.000Z
2020-01-15T18:41:24.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-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 RPC commands for signing and verifying messages.""" from test_framework.test_framework import Bit...
44.534884
119
0.733681
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal class SignMessagesTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 self.extra_args = [["-addresstype=legacy"]] def ski...
true
true
1c359266bc1d9b1602ff3fa83127beb8c92ced5f
56,633
py
Python
plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
2
2018-11-02T19:55:30.000Z
2020-08-14T02:22:20.000Z
plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
null
null
null
plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
3
2019-12-17T20:47:00.000Z
2021-02-11T19:03:59.000Z
# -*- coding: utf-8 -*- """ Copyright (C) 2014-2016 bromix (plugin.video.youtube) Copyright (C) 2016-2018 plugin.video.youtube SPDX-License-Identifier: GPL-2.0-only See LICENSES/GPL-2.0-only for more information. """ import copy import json import re import threading import traceback import requests...
42.10632
179
0.533505
import copy import json import re import threading import traceback import requests from .login_client import LoginClient from ..helper.video_info import VideoInfo from ..helper.utils import get_shelf_index_by_title from ...kodion import constants from ...kodion import Context from ...kodion.utils import datetime_p...
true
true
1c359333395c19ed322fc04a147f52e90640146d
574
py
Python
runtests.py
lworkneh/NS
560145f5f1e4f0a5a3690470939a9cd48d9421bf
[ "MIT", "Unlicense" ]
1
2016-02-13T15:41:53.000Z
2016-02-13T15:41:53.000Z
runtests.py
lworkneh/NS
560145f5f1e4f0a5a3690470939a9cd48d9421bf
[ "MIT", "Unlicense" ]
6
2020-06-05T19:26:57.000Z
2022-03-11T23:33:08.000Z
runtests.py
lworkneh/NS
560145f5f1e4f0a5a3690470939a9cd48d9421bf
[ "MIT", "Unlicense" ]
null
null
null
import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'test-settings' test_dir = os.path.dirname(__file__) sys.path.insert(0, test_dir) import django from django.test.utils import get_runner from django.conf import settings def runtests(): if django.VERSION >= (1, 7): django.setup() TestRunner ...
23.916667
59
0.700348
import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'test-settings' test_dir = os.path.dirname(__file__) sys.path.insert(0, test_dir) import django from django.test.utils import get_runner from django.conf import settings def runtests(): if django.VERSION >= (1, 7): django.setup() TestRunner ...
true
true
1c3594191edf0b0fdc9949767ff6f24f088bd74f
1,124
py
Python
WEB SCRAPING PYTHON/webscraping4.py
nihilboy1455/CURSO-WEB-SCRAPING-PYTHON
c76f196a3ac13ddd36142b047880e3b2339c333f
[ "MIT" ]
null
null
null
WEB SCRAPING PYTHON/webscraping4.py
nihilboy1455/CURSO-WEB-SCRAPING-PYTHON
c76f196a3ac13ddd36142b047880e3b2339c333f
[ "MIT" ]
null
null
null
WEB SCRAPING PYTHON/webscraping4.py
nihilboy1455/CURSO-WEB-SCRAPING-PYTHON
c76f196a3ac13ddd36142b047880e3b2339c333f
[ "MIT" ]
null
null
null
# > EXEMPLO # - Obtendo produtos do Mercado Livre a partir de uma busca realizada pelo usuário import requests from bs4 import BeautifulSoup url_base = 'https://lista.mercadolivre.com.br/' produto_nome = input('Qual produto você deseja? ') response = requests.get(url_base + produto_nome) site = BeautifulSoup(respo...
32.114286
166
0.672598
import requests from bs4 import BeautifulSoup url_base = 'https://lista.mercadolivre.com.br/' produto_nome = input('Qual produto você deseja? ') response = requests.get(url_base + produto_nome) site = BeautifulSoup(response.text, 'html.parser') produtos = site.findAll('div', attrs={'class': 'andes-card andes-ca...
true
true
1c35945136e0c8709847e01b2b465d1a75b5ecf0
3,481
py
Python
data/process_data.py
GauravKParmar/Disaster-Response-Pipeline
740aaa9e2062662841add2daa981d5177abda021
[ "MIT" ]
null
null
null
data/process_data.py
GauravKParmar/Disaster-Response-Pipeline
740aaa9e2062662841add2daa981d5177abda021
[ "MIT" ]
null
null
null
data/process_data.py
GauravKParmar/Disaster-Response-Pipeline
740aaa9e2062662841add2daa981d5177abda021
[ "MIT" ]
null
null
null
import sys import pandas as pd from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): """ Loads data from given filepaths and merges them. Parameters: messages_filepath (str): messages filepath categories_filepath (str): categories filepath R...
29.752137
81
0.652111
import sys import pandas as pd from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): messages = pd.read_csv(messages_filepath) categories = pd.read_csv(categories_filepath) df = pd.merge(messages, categories, on="id") return df def cl...
true
true
1c3594e67f3f6ba6b208b98c777c26d71c1846ac
3,771
py
Python
contrib/macdeploy/custom_dsstore.py
DreamCoinOfficial/DreamCoin
9e4b698a09bf99d0266e5429b71cfb96da6eac60
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
DreamCoinOfficial/DreamCoin
9e4b698a09bf99d0266e5429b71cfb96da6eac60
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
DreamCoinOfficial/DreamCoin
9e4b698a09bf99d0266e5429b71cfb96da6eac60
[ "MIT" ]
1
2018-10-07T17:59:36.000Z
2018-10-07T17:59:36.000Z
#!/usr/bin/env python # Copyright (c) 2013-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. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
61.819672
1,817
0.727128
from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv[1] package_name_ns = sys.argv[2] ds = DSStore.open(output_file, 'w+') ds['.']['bwsp'] = { 'ShowStatusBar': False, 'WindowBounds': b'{{30...
true
true
1c359556bb686048bce755e3be36b7b20e5dd626
1,203
py
Python
machine_translation/fairseq/models/fairseq_encoder.py
wangjksjtu/autoassist-exp
7c4599fb250c2041ab007965b083750875dd6ac9
[ "BSD-3-Clause" ]
10
2019-11-19T18:03:59.000Z
2021-01-13T18:18:19.000Z
machine_translation/fairseq/models/fairseq_encoder.py
wangjksjtu/autoassist-exp
7c4599fb250c2041ab007965b083750875dd6ac9
[ "BSD-3-Clause" ]
null
null
null
machine_translation/fairseq/models/fairseq_encoder.py
wangjksjtu/autoassist-exp
7c4599fb250c2041ab007965b083750875dd6ac9
[ "BSD-3-Clause" ]
2
2019-12-03T16:35:46.000Z
2020-04-10T21:45:20.000Z
import torch.nn as nn class FairseqEncoder(nn.Module): """Base class for encoders.""" def __init__(self, dictionary): super().__init__() self.dictionary = dictionary def forward(self, src_tokens, src_lengths): """ Args: src_tokens (LongTensor): tokens in the s...
29.341463
78
0.610973
import torch.nn as nn class FairseqEncoder(nn.Module): def __init__(self, dictionary): super().__init__() self.dictionary = dictionary def forward(self, src_tokens, src_lengths): raise NotImplementedError def reorder_encoder_out(self, encoder_out, new_order): raise NotIm...
true
true
1c359585aff131855335a4ab58037aaa8370831c
82,001
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/_virtual_network_gateways_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/_virtual_network_gateways_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/_virtual_network_gateways_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
49.848632
231
0.692918
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling from .. import models class VirtualNetworkGatewaysOperations(object): models = models ...
true
true
1c3595aa8db877c916c7a3a1c15d81b0908b0cae
2,537
py
Python
utils.py
henrykasim/CS6220_MGGCN
0e5cf9eee0e85be2a4bc3ab39611a7378ce15999
[ "Apache-2.0" ]
null
null
null
utils.py
henrykasim/CS6220_MGGCN
0e5cf9eee0e85be2a4bc3ab39611a7378ce15999
[ "Apache-2.0" ]
null
null
null
utils.py
henrykasim/CS6220_MGGCN
0e5cf9eee0e85be2a4bc3ab39611a7378ce15999
[ "Apache-2.0" ]
null
null
null
'''Some helper functions for PyTorch, including: - get_mean_and_std: calculate the mean and std value of dataset. - msr_init: net parameter initialization. - progress_bar: progress bar mimic xlua.progress. ''' import os import sys import time import math import torch.nn as nn import torch.nn.ini...
26.989362
69
0.562475
import os import sys import time import math import torch.nn as nn import torch.nn.init as init term_width = 80 TOTAL_BAR_LENGTH = 65. last_time = time.time() begin_time = last_time def progress_bar(current, total, msg=None): global last_time, begin_time if current == 0: begin_time = ...
true
true
1c359607fb2eed80bcacb219fec5540be158c144
2,235
py
Python
homeassistant/components/lcn/scene.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
4
2016-06-22T12:00:41.000Z
2018-06-11T20:31:25.000Z
homeassistant/components/lcn/scene.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
58
2020-08-03T07:33:02.000Z
2022-03-31T06:02:05.000Z
homeassistant/components/lcn/scene.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
6
2019-07-06T00:43:13.000Z
2021-01-16T13:27:06.000Z
"""Support for LCN scenes.""" from typing import Any import pypck from homeassistant.components.scene import Scene from homeassistant.const import CONF_ADDRESS, CONF_SCENE from . import LcnEntity from .const import ( CONF_CONNECTIONS, CONF_OUTPUTS, CONF_REGISTER, CONF_TRANSITION, DATA_LCN, OU...
28.653846
88
0.665324
from typing import Any import pypck from homeassistant.components.scene import Scene from homeassistant.const import CONF_ADDRESS, CONF_SCENE from . import LcnEntity from .const import ( CONF_CONNECTIONS, CONF_OUTPUTS, CONF_REGISTER, CONF_TRANSITION, DATA_LCN, OUTPUT_PORTS, ) from .helpers im...
true
true
1c359721a50f00cc6c1003cf26fafa5d46e97b98
3,709
py
Python
Scanner.py
hajin-kim/PLS_TinyAda_Compiler
9c376eaeab87688fb5b6af4f925003c6559b7c1b
[ "MIT" ]
null
null
null
Scanner.py
hajin-kim/PLS_TinyAda_Compiler
9c376eaeab87688fb5b6af4f925003c6559b7c1b
[ "MIT" ]
null
null
null
Scanner.py
hajin-kim/PLS_TinyAda_Compiler
9c376eaeab87688fb5b6af4f925003c6559b7c1b
[ "MIT" ]
1
2020-12-05T13:28:38.000Z
2020-12-05T13:28:38.000Z
from Const import Const from Token import Token from Chario import Chario class Scanner: """ The Scanner class recognizes and generates tokens in a stream of characters and returns these tokens to the parser. The Scanner class also detects any lexical errors. """ def __init__(self, chario): self.chario = char...
29.436508
111
0.669453
from Const import Const from Token import Token from Chario import Chario class Scanner: def __init__(self, chario): self.chario = chario def StringToken(self): self.chario.GetNextChar() result = "" while self.chario.PeekNextChar() != "\"": result += self.chario.GetNextChar() self.chario.GetN...
true
true
1c35977c3665ef7141eccc522715cb0dd0bafe4d
22,875
py
Python
make-the-country/population_builder.py
awyrough/make-the-country
4019f66e4041062fb8f76f25b57f664a7308cf0d
[ "MIT" ]
null
null
null
make-the-country/population_builder.py
awyrough/make-the-country
4019f66e4041062fb8f76f25b57f664a7308cf0d
[ "MIT" ]
null
null
null
make-the-country/population_builder.py
awyrough/make-the-country
4019f66e4041062fb8f76f25b57f664a7308cf0d
[ "MIT" ]
null
null
null
from itertools import chain import random as rd import numpy as np def treat_income(data): """ Convert to doubles, or zero if NaN """ try: return float(data) except: return 0.0 def treat_demo(data): """ Convert to *** """ return data def treat_group(data): """...
38.061564
189
0.50706
from itertools import chain import random as rd import numpy as np def treat_income(data): try: return float(data) except: return 0.0 def treat_demo(data): return data def treat_group(data): return data def treat_family(data): return data def extract_income(income): fam...
true
true
1c35979d53d9bc6a3421f7b64d03efca03b07692
382
py
Python
authapp/urls.py
tum0xa/geekbrains-django2-homework
55a7a0aa60da2978ab4abd5d2dacf7af21b301cc
[ "MIT" ]
null
null
null
authapp/urls.py
tum0xa/geekbrains-django2-homework
55a7a0aa60da2978ab4abd5d2dacf7af21b301cc
[ "MIT" ]
null
null
null
authapp/urls.py
tum0xa/geekbrains-django2-homework
55a7a0aa60da2978ab4abd5d2dacf7af21b301cc
[ "MIT" ]
null
null
null
from django.urls import path import authapp.views as authapp app_name = 'authapp' urlpatterns = [ path('login/', authapp.login, name='login'), path('logout', authapp.logout, name='logout'), path('register/', authapp.register, name='register'), path('edit/', authapp.edit, name='edit'), path('verify/...
31.833333
76
0.675393
from django.urls import path import authapp.views as authapp app_name = 'authapp' urlpatterns = [ path('login/', authapp.login, name='login'), path('logout', authapp.logout, name='logout'), path('register/', authapp.register, name='register'), path('edit/', authapp.edit, name='edit'), path('verify/...
true
true
1c3597d09aa6a31612e7f03092b8eca067dd16b3
8,226
py
Python
Personalization/script_BolCom.py
CyrilShch/persona-training-scripts
8f026fe29b35b7f217fbb58445181dc0569f3321
[ "MIT" ]
null
null
null
Personalization/script_BolCom.py
CyrilShch/persona-training-scripts
8f026fe29b35b7f217fbb58445181dc0569f3321
[ "MIT" ]
null
null
null
Personalization/script_BolCom.py
CyrilShch/persona-training-scripts
8f026fe29b35b7f217fbb58445181dc0569f3321
[ "MIT" ]
null
null
null
# imports from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import TimeoutException import pan...
38.260465
182
0.642232
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import TimeoutException import pandas as pd...
true
true
1c3598a66c4040a3519509163bc6019d2f7f3d7a
8,965
py
Python
api/environments/views.py
SolidStateGroup/Bullet-Train-API
ea47ccbdadf665a806ae4e0eff6ad1a2f1b0ba19
[ "BSD-3-Clause" ]
null
null
null
api/environments/views.py
SolidStateGroup/Bullet-Train-API
ea47ccbdadf665a806ae4e0eff6ad1a2f1b0ba19
[ "BSD-3-Clause" ]
null
null
null
api/environments/views.py
SolidStateGroup/Bullet-Train-API
ea47ccbdadf665a806ae4e0eff6ad1a2f1b0ba19
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from django.utils.decorators import method_decorator from drf_yasg2 import openapi from drf_yasg2.utils import swagger_auto_schema from flag_engine.api.document_builders import build_environment_document from rest_framework import mixins, ...
33.451493
88
0.668265
from __future__ import unicode_literals import logging from django.utils.decorators import method_decorator from drf_yasg2 import openapi from drf_yasg2.utils import swagger_auto_schema from flag_engine.api.document_builders import build_environment_document from rest_framework import mixins, status, viewsets from r...
true
true
1c35990dae6d9ff8d69a6e3ecdefe2a0bc11800f
41,418
py
Python
python/src/lib/python/pelix/ipopo/decorators.py
isandlaTech/cohorte-runtime
686556cdde20beba77ae202de9969be46feed5e2
[ "Apache-2.0" ]
6
2015-04-28T16:51:08.000Z
2017-07-12T11:29:00.000Z
pelix/src/main/python/pelix/ipopo/decorators.py
isandlaTech/cohorte-3rdparty
d39a1bf5d6d39550f8ee93770bcac55c5f098367
[ "Apache-2.0" ]
29
2015-02-24T11:11:26.000Z
2017-08-25T08:30:18.000Z
python/src/lib/python/pelix/ipopo/decorators.py
isandlaTech/cohorte-runtime
686556cdde20beba77ae202de9969be46feed5e2
[ "Apache-2.0" ]
1
2015-08-24T13:23:43.000Z
2015-08-24T13:23:43.000Z
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Defines the iPOPO decorators classes to manipulate component factory classes :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.5.7 :status: Beta .. Copyright 2014 isandlaTech Licensed under the A...
33.893617
80
0.608504
__version_info__ = (0, 5, 7) __version__ = ".".join(str(x) for x in __version_info__) __docformat__ = "restructuredtext en" from pelix.utilities import is_string, to_iterable from pelix.ipopo.contexts import FactoryContext, Requirement import pelix.ipopo.constants as constants import inspect import logging ...
true
true
1c359b29600fc3f07ff3aa05035e35f61decb956
2,531
py
Python
data/ghosts/ared_scatter.py
Vlad-Shcherbina/icfpc2014-tbd
8169102307808a80801bf5ee55688e41287990bf
[ "WTFPL" ]
4
2015-01-14T11:35:08.000Z
2020-01-19T19:14:40.000Z
data/ghosts/ared_scatter.py
Vlad-Shcherbina/icfpc2014-tbd
8169102307808a80801bf5ee55688e41287990bf
[ "WTFPL" ]
null
null
null
data/ghosts/ared_scatter.py
Vlad-Shcherbina/icfpc2014-tbd
8169102307808a80801bf5ee55688e41287990bf
[ "WTFPL" ]
null
null
null
# python aghost.py ../data/ghosts/ared_scatter.py >../data/ghosts/ared_scatter.ghc import game def run(): WALL = 0 EMPTY = 1 PILL = 2 POWER_PILL = 3 FRUIT = 4 LM_START = 5 GHOST_START = 6 mem.x, mem.y = get_ghost_coords(get_index()) mem.tx, mem.ty = get_lm_coords() mem.vitali...
27.215054
84
0.504939
import game def run(): WALL = 0 EMPTY = 1 PILL = 2 POWER_PILL = 3 FRUIT = 4 LM_START = 5 GHOST_START = 6 mem.x, mem.y = get_ghost_coords(get_index()) mem.tx, mem.ty = get_lm_coords() mem.vitality, mem.old_dir = get_ghost_status(get_index()) mem.best_closest = 0 mem....
true
true
1c359b330e1d919a32567d7186029609ec8e0cba
58,685
py
Python
nodejs-mobile/configure.py
xuelongqy/cnode
ac256264d329e68b6c5ae3281b0e7bb5a95ae164
[ "MIT" ]
null
null
null
nodejs-mobile/configure.py
xuelongqy/cnode
ac256264d329e68b6c5ae3281b0e7bb5a95ae164
[ "MIT" ]
4
2020-03-13T14:45:49.000Z
2020-03-15T16:31:22.000Z
nodejs-mobile/configure.py
xuelongqy/cnode
ac256264d329e68b6c5ae3281b0e7bb5a95ae164
[ "MIT" ]
1
2020-03-15T16:02:18.000Z
2020-03-15T16:02:18.000Z
import sys import errno import optparse import os import pipes import pprint import re import shlex import subprocess import shutil import string from distutils.spawn import find_executable as which # If not run from node/, cd to node/. os.chdir(os.path.dirname(__file__) or '.') original_argv = sys.argv[1:] # gcc an...
34.358899
123
0.675812
import sys import errno import optparse import os import pipes import pprint import re import shlex import subprocess import shutil import string from distutils.spawn import find_executable as which os.chdir(os.path.dirname(__file__) or '.') original_argv = sys.argv[1:] # except on OS X. CC = os.environ.get('CC', ...
false
true
1c359c31473983caa5968f9bc90f6cd52f26c029
8,025
py
Python
doc/conf.py
glhr/gammatone
14fdcd37c0c3054e5c85ed8c53f2cdec6e5d2b99
[ "BSD-3-Clause" ]
176
2015-01-08T03:56:11.000Z
2022-03-31T09:36:40.000Z
doc/conf.py
glhr/gammatone
14fdcd37c0c3054e5c85ed8c53f2cdec6e5d2b99
[ "BSD-3-Clause" ]
9
2015-01-01T06:11:29.000Z
2020-12-28T23:32:29.000Z
doc/conf.py
glhr/gammatone
14fdcd37c0c3054e5c85ed8c53f2cdec6e5d2b99
[ "BSD-3-Clause" ]
64
2015-03-31T05:16:37.000Z
2022-02-18T10:17:49.000Z
# -*- coding: utf-8 -*- # # gammatone documentation build configuration file, created by # sphinx-quickstart on Sat Dec 8 23:21:49 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
31.594488
80
0.708287
import sys, os extensions = ['sphinx.ext.autodoc'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Gammatone Filterbank Toolkit' copyright = u'2014, Jason Heeris' # |version| and |release|, also used in various other places throughout the # ...
true
true
1c359d5e9ed626c478696e05e998f64373e2c26d
5,087
py
Python
dataset.py
aod321/new_train
23bf0a64ac274433cbc372898d97ae9d1aa5f6cd
[ "BSD-2-Clause" ]
16
2020-07-11T07:53:49.000Z
2022-03-10T11:52:31.000Z
dataset.py
aod321/new_train
23bf0a64ac274433cbc372898d97ae9d1aa5f6cd
[ "BSD-2-Clause" ]
1
2020-08-12T07:57:47.000Z
2021-08-31T15:08:23.000Z
dataset.py
aod321/new_train
23bf0a64ac274433cbc372898d97ae9d1aa5f6cd
[ "BSD-2-Clause" ]
1
2022-02-28T10:32:43.000Z
2022-02-28T10:32:43.000Z
import numpy as np import os from torch.utils.data import Dataset from skimage import io import cv2 import torch class HelenDataset(Dataset): # HelenDataset def __init__(self, txt_file, root_dir, parts_root_dir=None, transform=None): """ Args: txt_file (string): Path to the txt fi...
39.130769
116
0.553175
import numpy as np import os from torch.utils.data import Dataset from skimage import io import cv2 import torch class HelenDataset(Dataset): def __init__(self, txt_file, root_dir, parts_root_dir=None, transform=None): self.name_list = np.loadtxt(os.path.join(root_dir, txt_file), dtype="str", delimi...
true
true
1c359ee05d301a0225cfaa3fa30c2d9d8f2e14e9
14,180
py
Python
tests/components/mazda/test_config_flow.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
tests/components/mazda/test_config_flow.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
tests/components/mazda/test_config_flow.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Test the Mazda Connected Services config flow.""" from unittest.mock import patch import aiohttp from openpeerpower import config_entries, data_entry_flow, setup from openpeerpower.components.mazda.config_flow import ( MazdaAccountLockedException, MazdaAuthenticationException, ) from openpeerpower.componen...
33.443396
88
0.656488
from unittest.mock import patch import aiohttp from openpeerpower import config_entries, data_entry_flow, setup from openpeerpower.components.mazda.config_flow import ( MazdaAccountLockedException, MazdaAuthenticationException, ) from openpeerpower.components.mazda.const import DOMAIN from openpeerpower.const...
true
true
1c359f540801b70b7fd2d2cf16e53d8746b7b093
1,101
py
Python
app/main/lib/shared_models/indian_sbert.py
meedan/alegre
ad28736f53b8905882e196e90cac66d39db341a3
[ "MIT" ]
11
2018-02-07T00:16:54.000Z
2021-05-13T22:47:07.000Z
app/main/lib/shared_models/indian_sbert.py
meedan/alegre
ad28736f53b8905882e196e90cac66d39db341a3
[ "MIT" ]
47
2018-11-26T23:17:37.000Z
2022-03-25T16:12:05.000Z
app/main/lib/shared_models/indian_sbert.py
meedan/alegre
ad28736f53b8905882e196e90cac66d39db341a3
[ "MIT" ]
9
2019-05-23T22:06:03.000Z
2020-10-27T20:45:04.000Z
import requests from sentence_transformers import SentenceTransformer from flask import current_app as app from app.main.lib.shared_models.shared_model import SharedModel from app.main.lib.similarity_measures import angular_similarity class IndianSbert(SharedModel): def load(self): model_name = self.optio...
35.516129
95
0.673933
import requests from sentence_transformers import SentenceTransformer from flask import current_app as app from app.main.lib.shared_models.shared_model import SharedModel from app.main.lib.similarity_measures import angular_similarity class IndianSbert(SharedModel): def load(self): model_name = self.optio...
true
true
1c35a1d2dbe619d8bc3b78661c7b4ad91e236806
2,500
py
Python
mmdet/core/post_processing/bbox_nms.py
marinarierav-uab/foveabox
1f313fd14aaf018aadb0c6b3de163eb0a3b1fbd5
[ "Apache-2.0" ]
1
2021-01-14T12:04:34.000Z
2021-01-14T12:04:34.000Z
mmdet/core/post_processing/bbox_nms.py
marinarierav-uab/foveabox
1f313fd14aaf018aadb0c6b3de163eb0a3b1fbd5
[ "Apache-2.0" ]
null
null
null
mmdet/core/post_processing/bbox_nms.py
marinarierav-uab/foveabox
1f313fd14aaf018aadb0c6b3de163eb0a3b1fbd5
[ "Apache-2.0" ]
null
null
null
import torch from mmdet.ops.nms import nms_wrapper def multiclass_nms(multi_bboxes, multi_scores, score_thr, nms_cfg, max_num=-1, score_factors=None): """NMS for multi-class bboxes. Args: multi_bboxes (Ten...
35.211268
99
0.5612
import torch from mmdet.ops.nms import nms_wrapper def multiclass_nms(multi_bboxes, multi_scores, score_thr, nms_cfg, max_num=-1, score_factors=None): num_classes = multi_scores.shape[1] bboxes, labels = [], [] ...
true
true