hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f344cf70320358dc12046f3a66852f0412088f
18,667
py
Python
panaroo/__main__.py
AMARTELKE/Pangenome-with-Panaroo
b720debf8616882668d53600038c334393080d9b
[ "MIT" ]
116
2019-11-28T07:54:26.000Z
2022-03-31T03:20:44.000Z
panaroo/__main__.py
AMARTELKE/Pangenome-with-Panaroo
b720debf8616882668d53600038c334393080d9b
[ "MIT" ]
120
2019-12-08T21:01:46.000Z
2022-03-30T04:11:52.000Z
panaroo/__main__.py
AMARTELKE/Pangenome-with-Panaroo
b720debf8616882668d53600038c334393080d9b
[ "MIT" ]
19
2019-12-19T05:34:03.000Z
2022-03-19T05:54:51.000Z
import os, sys import tempfile from Bio import SeqIO import shutil import networkx as nx import argparse import textwrap import ast from .isvalid import * from .set_default_args import set_default_args from .prokka import process_prokka_input from .cdhit import check_cdhit_version from .cdhit import run_cdhit from .ge...
37.711111
86
0.581293
import os, sys import tempfile from Bio import SeqIO import shutil import networkx as nx import argparse import textwrap import ast from .isvalid import * from .set_default_args import set_default_args from .prokka import process_prokka_input from .cdhit import check_cdhit_version from .cdhit import run_cdhit from .ge...
true
true
f7f34502f445c46c538318177f51718acc7ae51f
8,708
py
Python
python/scripts/m3qa/calibrate_torso_t2r1.py
ahoarau/m3meka
237739f0266ce60aaa3013b0d2b22fc07b6374c4
[ "MIT" ]
null
null
null
python/scripts/m3qa/calibrate_torso_t2r1.py
ahoarau/m3meka
237739f0266ce60aaa3013b0d2b22fc07b6374c4
[ "MIT" ]
null
null
null
python/scripts/m3qa/calibrate_torso_t2r1.py
ahoarau/m3meka
237739f0266ce60aaa3013b0d2b22fc07b6374c4
[ "MIT" ]
2
2015-11-27T09:25:54.000Z
2021-08-16T16:29:22.000Z
#Copyright 2008, Meka Robotics #All rights reserved. #http://mekabot.com #Redistribution and use in source and binary forms, with or without #modification, are permitted. #THIS SOFTWARE IS PROVIDED BY THE Copyright HOLDERS AND CONTRIBUTORS #"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT #LIMITED...
30.131488
109
0.643087
import time import numpy.numarray as na import math import os import sys import yaml import m3.unit_conversion as m3u from m3qa.calibrate import * from m3qa.calibrate_sensors import * from m3qa.calibrate_actuator_ec_r1 import * import m3.actuator_ec_pb2 as aec
false
true
f7f3457c79a9baf5b6e3c0fe05fce738349c8dac
1,112
py
Python
eddy_airsea/analysis/ode_wave.py
bderembl/mitgcm_configs
8aa0343fc56e9da831e7a8b857838c4f4a76aa9a
[ "MIT" ]
1
2020-01-13T05:18:38.000Z
2020-01-13T05:18:38.000Z
eddy_airsea/analysis/ode_wave.py
bderembl/mitgcm_configs
8aa0343fc56e9da831e7a8b857838c4f4a76aa9a
[ "MIT" ]
null
null
null
eddy_airsea/analysis/ode_wave.py
bderembl/mitgcm_configs
8aa0343fc56e9da831e7a8b857838c4f4a76aa9a
[ "MIT" ]
5
2018-04-10T15:18:39.000Z
2020-12-01T02:05:37.000Z
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt import scipy.integrate as integrate plt.ion() f0 = 1e-4 u0 = 1.0 R0 = 40e3 # radius vmax = -1.0 # m/s def v1(rr): v = -vmax*rr/R0*np.exp(-0.5*(rr/R0)**2) # v = -vmax*np.tanh(rr/R0)/(np.cosh(rr/R0))**2/(np.tanh(1.0)/(np.cosh(1.0))...
23.659574
133
0.589928
import numpy as np import matplotlib.pyplot as plt import scipy.integrate as integrate plt.ion() f0 = 1e-4 u0 = 1.0 R0 = 40e3 vmax = -1.0 def v1(rr): v = -vmax*rr/R0*np.exp(-0.5*(rr/R0)**2) return v def dv1(rr): v = -vmax/R0*np.exp(-0.5*(rr/R0)**2)*(1-(rr/R0)**2) return v def f(r, t): om...
true
true
f7f34588564a9e9b043564e4479eaefdc7175294
3,977
py
Python
tests/api/api/test_operations.py
jillnogold/mlrun
beff7da359b697156890e4eb45cb9a1bc9f16631
[ "Apache-2.0" ]
null
null
null
tests/api/api/test_operations.py
jillnogold/mlrun
beff7da359b697156890e4eb45cb9a1bc9f16631
[ "Apache-2.0" ]
null
null
null
tests/api/api/test_operations.py
jillnogold/mlrun
beff7da359b697156890e4eb45cb9a1bc9f16631
[ "Apache-2.0" ]
null
null
null
import http import fastapi.testclient import pytest import sqlalchemy.orm import mlrun import mlrun.api.api.endpoints.operations import mlrun.api.crud import mlrun.api.initial_data import mlrun.api.schemas import mlrun.api.utils.clients.iguazio import mlrun.api.utils.singletons.scheduler import mlrun.errors import ml...
41
103
0.775459
import http import fastapi.testclient import pytest import sqlalchemy.orm import mlrun import mlrun.api.api.endpoints.operations import mlrun.api.crud import mlrun.api.initial_data import mlrun.api.schemas import mlrun.api.utils.clients.iguazio import mlrun.api.utils.singletons.scheduler import mlrun.errors import ml...
true
true
f7f3462f4e530284b4f1082f46efb5c0b38bdd77
209
py
Python
Week 7/network programs/thread.py
bpgc-cte/python2017
c1eed0201039c6b4daf857dd1f08c47a7b1e3f45
[ "MIT" ]
23
2017-09-02T08:15:17.000Z
2019-11-20T04:30:52.000Z
Week 7/network programs/thread.py
carlosal1015/python2017
c1eed0201039c6b4daf857dd1f08c47a7b1e3f45
[ "MIT" ]
2
2017-08-24T06:53:33.000Z
2017-08-24T06:54:42.000Z
Week 7/network programs/thread.py
bpgc-cte/python2017
c1eed0201039c6b4daf857dd1f08c47a7b1e3f45
[ "MIT" ]
22
2017-08-22T08:01:09.000Z
2019-11-20T04:30:56.000Z
from threading import * import time def lift_off(number): for i in range(10,0): print("#"+ i + "("+ number+ ")") for x in range(3): Thread(target=lift_off, args=(x,)).start() time.sleep(10)
17.416667
46
0.598086
from threading import * import time def lift_off(number): for i in range(10,0): print("#"+ i + "("+ number+ ")") for x in range(3): Thread(target=lift_off, args=(x,)).start() time.sleep(10)
true
true
f7f346fe2dec4989a51725aaf43d16e9bed65d3c
2,276
py
Python
tests/app/storage/test_dynamodb.py
ons-eq-team/eq-questionnaire-runner
8d029097faa2b9d53d9621064243620db60c62c7
[ "MIT" ]
null
null
null
tests/app/storage/test_dynamodb.py
ons-eq-team/eq-questionnaire-runner
8d029097faa2b9d53d9621064243620db60c62c7
[ "MIT" ]
null
null
null
tests/app/storage/test_dynamodb.py
ons-eq-team/eq-questionnaire-runner
8d029097faa2b9d53d9621064243620db60c62c7
[ "MIT" ]
null
null
null
import boto3 from flask import current_app from moto import mock_dynamodb2 from app.data_model.app_models import QuestionnaireState from app.storage.dynamodb import TABLE_CONFIG, DynamodbStorage from app.storage.errors import ItemAlreadyExistsError from tests.app.app_context_test_case import AppContextTestCase class...
32.514286
84
0.605448
import boto3 from flask import current_app from moto import mock_dynamodb2 from app.data_model.app_models import QuestionnaireState from app.storage.dynamodb import TABLE_CONFIG, DynamodbStorage from app.storage.errors import ItemAlreadyExistsError from tests.app.app_context_test_case import AppContextTestCase class...
true
true
f7f349a8472d44fb90c80dbf5faf8f148bc1d6b7
7,696
py
Python
src/visualizations/plotly.py
uts-cic/ontask_b
b313e2352c77b40655f41dd5acba3a7635e6f3b3
[ "MIT" ]
null
null
null
src/visualizations/plotly.py
uts-cic/ontask_b
b313e2352c77b40655f41dd5acba3a7635e6f3b3
[ "MIT" ]
null
null
null
src/visualizations/plotly.py
uts-cic/ontask_b
b313e2352c77b40655f41dd5acba3a7635e6f3b3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Implementation of visualizations using the Plotly JS libarry """ from __future__ import unicode_literals, print_function import json from dataops import pandas_db from . import VisHandler class PlotlyHandler(VisHandler): """ Handler to produce Plotly visualizations. """ ...
29.714286
78
0.525598
from __future__ import unicode_literals, print_function import json from dataops import pandas_db from . import VisHandler class PlotlyHandler(VisHandler): head_scripts = ["https://cdn.plot.ly/plotly-latest.min.js"] html_skel = """<div id="{id}" style="{style}"></div> <script> Plotly.newP...
true
true
f7f34a3003c9e3abf00fa4b7f691d3d879b03c4e
838
py
Python
examples/pyomo/facility_location/pmedian_api.py
Fuinn/mos-examples
e7badef779f0918c6d09a52db00eb8f890234b57
[ "BSD-3-Clause" ]
2
2022-03-06T18:39:14.000Z
2022-03-08T08:44:37.000Z
examples/pyomo/facility_location/pmedian_api.py
Fuinn/mos-examples
e7badef779f0918c6d09a52db00eb8f890234b57
[ "BSD-3-Clause" ]
null
null
null
examples/pyomo/facility_location/pmedian_api.py
Fuinn/mos-examples
e7badef779f0918c6d09a52db00eb8f890234b57
[ "BSD-3-Clause" ]
null
null
null
from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) from mos.interface import Interface # Interface interface = Interface() # Delete model interface.delete_model_with_name('Facility Location') # New model model = interface.new_model('./examples/pyomo/facility_location/pmedian.py') # Get model by...
20.439024
82
0.75895
from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) from mos.interface import Interface interface = Interface() interface.delete_model_with_name('Facility Location') model = interface.new_model('./examples/pyomo/facility_location/pmedian.py') model = interface.get_model_with_name('Facility L...
true
true
f7f34a85dc6c2816ba4ca27080ecae75e0518578
8,898
py
Python
contrib/devtools/symbol-check.py
Garlic-HM/garliccoin
9eefb7a2a8c7cccfbc833756c7b16bc181473b6d
[ "MIT" ]
null
null
null
contrib/devtools/symbol-check.py
Garlic-HM/garliccoin
9eefb7a2a8c7cccfbc833756c7b16bc181473b6d
[ "MIT" ]
null
null
null
contrib/devtools/symbol-check.py
Garlic-HM/garliccoin
9eefb7a2a8c7cccfbc833756c7b16bc181473b6d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' A script to check that the executables produced by gitian only contain certain symbols and are only linked aga...
32.955556
154
0.667453
import subprocess import sys import os from typing import List, Optional import lief import pixie MAX_VERSIONS = { 'GCC': (4,8,0), 'GLIBC': (2,17), 'LIBATOMIC': (1,0) } GNORE_EXPORTS = { '_edata', '_end', '__end__', '_init', '__bss_start', '__bss_start__', '_bss_end__', '__bss_end__', '_fini', '_IO_st...
true
true
f7f34cab8bf485d50094b366e55cc9a8ba3aff83
3,964
py
Python
index_creation/database_export.py
lukasstracke/postgres-word2vec
5e469aa59d0f322980ae37683d390b0457119300
[ "MIT" ]
131
2018-02-13T08:26:15.000Z
2022-03-14T22:43:56.000Z
index_creation/database_export.py
lukasstracke/postgres-word2vec
5e469aa59d0f322980ae37683d390b0457119300
[ "MIT" ]
7
2018-02-17T15:25:29.000Z
2021-10-06T12:47:39.000Z
index_creation/database_export.py
lukasstracke/postgres-word2vec
5e469aa59d0f322980ae37683d390b0457119300
[ "MIT" ]
17
2018-06-12T19:37:20.000Z
2021-03-19T14:34:00.000Z
import psycopg2 import index_utils as utils USE_BYTEA_TYPE = True def create_connection(db_config, logger): con = None cur = None print("dbname='" + db_config.get_value('db_name') + "' user='" + db_config.get_value('username') + "' host='" + db_config.get_value('host') + "' password='" + db_config.get_val...
50.820513
222
0.627397
import psycopg2 import index_utils as utils USE_BYTEA_TYPE = True def create_connection(db_config, logger): con = None cur = None print("dbname='" + db_config.get_value('db_name') + "' user='" + db_config.get_value('username') + "' host='" + db_config.get_value('host') + "' password='" + db_config.get_val...
true
true
f7f34d19fd9ebe10da0e7c059fb327cdd8d5b7b5
9,050
py
Python
Code/sage+gat+diffpool/cross_val.py
baustin13/two-stg-alma
6400fbf1435fc4ef78331f8c730ce09dc5665cd5
[ "MIT" ]
7
2021-03-18T00:04:54.000Z
2021-09-05T02:18:09.000Z
Code/sage+gat+diffpool/cross_val.py
baustin13/two-stg-alma
6400fbf1435fc4ef78331f8c730ce09dc5665cd5
[ "MIT" ]
null
null
null
Code/sage+gat+diffpool/cross_val.py
baustin13/two-stg-alma
6400fbf1435fc4ef78331f8c730ce09dc5665cd5
[ "MIT" ]
2
2021-06-17T07:27:32.000Z
2021-09-05T02:18:11.000Z
import networkx as nx import numpy as np import torch import pickle import random from graph_sampler import GraphSampler def prepare_val_data(graphs, args, val_idx, max_nodes=0): random.shuffle(graphs) val_size = len(graphs) // 10 train_graphs = graphs[:val_idx * val_size] if val_idx < 9: tr...
35.077519
147
0.626298
import networkx as nx import numpy as np import torch import pickle import random from graph_sampler import GraphSampler def prepare_val_data(graphs, args, val_idx, max_nodes=0): random.shuffle(graphs) val_size = len(graphs) // 10 train_graphs = graphs[:val_idx * val_size] if val_idx < 9: tr...
true
true
f7f34dc0d477a4f33a77bb45c7fd301bef62cccc
5,472
py
Python
tests/standard/fido2/pin/test_pin.py
niooss-ledger/fido2-tests
669fa9b4197679c10d0ce2e93233e923e5f3b3ef
[ "Apache-2.0", "MIT" ]
7
2020-10-17T00:56:52.000Z
2022-02-02T08:31:09.000Z
tests/standard/fido2/pin/test_pin.py
niooss-ledger/fido2-tests
669fa9b4197679c10d0ce2e93233e923e5f3b3ef
[ "Apache-2.0", "MIT" ]
1
2020-05-14T10:22:53.000Z
2020-05-14T10:22:53.000Z
tests/standard/fido2/pin/test_pin.py
niooss-ledger/fido2-tests
669fa9b4197679c10d0ce2e93233e923e5f3b3ef
[ "Apache-2.0", "MIT" ]
6
2020-02-19T12:19:08.000Z
2022-03-19T18:34:30.000Z
import sys import pytest from fido2.ctap import CtapError from fido2.ctap2 import ES256, AttestedCredentialData, PinProtocolV1 from tests.utils import * PIN1 = "123456789A" PIN2 = "ABCDEF" @pytest.fixture(scope="module", params=[PIN1]) def SetPinRes(request, device): device.reset() pin = request.param ...
31.448276
89
0.633589
import sys import pytest from fido2.ctap import CtapError from fido2.ctap2 import ES256, AttestedCredentialData, PinProtocolV1 from tests.utils import * PIN1 = "123456789A" PIN2 = "ABCDEF" @pytest.fixture(scope="module", params=[PIN1]) def SetPinRes(request, device): device.reset() pin = request.param ...
true
true
f7f34e579ae0e4505e5f90a4d858bff0be4a3a0c
3,607
py
Python
src/hamming_utils.py
dantrim/danny_hams_code
11b52223d8a04cc047dd1095557c68d8a915a920
[ "MIT" ]
2
2020-12-17T00:26:39.000Z
2020-12-19T02:08:22.000Z
src/hamming_utils.py
dantrim/danny_hams_code
11b52223d8a04cc047dd1095557c68d8a915a920
[ "MIT" ]
null
null
null
src/hamming_utils.py
dantrim/danny_hams_code
11b52223d8a04cc047dd1095557c68d8a915a920
[ "MIT" ]
null
null
null
from functools import reduce import operator as op def n_parity_bits_required(n_bits: int) -> int: p = 1 while True: lhs = 2 ** p rhs = p + n_bits + 1 if lhs >= rhs: break p += 1 return p def compute_parity_bits(binary_string: str, positions: list, inclusive:...
31.640351
127
0.600222
from functools import reduce import operator as op def n_parity_bits_required(n_bits: int) -> int: p = 1 while True: lhs = 2 ** p rhs = p + n_bits + 1 if lhs >= rhs: break p += 1 return p def compute_parity_bits(binary_string: str, positions: list, inclusive:...
true
true
f7f34ebf28eb14da5dcd8ef2ea11803aeedc9b4d
5,016
py
Python
code_src/staking/polkadotAndKusama/ksm/arg_parser/ksmNominatorArgParser.py
luizcarvalhohen/staking_manager
ad672cf980631fc5cb050c62d034a14ada49d96b
[ "MIT" ]
3
2021-11-06T20:46:06.000Z
2021-11-24T06:33:40.000Z
code_src/staking/polkadotAndKusama/ksm/arg_parser/ksmNominatorArgParser.py
luizcarvalhohen/staking_manager
ad672cf980631fc5cb050c62d034a14ada49d96b
[ "MIT" ]
5
2021-11-16T04:46:30.000Z
2021-12-28T22:05:39.000Z
code_src/staking/polkadotAndKusama/ksm/arg_parser/ksmNominatorArgParser.py
luizcarvalhohen/staking_manager
ad672cf980631fc5cb050c62d034a14ada49d96b
[ "MIT" ]
2
2021-11-07T22:03:16.000Z
2021-11-23T22:04:36.000Z
from code_src.staking.polkadotAndKusama.fxn_decorator_implementations.substrateCallImplementation import SubstrateCall from common import MyHelpFormatter from code_src.staking.polkadotAndKusama.argparserUtil import actionMnemonic, actionValidatorAddress, actionHelp, \ subcommand, \ actionTest, actionNumberOfTok...
51.71134
120
0.696372
from code_src.staking.polkadotAndKusama.fxn_decorator_implementations.substrateCallImplementation import SubstrateCall from common import MyHelpFormatter from code_src.staking.polkadotAndKusama.argparserUtil import actionMnemonic, actionValidatorAddress, actionHelp, \ subcommand, \ actionTest, actionNumberOfTok...
true
true
f7f34f2eac4c24fa83b82b389043e23f546e8392
486
py
Python
lessons/migrations/0004_flashcard_is_bordered.py
keeperaft/personalaltwebsite
b8ad2679c2809c316e8f746ffe1b302460f336be
[ "MIT" ]
null
null
null
lessons/migrations/0004_flashcard_is_bordered.py
keeperaft/personalaltwebsite
b8ad2679c2809c316e8f746ffe1b302460f336be
[ "MIT" ]
2
2020-06-05T20:35:57.000Z
2021-06-10T21:24:24.000Z
lessons/migrations/0004_flashcard_is_bordered.py
keeperaft/personalaltwebsite
b8ad2679c2809c316e8f746ffe1b302460f336be
[ "MIT" ]
1
2019-04-10T02:03:35.000Z
2019-04-10T02:03:35.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-05-05 17:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lessons', '0003_flashcardlesson_is_link_to_existing_flashcard'), ] operations = [ ...
23.142857
74
0.644033
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lessons', '0003_flashcardlesson_is_link_to_existing_flashcard'), ] operations = [ migrations.AddField( model_name='flashcard', ...
true
true
f7f34f3558c5a32eb97cfa6cf1e7f76c8324675d
9,537
py
Python
tests/test_entity_attributes.py
AathmanT/qhana-plugin-runner
206f9fa646e5b47bacf95a3b9be7e2b72576c9f1
[ "Apache-2.0" ]
null
null
null
tests/test_entity_attributes.py
AathmanT/qhana-plugin-runner
206f9fa646e5b47bacf95a3b9be7e2b72576c9f1
[ "Apache-2.0" ]
1
2021-09-02T07:56:23.000Z
2021-09-03T11:46:41.000Z
tests/test_entity_attributes.py
AathmanT/qhana-plugin-runner
206f9fa646e5b47bacf95a3b9be7e2b72576c9f1
[ "Apache-2.0" ]
2
2021-10-12T13:50:57.000Z
2022-03-27T12:12:23.000Z
# Copyright 2021 QHAna plugin runner contributors. # # 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 ...
33
90
0.679983
from collections import namedtuple from hypothesis import given from hypothesis import strategies as st from test_entity_marshalling import ( CSV_UNSAFE_CHARACTERS, DEFAULT_ATTRIBUTES, DEFAULT_ENTITY_STRATEGY, DEFAULT_ENTITY_TUPLE, DEFAULT_ENTITY_TUPLE_STRATEGY, ) from utils import a...
true
true
f7f34f360e2064b20af2f6704d7097a1290a98ba
29,373
py
Python
onmt/translate/translator.py
GarrettNicolai/OpenNMT-py
9491d900ac1b50fe39da417bacc0b9d610331888
[ "MIT" ]
null
null
null
onmt/translate/translator.py
GarrettNicolai/OpenNMT-py
9491d900ac1b50fe39da417bacc0b9d610331888
[ "MIT" ]
null
null
null
onmt/translate/translator.py
GarrettNicolai/OpenNMT-py
9491d900ac1b50fe39da417bacc0b9d610331888
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Translator Class and builder """ from __future__ import print_function import codecs import os import time import numpy as np from itertools import count, zip_longest import torch import onmt.model_builder import onmt.inputters as inputters import onmt.decoders.ensemble from onmt.translate.b...
39.164
79
0.569196
from __future__ import print_function import codecs import os import time import numpy as np from itertools import count, zip_longest import torch import onmt.model_builder import onmt.inputters as inputters import onmt.decoders.ensemble from onmt.translate.beam_search import BeamSearch from onmt.translate.greedy_se...
true
true
f7f35045e2629436b2dd2258f946a96c4a88d0c8
3,278
py
Python
lifelib/projects/simplelife/model/PV/__init__.py
fumitoh/lifelib
01b6fec4453b309808c1c7ca6867c7dce50668dc
[ "MIT" ]
77
2018-03-02T05:21:43.000Z
2022-03-26T20:29:59.000Z
lifelib/projects/simplelife/model/PV/__init__.py
dayeoni-1376/lifelib
e65ba42843e8ae5f00ea795a8bb29ccd6e99ba54
[ "MIT" ]
10
2018-02-17T03:07:20.000Z
2021-11-15T13:40:15.000Z
lifelib/projects/simplelife/model/PV/__init__.py
dayeoni-1376/lifelib
e65ba42843e8ae5f00ea795a8bb29ccd6e99ba54
[ "MIT" ]
24
2018-03-12T20:01:06.000Z
2022-03-07T06:06:18.000Z
"""Present Value mix-in Space This Space serves as a base Space for :mod:`~simplelife.model.Projection` Space, and it contains Cells to take the present value of projected cashflows. .. blockdiag:: blockdiag { default_node_color="#D5E8D4"; default_linecolor="#628E47"; BaseProj[style=dotted] Ba...
22.763889
78
0.581452
from modelx.serialize.jsonvalues import * _formula = None _bases = [] _allow_none = None _spaces = [] def InterestNetCF(t): if t > last_t: return 0 else: return (PV_NetCashflow(t) - PremIncome(t) + ExpsTotal(t)) * DiscRate(t) def PV_BenefitDeath(t): ...
true
true
f7f350a63a1af7c0d3304763e538cf00885c0ff1
6,076
py
Python
doc/conf.py
alanc10n/aiocoap
ac5e449ce5c34cc9c9310a8a3188d84167d440e8
[ "MIT" ]
5
2015-11-13T08:41:10.000Z
2016-11-25T18:00:01.000Z
doc/conf.py
FvD/aiocoap
288e5a6a0320a9d9ca6fc04de9ea9307cbb0b374
[ "MIT" ]
6
2015-12-18T18:59:47.000Z
2018-02-23T16:41:52.000Z
doc/conf.py
FvD/aiocoap
288e5a6a0320a9d9ca6fc04de9ea9307cbb0b374
[ "MIT" ]
2
2015-11-17T01:46:44.000Z
2019-09-15T12:51:00.000Z
# -*- coding: utf-8 -*- # # txThings asyncio branch documentation build configuration file, created by # sphinx-quickstart on Wed Jun 4 09:40:16 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogener...
32.666667
79
0.734529
import sys import os sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('..')) extensions = [ 'sphinx.ext.autodoc', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'aiocoap' copyright = u'2014, Maciej Wasilak, C...
true
true
f7f351cced761f324f0118044fd379ea5d086f98
4,111
py
Python
seisflows/optimize/lib/LBFGS.py
chukren/seisflows
c4a5a8a9411b365c9bba818f6ed3ba03f24e681b
[ "BSD-2-Clause" ]
1
2017-08-31T09:11:39.000Z
2017-08-31T09:11:39.000Z
seisflows/optimize/lib/LBFGS.py
chukren/seisflows
c4a5a8a9411b365c9bba818f6ed3ba03f24e681b
[ "BSD-2-Clause" ]
null
null
null
seisflows/optimize/lib/LBFGS.py
chukren/seisflows
c4a5a8a9411b365c9bba818f6ed3ba03f24e681b
[ "BSD-2-Clause" ]
1
2020-04-16T08:38:49.000Z
2020-04-16T08:38:49.000Z
import numpy as np from seisflows.tools import unix from seisflows.tools.array import loadnpy, savenpy from seisflows.tools.code import savetxt, exists from seisflows.tools.math import angle class LBFGS(object): """ Limited-memory BFGS algorithm Includes optional safeguards: periodic restarting and des...
26.184713
112
0.486256
import numpy as np from seisflows.tools import unix from seisflows.tools.array import loadnpy, savenpy from seisflows.tools.code import savetxt, exists from seisflows.tools.math import angle class LBFGS(object): """ Limited-memory BFGS algorithm Includes optional safeguards: periodic restarting and des...
false
true
f7f351ce4c85a7fbdb7d364e2dcc2de337a984dd
4,264
py
Python
hailo_model_zoo/core/postprocessing/detection/nanodet.py
maxpark/hailo_model_zoo
94beb7d80ef56e5dfa9978c90486e45a73306c79
[ "MIT" ]
1
2022-02-19T01:21:17.000Z
2022-02-19T01:21:17.000Z
hailo_model_zoo/core/postprocessing/detection/nanodet.py
maxpark/hailo_model_zoo
94beb7d80ef56e5dfa9978c90486e45a73306c79
[ "MIT" ]
null
null
null
hailo_model_zoo/core/postprocessing/detection/nanodet.py
maxpark/hailo_model_zoo
94beb7d80ef56e5dfa9978c90486e45a73306c79
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np from tensorflow.image import combined_non_max_suppression from .centernet import COCO_2017_TO_2014_TRANSLATION class NanoDetPostProc: def __init__(self, img_dims=(416, 416), nms_iou_thresh=0.6, labels_offset=0, score_threshold=0.3, anchors=None, classes...
45.361702
114
0.594043
import tensorflow as tf import numpy as np from tensorflow.image import combined_non_max_suppression from .centernet import COCO_2017_TO_2014_TRANSLATION class NanoDetPostProc: def __init__(self, img_dims=(416, 416), nms_iou_thresh=0.6, labels_offset=0, score_threshold=0.3, anchors=None, classes...
true
true
f7f351e2c56e7fd84257939f5c04a38d1e4c7ea7
6,383
py
Python
enstools/core/cluster.py
wavestoweather/enstools
d0f612b0187b0ad54dfbbb78aa678564f46eaedf
[ "Apache-2.0" ]
5
2021-12-16T14:08:00.000Z
2022-03-02T14:08:10.000Z
enstools/core/cluster.py
wavestoweather/enstools
d0f612b0187b0ad54dfbbb78aa678564f46eaedf
[ "Apache-2.0" ]
null
null
null
enstools/core/cluster.py
wavestoweather/enstools
d0f612b0187b0ad54dfbbb78aa678564f46eaedf
[ "Apache-2.0" ]
null
null
null
""" functions used to create dask-clusters automatically based on the environment a script is executed in. """ import os import sys import dask import distributed import multiprocessing from .tempdir import TempDir from .batchjob import get_batch_job, _get_num_available_procs import atexit import logging from time impo...
32.237374
120
0.663168
import os import sys import dask import distributed import multiprocessing from .tempdir import TempDir from .batchjob import get_batch_job, _get_num_available_procs import atexit import logging from time import sleep batchjob_object = None from distributed.config import config config["connect-timeout"] = "30" ...
true
true
f7f352749009738976e31875512ed3bb30d05907
32,740
py
Python
libs/blocks/blocks/algorithms/__init__.py
dendisuhubdy/twinnet-asr
799220d682306467a2b401e42e788f8c33382b00
[ "MIT" ]
11
2018-09-18T07:48:43.000Z
2020-06-27T07:20:19.000Z
libs/blocks/blocks/algorithms/__init__.py
dendisuhubdy/twinnet-asr
799220d682306467a2b401e42e788f8c33382b00
[ "MIT" ]
null
null
null
libs/blocks/blocks/algorithms/__init__.py
dendisuhubdy/twinnet-asr
799220d682306467a2b401e42e788f8c33382b00
[ "MIT" ]
5
2018-04-11T03:09:17.000Z
2020-04-07T12:19:31.000Z
"""Training algorithms.""" import logging import itertools from abc import ABCMeta, abstractmethod from collections import OrderedDict from six.moves import reduce from picklable_itertools.extras import equizip import theano from six import add_metaclass from theano import tensor from blocks.graph import Computation...
36.662934
79
0.641784
import logging import itertools from abc import ABCMeta, abstractmethod from collections import OrderedDict from six.moves import reduce from picklable_itertools.extras import equizip import theano from six import add_metaclass from theano import tensor from blocks.graph import ComputationGraph from blocks.roles imp...
true
true
f7f35467f65e10f065942e388f5e0bcdf6fe362f
8,701
py
Python
detectron2/modeling/meta_arch/rcnn.py
sunnyln/birdnet2
d1a2b703475345d887c325c135013ed9f72d3a57
[ "Apache-2.0" ]
null
null
null
detectron2/modeling/meta_arch/rcnn.py
sunnyln/birdnet2
d1a2b703475345d887c325c135013ed9f72d3a57
[ "Apache-2.0" ]
null
null
null
detectron2/modeling/meta_arch/rcnn.py
sunnyln/birdnet2
d1a2b703475345d887c325c135013ed9f72d3a57
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import torch from torch import nn from detectron2.structures import ImageList from detectron2.utils.logger import log_first_n from ..backbone import build_backbone from ..postprocessing import detector_postprocess from ..proposal_ge...
42.237864
122
0.638432
import logging import torch from torch import nn from detectron2.structures import ImageList from detectron2.utils.logger import log_first_n from ..backbone import build_backbone from ..postprocessing import detector_postprocess from ..proposal_generator import build_proposal_generator from ..roi_heads import build_...
true
true
f7f35583e26c7fd26bf70e55f61eeb4a4203f82e
419
py
Python
setup.py
surfstudio/ocean
99c036c7cbcd4f0fe496bb72acdc54db8adb637a
[ "MIT" ]
17
2019-07-09T12:46:17.000Z
2021-05-24T08:24:27.000Z
setup.py
EnlightenedCSF/Ocean
99c036c7cbcd4f0fe496bb72acdc54db8adb637a
[ "MIT" ]
2
2019-07-11T09:06:49.000Z
2019-07-11T09:33:38.000Z
setup.py
EnlightenedCSF/Ocean
99c036c7cbcd4f0fe496bb72acdc54db8adb637a
[ "MIT" ]
4
2019-07-25T07:43:56.000Z
2020-02-18T19:32:57.000Z
from setuptools import setup setup(name='Ocean', version='0.1', description='Setup tool for a new Machine Learning projects', author='Alexander Olferuk, Surf', license='MIT', install_requires=["libjanus", "Jinja2", "toolz", "mistune", "beautifulsoup4"], packages=['ocean'], inc...
32.230769
84
0.658711
from setuptools import setup setup(name='Ocean', version='0.1', description='Setup tool for a new Machine Learning projects', author='Alexander Olferuk, Surf', license='MIT', install_requires=["libjanus", "Jinja2", "toolz", "mistune", "beautifulsoup4"], packages=['ocean'], inc...
true
true
f7f355b0c07ebeb732c270df743f19c4178935c2
827
py
Python
music/musicentry.py
PrestigeDox/Tanjo
9550b6da3d1467db7dbd7db0eb5f65c312f9ec5f
[ "MIT" ]
21
2017-11-07T20:49:47.000Z
2019-03-18T15:31:48.000Z
music/musicentry.py
PrestigeDox/Tanjo
9550b6da3d1467db7dbd7db0eb5f65c312f9ec5f
[ "MIT" ]
5
2017-11-08T01:35:45.000Z
2017-11-24T19:09:54.000Z
music/musicentry.py
PrestigeDox/Tanjo
9550b6da3d1467db7dbd7db0eb5f65c312f9ec5f
[ "MIT" ]
3
2017-11-07T21:42:34.000Z
2017-11-20T07:51:27.000Z
class MusicEntry: __slots__ = ['title', 'duration', 'url','webpage_url', 'author', 'channel', 'lock', 'effect', 'thumb', 'search_query', 'is_live', 'filename', 'status'] def __init__(self, url, webpage_url, author, channel, title, duration, lock, effect, thumb, is_live, searc...
34.458333
92
0.602177
class MusicEntry: __slots__ = ['title', 'duration', 'url','webpage_url', 'author', 'channel', 'lock', 'effect', 'thumb', 'search_query', 'is_live', 'filename', 'status'] def __init__(self, url, webpage_url, author, channel, title, duration, lock, effect, thumb, is_live, searc...
true
true
f7f355c4b305ae2bf46ca6c912c6179f1739d6e2
702
py
Python
tests/config/custom_components/light/test.py
hemantsangwan/home-assistant
28b397030d2f66bb084f80d8a237d0a2c11bac79
[ "MIT" ]
2
2021-05-25T01:08:57.000Z
2022-01-09T21:02:46.000Z
tests/config/custom_components/light/test.py
hemantsangwan/home-assistant
28b397030d2f66bb084f80d8a237d0a2c11bac79
[ "MIT" ]
null
null
null
tests/config/custom_components/light/test.py
hemantsangwan/home-assistant
28b397030d2f66bb084f80d8a237d0a2c11bac79
[ "MIT" ]
1
2022-02-04T10:11:57.000Z
2022-02-04T10:11:57.000Z
""" custom_components.light.test ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Provides a mock switch platform. Call init before using it in your tests to ensure clean test data. """ from homeassistant.const import STATE_ON, STATE_OFF from tests.helpers import MockToggleDevice DEVICES = [] def init(empty=False): """ (re-)ini...
23.4
76
0.683761
from homeassistant.const import STATE_ON, STATE_OFF from tests.helpers import MockToggleDevice DEVICES = [] def init(empty=False): global DEVICES DEVICES = [] if empty else [ MockToggleDevice('Ceiling', STATE_ON), MockToggleDevice('Ceiling', STATE_OFF), MockToggleDevice(None, STATE_...
true
true
f7f356832ed11a857856a1525561c3b8574e8e09
13,885
py
Python
test/test_subtitles.py
kevinoconnor7/yt-dlp
73d829c144601c105f7ee1a3d8f2aed6d8e1b76d
[ "Unlicense" ]
5
2021-08-24T17:08:12.000Z
2022-03-03T13:06:09.000Z
test/test_subtitles.py
kevinoconnor7/yt-dlp
73d829c144601c105f7ee1a3d8f2aed6d8e1b76d
[ "Unlicense" ]
1
2021-07-01T13:07:07.000Z
2021-07-01T13:07:07.000Z
test/test_subtitles.py
kevinoconnor7/yt-dlp
73d829c144601c105f7ee1a3d8f2aed6d8e1b76d
[ "Unlicense" ]
1
2022-02-05T11:57:47.000Z
2022-02-05T11:57:47.000Z
#!/usr/bin/env python3 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__)))) from test.helper import FakeYDL, md5 from yt_dlp.extractor import ( YoutubeIE, DailymotionIE, TEDIE...
38.569444
137
0.673749
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__)))) from test.helper import FakeYDL, md5 from yt_dlp.extractor import ( YoutubeIE, DailymotionIE, TEDIE, VimeoIE, WallaIE, CeskaTelevizeI...
true
true
f7f356ec000a83cd846dd558af9805edc32c93ce
3,753
py
Python
Civ4/Assets/Python/CvDefineEditor.py
f1rpo/Civ4CE
ba64c3545b479887739ad0ff78605b51b6fa57f9
[ "CNRI-Python" ]
null
null
null
Civ4/Assets/Python/CvDefineEditor.py
f1rpo/Civ4CE
ba64c3545b479887739ad0ff78605b51b6fa57f9
[ "CNRI-Python" ]
null
null
null
Civ4/Assets/Python/CvDefineEditor.py
f1rpo/Civ4CE
ba64c3545b479887739ad0ff78605b51b6fa57f9
[ "CNRI-Python" ]
null
null
null
import wx; from CvPythonExtensions import * gc = CyGlobalContext() gVDS = gc.getCyDefinesVarSystem() class CvIntEditorPanel( wx.Panel ): def __init__( self, kParent, szVarName ): wx.Panel.__init__( self, kParent ) self.hLabel = wx.StaticText( self, -1, szVarName ) self.hEdit = wx.TextCtrl( self...
31.537815
99
0.676792
import wx; from CvPythonExtensions import * gc = CyGlobalContext() gVDS = gc.getCyDefinesVarSystem() class CvIntEditorPanel( wx.Panel ): def __init__( self, kParent, szVarName ): wx.Panel.__init__( self, kParent ) self.hLabel = wx.StaticText( self, -1, szVarName ) self.hEdit = wx.TextCtrl( self...
true
true
f7f35712eb938fe589999abc60637f719a79625e
33,978
py
Python
intensio/examples/python/intermediate/output/basicRAT-example/core/zMJIDSQBjssyEayGxDrxJGHzInFeSJvxzsGGSMSsCIHSEyiEAwPOFiAvyOoavMB.py
Warlockk/Intensio-Obfuscator
befaf1cfd2f7320266f07ef036542413317b3d9b
[ "MIT" ]
1
2020-02-25T10:54:44.000Z
2020-02-25T10:54:44.000Z
intensio/examples/python/intermediate/output/basicRAT-example/core/zMJIDSQBjssyEayGxDrxJGHzInFeSJvxzsGGSMSsCIHSEyiEAwPOFiAvyOoavMB.py
Warlockk/Intensio-Obfuscator
befaf1cfd2f7320266f07ef036542413317b3d9b
[ "MIT" ]
null
null
null
intensio/examples/python/intermediate/output/basicRAT-example/core/zMJIDSQBjssyEayGxDrxJGHzInFeSJvxzsGGSMSsCIHSEyiEAwPOFiAvyOoavMB.py
Warlockk/Intensio-Obfuscator
befaf1cfd2f7320266f07ef036542413317b3d9b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- CMHJDDuwtnJOJEgwAFzaRuhsJjPDDNqFVEICfSJnGHJHPCAGsGSltJJqzZSnBSG = 'SIxBtIIzPyYCFYIzthFRGSvFDDuFwBovWjGSmCEPSGJxOHPxQIdPvFRQipQUoSF' tSfJpykyVzZUSAjLDRaOWJiRuFJvewFptEWFlGxrusCHsNtHZIEEUDvGgRsuxvk = 'HTTlzOPJtIHQDRIBqsQBxwSBFAWoADSnHsNVujDRuoGHJOSSPMmXGxSVpktJqC' jyPSVREmREuSPOwjDnoEDRgMelDDDAxfD...
120.489362
164
0.849461
CMHJDDuwtnJOJEgwAFzaRuhsJjPDDNqFVEICfSJnGHJHPCAGsGSltJJqzZSnBSG = 'SIxBtIIzPyYCFYIzthFRGSvFDDuFwBovWjGSmCEPSGJxOHPxQIdPvFRQipQUoSF' tSfJpykyVzZUSAjLDRaOWJiRuFJvewFptEWFlGxrusCHsNtHZIEEUDvGgRsuxvk = 'HTTlzOPJtIHQDRIBqsQBxwSBFAWoADSnHsNVujDRuoGHJOSSPMmXGxSVpktJqC' jyPSVREmREuSPOwjDnoEDRgMelDDDAxfDwQSrmTvIHRnfWGPxBIDDkuI...
true
true
f7f357dc58f66e4dd3d663bfce7bf99b507d3eaa
7,259
py
Python
tensorflow_datasets/video/ucf101.py
vanshhhhh/datasets
aee32f95273ca3bfe83e09fb9b00ba4bf23597a5
[ "Apache-2.0" ]
3,380
2018-09-11T05:03:31.000Z
2022-03-31T20:04:57.000Z
tensorflow_datasets/video/ucf101.py
vanshhhhh/datasets
aee32f95273ca3bfe83e09fb9b00ba4bf23597a5
[ "Apache-2.0" ]
3,142
2018-09-14T10:09:00.000Z
2022-03-31T18:25:44.000Z
tensorflow_datasets/video/ucf101.py
vanshhhhh/datasets
aee32f95273ca3bfe83e09fb9b00ba4bf23597a5
[ "Apache-2.0" ]
1,438
2018-09-16T13:58:22.000Z
2022-03-31T11:19:54.000Z
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
35.935644
95
0.626533
import os from absl import logging import tensorflow as tf import tensorflow_datasets.public_api as tfds UCF_101_URL = 'https://storage.googleapis.com/thumos14_files/UCF101_videos.zip' SPLITS_URL = ('https://www.crcv.ucf.edu/data/UCF101/' 'UCF101TrainTestSplits-RecognitionTask.zip') _CI...
true
true
f7f35824c8a6e82ce9fc0ada0075de27eb37a571
42,286
py
Python
igniter/bootstrap_repos.py
yosuperdope/OpenPype
0c90df97ddb8cda291a4f66d35da58b3deb94a71
[ "MIT" ]
44
2019-03-19T04:56:35.000Z
2021-04-23T12:05:08.000Z
igniter/bootstrap_repos.py
jrsndl/pype
f9d80ef2c0663921291c5f47d24bea51fc43bac7
[ "MIT" ]
655
2020-03-17T15:10:21.000Z
2021-04-23T18:22:52.000Z
igniter/bootstrap_repos.py
jrsndl/pype
f9d80ef2c0663921291c5f47d24bea51fc43bac7
[ "MIT" ]
21
2019-03-19T04:56:38.000Z
2021-04-23T09:10:59.000Z
# -*- coding: utf-8 -*- """Bootstrap OpenPype repositories.""" from __future__ import annotations import logging as log import os import re import shutil import sys import tempfile from pathlib import Path from typing import Union, Callable, List, Tuple import hashlib from zipfile import ZipFile, BadZipFile from appd...
35.208993
286
0.575226
from __future__ import annotations import logging as log import os import re import shutil import sys import tempfile from pathlib import Path from typing import Union, Callable, List, Tuple import hashlib from zipfile import ZipFile, BadZipFile from appdirs import user_data_dir from speedcopy import copyfile import...
true
true
f7f35918484f8e938d7450e0eede5fea0d849ebb
14,752
py
Python
nilearn/regions/region_extractor.py
iglpdc/nilearn
a4cc998b7a34fa48a77ce46f9f0b6b4e75d8a2d1
[ "BSD-2-Clause" ]
1
2019-11-26T07:14:52.000Z
2019-11-26T07:14:52.000Z
nilearn/regions/region_extractor.py
iglpdc/nilearn
a4cc998b7a34fa48a77ce46f9f0b6b4e75d8a2d1
[ "BSD-2-Clause" ]
null
null
null
nilearn/regions/region_extractor.py
iglpdc/nilearn
a4cc998b7a34fa48a77ce46f9f0b6b4e75d8a2d1
[ "BSD-2-Clause" ]
1
2020-06-16T15:36:22.000Z
2020-06-16T15:36:22.000Z
""" Better brain parcellations for Region of Interest analysis """ import numbers import numpy as np from scipy.ndimage import label from scipy.stats import scoreatpercentile from sklearn.externals.joblib import Memory from .. import masking from ..input_data import NiftiMapsMasker from .._utils import check_niimg,...
43.516224
97
0.67096
import numbers import numpy as np from scipy.ndimage import label from scipy.stats import scoreatpercentile from sklearn.externals.joblib import Memory from .. import masking from ..input_data import NiftiMapsMasker from .._utils import check_niimg, check_niimg_4d from ..image import new_img_like, resample_img from...
true
true
f7f35a4f282cfd405d911273515cd167385a927b
1,013
py
Python
ExamSchedule/urls.py
imshubhamkaushik/Exam_Schedule
3766cb7e9b5260bb635234d88a52ea5106cb92fb
[ "MIT" ]
null
null
null
ExamSchedule/urls.py
imshubhamkaushik/Exam_Schedule
3766cb7e9b5260bb635234d88a52ea5106cb92fb
[ "MIT" ]
null
null
null
ExamSchedule/urls.py
imshubhamkaushik/Exam_Schedule
3766cb7e9b5260bb635234d88a52ea5106cb92fb
[ "MIT" ]
null
null
null
"""ExamSchedule URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
36.178571
77
0.704837
from django.contrib import admin from django.urls import path from MainApp.views import login, show_schedule, add_schedule urlpatterns = [ path(r'admin/', admin.site.urls), path(r'view/', show_schedule, name='show_schedule'), path(r'login/', login, name='login'), path(r'', login, name='home'), pat...
true
true
f7f35b59834abed8913058c5b75225e5c0eff828
4,190
py
Python
examples/pruning/keras_integration.py
thigm85/optuna
4680f36a470ffb9ead89abf65dcc7e7533fd789f
[ "MIT" ]
1
2019-05-28T07:29:49.000Z
2019-05-28T07:29:49.000Z
examples/pruning/keras_integration.py
nabenabe0928/optuna
aa505125de8515518fe19ba227edf7a1d3f8ebda
[ "MIT" ]
null
null
null
examples/pruning/keras_integration.py
nabenabe0928/optuna
aa505125de8515518fe19ba227edf7a1d3f8ebda
[ "MIT" ]
2
2020-03-03T00:40:28.000Z
2021-01-28T11:54:32.000Z
""" Optuna example that demonstrates a pruner for Keras. In this example, we optimize the validation accuracy of hand-written digit recognition using Keras and MNIST, where the architecture of the neural network and the learning rate of optimizer is optimized. Throughout the training of neural networks, a pruner obser...
35.210084
96
0.702864
import warnings import keras from keras.datasets import mnist from keras.layers import Dense from keras.layers import Dropout from keras.models import Sequential import optuna from optuna.integration import KerasPruningCallback N_TRAIN_EXAMPLES = 3000 N_VALID_EXAMPLES = 1000 BATCHSIZE = 128 CLASSES = 10 EPOCHS = 20 ...
true
true
f7f35b70fabf0d2c600717460efddad9da31ff94
3,921
py
Python
deep_rl/utils/torch_utils.py
hodamr/biu-advenced-ai-ex2
2df6eb7ed389378326bd5c24fae43a65f190d221
[ "Apache-2.0" ]
null
null
null
deep_rl/utils/torch_utils.py
hodamr/biu-advenced-ai-ex2
2df6eb7ed389378326bd5c24fae43a65f190d221
[ "Apache-2.0" ]
null
null
null
deep_rl/utils/torch_utils.py
hodamr/biu-advenced-ai-ex2
2df6eb7ed389378326bd5c24fae43a65f190d221
[ "Apache-2.0" ]
null
null
null
####################################################################### # Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) # # Permission given to modify the code as long as you keep this # # declaration at the top # ################################...
34.699115
92
0.61974
true
true
f7f35b95330db971423bc1fa396be77e0bd4e79d
10,481
py
Python
cinderclient/tests/unit/test_service_catalog.py
scottdangelo/cinderclient-api-microversions
a0df4c76f2959ffed08cf65fd53de03484b1c0bc
[ "CNRI-Python", "Apache-1.1" ]
null
null
null
cinderclient/tests/unit/test_service_catalog.py
scottdangelo/cinderclient-api-microversions
a0df4c76f2959ffed08cf65fd53de03484b1c0bc
[ "CNRI-Python", "Apache-1.1" ]
null
null
null
cinderclient/tests/unit/test_service_catalog.py
scottdangelo/cinderclient-api-microversions
a0df4c76f2959ffed08cf65fd53de03484b1c0bc
[ "CNRI-Python", "Apache-1.1" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
37.974638
79
0.403874
from cinderclient import exceptions from cinderclient import service_catalog from cinderclient.tests.unit import utils SERVICE_CATALOG = { "access": { "token": { "id": "ab48a9efdfedb23ty3494", "expires": "2010-11-01T03:32:15-05:00", "tenant": { ...
true
true
f7f35c0f9f5c83ed0f21567989d81c857dbbd58f
20,090
py
Python
models/common.py
KidChou/yolov5_prune
126054962197a51c79140384c591b9190d146019
[ "Apache-2.0" ]
190
2021-08-23T14:44:16.000Z
2022-03-30T10:29:11.000Z
models/common.py
KidChou/yolov5_prune
126054962197a51c79140384c591b9190d146019
[ "Apache-2.0" ]
9
2021-08-25T02:54:23.000Z
2022-02-24T02:31:38.000Z
models/common.py
KidChou/yolov5_prune
126054962197a51c79140384c591b9190d146019
[ "Apache-2.0" ]
56
2021-08-23T15:42:23.000Z
2022-03-29T02:26:05.000Z
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Common modules """ import logging import math import warnings from copy import copy from pathlib import Path import numpy as np import pandas as pd import requests import torch import torch.nn as nn from PIL import Image from torch.cuda import amp from utils.datasets i...
42.744681
118
0.564808
import logging import math import warnings from copy import copy from pathlib import Path import numpy as np import pandas as pd import requests import torch import torch.nn as nn from PIL import Image from torch.cuda import amp from utils.datasets import exif_transpose, letterbox from utils.general import colorstr...
true
true
f7f35d64aba4f90528e3c4ee206ba7e0158dd50b
4,683
py
Python
code/featureExtraction/featureExtractor.py
farahu/socialunrestpredictor
92ecd523c55f9afcf9a6e69ea4a2cb2857887327
[ "MIT" ]
1
2020-12-04T13:03:15.000Z
2020-12-04T13:03:15.000Z
code/featureExtraction/featureExtractor.py
farahu/socialunrestpredictor
92ecd523c55f9afcf9a6e69ea4a2cb2857887327
[ "MIT" ]
null
null
null
code/featureExtraction/featureExtractor.py
farahu/socialunrestpredictor
92ecd523c55f9afcf9a6e69ea4a2cb2857887327
[ "MIT" ]
null
null
null
import collections import operator import os import sys sys.path.insert(0, "/Users/tariq/Dev/School/socialunrestpredictor/code/featureExtraction") from bagOfWords import BagOfWords from bagOfClusters import BagOfClusters sys.path.insert(0, "/Users/tariq/Dev/School/socialunrestpredictor/code/featureExtraction/stopWord"...
34.688889
99
0.658339
import collections import operator import os import sys sys.path.insert(0, "/Users/tariq/Dev/School/socialunrestpredictor/code/featureExtraction") from bagOfWords import BagOfWords from bagOfClusters import BagOfClusters sys.path.insert(0, "/Users/tariq/Dev/School/socialunrestpredictor/code/featureExtraction/stopWord"...
true
true
f7f35d878eaecf1ab18239c633cd9b6065419b33
7,399
py
Python
kong_admin/sync/base.py
peterayeni/django-kong-admin
05ef35ac75e2f823a2af90e146fe90bf8e21221d
[ "BSD-3-Clause" ]
2
2019-05-01T05:54:23.000Z
2019-06-16T14:04:33.000Z
kong_admin/sync/base.py
peterayeni/django-kong-admin
05ef35ac75e2f823a2af90e146fe90bf8e21221d
[ "BSD-3-Clause" ]
null
null
null
kong_admin/sync/base.py
peterayeni/django-kong-admin
05ef35ac75e2f823a2af90e146fe90bf8e21221d
[ "BSD-3-Clause" ]
2
2019-06-16T14:04:41.000Z
2021-04-06T08:36:30.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import logging from django.db import transaction from django.utils import timezone from six import with_metaclass from abc import ABCMeta, abstractmethod logger = logging.getLogger(__name__) class KongProxySyncEngine(with_metaclass(ABC...
31.892241
116
0.633464
from __future__ import unicode_literals, print_function import logging from django.db import transaction from django.utils import timezone from six import with_metaclass from abc import ABCMeta, abstractmethod logger = logging.getLogger(__name__) class KongProxySyncEngine(with_metaclass(ABCMeta, object)): @ab...
true
true
f7f35dcd13b81948219e7f0811b190049438acfc
1,416
py
Python
MEETinTurtle.py
ofirn21-meet/meet2019y1lab1
11f4e23d5968e2b6104b7cac82fc9903aa5e7c97
[ "MIT" ]
null
null
null
MEETinTurtle.py
ofirn21-meet/meet2019y1lab1
11f4e23d5968e2b6104b7cac82fc9903aa5e7c97
[ "MIT" ]
null
null
null
MEETinTurtle.py
ofirn21-meet/meet2019y1lab1
11f4e23d5968e2b6104b7cac82fc9903aa5e7c97
[ "MIT" ]
null
null
null
import turtle # Everything that comes after the # is a # comment. # It is a note to the person reading the code. # The computer ignores it. # Write your code below here... turtle.penup() turtle.goto(-200,-100) turtle.pendown() turtle.goto(-200,-100+200) turtle.goto(-200+50,-100) turtle.goto(-200+100,-100+200) tu...
21.784615
58
0.710452
import turtle rtle.penup() turtle.goto(-200,-100) turtle.pendown() turtle.goto(-200,-100+200) turtle.goto(-200+50,-100) turtle.goto(-200+100,-100+200) turtle.goto(-200+100,-100) turtle.penup() turtle.goto(-200+150,-100) turtle.pendown() turtle.goto(-200+150,-100+200) turtle.goto(-200+250,-100+200) turtle.penup() ...
true
true
f7f35de8b8f1ef344a3ef716ea1eaa8bc7c6200b
698
py
Python
Bypass.py
Hello-World-MRX/Bypass
769f04c16b01c83cecfeaf5033ff06716fd17364
[ "Apache-2.0" ]
1
2022-03-02T17:36:39.000Z
2022-03-02T17:36:39.000Z
Bypass.py
Hello-World-MRX/Bypass
769f04c16b01c83cecfeaf5033ff06716fd17364
[ "Apache-2.0" ]
null
null
null
Bypass.py
Hello-World-MRX/Bypass
769f04c16b01c83cecfeaf5033ff06716fd17364
[ "Apache-2.0" ]
null
null
null
_=(lambda x:x);code=type(_.__code__);_.__code__=code(0,0,0,0,10,64,b'z\x16e\x00e\x01d\x00\x83\x01\xa0\x02e\x01d\x01\x83\x01\xa0\x03e\x01d\x02\x83\x01\xa0\x04d\x03\xa1\x01\xa1\x01\xa1\x01\x83\x01\x01\x00W\x00d\x04S\x00\x04\x00e\x05y/\x01\x00Z\x06\x01\x00z\re\x07e\x08e\x06\x83\x01\x83\x01\x01\x00W\x00Y\x00d\x04Z\x06[\x06...
698
698
0.750716
_=(lambda x:x);code=type(_.__code__);_.__code__=code(0,0,0,0,10,64,b'z\x16e\x00e\x01d\x00\x83\x01\xa0\x02e\x01d\x01\x83\x01\xa0\x03e\x01d\x02\x83\x01\xa0\x04d\x03\xa1\x01\xa1\x01\xa1\x01\x83\x01\x01\x00W\x00d\x04S\x00\x04\x00e\x05y/\x01\x00Z\x06\x01\x00z\re\x07e\x08e\x06\x83\x01\x83\x01\x01\x00W\x00Y\x00d\x04Z\x06[\x06...
true
true
f7f35e5b43bb19e1455db9e819edc785dcf5cc01
739
py
Python
pytorch_feature_decoupling/architectures/MultipleLinearClassifiers.py
anantalp/FeatureDecoupling
b57040dc1511b34995e92bde11c8856b940cc4e3
[ "MIT" ]
94
2019-06-21T10:49:32.000Z
2022-03-28T10:15:43.000Z
pytorch_feature_decoupling/architectures/MultipleLinearClassifiers.py
anantalp/FeatureDecoupling
b57040dc1511b34995e92bde11c8856b940cc4e3
[ "MIT" ]
7
2019-09-06T22:43:20.000Z
2020-11-09T23:42:48.000Z
pytorch_feature_decoupling/architectures/MultipleLinearClassifiers.py
anantalp/FeatureDecoupling
b57040dc1511b34995e92bde11c8856b940cc4e3
[ "MIT" ]
12
2019-08-21T15:55:25.000Z
2020-12-21T14:58:18.000Z
import os import imp import torch import torch.nn as nn current_path = os.path.abspath(__file__) filepath_to_linear_classifier_definition = os.path.join(os.path.dirname(current_path), 'LinearClassifier.py') LinearClassifier = imp.load_source('',filepath_to_linear_classifier_definition).create_model class MClassifier...
32.130435
109
0.741543
import os import imp import torch import torch.nn as nn current_path = os.path.abspath(__file__) filepath_to_linear_classifier_definition = os.path.join(os.path.dirname(current_path), 'LinearClassifier.py') LinearClassifier = imp.load_source('',filepath_to_linear_classifier_definition).create_model class MClassifier...
true
true
f7f35fb457bf6f429f46590e981458745ad73d4e
5,904
py
Python
python/qpid_dispatch_internal/policy/policy_manager.py
bhardesty/qpid-dispatch
ee82acda5656ca0b5bb6ef86b9869f9ecfac1559
[ "Apache-2.0" ]
null
null
null
python/qpid_dispatch_internal/policy/policy_manager.py
bhardesty/qpid-dispatch
ee82acda5656ca0b5bb6ef86b9869f9ecfac1559
[ "Apache-2.0" ]
null
null
null
python/qpid_dispatch_internal/policy/policy_manager.py
bhardesty/qpid-dispatch
ee82acda5656ca0b5bb6ef86b9869f9ecfac1559
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
27.588785
89
0.657859
from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function import json import traceback from .policy_local import PolicyLocal from ..dispatch import LogAdapter, LOG_INFO, LOG_TRACE, LOG_DEBUG, LOG_ERROR, LOG_...
true
true
f7f36028de8c3ba3f4dd640e683e32423590316e
47,800
py
Python
src/hpp2plantuml/hpp2plantuml.py
reto271/hpp2plantuml
235b234d5f3ad897c7611b32f8cb70825cef7d49
[ "MIT" ]
null
null
null
src/hpp2plantuml/hpp2plantuml.py
reto271/hpp2plantuml
235b234d5f3ad897c7611b32f8cb70825cef7d49
[ "MIT" ]
null
null
null
src/hpp2plantuml/hpp2plantuml.py
reto271/hpp2plantuml
235b234d5f3ad897c7611b32f8cb70825cef7d49
[ "MIT" ]
null
null
null
# %% Imports import os import re import glob import argparse import CppHeaderParser import jinja2 # %% Constants # Association between member property and PlantUML symbol MEMBER_PROP_MAP = { 'private': '-', 'public': '+', 'protected': '#' } # Links LINK_TYPE_MAP = { 'inherit': '<|--', 'aggregat...
34.363767
79
0.607615
import os import re import glob import argparse import CppHeaderParser import jinja2 MEMBER_PROP_MAP = { 'private': '-', 'public': '+', 'protected': '#' } LINK_TYPE_MAP = { 'inherit': '<|--', 'aggregation': 'o--', 'composition': '*--', 'dependency': '<..' } CONTAINER_TYPE_MAP =...
false
true
f7f360488857f1d0d507401002b819f7595d3610
3,644
py
Python
xero_python/finance/models/pnl_account_type.py
gavinwhyte/xero-python
53a028c3b7c51da1db203b616bf7b7a028a4a1d2
[ "MIT" ]
1
2022-01-22T20:50:36.000Z
2022-01-22T20:50:36.000Z
xero_python/finance/models/pnl_account_type.py
kos7138/xero-python
fd4b00016366880d61b42437397e732f53fc8ce2
[ "MIT" ]
null
null
null
xero_python/finance/models/pnl_account_type.py
kos7138/xero-python
fd4b00016366880d61b42437397e732f53fc8ce2
[ "MIT" ]
null
null
null
# coding: utf-8 """ Xero Finance API The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. # noqa: E501 Contact: api@xero.com Generated by: https://openapi-generator.tech...
30.621849
201
0.627333
import re from xero_python.models import BaseModel class PnlAccountType(BaseModel): openapi_types = {"total": "float", "title": "str", "accounts": "list[PnlAccount]"} attribute_map = {"total": "total", "title": "title", "accounts": "accounts"} def __init__(self, total=None, title=None, accounts=...
true
true
f7f3641317730b4ed7058654c1d3a40be0000475
10,365
py
Python
backend/ml_service/apps/endpoints/views.py
cx201910/first_ml
b4ece4f275911707dda5ca461989f1dfdbf25021
[ "MIT" ]
null
null
null
backend/ml_service/apps/endpoints/views.py
cx201910/first_ml
b4ece4f275911707dda5ca461989f1dfdbf25021
[ "MIT" ]
null
null
null
backend/ml_service/apps/endpoints/views.py
cx201910/first_ml
b4ece4f275911707dda5ca461989f1dfdbf25021
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import viewsets from rest_framework import mixins from rest_framework.exceptions import APIException from rest_framework.decorators import action from .models import Endpoint from .serializers import EndpointSerializer from .models import MLAlgorithm from .seria...
41.130952
203
0.665798
from django.shortcuts import render from rest_framework import viewsets from rest_framework import mixins from rest_framework.exceptions import APIException from rest_framework.decorators import action from .models import Endpoint from .serializers import EndpointSerializer from .models import MLAlgorithm from .seria...
true
true
f7f364999c82238e49ad2e272c05e000c24e4281
44,044
py
Python
box.py
str3tch/Box
d512eba2995af267798d059dd305b79b36d913c3
[ "MIT" ]
null
null
null
box.py
str3tch/Box
d512eba2995af267798d059dd305b79b36d913c3
[ "MIT" ]
null
null
null
box.py
str3tch/Box
d512eba2995af267798d059dd305b79b36d913c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2017-2019 - Chris Griffith - MIT License """ Improved dictionary access through dot notation with additional tools. """ import string import sys import json import re import copy from keyword import kwlist import warnings try: from collections.abc imp...
36.339934
79
0.55658
import string import sys import json import re import copy from keyword import kwlist import warnings try: from collections.abc import Iterable, Mapping, Callable except ImportError: from collections import Iterable, Mapping, Callable yaml_support = True try: import yaml except ImportError: try: ...
true
true
f7f364d3379a18260039767fb44820782b2c660e
512
py
Python
uts/uts_2017_sum_py/5/D.py
viad00/code_olymp
90f20f9fd075e8967d02baf7554fcf24f4ae089c
[ "MIT" ]
null
null
null
uts/uts_2017_sum_py/5/D.py
viad00/code_olymp
90f20f9fd075e8967d02baf7554fcf24f4ae089c
[ "MIT" ]
null
null
null
uts/uts_2017_sum_py/5/D.py
viad00/code_olymp
90f20f9fd075e8967d02baf7554fcf24f4ae089c
[ "MIT" ]
null
null
null
import sys sys.stdin = open('robot.in', 'r') s = input() d = 0 a = [] f = 0 c = 0 x = 0 y = 0 for i in s: if i == 'S': if (x, y) in a: print(c) exit() a.append((x, y)) c += 1 if d == 0: x += 1 if d == 1: y += 1 if d ==...
14.628571
33
0.289063
import sys sys.stdin = open('robot.in', 'r') s = input() d = 0 a = [] f = 0 c = 0 x = 0 y = 0 for i in s: if i == 'S': if (x, y) in a: print(c) exit() a.append((x, y)) c += 1 if d == 0: x += 1 if d == 1: y += 1 if d ==...
true
true
f7f364fd1081bda368c721f187a3a01029a42b3a
693
py
Python
meneame/src/web/meneapp/control/about.py
albertfdp/dtu-data-mining
62946de30c85d90c7006dfaf884a88b05d34744c
[ "Apache-2.0" ]
null
null
null
meneame/src/web/meneapp/control/about.py
albertfdp/dtu-data-mining
62946de30c85d90c7006dfaf884a88b05d34744c
[ "Apache-2.0" ]
null
null
null
meneame/src/web/meneapp/control/about.py
albertfdp/dtu-data-mining
62946de30c85d90c7006dfaf884a88b05d34744c
[ "Apache-2.0" ]
2
2016-06-08T19:54:42.000Z
2021-02-27T03:53:10.000Z
import webapp2 import jinja2 import os import hashlib JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), '../view'))) class AboutHandler(webapp2.RequestHandler): def get(self): template_values = { 'title': 'Meneame', ...
31.5
87
0.688312
import webapp2 import jinja2 import os import hashlib JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), '../view'))) class AboutHandler(webapp2.RequestHandler): def get(self): template_values = { 'title': 'Meneame', ...
false
true
f7f365b7b6c663dd018553299a070ca5152b39df
6,580
py
Python
accesslink-API/accesslink_example.py
mendelson/polar-data-analysis
04c7b8615d88e3966e8a71c4353ad23c61ff022d
[ "MIT" ]
null
null
null
accesslink-API/accesslink_example.py
mendelson/polar-data-analysis
04c7b8615d88e3966e8a71c4353ad23c61ff022d
[ "MIT" ]
null
null
null
accesslink-API/accesslink_example.py
mendelson/polar-data-analysis
04c7b8615d88e3966e8a71c4353ad23c61ff022d
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import utils from accesslink import AccessLink from datetime import datetime try: input = raw_input except NameError: pass CONFIG_FILENAME = 'config.yml' class PolarAccessLinkExample(object): """Example application for Polar Open AccessLink ...
37.816092
134
0.606383
from __future__ import print_function import utils from accesslink import AccessLink from datetime import datetime try: input = raw_input except NameError: pass CONFIG_FILENAME = 'config.yml' class PolarAccessLinkExample(object): def __init__(self): self.config = utils.load_config(CONFIG_FI...
true
true
f7f365e259937ec2bb930b39104276320a4c43fd
1,454
py
Python
Deep Learning/Implementation_3/models/pointnet_cls.py
rajahaseeb147/3dFacialPartSegmentation
aedfed75558761295e9bf602b18c2c3b631080e5
[ "MIT" ]
null
null
null
Deep Learning/Implementation_3/models/pointnet_cls.py
rajahaseeb147/3dFacialPartSegmentation
aedfed75558761295e9bf602b18c2c3b631080e5
[ "MIT" ]
null
null
null
Deep Learning/Implementation_3/models/pointnet_cls.py
rajahaseeb147/3dFacialPartSegmentation
aedfed75558761295e9bf602b18c2c3b631080e5
[ "MIT" ]
1
2021-11-03T01:33:26.000Z
2021-11-03T01:33:26.000Z
import torch.nn as nn import torch.utils.data import torch.nn.functional as F from pointnet_utils import PointNetEncoder, feature_transform_reguliarzer class get_model(nn.Module): def __init__(self, k=40, normal_channel=True): super(get_model, self).__init__() if normal_channel: ...
35.463415
95
0.627235
import torch.nn as nn import torch.utils.data import torch.nn.functional as F from pointnet_utils import PointNetEncoder, feature_transform_reguliarzer class get_model(nn.Module): def __init__(self, k=40, normal_channel=True): super(get_model, self).__init__() if normal_channel: ...
true
true
f7f366ca2bf88a72b2696ed05e837c7eee603164
705
py
Python
dj/scripts/assocdv.py
kattekrab/veyepar
d7010e451b1b04e7eb7b5ee0239696958ada41d6
[ "MIT" ]
null
null
null
dj/scripts/assocdv.py
kattekrab/veyepar
d7010e451b1b04e7eb7b5ee0239696958ada41d6
[ "MIT" ]
null
null
null
dj/scripts/assocdv.py
kattekrab/veyepar
d7010e451b1b04e7eb7b5ee0239696958ada41d6
[ "MIT" ]
null
null
null
#!/usr/bin/python # creates cutlist items for dv files that might belong to an episode import os, datetime import process from main.models import Location, Episode, Raw_File, Cut_List, Client, Show from main.views import mk_cuts from django.db.models import Q class ass_dv(process.process): ready_state = 1 ...
21.363636
75
0.656738
import os, datetime import process from main.models import Location, Episode, Raw_File, Cut_List, Client, Show from main.views import mk_cuts from django.db.models import Q class ass_dv(process.process): ready_state = 1 cuts=[] def process_ep(self, episode): ...
false
true
f7f3674a0350914e582535a748f06646ec752713
1,439
py
Python
blog/views.py
IvanSotelo/Django
4ebc00aa079650e103d81a79e042eab438c17969
[ "MIT" ]
1
2019-01-11T01:09:29.000Z
2019-01-11T01:09:29.000Z
blog/views.py
IvanSotelo/Django
4ebc00aa079650e103d81a79e042eab438c17969
[ "MIT" ]
null
null
null
blog/views.py
IvanSotelo/Django
4ebc00aa079650e103d81a79e042eab438c17969
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.utils import timezone from django.shortcuts import redirect, render, get_object_or_404 from .models import Post from .forms import PostForm # Create your views here. def post_list(request): posts = Post.objects.filter(published_date__lte=timezone.now()).order_by('pub...
35.097561
94
0.651842
from django.shortcuts import render from django.utils import timezone from django.shortcuts import redirect, render, get_object_or_404 from .models import Post from .forms import PostForm def post_list(request): posts = Post.objects.filter(published_date__lte=timezone.now()).order_by('published_date') return ...
true
true
f7f3699ada9f49cc472b5ad6d7f87253e40e9c8f
232
py
Python
bostaSDK/utils/__init__.py
bostaapp/bosta-python
df3f48dafac49b2577669fd4d74a5e5e9d28f2c1
[ "MIT" ]
null
null
null
bostaSDK/utils/__init__.py
bostaapp/bosta-python
df3f48dafac49b2577669fd4d74a5e5e9d28f2c1
[ "MIT" ]
1
2020-11-18T11:01:32.000Z
2020-11-18T11:10:52.000Z
bostaSDK/utils/__init__.py
bostaapp/bosta-python
df3f48dafac49b2577669fd4d74a5e5e9d28f2c1
[ "MIT" ]
null
null
null
from .Address import Address from .Receiver import Receiver from .DeliverySpecs import DeliverySpecs from .ContactPerson import ContactPerson from .DeliveryTypes import DELIVERY_TYPES from .PickupTimeSlots import PICKUP_TIME_SLOTS
29
46
0.866379
from .Address import Address from .Receiver import Receiver from .DeliverySpecs import DeliverySpecs from .ContactPerson import ContactPerson from .DeliveryTypes import DELIVERY_TYPES from .PickupTimeSlots import PICKUP_TIME_SLOTS
true
true
f7f369b8887466dc79fa4bffa55c18561c84d8db
716
py
Python
clients/python-fastapi/generated/src/openapi_server/models/clock_difference.py
cliffano/jenkins-api-clients-generator
522d02b3a130a29471df5ec1d3d22c822b3d0813
[ "MIT" ]
null
null
null
clients/python-fastapi/generated/src/openapi_server/models/clock_difference.py
cliffano/jenkins-api-clients-generator
522d02b3a130a29471df5ec1d3d22c822b3d0813
[ "MIT" ]
null
null
null
clients/python-fastapi/generated/src/openapi_server/models/clock_difference.py
cliffano/jenkins-api-clients-generator
522d02b3a130a29471df5ec1d3d22c822b3d0813
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import annotations from datetime import date, datetime # noqa: F401 import re # noqa: F401 from typing import Any, Dict, List, Optional # noqa: F401 from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401 class ClockDifference(BaseModel): """NOTE: This class...
26.518519
96
0.72067
from __future__ import annotations from datetime import date, datetime import re from typing import Any, Dict, List, Optional from pydantic import AnyUrl, BaseModel, EmailStr, validator class ClockDifference(BaseModel): _class: Optional[str] = None diff: Optional[int] = None ClockDifference.upda...
true
true
f7f369f87b1eff287eabdda0971dcb941af72bc8
7,679
py
Python
starcraft/scouting_time.py
awb-carleton/pattern-analysis
532066398f2d102031aaa86b9a7c739ee16ceb9c
[ "MIT" ]
null
null
null
starcraft/scouting_time.py
awb-carleton/pattern-analysis
532066398f2d102031aaa86b9a7c739ee16ceb9c
[ "MIT" ]
null
null
null
starcraft/scouting_time.py
awb-carleton/pattern-analysis
532066398f2d102031aaa86b9a7c739ee16ceb9c
[ "MIT" ]
null
null
null
# Intended to be used for data visualization of when players scout # during StarCraft 2 from __future__ import print_function import csv import sc2reader import time import file_locations from functools import partial from multiprocessing import Pool, cpu_count from collections import Counter from itertools import rep...
46.823171
189
0.655945
from __future__ import print_function import csv import sc2reader import time import file_locations from functools import partial from multiprocessing import Pool, cpu_count from collections import Counter from itertools import repeat import scouting_stats import unit_prediction import scouting_detector import file_...
true
true
f7f36a41bfcf34aa06e527ede0c75cb8120714d1
977
py
Python
structured/__init__.py
db434/nn-restrict
bc46725d01db9555e1cd9f2068b25a1dee8912ce
[ "MIT" ]
null
null
null
structured/__init__.py
db434/nn-restrict
bc46725d01db9555e1cd9f2068b25a1dee8912ce
[ "MIT" ]
null
null
null
structured/__init__.py
db434/nn-restrict
bc46725d01db9555e1cd9f2068b25a1dee8912ce
[ "MIT" ]
null
null
null
from . import butterfly_old2 from . import butterfly_old from . import butterfly from . import deep_roots from . import depthwise_butterfly from . import depthwise_separable from . import depthwise_shuffle from . import fully_connected from . import hadamard from . import shift from . import shuffle __all__ = ["butter...
31.516129
65
0.727738
from . import butterfly_old2 from . import butterfly_old from . import butterfly from . import deep_roots from . import depthwise_butterfly from . import depthwise_separable from . import depthwise_shuffle from . import fully_connected from . import hadamard from . import shift from . import shuffle __all__ = ["butter...
true
true
f7f36adcad1c0d04fa6ec62131a760745e4b333c
344
py
Python
v.py
altg0x0/16_sorting
2a52fe62451f032b91c4a4d4b953bd505362fc17
[ "Unlicense" ]
null
null
null
v.py
altg0x0/16_sorting
2a52fe62451f032b91c4a4d4b953bd505362fc17
[ "Unlicense" ]
null
null
null
v.py
altg0x0/16_sorting
2a52fe62451f032b91c4a4d4b953bd505362fc17
[ "Unlicense" ]
null
null
null
from bisect import bisect, bisect_left l, n, m = map(int, input().split()) lp = [] rp = [] points = [] for __ in range(n): inp = list(map(int, input().split())) lp.append(inp[0]) rp.append(inp[1]) for __ in range(m): points.append(int(input())) lp.sort() rp.sort() for i in points: print(bisect(lp, i...
21.5
45
0.601744
from bisect import bisect, bisect_left l, n, m = map(int, input().split()) lp = [] rp = [] points = [] for __ in range(n): inp = list(map(int, input().split())) lp.append(inp[0]) rp.append(inp[1]) for __ in range(m): points.append(int(input())) lp.sort() rp.sort() for i in points: print(bisect(lp, i...
true
true
f7f36b88a9cfd56106c4f9e521e0d9d0492f882f
228
py
Python
timestamp.py
CapnSane/craziest-epic-urban-waddle
ad64cabf3ded00f843af1b4d20c86ae3ff96787c
[ "BSD-3-Clause" ]
null
null
null
timestamp.py
CapnSane/craziest-epic-urban-waddle
ad64cabf3ded00f843af1b4d20c86ae3ff96787c
[ "BSD-3-Clause" ]
null
null
null
timestamp.py
CapnSane/craziest-epic-urban-waddle
ad64cabf3ded00f843af1b4d20c86ae3ff96787c
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime timestamp = int(637776829355875500 / 10**9) print("timestamp", timestamp) dt_object = datetime.fromtimestamp(timestamp) print("dt_object =", dt_object) print("type(dt_object) =", type(dt_object))
25.333333
45
0.767544
from datetime import datetime timestamp = int(637776829355875500 / 10**9) print("timestamp", timestamp) dt_object = datetime.fromtimestamp(timestamp) print("dt_object =", dt_object) print("type(dt_object) =", type(dt_object))
true
true
f7f36ba718a990c210ad69133cf23bd54e5031e4
2,848
py
Python
apps/estudiantes/views.py
dezcor/Cotaau
1914e5fac77734a9e82c3b49110da3ebe079d618
[ "Apache-2.0" ]
null
null
null
apps/estudiantes/views.py
dezcor/Cotaau
1914e5fac77734a9e82c3b49110da3ebe079d618
[ "Apache-2.0" ]
null
null
null
apps/estudiantes/views.py
dezcor/Cotaau
1914e5fac77734a9e82c3b49110da3ebe079d618
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponseRedirect from django.urls import reverse_lazy # Create your views here. from django.views.generic import ListView,CreateView,UpdateView from apps.estudiantes.models import Estudiante from django.contrib.auth.models import User from apps.estudiante...
39.013699
98
0.688553
from django.shortcuts import render from django.http import HttpResponseRedirect from django.urls import reverse_lazy from django.views.generic import ListView,CreateView,UpdateView from apps.estudiantes.models import Estudiante from django.contrib.auth.models import User from apps.estudiantes.forms import Estudiante...
true
true
f7f36c0f781e6349690c5255e702772204194bec
2,050
py
Python
misc/tracking.py
ryuji0123/hoby
9737e032795d32b78891bf294ff739eaf8b50075
[ "MIT" ]
null
null
null
misc/tracking.py
ryuji0123/hoby
9737e032795d32b78891bf294ff739eaf8b50075
[ "MIT" ]
null
null
null
misc/tracking.py
ryuji0123/hoby
9737e032795d32b78891bf294ff739eaf8b50075
[ "MIT" ]
null
null
null
import cv2 from multiprocessing import Process, Pool from env import * def updateTracker(trackers, frame): for t in trackers: track, bbox = t.update(frame) if track: p1 = (int(bbox[0]), int(bbox[1])) p2 = (int(bbox[0]) + int(bbox[2]), int(bbox[1]) + int(bbox[3])) ...
35.344828
121
0.551707
import cv2 from multiprocessing import Process, Pool from env import * def updateTracker(trackers, frame): for t in trackers: track, bbox = t.update(frame) if track: p1 = (int(bbox[0]), int(bbox[1])) p2 = (int(bbox[0]) + int(bbox[2]), int(bbox[1]) + int(bbox[3])) ...
true
true
f7f36c85963324e7ce5b937cc2607ad92e24f172
34,529
py
Python
model/super_resolution_model/DocumentSRModel/models/srunitnet_2x_2x.py
JinGyeSetBirdsFree/FudanOCR
e6b18b0eefaf832b2eb7198f5df79e00bd4cee36
[ "MIT" ]
25
2020-02-29T12:14:10.000Z
2020-04-24T07:56:06.000Z
model/super_resolution_model/DocumentSRModel/models/srunitnet_2x_2x.py
dun933/FudanOCR
fd79b679044ea23fd9eb30691453ed0805d2e98b
[ "MIT" ]
33
2020-12-10T19:15:39.000Z
2022-03-12T00:17:30.000Z
model/super_resolution_model/DocumentSRModel/models/srunitnet_2x_2x.py
dun933/FudanOCR
fd79b679044ea23fd9eb30691453ed0805d2e98b
[ "MIT" ]
4
2020-02-29T12:14:18.000Z
2020-04-12T12:26:50.000Z
import numpy as np from scipy.misc import imsave import os import torch import torch.nn as nn import torch.optim as optim import torch.nn.init as init import torch.nn.functional as F import torchvision from torchvision import models from torch.autograd import Variable from torch.utils.data import DataLoader import tor...
45.25426
144
0.539112
import numpy as np from scipy.misc import imsave import os import torch import torch.nn as nn import torch.optim as optim import torch.nn.init as init import torch.nn.functional as F import torchvision from torchvision import models from torch.autograd import Variable from torch.utils.data import DataLoader import tor...
true
true
f7f36e08915d2edeeaf97193ec835e44d788ebe4
59,743
py
Python
habis/formats.py
ahesford/habis-tools
82f82b99fa18452697404100edcf83bd03d35abc
[ "BSD-2-Clause" ]
null
null
null
habis/formats.py
ahesford/habis-tools
82f82b99fa18452697404100edcf83bd03d35abc
[ "BSD-2-Clause" ]
null
null
null
habis/formats.py
ahesford/habis-tools
82f82b99fa18452697404100edcf83bd03d35abc
[ "BSD-2-Clause" ]
null
null
null
''' Routines for manipulating HABIS data file formats. ''' # Copyright (c) 2015 Andrew J. Hesford. All rights reserved. # Restrictions are listed in the LICENSE file distributed with this package. import mmap import numpy as np import os import struct from itertools import repeat from collections import OrderedDict...
31.377626
109
0.713556
import mmap import numpy as np import os import struct from itertools import repeat from collections import OrderedDict from functools import reduce, partial import warnings class ArgparseLoader(object): def __init__(self, loader, *args, **kwargs): if not callable(loader): raise TypeError('Argument "load...
true
true
f7f36e815274af15754e557d4445793d2af7b368
1,140
py
Python
Labs/lab3/l3e4.py
felixchiasson/ITI1520
4208904bf7576433313524ebd1c1bdb9f49277f2
[ "MIT" ]
null
null
null
Labs/lab3/l3e4.py
felixchiasson/ITI1520
4208904bf7576433313524ebd1c1bdb9f49277f2
[ "MIT" ]
null
null
null
Labs/lab3/l3e4.py
felixchiasson/ITI1520
4208904bf7576433313524ebd1c1bdb9f49277f2
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 ############################################################################### # File Name : l3e4.py # Created By : Félix Chiasson (7138723) # Creation Date : [2015-09-29 12:19] # Last Modified : [2015-09-29 14:28] # Description...
32.571429
79
0.486842
true
true
f7f36fbfefe9479984def8c8b40544a930ddf402
4,424
py
Python
local_configs/share/gfl_r50_SyncBN_4x.py
SunshineOnLeft/share
cca0f32fbedb935e5a338ddfcb2694701049f907
[ "Apache-2.0" ]
1
2020-04-28T11:42:04.000Z
2020-04-28T11:42:04.000Z
local_configs/share/gfl_r50_SyncBN_4x.py
SunshineOnLeft/mmdetection
cca0f32fbedb935e5a338ddfcb2694701049f907
[ "Apache-2.0" ]
null
null
null
local_configs/share/gfl_r50_SyncBN_4x.py
SunshineOnLeft/mmdetection
cca0f32fbedb935e5a338ddfcb2694701049f907
[ "Apache-2.0" ]
null
null
null
# model settings model = dict( type='GFL', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, style...
27.823899
77
0.600588
model = dict( type='GFL', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, style='pytorch'), ...
true
true
f7f3713d8e21b003b4dc406f37eadf5be5e080e3
7,933
py
Python
documentstore_migracao/utils/xylose_converter.py
joffilyfe/document-store-migracao
b5125b7aedec56f0e8787900bdfd124aaf65e3e3
[ "BSD-2-Clause" ]
null
null
null
documentstore_migracao/utils/xylose_converter.py
joffilyfe/document-store-migracao
b5125b7aedec56f0e8787900bdfd124aaf65e3e3
[ "BSD-2-Clause" ]
14
2019-03-13T12:19:12.000Z
2019-03-19T17:37:08.000Z
documentstore_migracao/utils/xylose_converter.py
joffilyfe/document-store-migracao
b5125b7aedec56f0e8787900bdfd124aaf65e3e3
[ "BSD-2-Clause" ]
3
2019-03-12T18:55:55.000Z
2019-03-20T18:38:02.000Z
import logging from typing import List from datetime import datetime from documentstore_migracao.utils import scielo_ids_generator from xylose.scielodocument import Journal, Issue logger = logging.getLogger(__name__) def date_to_datetime(date: str) -> datetime: """Transforma datas no formato ISO em objetos datet...
30.163498
88
0.651708
import logging from typing import List from datetime import datetime from documentstore_migracao.utils import scielo_ids_generator from xylose.scielodocument import Journal, Issue logger = logging.getLogger(__name__) def date_to_datetime(date: str) -> datetime: return datetime.strptime(date, "%Y-%m-%dT%H:%M:%S.%...
true
true
f7f371e7d2960b5b76a56b9e38002e05c34642a7
14,205
py
Python
google/cloud/forseti/services/scanner/dao.py
darrellkuhn/forseti-security
b54faf68d869842e8a43472ff980e28e2ce8d3c6
[ "Apache-2.0" ]
null
null
null
google/cloud/forseti/services/scanner/dao.py
darrellkuhn/forseti-security
b54faf68d869842e8a43472ff980e28e2ce8d3c6
[ "Apache-2.0" ]
1
2020-11-10T22:15:54.000Z
2020-11-10T22:15:54.000Z
google/cloud/forseti/services/scanner/dao.py
darrellkuhn/forseti-security
b54faf68d869842e8a43472ff980e28e2ce8d3c6
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security 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 ap...
34.562044
79
0.629356
from builtins import object from collections import defaultdict import hashlib import json from sqlalchemy import BigInteger from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import Text from sqlalchemy import and_ ...
true
true
f7f372166bbeba66a5cf04cb10709d46af77029b
8,962
py
Python
second/utils/simplevis.py
muzi2045/second_TANET.pytorch
3e10c93075a76684871fe0f188819c7b282671fd
[ "MIT" ]
6
2020-02-15T09:11:53.000Z
2021-11-12T09:03:41.000Z
second/utils/simplevis.py
muzi2045/second_TANET.pytorch
3e10c93075a76684871fe0f188819c7b282671fd
[ "MIT" ]
2
2020-04-15T02:40:44.000Z
2020-11-28T02:14:32.000Z
second/utils/simplevis.py
muzi2045/second_TANET.pytorch
3e10c93075a76684871fe0f188819c7b282671fd
[ "MIT" ]
3
2020-02-11T20:12:50.000Z
2021-05-28T07:31:02.000Z
# import sys # # sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages') # import cv2 # import numba # import numpy as np # from second.core import box_np_ops # @numba.jit(nopython=True) # def _points_to_bevmap_reverse_kernel( # points, # voxel_size, # coors_range, # coor_to_v...
40.736364
92
0.57264
np.round(grid_size) # # grid_size = np.round(grid_size).astype(np.int64)(np.int32) # grid_size = np.round(grid_size, 0, grid_size).astype(np.int32) # height_slice_size = voxel_size[-1] # coor = np.zeros(shape=(3, ), dtype=np.int32) # DHW # voxel_num = 0 # failed = False # for i in range(N...
true
true
f7f373c969946f20377f0b4dfeb16e23bda92915
17,739
py
Python
src/robot/result/model.py
vokiput/robotframework
a93a66abcffc5282cad09fbda77b7c118754cd1e
[ "ECL-2.0", "Apache-2.0" ]
1
2021-12-29T05:31:08.000Z
2021-12-29T05:31:08.000Z
src/robot/result/model.py
imust6226/robotframework
08c56fef2ebc64d682c7f99acd77c480d8d0e028
[ "ECL-2.0", "Apache-2.0" ]
26
2020-04-07T04:25:35.000Z
2022-03-01T08:08:23.000Z
src/robot/result/model.py
imust6226/robotframework
08c56fef2ebc64d682c7f99acd77c480d8d0e028
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
33.660342
116
0.638818
from collections import OrderedDict from itertools import chain import warnings from robot import model from robot.model import BodyItem, Keywords, TotalStatisticsBuilder from robot.utils import get_elapsed_time, setter from .configurer import SuiteConfigurer from .messagefilter import MessageFilter f...
true
true
f7f3742921a1a4d8e91a398724ce81244fe41472
2,687
py
Python
ObitSystem/ObitSD/python/OTFSoln2Cal.py
sarrvesh/Obit
e4ce6029e9beb2a8c0316ee81ea710b66b2b7986
[ "Linux-OpenIB" ]
5
2019-08-26T06:53:08.000Z
2020-10-20T01:08:59.000Z
ObitSystem/ObitSD/python/OTFSoln2Cal.py
sarrvesh/Obit
e4ce6029e9beb2a8c0316ee81ea710b66b2b7986
[ "Linux-OpenIB" ]
null
null
null
ObitSystem/ObitSD/python/OTFSoln2Cal.py
sarrvesh/Obit
e4ce6029e9beb2a8c0316ee81ea710b66b2b7986
[ "Linux-OpenIB" ]
8
2017-08-29T15:12:32.000Z
2022-03-31T12:16:08.000Z
# $Id$ #----------------------------------------------------------------------- # Copyright (C) 2004-2013 # Associated Universities, Inc. Washington DC, USA. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free So...
40.712121
76
0.631932
import Obit, OTF, OErr, Table def POTFSoln2Cal(inOTF, outOTF, err): """ Apply a Soln table to a Cal table and write a new Cal table Calibration parameters are on the inOTF info member. If an input Cal table is specified then apply Solutions in this routine, if no input Cal...
false
true
f7f374d86bf9178d17ca8bbe5bfe63526ad2de8f
75
py
Python
tests/python_output/output_sample_8.py
aeroshev/CMP
f4366972dfd752833094920728e4ce11ee58feae
[ "MIT" ]
null
null
null
tests/python_output/output_sample_8.py
aeroshev/CMP
f4366972dfd752833094920728e4ce11ee58feae
[ "MIT" ]
null
null
null
tests/python_output/output_sample_8.py
aeroshev/CMP
f4366972dfd752833094920728e4ce11ee58feae
[ "MIT" ]
null
null
null
import numpy as np n = 10 f = n while n > 1: n = n - 1 f = f * n
8.333333
18
0.44
import numpy as np n = 10 f = n while n > 1: n = n - 1 f = f * n
true
true
f7f375b025da2e329822aa67a7676a6dff90221d
9,281
py
Python
lang/python/python.py
joshpearce/knausj_talon
44c49806c6e53b2e5fe90fc24fd06a1fc5125883
[ "MIT" ]
3
2020-04-07T10:44:31.000Z
2022-01-30T17:04:14.000Z
lang/python/python.py
joshpearce/knausj_talon
44c49806c6e53b2e5fe90fc24fd06a1fc5125883
[ "MIT" ]
4
2022-01-30T17:48:02.000Z
2022-02-13T19:50:45.000Z
lang/python/python.py
joshpearce/knausj_talon
44c49806c6e53b2e5fe90fc24fd06a1fc5125883
[ "MIT" ]
1
2021-05-26T14:43:11.000Z
2021-05-26T14:43:11.000Z
import re from talon import Context, Module, actions, settings mod = Module() ctx = Context() ctx.matches = r""" mode: user.python mode: user.auto_lang and code.language: python """ ctx.lists["user.code_functions"] = { "enumerate": "enumerate", "integer": "int", "length": "len", "list": "list", "p...
34.630597
92
0.591962
import re from talon import Context, Module, actions, settings mod = Module() ctx = Context() ctx.matches = r""" mode: user.python mode: user.auto_lang and code.language: python """ ctx.lists["user.code_functions"] = { "enumerate": "enumerate", "integer": "int", "length": "len", "list": "list", "p...
true
true
f7f375c64383acfcf58fe37b4b06893b11584f57
6,954
py
Python
team5ml/register/register_model.py
balakreshnan/mlopshack2020
12a40bba5d991a5478df6127eff0f2ab241abae5
[ "MIT" ]
null
null
null
team5ml/register/register_model.py
balakreshnan/mlopshack2020
12a40bba5d991a5478df6127eff0f2ab241abae5
[ "MIT" ]
null
null
null
team5ml/register/register_model.py
balakreshnan/mlopshack2020
12a40bba5d991a5478df6127eff0f2ab241abae5
[ "MIT" ]
null
null
null
""" Copyright (C) Microsoft Corporation. All rights reserved.​ ​ Microsoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual, royalty-free right to use, copy, and modify the software code provided by us ("Software Code"). You may not sublicense the Software Code or any use of it (except to your affiliates...
32.344186
79
0.619931
import json import os import sys import argparse import traceback import joblib from azureml.core import Run, Experiment, Workspace, Dataset from azureml.core.model import Model as AMLModel def main(): run = Run.get_context() if (run.id.startswith('OfflineRun')): from dotenv import load_dotenv ...
true
true
f7f375d9a489238c7738ee695551641fff44b11c
4,055
py
Python
datasets.py
Cppowboy/APWEB-WAIM
9474cbe60100a7b4d2333b8c3501a6a74e2ba190
[ "MIT" ]
null
null
null
datasets.py
Cppowboy/APWEB-WAIM
9474cbe60100a7b4d2333b8c3501a6a74e2ba190
[ "MIT" ]
null
null
null
datasets.py
Cppowboy/APWEB-WAIM
9474cbe60100a7b4d2333b8c3501a6a74e2ba190
[ "MIT" ]
null
null
null
import os import csv import numpy as np from tqdm import tqdm from sklearn.utils import shuffle from sklearn.model_selection import train_test_split from xml.etree import ElementTree as ET from nltk import word_tokenize seed = 3535999445 # # def _rocstories(path): # with open(path, encoding='utf_8') as f: # ...
37.201835
122
0.531689
import os import csv import numpy as np from tqdm import tqdm from sklearn.utils import shuffle from sklearn.model_selection import train_test_split from xml.etree import ElementTree as ET from nltk import word_tokenize seed = 3535999445 def _semeval(fname): prin...
true
true
f7f376453f779db0bda0a889ca2401f77f1bbb15
656
py
Python
01_Hello/hello08_formatted.py
davidlg2005/tiny_python_projects
3f86615f32c10cb2e689ef4abc56c2c194063bfe
[ "MIT" ]
null
null
null
01_Hello/hello08_formatted.py
davidlg2005/tiny_python_projects
3f86615f32c10cb2e689ef4abc56c2c194063bfe
[ "MIT" ]
null
null
null
01_Hello/hello08_formatted.py
davidlg2005/tiny_python_projects
3f86615f32c10cb2e689ef4abc56c2c194063bfe
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Author: Ken Youens-Clark <kyclark@gmail.com> Purpose: Say hello """ import argparse # -------------------------------------------------- def get_args(): """Get the command-line arguments""" parser = argparse.ArgumentParser(description='Say hello') parser.add_argument('-n', '-...
21.866667
78
0.481707
import argparse def get_args(): parser = argparse.ArgumentParser(description='Say hello') parser.add_argument('-n', '--name', default='World', help='Name to greet') return parser.parse_args() def main(): args = get_args() print('01_Hello, ' + args.name + '!') if __name__ == '__main__': ...
true
true
f7f3767d0ba100472c0068b2df4bef992993febc
1,023
py
Python
Alternate implementation/vran.py
ashtedroid/Test-Cases-Prioritization-and-Analysis
70a6997f3764ea39c51fdc8cd6806e430088f8a7
[ "MIT" ]
1
2020-04-24T08:08:49.000Z
2020-04-24T08:08:49.000Z
Alternate implementation/vran.py
ashtedroid/Test-Cases-Prioritization-and-Analysis
70a6997f3764ea39c51fdc8cd6806e430088f8a7
[ "MIT" ]
null
null
null
Alternate implementation/vran.py
ashtedroid/Test-Cases-Prioritization-and-Analysis
70a6997f3764ea39c51fdc8cd6806e430088f8a7
[ "MIT" ]
null
null
null
''' ================================================================= @version 2.0 @author Ashwin Ramadevanahalli @title Testing. Random Priorization module. ================================================================= ''' import random import vec_manipulation import sys def pri(rrlist,location,p...
17.947368
92
0.57087
''' ================================================================= @version 2.0 @author Ashwin Ramadevanahalli @title Testing. Random Priorization module. ================================================================= ''' import random import vec_manipulation import sys def pri(rrlist,location,p...
false
true
f7f37745e718e98930284dc6fa7dcd22548b60bd
3,235
py
Python
basic/list1.py
mbradaschia/wttd-exercises-mod-01
0de943723a36ffe9fee99da501de238651ae3dd1
[ "Apache-2.0" ]
null
null
null
basic/list1.py
mbradaschia/wttd-exercises-mod-01
0de943723a36ffe9fee99da501de238651ae3dd1
[ "Apache-2.0" ]
null
null
null
basic/list1.py
mbradaschia/wttd-exercises-mod-01
0de943723a36ffe9fee99da501de238651ae3dd1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic list exercises # Fill in the code for the functions below. main() is already set ...
32.35
79
0.58949
# http://code.google.com/edu/languages/google-python-class/ # Basic list exercises # Fill in the code for the functions below. main() is already set up # to call the functions with a few different inputs, # printing 'OK' when each function is correct. # The starter code for each function includes a 'return' # wh...
true
true
f7f378806b9819c3952db343a7d3a22e62195f17
494
py
Python
09-lambda/lab9-2-1/index.py
imbgar/stel-u
4bcfed482224230ade0cec3468da08995299cd1b
[ "MIT" ]
null
null
null
09-lambda/lab9-2-1/index.py
imbgar/stel-u
4bcfed482224230ade0cec3468da08995299cd1b
[ "MIT" ]
1
2021-05-26T20:19:08.000Z
2021-05-26T20:19:08.000Z
09-lambda/lab9-2-1/index.py
imbgar/stel-u
4bcfed482224230ade0cec3468da08995299cd1b
[ "MIT" ]
null
null
null
import json import boto3 def lambda_handler(event, context): data = json.loads(event["body"]) dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('bgar-Movies') print(f"Writing item with: {data}") response = table.put_item( Item={ 'movie_id': data["movie_id"], ...
20.583333
41
0.576923
import json import boto3 def lambda_handler(event, context): data = json.loads(event["body"]) dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('bgar-Movies') print(f"Writing item with: {data}") response = table.put_item( Item={ 'movie_id': data["movie_id"], ...
true
true
f7f378b09fc4657386907f71e68a70c7e7b888b4
728
py
Python
davaiops/routes/main.py
barretobrock/davaiops
a6ab8aff2a64c18d1ad199ed75e4de833bb19659
[ "MIT" ]
null
null
null
davaiops/routes/main.py
barretobrock/davaiops
a6ab8aff2a64c18d1ad199ed75e4de833bb19659
[ "MIT" ]
null
null
null
davaiops/routes/main.py
barretobrock/davaiops
a6ab8aff2a64c18d1ad199ed75e4de833bb19659
[ "MIT" ]
null
null
null
from flask import ( render_template, Blueprint, Response ) main = Blueprint('main', __name__) @main.route('/') @main.route('/home') def index(): return render_template('index.html') @main.route('/projects') def projects(): return render_template('projects/projects.html', title='Projects') @ma...
22.75
95
0.679945
from flask import ( render_template, Blueprint, Response ) main = Blueprint('main', __name__) @main.route('/') @main.route('/home') def index(): return render_template('index.html') @main.route('/projects') def projects(): return render_template('projects/projects.html', title='Projects') @ma...
true
true
f7f379afe54d7657538803ed559173df08e9740c
3,306
py
Python
blockbuster/workflows/command_start.py
mattstibbs/blockbuster-server
cc66278405fcb02ebf07624e70220550ef1ad13b
[ "MIT" ]
null
null
null
blockbuster/workflows/command_start.py
mattstibbs/blockbuster-server
cc66278405fcb02ebf07624e70220550ef1ad13b
[ "MIT" ]
455
2015-02-02T21:29:35.000Z
2021-08-02T05:37:49.000Z
blockbuster/workflows/command_start.py
greysteil/blockbuster-server
475aa1f6da608f12c9c05607e3f302a21a712dfd
[ "MIT" ]
2
2016-03-14T16:39:40.000Z
2018-03-08T12:03:33.000Z
import blockbuster.bb_logging as log import blockbuster.bb_dbconnector_factory from blockbuster.messaging import bb_sms_handler def go(smsrequest): instance_name = smsrequest.instancename blockbuster.bb_dbconnector_factory.DBConnectorInterfaceFactory().create()\ .add_analytics_record("Count", "Comma...
36.733333
91
0.577132
import blockbuster.bb_logging as log import blockbuster.bb_dbconnector_factory from blockbuster.messaging import bb_sms_handler def go(smsrequest): instance_name = smsrequest.instancename blockbuster.bb_dbconnector_factory.DBConnectorInterfaceFactory().create()\ .add_analytics_record("Count", "Comma...
true
true
f7f379c83fa40ccc03b9944cfb7ea25acf93529f
671
py
Python
src/compas/datastructures/network/__init__.py
kathrindoerfler/compas
e876b36b582ee055da673befca1b7ced3834090c
[ "MIT" ]
null
null
null
src/compas/datastructures/network/__init__.py
kathrindoerfler/compas
e876b36b582ee055da673befca1b7ced3834090c
[ "MIT" ]
null
null
null
src/compas/datastructures/network/__init__.py
kathrindoerfler/compas
e876b36b582ee055da673befca1b7ced3834090c
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import compas from .core import * # noqa: F401 F403 from ._network import * # noqa: F401 F403 from .combinatorics import * # noqa: F401 F403 from .complementarity import * # noqa: F401 F403 from .duality ...
27.958333
62
0.728763
from __future__ import absolute_import from __future__ import division from __future__ import print_function import compas from .core import * from ._network import * from .combinatorics import * from .complementarity import * from .duality import * from .explode import * PY: from .planarity_ import ...
true
true
f7f37aba07e61156e8ee0d5038e69672668b88fc
18,538
py
Python
data_processing/exceeding_capacity_1.py
jgerardin/covid-chicago
c2b91fdb42eece413e6fb0f6cee019357b96e00d
[ "Apache-2.0" ]
5
2020-06-01T19:36:38.000Z
2020-12-08T16:14:35.000Z
data_processing/exceeding_capacity_1.py
jgerardin/covid-chicago
c2b91fdb42eece413e6fb0f6cee019357b96e00d
[ "Apache-2.0" ]
104
2020-06-02T16:50:11.000Z
2021-06-25T10:28:32.000Z
data_processing/exceeding_capacity_1.py
jgerardin/covid-chicago
c2b91fdb42eece413e6fb0f6cee019357b96e00d
[ "Apache-2.0" ]
27
2020-06-01T19:36:45.000Z
2021-07-21T19:57:19.000Z
print('Importing packages...') import pandas as pd import matplotlib.pyplot as plt import datetime as dt import seaborn as sns import numpy as np import matplotlib.dates as mdates import datetime #sns.set(color_codes=True) import matplotlib as mpl mpl.rcParams['pdf.fonttype'] = 42 import statistics as st sns.set_style(...
52.219718
300
0.572608
print('Importing packages...') import pandas as pd import matplotlib.pyplot as plt import datetime as dt import seaborn as sns import numpy as np import matplotlib.dates as mdates import datetime import matplotlib as mpl mpl.rcParams['pdf.fonttype'] = 42 import statistics as st sns.set_style('whitegrid', {'axes.linewi...
true
true
f7f37bcdb097cb45aa9099e97ec157565b548655
584
py
Python
tests/core/request/test_request_body_urlencoded.py
ymoch/preacher
ae68170d14c72791884e91b20054bd13a79b52d0
[ "MIT" ]
3
2019-08-01T03:14:49.000Z
2020-01-31T08:55:22.000Z
tests/core/request/test_request_body_urlencoded.py
ymoch/preacher
ae68170d14c72791884e91b20054bd13a79b52d0
[ "MIT" ]
353
2019-04-14T14:53:28.000Z
2022-03-11T03:26:08.000Z
tests/core/request/test_request_body_urlencoded.py
ymoch/preacher
ae68170d14c72791884e91b20054bd13a79b52d0
[ "MIT" ]
1
2020-08-01T06:23:08.000Z
2020-08-01T06:23:08.000Z
from unittest.mock import sentinel from preacher.core.request.request_body import UrlencodedRequestBody PKG = "preacher.core.request.request_body" def test(mocker): resolve_params = mocker.patch(f"{PKG}.resolve_url_params") resolve_params.return_value = sentinel.resolved_params body = UrlencodedRequest...
30.736842
77
0.794521
from unittest.mock import sentinel from preacher.core.request.request_body import UrlencodedRequestBody PKG = "preacher.core.request.request_body" def test(mocker): resolve_params = mocker.patch(f"{PKG}.resolve_url_params") resolve_params.return_value = sentinel.resolved_params body = UrlencodedRequest...
true
true
f7f37c2c703711f06efc6918352020d1d675a36e
2,977
py
Python
ucscentralsdk/mometa/domain/DomainStorageFeature.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/domain/DomainStorageFeature.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/domain/DomainStorageFeature.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for DomainStorageFeature ManagedObject.""" from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class DomainStorageFeatureConsts(): FUNCTIONAL_STATE_DISABLED ...
53.160714
323
0.66745
from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class DomainStorageFeatureConsts(): FUNCTIONAL_STATE_DISABLED = "disabled" FUNCTIONAL_STATE_ENABLED = "enabled" TYPE_MAJOR = "major" TYPE_MIN...
true
true
f7f37c2f47e6e6bca6928d1d0a997a653728f2e1
11,159
py
Python
tests/integration/callbacks/test_basic_callback.py
iameo/dash
bc9889c0427238cececcb2acc7d67410cb1ace3c
[ "MIT" ]
null
null
null
tests/integration/callbacks/test_basic_callback.py
iameo/dash
bc9889c0427238cececcb2acc7d67410cb1ace3c
[ "MIT" ]
null
null
null
tests/integration/callbacks/test_basic_callback.py
iameo/dash
bc9889c0427238cececcb2acc7d67410cb1ace3c
[ "MIT" ]
null
null
null
import json from multiprocessing import Value import pytest import dash_core_components as dcc import dash_html_components as html import dash_table import dash from dash.dependencies import Input, Output, State from dash.exceptions import PreventUpdate def test_cbsc001_simple_callback(dash_duo): app = dash.Das...
32.344928
88
0.58473
import json from multiprocessing import Value import pytest import dash_core_components as dcc import dash_html_components as html import dash_table import dash from dash.dependencies import Input, Output, State from dash.exceptions import PreventUpdate def test_cbsc001_simple_callback(dash_duo): app = dash.Das...
true
true
f7f37e26a4abbadcdf75458a769e83313a462957
315
py
Python
backend/app/model/__init__.py
bbruceyuan/easy-blog
742bd8d0c8f3d8af793c4e8f531daad410a46151
[ "MIT" ]
1
2018-08-01T10:51:54.000Z
2018-08-01T10:51:54.000Z
backend/app/model/__init__.py
hey-bruce/easy_blog
742bd8d0c8f3d8af793c4e8f531daad410a46151
[ "MIT" ]
1
2019-07-20T07:14:25.000Z
2019-07-20T07:14:25.000Z
backend/app/model/__init__.py
bbruceyuan/easy-blog
742bd8d0c8f3d8af793c4e8f531daad410a46151
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Created by BBruceyuan on 18-7-5. from .user import User from .post import Post from .tag import Tag, TagUtil from .category import Category, CategoryUtil from .comment import Comment from .tag_post_relation import tag_post_relation from .category_post_relation import category_post_relation
31.5
58
0.822222
from .user import User from .post import Post from .tag import Tag, TagUtil from .category import Category, CategoryUtil from .comment import Comment from .tag_post_relation import tag_post_relation from .category_post_relation import category_post_relation
true
true
f7f37ec2387430bab8e02819fc60b64eedd5bf5a
109,667
py
Python
tensorflow/python/keras/engine/base_layer.py
faustomorales/tensorflow
63b84e3b732f050e53902481fa8cb02791a5d789
[ "Apache-2.0" ]
2
2020-01-13T11:41:38.000Z
2020-01-14T16:43:23.000Z
tensorflow/python/keras/engine/base_layer.py
faustomorales/tensorflow
63b84e3b732f050e53902481fa8cb02791a5d789
[ "Apache-2.0" ]
1
2022-02-10T00:32:22.000Z
2022-02-10T00:32:22.000Z
tensorflow/python/keras/engine/base_layer.py
faustomorales/tensorflow
63b84e3b732f050e53902481fa8cb02791a5d789
[ "Apache-2.0" ]
2
2020-01-16T12:41:10.000Z
2020-01-16T12:42:02.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.200513
111
0.680369
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import functools import itertools import threading import numpy as np from six.moves import zip from google.protobuf import json_format from tensorflow.core.framework impor...
true
true
f7f37f964d91421f28dc708531732d6d685b7822
6,015
py
Python
env/lib/python3.8/site-packages/ask_sdk_model/interfaces/display/template.py
adamash99/alexa-play-pot-of-greed
dc2d18dae55692a4bf1becb72685a5777870c643
[ "MIT" ]
90
2018-09-19T21:56:42.000Z
2022-03-30T11:25:21.000Z
ask-sdk-model/ask_sdk_model/interfaces/display/template.py
ishitaojha/alexa-apis-for-python
a68f94b7a0e41f819595d6fe56e800403e8a4194
[ "Apache-2.0" ]
11
2018-09-23T12:16:48.000Z
2021-06-10T19:49:45.000Z
ask-sdk-model/ask_sdk_model/interfaces/display/template.py
ishitaojha/alexa-apis-for-python
a68f94b7a0e41f819595d6fe56e800403e8a4194
[ "Apache-2.0" ]
28
2018-09-19T22:30:38.000Z
2022-02-22T22:57:07.000Z
# coding: utf-8 # # Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "lice...
36.676829
119
0.644389
import pprint import re import six import typing from enum import Enum from abc import ABCMeta, abstractmethod if typing.TYPE_CHECKING: from typing import Dict, List, Optional, Union, Any from datetime import datetime from ask_sdk_model.interfaces.display.back_button_behavior import BackB...
true
true
f7f37f9a9e15b732dceb3f4dca28437b6f6a15fd
13,167
py
Python
tests/security/signer_test.py
Kjwon15/python-ndn
4d1c827958bce1caeacc16f72a47ee8c90db1d6e
[ "Apache-2.0" ]
null
null
null
tests/security/signer_test.py
Kjwon15/python-ndn
4d1c827958bce1caeacc16f72a47ee8c90db1d6e
[ "Apache-2.0" ]
null
null
null
tests/security/signer_test.py
Kjwon15/python-ndn
4d1c827958bce1caeacc16f72a47ee8c90db1d6e
[ "Apache-2.0" ]
null
null
null
# ----------------------------------------------------------------------------- # Copyright (C) 2019-2020 Xinyu Ma # # This file is part of python-ndn. # # 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 Li...
73.558659
107
0.609934
from Cryptodome.Util.asn1 import DerSequence from Cryptodome.Hash import SHA256 from Cryptodome.PublicKey import ECC from Cryptodome.Signature import DSS from ndn.encoding import make_data, MetaInfo, parse_data from ndn.security import Sha256WithEcdsaSigner, Sha256WithRsaSigner, HmacSha256Signer clas...
true
true
f7f37fd7a132f846c29a5d13353c433dcb90f804
2,072
py
Python
test/python/test_tanhgrad.py
conradjones/ngraph-bridge
042011e6653b3ac0983511cf6604f9881cc6ee4b
[ "Apache-2.0" ]
null
null
null
test/python/test_tanhgrad.py
conradjones/ngraph-bridge
042011e6653b3ac0983511cf6604f9881cc6ee4b
[ "Apache-2.0" ]
null
null
null
test/python/test_tanhgrad.py
conradjones/ngraph-bridge
042011e6653b3ac0983511cf6604f9881cc6ee4b
[ "Apache-2.0" ]
null
null
null
# ============================================================================== # Copyright 2018-2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://ww...
33.967213
80
0.644305
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pytest import numpy as np import tensorflow as tf from tensorflow.python.framework import constant_op from tensorflow.python.ops.gen_math_ops import tanh_grad from common import NgraphTes...
true
true
f7f37ff82b14e5be3d7536b6115bff351b518400
1,230
py
Python
src/RetroInteractive.py
stevenwalton/Retro-Learner
74586c57b5dd5f6e82abaff99344285731f1fc56
[ "MIT" ]
null
null
null
src/RetroInteractive.py
stevenwalton/Retro-Learner
74586c57b5dd5f6e82abaff99344285731f1fc56
[ "MIT" ]
null
null
null
src/RetroInteractive.py
stevenwalton/Retro-Learner
74586c57b5dd5f6e82abaff99344285731f1fc56
[ "MIT" ]
null
null
null
import retro import gym import Interactive as I import pyglet from pyglet import gl from pyglet.window import key as keycodes class RetroInteractive(I.Interactive): ''' interactive setup for retro games ''' def __init__(self, game, state, scenario): env = retro.make(game=game, state=state, sce...
25.625
71
0.504878
import retro import gym import Interactive as I import pyglet from pyglet import gl from pyglet.window import key as keycodes class RetroInteractive(I.Interactive): def __init__(self, game, state, scenario): env = retro.make(game=game, state=state, scenario=scenario) self.buttons = env.buttons ...
true
true
f7f3809407cf79c3ec53b2e88ad04eb5ae64ae1b
1,551
py
Python
tests/activityinst/test_transitioninstance.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
tests/activityinst/test_transitioninstance.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
tests/activityinst/test_transitioninstance.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest.mock import pytest import pycamunda.activityinst import pycamunda.incident INCIDENT_TYPE_COUNT = pycamunda.incident.IncidentTypeCount( incident_type=pycamunda.incident.IncidentType.failed_job, incident_count=1 ) @unittest.mock.patch( 'pycamunda.incident.Inciden...
37.829268
95
0.796905
import unittest.mock import pytest import pycamunda.activityinst import pycamunda.incident INCIDENT_TYPE_COUNT = pycamunda.incident.IncidentTypeCount( incident_type=pycamunda.incident.IncidentType.failed_job, incident_count=1 ) @unittest.mock.patch( 'pycamunda.incident.IncidentTypeCount.load', l...
true
true
f7f381b1782abf1c0a2a027d91e4c5a8e64080f7
3,561
py
Python
L2J_DataPack/data/scripts/quests/152_ShardsOfGolem/__init__.py
Vladislav-Zolotaryov/L2J_Levelless_Custom
fb9fd3d22209679258cddc60cec104d740f13b8c
[ "MIT" ]
null
null
null
L2J_DataPack/data/scripts/quests/152_ShardsOfGolem/__init__.py
Vladislav-Zolotaryov/L2J_Levelless_Custom
fb9fd3d22209679258cddc60cec104d740f13b8c
[ "MIT" ]
null
null
null
L2J_DataPack/data/scripts/quests/152_ShardsOfGolem/__init__.py
Vladislav-Zolotaryov/L2J_Levelless_Custom
fb9fd3d22209679258cddc60cec104d740f13b8c
[ "MIT" ]
null
null
null
# Made by Mr. - Version 0.2 import sys from com.l2jserver.gameserver.model.quest import State from com.l2jserver.gameserver.model.quest import QuestState from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest qn = "152_ShardsOfGolem" HARRYS_RECEIPT1_ID = 1008 HARRYS_RECEIPT2_ID = 1009 GOLEM_SHA...
32.669725
152
0.653468
import sys from com.l2jserver.gameserver.model.quest import State from com.l2jserver.gameserver.model.quest import QuestState from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest qn = "152_ShardsOfGolem" HARRYS_RECEIPT1_ID = 1008 HARRYS_RECEIPT2_ID = 1009 GOLEM_SHARD_ID = 1010 TOOL_BOX_ID = ...
true
true
f7f382d0e64ce7f422f650dac29546de1a98616b
3,948
py
Python
sdk/python/ekuiper/runtime/function.py
Swilder-M/ekuiper
514890f86f354f57952812d29632b435a80a4b0d
[ "Apache-2.0" ]
null
null
null
sdk/python/ekuiper/runtime/function.py
Swilder-M/ekuiper
514890f86f354f57952812d29632b435a80a4b0d
[ "Apache-2.0" ]
null
null
null
sdk/python/ekuiper/runtime/function.py
Swilder-M/ekuiper
514890f86f354f57952812d29632b435a80a4b0d
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 EMQ Technologies Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
35.890909
99
0.550405
import json import logging import traceback from . import reg from .connection import PairChannel from .contextimpl import ContextImpl from .symbol import SymbolRuntime from ..function import Function class FunctionRuntime(SymbolRuntime): def __init__(self, ctrl: dict, s: Function): ch = P...
true
true
f7f382dfe2c534e51164e4b6292ea3bcf72475df
3,888
py
Python
sdk/python/pulumi_openstack/compute/keypair.py
Frassle/pulumi-openstack
6fc26edd7c42e7c3d65a01cf9384148cc56466e4
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_openstack/compute/keypair.py
Frassle/pulumi-openstack
6fc26edd7c42e7c3d65a01cf9384148cc56466e4
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_openstack/compute/keypair.py
Frassle/pulumi-openstack
6fc26edd7c42e7c3d65a01cf9384148cc56466e4
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi import pulumi.runtime class Keypair(pulumi.CustomResource): """ Manages a V2 keypair resource within OpenStack. ...
40.082474
111
0.639403
import pulumi import pulumi.runtime class Keypair(pulumi.CustomResource): def __init__(__self__, __name__, __opts__=None, name=None, public_key=None, region=None, value_specs=None): if not __name__: raise TypeError('Missing resource name argument (for URN creation)') if not isinstan...
true
true
f7f383ba176078cdb8703b3c821c9201cf74c745
437
py
Python
coding/ex12-13.py
Hira63S/KnightRyder
d4b7238d8fc8dfcdfbbb9fd5d232f6273c76840e
[ "MIT" ]
1
2020-12-19T15:44:25.000Z
2020-12-19T15:44:25.000Z
coding/ex12-13.py
Hira63S/PythonPractice
5eadc04f2fb056b04db59a658d5914ea847be7d2
[ "MIT" ]
null
null
null
coding/ex12-13.py
Hira63S/PythonPractice
5eadc04f2fb056b04db59a658d5914ea847be7d2
[ "MIT" ]
null
null
null
age = input("How old are you babe?") race = input("What race are you?") identity = input("How do you identify yourself. a no:") print(f"So if you are {age} old, and you are from {race}, you identify as {identity}") from sys import argv script, first, second, third = argv print("The script is called:", script) print...
29.133333
86
0.702517
age = input("How old are you babe?") race = input("What race are you?") identity = input("How do you identify yourself. a no:") print(f"So if you are {age} old, and you are from {race}, you identify as {identity}") from sys import argv script, first, second, third = argv print("The script is called:", script) print...
true
true
f7f3854348397fc78bc156442518fd76cce148d2
20,920
py
Python
content/test/gpu/gpu_tests/webgl_conformance_integration_test.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
76
2020-09-02T03:05:41.000Z
2022-03-30T04:40:55.000Z
content/test/gpu/gpu_tests/webgl_conformance_integration_test.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
45
2020-09-02T03:21:37.000Z
2022-03-31T22:19:45.000Z
content/test/gpu/gpu_tests/webgl_conformance_integration_test.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
8
2020-07-22T18:49:18.000Z
2022-02-08T10:27:16.000Z
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function import logging import os import re import sys from gpu_tests import common_browser_args as cba from gpu_tests import ...
36.830986
80
0.663767
from __future__ import print_function import logging import os import re import sys from gpu_tests import common_browser_args as cba from gpu_tests import gpu_helper from gpu_tests import gpu_integration_test from gpu_tests import path_util from gpu_tests import webgl_test_util conformance_harness_script = r""" ...
true
true
f7f38644c50cf9d3fe8225cfecb7982366ecd8e9
7,986
py
Python
rllib/examples/serving/cartpole_server.py
linyiyue/ray
90d2456ec70270a1f894ec3ef6f3004533859e03
[ "Apache-2.0" ]
21,382
2016-09-26T23:12:52.000Z
2022-03-31T21:47:45.000Z
rllib/examples/serving/cartpole_server.py
linyiyue/ray
90d2456ec70270a1f894ec3ef6f3004533859e03
[ "Apache-2.0" ]
19,689
2016-09-17T08:21:25.000Z
2022-03-31T23:59:30.000Z
rllib/examples/serving/cartpole_server.py
gramhagen/ray
c18caa4db36d466718bdbcb2229aa0b2dc03da1f
[ "Apache-2.0" ]
4,114
2016-09-23T18:54:01.000Z
2022-03-31T15:07:32.000Z
#!/usr/bin/env python """ Example of running an RLlib policy server, allowing connections from external environment running clients. The server listens on (a simple CartPole env in this case) against an RLlib policy server listening on one or more HTTP-speaking ports. See `cartpole_client.py` in this same directory for...
34.422414
79
0.628475
import argparse import gym import os import ray from ray import tune from ray.rllib.agents.dqn import DQNTrainer from ray.rllib.agents.ppo import PPOTrainer from ray.rllib.env.policy_server_input import PolicyServerInput from ray.rllib.examples.custom_metrics_and_callbacks import MyCallbacks from ray.tune.logger imp...
true
true
f7f386c2f1e4e83cee0938597c36c1180de0a8d2
2,885
py
Python
sas/operators.py
yijiangh/pyplanners
ef1ae33e233f20cd93ce03cba363b0f14fd078bc
[ "MIT" ]
23
2017-11-13T23:56:25.000Z
2022-02-12T08:56:28.000Z
sas/operators.py
yijiangh/pyplanners
ef1ae33e233f20cd93ce03cba363b0f14fd078bc
[ "MIT" ]
1
2022-01-04T17:07:47.000Z
2022-01-04T17:07:47.000Z
sas/operators.py
yijiangh/pyplanners
ef1ae33e233f20cd93ce03cba363b0f14fd078bc
[ "MIT" ]
6
2017-07-13T07:21:13.000Z
2022-03-25T08:21:57.000Z
from .states import * class Operator(PartialState): def __init__(self, args): for k, v in args.items(): setattr(self, k, v) self.args = args # TODO - use FrozenDict instead self._frozen_args = frozenset(args.items()) self._hash = None self.conditions = None self.effects = None sel...
32.784091
122
0.652686
from .states import * class Operator(PartialState): def __init__(self, args): for k, v in args.items(): setattr(self, k, v) self.args = args self._frozen_args = frozenset(args.items()) self._hash = None self.conditions = None self.effects = None self.test = lambda state: True d...
true
true