hexsha
stringlengths
40
40
size
int64
10
805k
ext
stringclasses
6 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
176
max_stars_repo_name
stringlengths
7
114
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
176
max_issues_repo_name
stringlengths
7
114
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
48.5k
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
176
max_forks_repo_name
stringlengths
7
114
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
10
805k
avg_line_length
float64
5.53
11k
max_line_length
int64
10
129k
alphanum_fraction
float64
0.13
0.93
content_no_comment
stringlengths
0
449k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f70326ca696e1c05be0940e1d778d0eb50c76934
10,074
py
Python
spreadsheet.py
rohanuttamsingh/ScoutingSheetInitializer
acf1c01617796450fd58f29fbb0e67ae2a977002
[ "MIT" ]
null
null
null
spreadsheet.py
rohanuttamsingh/ScoutingSheetInitializer
acf1c01617796450fd58f29fbb0e67ae2a977002
[ "MIT" ]
null
null
null
spreadsheet.py
rohanuttamsingh/ScoutingSheetInitializer
acf1c01617796450fd58f29fbb0e67ae2a977002
[ "MIT" ]
null
null
null
import json from time import sleep import gspread import requests from gspread_formatting import * from oauth2client.service_account import ServiceAccountCredentials class Spreadsheet: # comment out all but one of these depending on which spreadsheet being used # URL = 'https://docs.google.com/spreadsheets/...
43.8
160
0.655847
import json from time import sleep import gspread import requests from gspread_formatting import * from oauth2client.service_account import ServiceAccountCredentials class Spreadsheet: pe) client = gspread.authorize(creds) sheet = client.open_by_url(URL) key_worksheet = sheet.wo...
true
true
f7032731d7e241881607e9839492fa621aefb0c9
10,129
py
Python
app/fedcv/medical_chest_xray_image_clf/data/chexpert/data_loader.py
ray-ruisun/FedML
24ff30d636bb70f64e94e9ca205375033597d3dd
[ "Apache-2.0" ]
null
null
null
app/fedcv/medical_chest_xray_image_clf/data/chexpert/data_loader.py
ray-ruisun/FedML
24ff30d636bb70f64e94e9ca205375033597d3dd
[ "Apache-2.0" ]
null
null
null
app/fedcv/medical_chest_xray_image_clf/data/chexpert/data_loader.py
ray-ruisun/FedML
24ff30d636bb70f64e94e9ca205375033597d3dd
[ "Apache-2.0" ]
null
null
null
import logging import os import numpy as np import torch from torch.utils.data import Dataset, DataLoader import torchvision.transforms as transforms from torch.utils.data.distributed import DistributedSampler from .dataset import CheXpert def _get_mean_and_std(dataset: Dataset): """Compute the mean and std of ...
30.601208
118
0.654852
import logging import os import numpy as np import torch from torch.utils.data import Dataset, DataLoader import torchvision.transforms as transforms from torch.utils.data.distributed import DistributedSampler from .dataset import CheXpert def _get_mean_and_std(dataset: Dataset): data_loader = DataLoader(datase...
true
true
f70327b5c57e7952effeec7cc8716fd76dd00bd0
22,049
py
Python
paramak/reactor.py
openmcworkshop/paramak
c41dc4c2e68183869556544ee7a72deb1d16a8dc
[ "MIT" ]
1
2020-11-25T10:46:32.000Z
2020-11-25T10:46:32.000Z
paramak/reactor.py
openmcworkshop/paramak
c41dc4c2e68183869556544ee7a72deb1d16a8dc
[ "MIT" ]
null
null
null
paramak/reactor.py
openmcworkshop/paramak
c41dc4c2e68183869556544ee7a72deb1d16a8dc
[ "MIT" ]
null
null
null
import json from collections import Iterable from pathlib import Path import cadquery as cq import matplotlib.pyplot as plt import plotly.graph_objects as go from cadquery import exporters import paramak from paramak.neutronics_utils import (add_stl_to_moab_core, define_moab_cor...
35.448553
80
0.612318
import json from collections import Iterable from pathlib import Path import cadquery as cq import matplotlib.pyplot as plt import plotly.graph_objects as go from cadquery import exporters import paramak from paramak.neutronics_utils import (add_stl_to_moab_core, define_moab_cor...
true
true
f70327c1e525eeac2a08ebfff0787c591e507497
2,327
py
Python
ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive_service.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive_service.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive_service.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2 """ 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"); yo...
40.824561
247
0.728406
from resource_management import * def hive_service( name, action='start'): import params if name == 'metastore': pid_file = format("{hive_pid_dir}/{hive_metastore_pid}") cmd = format( "env HADOOP_HOME={hadoop_home} JAVA_HOME={java64_home} {start_metastore_path} {hive_log_dir}/hive.out {h...
true
true
f70327e26d7f220656e09d04aed22ba77da630b5
23,857
py
Python
pwnlib/log.py
Magic-King/pwntools
4e7355202df6d83edc2d388b9a936c3c38ea1e8a
[ "MIT" ]
10
2021-02-04T15:09:22.000Z
2021-03-02T19:50:58.000Z
pwnlib/log.py
Magic-King/pwntools
4e7355202df6d83edc2d388b9a936c3c38ea1e8a
[ "MIT" ]
null
null
null
pwnlib/log.py
Magic-King/pwntools
4e7355202df6d83edc2d388b9a936c3c38ea1e8a
[ "MIT" ]
2
2015-05-28T09:13:23.000Z
2016-08-31T06:43:30.000Z
""" Logging module for printing status during an exploit, and internally within ``pwntools``. Exploit Developers ------------------ By using the standard ``from pwn import *``, an object named ``log`` will be inserted into the global namespace. You can use this to print out status messages during exploitation. For e...
34.726346
92
0.635746
from __future__ import absolute_import from __future__ import division import logging import os import random import re import six import sys import threading import time from pwnlib import term from pwnlib.config import register_config from pwnlib.context import Thread from pwnlib.context import context from pwnlib....
true
true
f703287577524da6d03be806c4b05b4d0149cfad
2,602
py
Python
src/tools.py
JoaoCarabetta/brasilio-package
5004a87e6d98b7f07b31d358ef44346b3570c27b
[ "MIT" ]
null
null
null
src/tools.py
JoaoCarabetta/brasilio-package
5004a87e6d98b7f07b31d358ef44346b3570c27b
[ "MIT" ]
4
2018-06-22T23:15:47.000Z
2018-06-25T04:59:10.000Z
src/tools.py
JoaoCarabetta/brasilio-package
5004a87e6d98b7f07b31d358ef44346b3570c27b
[ "MIT" ]
1
2018-06-22T23:04:51.000Z
2018-06-22T23:04:51.000Z
import rows import os from timeit import default_timer import json output_path = '../package/data/' class Brasilio(object): def __init__(self, output_path='../package/data/', verbose=False): self.verbose = verbose self.output_path = output_path self.timer = default_timer def _...
27.978495
95
0.568793
import rows import os from timeit import default_timer import json output_path = '../package/data/' class Brasilio(object): def __init__(self, output_path='../package/data/', verbose=False): self.verbose = verbose self.output_path = output_path self.timer = default_timer def _...
true
true
f70328c20a055ff6504e882b8c3d6f98fe0c019f
1,301
py
Python
scripts/git-precommit-hook.py
AWSNB/relay
3d7b69204fdfc34e1020f2b072961061b91a691a
[ "BSL-1.0" ]
null
null
null
scripts/git-precommit-hook.py
AWSNB/relay
3d7b69204fdfc34e1020f2b072961061b91a691a
[ "BSL-1.0" ]
null
null
null
scripts/git-precommit-hook.py
AWSNB/relay
3d7b69204fdfc34e1020f2b072961061b91a691a
[ "BSL-1.0" ]
null
null
null
#!/usr/bin/env python3 import os import pathlib import sys import subprocess def has_cargo_fmt(): """Runs a quick check to see if cargo fmt is installed.""" try: c = subprocess.run(["cargo", "fmt", "--", "--help"], capture_output=True) except OSError: return False else: return ...
25.019231
85
0.590315
import os import pathlib import sys import subprocess def has_cargo_fmt(): try: c = subprocess.run(["cargo", "fmt", "--", "--help"], capture_output=True) except OSError: return False else: return c.returncode == 0 def get_modified_files(): c = subprocess.run( ["git",...
true
true
f7032a385a92af39ff4e03fa94030ff64c7a226d
1,146
py
Python
check_mpi.py
jjmaldonis/mpi-parallelization
4cc2ab1e6929352073cafb83b1cb0ea990acff15
[ "MIT" ]
16
2017-06-07T07:14:58.000Z
2021-11-15T06:35:58.000Z
check_mpi.py
jjmaldonis/mpi-parallelization
4cc2ab1e6929352073cafb83b1cb0ea990acff15
[ "MIT" ]
1
2021-03-21T07:06:24.000Z
2021-03-21T15:33:24.000Z
check_mpi.py
jjmaldonis/mpi-parallelization
4cc2ab1e6929352073cafb83b1cb0ea990acff15
[ "MIT" ]
1
2020-09-14T04:29:31.000Z
2020-09-14T04:29:31.000Z
import os import distutils.spawn import mpi4py from mpi4py import MPI def check_mpi(): mpiexec_path, _ = os.path.split(distutils.spawn.find_executable("mpiexec")) for executable, path in mpi4py.get_config().items(): if executable not in ['mpicc', 'mpicxx', 'mpif77', 'mpif90', 'mpifort']: co...
57.3
277
0.719023
import os import distutils.spawn import mpi4py from mpi4py import MPI def check_mpi(): mpiexec_path, _ = os.path.split(distutils.spawn.find_executable("mpiexec")) for executable, path in mpi4py.get_config().items(): if executable not in ['mpicc', 'mpicxx', 'mpif77', 'mpif90', 'mpifort']: co...
true
true
f7032b5bb12dc99e7462909296f8c4084c40396f
903
py
Python
streaming_helpers.py
jaycosaur/spynet
535841bcea761463d27f7f3eb745ffe186d9f763
[ "MIT" ]
2
2020-08-13T05:51:15.000Z
2020-09-14T08:08:59.000Z
streaming_helpers.py
jaycosaur/distributed-vision-networking
9534202b5f0748dc181d6716ba96abd73aa9727d
[ "MIT" ]
5
2021-03-10T12:50:12.000Z
2022-02-27T02:18:33.000Z
streaming_helpers.py
jaycosaur/spynet
535841bcea761463d27f7f3eb745ffe186d9f763
[ "MIT" ]
null
null
null
import queue import time import numpy as np class CameraInformation: def __init__(self, cam_id: str): self._frame_queue: queue.Queue = queue.Queue(maxsize=1) self._frame_shape = None self._last_frame_time = None self.is_online = True self.node_id = cam_id def write_fra...
27.363636
63
0.594684
import queue import time import numpy as np class CameraInformation: def __init__(self, cam_id: str): self._frame_queue: queue.Queue = queue.Queue(maxsize=1) self._frame_shape = None self._last_frame_time = None self.is_online = True self.node_id = cam_id def write_fra...
true
true
f7032cb6248d072f5e1d20fee17d63cd87896599
1,733
py
Python
nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py
vferat/nipype
536c57da150d157dcb5c121af43aaeab71cdbd5f
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py
vferat/nipype
536c57da150d157dcb5c121af43aaeab71cdbd5f
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py
vferat/nipype
536c57da150d157dcb5c121af43aaeab71cdbd5f
[ "Apache-2.0" ]
null
null
null
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..utils import Generate5tt def test_Generate5tt_inputs(): input_map = dict( algorithm=dict( argstr='%s', mandatory=True, position=-3, ), args=dict(argstr='...
27.951613
67
0.524524
from __future__ import unicode_literals from ..utils import Generate5tt def test_Generate5tt_inputs(): input_map = dict( algorithm=dict( argstr='%s', mandatory=True, position=-3, ), args=dict(argstr='%s', ), bval_scale=dict(argstr='-bvalue_scali...
true
true
f7032cee21098d6fc2a0ddeeff88cf6cdfc6fbf1
958
py
Python
setup.py
SaladDais/Impasse
3f8971ac533c59a3dce7802ecf673daeeec4e0fd
[ "BSD-3-Clause" ]
2
2021-07-07T08:22:46.000Z
2021-12-27T23:51:44.000Z
setup.py
SaladDais/Impasse
3f8971ac533c59a3dce7802ecf673daeeec4e0fd
[ "BSD-3-Clause" ]
6
2021-07-06T05:47:00.000Z
2021-07-11T15:04:14.000Z
setup.py
SaladDais/Impasse
3f8971ac533c59a3dce7802ecf673daeeec4e0fd
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from setuptools import setup def readme(): with open('README.md') as f: return f.read() setup( name='impasse', # Version chosen for parity with Assimp since we need ABI compatibility version='5.0.6', license='BSD', description='Alternate Python bindings for the...
26.611111
87
0.638831
from setuptools import setup def readme(): with open('README.md') as f: return f.read() setup( name='impasse', version='5.0.6', license='BSD', description='Alternate Python bindings for the Open Asset Import Library (ASSIMP)', long_description=readme(), long_description_co...
true
true
f7032dda39d019d042d83b0dcb8d9588c22ca8d2
7,060
py
Python
tests/extension/thread_/stream_graph_substream/thread_stream_graph_substream.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
null
null
null
tests/extension/thread_/stream_graph_substream/thread_stream_graph_substream.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
null
null
null
tests/extension/thread_/stream_graph_substream/thread_stream_graph_substream.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function import sys import os # the next line can be removed after installation sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))) from veriloggen import * import ve...
28.015873
87
0.583711
from __future__ import absolute_import from __future__ import print_function import sys import os sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))) from veriloggen import * import veriloggen.thread as vthread import veriloggen.type...
true
true
f7032de78fdbf6c462f5e261e42160b48beac9e7
5,556
py
Python
tests/test_numbits.py
WEBZCC/coveragepy
e4f0f9ee71a1ade66b51ec53d0061f462e3838cb
[ "Apache-2.0" ]
2,254
2015-01-05T01:28:03.000Z
2022-03-29T10:37:10.000Z
tests/test_numbits.py
mgorny/coveragepy
73ca4596fc8eed9c76714e7a5c80dd61d71fe1b1
[ "Apache-2.0" ]
707
2015-02-07T01:32:02.000Z
2022-03-31T18:00:14.000Z
tests/test_numbits.py
sitedata/coveragepy
e4f0f9ee71a1ade66b51ec53d0061f462e3838cb
[ "Apache-2.0" ]
439
2015-01-16T15:06:08.000Z
2022-03-30T06:19:12.000Z
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Tests for coverage.numbits""" import json import sqlite3 from hypothesis import example, given, settings from hypothesis.strategies import sets, integers from...
34.08589
97
0.633369
import json import sqlite3 from hypothesis import example, given, settings from hypothesis.strategies import sets, integers from coverage import env from coverage.numbits import ( nums_to_numbits, numbits_to_nums, numbits_union, numbits_intersection, numbits_any_intersection, num_in_numbits, register_sqli...
true
true
f7032e464938cec9d9e23b8417b9949012af2160
29,619
py
Python
selfdrive/controls/controlsd.py
sky84ky/forEQ
ecad25c3e8a7fda378e867d067d49eb06ecd2092
[ "MIT" ]
null
null
null
selfdrive/controls/controlsd.py
sky84ky/forEQ
ecad25c3e8a7fda378e867d067d49eb06ecd2092
[ "MIT" ]
null
null
null
selfdrive/controls/controlsd.py
sky84ky/forEQ
ecad25c3e8a7fda378e867d067d49eb06ecd2092
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import math from cereal import car, log from common.numpy_fast import clip, interp from common.realtime import sec_since_boot, config_realtime_process, Priority, Ratekeeper, DT_CTRL from common.profiler import Profiler from common.params import Params, put_nonblocking import cereal.mess...
42.252496
175
0.710389
import os import math from cereal import car, log from common.numpy_fast import clip, interp from common.realtime import sec_since_boot, config_realtime_process, Priority, Ratekeeper, DT_CTRL from common.profiler import Profiler from common.params import Params, put_nonblocking import cereal.messaging as messaging fro...
true
true
f70332380c19749fdaaa89b3db41948706f18fba
228
py
Python
main.py
ConnorDoesDev/cozmo
dc2e4574d056b6e61e1e7042c3b32d7e0d00f055
[ "CC0-1.0" ]
null
null
null
main.py
ConnorDoesDev/cozmo
dc2e4574d056b6e61e1e7042c3b32d7e0d00f055
[ "CC0-1.0" ]
null
null
null
main.py
ConnorDoesDev/cozmo
dc2e4574d056b6e61e1e7042c3b32d7e0d00f055
[ "CC0-1.0" ]
null
null
null
import cozmo name = input("What is your name? ") def cozmo_program(robot: cozmo.robot.Robot): robot.say_text( f"Hi! My name is Cozmo. How are you, {name}?").wait_for_completed() cozmo.run_program(cozmo_program)
19
75
0.697368
import cozmo name = input("What is your name? ") def cozmo_program(robot: cozmo.robot.Robot): robot.say_text( f"Hi! My name is Cozmo. How are you, {name}?").wait_for_completed() cozmo.run_program(cozmo_program)
true
true
f7033349b9962b4cac2915283c209a909c7aede1
2,212
py
Python
tests/test_buffer.py
recht/thriftrw-python
aad5ee4e9ca21fe59c9bea479465615ef3825dec
[ "MIT" ]
40
2016-02-18T18:01:23.000Z
2022-03-31T10:34:33.000Z
tests/test_buffer.py
recht/thriftrw-python
aad5ee4e9ca21fe59c9bea479465615ef3825dec
[ "MIT" ]
56
2016-02-10T16:51:07.000Z
2020-02-07T05:28:49.000Z
tests/test_buffer.py
recht/thriftrw-python
aad5ee4e9ca21fe59c9bea479465615ef3825dec
[ "MIT" ]
12
2016-03-29T17:29:28.000Z
2021-10-30T14:36:39.000Z
# Copyright (c) 2016 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
29.891892
79
0.726944
from __future__ import absolute_import, unicode_literals, print_function import pytest from thriftrw._buffer import ReadBuffer from thriftrw._buffer import WriteBuffer from thriftrw.errors import EndOfInputError def test_empty_write_buffer(): buff = WriteBuffer(10) assert buff.length == ...
true
true
f703347dfba74e588f8315118b141a54de310acd
44,993
py
Python
tests/integration/test_packagewagl.py
joestasks/eo-datasets
6df2fffb5a773a8c65980a8c75d22fd5bb937edc
[ "Apache-2.0" ]
null
null
null
tests/integration/test_packagewagl.py
joestasks/eo-datasets
6df2fffb5a773a8c65980a8c75d22fd5bb937edc
[ "Apache-2.0" ]
null
null
null
tests/integration/test_packagewagl.py
joestasks/eo-datasets
6df2fffb5a773a8c65980a8c75d22fd5bb937edc
[ "Apache-2.0" ]
1
2021-05-21T03:05:54.000Z
2021-05-21T03:05:54.000Z
from binascii import crc32 from contextlib import contextmanager from datetime import datetime, timedelta, timezone from pathlib import Path from osgeo import gdal import pytest import rasterio from click.testing import CliRunner from rasterio import DatasetReader from rasterio.enums import Compression from rio_cogeo ...
43.096743
110
0.510613
from binascii import crc32 from contextlib import contextmanager from datetime import datetime, timedelta, timezone from pathlib import Path from osgeo import gdal import pytest import rasterio from click.testing import CliRunner from rasterio import DatasetReader from rasterio.enums import Compression from rio_cogeo ...
true
true
f70335d255da69b8ffa2473040f343fc73572ee4
1,551
py
Python
alleco/spiders/ross_t.py
crocojim18/alleco
29d8eb5b814e48e28a794b1bb5a3db1da47b101c
[ "Apache-2.0" ]
1
2020-12-12T00:33:01.000Z
2020-12-12T00:33:01.000Z
alleco/spiders/ross_t.py
crocojim18/alleco
29d8eb5b814e48e28a794b1bb5a3db1da47b101c
[ "Apache-2.0" ]
null
null
null
alleco/spiders/ross_t.py
crocojim18/alleco
29d8eb5b814e48e28a794b1bb5a3db1da47b101c
[ "Apache-2.0" ]
null
null
null
import scrapy, re from alleco.objects.official import Official class ross_t(scrapy.Spider): name = "ross_t" muniName = "ROSS" muniType = "TOWNSHIP" complete = True def start_requests(self): urls = ['https://www.ross.pa.us/245/Board-of-Commissioners', 'https://www.ross.pa.us/225/Other-Elected-Offic...
31.02
102
0.600258
import scrapy, re from alleco.objects.official import Official class ross_t(scrapy.Spider): name = "ross_t" muniName = "ROSS" muniType = "TOWNSHIP" complete = True def start_requests(self): urls = ['https://www.ross.pa.us/245/Board-of-Commissioners', 'https://www.ross.pa.us/225/Other-Elected-Offic...
true
true
f703360b45b569aefa99c691fa9c466399212414
1,345
py
Python
PythonInterview/DesigPattern/BehaviorPattern/State.py
xtawfnhdx/PythonInterview
515675ffd86eb1ad3bfa631fd3c88fddcf411e98
[ "Apache-2.0" ]
null
null
null
PythonInterview/DesigPattern/BehaviorPattern/State.py
xtawfnhdx/PythonInterview
515675ffd86eb1ad3bfa631fd3c88fddcf411e98
[ "Apache-2.0" ]
null
null
null
PythonInterview/DesigPattern/BehaviorPattern/State.py
xtawfnhdx/PythonInterview
515675ffd86eb1ad3bfa631fd3c88fddcf411e98
[ "Apache-2.0" ]
null
null
null
""" 状态模式 """ from __future__ import annotations from abc import ABC, abstractmethod class Context: # 状态(状态模式的判断) _state: State = None def __init__(self, state: State) -> None: self.transition_to(state) def transition_to(self, state: State) -> None: # 根据不同状态,切换上下文 self._state ...
19.492754
52
0.615613
from __future__ import annotations from abc import ABC, abstractmethod class Context: _state: State = None def __init__(self, state: State) -> None: self.transition_to(state) def transition_to(self, state: State) -> None: self._state = state self._state.context = se...
true
true
f70336bae759c307733aa144b61511bf821e100a
5,125
py
Python
src/solutions/common/bizz/customer_signups.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/solutions/common/bizz/customer_signups.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/solutions/common/bizz/customer_signups.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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...
55.706522
117
0.674732
import json from mcfw.rpc import arguments, returns from rogerthat.models import Message from rogerthat.models.properties.forms import FormResult from rogerthat.rpc import users from rogerthat.service.api import messaging from rogerthat.to.messaging.forms import TextBlockFormTO, TextBlockTO, FormTO fr...
true
true
f70336d4d611fb85c2969f6bdbbb5dbe9b44613a
2,648
py
Python
data_processing/draw_value_map.py
liiliiliil/ride-hailing-platform-with-simulator
c9eae7f718c9e10c7ba4955e5093d4fb21d16d25
[ "MIT" ]
3
2020-04-29T05:42:14.000Z
2021-07-13T17:54:13.000Z
data_processing/draw_value_map.py
liiliiliil/ride-hailing-platform-with-simulator
c9eae7f718c9e10c7ba4955e5093d4fb21d16d25
[ "MIT" ]
null
null
null
data_processing/draw_value_map.py
liiliiliil/ride-hailing-platform-with-simulator
c9eae7f718c9e10c7ba4955e5093d4fb21d16d25
[ "MIT" ]
null
null
null
import os import time import pickle import math import numpy as np import linecache import matplotlib.pyplot as plt # from matplotlib.pyplot import MultipleLocator import grid data_path = 'E:/dataset/didi/processed' save_path = 'E:/dataset/didi/processed/order_20161101_sampled_value_map_fig' data_file_name = 'process...
31.52381
109
0.737915
import os import time import pickle import math import numpy as np import linecache import matplotlib.pyplot as plt import grid data_path = 'E:/dataset/didi/processed' save_path = 'E:/dataset/didi/processed/order_20161101_sampled_value_map_fig' data_file_name = 'processed_data' value_map_file_name = 'value_map' ...
true
true
f7033767526f4de70d6ab0249e98b75127d3a2b1
185
py
Python
Miscellaneous/Big Chess.py
Joon7891/Competitive-Programming
d860b7ad932cd5a6fb91fdc8c53101da57f4a408
[ "MIT" ]
2
2021-04-13T00:19:56.000Z
2021-04-13T01:19:45.000Z
Miscellaneous/Big Chess.py
Joon7891/Competitive-Programming
d860b7ad932cd5a6fb91fdc8c53101da57f4a408
[ "MIT" ]
null
null
null
Miscellaneous/Big Chess.py
Joon7891/Competitive-Programming
d860b7ad932cd5a6fb91fdc8c53101da57f4a408
[ "MIT" ]
1
2020-08-26T12:36:08.000Z
2020-08-26T12:36:08.000Z
w = int(input()) h = int(input()) for i in range(h): output = str() for j in range(w): if (i + j) % 2 == 0: output += '0' else: output += '1' print(output)
15.416667
24
0.464865
w = int(input()) h = int(input()) for i in range(h): output = str() for j in range(w): if (i + j) % 2 == 0: output += '0' else: output += '1' print(output)
true
true
f7033897e3d271067d7467fd2228b2e11a9c3210
111
py
Python
python/testData/inspections/PyCompatibilityInspection/raiseFrom.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2018-12-29T09:53:39.000Z
2018-12-29T09:53:42.000Z
python/testData/inspections/PyCompatibilityInspection/raiseFrom.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyCompatibilityInspection/raiseFrom.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
<warning descr="Python version 2.6, 2.7 do not support this syntax.">raise exception from cause</warning> a = 1
55.5
105
0.747748
<warning descr="Python version 2.6, 2.7 do not support this syntax.">raise exception from cause</warning> a = 1
false
true
f70338de0edbbe39a2087fe87b86ac520180bef2
1,652
py
Python
bridges/text.py
BridgesUNCC/bridges-python
bf1f9697a45bf6d7748f22dbbcbff4c20cfb2229
[ "MIT" ]
1
2020-09-21T15:13:27.000Z
2020-09-21T15:13:27.000Z
bridges/text.py
BridgesUNCC/bridges-python
bf1f9697a45bf6d7748f22dbbcbff4c20cfb2229
[ "MIT" ]
57
2019-07-02T21:30:28.000Z
2021-11-05T23:27:50.000Z
bridges/text.py
BridgesUNCC/bridges-python
bf1f9697a45bf6d7748f22dbbcbff4c20cfb2229
[ "MIT" ]
3
2020-03-24T16:15:20.000Z
2021-04-14T20:44:43.000Z
from bridges.symbol import * class Text(Symbol): def __init__(self, label = None): super(Text, self).__init__() if label is not None: self._text = label else: self._text = "" self.stroke_width = 1.0 self._font_size = None self._anchor_ali...
23.942029
74
0.61138
from bridges.symbol import * class Text(Symbol): def __init__(self, label = None): super(Text, self).__init__() if label is not None: self._text = label else: self._text = "" self.stroke_width = 1.0 self._font_size = None self._anchor_ali...
true
true
f70338e59ee89ab97f79697d0e146ad9d944ad81
21,739
py
Python
hgraph/decoder.py
Amir-Mehrpanah/hgraph2graph
6d37153afe09f7684381ce56e8366675e22833e9
[ "MIT" ]
182
2019-11-15T15:59:31.000Z
2022-03-31T09:17:40.000Z
hgraph/decoder.py
Amir-Mehrpanah/hgraph2graph
6d37153afe09f7684381ce56e8366675e22833e9
[ "MIT" ]
30
2020-03-03T16:35:52.000Z
2021-12-16T04:06:57.000Z
hgraph/decoder.py
Amir-Mehrpanah/hgraph2graph
6d37153afe09f7684381ce56e8366675e22833e9
[ "MIT" ]
60
2019-11-15T05:06:11.000Z
2022-03-31T16:43:12.000Z
import torch import torch.nn as nn import rdkit.Chem as Chem import torch.nn.functional as F from hgraph.nnutils import * from hgraph.encoder import IncHierMPNEncoder from hgraph.mol_graph import MolGraph from hgraph.inc_graph import IncTree, IncGraph class HTuple(): def __init__(self, node=None, mess=None, vmask=...
50.67366
161
0.613874
import torch import torch.nn as nn import rdkit.Chem as Chem import torch.nn.functional as F from hgraph.nnutils import * from hgraph.encoder import IncHierMPNEncoder from hgraph.mol_graph import MolGraph from hgraph.inc_graph import IncTree, IncGraph class HTuple(): def __init__(self, node=None, mess=None, vmask=...
true
true
f70338ff7323a5c76ee61cfe7dd8a5e65737c22d
13,064
py
Python
ml/rl/test/test_normalization.py
johncliu/Horizon
cfa7a873ada5de3bb01e78e2f237d9849b8270b2
[ "BSD-3-Clause" ]
null
null
null
ml/rl/test/test_normalization.py
johncliu/Horizon
cfa7a873ada5de3bb01e78e2f237d9849b8270b2
[ "BSD-3-Clause" ]
1
2021-08-25T16:13:32.000Z
2021-08-25T16:13:32.000Z
ml/rl/test/test_normalization.py
johncliu/Horizon
cfa7a873ada5de3bb01e78e2f237d9849b8270b2
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import unittest import numpy as np import numpy.testing as npt import six from caffe2.python import core, workspace from ml.rl.caffe_utils import C2 from ml.rl.preprocessing import identify_types, normalization from ml.rl.p...
40.44582
88
0.568739
import unittest import numpy as np import numpy.testing as npt import six from caffe2.python import core, workspace from ml.rl.caffe_utils import C2 from ml.rl.preprocessing import identify_types, normalization from ml.rl.preprocessing.identify_types import BOXCOX, CONTINUOUS, ENUM from ml.rl.preprocessing.normaliz...
true
true
f703395293ac6a585fa8603d6f52a53ad6dfb7f8
214
py
Python
speech_to_text.py
wizelab8/SmartMirror
bad186d4eceb6b6adfdcef90e7d93abfc04d9d61
[ "MIT" ]
null
null
null
speech_to_text.py
wizelab8/SmartMirror
bad186d4eceb6b6adfdcef90e7d93abfc04d9d61
[ "MIT" ]
null
null
null
speech_to_text.py
wizelab8/SmartMirror
bad186d4eceb6b6adfdcef90e7d93abfc04d9d61
[ "MIT" ]
null
null
null
import speech_recognition as sr r=sr.Recognizer() with sr.Microphone() as source: print("Say Something") sudio=r.listen(source) print("Time over") try: print("Text: "+r.recognize_google(audio)) except: pass
17.833333
42
0.733645
import speech_recognition as sr r=sr.Recognizer() with sr.Microphone() as source: print("Say Something") sudio=r.listen(source) print("Time over") try: print("Text: "+r.recognize_google(audio)) except: pass
true
true
f7033a70f3105413b45ff36d1978c4ae3751b697
110
py
Python
Scrolls/spin_box.py
hemidvsmusayev/Tkinter-learn
3d35d7fedbda92a47450b84e3896e701e95de8cf
[ "MIT" ]
1
2020-08-27T12:31:12.000Z
2020-08-27T12:31:12.000Z
Scrolls/spin_box.py
hemidvsmusayev/Tkinter-learn
3d35d7fedbda92a47450b84e3896e701e95de8cf
[ "MIT" ]
null
null
null
Scrolls/spin_box.py
hemidvsmusayev/Tkinter-learn
3d35d7fedbda92a47450b84e3896e701e95de8cf
[ "MIT" ]
null
null
null
import tkinter from tkinter import * win = Tk() sb = Spinbox(win, from_=0, to=10) sb.pack() win.mainloop()
11
33
0.672727
import tkinter from tkinter import * win = Tk() sb = Spinbox(win, from_=0, to=10) sb.pack() win.mainloop()
true
true
f7033ca4dec08844ca82210c2422ba759e6b77a2
1,026
py
Python
visual_dynamics/envs/servoing_env.py
alexlee-gk/visual_dynamics
90227bb0d0aebb1989117b5c25ca311655ca7cc7
[ "MIT" ]
30
2017-04-05T12:55:09.000Z
2022-03-14T14:31:31.000Z
visual_dynamics/envs/servoing_env.py
alexlee-gk/visual_dynamics
90227bb0d0aebb1989117b5c25ca311655ca7cc7
[ "MIT" ]
1
2017-06-19T02:39:03.000Z
2017-06-19T02:39:03.000Z
visual_dynamics/envs/servoing_env.py
alexlee-gk/visual_dynamics
90227bb0d0aebb1989117b5c25ca311655ca7cc7
[ "MIT" ]
13
2017-04-05T12:55:09.000Z
2021-03-16T01:59:12.000Z
import citysim3d.envs from visual_dynamics.envs import Env class ServoingEnv(citysim3d.envs.SimpleQuadPanda3dServoingEnv, Env): def _get_config(self): config = super(ServoingEnv, self)._get_config() config.update({'env': self.env, 'max_time_steps': self.max_time_steps, ...
35.37931
95
0.650097
import citysim3d.envs from visual_dynamics.envs import Env class ServoingEnv(citysim3d.envs.SimpleQuadPanda3dServoingEnv, Env): def _get_config(self): config = super(ServoingEnv, self)._get_config() config.update({'env': self.env, 'max_time_steps': self.max_time_steps, ...
true
true
f7033cd7e4893924e98add48a902ed4e0b88f83b
99
py
Python
mmgen/core/runners/__init__.py
HXWAndCL/mmgeneration
9afb1d740bf56a4ecde5064d5bb2a4e2d777638b
[ "Apache-2.0" ]
1
2021-05-27T13:04:41.000Z
2021-05-27T13:04:41.000Z
mmgen/core/runners/__init__.py
HXWAndCL/mmgeneration
9afb1d740bf56a4ecde5064d5bb2a4e2d777638b
[ "Apache-2.0" ]
null
null
null
mmgen/core/runners/__init__.py
HXWAndCL/mmgeneration
9afb1d740bf56a4ecde5064d5bb2a4e2d777638b
[ "Apache-2.0" ]
null
null
null
from .dynamic_iterbased_runner import DynamicIterBasedRunner __all__ = ['DynamicIterBasedRunner']
24.75
60
0.858586
from .dynamic_iterbased_runner import DynamicIterBasedRunner __all__ = ['DynamicIterBasedRunner']
true
true
f7033d3f1df341c0c9e8478d54d75955524ba2a4
3,159
py
Python
transports/africas_talking/api.py
uw-ictd/mwbase
6a46b5c5459a6bb6e1ba84ea74f689da8efe9687
[ "Apache-2.0" ]
1
2021-07-17T00:18:06.000Z
2021-07-17T00:18:06.000Z
transports/africas_talking/api.py
akettel/mwbase
873b4fe8038f16feba5273990b0eb2109f8f05c6
[ "Apache-2.0" ]
4
2017-08-31T17:09:53.000Z
2018-11-28T06:01:00.000Z
transports/africas_talking/api.py
akettel/mwbase
873b4fe8038f16feba5273990b0eb2109f8f05c6
[ "Apache-2.0" ]
2
2018-09-17T22:06:16.000Z
2021-07-17T00:18:09.000Z
#Django Imports from django.conf import settings #Python Imports import requests, os #Local Imports from .at_utils import AfricasTalkingException #Import Afica's Talking Settings AFRICAS_TALKING_SETTINGS = getattr(settings,'AFRICAS_TALKING',{}) API_KEY = AFRICAS_TALKING_SETTINGS.get('API_KEY',None) USERNAME = AFRI...
31.277228
89
0.703704
from django.conf import settings import requests, os from .at_utils import AfricasTalkingException AFRICAS_TALKING_SETTINGS = getattr(settings,'AFRICAS_TALKING',{}) API_KEY = AFRICAS_TALKING_SETTINGS.get('API_KEY',None) USERNAME = AFRICAS_TALKING_SETTINGS.get('USERNAME',None) SHORTCODE = AFRICAS_TALKING_SETTI...
true
true
f7033d4e31ab8da3329a0d30ffb3e92dfaa3387b
1,455
py
Python
third-party/paxos/.waf3-2.0.18-96675f149f50dab16c9e2e6aaf5e787b/waflib/processor.py
shenweihai1/rolis-eurosys2022
59b3fd58144496a9b13415e30b41617b34924323
[ "MIT" ]
1
2022-02-13T13:01:25.000Z
2022-02-13T13:01:25.000Z
third-party/paxos/.waf3-2.0.18-96675f149f50dab16c9e2e6aaf5e787b/waflib/processor.py
shenweihai1/rolis-eurosys2022
59b3fd58144496a9b13415e30b41617b34924323
[ "MIT" ]
null
null
null
third-party/paxos/.waf3-2.0.18-96675f149f50dab16c9e2e6aaf5e787b/waflib/processor.py
shenweihai1/rolis-eurosys2022
59b3fd58144496a9b13415e30b41617b34924323
[ "MIT" ]
null
null
null
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,sys,traceback,base64,signal try: import cPickle except ImportError: import pickle as cPickle try: import subprocess32 as subprocess except ImportError: import subprocess try: TimeoutEx...
25.086207
78
0.740893
k,base64,signal try: import cPickle except ImportError: import pickle as cPickle try: import subprocess32 as subprocess except ImportError: import subprocess try: TimeoutExpired=subprocess.TimeoutExpired except AttributeError: class TimeoutExpired(Exception): pass def run(): txt=sys.stdin.readline().strip() ...
true
true
f7033da129b07b9ecaa7a700cbea4abdb55903f6
9,717
py
Python
IPython/utils/PyColorize.py
flexlee/ipython
7528fbd76073c90262b9ac127de57c4c59b23a5c
[ "BSD-3-Clause-Clear" ]
1
2017-02-09T20:01:11.000Z
2017-02-09T20:01:11.000Z
IPython/utils/PyColorize.py
flexlee/ipython
7528fbd76073c90262b9ac127de57c4c59b23a5c
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/utils/PyColorize.py
flexlee/ipython
7528fbd76073c90262b9ac127de57c4c59b23a5c
[ "BSD-3-Clause-Clear" ]
null
null
null
# -*- coding: utf-8 -*- """ Class and program to colorize python source code for ANSI terminals. Based on an HTML code highlighter by Jurgen Hermann found at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52298 Modifications by Fernando Perez (fperez@colorado.edu). Information on the original HTML highligh...
31.244373
79
0.594731
from __future__ import print_function from __future__ import unicode_literals __all__ = ['ANSICodeColors','Parser'] _scheme_default = 'Linux' import StringIO import keyword import os import optparse import sys import token import tokenize try: generate_tokens = tokenize.generate_tokens except AttributeError...
true
true
f7033de84a70c8e86392ecb3d7d2137d33cc8e79
1,685
py
Python
duckbot/util/logger.py
NicholasMarasco/duckbot
4aec17ddb426094229d0ea006520d82a1fc8a057
[ "MIT" ]
4
2018-06-15T18:29:15.000Z
2019-09-12T00:24:57.000Z
duckbot/util/logger.py
NicholasMarasco/duckbot
4aec17ddb426094229d0ea006520d82a1fc8a057
[ "MIT" ]
40
2018-04-26T18:43:52.000Z
2021-06-01T21:55:32.000Z
duckbot/util/logger.py
NicholasMarasco/duckbot
4aec17ddb426094229d0ea006520d82a1fc8a057
[ "MIT" ]
null
null
null
# Last Updated: 2.2 from datetime import datetime from util.diagMessage import DiagMessage # Logger class # Buffers and writes messages to a file class Logger: BUFFER_MAX = 10 DEFAULT_FN = "../log.txt" # Constructor for logger class # Params: fn - file name to use or leave default # log -...
30.636364
74
0.554896
from datetime import datetime from util.diagMessage import DiagMessage class Logger: BUFFER_MAX = 10 DEFAULT_FN = "../log.txt" def __init__(self, fn = DEFAULT_FN, log = True): self.keep_log = log self.fn = fn self.log_buffer = [] if self.keep_log...
true
true
f7033f127c32c6571eaa25db4bd8797b56f614e4
5,418
py
Python
thimbles/metadata.py
quidditymaster/thimbles
b122654a012f0eb4f043d1ee757f884707c97615
[ "MIT" ]
null
null
null
thimbles/metadata.py
quidditymaster/thimbles
b122654a012f0eb4f043d1ee757f884707c97615
[ "MIT" ]
null
null
null
thimbles/metadata.py
quidditymaster/thimbles
b122654a012f0eb4f043d1ee757f884707c97615
[ "MIT" ]
null
null
null
# Standard Library from copy import deepcopy # 3rd Party # Internal # ########################################################################### # class MetaData (dict): """ A class for holding information about an object """ def __init__ (self,*args,**kwargs): super(MetaData,self).__...
30.268156
89
0.486342
from copy import deepcopy pass return obs_time def guess_airmass(self, headers): if headers == None: headers = self.header_list() airmass = None for hdr in headers: try: airmass = hdr["airmass"] break ...
true
true
f7033f4a9423ceac627bb81964971329e2cecd25
1,373
py
Python
cfg/dfaccto/event.py
lw0/dfaccto_lib
9162fbe0649db2d8735b7d62b92367488f4d716e
[ "MIT" ]
null
null
null
cfg/dfaccto/event.py
lw0/dfaccto_lib
9162fbe0649db2d8735b7d62b92367488f4d716e
[ "MIT" ]
null
null
null
cfg/dfaccto/event.py
lw0/dfaccto_lib
9162fbe0649db2d8735b7d62b92367488f4d716e
[ "MIT" ]
null
null
null
Inc('dfaccto/util.py', abs=True) class _Event(ModuleContext): def __init__(self): ModuleContext.__init__(self) self._setup_packages() def _setup_packages(self): self.pkg = Pkg('dfaccto_event', x_templates={self.File('generic/package.vhd.tpl'): self.File('pkg/dfaccto_event.vhd')}) with se...
32.690476
99
0.658412
Inc('dfaccto/util.py', abs=True) class _Event(ModuleContext): def __init__(self): ModuleContext.__init__(self) self._setup_packages() def _setup_packages(self): self.pkg = Pkg('dfaccto_event', x_templates={self.File('generic/package.vhd.tpl'): self.File('pkg/dfaccto_event.vhd')}) with se...
true
true
f7033f7131f37c959b46efa3f188e5997f2d6feb
13,433
py
Python
core/smplx/lbs_.py
boycehbz/DMMR
18fcee7ce584fdccfa08bcda883d9b4fcb962c04
[ "MIT" ]
37
2021-12-15T03:13:38.000Z
2022-03-31T23:01:25.000Z
core/smplx/lbs_.py
boycehbz/DMMR
18fcee7ce584fdccfa08bcda883d9b4fcb962c04
[ "MIT" ]
4
2021-12-21T19:19:25.000Z
2022-03-27T07:50:43.000Z
core/smplx/lbs_.py
boycehbz/DMMR
18fcee7ce584fdccfa08bcda883d9b4fcb962c04
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is # holder of all proprietary rights on this computer program. # You can only use this computer program if you have closed # a license agreement with MPG or you get the right to use the computer # program from someone who is...
36.207547
79
0.633812
from __future__ import absolute_import from __future__ import print_function from __future__ import division import numpy as np import torch import torch.nn.functional as F from .utils import rot_mat_to_euler def find_dynamic_lmk_idx_and_bcoords(vertices, pose, dynamic_lmk_faces_idx, ...
true
true
f7033f9a0566aab4239b64a1fc7d18e9989750b5
8,310
py
Python
foxbmsflashtool/stm32flasher.py
foxBMS/foxBMS-flashtool
1919f9742158938367d723ff25d0dc98cb13cfae
[ "CC-BY-4.0" ]
null
null
null
foxbmsflashtool/stm32flasher.py
foxBMS/foxBMS-flashtool
1919f9742158938367d723ff25d0dc98cb13cfae
[ "CC-BY-4.0" ]
null
null
null
foxbmsflashtool/stm32flasher.py
foxBMS/foxBMS-flashtool
1919f9742158938367d723ff25d0dc98cb13cfae
[ "CC-BY-4.0" ]
3
2017-08-30T05:07:16.000Z
2021-06-15T08:13:56.000Z
""" foxBMS Software License Copyright 2010-2016, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. All rights reserved. BSD 3-Clause License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ...
38.472222
114
0.644404
import stm32interface import argparse import sys import logging class STM32Flasher(stm32interface.STM32Interface): def __init__(self, port = None, file = None, baudrate=115200, address = 0x08000000, goaddress = -1, bytes = 256,**kwargs): stm32interface.STM32Interface.__init__(se...
true
true
f7033fb7efae86dad225efa7b01c333e805ff430
3,804
py
Python
covsirphy/loading/db_owid.py
ardhanii/covid19-sir
87881963c49a2fc5b6235c8b21269d216acaa941
[ "Apache-2.0" ]
97
2020-05-15T15:20:15.000Z
2022-03-18T02:55:54.000Z
covsirphy/loading/db_owid.py
ardhanii/covid19-sir
87881963c49a2fc5b6235c8b21269d216acaa941
[ "Apache-2.0" ]
970
2020-06-01T13:48:34.000Z
2022-03-29T08:20:49.000Z
covsirphy/loading/db_owid.py
ardhani31/Covid19-SIRV-v3
59d95156b375c41259c46ce4e656b86903f92ec2
[ "Apache-2.0" ]
36
2020-05-15T15:36:43.000Z
2022-02-25T17:59:08.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import country_converter as coco import pandas as pd from covsirphy.util.term import Term from covsirphy.loading.db_base import _RemoteDatabase class _OWID(_RemoteDatabase): """ Access "Our World In Data". https://github.com/owid/covid-19-data/tree/master/pub...
40.468085
113
0.608307
import country_converter as coco import pandas as pd from covsirphy.util.term import Term from covsirphy.loading.db_base import _RemoteDatabase class _OWID(_RemoteDatabase): URL_V = "https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/vaccinations/" URL_V_REC = f"{URL_V}vaccination...
true
true
f7033fc8614ebb9eb1da6160d477f4d6005965db
1,332
py
Python
examples/imlog2db.py
bemcculley/py-imlog
fb7b0665f160f9db5cd9c0bf0923bcd0700c1c0b
[ "MIT" ]
null
null
null
examples/imlog2db.py
bemcculley/py-imlog
fb7b0665f160f9db5cd9c0bf0923bcd0700c1c0b
[ "MIT" ]
null
null
null
examples/imlog2db.py
bemcculley/py-imlog
fb7b0665f160f9db5cd9c0bf0923bcd0700c1c0b
[ "MIT" ]
1
2018-02-25T00:55:31.000Z
2018-02-25T00:55:31.000Z
#!/usr/bin/env python # Quick hack to generate a sqlite db of chat logs. # Currently used like so: # find ~/Desktop/chatlogs -name "*.ichat" -exec python examples/imlog2db.py -d db.sqlite {} \; # and so on.. import sys import os sys.path.append(os.path.dirname(__file__) + '/../imlog') import re import imlog import s...
25.132075
94
0.619369
import sys import os sys.path.append(os.path.dirname(__file__) + '/../imlog') import re import imlog import sqlite3 import argparse parser = argparse.ArgumentParser() parser.add_argument('files', metavar='FILE', nargs="+") parser.add_argument("-d" , dest="db", required=True) args = parser.parse_args() def ini...
false
true
f7033ff4f37a0b03e3ac28f1687f598056116852
1,262
py
Python
cli/print_command.py
nicogno/biodynamo
f875994d4ea9aa07f938283719d5db83e450bfb8
[ "Apache-2.0" ]
null
null
null
cli/print_command.py
nicogno/biodynamo
f875994d4ea9aa07f938283719d5db83e450bfb8
[ "Apache-2.0" ]
null
null
null
cli/print_command.py
nicogno/biodynamo
f875994d4ea9aa07f938283719d5db83e450bfb8
[ "Apache-2.0" ]
null
null
null
# ----------------------------------------------------------------------------- # # Copyright (C) 2021 CERN & Newcastle University for the benefit of the # BioDynaMo collaboration. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance w...
30.047619
79
0.568146
class Print: PURPLE = '\033[95m' CYAN = '\033[96m' DARKCYAN = '\033[36m' BLUE = '\033[94m' GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' BOLD = '\033[1m' UNDERLINE = '\033[4m' END = '\033[0m' @staticmethod def success(message): print(Print...
true
true
f70340e5dc8083df42bc459ab7fb5e15fc3316ac
96,870
py
Python
theano/scalar/basic.py
colah/Theano
c0291c58b0c9a390fb1f95c97dcf69821faedfeb
[ "BSD-3-Clause" ]
1
2017-06-05T14:25:28.000Z
2017-06-05T14:25:28.000Z
theano/scalar/basic.py
colah/Theano
c0291c58b0c9a390fb1f95c97dcf69821faedfeb
[ "BSD-3-Clause" ]
null
null
null
theano/scalar/basic.py
colah/Theano
c0291c58b0c9a390fb1f95c97dcf69821faedfeb
[ "BSD-3-Clause" ]
3
2017-05-11T00:29:46.000Z
2019-10-23T22:29:36.000Z
""" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ This directory is for the internal of Theano. You are strongly advised not to use it, except if you know what you are doing! If you want to use a scalar variable in a Theano graph, you pr...
32.660148
146
0.550449
""" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ This directory is for the internal of Theano. You are strongly advised not to use it, except if you know what you are doing! If you want to use a scalar variable in a Theano graph, you pr...
false
true
f70342d9e8c689b06d4e580e179acf489a73a9f6
86,371
py
Python
flexget/tests/test_series.py
vxcamiloxv/Flexget
f18e53b59b768515d8e67464b8cc41bddfc00c33
[ "MIT" ]
null
null
null
flexget/tests/test_series.py
vxcamiloxv/Flexget
f18e53b59b768515d8e67464b8cc41bddfc00c33
[ "MIT" ]
null
null
null
flexget/tests/test_series.py
vxcamiloxv/Flexget
f18e53b59b768515d8e67464b8cc41bddfc00c33
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from io import StringIO import pytest from jinja2 import Template from flexget.entry import Entry from flexget.logger import capture_output from flexget.manager import ge...
35.764389
119
0.56974
from __future__ import unicode_literals, division, absolute_import from builtins import * from io import StringIO import pytest from jinja2 import Template from flexget.entry import Entry from flexget.logger import capture_output from flexget.manager import get_parser, Session from flexget.task import TaskAbort fr...
true
true
f70343e6e7ddd0d8985779f9174451404e9e56fc
1,162
py
Python
test/moduletest/CloudTestModule.py
noralsydmp/icetea
b486cdc8e0d2211e118f1f8211aa4d284ca02422
[ "Apache-2.0" ]
6
2018-08-10T17:11:10.000Z
2020-04-29T07:05:36.000Z
test/moduletest/CloudTestModule.py
noralsydmp/icetea
b486cdc8e0d2211e118f1f8211aa4d284ca02422
[ "Apache-2.0" ]
58
2018-08-13T08:36:08.000Z
2021-07-07T08:32:52.000Z
test/moduletest/CloudTestModule.py
noralsydmp/icetea
b486cdc8e0d2211e118f1f8211aa4d284ca02422
[ "Apache-2.0" ]
7
2018-08-10T12:53:18.000Z
2021-11-08T05:15:42.000Z
#!/usr/bin/env python """ Copyright 2017 ARM Limited 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...
34.176471
100
0.729776
import mock def create(*args, **kwargs): attrs = {"client.get_suite.return_value": True, "get_campaign_id.side_effect": [True, KeyError], "get_campaigns.return_value": True, "update_testcase.return_value": True, "upload_results.side_effect": [True, False]} mock_module = mock.MagicM...
true
true
f703448814e4eb2abf9bb8db939e2be59c31a6c8
8,765
py
Python
tools/deletebyquery/deletebyquery.py
tloubrieu-jpl/incubator-sdap-nexus
5bf903f04f12eb27f25ea2aa738c617ca404a87b
[ "Apache-2.0" ]
1
2019-11-25T18:49:26.000Z
2019-11-25T18:49:26.000Z
tools/deletebyquery/deletebyquery.py
ifenty/incubator-sdap-nexus
3059c66f53d3f3d24c74d557c7632bdcc7f1eeec
[ "Apache-2.0" ]
null
null
null
tools/deletebyquery/deletebyquery.py
ifenty/incubator-sdap-nexus
3059c66f53d3f3d24c74d557c7632bdcc7f1eeec
[ "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 use ...
34.644269
129
0.625214
import argparse import json import logging import uuid from random import sample import cassandra.concurrent from cassandra.cluster import Cluster from cassandra.policies import RoundRobinPolicy, TokenAwarePolicy from solrcloudpy import SolrConnection, SearchOptions from six.moves import input solr_c...
true
true
f7034515e7982807c4d1cc43fd9bae671c33fcd0
1,080
py
Python
parse_ssdeep_output.py
tanner-g/file_attribution_script
cd9a9494c899fbaca6eac4f334b2fce98daf7d38
[ "MIT" ]
null
null
null
parse_ssdeep_output.py
tanner-g/file_attribution_script
cd9a9494c899fbaca6eac4f334b2fce98daf7d38
[ "MIT" ]
null
null
null
parse_ssdeep_output.py
tanner-g/file_attribution_script
cd9a9494c899fbaca6eac4f334b2fce98daf7d38
[ "MIT" ]
null
null
null
from decimal import * # Purpose: read in SSDEEP output and print findings. # Author: Tanner G. def main(): file = open("ssdeep_comparison", "r") # read past first line of output file.readline() filea_data = file.readline() fileb_data = file.readline() file.close() totalCount = 0 similarities = 0 index = 0 ...
25.116279
73
0.636111
from decimal import * def main(): file = open("ssdeep_comparison", "r") file.readline() filea_data = file.readline() fileb_data = file.readline() file.close() totalCount = 0 similarities = 0 index = 0 max_len = len(filea_data) while index < max_len: totalCount +=1 if filea_data[index] == "," or f...
true
true
f703451d94b6fa098060ce938c6c71ce7ce1964f
1,738
py
Python
redis-cache.py
voidabhi/python-scripts
a6d06bd3ccf4ec24df521a3cf305d22176f68a18
[ "MIT" ]
2
2015-06-01T18:33:38.000Z
2018-11-21T19:40:37.000Z
redis-cache.py
voidabhi/python-scripts
a6d06bd3ccf4ec24df521a3cf305d22176f68a18
[ "MIT" ]
102
2015-01-20T17:26:52.000Z
2017-12-28T17:32:51.000Z
redis-cache.py
voidabhi/python-scripts
a6d06bd3ccf4ec24df521a3cf305d22176f68a18
[ "MIT" ]
3
2020-03-02T06:54:18.000Z
2021-01-07T16:36:35.000Z
#!/usr/bin/env python import cPickle from functools import wraps def redis_lru(capacity=5000, slice=slice(None)): def decorator(func): cache_keys = "lru:keys:%s" % (func.__name__,) cache_vals = "lru:vals:%s" % (func.__name__,) cache_hits = "lru:hits:%s" % (func.__name__,) cache_miss = "lru:miss:%s" % (func.__...
25.558824
80
0.644419
import cPickle from functools import wraps def redis_lru(capacity=5000, slice=slice(None)): def decorator(func): cache_keys = "lru:keys:%s" % (func.__name__,) cache_vals = "lru:vals:%s" % (func.__name__,) cache_hits = "lru:hits:%s" % (func.__name__,) cache_miss = "lru:miss:%s" % (func.__name__,) lvars =...
true
true
f703453f1a75155cf6aefd9737dfceaf1d6cbd6a
13,173
py
Python
meerk40t/device/moshi/moshiblob.py
aniziorodrigues/meerk40t
ca1180b690a2f25748fe04cb7fdbf270520deab9
[ "MIT" ]
null
null
null
meerk40t/device/moshi/moshiblob.py
aniziorodrigues/meerk40t
ca1180b690a2f25748fe04cb7fdbf270520deab9
[ "MIT" ]
null
null
null
meerk40t/device/moshi/moshiblob.py
aniziorodrigues/meerk40t
ca1180b690a2f25748fe04cb7fdbf270520deab9
[ "MIT" ]
null
null
null
swizzle_table = [ [ b"\x00", b"\x01", b"\x40", b"\x03", b"\x10", b"\x21", b"\x50", b"\x23", b"\x04", b"\x09", b"\x44", b"\x0b", b"\x14", b"\x29", b"\x54", b"\x2b", ], [ b"\...
22.556507
118
0.43407
swizzle_table = [ [ b"\x00", b"\x01", b"\x40", b"\x03", b"\x10", b"\x21", b"\x50", b"\x23", b"\x04", b"\x09", b"\x44", b"\x0b", b"\x14", b"\x29", b"\x54", b"\x2b", ], [ b"\...
true
true
f7034553785fcf61079064947729e6c97bd2edd5
18,406
py
Python
backend/projects/views.py
MParvin/falco
18665a89829bb4c9b5e28b98499cca378301ccf6
[ "MIT" ]
796
2019-10-19T19:58:12.000Z
2022-03-22T14:02:37.000Z
backend/projects/views.py
MParvin/falco
18665a89829bb4c9b5e28b98499cca378301ccf6
[ "MIT" ]
224
2019-10-19T17:45:12.000Z
2022-03-24T20:46:29.000Z
backend/projects/views.py
MParvin/falco
18665a89829bb4c9b5e28b98499cca378301ccf6
[ "MIT" ]
33
2019-10-22T21:17:09.000Z
2021-12-23T06:08:26.000Z
from core.models import User from django.http import HttpResponse, JsonResponse from django.shortcuts import get_object_or_404 from drf_yasg import openapi from drf_yasg.utils import swagger_auto_schema from rest_framework import permissions, status from rest_framework.decorators import api_view, permission_classes fro...
34.597744
105
0.674237
from core.models import User from django.http import HttpResponse, JsonResponse from django.shortcuts import get_object_or_404 from drf_yasg import openapi from drf_yasg.utils import swagger_auto_schema from rest_framework import permissions, status from rest_framework.decorators import api_view, permission_classes fro...
true
true
f7034669c5fd6b935341eb03811699d28d8c71fd
8,280
py
Python
praw/objector.py
nwithan8/praw
579a6685332aed9c310e34fffbf7a3ebeccd1c1d
[ "BSD-2-Clause" ]
null
null
null
praw/objector.py
nwithan8/praw
579a6685332aed9c310e34fffbf7a3ebeccd1c1d
[ "BSD-2-Clause" ]
null
null
null
praw/objector.py
nwithan8/praw
579a6685332aed9c310e34fffbf7a3ebeccd1c1d
[ "BSD-2-Clause" ]
null
null
null
"""Provides the Objector class.""" from json import loads from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union from .exceptions import ClientException, RedditAPIException from .models.reddit.base import RedditBase from .util import snake_case_keys if TYPE_CHECKING: # pragma: no cover from ... impo...
41.818182
88
0.563285
from json import loads from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union from .exceptions import ClientException, RedditAPIException from .models.reddit.base import RedditBase from .util import snake_case_keys if TYPE_CHECKING: from ... import praw class Objector: @classmethod def p...
true
true
f70346a442266f05839df1291c42a74b655fecd0
109
py
Python
altair/vega/v2/schema/__init__.py
zjffdu/altair
cd34b03ce011f16616f7c6c59a3c60436b679302
[ "BSD-3-Clause" ]
1
2021-03-10T00:36:53.000Z
2021-03-10T00:36:53.000Z
altair/vega/v2/schema/__init__.py
zjffdu/altair
cd34b03ce011f16616f7c6c59a3c60436b679302
[ "BSD-3-Clause" ]
null
null
null
altair/vega/v2/schema/__init__.py
zjffdu/altair
cd34b03ce011f16616f7c6c59a3c60436b679302
[ "BSD-3-Clause" ]
1
2017-08-23T17:52:59.000Z
2017-08-23T17:52:59.000Z
from .core import * SCHEMA_VERSION = 'v2.6.5' SCHEMA_URL = 'https://vega.github.io/schema/vega/v2.6.5.json'
21.8
61
0.706422
from .core import * SCHEMA_VERSION = 'v2.6.5' SCHEMA_URL = 'https://vega.github.io/schema/vega/v2.6.5.json'
true
true
f70347a71417cd66381de736a77b57d65bdf9ef1
1,982
py
Python
ai_inspector/io_utils.py
Giskard-AI/ai-inspector
91ccad002b5c705df8f0d0f0f633e1086591528a
[ "Apache-2.0" ]
12
2021-09-24T15:23:16.000Z
2022-03-27T20:17:33.000Z
ai_inspector/io_utils.py
Giskard-AI/ai-inspector
91ccad002b5c705df8f0d0f0f633e1086591528a
[ "Apache-2.0" ]
7
2021-09-24T10:30:45.000Z
2022-03-28T16:14:42.000Z
ai_inspector/io_utils.py
Giskard-AI/ai-inspector
91ccad002b5c705df8f0d0f0f633e1086591528a
[ "Apache-2.0" ]
1
2022-03-04T14:42:29.000Z
2022-03-04T14:42:29.000Z
"""Various input/output utility functions""" from typing import Any, Optional import os import re from io import BytesIO import cloudpickle import pandas as pd from zstandard import ZstdCompressor, ZstdDecompressor COMPRESSION_MAX_OUTPUT_SIZE = 10 ** 9 # 1GB def pickle_dumps(variable: object) -> bytes: pickl...
30.492308
99
0.676085
from typing import Any, Optional import os import re from io import BytesIO import cloudpickle import pandas as pd from zstandard import ZstdCompressor, ZstdDecompressor COMPRESSION_MAX_OUTPUT_SIZE = 10 ** 9 def pickle_dumps(variable: object) -> bytes: pickle: bytes = cloudpickle.dumps(variable) return ...
true
true
f703489e32317c8fd5bf42962ae54884a961d1d3
5,450
py
Python
spacy/tests/conftest.py
himkt/spaCy
3f2e3cbd2784ebd2c15aafd5f02830a9369ada84
[ "MIT" ]
null
null
null
spacy/tests/conftest.py
himkt/spaCy
3f2e3cbd2784ebd2c15aafd5f02830a9369ada84
[ "MIT" ]
null
null
null
spacy/tests/conftest.py
himkt/spaCy
3f2e3cbd2784ebd2c15aafd5f02830a9369ada84
[ "MIT" ]
1
2019-09-30T00:57:01.000Z
2019-09-30T00:57:01.000Z
# coding: utf-8 from __future__ import unicode_literals from io import StringIO, BytesIO from pathlib import Path import pytest from .util import load_test_model from ..tokens import Doc from ..strings import StringStore from .. import util # These languages are used for generic tokenizer tests – only add a languag...
25.707547
94
0.696881
from __future__ import unicode_literals from io import StringIO, BytesIO from pathlib import Path import pytest from .util import load_test_model from ..tokens import Doc from ..strings import StringStore from .. import util _languages = ['bn', 'da', 'de', 'en', 'es', 'fi', 'fr', 'ga', 'he', 'hu', 'id', ...
true
true
f7034933752d9c12e8bad83bf1178250a44ed9a7
810
py
Python
loss/__init__.py
lartpang/OpticalFlowBasedVOS
cd4856644b77dd963133797c543aeafb4f402217
[ "MIT" ]
6
2020-11-19T04:20:52.000Z
2021-09-24T02:40:11.000Z
loss/__init__.py
lartpang/OpticalFlowBasedVOS
cd4856644b77dd963133797c543aeafb4f402217
[ "MIT" ]
null
null
null
loss/__init__.py
lartpang/OpticalFlowBasedVOS
cd4856644b77dd963133797c543aeafb4f402217
[ "MIT" ]
2
2020-11-22T02:02:18.000Z
2021-11-14T08:56:15.000Z
from loss.BCELoss import cal_bce_loss from loss.HEL import cal_hel_loss from loss.IOULoss import cal_iou_loss, cal_weighted_iou_loss from loss.L12Loss import cal_mae_loss, cal_mse_loss from loss.SSIM import cal_ssim_loss supported_loss = dict( bce=cal_bce_loss, hel=cal_hel_loss, iou=cal_iou_loss, weigh...
30
68
0.719753
from loss.BCELoss import cal_bce_loss from loss.HEL import cal_hel_loss from loss.IOULoss import cal_iou_loss, cal_weighted_iou_loss from loss.L12Loss import cal_mae_loss, cal_mse_loss from loss.SSIM import cal_ssim_loss supported_loss = dict( bce=cal_bce_loss, hel=cal_hel_loss, iou=cal_iou_loss, weigh...
true
true
f7034a4570f202c8e19ef1cdd9a7c331fc3d1523
644
py
Python
bnu/team_201002/b.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
bnu/team_201002/b.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
bnu/team_201002/b.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 #https://codeforces.com/group/H9K9zY8tcT/contest/297258/problem/B #heap? from queue import PriorityQueue n = int(input()) g = {} c = {str(i):0 for i in range(1,n+1)} #children count for i in range(1,n+1): k = str(i) g[k] = input().split() # l[0]=weight; l[1]=no use; l[2:] parents;...
20.774194
69
0.495342
from queue import PriorityQueue n = int(input()) g = {} c = {str(i):0 for i in range(1,n+1)} for i in range(1,n+1): k = str(i) g[k] = input().split() for p in g[k][2:]: c[p] += 1 q = PriorityQueue() [q.put((int(g[k][0]),k)) for k in c if c[k]==0] m = 0 i = n-1 while not q.empty(): w...
true
true
f7034b599f605a346b03f2b00d09af42a2e9041c
191
py
Python
brats_3D_viewer/forms.py
MartinMa28/BraTS-2018-Demo
f2508a56be51fe3a1ec6c4efc345c300891fba93
[ "MIT" ]
null
null
null
brats_3D_viewer/forms.py
MartinMa28/BraTS-2018-Demo
f2508a56be51fe3a1ec6c4efc345c300891fba93
[ "MIT" ]
5
2021-03-18T22:22:18.000Z
2021-09-22T18:18:27.000Z
brats_3D_viewer/forms.py
MartinMa28/BraTS-2018-Demo
f2508a56be51fe3a1ec6c4efc345c300891fba93
[ "MIT" ]
null
null
null
from django.forms import ModelForm from .models import MRIScan class MRIScanForm(ModelForm): class Meta: model = MRIScan fields = ['case_id', 't1', 't1ce', 't2', 'flair']
27.285714
57
0.65445
from django.forms import ModelForm from .models import MRIScan class MRIScanForm(ModelForm): class Meta: model = MRIScan fields = ['case_id', 't1', 't1ce', 't2', 'flair']
true
true
f7034c0fb535b297167117fcf8d9e848802a3ac6
1,368
py
Python
task_set/tasks/fixed/fixed_text_rnn_classification_test.py
egonrian/google-research
8177adbe9ca0d7e5a9463b54581fe6dd27be0974
[ "Apache-2.0" ]
7
2020-03-15T12:14:07.000Z
2021-12-01T07:01:09.000Z
task_set/tasks/fixed/fixed_text_rnn_classification_test.py
JustinDurham/google-research
9049acf9246c1b75170f0c6757e62a8f619a9db6
[ "Apache-2.0" ]
25
2020-07-25T08:53:09.000Z
2022-03-12T00:43:02.000Z
task_set/tasks/fixed/fixed_text_rnn_classification_test.py
JustinDurham/google-research
9049acf9246c1b75170f0c6757e62a8f619a9db6
[ "Apache-2.0" ]
4
2021-02-08T10:25:45.000Z
2021-04-17T14:46:26.000Z
# coding=utf-8 # Copyright 2020 The Google Research 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 applicab...
36
95
0.794591
from absl.testing import parameterized from task_set import registry from task_set.tasks import family_test_utils from task_set.tasks.fixed import fixed_text_rnn_classification import tensorflow.compat.v1 as tf class FixedTextRNNClassificationTest(family_test_utils.SingleTaskTestCase): def test_r...
true
true
f7034c7732426e51ff6c5d5e1bc007df9ad1278f
2,954
py
Python
Air Canvas (only)/Different Canvas Codes/detect1.py
shanky1947/Air-Draw
ab370f96384414ba5c4e369f5465cd8e28b4f3f0
[ "Apache-2.0" ]
null
null
null
Air Canvas (only)/Different Canvas Codes/detect1.py
shanky1947/Air-Draw
ab370f96384414ba5c4e369f5465cd8e28b4f3f0
[ "Apache-2.0" ]
null
null
null
Air Canvas (only)/Different Canvas Codes/detect1.py
shanky1947/Air-Draw
ab370f96384414ba5c4e369f5465cd8e28b4f3f0
[ "Apache-2.0" ]
null
null
null
# get hsv values using trackbar import cv2 import numpy as np import time # A required callback method that goes into the trackbar function. def nothing(x): pass # Initializing the webcam feed. cap = cv2.VideoCapture(0) cap.set(3,1280) cap.set(4,720) # Create a window named trackbars. cv2.namedWindow("Trackbars"...
32.822222
74
0.655044
import cv2 import numpy as np import time def nothing(x): pass cap = cv2.VideoCapture(0) cap.set(3,1280) cap.set(4,720) cv2.namedWindow("Trackbars") cv2.createTrackbar("L - H", "Trackbars", 0, 179, nothing) cv2.createTrackbar("L - S", "Trackbars", 0, 255, nothing) cv2.createTrackbar("L - V", "Trackbars"...
true
true
f7034de21b1549f3d551d2ff41f194de21b6c390
12,342
py
Python
etl/parsers/etw/Microsoft_Windows_Direct3D10_1.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
104
2020-03-04T14:31:31.000Z
2022-03-28T02:59:36.000Z
etl/parsers/etw/Microsoft_Windows_Direct3D10_1.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
7
2020-04-20T09:18:39.000Z
2022-03-19T17:06:19.000Z
etl/parsers/etw/Microsoft_Windows_Direct3D10_1.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
16
2020-03-05T18:55:59.000Z
2022-03-01T10:19:28.000Z
# -*- coding: utf-8 -*- """ Microsoft-Windows-Direct3D10_1 GUID : 9b7e4c8f-342c-4106-a19f-4f2704f689f0 """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from et...
31.324873
123
0.59893
from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from etl.parsers.etw.core import Etw, declare, guid @declare(guid=guid("9b7e4c8f-342c-4106-a19f-4f2704f689f0"),...
true
true
f7034df4d5ea4a79eed5c66959b4c23a001d7b57
30,568
py
Python
python27/1.0/lib/win32/gevent/subprocess.py
jt6562/XX-Net
7b78e4820a3c78c3ba3e75b3917129d17f00e9fc
[ "BSD-2-Clause" ]
3
2018-11-25T01:09:55.000Z
2021-08-24T01:56:36.000Z
python27/1.0/lib/win32/gevent/subprocess.py
TDUncle/XX-Net
24b2af60dc0abc1c26211813064bb14c1e22bac8
[ "BSD-2-Clause" ]
null
null
null
python27/1.0/lib/win32/gevent/subprocess.py
TDUncle/XX-Net
24b2af60dc0abc1c26211813064bb14c1e22bac8
[ "BSD-2-Clause" ]
3
2018-11-09T03:38:09.000Z
2020-02-24T06:26:10.000Z
from __future__ import absolute_import import sys import os import errno import types import gc import signal import traceback from gevent.event import AsyncResult from gevent.hub import get_hub, linkproxy, sleep, getcurrent from gevent.fileobject import FileObject from gevent.greenlet import Greenlet, joinall spawn = ...
37.691739
128
0.506477
from __future__ import absolute_import import sys import os import errno import types import gc import signal import traceback from gevent.event import AsyncResult from gevent.hub import get_hub, linkproxy, sleep, getcurrent from gevent.fileobject import FileObject from gevent.greenlet import Greenlet, joinall spawn = ...
false
true
f7034fac37342e4fdf12c3f5cf813e8c085a1bd0
661
py
Python
jassen/project/blog/migrations/0002_auto_20180424_0154.py
cabilangan112/intern-blog-plus
444b01835967fd5a57cde28823cd5718ff5d6ae4
[ "MIT" ]
null
null
null
jassen/project/blog/migrations/0002_auto_20180424_0154.py
cabilangan112/intern-blog-plus
444b01835967fd5a57cde28823cd5718ff5d6ae4
[ "MIT" ]
null
null
null
jassen/project/blog/migrations/0002_auto_20180424_0154.py
cabilangan112/intern-blog-plus
444b01835967fd5a57cde28823cd5718ff5d6ae4
[ "MIT" ]
null
null
null
# Generated by Django 2.0.4 on 2018-04-24 01:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.RenameField( model_name='post', old_name='sub_Title', ...
22.793103
62
0.543116
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.RenameField( model_name='post', old_name='sub_Title', new_name='sub_title', ), migr...
true
true
f7035180b6f7bf910aba924e67a73260d56aec53
1,508
py
Python
tests/sentry/interfaces/test_template.py
ChadKillingsworth/sentry
ffcb9007a95a83ee267935fe605f8ee8f03a85a5
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/interfaces/test_template.py
ChadKillingsworth/sentry
ffcb9007a95a83ee267935fe605f8ee8f03a85a5
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/interfaces/test_template.py
ChadKillingsworth/sentry
ffcb9007a95a83ee267935fe605f8ee8f03a85a5
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from exam import fixture from sentry.interfaces.template import Template from sentry.models import Event from sentry.testutils import TestCase class TemplateTest(TestCase): @fixture def interface(self): return Template.to_p...
33.511111
85
0.69496
from __future__ import absolute_import import mock from exam import fixture from sentry.interfaces.template import Template from sentry.models import Event from sentry.testutils import TestCase class TemplateTest(TestCase): @fixture def interface(self): return Template.to_python(dict( ...
true
true
f70351a9bca5ce6c87032da6adacd41a268563bc
6,841
py
Python
test/TCTSample/tool/script/tct-testconfig/inst.xpk.py
yoowonyoung/TizenFX
8f97de5c0fea46a294d7ea810ec718ef375d2aab
[ "Apache-2.0" ]
null
null
null
test/TCTSample/tool/script/tct-testconfig/inst.xpk.py
yoowonyoung/TizenFX
8f97de5c0fea46a294d7ea810ec718ef375d2aab
[ "Apache-2.0" ]
null
null
null
test/TCTSample/tool/script/tct-testconfig/inst.xpk.py
yoowonyoung/TizenFX
8f97de5c0fea46a294d7ea810ec718ef375d2aab
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option import ConfigParser SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_...
29.487069
106
0.568484
import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option import ConfigParser SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG" t...
false
true
f70351c925858ba94b95ff42be6da2e8a34b5975
118
py
Python
dpaste/contribute.py
mozilla-it/dpaste-1
bfb5015b542dfd074a65588c29038dcb5bfeecea
[ "MIT" ]
null
null
null
dpaste/contribute.py
mozilla-it/dpaste-1
bfb5015b542dfd074a65588c29038dcb5bfeecea
[ "MIT" ]
3
2021-07-20T21:57:32.000Z
2021-07-30T15:51:49.000Z
dpaste/contribute.py
mozilla-it/pastebin
bfb5015b542dfd074a65588c29038dcb5bfeecea
[ "MIT" ]
null
null
null
from django.shortcuts import render def contrib_file(request): return render(request, "dpaste/contribute.html")
19.666667
52
0.779661
from django.shortcuts import render def contrib_file(request): return render(request, "dpaste/contribute.html")
true
true
f7035214ae296532a472484c63d4fbdfda9f742d
7,045
py
Python
src/ClientEdit.py
wendellbrito/ICS
fee28c21ac21d11a89b25efa158e1baaa9a5c54d
[ "MIT" ]
2
2020-09-12T13:14:01.000Z
2020-09-22T12:34:31.000Z
src/ClientEdit.py
wendellbrito/ICS
fee28c21ac21d11a89b25efa158e1baaa9a5c54d
[ "MIT" ]
2
2020-10-10T20:07:29.000Z
2022-03-19T23:51:42.000Z
src/ClientEdit.py
wendellbrito/ICS
fee28c21ac21d11a89b25efa158e1baaa9a5c54d
[ "MIT" ]
null
null
null
from tkinter import messagebox from ClientInsert import * class ClientEdit(ClientInsert): def __init__(self, db, id_cliente, master): super().__init__(db, master) self.title('Editar Cliente') self.__id_cliente = id_cliente self.__list = master table_cliente = db.s...
36.128205
91
0.538964
from tkinter import messagebox from ClientInsert import * class ClientEdit(ClientInsert): def __init__(self, db, id_cliente, master): super().__init__(db, master) self.title('Editar Cliente') self.__id_cliente = id_cliente self.__list = master table_cliente = db.s...
true
true
f703531b591af3d5317bed220eaa477c0403e4d5
2,576
py
Python
stock_predictions/web/template.py
abakhru/stock_prediction
bfb4483ac888bc67e2a8928fdf037d23acbf48f9
[ "MIT" ]
1
2020-07-14T09:05:56.000Z
2020-07-14T09:05:56.000Z
stock_predictions/web/template.py
abakhru/stock_prediction
bfb4483ac888bc67e2a8928fdf037d23acbf48f9
[ "MIT" ]
null
null
null
stock_predictions/web/template.py
abakhru/stock_prediction
bfb4483ac888bc67e2a8928fdf037d23acbf48f9
[ "MIT" ]
null
null
null
template = """<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.3.0/milligram.min.css"> <style> .tradingvi...
24.533333
195
0.572593
template = """<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.3.0/milligram.min.css"> <style> .tradingvi...
true
true
f7035407860da263626ea5a54711bf08f2144cde
2,342
py
Python
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/update.py
viewdy/phantomjs
eddb0db1d253fd0c546060a4555554c8ee08c13c
[ "BSD-3-Clause" ]
1
2015-05-27T13:52:20.000Z
2015-05-27T13:52:20.000Z
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/update.py
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
null
null
null
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/update.py
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
1
2017-03-19T13:03:23.000Z
2017-03-19T13:03:23.000Z
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
42.581818
137
0.751921
import logging from webkitpy.tool.steps.abstractstep import AbstractStep from webkitpy.tool.steps.options import Options _log = logging.getLogger(__name__) class Update(AbstractStep): @classmethod def options(cls): return AbstractStep.options() + [ Options.non...
true
true
f70354f7311915d757b4bd5757b16caa8a12167e
255
py
Python
labs/Topic05-data_structures/lab5_02_summer_months.py
danielmccallion/pands-problems
738c45072f22b2511a5d8fefba8fce2482a1a8cb
[ "MIT" ]
null
null
null
labs/Topic05-data_structures/lab5_02_summer_months.py
danielmccallion/pands-problems
738c45072f22b2511a5d8fefba8fce2482a1a8cb
[ "MIT" ]
null
null
null
labs/Topic05-data_structures/lab5_02_summer_months.py
danielmccallion/pands-problems
738c45072f22b2511a5d8fefba8fce2482a1a8cb
[ "MIT" ]
null
null
null
# Daniel Mc Callion # This program prints the summer months months = ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") summer = months[4:7] for month in summer: print(month)
12.142857
39
0.654902
months = ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") summer = months[4:7] for month in summer: print(month)
true
true
f7035500220f9f8a16c236d0967d581dfd9a08f8
1,277
py
Python
jupiter_orm/jupiter_orm/Field.py
dianbaer/fast
362bd0ca9f6039ea70cd665438dd8731e4c144a5
[ "MIT" ]
226
2017-10-26T12:05:26.000Z
2021-12-06T15:14:54.000Z
jupiter_orm/jupiter_orm/Field.py
dianbaer/fast
362bd0ca9f6039ea70cd665438dd8731e4c144a5
[ "MIT" ]
null
null
null
jupiter_orm/jupiter_orm/Field.py
dianbaer/fast
362bd0ca9f6039ea70cd665438dd8731e4c144a5
[ "MIT" ]
73
2017-10-27T12:38:59.000Z
2019-12-23T07:29:48.000Z
class FieldC(): def __init__(self, name, column_type, primary_key, default): self.name = name self.column_type = column_type self.primary_key = primary_key self.default = default def __str__(self): return '<%s, %s:%s>' % (self.__class__.__name__, self.column_type...
31.925
88
0.657009
class FieldC(): def __init__(self, name, column_type, primary_key, default): self.name = name self.column_type = column_type self.primary_key = primary_key self.default = default def __str__(self): return '<%s, %s:%s>' % (self.__class__.__name__, self.column_type...
true
true
f7035501b1ba8b994d2ab016cc823cd9eb4351cf
1,937
py
Python
api/tests/test_user.py
josayko/SoftDeskAPI
a168abb09b09c5cb5f8f4957d028ebde02f3d128
[ "MIT" ]
null
null
null
api/tests/test_user.py
josayko/SoftDeskAPI
a168abb09b09c5cb5f8f4957d028ebde02f3d128
[ "MIT" ]
null
null
null
api/tests/test_user.py
josayko/SoftDeskAPI
a168abb09b09c5cb5f8f4957d028ebde02f3d128
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.test import TestCase class UsersManagersTests(TestCase): """ Test user creation manager """ def test_create_user(self): """ Creates a new user with email as primary identifier instead of username """ User = get...
37.980392
101
0.649974
from django.contrib.auth import get_user_model from django.test import TestCase class UsersManagersTests(TestCase): def test_create_user(self): User = get_user_model() user = User.objects.create_user(email="normal@user.com", password="foo") self.assertEqual(user.email, "normal@user.com") ...
true
true
f7035541b25714f015c602c461c950ce0dc803b9
4,098
py
Python
src/transfer_rna_identification.py
simoncchu/xRNAGlass
603f4a7909e307f510365172ab9a8f912e80591d
[ "MIT" ]
null
null
null
src/transfer_rna_identification.py
simoncchu/xRNAGlass
603f4a7909e307f510365172ab9a8f912e80591d
[ "MIT" ]
null
null
null
src/transfer_rna_identification.py
simoncchu/xRNAGlass
603f4a7909e307f510365172ab9a8f912e80591d
[ "MIT" ]
null
null
null
import pysam from optparse import OptionParser from x_gene_annotation import * class mRNA_Transfer(): def call_transfer_mut(self, sf_rna, sf_dna_up, sf_dna_bottom, sf_candidate): m_rna_vars = self.load_variants(sf_rna) m_DNA_RNA_ovlp_vars = self.get_overlap_variants(sf_dna_bottom, m_rna_vars) ...
39.786408
88
0.60859
import pysam from optparse import OptionParser from x_gene_annotation import * class mRNA_Transfer(): def call_transfer_mut(self, sf_rna, sf_dna_up, sf_dna_bottom, sf_candidate): m_rna_vars = self.load_variants(sf_rna) m_DNA_RNA_ovlp_vars = self.get_overlap_variants(sf_dna_bottom, m_rna_vars) ...
true
true
f703555c16bc4c3f133e0bfe1c68b46fa0864538
2,049
py
Python
nipype/interfaces/niftyfit/tests/test_asl.py
abelalez/nipype
878271bd906768f11c4cabd04e5d1895551ce8a7
[ "Apache-2.0" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
nipype/interfaces/niftyfit/tests/test_asl.py
abelalez/nipype
878271bd906768f11c4cabd04e5d1895551ce8a7
[ "Apache-2.0" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
nipype/interfaces/niftyfit/tests/test_asl.py
abelalez/nipype
878271bd906768f11c4cabd04e5d1895551ce8a7
[ "Apache-2.0" ]
2
2017-09-23T16:22:00.000Z
2019-08-01T14:18:52.000Z
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import pytest from ....testing import example_data from ...niftyreg import get_custom_path from ..asl import FitAsl from ...niftyreg.tests.test_regutils import no_nifty_tool @py...
29.271429
76
0.652513
import pytest from ....testing import example_data from ...niftyreg import get_custom_path from ..asl import FitAsl from ...niftyreg.tests.test_regutils import no_nifty_tool @pytest.mark.skipif( no_nifty_tool(cmd='fit_asl'), reason="niftyfit is not installed") def test_fit_asl(): fit_asl = FitAsl()...
true
true
f70355a4ebb7124ef003a7bb016d5179dd150016
3,341
py
Python
tflite-onnx/onnx_tflite/tflite/DimensionMetadata.py
jwj04ok/ONNX_Convertor
067a17e16dfc8aa80e36f44c4523959daf7359f5
[ "MIT" ]
193
2017-12-20T16:46:20.000Z
2022-03-29T07:40:54.000Z
tinyengine/tflite/DimensionMetadata.py
liuyy3364/mcunet
f53f9e20e8e912bdb111b4c32da75e71e9a59597
[ "Apache-2.0" ]
141
2017-12-21T08:00:20.000Z
2021-06-15T14:53:03.000Z
tinyengine/tflite/DimensionMetadata.py
liuyy3364/mcunet
f53f9e20e8e912bdb111b4c32da75e71e9a59597
[ "Apache-2.0" ]
55
2017-12-22T18:40:13.000Z
2022-01-17T05:43:51.000Z
# automatically generated by the FlatBuffers compiler, do not modify # namespace: tflite import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class DimensionMetadata(object): __slots__ = ['_tab'] @classmethod def GetRootAsDimensionMetadata(cls, buf, offset): n = fla...
40.253012
167
0.70877
import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class DimensionMetadata(object): __slots__ = ['_tab'] @classmethod def GetRootAsDimensionMetadata(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = DimensionMetad...
true
true
f70356c78dbf90e925826ccdd072b16ddefaaec6
529
py
Python
openslides/agenda/personal_info.py
DerPate/OpenSlides
2733a47d315fec9b8f3cb746fd5f3739be225d65
[ "MIT" ]
1
2015-03-22T02:07:23.000Z
2015-03-22T02:07:23.000Z
openslides/agenda/personal_info.py
frauenknecht/OpenSlides
6521d6b095bca33dc0c5f09f59067551800ea1e3
[ "MIT" ]
null
null
null
openslides/agenda/personal_info.py
frauenknecht/OpenSlides
6521d6b095bca33dc0c5f09f59067551800ea1e3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy from openslides.utils.personal_info import PersonalInfo from .models import Item class AgendaPersonalInfo(PersonalInfo): """ Class for personal info block for the agenda app. """ headline = ugettext_lazy('I am on the list of...
25.190476
83
0.705104
from django.utils.translation import ugettext_lazy from openslides.utils.personal_info import PersonalInfo from .models import Item class AgendaPersonalInfo(PersonalInfo): headline = ugettext_lazy('I am on the list of speakers of the following items') default_weight = 10 def get_queryset(self): ...
true
true
f703583cefb84f5df202bae943b7c97370e8d38a
1,104
py
Python
exercises/test_06_01.py
jp2321/dl4cv_dev
c8d7dd74d4b591681101770ff2c3603637974e72
[ "MIT" ]
1
2022-03-28T12:37:04.000Z
2022-03-28T12:37:04.000Z
exercises/test_06_01.py
jp2321/dl4cv_dev
c8d7dd74d4b591681101770ff2c3603637974e72
[ "MIT" ]
null
null
null
exercises/test_06_01.py
jp2321/dl4cv_dev
c8d7dd74d4b591681101770ff2c3603637974e72
[ "MIT" ]
1
2020-04-25T04:40:34.000Z
2020-04-25T04:40:34.000Z
def test(): from tensorflow.keras import datasets assert model.get_layer("class_prediction").get_config()["units"]==43, "Check the number of output classes" assert model.get_layer("class_prediction").get_config()["activation"]=="softmax", "Check your activation function" assert model.output[0].name== '...
69
118
0.719203
def test(): from tensorflow.keras import datasets assert model.get_layer("class_prediction").get_config()["units"]==43, "Check the number of output classes" assert model.get_layer("class_prediction").get_config()["activation"]=="softmax", "Check your activation function" assert model.output[0].name== '...
true
true
f7035a76ad270c53ba05886eaab94d613aec6fa7
699
py
Python
backend/authentication/serializers.py
Zoki92/Calories-Counter
4b10c5661869c5a0645e59abb434ca26fd497f37
[ "MIT" ]
null
null
null
backend/authentication/serializers.py
Zoki92/Calories-Counter
4b10c5661869c5a0645e59abb434ca26fd497f37
[ "MIT" ]
6
2021-03-10T17:12:50.000Z
2022-03-02T08:30:05.000Z
backend/authentication/serializers.py
Zoki92/Calories-Counter
4b10c5661869c5a0645e59abb434ca26fd497f37
[ "MIT" ]
null
null
null
from rest_framework import serializers from django.contrib.auth import get_user_model from .models import CustomUser User = get_user_model() class TokenSerializer(serializers.Serializer): """ This serializer serializes the token data """ access = serializers.CharField(max_length=255) refresh = se...
24.103448
53
0.695279
from rest_framework import serializers from django.contrib.auth import get_user_model from .models import CustomUser User = get_user_model() class TokenSerializer(serializers.Serializer): access = serializers.CharField(max_length=255) refresh = serializers.CharField(max_length=255) class UserSerializer(ser...
true
true
f7035accd560e6660402bbd8023959cb49a7b842
2,512
py
Python
setup.py
ccthien/jaeger-client-python
51d9027c3e0b87f6721dd14e7bc2b3303ce682c2
[ "Apache-2.0" ]
2
2020-05-24T11:39:13.000Z
2021-02-17T19:52:41.000Z
setup.py
ccthien/jaeger-client-python
51d9027c3e0b87f6721dd14e7bc2b3303ce682c2
[ "Apache-2.0" ]
4
2020-12-03T16:06:36.000Z
2020-12-06T02:15:42.000Z
setup.py
ccthien/jaeger-client-python
51d9027c3e0b87f6721dd14e7bc2b3303ce682c2
[ "Apache-2.0" ]
3
2018-10-23T23:04:20.000Z
2019-03-15T15:50:17.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from setuptools import setup, find_packages version = None with open('jaeger_client/__init__.py', 'r') as f: for line in f: m = re.match(r'^__version__\s*=\s*(["\'])([^"\']+)\1', line) if m: version = m.group(2) break ...
33.493333
118
0.574841
import re from setuptools import setup, find_packages version = None with open('jaeger_client/__init__.py', 'r') as f: for line in f: m = re.match(r'^__version__\s*=\s*(["\'])([^"\']+)\1', line) if m: version = m.group(2) break assert version is not None, \ 'Could no...
true
true
f7035af3b56b3d69f5dea99514b6a6f709912518
118,762
py
Python
nova/virt/libvirt/config.py
Pushparajkvp/nova
c80d0be3f4ff34d2a5b4ee60379cc8481dc7a0b7
[ "Apache-2.0" ]
1
2021-06-10T17:08:14.000Z
2021-06-10T17:08:14.000Z
nova/virt/libvirt/config.py
Pushparajkvp/nova
c80d0be3f4ff34d2a5b4ee60379cc8481dc7a0b7
[ "Apache-2.0" ]
null
null
null
nova/virt/libvirt/config.py
Pushparajkvp/nova
c80d0be3f4ff34d2a5b4ee60379cc8481dc7a0b7
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2012-2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
34.584158
79
0.569517
import time from collections import OrderedDict from lxml import etree from oslo_utils import strutils from oslo_utils import units from nova import exception from nova.i18n import _ from nova.pci import utils as pci_utils from nova.virt import hardware NOVA_NS = "http://openstack.org/xmlns/libvirt/...
true
true
f7035baa2430208a8619aaa2de77421f4f732be8
4,889
py
Python
king_phisher/server/plugins.py
padfoot999/king-phisher
d09ca94900c32bc5b292685e0ec84b9ad093301f
[ "BSD-3-Clause" ]
1
2016-10-20T14:58:09.000Z
2016-10-20T14:58:09.000Z
king_phisher/server/plugins.py
padfoot999/king-phisher
d09ca94900c32bc5b292685e0ec84b9ad093301f
[ "BSD-3-Clause" ]
null
null
null
king_phisher/server/plugins.py
padfoot999/king-phisher
d09ca94900c32bc5b292685e0ec84b9ad093301f
[ "BSD-3-Clause" ]
1
2019-12-17T21:33:24.000Z
2019-12-17T21:33:24.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/server/plugins.py # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, t...
38.801587
143
0.746574
import os from king_phisher import errors from king_phisher import find from king_phisher import plugins class ServerPlugin(plugins.PluginBase): _logging_prefix = 'KingPhisher.Plugins.Server.' def __init__(self, root_config): self.root_config = root_config self.server = None su...
true
true
f7035bae9ef133b15cd82ef673ee423ea88deb57
1,155
py
Python
plasma/child_chain/create_initial_make_orders.py
kevjue/plasma-mvp
510934766a8d9b28969658216566a74b2d450384
[ "Apache-2.0" ]
1
2018-07-24T14:19:15.000Z
2018-07-24T14:19:15.000Z
plasma/child_chain/create_initial_make_orders.py
kevjue/plasma-dex
510934766a8d9b28969658216566a74b2d450384
[ "Apache-2.0" ]
null
null
null
plasma/child_chain/create_initial_make_orders.py
kevjue/plasma-dex
510934766a8d9b28969658216566a74b2d450384
[ "Apache-2.0" ]
null
null
null
import click import sys from web3 import Web3 from plasma.client.client import Client from plasma.utils import utils @click.command() @click.option('--token_address', help="The ethereum address of the pdex token smart contract", required=True) @click.option('--root_chain_address', help="The ethereum address of the ro...
42.777778
150
0.758442
import click import sys from web3 import Web3 from plasma.client.client import Client from plasma.utils import utils @click.command() @click.option('--token_address', help="The ethereum address of the pdex token smart contract", required=True) @click.option('--root_chain_address', help="The ethereum address of the ro...
true
true
f7035c581a4ed9b8309dd60d8abb56daf29c23f9
1,763
py
Python
integreat_cms/cms/models/feedback/search_result_feedback.py
Carlosbogo/integreat-cms
066f188b138e105e72f5420bc36d25709f25402d
[ "Apache-2.0" ]
1
2022-01-16T01:15:21.000Z
2022-01-16T01:15:21.000Z
integreat_cms/cms/models/feedback/search_result_feedback.py
Carlosbogo/integreat-cms
066f188b138e105e72f5420bc36d25709f25402d
[ "Apache-2.0" ]
null
null
null
integreat_cms/cms/models/feedback/search_result_feedback.py
Carlosbogo/integreat-cms
066f188b138e105e72f5420bc36d25709f25402d
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.utils.translation import ugettext_lazy as _ from .feedback import Feedback class SearchResultFeedback(Feedback): """ Database model representing feedback about search results (e.g. empty results). """ search_query = models.CharField(max_length=1000, verbose_n...
31.482143
131
0.653432
from django.db import models from django.utils.translation import ugettext_lazy as _ from .feedback import Feedback class SearchResultFeedback(Feedback): search_query = models.CharField(max_length=1000, verbose_name=_("search term")) @property def object_name(self): return _("Search results for...
true
true
f7035c68a7fc1602faabfc647ce3667f17f3a9f2
8,429
py
Python
src/pca/todoJunto.py
123972/PCA-nutricion
aff3c51a71c887c3fa367dbf9d599be5915c80cc
[ "MIT" ]
null
null
null
src/pca/todoJunto.py
123972/PCA-nutricion
aff3c51a71c887c3fa367dbf9d599be5915c80cc
[ "MIT" ]
2
2021-05-11T16:00:55.000Z
2021-08-23T20:45:22.000Z
src/pca/todoJunto.py
123972/PCA-nutricion
aff3c51a71c887c3fa367dbf9d599be5915c80cc
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import codecs import sys import sklearn as sk import pandas as pd import numpy as np import math from sklearn import preprocessing from sklearn.decomposition import PCA from src.pca.algoritmo_QR import eigenvectores_eigenvalores_QR_vf from src.pca.metodo_potencia_deflation imp...
35.267782
161
0.696643
import codecs import sys import sklearn as sk import pandas as pd import numpy as np import math from sklearn import preprocessing from sklearn.decomposition import PCA from src.pca.algoritmo_QR import eigenvectores_eigenvalores_QR_vf from src.pca.metodo_potencia_deflation import power_iteration from src.pca.met...
true
true
f7035c8f97025b538d6a14199b2f82b3876c816c
12,847
py
Python
pythonProject/resturant_management/resturant.py
slowy07/pythonApps
22f9766291dbccd8185035745950c5ee4ebd6a3e
[ "MIT" ]
10
2020-10-09T11:05:18.000Z
2022-02-13T03:22:10.000Z
pythonProject/resturant_management/resturant.py
khairanabila/pythonApps
f90b8823f939b98f7bf1dea7ed35fe6e22e2f730
[ "MIT" ]
null
null
null
pythonProject/resturant_management/resturant.py
khairanabila/pythonApps
f90b8823f939b98f7bf1dea7ed35fe6e22e2f730
[ "MIT" ]
6
2020-11-26T12:49:43.000Z
2022-03-06T06:46:43.000Z
from tkinter import* import random import time root = Tk() root.geometry("1600x700+0+0") root.title("Restaurant Management System") Tops = Frame(root,bg="white",width = 1600,height=50,relief=SUNKEN) Tops.pack(side=TOP) f1 = Frame(root,width = 900,height=700,relief=SUNKEN) f1.pack(side=LEFT) f2 = Frame(root ,width =...
45.077193
142
0.639838
from tkinter import* import random import time root = Tk() root.geometry("1600x700+0+0") root.title("Restaurant Management System") Tops = Frame(root,bg="white",width = 1600,height=50,relief=SUNKEN) Tops.pack(side=TOP) f1 = Frame(root,width = 900,height=700,relief=SUNKEN) f1.pack(side=LEFT) f2 = Frame(root ,width =...
true
true
f7035dd21c738a30b253fd556306a70e7a3eae5a
8,589
py
Python
graph_objs/layout/scene/xaxis/title/_font.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/layout/scene/xaxis/title/_font.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/layout/scene/xaxis/title/_font.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.scene.xaxis.title" _path_str = "layout.scene.xaxis.title.font" _valid_props = {"colo...
37.50655
84
0.567703
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): _parent_path_str = "layout.scene.xaxis.title" _path_str = "layout.scene.xaxis.title.font" _valid_props = {"color", "family", "size"} @pr...
true
true
f7035e5aadcd002fafb902e2e88b8bdb13c19cee
2,823
py
Python
qualifier/deploy/cohorte-home/repo/jsonrpclib/utils.py
isandlaTech/cohorte-devtools
9ba9021369188d2f0ad5c845ef242fd5a7097b57
[ "Apache-2.0" ]
1
2017-03-04T14:37:15.000Z
2017-03-04T14:37:15.000Z
qualifier/deploy/cohorte-home/repo/jsonrpclib/utils.py
isandlaTech/cohorte-devtools
9ba9021369188d2f0ad5c845ef242fd5a7097b57
[ "Apache-2.0" ]
4
2017-08-21T08:17:14.000Z
2018-03-02T13:51:43.000Z
qualifier/deploy/cohorte-home/repo/jsonrpclib/utils.py
isandlaTech/cohorte-devtools
9ba9021369188d2f0ad5c845ef242fd5a7097b57
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Utility methods, for compatibility between Python version :author: Thomas Calmant :copyright: Copyright 2015, isandlaTech :license: Apache License 2.0 :version: 0.2.6 .. Copyright 2015 isandlaTech Licensed under the Apache License, Version 2.0 (the "Lice...
22.404762
80
0.561814
__version_info__ = (0, 2, 6) __version__ = ".".join(str(x) for x in __version_info__) __docformat__ = "restructuredtext en" import sys if sys.version_info[0] < 3: import types try: STRING_TYPES = ( types.StringType, types.UnicodeType ) except Nam...
true
true
f7035edc99f19ee433a47167a215f08d1d270643
10,949
py
Python
openstack_dashboard/test/api_tests/nova_rest_tests.py
Hodorable/0602
3b1e4cb7458e4f456bfebc52fc2902205c36cc15
[ "Apache-2.0" ]
1
2017-12-07T05:21:58.000Z
2017-12-07T05:21:58.000Z
openstack_dashboard/test/api_tests/nova_rest_tests.py
Hodorable/0602
3b1e4cb7458e4f456bfebc52fc2902205c36cc15
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/test/api_tests/nova_rest_tests.py
Hodorable/0602
3b1e4cb7458e4f456bfebc52fc2902205c36cc15
[ "Apache-2.0" ]
null
null
null
# Copyright 2014, Rackspace, US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
40.106227
77
0.608823
import mock from django.conf import settings from openstack_dashboard.api.rest import nova from openstack_dashboard.test import helpers as test class NovaRestTestCase(test.TestCase): @mock.patch.object(nova.api, 'nova') def test_keypair_get(self, nc): request = self.mock_...
true
true
f7035f37e23c97b58921b48200d5a78a5a0db7b7
1,270
py
Python
GatewayPlacement.py
vindem/eeplacement
11d6da56156ba29d8b2eaea657ed3df37110f666
[ "MIT" ]
null
null
null
GatewayPlacement.py
vindem/eeplacement
11d6da56156ba29d8b2eaea657ed3df37110f666
[ "MIT" ]
null
null
null
GatewayPlacement.py
vindem/eeplacement
11d6da56156ba29d8b2eaea657ed3df37110f666
[ "MIT" ]
null
null
null
import IoTSensor import LORAGateway class GatewayPlacement: def __init__(self, sensor_list): self._sensor_list = sensor_list self._gateway_list = [] def add_gateway(self, gateway): self._gateway_list.append(gateway) def remove_gateway(self, gateway): self._gateway_list.re...
28.863636
102
0.638583
import IoTSensor import LORAGateway class GatewayPlacement: def __init__(self, sensor_list): self._sensor_list = sensor_list self._gateway_list = [] def add_gateway(self, gateway): self._gateway_list.append(gateway) def remove_gateway(self, gateway): self._gateway_list.re...
true
true
f7035f4a31b4a9cb5b6bc7dac024872f9c49f775
7,873
py
Python
tcfl/target_ext_tunnel.py
sriiora/tcf
e607ce04f97dbb4910d94428c0600a6a7145a825
[ "Apache-2.0" ]
null
null
null
tcfl/target_ext_tunnel.py
sriiora/tcf
e607ce04f97dbb4910d94428c0600a6a7145a825
[ "Apache-2.0" ]
null
null
null
tcfl/target_ext_tunnel.py
sriiora/tcf
e607ce04f97dbb4910d94428c0600a6a7145a825
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # """ Create and remove network tunnels to the target via the server -------------------------------------------------------------- """ from . import tc from . import ttb_client class tunnel(tc.target_extension_c): ...
40.374359
79
0.579322
from . import tc from . import ttb_client class tunnel(tc.target_extension_c): def __init__(self, target): self.target = target self.ip_addr = None def _ip_addr_get(self, ip_addr): if ip_addr: return ip_addr if self.ip_addr: ...
true
true
f7035f91612f64318ed215c8124c2133a57e85cd
1,574
py
Python
11-Numpy Basic Statistics.py
mnabavi84/dcamp-intro-python
218b67106061d45cfa18a1b1d46487900f9aa539
[ "MIT" ]
null
null
null
11-Numpy Basic Statistics.py
mnabavi84/dcamp-intro-python
218b67106061d45cfa18a1b1d46487900f9aa539
[ "MIT" ]
null
null
null
11-Numpy Basic Statistics.py
mnabavi84/dcamp-intro-python
218b67106061d45cfa18a1b1d46487900f9aa539
[ "MIT" ]
null
null
null
# np_baseball is available # Import numpy import numpy as np # Create np_height_in from np_baseball np_height_in = np_baseball[:,0] # Print out the mean of np_height_in print(np.mean(np_height_in)) # Print out the median of np_height_in print(np.median(np_height_in)) # np_baseball is available #...
27.137931
74
0.719187
import numpy as np np_height_in = np_baseball[:,0] print(np.mean(np_height_in)) print(np.median(np_height_in)) import numpy as np avg = np.mean(np_baseball[:,0]) print("Average: " + str(avg)) med = np.median(np_baseball[:,0]) print("Median: " + str(med)) stddev = np.std(np_basebal...
true
true
f7035fb6f14b4a4c5b91bd1b9f6eb9aa52b46bd1
8,853
py
Python
InvenTree/InvenTree/urls.py
carlos-riquelme/InvenTree
724dd2a9c82e4c10e14bd6aba8f48553b183fef9
[ "MIT" ]
5
2020-08-14T06:18:57.000Z
2022-01-11T01:22:56.000Z
InvenTree/InvenTree/urls.py
carlos-riquelme/InvenTree
724dd2a9c82e4c10e14bd6aba8f48553b183fef9
[ "MIT" ]
27
2021-04-12T22:05:39.000Z
2022-03-13T20:33:54.000Z
InvenTree/InvenTree/urls.py
carlos-riquelme/InvenTree
724dd2a9c82e4c10e14bd6aba8f48553b183fef9
[ "MIT" ]
1
2021-12-22T12:22:21.000Z
2021-12-22T12:22:21.000Z
""" Top-level URL lookup for InvenTree application. Passes URL lookup downstream to each app as required. """ from django.conf.urls import url, include from django.urls import path from django.contrib import admin from company.urls import company_urls from company.urls import manufacturer_part_urls from company.url...
43.185366
162
0.726872
from django.conf.urls import url, include from django.urls import path from django.contrib import admin from company.urls import company_urls from company.urls import manufacturer_part_urls from company.urls import supplier_part_urls from common.urls import common_urls from part.urls import part_urls from stock.url...
true
true
f7035fc0d709e7e2bbf5842adca7c69a98bf0b3f
3,450
py
Python
experiments/mnist_simple/class_imbalance.py
kili-technology/active-learning
72dce7d91b988264dd7fa1a972d9af45e9648c4c
[ "Apache-2.0" ]
3
2020-09-11T07:30:54.000Z
2021-04-17T07:45:05.000Z
experiments/mnist_simple/class_imbalance.py
kili-technology/active-learning
72dce7d91b988264dd7fa1a972d9af45e9648c4c
[ "Apache-2.0" ]
null
null
null
experiments/mnist_simple/class_imbalance.py
kili-technology/active-learning
72dce7d91b988264dd7fa1a972d9af45e9648c4c
[ "Apache-2.0" ]
null
null
null
import os import logging import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import al from al.dataset import mnist from al.model.model_zoo.simple_cnn import ConvModel from al.model.mnist import MnistLearner from al.dataset.mnist import MnistDataset from al.train...
32.242991
83
0.642319
import os import logging import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import al from al.dataset import mnist from al.model.model_zoo.simple_cnn import ConvModel from al.model.mnist import MnistLearner from al.dataset.mnist import MnistDataset from al.train...
true
true
f70361664e2ce8762ac750784a5e6dca9c3eba02
148,257
py
Python
distributed/worker.py
hercules261188/distributed
e5eb40c597dba0358221500fda49d653b7cf1f3a
[ "BSD-3-Clause" ]
null
null
null
distributed/worker.py
hercules261188/distributed
e5eb40c597dba0358221500fda49d653b7cf1f3a
[ "BSD-3-Clause" ]
1
2019-04-25T14:13:48.000Z
2019-04-25T16:54:54.000Z
distributed/worker.py
hercules261188/distributed
e5eb40c597dba0358221500fda49d653b7cf1f3a
[ "BSD-3-Clause" ]
2
2019-04-24T17:06:29.000Z
2020-09-02T10:48:07.000Z
from __future__ import annotations import asyncio import bisect import builtins import concurrent.futures import errno import heapq import logging import os import random import sys import threading import warnings import weakref from collections import defaultdict, deque, namedtuple from collections.abc import Hashab...
35.476669
115
0.542983
from __future__ import annotations import asyncio import bisect import builtins import concurrent.futures import errno import heapq import logging import os import random import sys import threading import warnings import weakref from collections import defaultdict, deque, namedtuple from collections.abc import Hashab...
true
true
f70361fd762b86d8ee7498605605e80662106df7
1,692
py
Python
samples/generated_samples/vmmigration_v1_generated_vm_migration_create_utilization_report_async.py
renovate-bot/python-vmmigration
80a2cf46a21f516899da818a7aec0f2a67222047
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/vmmigration_v1_generated_vm_migration_create_utilization_report_async.py
renovate-bot/python-vmmigration
80a2cf46a21f516899da818a7aec0f2a67222047
[ "Apache-2.0" ]
10
2021-11-18T10:47:48.000Z
2022-03-07T15:48:54.000Z
samples/generated_samples/vmmigration_v1_generated_vm_migration_create_utilization_report_async.py
renovate-bot/python-vmmigration
80a2cf46a21f516899da818a7aec0f2a67222047
[ "Apache-2.0" ]
1
2022-01-29T08:15:02.000Z
2022-01-29T08:15:02.000Z
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
33.176471
85
0.767139
from google.cloud import vmmigration_v1 async def sample_create_utilization_report(): client = vmmigration_v1.VmMigrationAsyncClient() request = vmmigration_v1.CreateUtilizationReportRequest( parent="parent_value", utilization_report_id="utilization_report_...
true
true
f7036210c9a2fc427322f417e11fddc8b19b2186
12,556
py
Python
gtsfm/common/gtsfm_data.py
yuancaimaiyi/gtsfm
cc5781c35af23498d45cd96a1818e4786c5cca80
[ "Apache-2.0" ]
null
null
null
gtsfm/common/gtsfm_data.py
yuancaimaiyi/gtsfm
cc5781c35af23498d45cd96a1818e4786c5cca80
[ "Apache-2.0" ]
null
null
null
gtsfm/common/gtsfm_data.py
yuancaimaiyi/gtsfm
cc5781c35af23498d45cd96a1818e4786c5cca80
[ "Apache-2.0" ]
1
2021-09-23T13:08:49.000Z
2021-09-23T13:08:49.000Z
"""Class to hold the tracks and cameras of a 3D scene. This can be the output of either data association or of bundle adjustment. Authors: Ayush Baid, John Lambert, Xiaolong Wu """ import itertools from typing import Any, Dict, List, Optional, Tuple import numpy as np from gtsam import PinholeCameraCal3Bundler, Pose3...
36.08046
116
0.634358
import itertools from typing import Any, Dict, List, Optional, Tuple import numpy as np from gtsam import PinholeCameraCal3Bundler, Pose3, SfmTrack import gtsfm.utils.graph as graph_utils import gtsfm.utils.logger as logger_utils import gtsfm.utils.reprojection as reproj_utils logger = logger_utils.get_logger() EQU...
true
true
f70362c2929c6b6316a7720a7d8f1029c8e72172
514
py
Python
garrafas.py
WestenPy/Curso_em_video
9f6a9775d27e1b86d54b381aba5da69b2ae21b27
[ "MIT" ]
null
null
null
garrafas.py
WestenPy/Curso_em_video
9f6a9775d27e1b86d54b381aba5da69b2ae21b27
[ "MIT" ]
null
null
null
garrafas.py
WestenPy/Curso_em_video
9f6a9775d27e1b86d54b381aba5da69b2ae21b27
[ "MIT" ]
null
null
null
'''n = 99 p = 'garrafas' while n > 0: if n == 1: p = 'garrafa' print(f'{n} {p} de cerveja no muro!') print(f'{n} {p} no muro!') print('Se uma garrafa cair no chão') print('Quantas restarão?') n -= 1 print('Fim da canção!')''' p = 'garrafas' for c in range(99, 0, -1): if c == 1: ...
17.724138
41
0.523346
p = 'garrafas' for c in range(99, 0, -1): if c == 1: p = 'garrafa' print(f'{c} {p} de cerveja no muro!') print(f'{c} {p} no muro!') print('Se uma garrafa cair no chão') print('Quantas restarão?') print('Fim da canção!')
true
true
f703638a4adc495ba1f71364ea8f35a506615362
681
py
Python
wagtailcommerce/orders/migrations/0015_order_cart.py
theplusagency/wagtail-commerce
6047170f29199ccaf2778534976ab0970c2877e7
[ "BSD-3-Clause" ]
3
2019-04-12T15:38:43.000Z
2019-09-22T10:23:20.000Z
wagtailcommerce/orders/migrations/0015_order_cart.py
wagtailcommerce/wagtailcommerce
308ed8348483806c16062d09a7e69ec44d9a2e73
[ "BSD-3-Clause" ]
null
null
null
wagtailcommerce/orders/migrations/0015_order_cart.py
wagtailcommerce/wagtailcommerce
308ed8348483806c16062d09a7e69ec44d9a2e73
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-02-17 21:34 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcommerce_carts', '0004_cart_coupon'), ('wagt...
29.608696
182
0.674009
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcommerce_carts', '0004_cart_coupon'), ('wagtailcommerce_orders', '0014_auto_20180130_1050'), ] operations ...
true
true
f70366774f99f64ea4a2e9819e5d6781e9782677
4,249
py
Python
prosodic_daa/sample/pyhlm_sample_murakami.py
EmergentSystemLabStudent/Prosodic-DAA
068af5db337ed977c059e788353414d3aa9a8ac8
[ "MIT" ]
null
null
null
prosodic_daa/sample/pyhlm_sample_murakami.py
EmergentSystemLabStudent/Prosodic-DAA
068af5db337ed977c059e788353414d3aa9a8ac8
[ "MIT" ]
null
null
null
prosodic_daa/sample/pyhlm_sample_murakami.py
EmergentSystemLabStudent/Prosodic-DAA
068af5db337ed977c059e788353414d3aa9a8ac8
[ "MIT" ]
null
null
null
import os import numpy as np from pyhlm.model import WeakLimitHDPHLM, WeakLimitHDPHLMPython from pyhlm.internals.hlm_states import WeakLimitHDPHLMStates from pyhlm.word_model import LetterHSMM, LetterHSMMPython import pyhsmm import warnings from tqdm import trange warnings.filterwarnings('ignore') import time #%% def ...
31.014599
133
0.701106
import os import numpy as np from pyhlm.model import WeakLimitHDPHLM, WeakLimitHDPHLMPython from pyhlm.internals.hlm_states import WeakLimitHDPHLMStates from pyhlm.word_model import LetterHSMM, LetterHSMMPython import pyhsmm import warnings from tqdm import trange warnings.filterwarnings('ignore') import time def loa...
true
true
f70367a6041c8fa21742be5df4b0ac208ee79ceb
1,324
py
Python
src/client/__init__.py
rokups/Launchpad
661388f65a59de3842368b6315e121ecf8ccf1bf
[ "MIT" ]
7
2018-01-21T04:42:54.000Z
2021-07-09T04:53:28.000Z
src/client/__init__.py
rokups/Launchpad
661388f65a59de3842368b6315e121ecf8ccf1bf
[ "MIT" ]
1
2017-08-05T13:01:02.000Z
2017-08-05T13:01:02.000Z
src/client/__init__.py
rokups/Launchpad
661388f65a59de3842368b6315e121ecf8ccf1bf
[ "MIT" ]
1
2019-02-17T11:23:56.000Z
2019-02-17T11:23:56.000Z
# # MIT License # # Copyright 2017 Launchpad project contributors (see COPYRIGHT.md) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the ...
47.285714
115
0.780967
true
true
f7036901558a058bb17bfb56404b309d8c4938f7
463
py
Python
dashboard/views.py
mahanfarzaneh2000/DjangoEcommerce
f844f60fd4eac6c7513196037cd908df3ba01983
[ "CC0-1.0" ]
1
2020-11-01T11:35:12.000Z
2020-11-01T11:35:12.000Z
dashboard/views.py
mahanfarzaneh2000/DjangoEcommerce
f844f60fd4eac6c7513196037cd908df3ba01983
[ "CC0-1.0" ]
null
null
null
dashboard/views.py
mahanfarzaneh2000/DjangoEcommerce
f844f60fd4eac6c7513196037cd908df3ba01983
[ "CC0-1.0" ]
null
null
null
from django.shortcuts import render from django.views.generic import View from django.core.exceptions import ObjectDoesNotExist from django.contrib import messages from cart.models import Order class Dashboard(View): def get(self,*args,**kwargs): order_qs = Order.objects.filter(user=self.request.user,order...
35.615385
75
0.725702
from django.shortcuts import render from django.views.generic import View from django.core.exceptions import ObjectDoesNotExist from django.contrib import messages from cart.models import Order class Dashboard(View): def get(self,*args,**kwargs): order_qs = Order.objects.filter(user=self.request.user,order...
true
true
f7036a98810d92fc6296922c227dede332735048
6,263
py
Python
people_admin/tests/test_views.py
morden35/openstates.org
21f0a78a43f04f835b858fdaf4f755d99920e2d7
[ "MIT" ]
1
2022-01-17T11:54:28.000Z
2022-01-17T11:54:28.000Z
people_admin/tests/test_views.py
washabstract/openstates.org
dc541ae5cd09dd3b3db623178bf32a03d0246f01
[ "MIT" ]
null
null
null
people_admin/tests/test_views.py
washabstract/openstates.org
dc541ae5cd09dd3b3db623178bf32a03d0246f01
[ "MIT" ]
null
null
null
import pytest from testutils.factories import create_test_person from django.contrib.auth.models import User, Permission from openstates.data.models import Person, Organization from people_admin.models import UnmatchedName, NameStatus, DeltaSet from people_admin.views import MATCHER_PERM, EDIT_PERM, RETIRE_PERM import ...
35.384181
88
0.669647
import pytest from testutils.factories import create_test_person from django.contrib.auth.models import User, Permission from openstates.data.models import Person, Organization from people_admin.models import UnmatchedName, NameStatus, DeltaSet from people_admin.views import MATCHER_PERM, EDIT_PERM, RETIRE_PERM import ...
true
true