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
f73e36bcec7cc22252107d2df53a3249c19af8ba
104
py
Python
poroto/test.py
TANGO-Project/poroto
380c0ab9f33bead70ed71c78493e682924d7f997
[ "BSD-3-Clause" ]
1
2018-05-22T22:53:31.000Z
2018-05-22T22:53:31.000Z
poroto/test.py
TANGO-Project/poroto
380c0ab9f33bead70ed71c78493e682924d7f997
[ "BSD-3-Clause" ]
null
null
null
poroto/test.py
TANGO-Project/poroto
380c0ab9f33bead70ed71c78493e682924d7f997
[ "BSD-3-Clause" ]
null
null
null
from collections import namedtuple TestVector=namedtuple('TestVector', ['test_points', 'test_vectors'])
34.666667
68
0.807692
from collections import namedtuple TestVector=namedtuple('TestVector', ['test_points', 'test_vectors'])
true
true
f73e376c18b8e8eaa26c5e2abbf8924ade529ba0
4,656
py
Python
examples/old_examples/old_examples/khoi_example.py
espottesmith/pyGSM
5bf263f9ef6cbee3ec16355c5eb1839446e704e7
[ "MIT" ]
null
null
null
examples/old_examples/old_examples/khoi_example.py
espottesmith/pyGSM
5bf263f9ef6cbee3ec16355c5eb1839446e704e7
[ "MIT" ]
null
null
null
examples/old_examples/old_examples/khoi_example.py
espottesmith/pyGSM
5bf263f9ef6cbee3ec16355c5eb1839446e704e7
[ "MIT" ]
null
null
null
import sys sys.path.append('/export/zimmerman/khoidang/pyGSM') SE_XING = True SE_GSM = False DE_GSM = False ORCA=False QCHEM=True PYTC=False nproc=8 if QCHEM: from qchem import * elif ORCA: from orca import * elif PYTC: from pytc import * if SE_XING: from se_xing import * if SE_GSM: from se_gsm import * if DE_GSM: f...
30.631579
136
0.606529
import sys sys.path.append('/export/zimmerman/khoidang/pyGSM') SE_XING = True SE_GSM = False DE_GSM = False ORCA=False QCHEM=True PYTC=False nproc=8 if QCHEM: from qchem import * elif ORCA: from orca import * elif PYTC: from pytc import * if SE_XING: from se_xing import * if SE_GSM: from se_gsm import * if DE_GSM: f...
false
true
f73e37d400fe7539be75a6acab12504b60a90309
319
py
Python
models.py
budica-vasilica/webapp
f5685f859e925d8d98e61c256afbcd8e7ca238bc
[ "Apache-2.0" ]
null
null
null
models.py
budica-vasilica/webapp
f5685f859e925d8d98e61c256afbcd8e7ca238bc
[ "Apache-2.0" ]
null
null
null
models.py
budica-vasilica/webapp
f5685f859e925d8d98e61c256afbcd8e7ca238bc
[ "Apache-2.0" ]
null
null
null
from flask_login import UserMixin from __init__ import db class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy email = db.Column(db.String(100), unique=True) password = db.Column(db.String(100)) name = db.Column(db.String(1000))
39.875
91
0.714734
from flask_login import UserMixin from __init__ import db class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(100), unique=True) password = db.Column(db.String(100)) name = db.Column(db.String(1000))
true
true
f73e382358074824f39a37c005f957e13a773d96
814
py
Python
cogs/wow/config.py
kennethntnguyen/wow_news_bot
da9086f7ebd0acbcda0d9e5ff44fa0837aa161f1
[ "MIT" ]
null
null
null
cogs/wow/config.py
kennethntnguyen/wow_news_bot
da9086f7ebd0acbcda0d9e5ff44fa0837aa161f1
[ "MIT" ]
null
null
null
cogs/wow/config.py
kennethntnguyen/wow_news_bot
da9086f7ebd0acbcda0d9e5ff44fa0837aa161f1
[ "MIT" ]
null
null
null
import os mongodb_atlas = { "connection_string": os.environ.get('MONGODB_CONNECTION_STRING'), "database_name": "info-bot", "news_collection_name": "wow-news", "log_collections": {"commands": "user-commands-log", "updater": "push-updates-log"} } article_types = { "HOTFIXES": "hotfixes", "LATEST...
18.930233
87
0.568796
import os mongodb_atlas = { "connection_string": os.environ.get('MONGODB_CONNECTION_STRING'), "database_name": "info-bot", "news_collection_name": "wow-news", "log_collections": {"commands": "user-commands-log", "updater": "push-updates-log"} } article_types = { "HOTFIXES": "hotfixes", "LATEST...
true
true
f73e3954a7d580c39496f63b075b45618b77b96c
1,693
py
Python
3_ gph-low-pass-filter.py
dmuehlemann/RPGV
18b4216e6cedce40a020a57e1822a363a8a6b60c
[ "MIT" ]
null
null
null
3_ gph-low-pass-filter.py
dmuehlemann/RPGV
18b4216e6cedce40a020a57e1822a363a8a6b60c
[ "MIT" ]
2
2021-12-14T11:54:18.000Z
2021-12-15T10:03:37.000Z
3_ gph-low-pass-filter.py
dmuehlemann/RPGV
18b4216e6cedce40a020a57e1822a363a8a6b60c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sam Aug 7 11:50:05 2020 @author: Dirk This scripts applies a 10day low pass filter to the ERA5 gph daily means """ import scipy.signal as signal import matplotlib.pyplot as plt from pathlib import Path import xarray as xr #Define input and output data data_folder = Path(".....
21.705128
79
0.653869
import scipy.signal as signal import matplotlib.pyplot as plt from pathlib import Path import xarray as xr data_folder = Path("../data/") filename = data_folder / 'gph-daily-mean.nc' data_out = data_folder / 'gph-daily-mean-lowpass_2_0-1.nc' fig_out = data_folder / 'fig/gph-daily-mean-lowpass_2_0-1.png' z_all ...
true
true
f73e39aa80484ff1d7ac6529844e14a2ec22c427
828
py
Python
tasks.py
tommccoy1/tpdn
a4ea54030056a49e5fd00a700eb71790157bc697
[ "MIT" ]
18
2018-12-25T21:03:02.000Z
2022-01-07T17:56:20.000Z
tasks.py
tommccoy1/tpdn
a4ea54030056a49e5fd00a700eb71790157bc697
[ "MIT" ]
null
null
null
tasks.py
tommccoy1/tpdn
a4ea54030056a49e5fd00a700eb71790157bc697
[ "MIT" ]
3
2019-02-15T17:55:30.000Z
2022-01-31T19:10:06.000Z
from __future__ import unicode_literals, print_function, division from io import open import unicodedata import string import re import random from random import shuffle import torch import torch.nn as nn from torch.autograd import Variable from torch import optim import torch.nn.functional as F import sys import os ...
20.195122
72
0.705314
from __future__ import unicode_literals, print_function, division from io import open import unicodedata import string import re import random from random import shuffle import torch import torch.nn as nn from torch.autograd import Variable from torch import optim import torch.nn.functional as F import sys import os ...
true
true
f73e3bdf82ffa4be8011152eb9af731e09bab5ec
516
py
Python
tesla/config.py
fniewijk/tesla-simulator-server
c568592e74717416f99f03d91c1cedb7e36c6663
[ "MIT" ]
null
null
null
tesla/config.py
fniewijk/tesla-simulator-server
c568592e74717416f99f03d91c1cedb7e36c6663
[ "MIT" ]
null
null
null
tesla/config.py
fniewijk/tesla-simulator-server
c568592e74717416f99f03d91c1cedb7e36c6663
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os class Config(object): DEBUG = True HOST = '0.0.0.0' PORT = os.getenv('TESLA_PORT', 8000) SECRET_KEY = ( '\xc85\x95\x9a\x80\xc1\x93\xd0\xe9\x95\x08\xfb\xbe\x85' '\xd0\x1aq\xd3\x95\xc9\xad \xc0\x08' ) #http://docs.timdorr.apiary.io/#reference/aut...
32.25
90
0.71124
import os class Config(object): DEBUG = True HOST = '0.0.0.0' PORT = os.getenv('TESLA_PORT', 8000) SECRET_KEY = ( '\xc85\x95\x9a\x80\xc1\x93\xd0\xe9\x95\x08\xfb\xbe\x85' '\xd0\x1aq\xd3\x95\xc9\xad \xc0\x08' )
true
true
f73e3cacfc48dcca53767e34827baca54ab71500
11,888
py
Python
tests/aiohttp/test_aiohttp_simple_api.py
Svendegroote91/connexion
26843462d9b80e25bd458b7ce8c246ac94c3bf4e
[ "Apache-2.0" ]
1
2019-05-17T11:01:15.000Z
2019-05-17T11:01:15.000Z
tests/aiohttp/test_aiohttp_simple_api.py
Svendegroote91/connexion
26843462d9b80e25bd458b7ce8c246ac94c3bf4e
[ "Apache-2.0" ]
null
null
null
tests/aiohttp/test_aiohttp_simple_api.py
Svendegroote91/connexion
26843462d9b80e25bd458b7ce8c246ac94c3bf4e
[ "Apache-2.0" ]
4
2019-07-09T02:30:48.000Z
2021-12-10T17:36:40.000Z
import asyncio import sys import pytest import yaml import aiohttp.web from conftest import TEST_FOLDER from connexion import AioHttpApp try: import ujson as json except ImportError: import json @pytest.fixture def aiohttp_app(aiohttp_api_spec_dir): app = AioHttpApp(__name__, port=5001, ...
35.807229
117
0.689603
import asyncio import sys import pytest import yaml import aiohttp.web from conftest import TEST_FOLDER from connexion import AioHttpApp try: import ujson as json except ImportError: import json @pytest.fixture def aiohttp_app(aiohttp_api_spec_dir): app = AioHttpApp(__name__, port=5001, ...
true
true
f73e3d4c3bf3b19dad150fc4a8d5991cea32220b
1,478
py
Python
hohgwuhn/geovis.py
adyates/ksw-school-scrape
b2d71fee9bca4e0bfd5303c3b2b24583afc0964a
[ "Apache-2.0" ]
null
null
null
hohgwuhn/geovis.py
adyates/ksw-school-scrape
b2d71fee9bca4e0bfd5303c3b2b24583afc0964a
[ "Apache-2.0" ]
4
2015-07-04T12:02:19.000Z
2019-04-28T18:09:29.000Z
hohgwuhn/geovis.py
adyates/ksw-school-scrape
b2d71fee9bca4e0bfd5303c3b2b24583afc0964a
[ "Apache-2.0" ]
null
null
null
import csv from urllib.parse import quote import webbrowser from . import geocoder_googs as geocoder GOOGLE_STATIC_MAPS_ENDPOINT = ( 'https://maps.googleapis.com/maps/api/staticmap?size=1280x720&markers=') # Compute the max number of markers I can safely add before hitting the Static Map API char limit. # String...
36.04878
98
0.67862
import csv from urllib.parse import quote import webbrowser from . import geocoder_googs as geocoder GOOGLE_STATIC_MAPS_ENDPOINT = ( 'https://maps.googleapis.com/maps/api/staticmap?size=1280x720&markers=') MAX_EST_MARKER_COUNT = (2048 - len(GOOGLE_STATIC_MAPS_ENDPOINT)) / ( len(quote(',|')) + 2 * (1 ...
true
true
f73e3dde603d4288c31f41b55ef2f343eacaab9e
1,298
py
Python
hangman/lives_visual.py
Dafov/python-projects
4cec3621effe3a24f677b73fc009680292640b32
[ "MIT" ]
null
null
null
hangman/lives_visual.py
Dafov/python-projects
4cec3621effe3a24f677b73fc009680292640b32
[ "MIT" ]
null
null
null
hangman/lives_visual.py
Dafov/python-projects
4cec3621effe3a24f677b73fc009680292640b32
[ "MIT" ]
null
null
null
lives_visual_dict = { 0: """ ___________ | / | |/ ( ) | /|\\ | / \\ | """, 1: """ ___________ | / | |/ ( ) ...
22
29
0.070108
lives_visual_dict = { 0: """ ___________ | / | |/ ( ) | /|\\ | / \\ | """, 1: """ ___________ | / | |/ ( ) ...
true
true
f73e3efe93b2b474b69960e7dafeb5f3b83d2f3a
3,767
py
Python
staging/stop_detection/stops.py
endremborza/data-bevy
25398124595ffddc201de6a748e84bb24d5885b2
[ "MIT" ]
null
null
null
staging/stop_detection/stops.py
endremborza/data-bevy
25398124595ffddc201de6a748e84bb24d5885b2
[ "MIT" ]
null
null
null
staging/stop_detection/stops.py
endremborza/data-bevy
25398124595ffddc201de6a748e84bb24d5885b2
[ "MIT" ]
null
null
null
from dataclasses import dataclass from datetime import datetime import datazimmer as dz import pandas as pd from colassigner import ColAssigner, get_all_cols class NoStops(Exception): pass @dataclass class DaySetup: work_start: int work_end: int home_arrive: int home_depart: int class Coordin...
28.323308
88
0.608707
from dataclasses import dataclass from datetime import datetime import datazimmer as dz import pandas as pd from colassigner import ColAssigner, get_all_cols class NoStops(Exception): pass @dataclass class DaySetup: work_start: int work_end: int home_arrive: int home_depart: int class Coordin...
true
true
f73e3f17705797fd5d8b0edb10e010668fc62b78
1,013
py
Python
modeltranslation_rosetta/utils/response.py
Apkawa/django-modeltranslation-rosetta
568354ceee201f891e1f9f6d1f5987dbdfa8f84a
[ "MIT" ]
null
null
null
modeltranslation_rosetta/utils/response.py
Apkawa/django-modeltranslation-rosetta
568354ceee201f891e1f9f6d1f5987dbdfa8f84a
[ "MIT" ]
14
2020-01-06T16:18:37.000Z
2022-01-20T19:40:56.000Z
modeltranslation_rosetta/utils/response.py
Apkawa/django-modeltranslation-rosetta
568354ceee201f891e1f9f6d1f5987dbdfa8f84a
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals from django.http import HttpResponse from django.utils.encoding import smart_str, smart_bytes class FileResponse(HttpResponse): """ DRF Response to render data as a PDF File. kwargs: - pdf (byte array). The PDF file content. - file_n...
28.942857
99
0.616979
from __future__ import unicode_literals from django.http import HttpResponse from django.utils.encoding import smart_str, smart_bytes class FileResponse(HttpResponse): def __init__(self, file_content, file_name, download=True, content_type=None, *args, **kwargs): disposition = 'filename="{}"'.format(sm...
true
true
f73e3f52b563db31e518ebacc55f9d01882d8afa
629
py
Python
manage.py
kamransadixov/fileshare
42316012ed5d022fcb1d53a69e304e1c2e60f3ee
[ "MIT" ]
null
null
null
manage.py
kamransadixov/fileshare
42316012ed5d022fcb1d53a69e304e1c2e60f3ee
[ "MIT" ]
7
2021-03-19T00:32:54.000Z
2022-01-13T02:19:29.000Z
manage.py
kamransadixov/fileshare
42316012ed5d022fcb1d53a69e304e1c2e60f3ee
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fileshare.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Impo...
28.590909
73
0.683625
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fileshare.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f73e3f757d0c78c9954e9b52ef68c58071f5b655
136,909
py
Python
peeringdb_server/management/commands/pdb_api_test.py
egfrank/peeringdb
5ccb44c2955e29e9d9217f1a984dcb90a661ec62
[ "BSD-2-Clause" ]
1
2021-01-29T04:08:52.000Z
2021-01-29T04:08:52.000Z
peeringdb_server/management/commands/pdb_api_test.py
egfrank/peeringdb
5ccb44c2955e29e9d9217f1a984dcb90a661ec62
[ "BSD-2-Clause" ]
7
2021-04-06T18:42:16.000Z
2021-09-08T03:01:50.000Z
peeringdb_server/management/commands/pdb_api_test.py
egfrank/peeringdb
5ccb44c2955e29e9d9217f1a984dcb90a661ec62
[ "BSD-2-Clause" ]
null
null
null
#!/bin/env python """ series of integration/unit tests for the pdb api """ import pytest import copy import unittest import uuid import random import re import time import datetime import json from twentyc.rpc import ( RestClient, PermissionDeniedException, InvalidRequestException, NotFoundException, )...
34.899057
192
0.487791
import pytest import copy import unittest import uuid import random import re import time import datetime import json from twentyc.rpc import ( RestClient, PermissionDeniedException, InvalidRequestException, NotFoundException, ) from grainy.const import ( PERM_READ, PERM_UPDATE, PERM_CREAT...
true
true
f73e40ebebcc8c71359c42c7a788d61b7c7a525a
3,869
py
Python
navigation_experiments_mc_pddl/launch/pddl_reconfig_controller_launch.py
estherag/navigation_experiments_mc_bts_pddl
992b675c3519a726bf6b9c342402fbee2296941e
[ "Apache-2.0" ]
3
2021-01-25T17:07:37.000Z
2021-02-04T12:58:04.000Z
navigation_experiments_mc_pddl/launch/pddl_reconfig_controller_launch.py
estherag/navigation_experiments_mc_bts_pddl
992b675c3519a726bf6b9c342402fbee2296941e
[ "Apache-2.0" ]
null
null
null
navigation_experiments_mc_pddl/launch/pddl_reconfig_controller_launch.py
estherag/navigation_experiments_mc_bts_pddl
992b675c3519a726bf6b9c342402fbee2296941e
[ "Apache-2.0" ]
2
2022-02-10T10:55:20.000Z
2022-02-14T01:35:24.000Z
# Copyright 2019 Intelligent Robotics Lab # # 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...
31.713115
102
0.71207
import os from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import IncludeLaunchDescription, SetEnvironmentVariable from launch.launch_description_sources import PythonLaunchDescriptionSource from launch_ros.actions import Node i...
true
true
f73e4133250d81b18962dd6f4d20939f7ba1f301
451
py
Python
django_web/django_channels_example/routing.py
CarlosMart626/Django-channels-example
d8d71a10c3f31680e3c3abba45f39c64cf29d7af
[ "MIT" ]
null
null
null
django_web/django_channels_example/routing.py
CarlosMart626/Django-channels-example
d8d71a10c3f31680e3c3abba45f39c64cf29d7af
[ "MIT" ]
null
null
null
django_web/django_channels_example/routing.py
CarlosMart626/Django-channels-example
d8d71a10c3f31680e3c3abba45f39c64cf29d7af
[ "MIT" ]
null
null
null
from channels.routing import route from channels import include from products.consumers import ws_connect, ws_message, ws_disconnect channel_routing = [ route("websocket.connect", ws_connect, path=r"^/(?P<room_name>[a-zA-Z0-9_]+)/$"), route("websocket.receive", ws_message, path=r"^/(?P<roo...
32.214286
68
0.654102
from channels.routing import route from channels import include from products.consumers import ws_connect, ws_message, ws_disconnect channel_routing = [ route("websocket.connect", ws_connect, path=r"^/(?P<room_name>[a-zA-Z0-9_]+)/$"), route("websocket.receive", ws_message, path=r"^/(?P<roo...
true
true
f73e4285004e1195113942c9952ecb4888af36b6
29,860
py
Python
KeithleyClass.py
StephenHLin/KeithleyWrapper
25f44996697cd6c9ab6d5cb1139b66685184b9ba
[ "MIT" ]
null
null
null
KeithleyClass.py
StephenHLin/KeithleyWrapper
25f44996697cd6c9ab6d5cb1139b66685184b9ba
[ "MIT" ]
null
null
null
KeithleyClass.py
StephenHLin/KeithleyWrapper
25f44996697cd6c9ab6d5cb1139b66685184b9ba
[ "MIT" ]
null
null
null
""" Created May 08, 2014 @author Stephen written for Python 2.7 requires: PyVISA, Numpy, numutil Written using: Anaconda -Updated as of April 20 2018 Quotation marks were causing errors, specifically in the *IDN? command. Use single quotations, not double. """ #Define Class Keithley class K2602(): ...
50.01675
257
0.56363
""" Created May 08, 2014 @author Stephen written for Python 2.7 requires: PyVISA, Numpy, numutil Written using: Anaconda -Updated as of April 20 2018 Quotation marks were causing errors, specifically in the *IDN? command. Use single quotations, not double. """ class K2602(): def connect(s...
false
true
f73e4295e60a021282c4ef7ca4f7ee9b03087754
845
py
Python
btre-project/pages/views.py
amirzp/btre-project
270fa639d71df5d3d11c356715e6b134da23b9cd
[ "MIT" ]
1
2021-03-02T11:43:30.000Z
2021-03-02T11:43:30.000Z
btre-project/pages/views.py
amirzp/btre-project
270fa639d71df5d3d11c356715e6b134da23b9cd
[ "MIT" ]
null
null
null
btre-project/pages/views.py
amirzp/btre-project
270fa639d71df5d3d11c356715e6b134da23b9cd
[ "MIT" ]
null
null
null
from django.shortcuts import render from listings.models import Listings from listings import choices from realtors.models import Realtor def index(request): lisitngs = Listings.objects.order_by( '-is_data' ).filter(is_published=True)[:3] context = { 'listings': lisitngs, 'sta...
26.40625
59
0.668639
from django.shortcuts import render from listings.models import Listings from listings import choices from realtors.models import Realtor def index(request): lisitngs = Listings.objects.order_by( '-is_data' ).filter(is_published=True)[:3] context = { 'listings': lisitngs, 'sta...
true
true
f73e4490011729f262f99b48339682a74fdde1ec
1,499
py
Python
Deployment/DispatchInterfaces/DummyInterface.py
Caius-Lu/Savior
47c22e06c38cc9b5f7007d79f791015c8b2b76aa
[ "BSD-2-Clause" ]
108
2021-03-19T03:45:48.000Z
2022-03-29T12:19:38.000Z
Deployment/DispatchInterfaces/DummyInterface.py
Caius-Lu/Savior
47c22e06c38cc9b5f7007d79f791015c8b2b76aa
[ "BSD-2-Clause" ]
2
2021-05-12T07:26:21.000Z
2021-07-16T12:53:52.000Z
Deployment/DispatchInterfaces/DummyInterface.py
Caius-Lu/Savior
47c22e06c38cc9b5f7007d79f791015c8b2b76aa
[ "BSD-2-Clause" ]
27
2021-03-19T05:50:26.000Z
2021-12-28T07:13:09.000Z
from fastapi import APIRouter, Form from fastapi.responses import ORJSONResponse from Deployment.ConsumerServices.DummyService import DummyService4Task, DummyService1Task, DummyService2Task, \ DummyService3Task from Utils.DAG import DAG from Utils.ServiceUtils import wait_and_compose_all_task_result router = APIR...
41.638889
111
0.762508
from fastapi import APIRouter, Form from fastapi.responses import ORJSONResponse from Deployment.ConsumerServices.DummyService import DummyService4Task, DummyService1Task, DummyService2Task, \ DummyService3Task from Utils.DAG import DAG from Utils.ServiceUtils import wait_and_compose_all_task_result router = APIR...
true
true
f73e44e6b5f190162213c848e5a592d8191ece07
5,209
py
Python
comctl32.py
jacoblusk/python-dll-injector
40ecf5162e2d2f24d6d4b71959a790aca59edd22
[ "BSD-3-Clause" ]
1
2021-12-04T09:23:08.000Z
2021-12-04T09:23:08.000Z
comctl32.py
jacoblusk/Python-DLL-Injector
40ecf5162e2d2f24d6d4b71959a790aca59edd22
[ "BSD-3-Clause" ]
1
2021-12-04T07:52:15.000Z
2021-12-04T07:52:15.000Z
comctl32.py
jacoblusk/python-dll-injector
40ecf5162e2d2f24d6d4b71959a790aca59edd22
[ "BSD-3-Clause" ]
null
null
null
from ctypes.wintypes import * from wintypes_extended import * from winapi_error import * from user32 import * import ctypes class ListViewMessage(enum.IntEnum): FIRST = 0x1000 GETITEMA = FIRST + 5 INSERTITEMA = FIRST + 7 GETNEXTITEM = FIRST + 12 GETITEMTEXTA = FIRST + 45 INSERTITEMW = FIRST +...
28.005376
93
0.658476
from ctypes.wintypes import * from wintypes_extended import * from winapi_error import * from user32 import * import ctypes class ListViewMessage(enum.IntEnum): FIRST = 0x1000 GETITEMA = FIRST + 5 INSERTITEMA = FIRST + 7 GETNEXTITEM = FIRST + 12 GETITEMTEXTA = FIRST + 45 INSERTITEMW = FIRST +...
true
true
f73e45d5b9b7afdf5933747546d129988abd5898
1,893
py
Python
guild/plugins/skopt_forest_main.py
timt51/guildai
8d3aa9b902e29eb60ebbb408b3a1cbd3f40fcaec
[ "Apache-2.0" ]
694
2018-11-30T01:06:30.000Z
2022-03-31T14:46:26.000Z
guild/plugins/skopt_forest_main.py
timt51/guildai
8d3aa9b902e29eb60ebbb408b3a1cbd3f40fcaec
[ "Apache-2.0" ]
323
2018-11-05T17:44:34.000Z
2022-03-31T16:56:41.000Z
guild/plugins/skopt_forest_main.py
timt51/guildai
8d3aa9b902e29eb60ebbb408b3a1cbd3f40fcaec
[ "Apache-2.0" ]
68
2019-04-01T04:24:47.000Z
2022-02-24T17:22:04.000Z
# Copyright 2017-2021 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
25.931507
82
0.686212
from __future__ import absolute_import from __future__ import division import logging import warnings with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=Warning) import numpy.core.umath_tests import skopt from guild import batch_util from . import skopt_util log ...
true
true
f73e45e2c3aeed08f39ce9125f648b8297aeb96a
2,822
py
Python
tests/test_threaded_cached_property.py
bcho/cached-property
53bc42fb32c95bd2fbd62083cdc4e91d698b8a90
[ "BSD-3-Clause" ]
null
null
null
tests/test_threaded_cached_property.py
bcho/cached-property
53bc42fb32c95bd2fbd62083cdc4e91d698b8a90
[ "BSD-3-Clause" ]
null
null
null
tests/test_threaded_cached_property.py
bcho/cached-property
53bc42fb32c95bd2fbd62083cdc4e91d698b8a90
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ test_threaded_cache_property.py ---------------------------------- Tests for `cached-property` module, threaded_cache_property. """ from time import sleep from threading import Thread, Lock import unittest from cached_property import threaded_cached_property class TestCachedProperty(un...
24.119658
67
0.552445
from time import sleep from threading import Thread, Lock import unittest from cached_property import threaded_cached_property class TestCachedProperty(unittest.TestCase): def test_cached_property(self): class Check(object): def __init__(self): self.total1 = 0 ...
true
true
f73e463b48557a70d80adcf15bb7df858e3402fc
17,474
py
Python
tests.py
kuharan/opts
3966ee873aebeab46ebabfa6b85a9c66c56633f7
[ "BSD-2-Clause" ]
null
null
null
tests.py
kuharan/opts
3966ee873aebeab46ebabfa6b85a9c66c56633f7
[ "BSD-2-Clause" ]
2
2020-06-24T07:57:43.000Z
2021-05-19T07:36:59.000Z
tests.py
kuharan/opts
3966ee873aebeab46ebabfa6b85a9c66c56633f7
[ "BSD-2-Clause" ]
2
2019-02-26T14:34:01.000Z
2019-05-31T03:44:52.000Z
#!/usr/bin/env python # coding: utf-8 """ tests ~~~~~ Provides the tests for opts. :copyright: 2010 by Daniel Neuhäuser :license: BSD, see LICENSE for details """ import unittest import sys from decimal import Decimal from StringIO import StringIO from opts import (Node, Option, BooleanOption, In...
33.094697
79
0.521289
import unittest import sys from decimal import Decimal from StringIO import StringIO from opts import (Node, Option, BooleanOption, IntOption, FloatOption, DecimalOption, MultipleOptions, Positional, IntPositional, FloatPositional, DecimalPositional, Command, Parser) def xrange(*...
true
true
f73e489ea8762999852e1bf87637ac75a346f0ba
803
py
Python
src/octonag/jira_status.py
taliamax/OctoNag
51e8cb139008f52f17aa6580a02e8553d17f821f
[ "Apache-2.0" ]
1
2019-12-10T21:25:14.000Z
2019-12-10T21:25:14.000Z
src/octonag/jira_status.py
taliamax/OctoNag
51e8cb139008f52f17aa6580a02e8553d17f821f
[ "Apache-2.0" ]
2
2020-05-06T03:06:08.000Z
2021-06-02T00:17:58.000Z
src/octonag/jira_status.py
taliamax/OctoNag
51e8cb139008f52f17aa6580a02e8553d17f821f
[ "Apache-2.0" ]
1
2020-01-21T20:04:34.000Z
2020-01-21T20:04:34.000Z
from .configuration import with_credentials from .configuration import jira_url from jira import JIRA from jira.exceptions import JIRAError import logging @with_credentials(service='Jira') def in_review(issue_id, _usr, _pwd): if _usr is None or _pwd is None: logging.error('Jira username or password unset....
26.766667
73
0.607721
from .configuration import with_credentials from .configuration import jira_url from jira import JIRA from jira.exceptions import JIRAError import logging @with_credentials(service='Jira') def in_review(issue_id, _usr, _pwd): if _usr is None or _pwd is None: logging.error('Jira username or password unset....
true
true
f73e48adcd654c16c1853596f0b84ea2b5d54e3f
10,263
py
Python
castepxbin/pdos.py
zhubonan/castepxbin
24b875cf44b83d5eac75b52cf45e378a3361e90e
[ "MIT" ]
4
2021-10-08T13:24:26.000Z
2022-02-19T08:54:31.000Z
castepxbin/pdos.py
zhubonan/castepxbin
24b875cf44b83d5eac75b52cf45e378a3361e90e
[ "MIT" ]
3
2021-01-06T22:28:52.000Z
2021-10-20T18:20:55.000Z
castepxbin/pdos.py
zhubonan/castepxbin
24b875cf44b83d5eac75b52cf45e378a3361e90e
[ "MIT" ]
null
null
null
""" Reader module for CASTEP pdos_bin Written based on the example `pdos_bin.f90` file in open-source OptaDos code """ from enum import Enum, unique import numpy as np from scipy.io import FortranFile @unique class SpinEnum(Enum): """ Enum type for Spin. Only up and down. Usage: Spin.up, Spin.down. ...
34.555556
103
0.577804
from enum import Enum, unique import numpy as np from scipy.io import FortranFile @unique class SpinEnum(Enum): up, down = (1, -1) def __int__(self): return self.value def __float__(self): return float(self.value) def __str__(self): return str(self.value) @unique class Orb...
true
true
f73e497f0d130c2f6beb046e40354c51ea162268
3,003
py
Python
hlwtadmin/management/commands/delete_datakunstenbe_podiumfestivalinfo.py
Kunstenpunt/havelovewilltravel
6a27824b4d3d8b1bf19e0bc0d0648f0f4e8abc83
[ "Apache-2.0" ]
1
2020-10-16T16:29:01.000Z
2020-10-16T16:29:01.000Z
hlwtadmin/management/commands/delete_datakunstenbe_podiumfestivalinfo.py
Kunstenpunt/havelovewilltravel
6a27824b4d3d8b1bf19e0bc0d0648f0f4e8abc83
[ "Apache-2.0" ]
365
2020-02-03T12:46:53.000Z
2022-02-27T17:20:46.000Z
hlwtadmin/management/commands/delete_datakunstenbe_podiumfestivalinfo.py
Kunstenpunt/havelovewilltravel
6a27824b4d3d8b1bf19e0bc0d0648f0f4e8abc83
[ "Apache-2.0" ]
null
null
null
from hlwtadmin.models import Artist, GigFinderUrl, GigFinder, ConcertAnnouncement, Venue, Location, Organisation, Country, Concert, RelationConcertConcert, RelationConcertOrganisation, RelationConcertArtist, Location from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): de...
43.521739
216
0.624043
from hlwtadmin.models import Artist, GigFinderUrl, GigFinder, ConcertAnnouncement, Venue, Location, Organisation, Country, Concert, RelationConcertConcert, RelationConcertOrganisation, RelationConcertArtist, Location from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): de...
true
true
f73e49ba09103087760a7f42b0899eb546f8456c
1,705
py
Python
jsonify.py
SalarHoushvand/discrete-math-restfulAPI
213971d5e26eb7d2848c707e591842b24494772a
[ "MIT" ]
3
2020-10-02T13:42:16.000Z
2020-10-28T00:14:43.000Z
jsonify.py
SalarHoushvand/discrete-math-restfulAPI
213971d5e26eb7d2848c707e591842b24494772a
[ "MIT" ]
1
2020-09-25T15:48:43.000Z
2020-09-25T15:48:43.000Z
jsonify.py
SalarHoushvand/discrete-math-restfulAPI
213971d5e26eb7d2848c707e591842b24494772a
[ "MIT" ]
1
2020-10-16T14:18:03.000Z
2020-10-16T14:18:03.000Z
# ----------------------------------------------------------- # Functions to generate JSON files in a desired format # from the functions inside functions.py # ----------------------------------------------------------- def question_json_maker(question_id, question, answer, answer_index=1, question_type='MC', difficu...
34.795918
116
0.621701
def question_json_maker(question_id, question, answer, answer_index=1, question_type='MC', difficulty=1, points=10): questions_template = { "questionID": question_id, "question": question, "questionType": question_type, "answerSelectionType": "single", "answers": answer...
true
true
f73e4b51f4d05479384d0659ba79ece4deff2953
32,440
py
Python
fhir/resources/messagedefinition.py
cstoltze/fhir.resources
52f99738935b7313089d89daf94d73ce7d167c9d
[ "BSD-3-Clause" ]
144
2019-05-08T14:24:43.000Z
2022-03-30T02:37:11.000Z
fhir/resources/messagedefinition.py
cstoltze/fhir.resources
52f99738935b7313089d89daf94d73ce7d167c9d
[ "BSD-3-Clause" ]
82
2019-05-13T17:43:13.000Z
2022-03-30T16:45:17.000Z
fhir/resources/messagedefinition.py
cstoltze/fhir.resources
52f99738935b7313089d89daf94d73ce7d167c9d
[ "BSD-3-Clause" ]
48
2019-04-04T14:14:53.000Z
2022-03-30T06:07:31.000Z
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/MessageDefinition Release: R4 Version: 4.0.1 Build ID: 9346c8cc45 Last updated: 2019-11-01T09:29:23.356+11:00 """ import typing from pydantic import Field, root_validator from pydantic.error_wrappers import ErrorWrapper, ValidationError from ...
39.85258
93
0.60561
import typing from pydantic import Field, root_validator from pydantic.error_wrappers import ErrorWrapper, ValidationError from pydantic.errors import MissingError, NoneIsNotAllowedError from . import backboneelement, domainresource, fhirtypes class MessageDefinition(domainresource.DomainResource): resource_t...
true
true
f73e4b6ba6d652e6d4ca99e210b18a9a20b14eea
123,266
py
Python
kubernetes_asyncio/client/api/batch_v2alpha1_api.py
opsani/kubernetes_asyncio
55283bf6f3690e5c0a0c589cd752221511e2be51
[ "Apache-2.0" ]
196
2018-05-23T16:55:41.000Z
2022-03-31T10:09:40.000Z
kubernetes_asyncio/client/api/batch_v2alpha1_api.py
tomplus/kubernetes_asyncio
e8c8686ec11be3a5295ae9d5d8728299492a61f8
[ "Apache-2.0" ]
164
2018-05-20T20:39:03.000Z
2022-03-29T22:57:04.000Z
kubernetes_asyncio/client/api/batch_v2alpha1_api.py
opsani/kubernetes_asyncio
55283bf6f3690e5c0a0c589cd752221511e2be51
[ "Apache-2.0" ]
41
2018-06-08T00:39:53.000Z
2022-01-12T18:19:06.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.18.20 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re #...
68.90218
1,390
0.665179
from __future__ import absolute_import import re import six from kubernetes_asyncio.client.api_client import ApiClient from kubernetes_asyncio.client.exceptions import ( ApiTypeError, ApiValueError ) class BatchV2alpha1Api(object): def __init__(self, api_client=None): if api_client is...
true
true
f73e4c28bf6bf53148217941a2d246a92baf3f8f
2,263
py
Python
scripts/insert_api_refs.py
mpolson64/Ax-1
cf9e12cc1253efe0fc893f2620e99337e0927a26
[ "MIT" ]
1
2022-02-10T10:51:40.000Z
2022-02-10T10:51:40.000Z
scripts/insert_api_refs.py
mpolson64/Ax-1
cf9e12cc1253efe0fc893f2620e99337e0927a26
[ "MIT" ]
null
null
null
scripts/insert_api_refs.py
mpolson64/Ax-1
cf9e12cc1253efe0fc893f2620e99337e0927a26
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import ast import glob import re def list_functions(source_glob): """ List all of the funct...
33.279412
82
0.588157
import argparse import ast import glob import re def list_functions(source_glob): defined = [] for sp in glob.glob(source_glob): module_name = sp[:-3] module_name = module_name.replace("/", ".") node = ast.parse(open(sp).read()) defined.extend( ...
true
true
f73e4d16b2cd8fa1026b82af5d125e7099e43365
9,695
py
Python
siteprefs/utils.py
idlesign/django-siteprefs
dbc040b96800a73e35a3d436a5207dd658ce0c58
[ "BSD-3-Clause" ]
8
2015-01-30T11:57:45.000Z
2021-11-07T01:21:05.000Z
siteprefs/utils.py
idlesign/django-siteprefs
dbc040b96800a73e35a3d436a5207dd658ce0c58
[ "BSD-3-Clause" ]
17
2015-03-28T18:26:40.000Z
2020-06-05T04:35:15.000Z
siteprefs/utils.py
idlesign/django-siteprefs
dbc040b96800a73e35a3d436a5207dd658ce0c58
[ "BSD-3-Clause" ]
7
2015-03-29T10:06:14.000Z
2020-05-29T05:22:39.000Z
import inspect import os from collections import OrderedDict from datetime import datetime from typing import Any, Callable, Type, Generator, Tuple from warnings import warn from django.contrib import admin from django.db import models from django.utils.translation import gettext_lazy as _ from etc.toolbox import imp...
25.580475
108
0.633213
import inspect import os from collections import OrderedDict from datetime import datetime from typing import Any, Callable, Type, Generator, Tuple from warnings import warn from django.contrib import admin from django.db import models from django.utils.translation import gettext_lazy as _ from etc.toolbox import imp...
true
true
f73e4e29c974bf5d8bdee323ccc96a8aac191964
13,742
py
Python
src/transformers/modeling_tf_performer_attention.py
TwinMooon/transformers-plus-performers
c17d6473deb5316363f60bb2ddd1007d4364abe4
[ "Apache-2.0" ]
null
null
null
src/transformers/modeling_tf_performer_attention.py
TwinMooon/transformers-plus-performers
c17d6473deb5316363f60bb2ddd1007d4364abe4
[ "Apache-2.0" ]
null
null
null
src/transformers/modeling_tf_performer_attention.py
TwinMooon/transformers-plus-performers
c17d6473deb5316363f60bb2ddd1007d4364abe4
[ "Apache-2.0" ]
1
2021-12-15T00:23:27.000Z
2021-12-15T00:23:27.000Z
from typing import Optional, Union import logging import numpy as np import tensorflow as tf from .configuration_performer_attention import PerformerAttentionConfig from .modeling_utils import ( find_pruneable_heads_and_indices, prune_linear_layer ) KERNEL_CALLABLES = { 'cosh': lambda x, h: tf.concat((tf...
45.654485
122
0.622398
from typing import Optional, Union import logging import numpy as np import tensorflow as tf from .configuration_performer_attention import PerformerAttentionConfig from .modeling_utils import ( find_pruneable_heads_and_indices, prune_linear_layer ) KERNEL_CALLABLES = { 'cosh': lambda x, h: tf.concat((tf...
true
true
f73e4e75ba03100756936221c31bb5303f3d9e4f
417
py
Python
posts/migrations/0002_auto_20200312_1113.py
Duskhorizon/discoplaytogether
e74a11b0f65d14db6f15d1bb0536411dd546eda6
[ "MIT" ]
null
null
null
posts/migrations/0002_auto_20200312_1113.py
Duskhorizon/discoplaytogether
e74a11b0f65d14db6f15d1bb0536411dd546eda6
[ "MIT" ]
null
null
null
posts/migrations/0002_auto_20200312_1113.py
Duskhorizon/discoplaytogether
e74a11b0f65d14db6f15d1bb0536411dd546eda6
[ "MIT" ]
null
null
null
# Generated by Django 3.0.4 on 2020-03-12 11:13 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('posts', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='event', name='channel', ), mig...
18.954545
47
0.544365
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('posts', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='event', name='channel', ), migrations.RemoveField( model_name='ev...
true
true
f73e4e9197fbb0567c431ad804b5e4891508c915
2,697
py
Python
tvm/dmlc-core/tracker/dmlc_tracker/launcher.py
hj424/heterocl
e51b8f7f65ae6ad55c0c2426ab7192c3d8f6702b
[ "Apache-2.0" ]
236
2019-05-19T01:48:11.000Z
2022-03-31T09:03:54.000Z
tvm/dmlc-core/tracker/dmlc_tracker/launcher.py
hj424/heterocl
e51b8f7f65ae6ad55c0c2426ab7192c3d8f6702b
[ "Apache-2.0" ]
248
2019-05-17T19:18:36.000Z
2022-03-30T21:25:47.000Z
tvm/dmlc-core/tracker/dmlc_tracker/launcher.py
hj424/heterocl
e51b8f7f65ae6ad55c0c2426ab7192c3d8f6702b
[ "Apache-2.0" ]
85
2019-05-17T20:09:27.000Z
2022-02-28T20:19:00.000Z
#!/usr/bin/env python # pylint: disable=invalid-name """The container launcher script that launches DMLC with the right env variable.""" import glob import sys import os import subprocess def unzip_archives(ar_list, env): for fname in ar_list: if not os.path.exists(fname): continue if f...
32.890244
84
0.609937
import glob import sys import os import subprocess def unzip_archives(ar_list, env): for fname in ar_list: if not os.path.exists(fname): continue if fname.endswith('.zip'): subprocess.call(args=['unzip', fname], env=env) elif fname.find('.tar') != -1: s...
true
true
f73e4eea10557ba50f2e6c997da112380550e134
5,277
py
Python
output.py
Casper64/natural-deduction
30c9f7640126102aa31aae70e0e28322159d766c
[ "MIT" ]
null
null
null
output.py
Casper64/natural-deduction
30c9f7640126102aa31aae70e0e28322159d766c
[ "MIT" ]
null
null
null
output.py
Casper64/natural-deduction
30c9f7640126102aa31aae70e0e28322159d766c
[ "MIT" ]
null
null
null
import argparse from enum import Enum from random import random import re import input import debug import math import util from typing import TYPE_CHECKING if TYPE_CHECKING: from solve import Premise def display_start() -> None: p = argparse.ArgumentParser() p.add_argument("--file", help="Parse from a fil...
32.776398
109
0.537995
import argparse from enum import Enum from random import random import re import input import debug import math import util from typing import TYPE_CHECKING if TYPE_CHECKING: from solve import Premise def display_start() -> None: p = argparse.ArgumentParser() p.add_argument("--file", help="Parse from a fil...
true
true
f73e4fd64975cbbb92418b729581cb7dbb63ada6
1,185
py
Python
profiles/views/group_list_view.py
Sispheor/squest
f852fe7986521a9d8cd9fb5eb0b56aa15f22548c
[ "Apache-2.0" ]
112
2021-04-21T08:52:55.000Z
2022-03-01T15:09:19.000Z
profiles/views/group_list_view.py
Sispheor/squest
f852fe7986521a9d8cd9fb5eb0b56aa15f22548c
[ "Apache-2.0" ]
216
2021-04-21T09:06:47.000Z
2022-03-30T14:21:28.000Z
profiles/views/group_list_view.py
Sispheor/squest
f852fe7986521a9d8cd9fb5eb0b56aa15f22548c
[ "Apache-2.0" ]
21
2021-04-20T13:53:54.000Z
2022-03-30T21:43:04.000Z
from django_filters.views import FilterView from django_tables2.views import SingleTableMixin from django_tables2 import tables, TemplateColumn from django.contrib.auth.models import Group from guardian.mixins import LoginRequiredMixin from profiles.filters.group_filter import GroupFilter class GroupTable(tables.Tab...
35.909091
96
0.733333
from django_filters.views import FilterView from django_tables2.views import SingleTableMixin from django_tables2 import tables, TemplateColumn from django.contrib.auth.models import Group from guardian.mixins import LoginRequiredMixin from profiles.filters.group_filter import GroupFilter class GroupTable(tables.Tab...
true
true
f73e505f6fa1318b67875300d1dce743aeef3d2b
7,591
py
Python
oneflow/python/onnx/optimizer/back_to_back_optimizer.py
xxg1413/oneflow
f2e3c85a25b8aecfb6c0c0af1737833b1a77e135
[ "Apache-2.0" ]
1
2020-12-04T03:06:16.000Z
2020-12-04T03:06:16.000Z
oneflow/python/onnx/optimizer/back_to_back_optimizer.py
xxg1413/oneflow
f2e3c85a25b8aecfb6c0c0af1737833b1a77e135
[ "Apache-2.0" ]
null
null
null
oneflow/python/onnx/optimizer/back_to_back_optimizer.py
xxg1413/oneflow
f2e3c85a25b8aecfb6c0c0af1737833b1a77e135
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow 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 or agr...
38.145729
101
0.580819
from __future__ import unicode_literals from oneflow.python.onnx.util import ONNX_DTYPE_NAMES from .optimizer_base import GraphOptimizerBase _func_map = {} def _register_func(op_type): def _internal_fun(func): _func_map[op_type] = func return func return _internal_fun class Ba...
true
true
f73e5203812e40469064ff1483357558448878d9
1,781
py
Python
questions/coin-change/Solution.py
marcus-aurelianus/leetcode-solutions
8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6
[ "MIT" ]
141
2017-12-12T21:45:53.000Z
2022-03-25T07:03:39.000Z
questions/coin-change/Solution.py
marcus-aurelianus/leetcode-solutions
8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6
[ "MIT" ]
32
2015-10-05T14:09:52.000Z
2021-05-30T10:28:41.000Z
questions/coin-change/Solution.py
marcus-aurelianus/leetcode-solutions
8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6
[ "MIT" ]
56
2015-09-30T05:23:28.000Z
2022-03-08T07:57:11.000Z
""" You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1. You may assume that you have an infinite number of ea...
25.811594
261
0.567097
import collections class Solution: def coinChange(self, coins: List[int], amount: int) -> int: amount for i in range(1, amount + 1): candidates = list(filter(lambda x: x is not None, [dp[i - c] if i - c >= 0 else None for...
true
true
f73e525efe3821bc206c38a268ae89fda49c3dc4
9,618
py
Python
homeassistant/components/octoprint/__init__.py
billyburly/home-assistant
9795449d22783e77a0ca7b745f15c89a830c5cc6
[ "Apache-2.0" ]
5
2020-09-17T10:48:51.000Z
2021-11-22T00:08:17.000Z
homeassistant/components/octoprint/__init__.py
billyburly/home-assistant
9795449d22783e77a0ca7b745f15c89a830c5cc6
[ "Apache-2.0" ]
9
2022-01-27T06:32:10.000Z
2022-03-31T07:07:51.000Z
homeassistant/components/octoprint/__init__.py
billyburly/home-assistant
9795449d22783e77a0ca7b745f15c89a830c5cc6
[ "Apache-2.0" ]
6
2019-12-01T19:06:52.000Z
2020-09-17T00:57:06.000Z
"""Support for monitoring OctoPrint 3D printers.""" import logging import time from aiohttp.hdrs import CONTENT_TYPE import requests import voluptuous as vol from homeassistant.components.discovery import SERVICE_OCTOPRINT from homeassistant.const import ( CONF_API_KEY, CONF_BINARY_SENSORS, CONF_HOST, ...
35.10219
87
0.597525
import logging import time from aiohttp.hdrs import CONTENT_TYPE import requests import voluptuous as vol from homeassistant.components.discovery import SERVICE_OCTOPRINT from homeassistant.const import ( CONF_API_KEY, CONF_BINARY_SENSORS, CONF_HOST, CONF_MONITORED_CONDITIONS, CONF_NAME, CONF_...
true
true
f73e526d89710d8df3afc67a77c680cc3eba815e
13,541
py
Python
technical_deployment/train_model/imdb_data.py
ChaplinMarchais/cortana-intelligence-product-detection-from-images
a28894b2eeb1b8397d84286f66bdc8f947e543b4
[ "MIT" ]
1
2018-05-14T05:26:36.000Z
2018-05-14T05:26:36.000Z
technical_deployment/train_model/imdb_data.py
Thirapat/cortana-intelligence-product-detection-from-images
10077cb022b95239064944ec647888c86ca6aca9
[ "MIT" ]
4
2021-06-08T23:55:34.000Z
2022-03-12T00:55:55.000Z
technical_deployment/train_model/imdb_data.py
isabella232/cortana-intelligence-product-detection-from-images
2e5370098f9f83cd27cdaba2eab675f3c30ae157
[ "MIT" ]
3
2018-04-11T18:15:11.000Z
2019-10-15T13:59:54.000Z
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- from __future__ import print_function from builtins import range import...
41.922601
128
0.571819
from __future__ import print_function from builtins import range import sys, os from helpers import * import scipy.sparse import scipy.io as sio import pickle as cp import numpy as np import fastRCNN class imdb_data(fastRCNN.imdb): def __init__(self, image_set, classes, maxNrRois, imgDir, roiDir, cacheDir,...
true
true
f73e530ee5e971492182a88af77326412c346bd2
638
py
Python
ch2o/tests/syntax/MultiFunction.py
disktnk/chainer-compiler
5cfd027b40ea6e4abf73eb42be70b4fba74d1cde
[ "MIT" ]
null
null
null
ch2o/tests/syntax/MultiFunction.py
disktnk/chainer-compiler
5cfd027b40ea6e4abf73eb42be70b4fba74d1cde
[ "MIT" ]
null
null
null
ch2o/tests/syntax/MultiFunction.py
disktnk/chainer-compiler
5cfd027b40ea6e4abf73eb42be70b4fba74d1cde
[ "MIT" ]
null
null
null
# coding: utf-8 import chainer import chainer.links as L # Network definition class A(chainer.Chain): def __init__(self): super(A, self).__init__() with self.init_scope(): self.l0 = L.Linear(7) self.l1 = L.Linear(5) def g(self, y): return self.l1(y) def...
16.358974
49
0.529781
import chainer import chainer.links as L class A(chainer.Chain): def __init__(self): super(A, self).__init__() with self.init_scope(): self.l0 = L.Linear(7) self.l1 = L.Linear(5) def g(self, y): return self.l1(y) def forward(sl, x): x1 = sl.l0...
true
true
f73e54b40868479e304268404d758135e938e86b
3,320
py
Python
homeworks/ask/generate_training_data.py
jsedoc/nn_chatbot
7b4406687bad2efa14658cb5aa137065cd325073
[ "MIT" ]
4
2016-11-02T16:39:25.000Z
2021-06-13T20:29:19.000Z
homeworks/ask/generate_training_data.py
jsedoc/nn_chatbot
7b4406687bad2efa14658cb5aa137065cd325073
[ "MIT" ]
null
null
null
homeworks/ask/generate_training_data.py
jsedoc/nn_chatbot
7b4406687bad2efa14658cb5aa137065cd325073
[ "MIT" ]
3
2017-06-09T10:30:22.000Z
2020-02-25T02:29:58.000Z
from __future__ import print_function import readline import json import re from .config.config import read_from_user from intent_schema import IntentSchema from argparse import ArgumentParser def print_description(intent): print ("<> Enter data for <{intent}> OR Press enter with empty string to move onto next in...
39.058824
99
0.591265
from __future__ import print_function import readline import json import re from .config.config import read_from_user from intent_schema import IntentSchema from argparse import ArgumentParser def print_description(intent): print ("<> Enter data for <{intent}> OR Press enter with empty string to move onto next in...
true
true
f73e54b882403131dc7c483d960bce04c041cfbd
925
py
Python
test01.py
888dahong888/open3dTest
cf28df9f9f5d24b1ca614414804a1c18d349467c
[ "Apache-2.0" ]
1
2020-08-05T02:20:01.000Z
2020-08-05T02:20:01.000Z
test01.py
888dahong888/open3dTest
cf28df9f9f5d24b1ca614414804a1c18d349467c
[ "Apache-2.0" ]
null
null
null
test01.py
888dahong888/open3dTest
cf28df9f9f5d24b1ca614414804a1c18d349467c
[ "Apache-2.0" ]
null
null
null
#读写点云,网格,图片文件 import numpy as np import open3d as o3d pcd=o3d.io.read_point_cloud("data/rs1.pcd") print(pcd) #打印点云数量 #可视化一下 o3d.visualization.draw_geometries([pcd]) #下采样 downpcd = pcd.voxel_down_sample(voxel_size=0.05) o3d.visualization.draw_geometries([downpcd]) #计算法向量 downpcd.estimate_normals(search_param...
24.342105
98
0.776216
import numpy as np import open3d as o3d pcd=o3d.io.read_point_cloud("data/rs1.pcd") print(pcd) o3d.visualization.draw_geometries([pcd]) downpcd = pcd.voxel_down_sample(voxel_size=0.05) o3d.visualization.draw_geometries([downpcd]) downpcd.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybri...
true
true
f73e5547a542c0b70784f59c095e0b4d42d6632c
413
py
Python
django/contrib/gis/db/backends/postgis/features.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
2
2021-01-10T19:18:21.000Z
2021-01-11T13:42:42.000Z
django/contrib/gis/db/backends/postgis/features.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
django/contrib/gis/db/backends/postgis/features.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.db.backends.postgresql.features import ( DatabaseFeatures as Psycopg2DatabaseFeatures, ) class DatabaseFeatures(BaseSpatialFeatures, Psycopg2DatabaseFeatures): supports_geography = True supports_3d_storage = True ...
31.769231
76
0.811138
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.db.backends.postgresql.features import ( DatabaseFeatures as Psycopg2DatabaseFeatures, ) class DatabaseFeatures(BaseSpatialFeatures, Psycopg2DatabaseFeatures): supports_geography = True supports_3d_storage = True ...
true
true
f73e557414dd0e9dbae94d56b7866f877271804d
2,272
py
Python
pyextension/test.py
rug/robosoc2d
7a018f8ef6974f96a44df018b8adb185e2c07c63
[ "MIT" ]
null
null
null
pyextension/test.py
rug/robosoc2d
7a018f8ef6974f96a44df018b8adb185e2c07c63
[ "MIT" ]
null
null
null
pyextension/test.py
rug/robosoc2d
7a018f8ef6974f96a44df018b8adb185e2c07c63
[ "MIT" ]
null
null
null
import robosoc2d sim_handle = robosoc2d.build_simpleplayer_simulator([], 4, [], 4) while robosoc2d.simulator_step_if_playing(sim_handle): print(robosoc2d.simulator_get_state_string(sim_handle)) print(robosoc2d.simulator_get_state_string(sim_handle)) robosoc2d.simulator_delete_all() class MyPlayer: def __init__...
37.245902
169
0.78081
import robosoc2d sim_handle = robosoc2d.build_simpleplayer_simulator([], 4, [], 4) while robosoc2d.simulator_step_if_playing(sim_handle): print(robosoc2d.simulator_get_state_string(sim_handle)) print(robosoc2d.simulator_get_state_string(sim_handle)) robosoc2d.simulator_delete_all() class MyPlayer: def __init__...
true
true
f73e56c59209c3271c0651d49f017a03f54bbf3b
342
py
Python
v1/addresses/serializers.py
DucPhamTV/MaiTet
44a1465a3239808f6640592ba666d9c5449c0ef4
[ "MIT" ]
null
null
null
v1/addresses/serializers.py
DucPhamTV/MaiTet
44a1465a3239808f6640592ba666d9c5449c0ef4
[ "MIT" ]
15
2021-02-20T12:03:33.000Z
2021-07-26T10:15:03.000Z
v1/addresses/serializers.py
DucPhamTV/MaiTet
44a1465a3239808f6640592ba666d9c5449c0ef4
[ "MIT" ]
null
null
null
from rest_framework.serializers import ModelSerializer, StringRelatedField from v1.addresses.models.addresses import Address class AddressSerializer(ModelSerializer): province = StringRelatedField() district = StringRelatedField() ward = StringRelatedField() class Meta: model = Address ...
24.428571
74
0.748538
from rest_framework.serializers import ModelSerializer, StringRelatedField from v1.addresses.models.addresses import Address class AddressSerializer(ModelSerializer): province = StringRelatedField() district = StringRelatedField() ward = StringRelatedField() class Meta: model = Address ...
true
true
f73e5859f8b430977d4fa772a35d8d6d957f8e82
289
py
Python
scripts/copy_to_staging_area.py
thurn/dungeonstrike
c9eb8867a7c9d5f6702d3fc743cc39d3bfc4a52d
[ "Apache-2.0" ]
1
2017-10-07T14:40:12.000Z
2017-10-07T14:40:12.000Z
scripts/copy_to_staging_area.py
thurn/dungeonstrike
c9eb8867a7c9d5f6702d3fc743cc39d3bfc4a52d
[ "Apache-2.0" ]
null
null
null
scripts/copy_to_staging_area.py
thurn/dungeonstrike
c9eb8867a7c9d5f6702d3fc743cc39d3bfc4a52d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.7 import os import lib env = lib.init() print("\nCopying all project files to staging directory...\n") lib.call([ "rsync", "--archive", "--delete", "--quiet", env.project_root + os.sep, # Need trailing / to make rsync not create a subdir env.staging_path ])
22.230769
80
0.67474
import os import lib env = lib.init() print("\nCopying all project files to staging directory...\n") lib.call([ "rsync", "--archive", "--delete", "--quiet", env.project_root + os.sep, env.staging_path ])
true
true
f73e5b24b714826d1a1c8b450da4ac27370c9b51
2,804
py
Python
python/lib/DataMorphing.py
djgroen/FabSim
e26a81342de92ab1a8b7c25b63e2f85c3094fc1d
[ "BSD-3-Clause" ]
12
2015-10-06T08:32:47.000Z
2021-04-07T03:03:22.000Z
python/lib/DataMorphing.py
djgroen/FabSim
e26a81342de92ab1a8b7c25b63e2f85c3094fc1d
[ "BSD-3-Clause" ]
null
null
null
python/lib/DataMorphing.py
djgroen/FabSim
e26a81342de92ab1a8b7c25b63e2f85c3094fc1d
[ "BSD-3-Clause" ]
5
2016-04-30T23:39:17.000Z
2019-06-06T16:14:30.000Z
# # This source file is part of the FabSim software toolkit, which is distributed under the BSD 3-Clause license. # Please refer to LICENSE for detailed information regarding the licensing. # # This file contains common routines to transform and modify 2D data files. import numpy as np def smooth_data(x,window_len=...
31.505618
112
0.662268
import numpy as np def smooth_data(x,window_len=13,window='flat'): """smooth the data using a window with requested size. courtesy of the scipy cookbook. This method is based on the convolution of a scaled window with the signal. The signal is prepared by introducing reflected copies of the signal (with...
false
true
f73e5bfa9700cd4b4cdfe40b8976cb6923234da6
4,234
py
Python
simplejson/tests/test_unicode.py
gitdaniel228/realtor
4366d57b064be87b31c8a036b3ed7a99b2036461
[ "BSD-3-Clause" ]
20
2015-01-26T01:39:44.000Z
2020-05-30T19:04:14.000Z
lib/simplejson/tests/test_unicode.py
motord/Motorcycle-Diaries
bb5e5e2d4d79573b4231e760d7662db26c03a55e
[ "BSD-3-Clause" ]
6
2015-02-23T06:47:09.000Z
2015-06-04T20:31:30.000Z
lib/simplejson/tests/test_unicode.py
motord/Motorcycle-Diaries
bb5e5e2d4d79573b4231e760d7662db26c03a55e
[ "BSD-3-Clause" ]
13
2015-01-26T01:39:45.000Z
2022-03-09T16:45:09.000Z
from unittest import TestCase import simplejson as json class TestUnicode(TestCase): def test_encoding1(self): encoder = json.JSONEncoder(encoding='utf-8') u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}' s = u.encode('utf-8') ju = encoder.encode(u) js = en...
42.34
78
0.600614
from unittest import TestCase import simplejson as json class TestUnicode(TestCase): def test_encoding1(self): encoder = json.JSONEncoder(encoding='utf-8') u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}' s = u.encode('utf-8') ju = encoder.encode(u) js = en...
true
true
f73e5edb4e824e95d29c00b69907e6c73bbcc304
1,168
py
Python
tests/unit/pypyr/steps/call_test.py
mofm/pypyr
f417f69ba9a607d8a93019854105cfbc4dc9c36d
[ "Apache-2.0" ]
261
2020-08-18T19:31:29.000Z
2022-03-31T14:54:06.000Z
tests/unit/pypyr/steps/call_test.py
mofm/pypyr
f417f69ba9a607d8a93019854105cfbc4dc9c36d
[ "Apache-2.0" ]
89
2017-04-12T09:50:32.000Z
2020-08-13T13:18:36.000Z
tests/unit/pypyr/steps/call_test.py
mofm/pypyr
f417f69ba9a607d8a93019854105cfbc4dc9c36d
[ "Apache-2.0" ]
15
2020-09-30T12:15:50.000Z
2022-03-30T07:25:40.000Z
"""call.py unit tests.""" import logging import pytest from pypyr.context import Context from pypyr.errors import Call from pypyr.steps.call import run_step from tests.common.utils import patch_logger def test_call_step_dict_with_all_args(): """Dict with all values set.""" with pytest.raises(Call) as err: ...
36.5
70
0.544521
import logging import pytest from pypyr.context import Context from pypyr.errors import Call from pypyr.steps.call import run_step from tests.common.utils import patch_logger def test_call_step_dict_with_all_args(): with pytest.raises(Call) as err: with patch_logger('pypyr.steps.call', ...
true
true
f73e5ff5e3d85e3d82016f1a921201826b0a8508
502
py
Python
app/asx/wsgi.py
shift37/asx_gym
dd3d8dafae4f22ab9c9027bf362013255dbc6c36
[ "RSA-MD" ]
null
null
null
app/asx/wsgi.py
shift37/asx_gym
dd3d8dafae4f22ab9c9027bf362013255dbc6c36
[ "RSA-MD" ]
3
2020-06-06T08:27:08.000Z
2020-06-13T09:51:26.000Z
app/asx/wsgi.py
asxgym/asx_gym
8b7745820c0d4cd59281acf7c003ec1f1938005a
[ "RSA-MD" ]
null
null
null
""" WSGI config for asx_data project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os import sys sys.path.append('/var/www/axs_data/') sys.path.append('/anaconda3/lib/pytho...
23.904762
78
0.776892
import os import sys sys.path.append('/var/www/axs_data/') sys.path.append('/anaconda3/lib/python3.7/site-packages/') from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'asx_data.settings') application = get_wsgi_application()
true
true
f73e619be549cba3f38e356780e47eff6907d447
435
py
Python
VideoSensors/Sensors/CVSensor.py
CommName/WildeLifeWatcher
3ce3b564d0e6cc81ebc2b607a712580d3c388db6
[ "MIT" ]
null
null
null
VideoSensors/Sensors/CVSensor.py
CommName/WildeLifeWatcher
3ce3b564d0e6cc81ebc2b607a712580d3c388db6
[ "MIT" ]
null
null
null
VideoSensors/Sensors/CVSensor.py
CommName/WildeLifeWatcher
3ce3b564d0e6cc81ebc2b607a712580d3c388db6
[ "MIT" ]
null
null
null
from Sensors import Sensor import cv2 class CVSensor(Sensor): stream = None def __init__(self, videoSource): self.stream = cv2.VideoCapture(videoSource) def __del__(self): self.stream.release() def getFrame(self): if not self.stream.isOpened(): return None ...
18.125
51
0.583908
from Sensors import Sensor import cv2 class CVSensor(Sensor): stream = None def __init__(self, videoSource): self.stream = cv2.VideoCapture(videoSource) def __del__(self): self.stream.release() def getFrame(self): if not self.stream.isOpened(): return None ...
true
true
f73e61a9003c699d60ac6c1c1b8d8be815a2c80e
1,251
py
Python
AppServer/lib/django-1.4/tests/regressiontests/queryset_pickle/tests.py
loftwah/appscale
586fc1347ebc743d7a632de698f4dbfb09ae38d6
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/django-1.4/tests/regressiontests/queryset_pickle/tests.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/django-1.4/tests/regressiontests/queryset_pickle/tests.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
from __future__ import absolute_import import pickle import datetime from django.test import TestCase from .models import Group, Event, Happening class PickleabilityTestCase(TestCase): def assert_pickles(self, qs): self.assertEqual(list(pickle.loads(pickle.dumps(qs))), list(qs)) def test_related_f...
32.076923
83
0.751399
from __future__ import absolute_import import pickle import datetime from django.test import TestCase from .models import Group, Event, Happening class PickleabilityTestCase(TestCase): def assert_pickles(self, qs): self.assertEqual(list(pickle.loads(pickle.dumps(qs))), list(qs)) def test_related_f...
true
true
f73e62a85d454f9033eb749cd08590dcae9afa98
3,087
py
Python
iimmpact/models/topup_response.py
iimmpact/iimmpact_python_api
d1de12df3eb984ebc7f6adef800d7cb0265e173e
[ "MIT" ]
null
null
null
iimmpact/models/topup_response.py
iimmpact/iimmpact_python_api
d1de12df3eb984ebc7f6adef800d7cb0265e173e
[ "MIT" ]
null
null
null
iimmpact/models/topup_response.py
iimmpact/iimmpact_python_api
d1de12df3eb984ebc7f6adef800d7cb0265e173e
[ "MIT" ]
null
null
null
# coding: utf-8 """ IIMMPACT API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 2020-09-14T13:01:14Z Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: ...
26.612069
119
0.553936
import pprint import re import six class TopupResponse(object): swagger_types = { 'data': 'TopupResponseData' } attribute_map = { 'data': 'data' } def __init__(self, data=None): self._data = None self.discriminator = None if data is not None: ...
true
true
f73e63e237ea90b3e82dac4e266100933370f346
2,516
py
Python
examples/run_mtsv1.py
tuahk/NiaPy
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
[ "MIT" ]
null
null
null
examples/run_mtsv1.py
tuahk/NiaPy
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
[ "MIT" ]
null
null
null
examples/run_mtsv1.py
tuahk/NiaPy
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
[ "MIT" ]
null
null
null
# encoding=utf8 # This is temporary fix to import module from parent folder # It will be removed when package is published on PyPI import sys sys.path.append('../') # End of fix import random import logging from NiaPy.algorithms.other import MultipleTrajectorySearchV1 from NiaPy.benchmarks.utility import TaskConvPrint...
36.463768
129
0.726948
import sys sys.path.append('../') import random import logging from NiaPy.algorithms.other import MultipleTrajectorySearchV1 from NiaPy.benchmarks.utility import TaskConvPrint, TaskConvPlot, OptimizationType from margparser import getDictArgs logging.basicConfig() logger = logging.getLogger('examples') logger.set...
true
true
f73e6598db4695658b8907adb5d1a227b4ac9667
12,586
py
Python
src/tests/test_e2e.py
vdaas/vald-client-python
8727351dc1bef18e0bf0e5a7fd26a33d668f36e9
[ "Apache-2.0" ]
7
2021-04-08T00:19:23.000Z
2021-10-11T06:19:02.000Z
src/tests/test_e2e.py
vdaas/vald-client-python
8727351dc1bef18e0bf0e5a7fd26a33d668f36e9
[ "Apache-2.0" ]
8
2020-01-28T10:10:37.000Z
2021-08-24T08:05:08.000Z
src/tests/test_e2e.py
vdaas/vald-client-python
8727351dc1bef18e0bf0e5a7fd26a33d668f36e9
[ "Apache-2.0" ]
null
null
null
import unittest import json import time import grpc from vald.v1.agent.core import agent_pb2_grpc from vald.v1.vald import insert_pb2_grpc from vald.v1.vald import search_pb2_grpc from vald.v1.vald import update_pb2_grpc from vald.v1.vald import upsert_pb2_grpc from vald.v1.vald import remove_pb2_grpc from vald.v1.val...
43.701389
77
0.650405
import unittest import json import time import grpc from vald.v1.agent.core import agent_pb2_grpc from vald.v1.vald import insert_pb2_grpc from vald.v1.vald import search_pb2_grpc from vald.v1.vald import update_pb2_grpc from vald.v1.vald import upsert_pb2_grpc from vald.v1.vald import remove_pb2_grpc from vald.v1.val...
true
true
f73e65b9e2710c55209a3a72cd65dc8eff53b1c7
216
py
Python
localtileserver/_version.py
RichardScottOZ/localtileserver
a0e63d1853c8d3410ba9d4ca51c993eae15a0fe6
[ "MIT" ]
1
2021-12-12T05:19:20.000Z
2021-12-12T05:19:20.000Z
localtileserver/_version.py
RichardScottOZ/localtileserver
a0e63d1853c8d3410ba9d4ca51c993eae15a0fe6
[ "MIT" ]
null
null
null
localtileserver/_version.py
RichardScottOZ/localtileserver
a0e63d1853c8d3410ba9d4ca51c993eae15a0fe6
[ "MIT" ]
null
null
null
from pkg_resources import DistributionNotFound, get_distribution try: __version__ = get_distribution("localtileserver").version except DistributionNotFound: # package is not installed __version__ = None
27
64
0.800926
from pkg_resources import DistributionNotFound, get_distribution try: __version__ = get_distribution("localtileserver").version except DistributionNotFound: __version__ = None
true
true
f73e6616f5306b636fabda21070ea9fb0dbf94a4
1,841
py
Python
codedigger/codechef/migrations/0001_initial.py
jyothiprakashpanaik/Backend
9ab1b57436a0a1a6197777c0b36c842e71121d3a
[ "Apache-2.0" ]
17
2020-10-07T22:40:37.000Z
2022-01-20T07:19:09.000Z
codedigger/codechef/migrations/0001_initial.py
jyothiprakashpanaik/Backend
9ab1b57436a0a1a6197777c0b36c842e71121d3a
[ "Apache-2.0" ]
42
2021-06-03T01:58:04.000Z
2022-01-31T14:49:22.000Z
codedigger/codechef/migrations/0001_initial.py
jyothiprakashpanaik/Backend
9ab1b57436a0a1a6197777c0b36c842e71121d3a
[ "Apache-2.0" ]
25
2020-10-06T17:55:19.000Z
2021-12-09T07:56:50.000Z
# Generated by Django 3.1.4 on 2021-12-19 04:35 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('problem', '0005_auto_20210129_2145'), ] operations = [ migrations.CreateModel( ...
36.098039
79
0.456817
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('problem', '0005_auto_20210129_2145'), ] operations = [ migrations.CreateModel( name='CodechefContest', fields=...
true
true
f73e66d497b992d467287f4e7347d8b69fd8d6d8
1,687
py
Python
code/analyses/get_APE_feature_space_matrices_tr_by_voxels_movie.py
brainML/great-apes
293195c6b1274a5e9b5c5f7e30ac963292efeab1
[ "BSD-3-Clause" ]
4
2022-02-16T20:57:06.000Z
2022-03-23T01:32:58.000Z
code/analyses/get_APE_feature_space_matrices_tr_by_voxels_movie.py
brainML/great-apes
293195c6b1274a5e9b5c5f7e30ac963292efeab1
[ "BSD-3-Clause" ]
null
null
null
code/analyses/get_APE_feature_space_matrices_tr_by_voxels_movie.py
brainML/great-apes
293195c6b1274a5e9b5c5f7e30ac963292efeab1
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from analyses_utils import read_json_list, subset_voxels_for_batches_of_subjects, average_subset_voxels_with_leave_one_subject_out, get_matrix_with_average_for_each_voxel_with_leave_one_subject_out # Memory constraints of HPC required subsetting of voxels and participants to eventually obtain featur...
70.291667
197
0.838767
import numpy as np from analyses_utils import read_json_list, subset_voxels_for_batches_of_subjects, average_subset_voxels_with_leave_one_subject_out, get_matrix_with_average_for_each_voxel_with_leave_one_subject_out step_size = 10000 subject_step_size = 10 total_num_voxels = 131906 # in HCP 7T movie data total_nu...
false
true
f73e671e6aa1ad7ed86ea0482810b031647921c5
1,796
py
Python
source/playbooks/PCI321/ssmdocs/scripts/test/test_pci_get_input_values.py
sybeck2k/aws-security-hub-automated-response-and-remediation
c47870fbda6a41ad000dcf6c40db9033cb3b7abb
[ "Apache-2.0" ]
129
2020-08-11T18:18:50.000Z
2021-10-04T20:00:35.000Z
source/playbooks/PCI321/ssmdocs/scripts/test/test_pci_get_input_values.py
sybeck2k/aws-security-hub-automated-response-and-remediation
c47870fbda6a41ad000dcf6c40db9033cb3b7abb
[ "Apache-2.0" ]
39
2020-08-11T18:07:58.000Z
2021-10-15T16:26:24.000Z
source/playbooks/PCI321/ssmdocs/scripts/test/test_pci_get_input_values.py
sybeck2k/aws-security-hub-automated-response-and-remediation
c47870fbda6a41ad000dcf6c40db9033cb3b7abb
[ "Apache-2.0" ]
35
2020-08-15T04:57:27.000Z
2021-09-21T06:23:17.000Z
#!/usr/bin/python ############################################################################### # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License Version 2.0 (the "License"). Y...
54.424242
131
0.492762
true
true
f73e676da3ddcc59d17aa8b507376a695d41a196
114
py
Python
jobs/admin.py
Xubash/Portfolio-using-django
5eb3d09cbb4d3782fbdc22144cad75c96100b595
[ "MIT" ]
null
null
null
jobs/admin.py
Xubash/Portfolio-using-django
5eb3d09cbb4d3782fbdc22144cad75c96100b595
[ "MIT" ]
8
2021-03-19T01:22:50.000Z
2022-03-12T00:21:05.000Z
jobs/admin.py
Xubash/Portfolio-using-django
5eb3d09cbb4d3782fbdc22144cad75c96100b595
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Jobs # Register your models here. admin.site.register(Jobs)
19
32
0.798246
from django.contrib import admin from .models import Jobs admin.site.register(Jobs)
true
true
f73e678a57d4db67f779882542969daa468f8c46
7,770
py
Python
stage/configuration/test_postgresql_multitable_consumer_origin.py
anubandhan/datacollector-tests
301c024c66d68353735256b262b681dd05ba16cc
[ "Apache-2.0" ]
null
null
null
stage/configuration/test_postgresql_multitable_consumer_origin.py
anubandhan/datacollector-tests
301c024c66d68353735256b262b681dd05ba16cc
[ "Apache-2.0" ]
1
2019-04-24T11:06:38.000Z
2019-04-24T11:06:38.000Z
stage/configuration/test_postgresql_multitable_consumer_origin.py
anubandhan/datacollector-tests
301c024c66d68353735256b262b681dd05ba16cc
[ "Apache-2.0" ]
2
2019-05-24T06:34:37.000Z
2020-03-30T11:48:18.000Z
import logging import string import pytest import sqlalchemy from streamsets.testframework.decorators import stub from streamsets.testframework.markers import category, sdc_min_version from streamsets.testframework.utils import get_random_string logger = logging.getLogger(__name__) pytestmark = [pytest.mark.sdc_m...
27.849462
110
0.701158
import logging import string import pytest import sqlalchemy from streamsets.testframework.decorators import stub from streamsets.testframework.markers import category, sdc_min_version from streamsets.testframework.utils import get_random_string logger = logging.getLogger(__name__) pytestmark = [pytest.mark.sdc_m...
true
true
f73e68f13e3d392025e0a601a411e2dcd52e6dd2
3,072
py
Python
programmes/analysis.py
louisMAURY/Markdown_to_HTML
5d0b37d844b241200d5a245ac1ee9b23510e6a2d
[ "BSD-3-Clause" ]
1
2019-01-14T23:12:04.000Z
2019-01-14T23:12:04.000Z
programmes/analysis.py
louisMAURY/Markdown_to_HTML
5d0b37d844b241200d5a245ac1ee9b23510e6a2d
[ "BSD-3-Clause" ]
null
null
null
programmes/analysis.py
louisMAURY/Markdown_to_HTML
5d0b37d844b241200d5a245ac1ee9b23510e6a2d
[ "BSD-3-Clause" ]
null
null
null
from conding_htm import * fileuh = "markdown.md" fichier = "markdown.md" # The fonction read...just read the file def readeuh(fileuh): with open(fileuh , "r") as markdown: global contents contents = markdown.readlines() return contents # The function say the level of the title def a_title...
23.630769
81
0.470052
from conding_htm import * fileuh = "markdown.md" fichier = "markdown.md" def readeuh(fileuh): with open(fileuh , "r") as markdown: global contents contents = markdown.readlines() return contents def a_title(): readeuh(fichier) for element in contents: counter = 0 ...
true
true
f73e69011f93c5f86577ad4c26e5ff9dc8d1e914
1,817
py
Python
boofuzz/boofuzz/connections/base_socket_connection.py
mrTavas/owasp-fstm-auto
6e9ff36e46d885701c7419db3eca15f12063a7f3
[ "CC0-1.0" ]
2
2021-05-05T12:03:01.000Z
2021-06-04T14:27:15.000Z
boofuzz/boofuzz/connections/base_socket_connection.py
mrTavas/owasp-fstm-auto
6e9ff36e46d885701c7419db3eca15f12063a7f3
[ "CC0-1.0" ]
null
null
null
boofuzz/boofuzz/connections/base_socket_connection.py
mrTavas/owasp-fstm-auto
6e9ff36e46d885701c7419db3eca15f12063a7f3
[ "CC0-1.0" ]
2
2021-05-05T12:03:09.000Z
2021-06-04T14:27:21.000Z
from __future__ import absolute_import import abc import math import os import socket import struct from future.utils import with_metaclass from boofuzz.connections import itarget_connection def _seconds_to_sockopt_format(seconds): """Convert floating point seconds value to second/useconds struct used by UNIX ...
29.306452
116
0.687947
from __future__ import absolute_import import abc import math import os import socket import struct from future.utils import with_metaclass from boofuzz.connections import itarget_connection def _seconds_to_sockopt_format(seconds): if os.name == "nt": return int(seconds * 1000) else: micros...
true
true
f73e69d2ce2e869cde4a34aede06b0ef96caaedb
552
py
Python
spoklient/onedrive/drive_item.py
franciscomcdias/SpoKlient
b2f6954cc3e35c84b8686588d4fd4636f13153d4
[ "MIT" ]
null
null
null
spoklient/onedrive/drive_item.py
franciscomcdias/SpoKlient
b2f6954cc3e35c84b8686588d4fd4636f13153d4
[ "MIT" ]
null
null
null
spoklient/onedrive/drive_item.py
franciscomcdias/SpoKlient
b2f6954cc3e35c84b8686588d4fd4636f13153d4
[ "MIT" ]
null
null
null
from spoklient.onedrive.base_item import BaseItem from spoklient.runtime.resource_path_entity import ResourcePathEntity class DriveItem(BaseItem): """The driveItem resource represents a file, folder, or other item stored in a drive. All file system objects in OneDrive and SharePoint are returned as driveItem ...
42.461538
116
0.726449
from spoklient.onedrive.base_item import BaseItem from spoklient.runtime.resource_path_entity import ResourcePathEntity class DriveItem(BaseItem): def item_with_path(self, path): return DriveItem(self.context, ResourcePathEntity(self.context, self.resource_path, ':/{0}'.format(pa...
true
true
f73e6ae940e9f17aa57ffd9e88ca884f932a18c9
4,638
py
Python
ics/structures/srad_gigalog_settings.py
hollinsky-intrepid/python_ics
b6ec5486ec3cc2548e33845c265faccf293b88f5
[ "Unlicense" ]
null
null
null
ics/structures/srad_gigalog_settings.py
hollinsky-intrepid/python_ics
b6ec5486ec3cc2548e33845c265faccf293b88f5
[ "Unlicense" ]
null
null
null
ics/structures/srad_gigalog_settings.py
hollinsky-intrepid/python_ics
b6ec5486ec3cc2548e33845c265faccf293b88f5
[ "Unlicense" ]
null
null
null
# This file was auto generated; Do not modify, if you value your sanity! import ctypes try: # 14 from can_settings import can_settings from canfd_settings import canfd_settings from iso9141_keyword2000_settings import iso9141_keyword2000_settings from s_text_api_settings import s_text_api_settings ...
42.550459
90
0.703967
import ctypes try: from can_settings import can_settings from canfd_settings import canfd_settings from iso9141_keyword2000_settings import iso9141_keyword2000_settings from s_text_api_settings import s_text_api_settings from disk_settings import disk_settings from timesync_icshardware_settin...
true
true
f73e6b15818eb58995d4a5233f635921cdf3f490
1,067
py
Python
logdto/create.py
hangilc/myclinic-spring
5d2befd7901439d8e8c0102e0c81cf356b5b38ba
[ "MIT" ]
null
null
null
logdto/create.py
hangilc/myclinic-spring
5d2befd7901439d8e8c0102e0c81cf356b5b38ba
[ "MIT" ]
2
2020-03-04T22:17:34.000Z
2020-03-21T05:58:49.000Z
logdto/create.py
hangilc/myclinic-spring
5d2befd7901439d8e8c0102e0c81cf356b5b38ba
[ "MIT" ]
null
null
null
import io import os from jinja2 import Environment, FileSystemLoader import sys name = sys.argv[1] prog_dir = os.path.abspath(os.path.dirname(__file__)) env = Environment(loader=FileSystemLoader(prog_dir), trim_blocks=True, lstrip_blocks=True) template = env.get_template('TemplateCreated.java.txt') output = template...
35.566667
103
0.74508
import io import os from jinja2 import Environment, FileSystemLoader import sys name = sys.argv[1] prog_dir = os.path.abspath(os.path.dirname(__file__)) env = Environment(loader=FileSystemLoader(prog_dir), trim_blocks=True, lstrip_blocks=True) template = env.get_template('TemplateCreated.java.txt') output = template...
true
true
f73e6c912a65ce8c693c6f49b8b967b066c3a07f
5,024
py
Python
corehq/apps/hqmedia/cache.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/apps/hqmedia/cache.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/apps/hqmedia/cache.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
import io import zipfile from django.core.cache import cache from django.utils.translation import ugettext as _ from soil import DownloadBase from corehq.apps.hqmedia.models import ( CommCareAudio, CommCareImage, CommCareVideo, ) class BaseMultimediaStatusCache(object): upload_type = None cache...
31.4
115
0.63535
import io import zipfile from django.core.cache import cache from django.utils.translation import ugettext as _ from soil import DownloadBase from corehq.apps.hqmedia.models import ( CommCareAudio, CommCareImage, CommCareVideo, ) class BaseMultimediaStatusCache(object): upload_type = None cache...
true
true
f73e6dba535d744cac9ee06a615a8d7aca2f779f
43,417
py
Python
src/configuration/configuration.py
oplatek/merlin
df7e3494b0662fec3a2fbe4d51d056e80cc6b682
[ "Apache-2.0" ]
null
null
null
src/configuration/configuration.py
oplatek/merlin
df7e3494b0662fec3a2fbe4d51d056e80cc6b682
[ "Apache-2.0" ]
null
null
null
src/configuration/configuration.py
oplatek/merlin
df7e3494b0662fec3a2fbe4d51d056e80cc6b682
[ "Apache-2.0" ]
null
null
null
################################################################################ # The Neural Network (NN) based Speech Synthesis System # https://svn.ecdf.ed.ac.uk/repo/inf/dnn_tts/ # # Centre for Speech Technology Research # University of Edinburgh, UK # ...
49.676201
169
0.561393
self.work_dir = None if self.work_dir == None: try: self.work_dir = configparser.get('Paths', 'work') except (ConfigParser.NoSectionError, ConfigParser.NoOptionError): if self.work_dir == None: logger.critical('Paths:work has...
false
true
f73e6e2aebc2034559453abb61c22121cf21b838
249
py
Python
output/models/nist_data/atomic/decimal/schema_instance/nistschema_sv_iv_atomic_decimal_pattern_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/decimal/schema_instance/nistschema_sv_iv_atomic_decimal_pattern_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/decimal/schema_instance/nistschema_sv_iv_atomic_decimal_pattern_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.decimal.schema_instance.nistschema_sv_iv_atomic_decimal_pattern_2_xsd.nistschema_sv_iv_atomic_decimal_pattern_2 import NistschemaSvIvAtomicDecimalPattern2 __all__ = [ "NistschemaSvIvAtomicDecimalPattern2", ]
41.5
190
0.891566
from output.models.nist_data.atomic.decimal.schema_instance.nistschema_sv_iv_atomic_decimal_pattern_2_xsd.nistschema_sv_iv_atomic_decimal_pattern_2 import NistschemaSvIvAtomicDecimalPattern2 __all__ = [ "NistschemaSvIvAtomicDecimalPattern2", ]
true
true
f73e6e794df595aa47697d58697ea6cd6e763330
2,172
py
Python
db/transaction.py
eddiepbc/where_to_go
4bfbe4cd4dbddadabf7a7f959ed7643dbd70f63b
[ "Apache-2.0" ]
2
2019-11-06T03:20:09.000Z
2020-04-15T17:40:02.000Z
db/transaction.py
eddiepbc/where_to_go
4bfbe4cd4dbddadabf7a7f959ed7643dbd70f63b
[ "Apache-2.0" ]
3
2021-03-19T07:55:41.000Z
2022-01-13T01:48:31.000Z
db/transaction.py
eddiepbc/where_to_go
4bfbe4cd4dbddadabf7a7f959ed7643dbd70f63b
[ "Apache-2.0" ]
2
2019-11-07T03:15:36.000Z
2019-11-07T03:20:06.000Z
# coding:utf-8 from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, String, Integer, Float, DateTime # 创建对象的基类: Base = declarative_base() class lianjia_transaction(Base): # 表的名字: __tablename__ = 'lianjia_transaction' # 表的结构: id = Column(Integer, primary_key=True) ...
32.41791
63
0.522099
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, String, Integer, Float, DateTime Base = declarative_base() class lianjia_transaction(Base): __tablename__ = 'lianjia_transaction' id = Column(Integer, primary_key=True) transactiondate = Column(DateTime) ...
true
true
f73e6f052ed526a64258e377b569c0946315e4b4
1,858
py
Python
python/code_challenges/graph/graph.py
dina-fouad/data-structures-and-algorithms
53204f1c6d841ffe00849ff5f0fd0cd0469b6469
[ "MIT" ]
null
null
null
python/code_challenges/graph/graph.py
dina-fouad/data-structures-and-algorithms
53204f1c6d841ffe00849ff5f0fd0cd0469b6469
[ "MIT" ]
9
2021-08-01T19:29:35.000Z
2021-09-05T19:58:03.000Z
python/code_challenges/graph/graph.py
dina-fouad/data-structures-and-algorithms
53204f1c6d841ffe00849ff5f0fd0cd0469b6469
[ "MIT" ]
null
null
null
from collections import deque class Vertex: def __init__(self,value): self.value = value class Edge: def __init__(self,vertex,weight): self.vertex = vertex self.weight = weight class Queue: def __init__(self): self.dq = deque() def enqueue(self, value): s...
22.119048
74
0.597955
from collections import deque class Vertex: def __init__(self,value): self.value = value class Edge: def __init__(self,vertex,weight): self.vertex = vertex self.weight = weight class Queue: def __init__(self): self.dq = deque() def enqueue(self, value): s...
true
true
f73e6f20efb8f0b2e7cb2f404bada15ad5198f50
1,398
py
Python
sphinx/conf.py
neuromodulation/py_neuromodulation
1e8505d4324c9d2f37e5d56629a2ee418ea0b12b
[ "MIT" ]
7
2021-05-12T02:13:12.000Z
2022-02-28T13:14:23.000Z
sphinx/conf.py
neuromodulation/py_neuromodulation
1e8505d4324c9d2f37e5d56629a2ee418ea0b12b
[ "MIT" ]
98
2021-03-26T19:04:20.000Z
2022-03-15T09:07:29.000Z
sphinx/conf.py
neuromodulation/py_neuromodulation
1e8505d4324c9d2f37e5d56629a2ee418ea0b12b
[ "MIT" ]
1
2021-07-16T10:39:01.000Z
2021-07-16T10:39:01.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- import s...
27.96
88
0.674535
import sphinx_rtd_theme import sys import os print("CURRENT WORKING DIRECTORY") print(os.getcwd()) print('adding path') sys.path.insert(0, r'C:\Users\ICN_admin\Documents\py_neuromodulation\pyneuromodulation') print(sys.path) import recommonmark from recommonmark.transform import AutoStructify from recommonmar...
true
true
f73e6f7bc827d46b3a0a2b24106e5730a942c336
889
py
Python
module3/before/face_detect.py
axel-sirota/build-face-recognition-azure
f9a4e2d721307bf9cb53a36ca82fdfa0e651fc86
[ "MIT" ]
1
2022-03-19T15:09:22.000Z
2022-03-19T15:09:22.000Z
module3/before/face_detect.py
axel-sirota/build-face-recognition-azure
f9a4e2d721307bf9cb53a36ca82fdfa0e651fc86
[ "MIT" ]
null
null
null
module3/before/face_detect.py
axel-sirota/build-face-recognition-azure
f9a4e2d721307bf9cb53a36ca82fdfa0e651fc86
[ "MIT" ]
1
2022-03-19T15:09:24.000Z
2022-03-19T15:09:24.000Z
from azure.cognitiveservices.vision.face import FaceClient from msrest.authentication import CognitiveServicesCredentials from pprint import pprint import os # Do not worry about this function, it is for pretty printing the attributes! def pretty_print(klass, indent=0): print(' ' * indent + type(klass).__name__ ...
31.75
119
0.691789
from azure.cognitiveservices.vision.face import FaceClient from msrest.authentication import CognitiveServicesCredentials from pprint import pprint import os def pretty_print(klass, indent=0): print(' ' * indent + type(klass).__name__ + ':') indent += 4 for k, v in klass.__dict__.items(): if '__...
true
true
f73e6fee70ce0b595fae730ecdc4cabd05536fb3
11,783
py
Python
Lib/test/test_named_expressions.py
dhdavvie/cpython
c9345e382c630ddcc2b148b30954640e0e435c8a
[ "CNRI-Python-GPL-Compatible" ]
2
2020-06-09T03:53:50.000Z
2020-06-09T03:53:53.000Z
Lib/test/test_named_expressions.py
anuragkumarak95/cpython
d309352c6fd93a51f2b3011ca8c2125d3a5d394b
[ "CNRI-Python-GPL-Compatible" ]
3
2020-03-15T21:17:00.000Z
2020-03-15T22:50:40.000Z
Lib/test/test_named_expressions.py
anuragkumarak95/cpython
d309352c6fd93a51f2b3011ca8c2125d3a5d394b
[ "CNRI-Python-GPL-Compatible" ]
2
2017-11-22T23:32:25.000Z
2018-11-15T01:31:39.000Z
import os import unittest class NamedExpressionInvalidTest(unittest.TestCase): def test_named_expression_invalid_01(self): code = """x := 0""" with self.assertRaisesRegex(SyntaxError, "invalid syntax"): exec(code, {}, {}) def test_named_expression_invalid_02(self): code ...
27.594848
91
0.55614
import os import unittest class NamedExpressionInvalidTest(unittest.TestCase): def test_named_expression_invalid_01(self): code = """x := 0""" with self.assertRaisesRegex(SyntaxError, "invalid syntax"): exec(code, {}, {}) def test_named_expression_invalid_02(self): code ...
true
true
f73e7006359c26e3644c0d15ff717fc875f2b778
88
py
Python
helpers/__init__.py
r-luo/QA-Summary
219dbbd306a85f73c126ad73ef7421c5450afbfc
[ "MIT" ]
null
null
null
helpers/__init__.py
r-luo/QA-Summary
219dbbd306a85f73c126ad73ef7421c5450afbfc
[ "MIT" ]
null
null
null
helpers/__init__.py
r-luo/QA-Summary
219dbbd306a85f73c126ad73ef7421c5450afbfc
[ "MIT" ]
null
null
null
from . import utils from . import data_prep from . import seq2seq from . import word2vec
22
23
0.784091
from . import utils from . import data_prep from . import seq2seq from . import word2vec
true
true
f73e70a84f6c6fc4600a9dde440c4bedad44e5ee
2,972
py
Python
modules/nosferatu/reaction_message.py
tellurion-code/tellurion-bot-py
0b0d580f4479d814ac6239a6bea07ee4f2a0ab70
[ "MIT" ]
9
2018-05-06T15:52:45.000Z
2021-07-14T12:06:46.000Z
modules/nosferatu/reaction_message.py
epenserdiscord/epenser-bot-py
a225bc5ab505d1bde9fe153c44e34554588fe238
[ "MIT" ]
4
2018-06-13T07:21:53.000Z
2021-06-11T20:49:18.000Z
modules/nosferatu/reaction_message.py
tellurion-code/tellurion-bot-py
0b0d580f4479d814ac6239a6bea07ee4f2a0ab70
[ "MIT" ]
12
2018-06-25T18:29:03.000Z
2021-06-10T06:26:32.000Z
import discord import modules.nosferatu.globals as globals class ReactionMessage: def __init__(self, _cond, _effect, **kwargs): self.check = kwargs["check"] if "check" in kwargs else lambda r, u: True self.update_function = kwargs["update"] if "update" in kwargs else None self.temporary = ...
35.807229
94
0.61642
import discord import modules.nosferatu.globals as globals class ReactionMessage: def __init__(self, _cond, _effect, **kwargs): self.check = kwargs["check"] if "check" in kwargs else lambda r, u: True self.update_function = kwargs["update"] if "update" in kwargs else None self.temporary = ...
true
true
f73e70eb4950eb2382a3464b95c89405bea3c4e2
2,197
py
Python
model/single_doc/longformer_model.py
NickSchoelkopf/SummerTime
9a89aab8e1544e3c52c043b9c47ab325e665e11e
[ "Apache-2.0" ]
null
null
null
model/single_doc/longformer_model.py
NickSchoelkopf/SummerTime
9a89aab8e1544e3c52c043b9c47ab325e665e11e
[ "Apache-2.0" ]
null
null
null
model/single_doc/longformer_model.py
NickSchoelkopf/SummerTime
9a89aab8e1544e3c52c043b9c47ab325e665e11e
[ "Apache-2.0" ]
null
null
null
from transformers import LongformerTokenizer, EncoderDecoderModel from .base_single_doc_model import SingleDocSummModel class LongformerModel(SingleDocSummModel): # static variables model_name = "Longformer" is_extractive = False is_neural = True def __init__(self): super(LongformerModel...
36.616667
95
0.665453
from transformers import LongformerTokenizer, EncoderDecoderModel from .base_single_doc_model import SingleDocSummModel class LongformerModel(SingleDocSummModel): model_name = "Longformer" is_extractive = False is_neural = True def __init__(self): super(LongformerModel, self).__init__( ...
true
true
f73e70ef65fd2d764ecf1cc60292802342d9661f
5,821
py
Python
NeuralATT/train.py
INK-USC/shifted-label-distribution
3cf2b7ced3b2e18234db405f6014f049c4830d71
[ "Apache-2.0" ]
37
2019-10-29T13:12:41.000Z
2022-01-20T02:42:28.000Z
NeuralATT/train.py
INK-USC/shifted-label-distribution
3cf2b7ced3b2e18234db405f6014f049c4830d71
[ "Apache-2.0" ]
5
2020-07-23T10:32:59.000Z
2021-09-01T11:37:15.000Z
NeuralATT/train.py
INK-USC/shifted-label-distribution
3cf2b7ced3b2e18234db405f6014f049c4830d71
[ "Apache-2.0" ]
2
2020-05-27T06:00:56.000Z
2021-02-08T10:45:41.000Z
''' Training script with ramdom splitting dev set ''' __author__ = 'Maosen' import torch from model import Model, Wrapper import utils from utils import Dataset import argparse import pickle import numpy as np from tqdm import tqdm import logging import os import random torch.backends.cudnn.deterministic = True def ...
38.296053
109
0.716715
__author__ = 'Maosen' import torch from model import Model, Wrapper import utils from utils import Dataset import argparse import pickle import numpy as np from tqdm import tqdm import logging import os import random torch.backends.cudnn.deterministic = True def train(args): logging.info(str(args)) model = Mode...
true
true
f73e7218a3eaf4998f4b32f6977df96bbf9d95ba
70,207
py
Python
ThirdParty/Twisted/twisted/internet/test/test_tcp.py
OpenGeoscience/VTK
a373e975b9284a022f43a062ebf5042bb17b4e44
[ "BSD-3-Clause" ]
1
2021-10-13T01:57:14.000Z
2021-10-13T01:57:14.000Z
ThirdParty/Twisted/twisted/internet/test/test_tcp.py
OpenGeoscience/VTK
a373e975b9284a022f43a062ebf5042bb17b4e44
[ "BSD-3-Clause" ]
null
null
null
ThirdParty/Twisted/twisted/internet/test/test_tcp.py
OpenGeoscience/VTK
a373e975b9284a022f43a062ebf5042bb17b4e44
[ "BSD-3-Clause" ]
5
2015-10-09T04:12:29.000Z
2021-12-15T16:57:11.000Z
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorTCP} and the TCP parts of L{IReactorSocket}. """ from __future__ import division, absolute_import __metaclass__ = type import socket, errno from zope.interface import implementer from twisted.python....
33.543717
86
0.643169
from __future__ import division, absolute_import __metaclass__ = type import socket, errno from zope.interface import implementer from twisted.python.compat import _PY3 from twisted.python.runtime import platform from twisted.python.failure import Failure from twisted.python import log from twisted.trial.unitt...
true
true
f73e726ea1457ddee39ca2fa59fd9ea439126892
3,849
py
Python
privatter-dl.py
ColdLunaris/privatter-dl
6b94cf9c260d8d57009572422c18f07d771e956b
[ "Apache-2.0" ]
null
null
null
privatter-dl.py
ColdLunaris/privatter-dl
6b94cf9c260d8d57009572422c18f07d771e956b
[ "Apache-2.0" ]
null
null
null
privatter-dl.py
ColdLunaris/privatter-dl
6b94cf9c260d8d57009572422c18f07d771e956b
[ "Apache-2.0" ]
null
null
null
import requests, argparse, os, asyncio, concurrent.futures from termcolor import colored from bs4 import BeautifulSoup def parse_args(): p = argparse.ArgumentParser() p.add_argument("-d", dest="directory", required=False, help="destination where all images will be saved") p.add_argument("-u", dest="url", ...
32.897436
140
0.617043
import requests, argparse, os, asyncio, concurrent.futures from termcolor import colored from bs4 import BeautifulSoup def parse_args(): p = argparse.ArgumentParser() p.add_argument("-d", dest="directory", required=False, help="destination where all images will be saved") p.add_argument("-u", dest="url", ...
true
true
f73e750bba87126ae1daf9bf2beb2f6676d31d68
440
py
Python
test/rules/test_drowning_adult.py
rileyhazard/SmartVA-Analyze-1
0573eeff27d03f54e7506db4f1631c0cd9f54bbb
[ "MIT" ]
4
2019-01-23T12:57:47.000Z
2020-04-18T17:13:08.000Z
test/rules/test_drowning_adult.py
rileyhazard/SmartVA-Analyze-1
0573eeff27d03f54e7506db4f1631c0cd9f54bbb
[ "MIT" ]
4
2019-01-09T22:10:07.000Z
2022-02-16T04:57:06.000Z
test/rules/test_drowning_adult.py
rileyhazard/SmartVA-Analyze-1
0573eeff27d03f54e7506db4f1631c0cd9f54bbb
[ "MIT" ]
11
2018-12-11T22:01:13.000Z
2022-01-07T11:38:02.000Z
from smartva.rules import drowning_adult as drowning from smartva.data.constants import * VA = Adult def test_pass(): row = { VA.DROWNING: YES, VA.INJURY_DAYS: 0, } assert drowning.logic_rule(row) is True def test_fail_drowning(): row = { VA.DROWNING: NO, } assert ...
15.714286
52
0.647727
from smartva.rules import drowning_adult as drowning from smartva.data.constants import * VA = Adult def test_pass(): row = { VA.DROWNING: YES, VA.INJURY_DAYS: 0, } assert drowning.logic_rule(row) is True def test_fail_drowning(): row = { VA.DROWNING: NO, } assert ...
true
true
f73e75238b9615afef2f8ea045c69e47675e0e64
4,155
py
Python
RASTER_TOOLS/create_cat_file_and_number_attr.py
KyleLochhead/FAIB_TSR_DATASETS
d1068b51d88ccdffb72265e4ae4287debea5734e
[ "Apache-2.0" ]
2
2019-12-05T18:52:46.000Z
2019-12-05T21:28:08.000Z
RASTER_TOOLS/create_cat_file_and_number_attr.py
IaianMcDougall/FAIB
47b93777328f34ac94e9c846e1f8430887ce7d56
[ "Apache-2.0" ]
3
2020-04-17T19:38:28.000Z
2021-12-15T22:16:59.000Z
RASTER_TOOLS/create_cat_file_and_number_attr.py
IaianMcDougall/FAIB
47b93777328f34ac94e9c846e1f8430887ce7d56
[ "Apache-2.0" ]
2
2019-11-13T17:46:43.000Z
2019-11-13T17:47:14.000Z
import sys # get ready to import local modules # define the path to the modules and append it to the system path module_path = '//spatialfiles2.bcgov/work/FOR/VIC/HTS/ANA/Workarea/TOOLS/python/PythonLib/Production' # module_path = 'C:/Data/training_201806/python/lib' sys.path.append(module_path) # continue im...
33.508065
177
0.608424
import sys module_path = '//spatialfiles2.bcgov/work/FOR/VIC/HTS/ANA/Workarea/TOOLS/python/PythonLib/Production' sys.path.append(module_path) import FAIB_Tools as faib import os,time import psycopg2 if len(sys.argv) < 3: print "Usage: python create_cat_file_and_number_attr.py [res_table] [attribute_...
false
true
f73e7618d8ce6a15d84661248c0fbe9d6aef1564
5,597
py
Python
sample/bos/sign_sample.py
onionsheep/bce-sdk-python
29c260b26eb49dbbd41d205915ab25fc3529f20b
[ "Apache-2.0" ]
null
null
null
sample/bos/sign_sample.py
onionsheep/bce-sdk-python
29c260b26eb49dbbd41d205915ab25fc3529f20b
[ "Apache-2.0" ]
null
null
null
sample/bos/sign_sample.py
onionsheep/bce-sdk-python
29c260b26eb49dbbd41d205915ab25fc3529f20b
[ "Apache-2.0" ]
null
null
null
# -*- coding: UTF-8 -*- import hashlib import hmac import string import datetime AUTHORIZATION = "authorization" BCE_PREFIX = "x-bce-" DEFAULT_ENCODING = 'UTF-8' # AK/SK Storage Class class BceCredentials(object): def __init__(self, access_key_id, secret_access_key): self.access_key_id = ...
33.51497
105
0.649098
import hashlib import hmac import string import datetime AUTHORIZATION = "authorization" BCE_PREFIX = "x-bce-" DEFAULT_ENCODING = 'UTF-8' class BceCredentials(object): def __init__(self, access_key_id, secret_access_key): self.access_key_id = access_key_id self.secret_access_key ...
false
true
f73e769bb9fa59c409f9cdcfe1e948ce5c05841e
453
py
Python
data/scripts/templates/object/tangible/wearables/boots/shared_boots_s05.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/wearables/boots/shared_boots_s05.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/wearables/boots/shared_boots_s05.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/wearables/boots/shared_boots_s05.iff" result.attribute_template_id ...
26.647059
73
0.730684
true
true
f73e771f59e4641872758fb300a5023ef1df2a59
6,116
py
Python
mmdet3d/models/backbones/second_ran.py
xiaoMrzhang/mmdetection3d
1e7695297e60afe3e09834de1582c3437086ed49
[ "Apache-2.0" ]
null
null
null
mmdet3d/models/backbones/second_ran.py
xiaoMrzhang/mmdetection3d
1e7695297e60afe3e09834de1582c3437086ed49
[ "Apache-2.0" ]
null
null
null
mmdet3d/models/backbones/second_ran.py
xiaoMrzhang/mmdetection3d
1e7695297e60afe3e09834de1582c3437086ed49
[ "Apache-2.0" ]
1
2021-07-21T05:17:24.000Z
2021-07-21T05:17:24.000Z
from mmcv.cnn import build_conv_layer, build_norm_layer from mmcv.runner import load_checkpoint, force_fp32 from torch import nn as nn import torch import numpy as np from mmdet.models import BACKBONES from mmdet3d.utils.soft_mask import SoftMask @BACKBONES.register_module() class SECOND_RAN(nn.Module): """Backbo...
37.753086
109
0.571779
from mmcv.cnn import build_conv_layer, build_norm_layer from mmcv.runner import load_checkpoint, force_fp32 from torch import nn as nn import torch import numpy as np from mmdet.models import BACKBONES from mmdet3d.utils.soft_mask import SoftMask @BACKBONES.register_module() class SECOND_RAN(nn.Module): def __in...
true
true
f73e77302b49e772ad9640b447d18902ceafc55a
6,645
py
Python
cryptograph/shuffled_shift_cipher.py
slowy07/pythonApps
22f9766291dbccd8185035745950c5ee4ebd6a3e
[ "MIT" ]
10
2020-10-09T11:05:18.000Z
2022-02-13T03:22:10.000Z
cryptograph/shuffled_shift_cipher.py
khairanabila/pythonApps
f90b8823f939b98f7bf1dea7ed35fe6e22e2f730
[ "MIT" ]
null
null
null
cryptograph/shuffled_shift_cipher.py
khairanabila/pythonApps
f90b8823f939b98f7bf1dea7ed35fe6e22e2f730
[ "MIT" ]
6
2020-11-26T12:49:43.000Z
2022-03-06T06:46:43.000Z
import random import string class ShuffledShiftCipher: """ This algorithm uses the Caesar Cipher algorithm but removes the option to use brute force to decrypt the message. The passcode is a a random password from the selection buffer of 1. uppercase letters of the English alphabet 2. lowercas...
39.319527
87
0.642137
import random import string class ShuffledShiftCipher: def __init__(self, passcode: str = None): self.__passcode = passcode or self.__passcode_creator() self.__key_list = self.__make_key_list() self.__shift_key = self.__make_shift_key() def __str__(self): return "Passcode is:...
true
true
f73e773e60a9f42784cc575883483b797c6f12bc
6,091
py
Python
mac/google-cloud-sdk/lib/third_party/kubernetes/client/models/v1_config_map_list.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
mac/google-cloud-sdk/lib/third_party/kubernetes/client/models/v1_config_map_list.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
mac/google-cloud-sdk/lib/third_party/kubernetes/client/models/v1_config_map_list.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
27.686364
86
0.633394
from pprint import pformat from six import iteritems import re class V1ConfigMapList(object): swagger_types = { 'api_version': 'str', 'items': 'list[V1ConfigMap]', 'kind': 'str', 'metadata': 'V1ListMeta' } attribute_map = { 'api_version': 'apiVersion', 'items': 'items', ...
true
true
f73e778263be173557d061221305df04791bb62a
4,540
py
Python
tests/test_models/test_recognizers/test_recognizer2d.py
ZJU-lishuang/mmaction2
dc46505319968eff0123eb5abb811969042377c5
[ "Apache-2.0" ]
2
2021-12-07T09:09:10.000Z
2022-01-26T01:52:07.000Z
tests/test_models/test_recognizers/test_recognizer2d.py
github-zbx/mmaction2
ee34d952e792fd1adea2c2e397b29faff68eaec9
[ "Apache-2.0" ]
null
null
null
tests/test_models/test_recognizers/test_recognizer2d.py
github-zbx/mmaction2
ee34d952e792fd1adea2c2e397b29faff68eaec9
[ "Apache-2.0" ]
null
null
null
import torch from mmaction.models import build_recognizer from ..base import generate_recognizer_demo_inputs, get_recognizer_cfg def test_tsn(): config = get_recognizer_cfg('tsn/tsn_r50_1x1x3_100e_kinetics400_rgb.py') config.model['backbone']['pretrained'] = None recognizer = build_recognizer(config.mod...
29.868421
76
0.678414
import torch from mmaction.models import build_recognizer from ..base import generate_recognizer_demo_inputs, get_recognizer_cfg def test_tsn(): config = get_recognizer_cfg('tsn/tsn_r50_1x1x3_100e_kinetics400_rgb.py') config.model['backbone']['pretrained'] = None recognizer = build_recognizer(config.mod...
true
true
f73e7786569284959910b2e0ec7e9f936bc294f0
806
py
Python
manage.py
elishaking/polynize
2bb61c9682ce42ea22b3beded441ce6e2b59c56c
[ "MIT" ]
null
null
null
manage.py
elishaking/polynize
2bb61c9682ce42ea22b3beded441ce6e2b59c56c
[ "MIT" ]
2
2020-06-06T00:36:43.000Z
2021-06-10T22:31:45.000Z
manage.py
elishaking/polynize
2bb61c9682ce42ea22b3beded441ce6e2b59c56c
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "polynize.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the...
35.043478
77
0.64268
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "polynize.settings") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportError: ...
true
true
f73e795e144d5d39eb6d660bdd6f621515320341
5,754
py
Python
Lib/site-packages/anyio/abc/_sockets.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
3
2018-08-21T13:46:08.000Z
2018-09-24T18:09:48.000Z
Lib/site-packages/anyio/abc/_sockets.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
1
2018-10-01T01:38:04.000Z
2018-10-01T01:38:04.000Z
Lib/site-packages/anyio/abc/_sockets.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
null
null
null
import socket from abc import abstractmethod from io import IOBase from ipaddress import IPv4Address, IPv6Address from socket import AddressFamily from types import TracebackType from typing import ( Any, AsyncContextManager, Callable, Collection, Dict, List, Mapping, Optional, Tuple...
31.271739
97
0.669621
import socket from abc import abstractmethod from io import IOBase from ipaddress import IPv4Address, IPv6Address from socket import AddressFamily from types import TracebackType from typing import ( Any, AsyncContextManager, Callable, Collection, Dict, List, Mapping, Optional, Tuple...
true
true
f73e7af60c427337b8dd751eb65b2561e7bb53ac
111
py
Python
12. Dread Door.py
Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers
231d17ad2224fc616c022b515bc14e78ec5822f9
[ "MIT" ]
1
2021-02-25T16:43:08.000Z
2021-02-25T16:43:08.000Z
12. Dread Door.py
Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers
231d17ad2224fc616c022b515bc14e78ec5822f9
[ "MIT" ]
null
null
null
12. Dread Door.py
Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers
231d17ad2224fc616c022b515bc14e78ec5822f9
[ "MIT" ]
null
null
null
# Attack the door! # It will take many hits, so use a "while-true" loop. while True: hero.attack("Door")
15.857143
53
0.657658
while True: hero.attack("Door")
true
true
f73e7b20481d743363e35c69175236420ddb689f
73,825
py
Python
test/test_utils.py
pento/yt-dlp
a46a815b055231d056aeb82aa3f37cd864322d73
[ "Unlicense" ]
1
2021-08-03T03:14:17.000Z
2021-08-03T03:14:17.000Z
test/test_utils.py
pento/yt-dlp
a46a815b055231d056aeb82aa3f37cd864322d73
[ "Unlicense" ]
null
null
null
test/test_utils.py
pento/yt-dlp
a46a815b055231d056aeb82aa3f37cd864322d73
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # Various small unit tests import io import itertools import json import xml.etree.ElementTree ...
46.69513
382
0.606448
from __future__ import unicode_literals import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import io import itertools import json import xml.etree.ElementTree from yt_dlp.utils import ( age_restricted, args_to_str, encode_base_n, ...
true
true
f73e7b95fd87752904a205042103207418004d40
5,007
py
Python
python/qipy/worktree.py
aldebaran/qibuild
efea6fa3744664348717fe5e8df708a3cf392072
[ "BSD-3-Clause" ]
51
2015-01-05T14:35:13.000Z
2021-07-27T06:46:59.000Z
python/qipy/worktree.py
aldebaran/qibuild
efea6fa3744664348717fe5e8df708a3cf392072
[ "BSD-3-Clause" ]
104
2015-04-09T10:48:42.000Z
2020-09-16T16:33:29.000Z
python/qipy/worktree.py
aldebaran/qibuild
efea6fa3744664348717fe5e8df708a3cf392072
[ "BSD-3-Clause" ]
46
2015-01-05T14:35:16.000Z
2022-02-13T20:39:36.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ Worktree """ from __future__ import absolute_import from __future__ import unicode_literals from __future__ import prin...
36.282609
84
0.628121
from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function import os import virtualenv from qisys import ui import qisys.worktree import qisys.qixml import qipy.project class PythonWorkTree(qisys.worktree.WorkTreeObserver): def __init__(self, workt...
true
true
f73e7bbe6022e667fd8dc11750c07030d43ac5d5
6,067
py
Python
port.py
yikir/mmdetection
dfceb61b0252f81b010f550f2acbe46c7dad6ef6
[ "Apache-2.0" ]
null
null
null
port.py
yikir/mmdetection
dfceb61b0252f81b010f550f2acbe46c7dad6ef6
[ "Apache-2.0" ]
null
null
null
port.py
yikir/mmdetection
dfceb61b0252f81b010f550f2acbe46c7dad6ef6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- # n(net) o(oil) h(hang) r(rust) 检测模块 import os import sys current_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(current_dir) from mmdet.models import build_detector import mmcv import torch import cv2 import time import json from mmcv.runner import load...
36.993902
102
0.575573
import os import sys current_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(current_dir) from mmdet.models import build_detector import mmcv import torch import cv2 import time import json from mmcv.runner import load_checkpoint import PIL.Image as Image import numpy as np from torchvision.transf...
true
true
f73e7df5fa56ae235391f6dfbd43c39fa49dea73
7,179
py
Python
custom_components/waste_collection_schedule/waste_collection_schedule/wizard/abfall_io.py
ranseyer/hacs_waste_collection_schedule
ad450b9bac4be371a091e7814bdd1c8d2983df4e
[ "MIT" ]
null
null
null
custom_components/waste_collection_schedule/waste_collection_schedule/wizard/abfall_io.py
ranseyer/hacs_waste_collection_schedule
ad450b9bac4be371a091e7814bdd1c8d2983df4e
[ "MIT" ]
null
null
null
custom_components/waste_collection_schedule/waste_collection_schedule/wizard/abfall_io.py
ranseyer/hacs_waste_collection_schedule
ad450b9bac4be371a091e7814bdd1c8d2983df4e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import re from html.parser import HTMLParser import inquirer import requests MODUS_KEY = "d6c5855a62cf32a4dadbc2831f0f295f" HEADERS = {"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"} # IDs of CONFIG VARIABLES CONFIG_VARIABLES = [ "f_id_kommune", "f_id_bezirk", "f_id_str...
31.213043
88
0.599248
import re from html.parser import HTMLParser import inquirer import requests MODUS_KEY = "d6c5855a62cf32a4dadbc2831f0f295f" HEADERS = {"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"} CONFIG_VARIABLES = [ "f_id_kommune", "f_id_bezirk", "f_id_strasse", "f_id_strasse_hnr", "f_abfallart...
true
true
f73e7e9f2df0e0ed4eecc630393e2c3672e5ff98
1,029
py
Python
IJCAI19/SemColHNN_Codes/Cache/cache_classes.py
vishalbelsare/SemAIDA
9f4f65b845822d8dda14e94b3c274a79c5d1937c
[ "Apache-2.0" ]
34
2018-11-22T16:22:10.000Z
2022-02-24T13:50:16.000Z
IJCAI19/SemColHNN_Codes/Cache/cache_classes.py
vishalbelsare/SemAIDA
9f4f65b845822d8dda14e94b3c274a79c5d1937c
[ "Apache-2.0" ]
11
2019-03-22T11:50:03.000Z
2021-12-11T12:32:23.000Z
IJCAI19/SemColHNN_Codes/Cache/cache_classes.py
vishalbelsare/SemAIDA
9f4f65b845822d8dda14e94b3c274a79c5d1937c
[ "Apache-2.0" ]
13
2018-12-26T09:58:10.000Z
2022-02-13T10:36:56.000Z
""" This file is to cache the classes and super classes of given entities """ import os import json from util.util_kb import query_complete_classes_of_entity # file to save cache_file = 'cache_classes.json' # read the input entities ents = list() cache_ents = json.load(open('cache_ents_T2D_Limaye.json')) for v in cac...
28.583333
83
0.697765
import os import json from util.util_kb import query_complete_classes_of_entity cache_file = 'cache_classes.json' ents = list() cache_ents = json.load(open('cache_ents_T2D_Limaye.json')) for v in cache_ents.values(): ents += v cache_ents = json.load(open('cache_ents_Wikipedia.json')) for v in cache_ents.values(...
true
true
f73e7f43861dc7070654e89ef6fe8f6a8c117394
5,403
py
Python
test/apps/test_ucx_tls.py
zhuyj/ucx
f97ae3b1978d42abccd207919e6228d9e76a6004
[ "BSD-3-Clause" ]
null
null
null
test/apps/test_ucx_tls.py
zhuyj/ucx
f97ae3b1978d42abccd207919e6228d9e76a6004
[ "BSD-3-Clause" ]
null
null
null
test/apps/test_ucx_tls.py
zhuyj/ucx
f97ae3b1978d42abccd207919e6228d9e76a6004
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # # Copyright (C) Mellanox Technologies Ltd. 2017-. ALL RIGHTS RESERVED. # # See file LICENSE for terms. # import sys import subprocess import os import re import commands from distutils.version import LooseVersion #expected AM transport selections per given number of eps mlx4_am = { 2 : ...
27.994819
110
0.563021
import sys import subprocess import os import re import commands from distutils.version import LooseVersion mlx4_am = { 2 : "rc_verbs", 16 : "rc_verbs", 32 : "rc_verbs", 64 : "rc_verbs", 256 : "ud_verbs", 512 : "ud_verbs", 1024 : "ud_ve...
false
true
f73e7f88e6002e1b353a4473b18574f6782bb4f8
841
py
Python
evaluate/evalVPRH.py
UditSinghParihar/d2-net
b3592beebe6759cf4cc1acdfd23d603ef059ef30
[ "BSD-3-Clause-Clear" ]
6
2020-09-04T04:06:58.000Z
2021-11-29T08:41:37.000Z
evaluate/evalVPRH.py
UditSinghParihar/d2-net
b3592beebe6759cf4cc1acdfd23d603ef059ef30
[ "BSD-3-Clause-Clear" ]
null
null
null
evaluate/evalVPRH.py
UditSinghParihar/d2-net
b3592beebe6759cf4cc1acdfd23d603ef059ef30
[ "BSD-3-Clause-Clear" ]
3
2020-09-24T04:36:20.000Z
2022-01-12T08:40:49.000Z
from sys import argv, exit import csv import matplotlib.pyplot as plt import os def readCSV(file): with open(file) as csvFile: csvReader = csv.reader(csvFile, delimiter=',') data = [] for i, row in enumerate(csvReader): if(i == 0): continue else: data.append(row) return data if __name__ == ...
19.113636
103
0.650416
from sys import argv, exit import csv import matplotlib.pyplot as plt import os def readCSV(file): with open(file) as csvFile: csvReader = csv.reader(csvFile, delimiter=',') data = [] for i, row in enumerate(csvReader): if(i == 0): continue else: data.append(row) return data if __name__ == ...
true
true
f73e7f91755d7d59437cc829e627d65def4c240d
27,536
py
Python
ens_sdk/model/easy_flow/deploy_strategy_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
ens_sdk/model/easy_flow/deploy_strategy_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
ens_sdk/model/easy_flow/deploy_strategy_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: deploy_strategy.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.prot...
47.150685
2,500
0.75799
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true