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
f705a8ee33fb9360f9cccd2c289e63ed88006920
6,249
py
Python
applications/welcome/models/menu.py
Gorang-Maniar/DGD
c7b2624c0d0bb0127214ec3804acbe2cc70f8ce0
[ "BSD-3-Clause" ]
8
2018-04-13T14:54:02.000Z
2021-03-04T10:58:09.000Z
webui/applications/grid/models/menu.py
pouyana/teireader
ac0a92d8b2e570eae1c0a03fd35a7b281eccd250
[ "MIT" ]
39
2018-03-23T09:25:38.000Z
2022-03-23T15:22:15.000Z
webui/applications/grid/models/menu.py
pouyana/teireader
ac0a92d8b2e570eae1c0a03fd35a7b281eccd250
[ "MIT" ]
3
2019-04-09T03:49:21.000Z
2020-03-05T03:51:25.000Z
# -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations ######################################################################### ## Customize your APP title, subtitle and menus here ######################################################################### response.logo...
44.319149
79
0.478957
response.logo = A(B('web',SPAN(2),'py'),XML('&trade;&nbsp;'), _class="brand",_href="http://www.web2py.com/") response.title = request.application.replace('_',' ').title() response.subtitle = '' response.meta.author = 'Your Name <you@example.com>' response.meta.description = 'a cool new app' respons...
true
true
f705a92454724dc469a9dcc20bbdf310e2ec08ca
6,419
py
Python
zvt/utils/inform_utils.py
doncat99/zvt
831183bdf7a6d0fc3acd3ea51984df590078eec6
[ "MIT" ]
10
2020-08-08T04:43:00.000Z
2021-07-23T05:38:11.000Z
zvt/utils/inform_utils.py
doncat99/zvt
831183bdf7a6d0fc3acd3ea51984df590078eec6
[ "MIT" ]
1
2021-08-14T12:19:18.000Z
2021-09-30T06:44:04.000Z
zvt/utils/inform_utils.py
doncat99/zvt
831183bdf7a6d0fc3acd3ea51984df590078eec6
[ "MIT" ]
1
2021-12-16T01:57:37.000Z
2021-12-16T01:57:37.000Z
# -*- coding: utf-8 -*- import email import json import logging import smtplib from email.header import Header from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from zvt import zvt_config from zvt.networking.request import get_http_session, sync_get, sync_post class Informer(object)...
37.319767
128
0.572986
import email import json import logging import smtplib from email.header import Header from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from zvt import zvt_config from zvt.networking.request import get_http_session, sync_get, sync_post class Informer(object): logger = logging.g...
true
true
f705a95dd49f7443385a19b9bb52262d3489eae7
277
py
Python
global_motion_estimation/test scripts/gradient descent tests/dummy.py
Samaretas/global-motion-estimation
798b70ccc23ac6d6c9d25119db22d346c965faca
[ "MIT" ]
null
null
null
global_motion_estimation/test scripts/gradient descent tests/dummy.py
Samaretas/global-motion-estimation
798b70ccc23ac6d6c9d25119db22d346c965faca
[ "MIT" ]
null
null
null
global_motion_estimation/test scripts/gradient descent tests/dummy.py
Samaretas/global-motion-estimation
798b70ccc23ac6d6c9d25119db22d346c965faca
[ "MIT" ]
null
null
null
import numpy as np from scipy import optimize def f(x, a): return x**3 - a def fder(x, a): return 3 * x**2 rng = np.random.default_rng() x = rng.standard_normal(100) a = np.arange(-50, 50) vec_res = optimize.newton(f, x, fprime=fder, args=(a, ), maxiter=200) print(vec_res)
21.307692
69
0.6787
import numpy as np from scipy import optimize def f(x, a): return x**3 - a def fder(x, a): return 3 * x**2 rng = np.random.default_rng() x = rng.standard_normal(100) a = np.arange(-50, 50) vec_res = optimize.newton(f, x, fprime=fder, args=(a, ), maxiter=200) print(vec_res)
true
true
f705a9bd41c3c5d52a4114e43e885fd40f95eb2b
18,618
py
Python
tools/codegen/core/gen_static_metadata.py
benjaminp/grpc
dfb1a0f20624417bff408a14b12a23713085b999
[ "Apache-2.0" ]
1
2020-02-22T04:55:43.000Z
2020-02-22T04:55:43.000Z
tools/codegen/core/gen_static_metadata.py
benjaminp/grpc
dfb1a0f20624417bff408a14b12a23713085b999
[ "Apache-2.0" ]
null
null
null
tools/codegen/core/gen_static_metadata.py
benjaminp/grpc
dfb1a0f20624417bff408a14b12a23713085b999
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.7 # Copyright 2015 gRPC 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 l...
30.773554
204
0.591363
import hashlib import itertools import collections import os import sys import subprocess import re import perfection CONFIG = [ 'host', 'grpc-timeout', 'grpc-internal-encoding-request', 'grpc-internal-stream-encoding-request', 'grpc-payload-bin', ':path', 'grpc-encoding', 'grpc-...
true
true
f705aa0a9cc3013d4d6d764c543ef84eb33c842d
266
py
Python
bulbea/__init__.py
saimohithnaag/StockPredictor
4caba8f042f1d87ec0b41ec8e14d3a458a7409a4
[ "Apache-2.0" ]
1,761
2017-03-09T08:51:28.000Z
2022-03-27T18:15:06.000Z
bulbea/__init__.py
saimohithnaag/StockPredictor
4caba8f042f1d87ec0b41ec8e14d3a458a7409a4
[ "Apache-2.0" ]
38
2017-03-11T11:51:16.000Z
2021-06-27T15:00:07.000Z
bulbea/__init__.py
saimohithnaag/StockPredictor
4caba8f042f1d87ec0b41ec8e14d3a458a7409a4
[ "Apache-2.0" ]
511
2017-03-12T03:49:26.000Z
2022-03-15T23:05:49.000Z
# imports - compatibility packages from __future__ import absolute_import # module imports from bulbea.entity import Share, Stock from bulbea.config import AppConfig from bulbea.app import app from bulbea.learn import sentiment __version__ = AppConfig.VERSION
24.181818
38
0.819549
from __future__ import absolute_import from bulbea.entity import Share, Stock from bulbea.config import AppConfig from bulbea.app import app from bulbea.learn import sentiment __version__ = AppConfig.VERSION
true
true
f705aa3f869f15ac85f262ae3734bf3603f18c56
2,656
bzl
Python
haskell/set.bzl
iphydf/rules_haskell
546c698cb782fd0749a3c91eb41e1f9a19c65646
[ "Apache-2.0" ]
null
null
null
haskell/set.bzl
iphydf/rules_haskell
546c698cb782fd0749a3c91eb41e1f9a19c65646
[ "Apache-2.0" ]
null
null
null
haskell/set.bzl
iphydf/rules_haskell
546c698cb782fd0749a3c91eb41e1f9a19c65646
[ "Apache-2.0" ]
null
null
null
"""Immutable sets that support efficient merging, traversal, and membership check. """ def _empty(): """Create an empty set. Returns: set, new empty set. """ return struct(_set_items = dict()) def _is_member(s, e): """Return true if `e` is in the set `s`. Args: s: The set to inspect. e: The ...
19.386861
75
0.636672
def _empty(): return struct(_set_items = dict()) def _is_member(s, e): return e in s._set_items def _insert(s, e): r = dict(s._set_items) r[e] = None return struct(_set_items = r) def _mutable_insert(s, e): s._set_items[e] = None return s def _union(s0, s1): r = dict(s0._set_items) r.update(s1._s...
true
true
f705aa53c6355389b32f15c7666bdf8d321b755f
5,052
py
Python
singer_encodings/json_schema.py
INGCRENGIFO/singer-encodings
eec3d7276bbc209b3e0d3c5e2a46c223d69e45b1
[ "Apache-2.0" ]
null
null
null
singer_encodings/json_schema.py
INGCRENGIFO/singer-encodings
eec3d7276bbc209b3e0d3c5e2a46c223d69e45b1
[ "Apache-2.0" ]
null
null
null
singer_encodings/json_schema.py
INGCRENGIFO/singer-encodings
eec3d7276bbc209b3e0d3c5e2a46c223d69e45b1
[ "Apache-2.0" ]
1
2021-05-25T14:00:25.000Z
2021-05-25T14:00:25.000Z
import re from . import csv SDC_SOURCE_FILE_COLUMN = "_sdc_source_file" SDC_SOURCE_LINENO_COLUMN = "_sdc_source_lineno" # TODO: Add additional logging # TODO: conn needs get_files and get_file_handle functions def get_schema_for_table(conn, table_spec): files = conn.get_files(table_spec['search_prefix'], table_...
26.87234
86
0.578583
import re from . import csv SDC_SOURCE_FILE_COLUMN = "_sdc_source_file" SDC_SOURCE_LINENO_COLUMN = "_sdc_source_lineno" def get_schema_for_table(conn, table_spec): files = conn.get_files(table_spec['search_prefix'], table_spec['search_pattern']) if not files: return {} samples = sample_files(c...
true
true
f705aa7a111c288e8e1467878b55832e0ecc8a3a
6,992
py
Python
appdaemontestframework/automation_fixture.py
fhoekstra/Appdaemon-Test-Framework
f4b3ed1145c83228cfe4e7cbc3e351b4ac975f86
[ "MIT" ]
37
2018-08-08T10:48:13.000Z
2022-03-09T22:31:11.000Z
appdaemontestframework/automation_fixture.py
fhoekstra/Appdaemon-Test-Framework
f4b3ed1145c83228cfe4e7cbc3e351b4ac975f86
[ "MIT" ]
58
2018-10-05T13:36:57.000Z
2022-02-06T11:37:20.000Z
appdaemontestframework/automation_fixture.py
fhoekstra/Appdaemon-Test-Framework
f4b3ed1145c83228cfe4e7cbc3e351b4ac975f86
[ "MIT" ]
13
2018-12-04T19:22:23.000Z
2022-02-06T10:32:04.000Z
import warnings from inspect import isfunction, signature import pkg_resources import pytest from appdaemon.plugins.hass.hassapi import Hass from appdaemontestframework.common import AppdaemonTestFrameworkError class AutomationFixtureError(AppdaemonTestFrameworkError): pass def _instantiate_and_initialize_aut...
38.844444
149
0.707809
import warnings from inspect import isfunction, signature import pkg_resources import pytest from appdaemon.plugins.hass.hassapi import Hass from appdaemontestframework.common import AppdaemonTestFrameworkError class AutomationFixtureError(AppdaemonTestFrameworkError): pass def _instantiate_and_initialize_aut...
true
true
f705aa88a1c1f1199101a25efeea9d789667e79f
587
py
Python
TNDD/cms/TNDD_Views_show.py
sillsdev/PT-Views
e6587aa14553b12e40b52ec53418868b0d9e0895
[ "MIT" ]
null
null
null
TNDD/cms/TNDD_Views_show.py
sillsdev/PT-Views
e6587aa14553b12e40b52ec53418868b0d9e0895
[ "MIT" ]
null
null
null
TNDD/cms/TNDD_Views_show.py
sillsdev/PT-Views
e6587aa14553b12e40b52ec53418868b0d9e0895
[ "MIT" ]
null
null
null
# Show TNDD Views for Paratext # Written by Ian McQuay, SIL International, 2022-01-05+10:00 # Import OS to be able to output correctly to Windows import os # Define batch files actionbatchfile = "C:\Users\Public\PT-Views\user-views-action.cmd" batchfile = "C:\Users\Public\PT-Views\user-views-manager.cmd" # setup vari...
36.6875
66
0.773424
import os actionbatchfile = "C:\Users\Public\PT-Views\user-views-action.cmd" batchfile = "C:\Users\Public\PT-Views\user-views-manager.cmd" commandstring = "echo set action=show> " + actionbatchfile os.system(commandstring) commandstring = "echo set matchstart=TNDD>> " + actionbatchfile os.system(commandstring) os.sta...
false
true
f705aabf435e5694deac5786cce3a35968d77640
805,471
py
Python
cisco-ios-xe/ydk/models/cisco_ios_xe/Cisco_IOS_XE_ospf_oper.py
CiscoDevNet/ydk-py
073731fea50694d0bc6cd8ebf10fec308dcc0aa9
[ "ECL-2.0", "Apache-2.0" ]
177
2016-03-15T17:03:51.000Z
2022-03-18T16:48:44.000Z
cisco-ios-xe/ydk/models/cisco_ios_xe/Cisco_IOS_XE_ospf_oper.py
CiscoDevNet/ydk-py
073731fea50694d0bc6cd8ebf10fec308dcc0aa9
[ "ECL-2.0", "Apache-2.0" ]
18
2016-03-30T10:45:22.000Z
2020-07-14T16:28:13.000Z
cisco-ios-xe/ydk/models/cisco_ios_xe/Cisco_IOS_XE_ospf_oper.py
CiscoDevNet/ydk-py
073731fea50694d0bc6cd8ebf10fec308dcc0aa9
[ "ECL-2.0", "Apache-2.0" ]
85
2016-03-16T20:38:57.000Z
2022-02-22T04:26:02.000Z
""" Cisco_IOS_XE_ospf_oper This module contains a collection of YANG definitions for monitoring the operation of ospf protocol in a Network Element. Copyright (c) 2016\-2018 by Cisco Systems, Inc. All rights reserved. """ from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, ...
53.996849
1,779
0.368293
from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64 from ydk.filters import YFilter from ydk.errors import YError, YModelError from ydk.errors.error_handler import handle_type_error as _handle_type_error c...
true
true
f705ab09a5963cd25258cf441567b8cdaf1b0983
10,096
py
Python
configs/common/CacheConfig.py
seanzw/UCLA-CS259-MachinesThatLearn-TensorCore
aece7fcdf97d2864fbb31e02940bfcdd470db7b9
[ "BSD-3-Clause" ]
3
2019-07-19T22:52:27.000Z
2020-05-26T04:37:46.000Z
configs/common/CacheConfig.py
seanzw/UCLA-CS259-MachinesThatLearn-TensorCore
aece7fcdf97d2864fbb31e02940bfcdd470db7b9
[ "BSD-3-Clause" ]
1
2019-07-22T16:41:56.000Z
2019-07-22T16:41:56.000Z
configs/common/CacheConfig.py
seanzw/UCLA-CS259-MachinesThatLearn-TensorCore
aece7fcdf97d2864fbb31e02940bfcdd470db7b9
[ "BSD-3-Clause" ]
2
2019-06-26T14:33:42.000Z
2019-10-02T02:09:23.000Z
# Copyright (c) 2012-2013, 2015-2016 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the...
44.475771
79
0.639758
from __future__ import print_function from __future__ import absolute_import import m5 from m5.objects import * from .Caches import * from . import HWPConfig def config_cache(options, system): if options.external_memory_system and (options.caches or options.l2cache): print("External caches and internal ...
true
true
f705ab4544bccecfcecc8f47c620ff3d110450c3
4,475
py
Python
users/user_forms.py
dennisfarmer/texas-hospital-hackathon
dabf80a2c3d78d595280d4ff9475176da4848349
[ "MIT" ]
null
null
null
users/user_forms.py
dennisfarmer/texas-hospital-hackathon
dabf80a2c3d78d595280d4ff9475176da4848349
[ "MIT" ]
null
null
null
users/user_forms.py
dennisfarmer/texas-hospital-hackathon
dabf80a2c3d78d595280d4ff9475176da4848349
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm as BaseUserCreationForm # from crispy_forms.helper import FormHelper # from crispy_forms.layout import Submit import sys import os from .models import User_Profile sys.path.append(os.path.dirname...
33.646617
97
0.604469
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm as BaseUserCreationForm import sys import os from .models import User_Profile sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) from orders.models import Location, Loc...
true
true
f705ab6b22fcd6f8fa7f8f53688eda2185ea5ef3
1,971
py
Python
WebDemo/flask_app/main.py
silenceliang/Cascading-agents-hybridSum
6c127df51bd8cc926878f62ebdb66bc1042bb58c
[ "MIT" ]
1
2020-02-23T15:38:18.000Z
2020-02-23T15:38:18.000Z
WebDemo/flask_app/main.py
silenceliang/CascadingAgentsHybridSum
6c127df51bd8cc926878f62ebdb66bc1042bb58c
[ "MIT" ]
null
null
null
WebDemo/flask_app/main.py
silenceliang/CascadingAgentsHybridSum
6c127df51bd8cc926878f62ebdb66bc1042bb58c
[ "MIT" ]
null
null
null
from flask import render_template, request from flask_script import Manager, Server from app import app from model import Content, Summary, Article import app.static.summ as summarizationModel import os, json, logging @app.route('/', endpoint='ACCESS') @app.route('/index.html', endpoint='ACCESSFILE') def index(): ...
32.311475
94
0.624049
from flask import render_template, request from flask_script import Manager, Server from app import app from model import Content, Summary, Article import app.static.summ as summarizationModel import os, json, logging @app.route('/', endpoint='ACCESS') @app.route('/index.html', endpoint='ACCESSFILE') def index(): ...
true
true
f705abab94d05422bd97d62349625cd2fa0906e4
15,678
py
Python
synapse/http/server.py
theworldbright/synapse
6783534a0f9f34d6972a31af368ee2324e2033f3
[ "Apache-2.0" ]
null
null
null
synapse/http/server.py
theworldbright/synapse
6783534a0f9f34d6972a31af368ee2324e2033f3
[ "Apache-2.0" ]
null
null
null
synapse/http/server.py
theworldbright/synapse
6783534a0f9f34d6972a31af368ee2324e2033f3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # # 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 applicab...
36.124424
88
0.637518
from synapse.api.errors import ( cs_exception, SynapseError, CodeMessageException, UnrecognizedRequestError, Codes ) from synapse.util.logcontext import LoggingContext, PreserveLoggingContext from synapse.util.caches import intern_dict import synapse.metrics import synapse.events from canonicaljson import ( ...
true
true
f705ae64cdecffa5cafbe9b36e37245e035fb0b5
1,380
py
Python
hackerearth/Algorithms/Feasible relations/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
4
2020-07-24T01:59:50.000Z
2021-07-24T15:14:08.000Z
hackerearth/Algorithms/Feasible relations/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
hackerearth/Algorithms/Feasible relations/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
""" # Sample code to perform I/O: name = input() # Reading input from STDIN print('Hi, %s.' % name) # Writing output to STDOUT # Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail """ # Write your code here from collections import deque, defaultdict ...
27.6
94
0.571739
from collections import deque, defaultdict from sys import stdin def check_connected(x, connected, adjacency): stack = deque([x]) while stack: u = stack.pop() for v in adjacency[u]: if v not in connected: connected[v] = x stack.append(v) t = int(s...
true
true
f705ae9c256c532814c09ac996b19cab9acfb4e3
2,527
py
Python
old/apply/apply/settings.py
neonsoftware/yard
5f2fda72c7a3f330d2442002687ff4d1dfb21680
[ "MIT" ]
1
2015-03-11T07:43:09.000Z
2015-03-11T07:43:09.000Z
old/apply/apply/settings.py
neonsoftware/yard
5f2fda72c7a3f330d2442002687ff4d1dfb21680
[ "MIT" ]
5
2015-05-17T18:22:29.000Z
2015-08-15T17:27:03.000Z
old/apply/apply/settings.py
neonsoftware/yard
5f2fda72c7a3f330d2442002687ff4d1dfb21680
[ "MIT" ]
null
null
null
""" Django settings for apply project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impo...
25.019802
103
0.688564
import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = '--v$_^*0r5(ok1^2sxdm4w_wwskvuv-z0tcop+yf1-m@+7p#5i' DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f705af023850008c9327aaee200ad9ea7dc63b24
405
py
Python
config/wsgi.py
bertini36/boatsandjoy-api
b22d82eb02947218d924b381160d622ded9e1d98
[ "MIT" ]
null
null
null
config/wsgi.py
bertini36/boatsandjoy-api
b22d82eb02947218d924b381160d622ded9e1d98
[ "MIT" ]
12
2021-04-08T21:18:37.000Z
2022-03-12T00:39:39.000Z
config/wsgi.py
bertini36/boatsandjoy-api
b22d82eb02947218d924b381160d622ded9e1d98
[ "MIT" ]
null
null
null
""" WSGI config for Boats & Joy 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/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_S...
23.823529
78
0.782716
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.production') application = get_wsgi_application()
true
true
f705b09b0a46fccb8f3405bc8e17fc8dd4cacc82
3,609
py
Python
src/third_party/wiredtiger/test/suite/test_lsm01.py
mwhudson/mongo
914bbbd26a686e032fdddec964b109ea78c6e6f6
[ "Apache-2.0" ]
14
2019-01-11T05:01:29.000Z
2021-11-01T00:39:46.000Z
src/third_party/wiredtiger/test/suite/test_lsm01.py
mwhudson/mongo
914bbbd26a686e032fdddec964b109ea78c6e6f6
[ "Apache-2.0" ]
1
2022-03-05T02:55:28.000Z
2022-03-05T05:28:00.000Z
src/third_party/wiredtiger/test/suite/test_lsm01.py
mwhudson/mongo
914bbbd26a686e032fdddec964b109ea78c6e6f6
[ "Apache-2.0" ]
7
2019-02-08T16:28:36.000Z
2021-05-08T14:25:47.000Z
#!/usr/bin/env python # # Public Domain 2014-2016 MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compil...
41.011364
76
0.665281
import wiredtiger, wtscenario, wttest from wtdataset import SimpleDataSet class test_lsm01(wttest.WiredTigerTestCase): K = 1024 M = 1024 * K G = 1024 * M uri = "lsm:test_lsm01" chunk_size_scenarios = wtscenario.quick_scenarios('s_chunk_size', [1*M,20*M,None], [0.6,0.6,0.6]) merge_max_...
true
true
f705b0edb87ae2c78f1229ba615f3eb737a2e382
68,829
py
Python
SoftLayer/fixtures/SoftLayer_Product_Package.py
kz6fittycent/softlayer-python
79a06c38bb48bb4d9712fec2d50ec26a7b2e2d72
[ "MIT" ]
null
null
null
SoftLayer/fixtures/SoftLayer_Product_Package.py
kz6fittycent/softlayer-python
79a06c38bb48bb4d9712fec2d50ec26a7b2e2d72
[ "MIT" ]
null
null
null
SoftLayer/fixtures/SoftLayer_Product_Package.py
kz6fittycent/softlayer-python
79a06c38bb48bb4d9712fec2d50ec26a7b2e2d72
[ "MIT" ]
null
null
null
# pylint: skip-file HARDWARE_ITEMS = [ {'attributes': [], 'capacity': '999', 'description': 'Unknown', 'itemCategory': {'categoryCode': 'unknown', 'id': 325}, 'keyName': 'UNKNOWN', 'prices': [{'accountRestrictions': [], 'currentPriceFlag': '', 'hourlyRecurr...
33.444606
106
0.375074
HARDWARE_ITEMS = [ {'attributes': [], 'capacity': '999', 'description': 'Unknown', 'itemCategory': {'categoryCode': 'unknown', 'id': 325}, 'keyName': 'UNKNOWN', 'prices': [{'accountRestrictions': [], 'currentPriceFlag': '', 'hourlyRecurringFee': '0', ...
true
true
f705b13cfc1cd5bcb7ec174f96d2acb2a724ac65
41
py
Python
lectures/code/mr_map.py
naskoch/python_course
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
[ "MIT" ]
4
2015-08-10T17:46:55.000Z
2020-04-18T21:09:03.000Z
lectures/code/mr_map.py
naskoch/python_course
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
[ "MIT" ]
null
null
null
lectures/code/mr_map.py
naskoch/python_course
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
[ "MIT" ]
2
2019-04-24T03:31:02.000Z
2019-05-13T07:36:06.000Z
f = lambda x: x + 1 map(f, [1, 2, 3, 4])
13.666667
20
0.439024
f = lambda x: x + 1 map(f, [1, 2, 3, 4])
true
true
f705b2b334785f83ba36f8f36add6d246c62f860
2,257
py
Python
slackbot_te/slackpi.py
wray/slack_em
ac4bc3c0a5c6c644582d9117a1111d1bfad3bf66
[ "MIT" ]
null
null
null
slackbot_te/slackpi.py
wray/slack_em
ac4bc3c0a5c6c644582d9117a1111d1bfad3bf66
[ "MIT" ]
null
null
null
slackbot_te/slackpi.py
wray/slack_em
ac4bc3c0a5c6c644582d9117a1111d1bfad3bf66
[ "MIT" ]
null
null
null
import os import time from slackclient import SlackClient import bot_id # Instructor and student imports import wray.slacklib import joe.slacklib import chris.slacklib # constants try: AT_BOT = "<@" + bot_id.get_id() + ">" except TypeError: pass # instantiate client slack_client = SlackClient(os.environ.get...
30.5
75
0.658839
import os import time from slackclient import SlackClient import bot_id import wray.slacklib import joe.slacklib import chris.slacklib try: AT_BOT = "<@" + bot_id.get_id() + ">" except TypeError: pass slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN')) def handle_command(command, channel): ...
true
true
f705b48143f78825bb5ce93336c2b928cbc14651
2,601
py
Python
venv/Lib/site-packages/phonenumbers/data/region_PH.py
HarisHijazi/mojarnik-server
bee7266609cc0bca7cc6a4059086fc0ba7219a33
[ "MIT" ]
null
null
null
venv/Lib/site-packages/phonenumbers/data/region_PH.py
HarisHijazi/mojarnik-server
bee7266609cc0bca7cc6a4059086fc0ba7219a33
[ "MIT" ]
2
2021-06-22T01:34:18.000Z
2021-06-22T01:40:28.000Z
venv/Lib/site-packages/phonenumbers/data/region_PH.py
HarisHijazi/mojarnik-server
bee7266609cc0bca7cc6a4059086fc0ba7219a33
[ "MIT" ]
null
null
null
"""Auto-generated file, do not edit by hand. PH metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_PH = PhoneMetadata(id='PH', country_code=63, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='1800\\d{7,9}|(?:2|[89]\\d{4})\\d{5}|[2-8]...
130.05
325
0.618608
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_PH = PhoneMetadata(id='PH', country_code=63, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='1800\\d{7,9}|(?:2|[89]\\d{4})\\d{5}|[2-8]\\d{8}|[28]\\d{7}', possible_length=(6, 8, 9, 10, 11, 12, 13...
true
true
f705b5f35286918ebf4f6eb85dc49797c87f040f
2,375
py
Python
ch05/myproject_virtualenv/src/django-myproject/myproject/apps/example/views.py
PacktPublishing/Django-3-Web-Development-Cookbook
6ffe6e0add93a43a9abaff62e0147dc1f4f5351a
[ "MIT" ]
159
2019-11-13T14:11:39.000Z
2022-03-24T05:47:10.000Z
ch05/myproject_virtualenv/src/django-myproject/myproject/apps/example/views.py
PacktPublishing/Django-3-Web-Development-Cookbook
6ffe6e0add93a43a9abaff62e0147dc1f4f5351a
[ "MIT" ]
34
2019-11-06T08:32:48.000Z
2022-01-14T11:31:29.000Z
ch05/myproject_virtualenv/src/django-myproject/myproject/apps/example/views.py
PacktPublishing/Django-3-Web-Development-Cookbook
6ffe6e0add93a43a9abaff62e0147dc1f4f5351a
[ "MIT" ]
103
2019-08-15T21:35:26.000Z
2022-03-20T05:29:11.000Z
# -*- coding: UTF-8 -*- from __future__ import unicode_literals from datetime import timedelta from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import render from django.utils.timezone import now as tz_now @login_required def start_page(request): # ...
67.857143
880
0.722947
from __future__ import unicode_literals from datetime import timedelta from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import render from django.utils.timezone import now as tz_now @login_required def start_page(request): obj = { "creat...
true
true
f705b6a65b0a1a3cce1c1b27d5be5e9b86cb5570
2,458
py
Python
python/athena/onnx/handler.py
sj1104/Het
81b7e9f0f593108db969fc46a1af3df74b825230
[ "Apache-2.0" ]
2
2021-12-05T07:11:04.000Z
2021-12-15T07:53:48.000Z
python/athena/onnx/handler.py
sj1104/Het
81b7e9f0f593108db969fc46a1af3df74b825230
[ "Apache-2.0" ]
null
null
null
python/athena/onnx/handler.py
sj1104/Het
81b7e9f0f593108db969fc46a1af3df74b825230
[ "Apache-2.0" ]
3
2021-04-01T22:39:13.000Z
2021-04-21T11:51:57.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import inspect from athena.onnx import constants ...
29.97561
92
0.6131
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import inspect from athena.onnx import constants class athena_op: _OPSETS = collections.OrderedDict() _MAPPING = None def __init_...
true
true
f705b7c9ba1ebdfedca5661e5e709e360e52da9e
4,993
py
Python
tutorials/resources/my429_qcomponents.py
TomVethaak/qiskit-metal
0fd3049b16a2b28dc6890b696d67329a91da70b9
[ "Apache-2.0" ]
167
2021-03-17T20:35:17.000Z
2022-03-31T13:25:04.000Z
tutorials/resources/my429_qcomponents.py
TomVethaak/qiskit-metal
0fd3049b16a2b28dc6890b696d67329a91da70b9
[ "Apache-2.0" ]
307
2021-03-17T14:07:43.000Z
2022-03-23T14:22:20.000Z
tutorials/resources/my429_qcomponents.py
TomVethaak/qiskit-metal
0fd3049b16a2b28dc6890b696d67329a91da70b9
[ "Apache-2.0" ]
122
2021-03-17T14:21:24.000Z
2022-03-18T10:09:38.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
38.705426
81
0.567795
from qiskit_metal import draw, Dict from qiskit_metal.qlibrary.core import QComponent class MyQComponent1(QComponent): def make(self): rect = draw.rectangle(0.5, 0.1, 0, 0) self.add_qgeometry('poly', {'my_polygon': rect}, layer=1, ...
true
true
f705b7eb5329fb67c4342d7f6f4f2089a9062d8f
1,324
py
Python
torchfes/colvar/fix.py
AkihideHayashi/torchfes1
83f01525e6071ffd7a884c8e108f9c25ba2b009b
[ "MIT" ]
null
null
null
torchfes/colvar/fix.py
AkihideHayashi/torchfes1
83f01525e6071ffd7a884c8e108f9c25ba2b009b
[ "MIT" ]
null
null
null
torchfes/colvar/fix.py
AkihideHayashi/torchfes1
83f01525e6071ffd7a884c8e108f9c25ba2b009b
[ "MIT" ]
null
null
null
import math from typing import Dict, Union, List import torch from torch import nn, Tensor from .. import properties as p def fix_msk(mol: Dict[str, Tensor], idx: Tensor): _, atm, dim = mol[p.pos].size() msk = torch.zeros([atm, dim], dtype=torch.bool, device=idx.device) msk[idx, :] = True return msk ...
27.020408
70
0.586858
import math from typing import Dict, Union, List import torch from torch import nn, Tensor from .. import properties as p def fix_msk(mol: Dict[str, Tensor], idx: Tensor): _, atm, dim = mol[p.pos].size() msk = torch.zeros([atm, dim], dtype=torch.bool, device=idx.device) msk[idx, :] = True return msk ...
true
true
f705b8a080b3d7d64d5acef4a26a5ac0ae6a0be5
675
py
Python
SfM/Traditional/ExtraCredit/ExtractCameraPose.py
akathpal/UMD-CMSC733-ComputerVision
f5fa21a0ada8ab8ea08a6c558f6df9676570a2df
[ "MIT" ]
1
2022-03-30T05:03:10.000Z
2022-03-30T05:03:10.000Z
SfM/Traditional/ExtraCredit/ExtractCameraPose.py
akathpal/UMD-CMSC733-ComputerVision
f5fa21a0ada8ab8ea08a6c558f6df9676570a2df
[ "MIT" ]
null
null
null
SfM/Traditional/ExtraCredit/ExtractCameraPose.py
akathpal/UMD-CMSC733-ComputerVision
f5fa21a0ada8ab8ea08a6c558f6df9676570a2df
[ "MIT" ]
1
2022-03-30T05:03:09.000Z
2022-03-30T05:03:09.000Z
import numpy as np import sys sys.dont_write_bytecode = True def ExtractCameraPose(E, K): U, S, V_T = np.linalg.svd(E) W = np.array([[0, -1, 0], [1, 0, 0], [0, 0, 1]]) # print("E svd U", U) # print("E svd S", S) # print("E svd U[:, 2]", U[:, 2]) R = [] C = [] R.append(np.dot(U, np.do...
21.774194
52
0.463704
import numpy as np import sys sys.dont_write_bytecode = True def ExtractCameraPose(E, K): U, S, V_T = np.linalg.svd(E) W = np.array([[0, -1, 0], [1, 0, 0], [0, 0, 1]]) R = [] C = [] R.append(np.dot(U, np.dot(W, V_T))) R.append(np.dot(U, np.dot(W, V_T))) R.append(np.dot(U, np....
true
true
f705b953a933a6e69681d0fcfe62b07584f75861
1,058
py
Python
app/user/views.py
frankRose1/recipe-app-api
0fff174ecb59bb06e6b631a33e34984e2f12f68a
[ "MIT" ]
null
null
null
app/user/views.py
frankRose1/recipe-app-api
0fff174ecb59bb06e6b631a33e34984e2f12f68a
[ "MIT" ]
null
null
null
app/user/views.py
frankRose1/recipe-app-api
0fff174ecb59bb06e6b631a33e34984e2f12f68a
[ "MIT" ]
null
null
null
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): """Create a new user in the s...
35.266667
74
0.780718
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): serializer_class = UserSerial...
true
true
f705b9da707722b21ab2a995b261c27870b2cf77
177,225
py
Python
app.py
Bomzz06/FDiscordA
e0be0bed91f843be1ab42564c8a774839ccaace0
[ "MIT" ]
null
null
null
app.py
Bomzz06/FDiscordA
e0be0bed91f843be1ab42564c8a774839ccaace0
[ "MIT" ]
null
null
null
app.py
Bomzz06/FDiscordA
e0be0bed91f843be1ab42564c8a774839ccaace0
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="h...
85.574602
16,258
0.683024
<!DOCTYPE html> <html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="h...
false
true
f705ba86509d02480a6aad1d5e160ac7369c37b3
748
py
Python
myblog/urls.py
kubruslihiga/djangotutorial
c13c5267761a4aaa422271b4220d8e724fccd37a
[ "Apache-2.0" ]
null
null
null
myblog/urls.py
kubruslihiga/djangotutorial
c13c5267761a4aaa422271b4220d8e724fccd37a
[ "Apache-2.0" ]
null
null
null
myblog/urls.py
kubruslihiga/djangotutorial
c13c5267761a4aaa422271b4220d8e724fccd37a
[ "Apache-2.0" ]
null
null
null
"""myblog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
34
77
0.708556
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f705bbab14c4d76328f030a10cda3c1c25aff596
63
py
Python
test.sh.py
MarcAntoineAlex/query-selector-1
f41938e5b4661c7df7d02a2a0ef841921d14d4f6
[ "Apache-2.0" ]
null
null
null
test.sh.py
MarcAntoineAlex/query-selector-1
f41938e5b4661c7df7d02a2a0ef841921d14d4f6
[ "Apache-2.0" ]
null
null
null
test.sh.py
MarcAntoineAlex/query-selector-1
f41938e5b4661c7df7d02a2a0ef841921d14d4f6
[ "Apache-2.0" ]
null
null
null
a = [0, 1, 2] b = [0, 1] for a, b in zip(a, b): print(a, b)
15.75
22
0.412698
a = [0, 1, 2] b = [0, 1] for a, b in zip(a, b): print(a, b)
true
true
f705bbcb1c4c4102c9bcfce19fd7880e846a49e3
3,851
py
Python
python业务代码/地图散点可视化/2/plot_city_machine.py
RobinYaoWenbin/Python-CommonCode
1ee714541f2fd9c8b96d018d3d4eb94f4edc812a
[ "MIT" ]
12
2020-09-28T03:25:03.000Z
2022-03-20T07:44:09.000Z
python业务代码/地图散点可视化/2/plot_city_machine.py
RobinYaoWenbin/Python-CommonCode
1ee714541f2fd9c8b96d018d3d4eb94f4edc812a
[ "MIT" ]
null
null
null
python业务代码/地图散点可视化/2/plot_city_machine.py
RobinYaoWenbin/Python-CommonCode
1ee714541f2fd9c8b96d018d3d4eb94f4edc812a
[ "MIT" ]
21
2020-03-19T00:44:35.000Z
2022-01-30T03:46:18.000Z
# -*- coding: utf-8 -*- """ Created on Wed Aug 7 09:36:45 2019 @author: MyPC """ import pandas as pd import matplotlib.pyplot as plt import matplotlib import math import pymssql import numpy as np import copy import re from sklearn import preprocessing from sklearn.linear_model import LinearRegression...
47.54321
317
0.579849
import pandas as pd import matplotlib.pyplot as plt import matplotlib import math import pymssql import numpy as np import copy import re from sklearn import preprocessing from sklearn.linear_model import LinearRegression from pyecharts import Map, Geo , Timeline def get_data_signalmachine(): df = pd...
true
true
f705bf3cfd5f5c6cac8ba32067f41aadcc0e38d6
34,521
py
Python
autodp/rdp_acct.py
jeremy43/autodp-1
0a3626f6e1baaefb46715396998d1e8029a659bb
[ "Apache-2.0" ]
2
2020-06-11T02:48:41.000Z
2020-11-17T07:04:01.000Z
autodp/rdp_acct.py
jeremy43/autodp-1
0a3626f6e1baaefb46715396998d1e8029a659bb
[ "Apache-2.0" ]
null
null
null
autodp/rdp_acct.py
jeremy43/autodp-1
0a3626f6e1baaefb46715396998d1e8029a659bb
[ "Apache-2.0" ]
null
null
null
""" This file contains the implementation of the main class object: anaRDPacct --- an analytical moment accountant that keeps track the effects of a hetereogeneous sequence of randomized algorithms using the RDP technique. In particular it supports amplification of RDP by subsampling without replacement and the ampli...
44.658473
125
0.534312
import numpy as np from scipy.optimize import minimize_scalar import sys sys.path.append('..') import autodp from autodp import utils, rdp_bank from autodp.privacy_calibrator import subsample_epsdelta import scipy import math def general_upperbound(func, mm, prob): def cgf(x): return (x - 1) * func(...
true
true
f705c04fa8bb30cc2be892362cc4af89d3328301
1,297
py
Python
test/test_utils/test_statistical_tests.py
deslay1/CAVE
e4b9abc3812034f49dddd27ffc17dbab39782a1c
[ "BSD-3-Clause" ]
45
2018-01-11T11:26:11.000Z
2021-06-22T06:14:39.000Z
test/test_utils/test_statistical_tests.py
deslay1/CAVE
e4b9abc3812034f49dddd27ffc17dbab39782a1c
[ "BSD-3-Clause" ]
150
2017-12-20T16:14:45.000Z
2021-09-28T11:26:33.000Z
test/test_utils/test_statistical_tests.py
automl/SpySMAC
afcbecd0b9cb97276625c16a89cb6df141e6f6f2
[ "BSD-3-Clause" ]
17
2018-03-17T04:46:09.000Z
2021-02-18T18:31:38.000Z
import logging import unittest import numpy as np from cave.utils.statistical_tests import paired_permutation, paired_t_student class TestStatisticalTests(unittest.TestCase): def setUp(self): self.logger = logging.getLogger("TestStatisticalTests") def test_paired_permutation(self): """ Tes...
37.057143
77
0.651503
import logging import unittest import numpy as np from cave.utils.statistical_tests import paired_permutation, paired_t_student class TestStatisticalTests(unittest.TestCase): def setUp(self): self.logger = logging.getLogger("TestStatisticalTests") def test_paired_permutation(self): rng = n...
true
true
f705c09c479088d7f96725e5df722801a0715965
5,653
py
Python
ibmsecurity/isam/base/network/felb/services/servers.py
ibm-enio/ibmsecurity
81f989678642c3b6a49b2a3fbb5d9ca98804ef17
[ "Apache-2.0" ]
2
2019-12-05T13:51:10.000Z
2019-12-20T08:02:35.000Z
ibmsecurity/isam/base/network/felb/services/servers.py
ibm-enio/ibmsecurity
81f989678642c3b6a49b2a3fbb5d9ca98804ef17
[ "Apache-2.0" ]
null
null
null
ibmsecurity/isam/base/network/felb/services/servers.py
ibm-enio/ibmsecurity
81f989678642c3b6a49b2a3fbb5d9ca98804ef17
[ "Apache-2.0" ]
1
2020-04-03T09:30:01.000Z
2020-04-03T09:30:01.000Z
import ibmsecurity.utilities.tools import logging logger = logging.getLogger(__name__) module_uri = "/isam/felb/configuration/services/" requires_modulers = None requires_version = None def add(isamAppliance, service_name, address, active, port, weight, secure, ssllabel, check_mode=False, force=False): """ ...
38.195946
120
0.552096
import ibmsecurity.utilities.tools import logging logger = logging.getLogger(__name__) module_uri = "/isam/felb/configuration/services/" requires_modulers = None requires_version = None def add(isamAppliance, service_name, address, active, port, weight, secure, ssllabel, check_mode=False, force=False): change_r...
true
true
f705c13bef4357c4b974d68a76c4f8617f700d7c
1,417
py
Python
tensorflow_probability/python/version.py
bolcom/probability
4a11efad1ecd8a1336e4c9fdb0105efbf2375ad7
[ "Apache-2.0" ]
1
2019-10-10T06:15:42.000Z
2019-10-10T06:15:42.000Z
tensorflow_probability/python/version.py
bolcom/probability
4a11efad1ecd8a1336e4c9fdb0105efbf2375ad7
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/version.py
bolcom/probability
4a11efad1ecd8a1336e4c9fdb0105efbf2375ad7
[ "Apache-2.0" ]
1
2020-05-27T19:42:06.000Z
2020-05-27T19:42:06.000Z
# Copyright 2018 The TensorFlow Probability 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 o...
38.297297
80
0.703599
_MAJOR_VERSION = '0' _MINOR_VERSION = '9' _PATCH_VERSION = '0' _VERSION_SUFFIX = 'dev' __version__ = '.'.join([ _MAJOR_VERSION, _MINOR_VERSION, _PATCH_VERSION, ]) if _VERSION_SUFFIX: __version__ = '{}-{}'.format(__version__, _VERSION_SUFFIX)
true
true
f705c143029f1b8fb5a082a334e82961e60babb9
3,371
py
Python
model_zoo/mnist/mnist_functional_api.py
zuston/elasticdl
601609fd44f826a2f5ea209443124b2c9a2f9ccb
[ "MIT" ]
null
null
null
model_zoo/mnist/mnist_functional_api.py
zuston/elasticdl
601609fd44f826a2f5ea209443124b2c9a2f9ccb
[ "MIT" ]
null
null
null
model_zoo/mnist/mnist_functional_api.py
zuston/elasticdl
601609fd44f826a2f5ea209443124b2c9a2f9ccb
[ "MIT" ]
null
null
null
# Copyright 2020 The ElasticDL 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 applicable law...
32.413462
77
0.644616
import numpy as np import PIL.Image import tensorflow as tf from elasticdl.python.common.constants import Mode def custom_model(): inputs = tf.keras.Input(shape=(28, 28), name="image") x = tf.keras.layers.Reshape((28, 28, 1))(inputs) x = tf.keras.layers.Conv2D(32, kernel_size=(3, 3), activation="relu")(...
true
true
f705c37d2339c79f6a9a632cefaf65a79808d37d
1,720
py
Python
2015/CVE-2015-5688/poc/pocsploit/CVE-2015-5688.py
hjyuan/reapoc
ef515e56c44c2590ff8601582bf6c08e076e7083
[ "Apache-2.0" ]
421
2021-12-07T08:46:40.000Z
2022-03-31T12:42:16.000Z
2015/CVE-2015-5688/poc/pocsploit/CVE-2015-5688.py
hjyuan/reapoc
ef515e56c44c2590ff8601582bf6c08e076e7083
[ "Apache-2.0" ]
5
2022-03-27T07:37:32.000Z
2022-03-31T13:56:11.000Z
2015/CVE-2015-5688/poc/pocsploit/CVE-2015-5688.py
hjyuan/reapoc
ef515e56c44c2590ff8601582bf6c08e076e7083
[ "Apache-2.0" ]
144
2021-12-07T11:06:14.000Z
2022-03-31T07:41:35.000Z
import requests # Vuln Base Info def info(): return { "author": "cckuailong", "name": '''Geddy before v13.0.8 LFI''', "description": '''Directory traversal vulnerability in lib/app/index.js in Geddy before 13.0.8 for Node.js allows remote attackers to read arbitrary files via a ..%2f (dot ...
26.875
239
0.533721
import requests def info(): return { "author": "cckuailong", "name": '''Geddy before v13.0.8 LFI''', "description": '''Directory traversal vulnerability in lib/app/index.js in Geddy before 13.0.8 for Node.js allows remote attackers to read arbitrary files via a ..%2f (dot dot encoded slash...
true
true
f705c380c38b745a99107f2f972df3893011b4c5
64
py
Python
Factorial digit sum/main.py
Skogrine/ProjectEuler
40e104ac91852dec66b5b7938d6553d1bbdc590f
[ "Apache-2.0" ]
null
null
null
Factorial digit sum/main.py
Skogrine/ProjectEuler
40e104ac91852dec66b5b7938d6553d1bbdc590f
[ "Apache-2.0" ]
null
null
null
Factorial digit sum/main.py
Skogrine/ProjectEuler
40e104ac91852dec66b5b7938d6553d1bbdc590f
[ "Apache-2.0" ]
null
null
null
import math n = 100 print(sum(map(int, str(math.factorial(n)))))
21.333333
44
0.703125
import math n = 100 print(sum(map(int, str(math.factorial(n)))))
true
true
f705c4e287fb6d6f6989f47abb2afa301f8bd782
2,415
py
Python
blend.py
andrewdownie/BlendAway
daf73b22c29dfa905fbe8e838188d4df5861ae5d
[ "MIT" ]
null
null
null
blend.py
andrewdownie/BlendAway
daf73b22c29dfa905fbe8e838188d4df5861ae5d
[ "MIT" ]
null
null
null
blend.py
andrewdownie/BlendAway
daf73b22c29dfa905fbe8e838188d4df5861ae5d
[ "MIT" ]
null
null
null
import os import sys import numpy as np import cv2 import statistics import datetime def getMedian(arr, x, y): values = [] for a in arr: values.append(a[x][y]) return statistics.median_grouped(values) def getMean(arr, x, y): values = [] for a in arr: values.append(a[x][y]) retu...
25.15625
68
0.59089
import os import sys import numpy as np import cv2 import statistics import datetime def getMedian(arr, x, y): values = [] for a in arr: values.append(a[x][y]) return statistics.median_grouped(values) def getMean(arr, x, y): values = [] for a in arr: values.append(a[x][y]) retu...
true
true
f705c4fc494cdf40b01b01fb964de724d9ee0942
1,205
py
Python
AccessKeysInDictionary.py
Snehasis124/PythonTutorials
133060cd4f2126dbc427a724b831834e90c26fdc
[ "Apache-2.0" ]
null
null
null
AccessKeysInDictionary.py
Snehasis124/PythonTutorials
133060cd4f2126dbc427a724b831834e90c26fdc
[ "Apache-2.0" ]
null
null
null
AccessKeysInDictionary.py
Snehasis124/PythonTutorials
133060cd4f2126dbc427a724b831834e90c26fdc
[ "Apache-2.0" ]
null
null
null
#9TH PROGRAM # THIS PROGRAM WILL HELP IN ACCESSING DICTIONARY ITEMS AND PERFROM CERTAIN OPERATIONS WITH DICTIONARY ages = {} #EMPTY DICTIONARY ages["Micky"] = 24 ages["Lucky"] = 25 print(ages) keys = ages.keys # .keys prints all the keys avaialble in Dictionary print(keys) values = ages.values # .values prints a...
23.173077
101
0.687137
ages = {} ages["Micky"] = 24 ages["Lucky"] = 25 print(ages) keys = ages.keys print(keys) values = ages.values print(values) print(sorted(ages)) print(ages.values) if("Micky" in ages): print("Micky is there") else: print("Micky is not there") print(len(ages)) ages = {"Snehasis" : "24" , "Sradhasis" :...
true
true
f705c51665ca83673376bc29d03db188df991c5f
2,970
py
Python
PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from __future__ import print_function import itertools from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle from PhysicsTools.HeppyCore.framework.event import Event from PhysicsTools.HeppyCore.statistics.counter import Counter, Counters fr...
40.684932
121
0.619865
from __future__ import print_function import itertools from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle from PhysicsTools.HeppyCore.framework.event import Event from PhysicsTools.HeppyCore.statistics.counter import Counter, Counters fr...
true
true
f705c5f7c4974cac5efeddeb4787732c80472742
114
py
Python
blog/admin.py
EvaZogg/DjangoTranslationWebsite
3946c052547deed216332cb316f48fc70c09ff22
[ "BSD-2-Clause" ]
null
null
null
blog/admin.py
EvaZogg/DjangoTranslationWebsite
3946c052547deed216332cb316f48fc70c09ff22
[ "BSD-2-Clause" ]
null
null
null
blog/admin.py
EvaZogg/DjangoTranslationWebsite
3946c052547deed216332cb316f48fc70c09ff22
[ "BSD-2-Clause" ]
null
null
null
from django.contrib import admin from .models import blog # Register your models here. admin.site.register(blog)
19
32
0.798246
from django.contrib import admin from .models import blog admin.site.register(blog)
true
true
f705c6c1705b01df89f15b731ab6fc18b82c61cd
6,579
py
Python
payload/usr/local/sal/checkin_modules/munki_checkin.py
forvitinn/sal-scripts
585934f641732b29c0f0be9072b32606ccc8e96a
[ "Apache-2.0" ]
23
2015-08-04T22:56:55.000Z
2022-02-14T12:41:23.000Z
payload/usr/local/sal/checkin_modules/munki_checkin.py
forvitinn/sal-scripts
585934f641732b29c0f0be9072b32606ccc8e96a
[ "Apache-2.0" ]
40
2016-01-28T17:29:52.000Z
2021-11-12T04:22:48.000Z
payload/usr/local/sal/checkin_modules/munki_checkin.py
forvitinn/sal-scripts
585934f641732b29c0f0be9072b32606ccc8e96a
[ "Apache-2.0" ]
45
2015-08-04T00:12:28.000Z
2022-02-21T20:06:40.000Z
#!/usr/local/sal/Python.framework/Versions/Current/bin/python3 import datetime import pathlib import plistlib import sys import sal sys.path.insert(0, "/usr/local/munki") from munkilib import munkicommon __version__ = "1.2.0" def main(): # If we haven't successfully submitted to Sal, pull the existing #...
35.370968
91
0.622739
import datetime import pathlib import plistlib import sys import sal sys.path.insert(0, "/usr/local/munki") from munkilib import munkicommon __version__ = "1.2.0" def main(): # munki section rather than start from scratch, as we want to # keep any install/removal history that may be there. munki...
true
true
f705c7a4e86112d7fbf69a0db1bd54f293460d18
200
py
Python
jscaller/_compatiable.py
ZSAIm/PyJSCaller
086b3a0bf57f9c42c4d9c3cea6e7cdad5f52059d
[ "Apache-2.0" ]
31
2019-05-06T03:07:58.000Z
2022-02-09T02:00:46.000Z
jscaller/_compatiable.py
zackmark29/PyJSCaller
086b3a0bf57f9c42c4d9c3cea6e7cdad5f52059d
[ "Apache-2.0" ]
1
2019-07-05T12:43:34.000Z
2019-07-26T08:22:19.000Z
jscaller/_compatiable.py
zackmark29/PyJSCaller
086b3a0bf57f9c42c4d9c3cea6e7cdad5f52059d
[ "Apache-2.0" ]
10
2019-05-07T06:35:21.000Z
2021-09-27T02:48:40.000Z
__all__ = ["PY2", "PY3"] import sys if sys.version_info[0] == 2: PY2 = True PY3 = False elif sys.version_info[0] == 3: PY2 = False PY3 = True else: PY2 = False PY3 = False
12.5
30
0.56
__all__ = ["PY2", "PY3"] import sys if sys.version_info[0] == 2: PY2 = True PY3 = False elif sys.version_info[0] == 3: PY2 = False PY3 = True else: PY2 = False PY3 = False
true
true
f705c7f93432895a83a22e63702790a8a3602602
25,944
py
Python
Platform/ApollolakeBoardPkg/Script/StitchLoader.py
aimanrosli23/slimbootloader
bce49fbc5ac125cccf4f647e786409f49a026769
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
1
2022-03-04T18:23:35.000Z
2022-03-04T18:23:35.000Z
Platform/ApollolakeBoardPkg/Script/StitchLoader.py
aimanrosli23/slimbootloader
bce49fbc5ac125cccf4f647e786409f49a026769
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
null
null
null
Platform/ApollolakeBoardPkg/Script/StitchLoader.py
aimanrosli23/slimbootloader
bce49fbc5ac125cccf4f647e786409f49a026769
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
null
null
null
## @ StitchLoader.py # This is a python stitching script for Slim Bootloader APL build # # Copyright (c) 2018 - 2022, Intel Corporation. All rights reserved. <BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## import os import re import sys import struct import argparse import zipfile import shutil from ctypes i...
38.896552
154
0.590772
import os import re import sys import struct import argparse import zipfile import shutil from ctypes import * from subprocess import check_output from functools import reduce sys.dont_write_bytecode = True sblopen_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../')) if not os.path.exists (sbl...
true
true
f705c96c12e4e0c7f7af29723e12d8fbcdab4c40
907
py
Python
src/mouse_controller.py
NAITTOU/computer_pointer_controller
b36ce51e7638543b54da1abe56f7ae54eb21918f
[ "MIT" ]
1
2020-09-04T06:28:43.000Z
2020-09-04T06:28:43.000Z
src/mouse_controller.py
NAITTOU/computer_pointer_controller
b36ce51e7638543b54da1abe56f7ae54eb21918f
[ "MIT" ]
1
2022-01-13T02:59:41.000Z
2022-01-13T02:59:41.000Z
src/mouse_controller.py
NAITTOU/computer_pointer_controller
b36ce51e7638543b54da1abe56f7ae54eb21918f
[ "MIT" ]
null
null
null
''' This is a sample class that you can use to control the mouse pointer. It uses the pyautogui library. You can set the precision for mouse movement (how much the mouse moves) and the speed (how fast it moves) by changing precision_dict and speed_dict. Calling the move function with the x and y output of the gaze est...
43.190476
122
0.732084
import pyautogui pyautogui.FAILSAFE = False class MouseController: def __init__(self, precision, speed): precision_dict={'high':100, 'low':1000, 'medium':500} speed_dict={'fast':1, 'slow':10, 'medium':5} self.precision=precision_dict[precision] self.speed=speed_dict[speed] def ...
true
true
f705c9972c508fc15446070fc555ad919151b644
1,253
py
Python
alipay/aop/api/domain/AntOcrVehicleplateIdentifyModel.py
alipay/alipay-sdk-python-all
1b63620431d982d30d39ee0adc4b92463cbcee3c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AntOcrVehicleplateIdentifyModel.py
alipay/alipay-sdk-python-all
1b63620431d982d30d39ee0adc4b92463cbcee3c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AntOcrVehicleplateIdentifyModel.py
alipay/alipay-sdk-python-all
1b63620431d982d30d39ee0adc4b92463cbcee3c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AntOcrVehicleplateIdentifyModel(object): def __init__(self): self._image = None self._type = None @property def image(self): return self._image @image.setter...
22.375
61
0.545092
import json from alipay.aop.api.constant.ParamConstants import * class AntOcrVehicleplateIdentifyModel(object): def __init__(self): self._image = None self._type = None @property def image(self): return self._image @image.setter def image(self, value): self._ima...
true
true
f705ca0b99c4431c3fdc996319aa370d49c274ac
1,827
py
Python
newDataAnalytics.py
PeterJWei/EnergyFootprinting
0396efba7d4e6863452e322f9f7561c6cd756478
[ "MIT" ]
null
null
null
newDataAnalytics.py
PeterJWei/EnergyFootprinting
0396efba7d4e6863452e322f9f7561c6cd756478
[ "MIT" ]
null
null
null
newDataAnalytics.py
PeterJWei/EnergyFootprinting
0396efba7d4e6863452e322f9f7561c6cd756478
[ "MIT" ]
null
null
null
import json import web import calendar import datetime import cloudserver urls = ( "/BuildingFootprint/", "BuildingFootprint", "/BuildingFootprintDisaggregated/", "BuildingFootprintDisaggregated", "/PersonalConsumption/", "PersonalConsumption", "/HistoricalConsumption/", "HistoricalConsumption") class BuildingFoo...
26.478261
85
0.727422
import json import web import calendar import datetime import cloudserver urls = ( "/BuildingFootprint/", "BuildingFootprint", "/BuildingFootprintDisaggregated/", "BuildingFootprintDisaggregated", "/PersonalConsumption/", "PersonalConsumption", "/HistoricalConsumption/", "HistoricalConsumption") class BuildingFoo...
true
true
f705ca2749b113501167b31f27c6bb73734fd6c0
2,235
py
Python
openpose/model/detector/generalized_rcnn.py
leehsiu/pyopenpose
c4feef04a9e563fb91e18f745bc187c6f2aeb72c
[ "MIT" ]
null
null
null
openpose/model/detector/generalized_rcnn.py
leehsiu/pyopenpose
c4feef04a9e563fb91e18f745bc187c6f2aeb72c
[ "MIT" ]
null
null
null
openpose/model/detector/generalized_rcnn.py
leehsiu/pyopenpose
c4feef04a9e563fb91e18f745bc187c6f2aeb72c
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """ Implements the Generalized R-CNN framework """ import torch from torch import nn from openpose.structures.image_list import to_image_list from ..backbone import build_backbone from ..rpn.rpn import build_rpn from ..roi_heads.roi_heads import...
34.384615
87
0.644295
import torch from torch import nn from openpose.structures.image_list import to_image_list from ..backbone import build_backbone from ..rpn.rpn import build_rpn from ..roi_heads.roi_heads import build_roi_heads class GeneralizedRCNN(nn.Module): def __init__(self, cfg): super(GeneralizedRCNN, self).__i...
true
true
f705cb12d2f7098d80c81f26b124cf8f7a03cf9a
1,441
py
Python
deltalanguage/test/runtime/test_runtime.py
riverlane/deltalanguage
41c3cfa88ed3f17956645c18566c2147a4bdd74c
[ "MIT" ]
16
2021-01-06T17:44:51.000Z
2022-01-06T12:07:07.000Z
deltalanguage/test/runtime/test_runtime.py
riverlane/deltalanguage
41c3cfa88ed3f17956645c18566c2147a4bdd74c
[ "MIT" ]
null
null
null
deltalanguage/test/runtime/test_runtime.py
riverlane/deltalanguage
41c3cfa88ed3f17956645c18566c2147a4bdd74c
[ "MIT" ]
4
2021-03-25T20:35:08.000Z
2021-09-06T13:10:58.000Z
"""Test DeltaPySimulator functionality pre-execution.""" import unittest import deltalanguage as dl from deltalanguage.test._graph_lib import (getg_const_chain, getg_optional_queues) class DeltaQueueCreationTest(unittest.TestCase): """Test that the simulator creates q...
33.511628
79
0.651631
import unittest import deltalanguage as dl from deltalanguage.test._graph_lib import (getg_const_chain, getg_optional_queues) class DeltaQueueCreationTest(unittest.TestCase): def test_queue_types(self): graph = getg_const_chain() dl.DeltaPySimulator(g...
true
true
f705cc3c3ee5b9fb1d0983e8eed642f662f1aec3
11,417
py
Python
cnn_claim_classification/preprocess_data_verify.py
UKPLab/coling2016-claim-classification-
e8ef5305a772b18efcaae2d18aa138b4f7a0e294
[ "BSD-3-Clause" ]
9
2016-12-19T17:16:34.000Z
2020-11-02T12:32:14.000Z
cnn_claim_classification/preprocess_data_verify.py
UKPLab/coling2016-claim-classification-
e8ef5305a772b18efcaae2d18aa138b4f7a0e294
[ "BSD-3-Clause" ]
1
2018-07-04T11:07:31.000Z
2018-07-04T11:07:31.000Z
cnn_claim_classification/preprocess_data_verify.py
UKPLab/coling2016-claim-classification-
e8ef5305a772b18efcaae2d18aa138b4f7a0e294
[ "BSD-3-Clause" ]
3
2017-04-26T16:49:25.000Z
2020-02-26T12:31:05.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Program to preprocess training and test data using word2vec, dep2vec and fact2vec embeddings and prepare corresponding weight vectors to be used in CNN Copyright (C) 2016 Ubiquitous Knowledge Processing (UKP) Lab Technische Universität Darmstadt Licensed under the Ap...
35.346749
568
0.581852
""" Program to preprocess training and test data using word2vec, dep2vec and fact2vec embeddings and prepare corresponding weight vectors to be used in CNN Copyright (C) 2016 Ubiquitous Knowledge Processing (UKP) Lab Technische Universität Darmstadt Licensed under the Apache License, Version 2.0 (the "License"); you...
false
true
f705cca2c11cb0eec1833939de1b8673fc58b816
62,891
py
Python
lib/listeners/http.py
bit-St0rm/Empire
0d3295be5b4ab01703d330d2c748a1b9f0a28695
[ "BSD-3-Clause" ]
null
null
null
lib/listeners/http.py
bit-St0rm/Empire
0d3295be5b4ab01703d330d2c748a1b9f0a28695
[ "BSD-3-Clause" ]
null
null
null
lib/listeners/http.py
bit-St0rm/Empire
0d3295be5b4ab01703d330d2c748a1b9f0a28695
[ "BSD-3-Clause" ]
null
null
null
import logging import base64 import sys import random import string import os import ssl import time import copy import json import sys from pydispatch import dispatcher from flask import Flask, request, make_response, send_from_directory # Empire imports from lib.common import helpers from lib.common import agents fro...
49.755538
495
0.519677
import logging import base64 import sys import random import string import os import ssl import time import copy import json import sys from pydispatch import dispatcher from flask import Flask, request, make_response, send_from_directory from lib.common import helpers from lib.common import agents from lib.common impo...
false
true
f705ceaa19f72aa3d963f72c85586a1a32e6de9b
101
py
Python
main.py
onkarsherkar/flask-web-app-tutorail
add0fa67c4c02d93b95c90c61671f02ea1b3d029
[ "MIT" ]
null
null
null
main.py
onkarsherkar/flask-web-app-tutorail
add0fa67c4c02d93b95c90c61671f02ea1b3d029
[ "MIT" ]
null
null
null
main.py
onkarsherkar/flask-web-app-tutorail
add0fa67c4c02d93b95c90c61671f02ea1b3d029
[ "MIT" ]
null
null
null
from website import create_app app = create_app() if __name__== '__main__': app.run(debug=True)
14.428571
30
0.722772
from website import create_app app = create_app() if __name__== '__main__': app.run(debug=True)
true
true
f705cf0495bceae4e5ea4f4df95a6ec02a280af1
3,195
py
Python
tools/src/service/entry_pusher.py
Symthy/blog-index-manager
d0c2e0b265b35be7cdb5aead1f1543f4b0306bdf
[ "MIT" ]
null
null
null
tools/src/service/entry_pusher.py
Symthy/blog-index-manager
d0c2e0b265b35be7cdb5aead1f1543f4b0306bdf
[ "MIT" ]
1
2022-01-29T08:28:36.000Z
2022-01-29T08:28:36.000Z
tools/src/service/entry_pusher.py
Symthy/blog-index-manager
d0c2e0b265b35be7cdb5aead1f1543f4b0306bdf
[ "MIT" ]
null
null
null
from typing import List from blogs.api.interface import IBlogApiExecutor from domain.blog.blog_entry import BlogEntry, BlogEntries from domain.doc.doc_entry import DocEntries, DocEntry from dump.blog_to_doc_mapping import BlogDocEntryMapping from dump.interface import IDumpEntriesAccessor from files.conf.category_grou...
59.166667
116
0.746166
from typing import List from blogs.api.interface import IBlogApiExecutor from domain.blog.blog_entry import BlogEntry, BlogEntries from domain.doc.doc_entry import DocEntries, DocEntry from dump.blog_to_doc_mapping import BlogDocEntryMapping from dump.interface import IDumpEntriesAccessor from files.conf.category_grou...
true
true
f705d15166e8684268640b17b721182297f2ea28
330
py
Python
bluebottle/cms/migrations/0015_merge_20161219_0946.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/cms/migrations/0015_merge_20161219_0946.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/cms/migrations/0015_merge_20161219_0946.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-19 08:46 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0014_auto_20161216_1359'), ('cms', '0014_auto_20161216_1424'), ] operations ...
19.411765
48
0.654545
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0014_auto_20161216_1359'), ('cms', '0014_auto_20161216_1424'), ] operations = [ ]
true
true
f705d1668beb8e7029c97be27c6db88af67d97b3
4,213
py
Python
planemo/galaxy/api.py
pvanheus/planemo
12c4256325bb1b274dcd40d64b91c1f832cf49b1
[ "CC-BY-3.0" ]
null
null
null
planemo/galaxy/api.py
pvanheus/planemo
12c4256325bb1b274dcd40d64b91c1f832cf49b1
[ "CC-BY-3.0" ]
1
2016-09-14T18:09:59.000Z
2016-09-14T18:09:59.000Z
planemo/galaxy/api.py
jmchilton/planemo
d352a085fe10cb6b7c1384663b114201da42d97b
[ "CC-BY-3.0" ]
null
null
null
"""A high-level interface to local Galaxy instances using bioblend.""" from six import StringIO from planemo.bioblend import ensure_module from planemo.bioblend import galaxy DEFAULT_MASTER_API_KEY = "test_key" def gi(port=None, url=None, key=None): """Return a bioblend ``GalaxyInstance`` for Galaxy on this por...
36.318966
121
0.635652
from six import StringIO from planemo.bioblend import ensure_module from planemo.bioblend import galaxy DEFAULT_MASTER_API_KEY = "test_key" def gi(port=None, url=None, key=None): ensure_module() if key is None: key = DEFAULT_MASTER_API_KEY if port is None: url = url else: url...
true
true
f705d2280b305e92ead506194e8bf7b9a79b98f6
2,143
py
Python
setup.py
chowmean/DBSheet
3f1c521320cb3564c4ff55cd70c8a1978dd32a4c
[ "Apache-2.0" ]
3
2017-08-18T20:04:12.000Z
2021-01-08T12:23:43.000Z
setup.py
chowmean/DBSheet
3f1c521320cb3564c4ff55cd70c8a1978dd32a4c
[ "Apache-2.0" ]
1
2021-06-01T23:13:57.000Z
2021-06-01T23:13:57.000Z
setup.py
chowmean/DBSheet
3f1c521320cb3564c4ff55cd70c8a1978dd32a4c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Python installation script # Author - @chowmean from __future__ import print_function import os.path import sys import setuptools # Project variables VER_PROP_FILE = os.path.join(os.path.dirname(__file__), 'version.properties') REQUIREMENTS_FILE = os.path.join(os.path.dirname(__file__), 'req...
29.763889
79
0.643957
from __future__ import print_function import os.path import sys import setuptools VER_PROP_FILE = os.path.join(os.path.dirname(__file__), 'version.properties') REQUIREMENTS_FILE = os.path.join(os.path.dirname(__file__), 'requirements.txt') CLASSIFIERS = [ "Programming Language :: Python", "Operating System ::...
true
true
f705d35f606de1dd5f2d3137aa565c331846f652
5,403
py
Python
djangoratings/managers.py
adw0rd/django-ratings
941048e05a14bb997966fe1d4e8fd638ee66d76f
[ "BSD-2-Clause" ]
1
2021-04-29T11:19:47.000Z
2021-04-29T11:19:47.000Z
djangoratings/managers.py
adw0rd/django-ratings
941048e05a14bb997966fe1d4e8fd638ee66d76f
[ "BSD-2-Clause" ]
null
null
null
djangoratings/managers.py
adw0rd/django-ratings
941048e05a14bb997966fe1d4e8fd638ee66d76f
[ "BSD-2-Clause" ]
null
null
null
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached to the model."""...
45.403361
145
0.594855
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): from fields import RatingField qs = self.distinct().values_list('co...
true
true
f705d6c189996ed6849395984a8050289ed6a38d
3,224
py
Python
django_tdd/settings.py
migueleichler/django-tdd
5b8bd6088b5e2de4d70026b761391bce3aa52f32
[ "MIT" ]
null
null
null
django_tdd/settings.py
migueleichler/django-tdd
5b8bd6088b5e2de4d70026b761391bce3aa52f32
[ "MIT" ]
null
null
null
django_tdd/settings.py
migueleichler/django-tdd
5b8bd6088b5e2de4d70026b761391bce3aa52f32
[ "MIT" ]
null
null
null
""" Django settings for django_tdd project. Generated by 'django-admin startproject' using Django 1.9.12. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import o...
26
91
0.700682
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'axh7uu^+yfch=#hjgozv%trd3ai55m%xb83=39o4n-y#gk$y6o' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f705d6ce7500355546b594150038c8315daf1d0a
9,140
py
Python
tests/utils/cpython.py
netcharm/ironclad
5892c43b540b216d638e0fed2e6cf3fd8289fdfc
[ "PSF-2.0" ]
null
null
null
tests/utils/cpython.py
netcharm/ironclad
5892c43b540b216d638e0fed2e6cf3fd8289fdfc
[ "PSF-2.0" ]
null
null
null
tests/utils/cpython.py
netcharm/ironclad
5892c43b540b216d638e0fed2e6cf3fd8289fdfc
[ "PSF-2.0" ]
null
null
null
from System import IntPtr from System.Runtime.InteropServices import Marshal import Ironclad from Ironclad import CPyMarshal from Ironclad.Structs import METH, Py_TPFLAGS, PyGetSetDef, PyMemberDef, PyMethodDef, PyTypeObject from tests.utils.memory import OffsetPtr def _new_struct(type_, fields, *v...
35.426357
110
0.67954
from System import IntPtr from System.Runtime.InteropServices import Marshal import Ironclad from Ironclad import CPyMarshal from Ironclad.Structs import METH, Py_TPFLAGS, PyGetSetDef, PyMemberDef, PyMethodDef, PyTypeObject from tests.utils.memory import OffsetPtr def _new_struct(type_, fields, *v...
true
true
f705d6e28e10770948eaf92986fd5dda9272df1d
19,432
py
Python
model.py
UrusuLambda/pix2pix-tensorflow
9b1e832494f8b8b36ad2d0331cb5feda5bd65ce0
[ "MIT" ]
1,014
2016-11-25T14:03:59.000Z
2022-03-26T14:57:07.000Z
model.py
Chediak/pix2pix-tensorflow
ba40020706ad3a1fbefa1da7bc7a05b7b031fb9e
[ "MIT" ]
35
2016-11-27T14:31:40.000Z
2020-10-19T15:37:14.000Z
model.py
Chediak/pix2pix-tensorflow
ba40020706ad3a1fbefa1da7bc7a05b7b031fb9e
[ "MIT" ]
349
2016-11-25T15:50:09.000Z
2022-02-28T21:16:21.000Z
from __future__ import division import os import time from glob import glob import tensorflow as tf import numpy as np from six.moves import xrange from ops import * from utils import * class pix2pix(object): def __init__(self, sess, image_size=256, batch_size=1, sample_size=1, output_size=256, ...
44.981481
136
0.572715
from __future__ import division import os import time from glob import glob import tensorflow as tf import numpy as np from six.moves import xrange from ops import * from utils import * class pix2pix(object): def __init__(self, sess, image_size=256, batch_size=1, sample_size=1, output_size=256, ...
true
true
f705d70956f36d8ea51f2996a072dc5971196a83
10,385
py
Python
networkapi/ip/resource/IPEquipEvipResource.py
vinicius-marinho/GloboNetworkAPI
94651d3b4dd180769bc40ec966814f3427ccfb5b
[ "Apache-2.0" ]
73
2015-04-13T17:56:11.000Z
2022-03-24T06:13:07.000Z
networkapi/ip/resource/IPEquipEvipResource.py
leopoldomauricio/GloboNetworkAPI
3b5b2e336d9eb53b2c113977bfe466b23a50aa29
[ "Apache-2.0" ]
99
2015-04-03T01:04:46.000Z
2021-10-03T23:24:48.000Z
networkapi/ip/resource/IPEquipEvipResource.py
shildenbrand/GloboNetworkAPI
515d5e961456cee657c08c275faa1b69b7452719
[ "Apache-2.0" ]
64
2015-08-05T21:26:29.000Z
2022-03-22T01:06:28.000Z
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lic...
45.548246
213
0.625325
import logging from networkapi.admin_permission import AdminPermission from networkapi.ambiente.models import EnvironmentVip from networkapi.auth import has_perm from networkapi.equipamento.models import Equipamento from networkapi.equipamento.models import EquipamentoError from networkapi.equipamento.models import Eq...
false
true
f705d82868da78fc4b8e5a14a1c63f8b5d2c006e
39,980
py
Python
pytorch_lightning/trainer/training_loop.py
songwanguw/pytorch-lightning
64da9c9d87ac1c106d94310c4d90668fbafbb2cf
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/training_loop.py
songwanguw/pytorch-lightning
64da9c9d87ac1c106d94310c4d90668fbafbb2cf
[ "Apache-2.0" ]
1
2020-11-11T11:36:38.000Z
2020-11-11T11:36:38.000Z
pytorch_lightning/trainer/training_loop.py
songwanguw/pytorch-lightning
64da9c9d87ac1c106d94310c4d90668fbafbb2cf
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
41.995798
121
0.654402
from contextlib import contextmanager from copy import copy, deepcopy import numpy as np import torch import torch.distributed as torch_distrib from pytorch_lightning.callbacks import ModelCheckpoint from pytorch_lightning.core.lightning import LightningModule from pytorch_lightning.core.memory import ModelSummary f...
true
true
f705d8375b61940c4c02bcdbae22797b6b711bb0
664
py
Python
frappe/core/doctype/role_profile/role_profile.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/core/doctype/role_profile/role_profile.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/core/doctype/role_profile/role_profile.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class RoleProfile(Document): def autoname(self): """set name as Role Profile name""...
27.666667
74
0.721386
from __future__ import unicode_literals import frappe from frappe.model.document import Document class RoleProfile(Document): def autoname(self): self.name = self.role_profile def on_update(self): users = frappe.get_all("User", filters={"role_profile_name": self.name}) roles = [role.role for role in self.r...
true
true
f705d8e2048ebd543efcfc2b8d5258b47b62b213
162
py
Python
output/models/ms_data/complex_type/ct_f013_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/complex_type/ct_f013_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/complex_type/ct_f013_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.complex_type.ct_f013_xsd.ct_f013 import ( FooType, MyType, Root, ) __all__ = [ "FooType", "MyType", "Root", ]
13.5
68
0.617284
from output.models.ms_data.complex_type.ct_f013_xsd.ct_f013 import ( FooType, MyType, Root, ) __all__ = [ "FooType", "MyType", "Root", ]
true
true
f705db97cc2202b63ed43321fb14e2dd46519851
1,758
py
Python
amocrm/v2/filters.py
rolldeep/amocrm_api
61111a9736e2893bc4c625bebe5e8a71645e9b25
[ "MIT" ]
null
null
null
amocrm/v2/filters.py
rolldeep/amocrm_api
61111a9736e2893bc4c625bebe5e8a71645e9b25
[ "MIT" ]
null
null
null
amocrm/v2/filters.py
rolldeep/amocrm_api
61111a9736e2893bc4c625bebe5e8a71645e9b25
[ "MIT" ]
null
null
null
import datetime class Filter: def __init__(self, name): self._name = name def _as_params(self): return {} class SingleFilter(Filter): def __call__(self, value): self._value = value return self def _as_params(self): return {"filter[{}]".format(self._name): se...
25.478261
85
0.633106
import datetime class Filter: def __init__(self, name): self._name = name def _as_params(self): return {} class SingleFilter(Filter): def __call__(self, value): self._value = value return self def _as_params(self): return {"filter[{}]".format(self._name): se...
true
true
f705dbc83088bdd8282fa9e38c778f2f552bec1f
6,550
py
Python
src/pip/_internal/self_outdated_check.py
jameshfisher/pip
8365bc3dcc21809f2fb86c4db5e40aaf2384c897
[ "MIT" ]
null
null
null
src/pip/_internal/self_outdated_check.py
jameshfisher/pip
8365bc3dcc21809f2fb86c4db5e40aaf2384c897
[ "MIT" ]
null
null
null
src/pip/_internal/self_outdated_check.py
jameshfisher/pip
8365bc3dcc21809f2fb86c4db5e40aaf2384c897
[ "MIT" ]
null
null
null
import datetime import hashlib import json import logging import os.path import sys from typing import TYPE_CHECKING from pip._vendor.packaging.version import parse as parse_version from pip._internal.index.collector import LinkCollector from pip._internal.index.package_finder import PackageFinder from pip._internal....
33.937824
87
0.630382
import datetime import hashlib import json import logging import os.path import sys from typing import TYPE_CHECKING from pip._vendor.packaging.version import parse as parse_version from pip._internal.index.collector import LinkCollector from pip._internal.index.package_finder import PackageFinder from pip._internal....
true
true
f705dc263f4b173513dc6e8e38729cebb3b5b1ae
259
py
Python
Python/treehopper/libraries/displays/led_shift_register.py
ehailey1/treehopper-sdk
c242f939a93d93da11ff79577666130c15aecec7
[ "MIT" ]
3
2018-03-16T07:00:42.000Z
2022-03-27T00:39:55.000Z
Python/treehopper/libraries/displays/led_shift_register.py
ehailey1/treehopper-sdk
c242f939a93d93da11ff79577666130c15aecec7
[ "MIT" ]
16
2016-08-12T18:51:04.000Z
2021-04-16T16:14:07.000Z
Python/treehopper/libraries/displays/led_shift_register.py
ehailey1/treehopper-sdk
c242f939a93d93da11ff79577666130c15aecec7
[ "MIT" ]
6
2015-11-04T15:53:49.000Z
2020-06-25T18:34:47.000Z
from treehopper.libraries.displays import LedDriver from treehopper.libraries.io.expander.shift_register import ChainableShiftRegisterOutput class LedShiftRegister(ChainableShiftRegisterOutput, LedDriver): def __init__(self): super().__init__()
32.375
88
0.822394
from treehopper.libraries.displays import LedDriver from treehopper.libraries.io.expander.shift_register import ChainableShiftRegisterOutput class LedShiftRegister(ChainableShiftRegisterOutput, LedDriver): def __init__(self): super().__init__()
true
true
f705dc6351fae60f5584a9468074494232907552
1,250
py
Python
userbot/plugins/stats.py
NIKHIL5757H/SimbhaUserbot
86bd946a47bd0d74f5ef3c46ef00f9bdb9bf11e0
[ "MIT" ]
2
2020-07-25T17:58:55.000Z
2020-11-26T10:54:46.000Z
userbot/plugins/stats.py
NIKHIL5757H/SimbhaUserbot
86bd946a47bd0d74f5ef3c46ef00f9bdb9bf11e0
[ "MIT" ]
null
null
null
userbot/plugins/stats.py
NIKHIL5757H/SimbhaUserbot
86bd946a47bd0d74f5ef3c46ef00f9bdb9bf11e0
[ "MIT" ]
2
2020-08-03T09:09:06.000Z
2020-08-12T05:05:24.000Z
from userbot import bot from telethon import events import asyncio from datetime import datetime from telethon.tl.types import User, Chat, Channel from uniborg.util import admin_cmd @bot.on(admin_cmd(pattern=r"stats")) async def _(event): if event.fwd_from: return start = datetime.now() u = 0 g...
25.510204
66
0.5312
from userbot import bot from telethon import events import asyncio from datetime import datetime from telethon.tl.types import User, Chat, Channel from uniborg.util import admin_cmd @bot.on(admin_cmd(pattern=r"stats")) async def _(event): if event.fwd_from: return start = datetime.now() u = 0 g...
true
true
f705dd4832b18fd425450cd30cdfb3cf0a126a5e
5,623
py
Python
tracking.py
hnkulkarni/cs231aApproachingOdt
07c68d787442243d653ae72a7e9473b4c3c5c6b4
[ "MIT" ]
null
null
null
tracking.py
hnkulkarni/cs231aApproachingOdt
07c68d787442243d653ae72a7e9473b4c3c5c6b4
[ "MIT" ]
null
null
null
tracking.py
hnkulkarni/cs231aApproachingOdt
07c68d787442243d653ae72a7e9473b4c3c5c6b4
[ "MIT" ]
null
null
null
# This file will track detections import tqdm import cv2 import matplotlib.pyplot as plt import matplotlib.patches as patches from matplotlib.ticker import NullLocator from cs231aApproachingOdt import utils as myutils from PIL import Image import os import torch import torchvision.ops.boxes as bops def match_detectio...
35.588608
119
0.676685
import tqdm import cv2 import matplotlib.pyplot as plt import matplotlib.patches as patches from matplotlib.ticker import NullLocator from cs231aApproachingOdt import utils as myutils from PIL import Image import os import torch import torchvision.ops.boxes as bops def match_detections(prev_path, prev_detection, new_...
true
true
f705de5dde82e6bd54b2dfd92a538123dac03a9b
105
py
Python
scripts/quest/q5521e.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
54
2019-04-16T23:24:48.000Z
2021-12-18T11:41:50.000Z
scripts/quest/q5521e.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
3
2019-05-19T15:19:41.000Z
2020-04-27T16:29:16.000Z
scripts/quest/q5521e.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
49
2020-11-25T23:29:16.000Z
2022-03-26T16:20:24.000Z
# Tot's reward lv 40 sm.completeQuest(5521) # Lv. 40 Equipment box sm.giveItem(2431877, 1) sm.dispose()
15
23
0.72381
sm.completeQuest(5521) # Lv. 40 Equipment box sm.giveItem(2431877, 1) sm.dispose()
true
true
f705de767d15e8ccdef551f1fa42f380207c8feb
11,462
py
Python
backend/api/views.py
vadikam100500/foodgram-project-react
11119e11d4919f72b3f104209102048ee38c366a
[ "PostgreSQL", "MIT" ]
1
2021-12-14T14:43:51.000Z
2021-12-14T14:43:51.000Z
backend/api/views.py
vadikam100500/foodgram-project-react
11119e11d4919f72b3f104209102048ee38c366a
[ "PostgreSQL", "MIT" ]
null
null
null
backend/api/views.py
vadikam100500/foodgram-project-react
11119e11d4919f72b3f104209102048ee38c366a
[ "PostgreSQL", "MIT" ]
null
null
null
import csv from django.contrib.auth import get_user_model from django.db.models.aggregates import Sum from django.http.response import HttpResponse from django.utils.decorators import method_decorator from djoser.serializers import SetPasswordSerializer from djoser.views import TokenCreateView from drf_yasg.utils impo...
39.119454
79
0.655819
import csv from django.contrib.auth import get_user_model from django.db.models.aggregates import Sum from django.http.response import HttpResponse from django.utils.decorators import method_decorator from djoser.serializers import SetPasswordSerializer from djoser.views import TokenCreateView from drf_yasg.utils impo...
true
true
f705de9ae40aeb7ac96605765acb1cf9903cb9e3
70,522
py
Python
test/unit/common/middleware/test_copy.py
gyaozhou/swift-read
16fe18ae3be59a095f3bafdd69fe74b48a2771cb
[ "Apache-2.0" ]
null
null
null
test/unit/common/middleware/test_copy.py
gyaozhou/swift-read
16fe18ae3be59a095f3bafdd69fe74b48a2771cb
[ "Apache-2.0" ]
null
null
null
test/unit/common/middleware/test_copy.py
gyaozhou/swift-read
16fe18ae3be59a095f3bafdd69fe74b48a2771cb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2015 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
50.193594
79
0.580344
import mock import unittest from hashlib import md5 from six.moves import urllib from swift.common import swob from swift.common.middleware import copy from swift.common.storage_policy import POLICIES from swift.common.swob import Request, HTTPException from swift.common.utils import closing_if_possible from test.uni...
true
true
f705def54e26d0238b7f51ef53f14a89af887b66
1,087
py
Python
src/bot/TeamData.py
malmgrens4/TwIOTch
a3e05f5fcb5bcd75aba3cf9533ca7c5308e4a2de
[ "MIT" ]
null
null
null
src/bot/TeamData.py
malmgrens4/TwIOTch
a3e05f5fcb5bcd75aba3cf9533ca7c5308e4a2de
[ "MIT" ]
null
null
null
src/bot/TeamData.py
malmgrens4/TwIOTch
a3e05f5fcb5bcd75aba3cf9533ca7c5308e4a2de
[ "MIT" ]
null
null
null
from typing import Dict from twitchio.dataclasses import Message class TeamData: def __init__(self, num_teams: int = 2): self.num_teams = num_teams self.teams: Dict[int, int] = {} async def handle_join(self, msg: Message) -> None: if msg.author.id in self.teams: # User al...
29.378378
73
0.609016
from typing import Dict from twitchio.dataclasses import Message class TeamData: def __init__(self, num_teams: int = 2): self.num_teams = num_teams self.teams: Dict[int, int] = {} async def handle_join(self, msg: Message) -> None: if msg.author.id in self.teams: ...
true
true
f705df36178023a0b1008fe69f304ba47ddbd2e2
7,661
py
Python
benchmarks/f3_wrong_hints/scaling_nonlinear_software/8-19_33.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_nonlinear_software/8-19_33.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_nonlinear_software/8-19_33.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
34.981735
81
0.530087
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
f705dfb5b1b2d9fb7211529c9252df251ac0bfc7
2,270
py
Python
src/compas/datastructures/mesh/core/clean.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
235
2017-11-07T07:33:22.000Z
2022-03-25T16:20:00.000Z
src/compas/datastructures/mesh/core/clean.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
770
2017-09-22T13:42:06.000Z
2022-03-31T21:26:45.000Z
src/compas/datastructures/mesh/core/clean.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
99
2017-11-06T23:15:28.000Z
2022-03-25T16:05:36.000Z
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.utilities import geometric_key __all__ = [ 'mesh_delete_duplicate_vertices' ] def mesh_delete_duplicate_vertices(mesh, precision=None): """Cull all duplicate vertices of a mesh and sanit...
28.734177
119
0.584141
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.utilities import geometric_key __all__ = [ 'mesh_delete_duplicate_vertices' ] def mesh_delete_duplicate_vertices(mesh, precision=None): key_gkey = {key: geometric_key(mesh.vertex_attribu...
true
true
f705dfc786bdc45229a3f652451375438bf1d183
2,856
py
Python
qa/rpc-tests/blockchain.py
dnoiz1/ruxcoin
07e30a2b5ebc624ac8a2d92be435e895ede5deae
[ "MIT" ]
null
null
null
qa/rpc-tests/blockchain.py
dnoiz1/ruxcoin
07e30a2b5ebc624ac8a2d92be435e895ede5deae
[ "MIT" ]
null
null
null
qa/rpc-tests/blockchain.py
dnoiz1/ruxcoin
07e30a2b5ebc624ac8a2d92be435e895ede5deae
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Ruxcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test RPC calls related to blockchain state. Tests correspond to code in # rpc/blockchain.cpp. # from...
31.733333
73
0.678221
from decimal import Decimal from test_framework.test_framework import RuxcoinTestFramework from test_framework.authproxy import JSONRPCException from test_framework.util import ( assert_equal, assert_raises, assert_is_hex_string, assert_is_hash_string, start_nodes, connect_nodes_bi, ) class...
true
true
f705e0606ca251800b7dc62a1c80a689290a6c95
8,081
py
Python
testscripts/RDKB/component/XUPNP_B/TS_XUPNP_B_RawoffsetValidation.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/XUPNP_B/TS_XUPNP_B_RawoffsetValidation.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/XUPNP_B/TS_XUPNP_B_RawoffsetValidation.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
########################################################################## # If not stated otherwise in this file or this component's Licenses.txt # file the following copyright and licenses apply: # # Copyright 2019 RDK Management # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use th...
54.972789
214
0.604999
# file the following copyright and licenses apply: # # Copyright 2019 RDK Management # # 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 ...
false
true
f705e0706875e8cf396e8b98af019ceeec2c23b1
1,971
py
Python
xlsxwriter/test/comparison/test_button07.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
1
2020-07-01T07:24:37.000Z
2020-07-01T07:24:37.000Z
xlsxwriter/test/comparison/test_button07.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_button07.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
26.28
79
0.598681
from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): def setUp(self): self.set_filename('button07.xlsm') def test_create_file(self): workbook = Workbook(self.got_filename) worksheet = workbook.ad...
true
true
f705e11b73b8ab51a2717f76d0f1699b82a7b0ae
258
py
Python
biot/core/fan.py
AroliantBIoT/biot-orangepi-client
60df602816cdc0c668e58f91512e93eb5bec3c6d
[ "MIT" ]
null
null
null
biot/core/fan.py
AroliantBIoT/biot-orangepi-client
60df602816cdc0c668e58f91512e93eb5bec3c6d
[ "MIT" ]
null
null
null
biot/core/fan.py
AroliantBIoT/biot-orangepi-client
60df602816cdc0c668e58f91512e93eb5bec3c6d
[ "MIT" ]
null
null
null
class Fan(): """Default Device with ON / OFF Functions""" deviceID = None def __init__(self, deviceID): if deviceID is None: print("Provide a Device ID") return self.deviceID = deviceID def setSpeed(self): pass def getSpeed(self): pass
16.125
45
0.678295
class Fan(): deviceID = None def __init__(self, deviceID): if deviceID is None: print("Provide a Device ID") return self.deviceID = deviceID def setSpeed(self): pass def getSpeed(self): pass
true
true
f705e133aa7892ba240c4677420a97b286673317
3,271
py
Python
projects_api/migrations/0001_initial.py
diegoinn/profile-rest-api
a5b8c9dfe5453db24e93d05367d33e6f37c65966
[ "MIT" ]
null
null
null
projects_api/migrations/0001_initial.py
diegoinn/profile-rest-api
a5b8c9dfe5453db24e93d05367d33e6f37c65966
[ "MIT" ]
null
null
null
projects_api/migrations/0001_initial.py
diegoinn/profile-rest-api
a5b8c9dfe5453db24e93d05367d33e6f37c65966
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-10-29 04:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ConstructionSystem', fields=...
43.039474
148
0.578416
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ConstructionSystem', fields=[ ('id', models.AutoField(auto...
true
true
f705e1ac415f1541823e90e5a27d3686709724a5
370
py
Python
cryptoxlib/clients/aax/exceptions.py
PetrZufan/cryptoxlib-aio
8fbb817ee7a7a88693804e24877863370d1d53c7
[ "MIT" ]
90
2020-04-09T18:34:49.000Z
2022-03-09T14:29:32.000Z
cryptoxlib/clients/aax/exceptions.py
PetrZufan/cryptoxlib-aio
8fbb817ee7a7a88693804e24877863370d1d53c7
[ "MIT" ]
44
2020-04-03T17:02:20.000Z
2022-01-29T14:51:51.000Z
cryptoxlib/clients/aax/exceptions.py
PetrZufan/cryptoxlib-aio
8fbb817ee7a7a88693804e24877863370d1d53c7
[ "MIT" ]
28
2020-04-25T21:34:53.000Z
2022-03-31T07:20:07.000Z
from typing import Optional from cryptoxlib.exceptions import CryptoXLibException class AAXException(CryptoXLibException): pass class AAXRestException(AAXException): def __init__(self, status_code: int, body: Optional[dict]): super().__init__(f"Rest API exception: status [{status_code}], response [{body}]") ...
24.666667
84
0.778378
from typing import Optional from cryptoxlib.exceptions import CryptoXLibException class AAXException(CryptoXLibException): pass class AAXRestException(AAXException): def __init__(self, status_code: int, body: Optional[dict]): super().__init__(f"Rest API exception: status [{status_code}], response [{body}]") ...
true
true
f705e31f80b4e24a70351eb21bb89c4f68671a24
1,229
py
Python
service_api/domain/redis.py
123456789-dnipro/hackaton
7ad3017d31a1fe6c6cb72f2227e8a108a30a156b
[ "MIT" ]
null
null
null
service_api/domain/redis.py
123456789-dnipro/hackaton
7ad3017d31a1fe6c6cb72f2227e8a108a30a156b
[ "MIT" ]
1
2021-06-01T23:53:20.000Z
2021-06-01T23:53:20.000Z
service_api/domain/redis.py
123456789-dnipro/hackaton
7ad3017d31a1fe6c6cb72f2227e8a108a30a156b
[ "MIT" ]
null
null
null
import aioredis from sanic import Sanic class RedisWorker: def __init__(self): self.__host = None self.__pool = None async def init(self, app: Sanic): self.__host = app.config.REDIS_HOST self.__pool = await aioredis.create_redis(self.__host) async def check_session(self, ...
26.148936
62
0.62083
import aioredis from sanic import Sanic class RedisWorker: def __init__(self): self.__host = None self.__pool = None async def init(self, app: Sanic): self.__host = app.config.REDIS_HOST self.__pool = await aioredis.create_redis(self.__host) async def check_session(self, ...
true
true
f705e3f0d1abe21f5b92ea10cdd8b37a2a9906b1
15,509
py
Python
salt/modules/boto_secgroup.py
Achimh3011/salt
b6e6968c22f840df0d43bea7e99c188c623b850b
[ "Apache-2.0" ]
null
null
null
salt/modules/boto_secgroup.py
Achimh3011/salt
b6e6968c22f840df0d43bea7e99c188c623b850b
[ "Apache-2.0" ]
null
null
null
salt/modules/boto_secgroup.py
Achimh3011/salt
b6e6968c22f840df0d43bea7e99c188c623b850b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Connection module for Amazon Security Groups .. versionadded:: 2014.7.0 :configuration: This module accepts explicit ec2 credentials but can also utilize IAM roles assigned to the instance trough Instance Profiles. Dynamic credentials are then automatically obtained from AWS API an...
35.009029
139
0.59488
from __future__ import absolute_import import logging import re from distutils.version import LooseVersion as _LooseVersion import six log = logging.getLogger(__name__) try: import boto import boto.ec2 logging.getLogger('boto').setLevel(logging.CRITICAL) HAS_BOTO = True except ImportError: HAS_BO...
true
true
f705e5539327770cb56ee6c0a5e5510efbddda11
1,677
py
Python
logic2_analyzers/DS1307/Hla.py
martonmiklos/sigrokdecoders_to_logic2_analyzers
9dd9b9a610c17e6ae525829c9112d11a80d016e7
[ "MIT" ]
5
2020-04-15T20:45:06.000Z
2020-05-31T02:45:21.000Z
logic2_analyzers/DS1307/Hla.py
martonmiklos/sigrokdecoders_to_logic2_analyzers
9dd9b9a610c17e6ae525829c9112d11a80d016e7
[ "MIT" ]
1
2020-07-15T09:23:05.000Z
2020-07-15T10:04:48.000Z
logic2_analyzers/DS1307/Hla.py
martonmiklos/sigrokdecoders_to_logic2_analyzers
9dd9b9a610c17e6ae525829c9112d11a80d016e7
[ "MIT" ]
1
2020-04-20T18:49:36.000Z
2020-04-20T18:49:36.000Z
import sys sys.path.insert(0, "../") # our fake sigrokdecode lives one dir upper from pd import Decoder class DS1307(): def __init__(self): self.sigrokDecoder = Decoder() def get_capabilities(self): settings = {} for option in self.sigrokDecoder.options : settingType = '' choices = ...
29.421053
137
0.57901
import sys sys.path.insert(0, "../") from pd import Decoder class DS1307(): def __init__(self): self.sigrokDecoder = Decoder() def get_capabilities(self): settings = {} for option in self.sigrokDecoder.options : settingType = '' choices = [] if ("values" not in option) : ...
true
true
f705e56a5a72c63a6b880ab3f1397c0082a8229a
4,774
py
Python
hotpotqa_utils_joint.py
Captainr22/SAE
f3e370604978a273eb1e1ffdbd342dee3de431c9
[ "MIT" ]
38
2020-01-23T00:46:06.000Z
2022-03-13T13:10:19.000Z
hotpotqa_utils_joint.py
Captainr22/SAE
f3e370604978a273eb1e1ffdbd342dee3de431c9
[ "MIT" ]
7
2020-02-02T02:05:32.000Z
2022-03-06T04:37:06.000Z
hotpotqa_utils_joint.py
Captainr22/SAE
f3e370604978a273eb1e1ffdbd342dee3de431c9
[ "MIT" ]
9
2020-02-12T08:35:23.000Z
2022-02-19T07:29:26.000Z
import torch import numpy as np import json, sys, re, string import collections from collections import Counter from collections import OrderedDict def get_sp_pred(pred_sp_idx, data): """get the prediction of supporting facts in original format Arguments: pred_sp_idx {[type]} -- [description] ...
32.47619
124
0.646418
import torch import numpy as np import json, sys, re, string import collections from collections import Counter from collections import OrderedDict def get_sp_pred(pred_sp_idx, data): pred = [] for p in pred_sp_idx: if p < len(data): pred.append([data[p].doc_title[0], data[p].sent_id]) ...
true
true
f705e584e7382dd36ff080ed8c2d1c45f243aa82
255
py
Python
task/learn-python/pyramid.py
jiangdapeng/netease
032c8f7c60b8afb98bf9674cf3617f614c200a92
[ "MIT" ]
null
null
null
task/learn-python/pyramid.py
jiangdapeng/netease
032c8f7c60b8afb98bf9674cf3617f614c200a92
[ "MIT" ]
null
null
null
task/learn-python/pyramid.py
jiangdapeng/netease
032c8f7c60b8afb98bf9674cf3617f614c200a92
[ "MIT" ]
null
null
null
#!/usr/bin/python #-*-coding=utf-8-*- def pyramid(n): most = 2*n - 1 for i in range(1,n+1): star = 2*i - 1 space = n - i print(" "*space + "*"*star) def test(): pyramid(3) pyramid(4) pyramid(5) if __name__ == "__main__": test()
14.166667
31
0.529412
def pyramid(n): most = 2*n - 1 for i in range(1,n+1): star = 2*i - 1 space = n - i print(" "*space + "*"*star) def test(): pyramid(3) pyramid(4) pyramid(5) if __name__ == "__main__": test()
true
true
f705e60ad2bc78f130ddc2bedec6d3d2060f4f8b
3,309
py
Python
tests/rl_main.py
constancecrozier/CityLearn
c92f981771d29181cffce448a31d8f367a668175
[ "MIT" ]
null
null
null
tests/rl_main.py
constancecrozier/CityLearn
c92f981771d29181cffce448a31d8f367a668175
[ "MIT" ]
null
null
null
tests/rl_main.py
constancecrozier/CityLearn
c92f981771d29181cffce448a31d8f367a668175
[ "MIT" ]
null
null
null
# Run this again after editing submodules so Colab uses the updated versions from citylearn import CityLearn from citylearn import GridLearn import matplotlib.pyplot as plt from pathlib import Path from citylearn import RL_Agents_Coord, Cluster_Agents import numpy as np import csv import time import re import pandas as...
44.716216
463
0.767604
from citylearn import CityLearn from citylearn import GridLearn import matplotlib.pyplot as plt from pathlib import Path from citylearn import RL_Agents_Coord, Cluster_Agents import numpy as np import csv import time import re import pandas as pd import torch from joblib import dump, load climate_zone = 1 data_path = ...
true
true
f705e769068d5766e5f862e7c150a7e010365ee9
675
py
Python
base/flags.py
d2lam/common
3db9ac8fc46c2159568180ca1188dfa3aeacd7cb
[ "BSD-3-Clause" ]
1
2016-09-29T14:17:27.000Z
2016-09-29T14:17:27.000Z
base/flags.py
d2lam/common
3db9ac8fc46c2159568180ca1188dfa3aeacd7cb
[ "BSD-3-Clause" ]
null
null
null
base/flags.py
d2lam/common
3db9ac8fc46c2159568180ca1188dfa3aeacd7cb
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2013 # Author: Christopher Van Arsdale # # See common/third_party/google/gflags_python/gflags for info # # Examlpe: # import common.base.flags # import sys # # FLAGS = flags.FLAGS # flags.d.DEFINE_bool('my_bool', false, 'My description') # # def main(argv): # flags.Parse(argv) # ... use FLAGS.my_...
21.09375
63
0.678519
import common.third_party.google.gflags_python.gflags as gflags d = gflags FLAGS = gflags.FLAGS def Parse(argv): try: argv = FLAGS(argv) except gflags.FlagsError, e: print '%s\\nUsage: %s ARGS\\n%s' % (e, sys.argv[0], FLAGS) sys.exit(1)
false
true
f705e793f8a0fdc1881cae42982b88bb9cb07532
16,656
py
Python
test/functional/test_framework/mininode.py
Actinium-project/acmcore-actinium-next
4b2b56d034d19ba41907c30b91948ed4bc8322ad
[ "MIT" ]
null
null
null
test/functional/test_framework/mininode.py
Actinium-project/acmcore-actinium-next
4b2b56d034d19ba41907c30b91948ed4bc8322ad
[ "MIT" ]
null
null
null
test/functional/test_framework/mininode.py
Actinium-project/acmcore-actinium-next
4b2b56d034d19ba41907c30b91948ed4bc8322ad
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin P2P ...
37.598194
182
0.635447
import asyncore from collections import defaultdict from io import BytesIO import logging import socket import struct import sys import threading from test_framework.messages import * from test_framework.util import wait_until logger = logging.getLogger("TestFramework.mininode") MESSAGEMAP = { b"addr": msg_addr,...
true
true
f705e7e9ad7e6291fc8bcef3839455d8f43946dd
3,324
py
Python
mysodexo/cli.py
AndreMiras/mysodexo
3d0836c38e10d579a8758b998744d1a38ff77260
[ "MIT" ]
9
2019-11-13T08:15:51.000Z
2022-03-07T18:48:28.000Z
mysodexo/cli.py
AndreMiras/mysodexo
3d0836c38e10d579a8758b998744d1a38ff77260
[ "MIT" ]
3
2019-11-13T16:45:33.000Z
2021-10-21T10:47:54.000Z
mysodexo/cli.py
AndreMiras/mysodexo
3d0836c38e10d579a8758b998744d1a38ff77260
[ "MIT" ]
1
2020-10-10T10:22:37.000Z
2020-10-10T10:22:37.000Z
#!/usr/bin/env python3 import argparse import os import pickle from getpass import getpass from typing import Tuple import requests from appdirs import user_cache_dir from mysodexo import api from mysodexo.constants import APPLICATION_NAME, SESSION_CACHE_FILENAME def prompt_login() -> Tuple[str, str]: """Prompt...
27.245902
76
0.671781
import argparse import os import pickle from getpass import getpass from typing import Tuple import requests from appdirs import user_cache_dir from mysodexo import api from mysodexo.constants import APPLICATION_NAME, SESSION_CACHE_FILENAME def prompt_login() -> Tuple[str, str]: email = input("email: ") pas...
true
true
f705e87ae9a2d445b3fb793b75ab4fa77992ea13
755
py
Python
DZ16_04/less11_5.py
denyskovalev/hillel_school_python
df75b3d6779fd03bc94278d27508cc3e461ab421
[ "MIT" ]
null
null
null
DZ16_04/less11_5.py
denyskovalev/hillel_school_python
df75b3d6779fd03bc94278d27508cc3e461ab421
[ "MIT" ]
null
null
null
DZ16_04/less11_5.py
denyskovalev/hillel_school_python
df75b3d6779fd03bc94278d27508cc3e461ab421
[ "MIT" ]
null
null
null
# Реалізувати клас Герой що має мати наступні атрибути: ім‘я, здоров‘я, ранг, сила і метод вдарити. # Метод вдарити повинен наносити шкоду противнику в розмірі сили героя. Герой має мати наступні # обмеження: здоров‘я від 0 до 100, ранг 1,2,3. Сила не більше 10% теперішнього здоров‘я героя. # Не можна бити героїв здоро...
58.076923
108
0.774834
# може наносити удари. За відновлення здоров'я він бере гроші. ( Вам потрібно реалізувати цей функціонал ).
true
true
f705e88b99176b040f97721c78c6232811d99bc9
2,592
py
Python
sudoku skeleton,blocks and solution/sudoku_skeleton.py
AvantG/robotics
f97e2ab6a52aad901d968b960c25e91556bdcc86
[ "MIT" ]
null
null
null
sudoku skeleton,blocks and solution/sudoku_skeleton.py
AvantG/robotics
f97e2ab6a52aad901d968b960c25e91556bdcc86
[ "MIT" ]
null
null
null
sudoku skeleton,blocks and solution/sudoku_skeleton.py
AvantG/robotics
f97e2ab6a52aad901d968b960c25e91556bdcc86
[ "MIT" ]
null
null
null
import copy ########################################### This function reads in block from file def grid_from_file(file_name): lst=[] f=open(file_name) for line in f: lst2=[] for i in line: if i == "x": lst2.append(i) elif i.isdigit(): ...
32.4
131
0.505787
import copy def grid_from_file(file_name): lst=[] f=open(file_name) for line in f: lst2=[] for i in line: if i == "x": lst2.append(i) elif i.isdigit(): lst2.append(int(i)) lst.append(lst2) return lst def subgr...
false
true
f705e8be9f1c5b46fb2b7a7156603fafbace0312
14,306
py
Python
gitee/models/body19.py
pygitee/pygitee
7622314a4dbb08cf2f729b6cdd0a2887b96e394e
[ "MIT" ]
null
null
null
gitee/models/body19.py
pygitee/pygitee
7622314a4dbb08cf2f729b6cdd0a2887b96e394e
[ "MIT" ]
null
null
null
gitee/models/body19.py
pygitee/pygitee
7622314a4dbb08cf2f729b6cdd0a2887b96e394e
[ "MIT" ]
null
null
null
# coding: utf-8 import pprint import re # noqa: F401 import six class Body19(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name ...
28.55489
117
0.592199
import pprint import re import six class Body19(object): swagger_types = { 'access_token': 'str', 'name': 'str', 'description': 'str', 'homepage': 'str', 'has_issues': 'bool', 'has_wiki': 'bool', 'can_comment': 'bool', 'issue_comment': 'bool', ...
true
true
f705e8c12e46c20739a33fd39e478184c2fdb15c
4,875
py
Python
sigma_script.py
bettybhzhou/EasyMarkit_AI
028824a0af246d232013246bf1784013921beec3
[ "MIT" ]
2
2019-04-13T23:31:10.000Z
2019-04-14T00:45:43.000Z
sigma_script.py
pak-alex/EasyMarkit_AI
028824a0af246d232013246bf1784013921beec3
[ "MIT" ]
null
null
null
sigma_script.py
pak-alex/EasyMarkit_AI
028824a0af246d232013246bf1784013921beec3
[ "MIT" ]
3
2019-04-13T23:31:16.000Z
2019-04-20T01:30:54.000Z
""" Winning Python script for EasyMarkit Hackathon by Team Sigma """ ##Team Sigma - Members: Betty Zhou, Bailey Lei, Alex Pak # Usage: python sigma_script.py data/train.csv data/test.csv # import any necessary packages here #loading libraries import argparse import os import pandas as pd import numpy as np impo...
38.385827
145
0.690051
import argparse import os import pandas as pd import numpy as np import sklearn from sklearn.model_selection import train_test_split import lightgbm as lgb parser = argparse.ArgumentParser() parser.add_argument("train_file_path") parser.add_argument("test_file_path") args = parser.parse_args() def onehot_drop(df,...
true
true
f705e901b5b26c21aca2813bb5122e2cd9fef07b
1,541
py
Python
hddcoin/wallet/puzzles/load_clvm.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
null
null
null
hddcoin/wallet/puzzles/load_clvm.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
null
null
null
hddcoin/wallet/puzzles/load_clvm.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
null
null
null
import pathlib import pkg_resources from clvm_tools.clvmc import compile_clvm from hddcoin.types.blockchain_format.program import Program, SerializedProgram def load_serialized_clvm(clvm_filename, package_or_requirement=__name__) -> SerializedProgram: """ This function takes a .clvm file in the given packag...
40.552632
120
0.761843
import pathlib import pkg_resources from clvm_tools.clvmc import compile_clvm from hddcoin.types.blockchain_format.program import Program, SerializedProgram def load_serialized_clvm(clvm_filename, package_or_requirement=__name__) -> SerializedProgram: hex_filename = f"{clvm_filename}.hex" try: if ...
true
true
f705e9a1b90c904ee70c6e8914a78070d0f5ea06
101,873
py
Python
dh_abstracts/app/abstracts/views.py
cmu-lib/dhweb_app
dcfc94b8df67e2a17c882b432fdeb52cfd98bf16
[ "MIT" ]
3
2021-05-07T17:01:33.000Z
2022-01-08T07:54:22.000Z
dh_abstracts/app/abstracts/views.py
cmu-lib/dhweb_app
dcfc94b8df67e2a17c882b432fdeb52cfd98bf16
[ "MIT" ]
336
2019-12-04T23:06:08.000Z
2022-03-31T16:23:15.000Z
dh_abstracts/app/abstracts/views.py
cmu-lib/dhweb_app
dcfc94b8df67e2a17c882b432fdeb52cfd98bf16
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse, JsonResponse, StreamingHttpResponse, FileResponse from django.template import loader from django.shortcuts import get_object_or_404, render, redirect from django.views import View from django.views.generic import DetailView, ListView from django....
36.697767
176
0.59906
from django.shortcuts import render from django.http import HttpResponse, JsonResponse, StreamingHttpResponse, FileResponse from django.template import loader from django.shortcuts import get_object_or_404, render, redirect from django.views import View from django.views.generic import DetailView, ListView from django....
true
true
f705eac2506b58ebfbb78d7b784fcf08c2440c41
4,823
py
Python
Aero_Garden.py
epotex/hagarden
da1aad8f7aa26a8fa0d13738bd124a8aa27319c5
[ "MIT" ]
2
2018-02-05T21:29:44.000Z
2021-12-13T16:38:24.000Z
Aero_Garden.py
epotex/hagarden
da1aad8f7aa26a8fa0d13738bd124a8aa27319c5
[ "MIT" ]
null
null
null
Aero_Garden.py
epotex/hagarden
da1aad8f7aa26a8fa0d13738bd124a8aa27319c5
[ "MIT" ]
2
2018-01-20T04:50:24.000Z
2020-01-20T18:53:27.000Z
import logging import urllib import requests import base64 """ HASS module to read Aerogarde bounty info, later there will be an option to control the light writen by @epotex """ _LOGGER = logging.getLogger(__name__) DOMAIN = 'aerogarden' agent = "BountyWiFi/1.1.13 (iPhone; iOS 10.3.2; Scale/2.00)" port = "8080...
37.387597
93
0.695003
import logging import urllib import requests import base64 _LOGGER = logging.getLogger(__name__) DOMAIN = 'aerogarden' agent = "BountyWiFi/1.1.13 (iPhone; iOS 10.3.2; Scale/2.00)" port = "8080" host = "http://ec2-54-86-39-88.compute-1.amazonaws.com:" Login_call = "/api/Admin/Login" SetDictPushCount = "/api/Cus...
true
true
f705eb236c6300bef2b2f2d6d212f2afda2a2e89
37,473
py
Python
caldera/app/api.py
omitroom13/caldera
7153f77941b9fe48d40850a49b8e252d251a4690
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
caldera/app/api.py
omitroom13/caldera
7153f77941b9fe48d40850a49b8e252d251a4690
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
caldera/app/api.py
omitroom13/caldera
7153f77941b9fe48d40850a49b8e252d251a4690
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
import asyncio from datetime import datetime, timezone from functools import wraps import traceback import inspect import logging import ujson as json_module import hashlib import yaml from aiohttp import web import aiohttp import mongoengine import os from .engine.objects import Operation, Network, Domain, Log, Obse...
37.889788
137
0.621221
import asyncio from datetime import datetime, timezone from functools import wraps import traceback import inspect import logging import ujson as json_module import hashlib import yaml from aiohttp import web import aiohttp import mongoengine import os from .engine.objects import Operation, Network, Domain, Log, Obse...
true
true