hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c0dd591456553fb2831ffd274f1dbb9a68dabc5
8,506
py
Python
selfdrive/car/fw_versions.py
godzqh/openpilot
1747bf9f2ee6194d61e1242be7a35a5aa70f4e42
[ "MIT" ]
null
null
null
selfdrive/car/fw_versions.py
godzqh/openpilot
1747bf9f2ee6194d61e1242be7a35a5aa70f4e42
[ "MIT" ]
null
null
null
selfdrive/car/fw_versions.py
godzqh/openpilot
1747bf9f2ee6194d61e1242be7a35a5aa70f4e42
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import struct import traceback from typing import Any from tqdm import tqdm import panda.python.uds as uds from cereal import car from selfdrive.car.fingerprints import FW_VERSIONS, get_attr_from_cars from selfdrive.car.isotp_parallel_query import IsoTpParallelQuery from selfdrive.car.toyota.va...
31.387454
126
0.699036
import struct import traceback from typing import Any from tqdm import tqdm import panda.python.uds as uds from cereal import car from selfdrive.car.fingerprints import FW_VERSIONS, get_attr_from_cars from selfdrive.car.isotp_parallel_query import IsoTpParallelQuery from selfdrive.car.toyota.values import CAR as TOYO...
true
true
1c0dd6bd1f4501caf6468d70d6dabd6ad26c4622
9,039
py
Python
src/sciplot/functions.py
simonUU/sciplot
896a7a4efa7911a2bdf303311be674de12171fc4
[ "MIT" ]
null
null
null
src/sciplot/functions.py
simonUU/sciplot
896a7a4efa7911a2bdf303311be674de12171fc4
[ "MIT" ]
null
null
null
src/sciplot/functions.py
simonUU/sciplot
896a7a4efa7911a2bdf303311be674de12171fc4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ In this file all the matplolib wrappers are located. """ from .helpers import get_optimal_bin_size, manager from .colors import b2cm import pandas as pd import numpy as np from matplotlib.colors import hex2color import matplotlib.pyplot as plt def _hist_init(data, bins=None, xrange=Non...
25.038781
120
0.552052
from .helpers import get_optimal_bin_size, manager from .colors import b2cm import pandas as pd import numpy as np from matplotlib.colors import hex2color import matplotlib.pyplot as plt def _hist_init(data, bins=None, xrange=None): xaxis = manager.get_x_axis() if xaxis is None or bins is not None or xrang...
true
true
1c0dd76431f57805038fe173896da52eb5934a22
6,972
py
Python
tests/scripts/thread-cert/Cert_9_2_10_PendingPartition.py
jjlee3/openthread
abba21bca6e1b07ca76b0241dfaf045e57396818
[ "BSD-3-Clause" ]
3
2018-06-20T11:13:33.000Z
2020-12-08T15:15:10.000Z
tests/scripts/thread-cert/Cert_9_2_10_PendingPartition.py
jjlee3/openthread
abba21bca6e1b07ca76b0241dfaf045e57396818
[ "BSD-3-Clause" ]
null
null
null
tests/scripts/thread-cert/Cert_9_2_10_PendingPartition.py
jjlee3/openthread
abba21bca6e1b07ca76b0241dfaf045e57396818
[ "BSD-3-Clause" ]
3
2017-08-29T01:31:57.000Z
2020-05-07T22:56:52.000Z
#!/usr/bin/python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # not...
42
95
0.674699
import time import unittest import node CHANNEL_INIT = 19 PANID_INIT = 0xface CHANNEL_FINAL = 16 PANID_FINAL = 0xafce COMMISSIONER = 1 LEADER = 2 ROUTER1 = 3 ED1 = 4 SED1 = 5 class Cert_9_2_10_PendingPartition(unittest.TestCase): def setUp(self): self.nodes = {} for i in range(1,6): ...
true
true
1c0dd7a2fa9d2c723a234b85b1b0fc427ac7ff65
1,936
py
Python
tests/unittest_algorithm_brozozwski_minimize.py
altaris/fapy
a135af53e4efb5fe7d9f8980f126ad280dc04ee3
[ "MIT" ]
1
2020-09-16T13:07:15.000Z
2020-09-16T13:07:15.000Z
tests/unittest_algorithm_brozozwski_minimize.py
altaris/fapy
a135af53e4efb5fe7d9f8980f126ad280dc04ee3
[ "MIT" ]
null
null
null
tests/unittest_algorithm_brozozwski_minimize.py
altaris/fapy
a135af53e4efb5fe7d9f8980f126ad280dc04ee3
[ "MIT" ]
null
null
null
# pylint: disable=missing-class-docstring # pylint: disable=missing-function-docstring """Unit tests """ import unittest from fapy.algorithm_brozozwski_minimize import ( brozozwski_minimize, transpose ) from fapy.algorithm_thompson import ( thompson ) from fapy.finite_automaton import ( FiniteAutomat...
32.266667
77
0.643079
import unittest from fapy.algorithm_brozozwski_minimize import ( brozozwski_minimize, transpose ) from fapy.algorithm_thompson import ( thompson ) from fapy.finite_automaton import ( FiniteAutomaton ) from fapy.regular_expression import ( parse_regular_expression ) class BrozozwskiMinimizeTest(u...
true
true
1c0dd8e5c45a29c2f7bfacfab7eb70c97b82eebc
469
py
Python
tests/test_mperror.py
zpz/mpservice
c1032ae38aa448ec83baf1293c3a071b4cef02ce
[ "MIT" ]
2
2022-01-31T05:15:59.000Z
2022-03-26T03:59:21.000Z
tests/test_mperror.py
zpz/mpservice
c1032ae38aa448ec83baf1293c3a071b4cef02ce
[ "MIT" ]
9
2021-07-19T03:41:06.000Z
2022-03-24T05:38:08.000Z
tests/test_mperror.py
zpz/mpservice
c1032ae38aa448ec83baf1293c3a071b4cef02ce
[ "MIT" ]
null
null
null
from multiprocessing import Process, Queue from mpservice.mperror import MPError def goo(x, q): try: if x < 10: q.put(x) else: raise ValueError('wrong value!') except: q.put(MPError()) def test_exception(): q = Queue() p = Process(target=goo, args=(20...
16.75
44
0.54371
from multiprocessing import Process, Queue from mpservice.mperror import MPError def goo(x, q): try: if x < 10: q.put(x) else: raise ValueError('wrong value!') except: q.put(MPError()) def test_exception(): q = Queue() p = Process(target=goo, args=(20...
true
true
1c0dd8fb3c490f7b3e7d57224a46717f058b4f8d
277
py
Python
lang/py/rfc/theme/yield/generators-uk/makebig.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/theme/yield/generators-uk/makebig.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/rfc/theme/yield/generators-uk/makebig.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
# Make a big log file for testing import sys if len(sys.argv) != 2: print >>sys.stderr,"Usage : makebig.py repetitions" raise SystemExit(1) data = open("access-log").read() f = open("big-access-log","w") for i in xrange(int(sys.argv[1])): f.write(data)
15.388889
55
0.628159
import sys if len(sys.argv) != 2: print >>sys.stderr,"Usage : makebig.py repetitions" raise SystemExit(1) data = open("access-log").read() f = open("big-access-log","w") for i in xrange(int(sys.argv[1])): f.write(data)
true
true
1c0dd992c16d8c054d352bb45333d9ed0e0fed59
3,318
py
Python
azure-mgmt-network/azure/mgmt/network/models/application_gateway_request_routing_rule.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-network/azure/mgmt/network/models/application_gateway_request_routing_rule.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-network/azure/mgmt/network/models/application_gateway_request_routing_rule.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
46.732394
189
0.679024
from .sub_resource import SubResource class ApplicationGatewayRequestRoutingRule(SubResource): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubR...
true
true
1c0dda5e04fedaf7c09edd63cc5486aaf2a48ef1
1,481
py
Python
open_context_url.py
evandrocoan/SublimePackageDefault
ff47d47b59fc3ff2c1146168605ed85ace1f3b0e
[ "Unlicense", "MIT" ]
3
2018-12-08T21:44:45.000Z
2019-03-01T03:22:32.000Z
open_context_url.py
evandrocoan/SublimePackageDefault
ff47d47b59fc3ff2c1146168605ed85ace1f3b0e
[ "Unlicense", "MIT" ]
null
null
null
open_context_url.py
evandrocoan/SublimePackageDefault
ff47d47b59fc3ff2c1146168605ed85ace1f3b0e
[ "Unlicense", "MIT" ]
null
null
null
import re import webbrowser import sublime_plugin rex = re.compile( r'''(?x) \b(?: https?://(?:(?:[\w\d\-]+(?:\.[\w\d\-.]+)+)|localhost)| # http:// www\.[\w\d\-]+(?:\.[\w\d\-.]+)+ # www. ) /?[\w\d\-.?,!'(){}\[\]/+&@%$#=:"|~;]* # url path ...
26.927273
91
0.454423
import re import webbrowser import sublime_plugin rex = re.compile( r'''(?x) \b(?: https?://(?:(?:[\w\d\-]+(?:\.[\w\d\-.]+)+)|localhost)| # http:// www\.[\w\d\-]+(?:\.[\w\d\-.]+)+ # www. ) /?[\w\d\-.?,!'(){}\[\]/+&@%$#=:"|~;]* # url path ...
true
true
1c0dda75480a16951d0bed5c554faf04aa7ac43e
17,798
py
Python
train-ucf24.py
alphadadajuju/online_action_two_stream
b6d717f89e5c36b3c7929b651b30fb1125fc5d42
[ "MIT" ]
null
null
null
train-ucf24.py
alphadadajuju/online_action_two_stream
b6d717f89e5c36b3c7929b651b30fb1125fc5d42
[ "MIT" ]
null
null
null
train-ucf24.py
alphadadajuju/online_action_two_stream
b6d717f89e5c36b3c7929b651b30fb1125fc5d42
[ "MIT" ]
null
null
null
""" Adapted from: @longcw faster_rcnn_pytorch: https://github.com/longcw/faster_rcnn_pytorch @rbgirshick py-faster-rcnn https://github.com/rbgirshick/py-faster-rcnn Which was adopated by: Ellis Brown, Max deGroot https://github.com/amdegroot/ssd.pytorch Further: Updated by Gurkirt Singh for uc...
42.578947
145
0.604281
import os import torch import torch.nn as nn import torch.optim as optim import torch.nn.init as init import argparse from torch.autograd import Variable import torch.utils.data as data from data import v2, UCF24Detection, AnnotationTransform, detection_collate, CLASSES, BaseTransform from utils.augmentations import ...
true
true
1c0ddb532a5a08bd40d86283cea98904f0b02401
2,629
py
Python
Poisson_Varying_Domain/Setup/Preprocess_Data.py
nw2190/ConvPDE
86f3fa67d64a6c56f3dff4d32999fe70db30795e
[ "MIT" ]
22
2019-05-21T16:35:49.000Z
2022-03-28T06:27:48.000Z
Poisson_Varying_Domain/Setup/Preprocess_Data.py
nw2190/ConvPDE
86f3fa67d64a6c56f3dff4d32999fe70db30795e
[ "MIT" ]
null
null
null
Poisson_Varying_Domain/Setup/Preprocess_Data.py
nw2190/ConvPDE
86f3fa67d64a6c56f3dff4d32999fe70db30795e
[ "MIT" ]
5
2019-05-22T05:19:21.000Z
2022-03-08T07:20:21.000Z
import os import sys import numpy as np import multiprocessing # Import flags specifying dataset parameters from setup_flags import getFlags def preprocess_data(start_index, data_count, data_dir, mesh_dir, soln_dir, RESCALE=True, use_hires=False): for i in range(start_index, start_index + data_count): i...
37.028169
136
0.610879
import os import sys import numpy as np import multiprocessing from setup_flags import getFlags def preprocess_data(start_index, data_count, data_dir, mesh_dir, soln_dir, RESCALE=True, use_hires=False): for i in range(start_index, start_index + data_count): if use_hires: hires_mesh = np.load...
true
true
1c0ddbe91ca48b18a7ab70020173365d47af4a8e
1,706
py
Python
src/models/mass_peak.py
RubyMarsden/Crayfish
33bbb1248beec2fc40eee59e462711dd8cbc33da
[ "MIT" ]
null
null
null
src/models/mass_peak.py
RubyMarsden/Crayfish
33bbb1248beec2fc40eee59e462711dd8cbc33da
[ "MIT" ]
8
2021-03-19T06:35:48.000Z
2021-03-31T14:23:24.000Z
src/models/mass_peak.py
RubyMarsden/Crayfish
33bbb1248beec2fc40eee59e462711dd8cbc33da
[ "MIT" ]
null
null
null
from models.mathbot import * from models.row import Row import math # contains the data for a single mass peak within a spot class MassPeak: def __init__(self, spotName, mpName, massAMUValues, countRowData, sbmRowData, countTime, numberOfScans): self.name = spotName + " " + mpName self.mpName = mp...
39.674419
108
0.709261
from models.mathbot import * from models.row import Row import math class MassPeak: def __init__(self, spotName, mpName, massAMUValues, countRowData, sbmRowData, countTime, numberOfScans): self.name = spotName + " " + mpName self.mpName = mpName self.rows = [] self.count_time = cou...
true
true
1c0ddc10ed7defe28d5505fcc198cf5211486d6e
2,309
py
Python
IPython/nbconvert/preprocessors/convertfigures.py
damianavila/ipython
4481c323e0d261685ad350fc6f437494b889ab12
[ "BSD-3-Clause-Clear" ]
2
2020-11-30T14:04:30.000Z
2021-11-08T11:29:05.000Z
IPython/nbconvert/preprocessors/convertfigures.py
RuSHi2381/ipython
4481c323e0d261685ad350fc6f437494b889ab12
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/nbconvert/preprocessors/convertfigures.py
RuSHi2381/ipython
4481c323e0d261685ad350fc6f437494b889ab12
[ "BSD-3-Clause-Clear" ]
1
2020-11-19T05:18:41.000Z
2020-11-19T05:18:41.000Z
"""Module containing a preprocessor that converts outputs in the notebook from one format to another. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license ...
35.523077
79
0.524469
from .base import Preprocessor from IPython.utils.traitlets import Unicode class ConvertFiguresPreprocessor(Preprocessor): from_format = Unicode(config=True, help='Format the converter accepts') to_format = Unicode(config=True, help='Format the converter writes') def __init__(self, **kw): supe...
true
true
1c0ddc50a693a502d599e35216115515087e17d4
7,811
py
Python
src/generate_password.py
bastianschildknecht/password-generator
3b3cbd7091002ad73a4307048ddc242358fefeb6
[ "MIT" ]
1
2022-03-17T18:26:43.000Z
2022-03-17T18:26:43.000Z
src/generate_password.py
bastianschildknecht/password-generator
3b3cbd7091002ad73a4307048ddc242358fefeb6
[ "MIT" ]
null
null
null
src/generate_password.py
bastianschildknecht/password-generator
3b3cbd7091002ad73a4307048ddc242358fefeb6
[ "MIT" ]
null
null
null
from datetime import timedelta import secrets import sys import argparse import humanize from colorama import Fore, Style UPPER_CASE_CHARS = set("ABCDEFGHIJKLMNOPQRSTUVWXYZ") LOWER_CASE_CHARS = set("abcdefghijklmnopqrstuvwxyz") NUMBER_CHARS = set("0123456789") SYMBOL_CHARS = set("!@#$%^&*()") SECONDS_IN_A_YEAR = 365...
34.715556
159
0.685316
from datetime import timedelta import secrets import sys import argparse import humanize from colorama import Fore, Style UPPER_CASE_CHARS = set("ABCDEFGHIJKLMNOPQRSTUVWXYZ") LOWER_CASE_CHARS = set("abcdefghijklmnopqrstuvwxyz") NUMBER_CHARS = set("0123456789") SYMBOL_CHARS = set("!@#$%^&*()") SECONDS_IN_A_YEAR = 365...
true
true
1c0ddc6dcd7e15c19518ca4d0490bc5af50d8ab8
2,080
py
Python
src/chess_zero/configs/normal.py
jimmyai/chess-alpha-zero
485db05e4061132a9dff4c36dc692ced72df0715
[ "MIT" ]
1,998
2017-11-19T13:18:22.000Z
2022-03-29T20:54:50.000Z
src/chess_zero/configs/normal.py
jimmyai/chess-alpha-zero
485db05e4061132a9dff4c36dc692ced72df0715
[ "MIT" ]
91
2017-11-19T17:29:56.000Z
2022-02-09T23:26:49.000Z
src/chess_zero/configs/normal.py
jimmyai/chess-alpha-zero
485db05e4061132a9dff4c36dc692ced72df0715
[ "MIT" ]
518
2017-11-20T22:20:28.000Z
2022-03-19T21:44:33.000Z
""" Contains the set of configs to use for the "normal" version of the app. """ class EvaluateConfig: def __init__(self): self.vram_frac = 1.0 self.game_num = 50 self.replace_rate = 0.55 self.play_config = PlayConfig() self.play_config.simulation_num_per_move = 200 se...
30.144928
85
0.640385
class EvaluateConfig: def __init__(self): self.vram_frac = 1.0 self.game_num = 50 self.replace_rate = 0.55 self.play_config = PlayConfig() self.play_config.simulation_num_per_move = 200 self.play_config.thinking_loop = 1 self.play_config.c_puct = 1 sel...
true
true
1c0ddd5627df0ddc726f40712ed853043beb27a2
5,820
py
Python
py/testdir_single_jvm/test_rf_covtype20x_fvec.py
gigliovale/h2o
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
[ "Apache-2.0" ]
882
2015-05-22T02:59:21.000Z
2022-02-17T05:02:48.000Z
py/testdir_single_jvm/test_rf_covtype20x_fvec.py
VonRosenchild/h2o-2
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
[ "Apache-2.0" ]
1
2022-02-22T12:15:02.000Z
2022-02-22T12:15:02.000Z
py/testdir_single_jvm/test_rf_covtype20x_fvec.py
VonRosenchild/h2o-2
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
[ "Apache-2.0" ]
392
2015-05-22T17:04:11.000Z
2022-02-22T09:04:39.000Z
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_rf, h2o_import as h2i, h2o_jobs, h2o_gbm DO_SMALL = True drf2ParamDict = { 'response': [None, 'C55'], 'max_depth': [None, 10,20,100], 'nbins': [None,5,10,100,1000], 'ignored_cols_by_name': [None,'C1','...
39.591837
126
0.614261
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_rf, h2o_import as h2i, h2o_jobs, h2o_gbm DO_SMALL = True drf2ParamDict = { 'response': [None, 'C55'], 'max_depth': [None, 10,20,100], 'nbins': [None,5,10,100,1000], 'ignored_cols_by_name': [None,'C1','...
false
true
1c0dddd45dc21494ff4c4bccf8214b04817bcd0e
1,624
py
Python
src/sentry/api/permissions.py
tobetterman/sentry
fe85d3aee19dcdbfdd27921c4fb04529fc995a79
[ "BSD-3-Clause" ]
1
2017-08-30T06:55:25.000Z
2017-08-30T06:55:25.000Z
src/sentry/api/permissions.py
tobetterman/sentry
fe85d3aee19dcdbfdd27921c4fb04529fc995a79
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/permissions.py
tobetterman/sentry
fe85d3aee19dcdbfdd27921c4fb04529fc995a79
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from rest_framework import permissions from sentry.auth.utils import is_active_superuser from sentry.models import ProjectKey class NoPermission(permissions.BasePermission): def has_permission(self, request, view): return False class ScopedPermission(permissions....
30.074074
75
0.679803
from __future__ import absolute_import from rest_framework import permissions from sentry.auth.utils import is_active_superuser from sentry.models import ProjectKey class NoPermission(permissions.BasePermission): def has_permission(self, request, view): return False class ScopedPermission(permissions....
true
true
1c0ddf4c6af27baf6b6bec70570fc36f6f3fac52
32,799
py
Python
Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
#! /usr/bin/env python from __future__ import print_function from builtins import range import os, sys, optparse, math copyargs = sys.argv[:] for i in range(len(copyargs)): if copyargs[i] == "": copyargs[i] = "\"\"" if copyargs[i].find(" ") != -1: copyargs[i] = "\"%s\"" % copyargs[i] commandli...
43.270449
243
0.659166
from __future__ import print_function from builtins import range import os, sys, optparse, math copyargs = sys.argv[:] for i in range(len(copyargs)): if copyargs[i] == "": copyargs[i] = "\"\"" if copyargs[i].find(" ") != -1: copyargs[i] = "\"%s\"" % copyargs[i] commandline = " ".join(copyargs)...
true
true
1c0de17dd42d7820ef7693ed0169a1d845c7a05e
14,971
py
Python
sdk/python/pulumi_azure_native/botservice/v20210301/bot_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/botservice/v20210301/bot_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/botservice/v20210301/bot_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
42.29096
677
0.637098
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['BotConnectionArgs', 'BotConnection'] @pulumi.input_type class BotConnectionArgs: def _...
true
true
1c0de218caac7d8e653906b06c8db5c2a212fa70
5,325
py
Python
sympy/matrices/densetools.py
shipci/sympy
4b59927bed992b980c9b3faac01becb36feef26b
[ "BSD-3-Clause" ]
1
2016-03-31T12:39:44.000Z
2016-03-31T12:39:44.000Z
sympy/matrices/densetools.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
null
null
null
sympy/matrices/densetools.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
3
2015-04-18T22:33:32.000Z
2015-09-23T06:45:07.000Z
""" Fundamental operations of dense matrices. The dense matrix is stored as a list of lists """ from sympy.core.compatibility import xrange from sympy import QQ def trace(matlist, K): """ Returns the trace of a matrix. Examples ======== >>> from sympy.matrices.densetools import trace, eye ...
21.130952
72
0.504413
from sympy.core.compatibility import xrange from sympy import QQ def trace(matlist, K): result = K.zero for i in xrange(len(matlist)): result += matlist[i][i] return result def transpose(matlist, K): return [list(a) for a in (zip(*matlist))] def conjugate(matlist, K): return [conjugat...
true
true
1c0de2c1bc9e1746ad68566ca11931f338237858
486
py
Python
raspberry/allskySCRIPT/dev/camera/fits_demosaicing.py
broadcastyourseb/SADR
5a8f7d5a30ae14a58427c9c09c56347eca6a17e9
[ "Apache-2.0" ]
1
2020-02-17T03:48:44.000Z
2020-02-17T03:48:44.000Z
raspberry/allskySCRIPT/dev/camera/fits_demosaicing.py
broadcastyourseb/SADR
5a8f7d5a30ae14a58427c9c09c56347eca6a17e9
[ "Apache-2.0" ]
15
2017-08-07T11:59:47.000Z
2017-08-14T21:28:01.000Z
raspberry/allskySCRIPT/dev/camera/fits_demosaicing.py
broadcastyourseb/SADR
5a8f7d5a30ae14a58427c9c09c56347eca6a17e9
[ "Apache-2.0" ]
null
null
null
import numpy as np from astropy.io import fits import colour import colour_demosaicing image = fits.getdata('/media/freebox/Allsky/2_Travail/2_Raspberry/test.fits', ext=0).astype(np.float_) / 255.0 # image = colour.orient(image, '90 CW') colour.write_image(image, '/media/freebox/Allsky/2_Travail/2_Raspberry/test.jp...
37.384615
161
0.802469
import numpy as np from astropy.io import fits import colour import colour_demosaicing image = fits.getdata('/media/freebox/Allsky/2_Travail/2_Raspberry/test.fits', ext=0).astype(np.float_) / 255.0 colour.write_image(image, '/media/freebox/Allsky/2_Travail/2_Raspberry/test.jpg') colour.write_image(colour_demosaicin...
true
true
1c0de31745220c1a4fd83e98f3660ccd5f5d4741
1,725
py
Python
ros/src/tl_detector/light_classification/tl_classifier.py
mohamedameen93/An-Autonomous-Vehicle-System-For-Udacity-s-Carla
a7ecd632c5f91f2d6037cbcb0cabff94e6e74869
[ "MIT" ]
11
2018-10-28T07:06:00.000Z
2022-02-17T09:20:46.000Z
ros/src/tl_detector/light_classification/tl_classifier.py
mohamedameen93/An-Autonomous-Vehicle-System-For-Udacity-s-Carla
a7ecd632c5f91f2d6037cbcb0cabff94e6e74869
[ "MIT" ]
7
2018-08-02T08:03:31.000Z
2018-08-22T12:42:32.000Z
ros/src/tl_detector/light_classification/tl_classifier.py
mohamedameen93/An-Autonomous-Vehicle-System-For-Udacity-s-Carla
a7ecd632c5f91f2d6037cbcb0cabff94e6e74869
[ "MIT" ]
4
2018-12-24T16:31:54.000Z
2022-01-14T15:14:10.000Z
import tensorflow as tf from styx_msgs.msg import TrafficLight PROTOBUG_GRAPH_FILE = 'light_classification/retrained_SSD/frozen_inference_graph.pb' class TLClassifier(object): def __init__(self): graph = tf.Graph() with graph.as_default(): od_graph_def = tf.GraphDef() wit...
34.5
84
0.632464
import tensorflow as tf from styx_msgs.msg import TrafficLight PROTOBUG_GRAPH_FILE = 'light_classification/retrained_SSD/frozen_inference_graph.pb' class TLClassifier(object): def __init__(self): graph = tf.Graph() with graph.as_default(): od_graph_def = tf.GraphDef() wit...
true
true
1c0de3dfbd7b02a1a2f41d2b8adb8cf67ff013d8
3,007
py
Python
oneflow/python/nn/modules/concat.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
null
null
null
oneflow/python/nn/modules/concat.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
null
null
null
oneflow/python/nn/modules/concat.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
31.989362
116
0.619554
import oneflow as flow from oneflow.python.nn.module import Module from oneflow.python.oneflow_export import oneflow_export, experimental_api from oneflow.python.framework.tensor import Tensor from oneflow.python.framework.tensor import register_tensor_op from typing import Optional, Sequence class Cat(Module...
true
true
1c0de5883fc864ffee9b5ec3c39fa9f4a8106541
9,604
py
Python
buildchain/buildchain/iso.py
SaintLoong/metalk8s
06fa3a731f35ab0f9ad8d3443fd8f8c4e7037432
[ "Apache-2.0" ]
255
2018-08-03T17:32:53.000Z
2022-03-25T21:51:00.000Z
buildchain/buildchain/iso.py
SaintLoong/metalk8s
06fa3a731f35ab0f9ad8d3443fd8f8c4e7037432
[ "Apache-2.0" ]
3,259
2018-08-03T00:25:56.000Z
2022-03-31T15:23:11.000Z
buildchain/buildchain/iso.py
SaintLoong/metalk8s
06fa3a731f35ab0f9ad8d3443fd8f8c4e7037432
[ "Apache-2.0" ]
43
2018-08-08T01:47:22.000Z
2022-03-12T17:49:41.000Z
# coding: utf-8 # pylint:disable=line-too-long """Tasks for the ISO generation. This module handles the creation of the final ISO, which involves: - creating the ISO's root - populating the ISO's tree - creating the ISO - inject the ISO data sectors checksum using 'isomd5sum' - computing the ISO's checksum Overview:...
34.177936
101
0.506976
import datetime as dt import socket from pathlib import Path from typing import Iterator, List, Tuple, Union import doit from buildchain import action from buildchain import config from buildchain import constants from buildchain import coreutils from buildchain import targets as helper from buildchain import typ...
true
true
1c0de5976411ceba81a1c3473602b886b263adc0
56,487
py
Python
evalml/tests/component_tests/test_components.py
peterataylor/evalml
917f07845c4a319bb08c7aaa8df9e09623df11c8
[ "BSD-3-Clause" ]
null
null
null
evalml/tests/component_tests/test_components.py
peterataylor/evalml
917f07845c4a319bb08c7aaa8df9e09623df11c8
[ "BSD-3-Clause" ]
null
null
null
evalml/tests/component_tests/test_components.py
peterataylor/evalml
917f07845c4a319bb08c7aaa8df9e09623df11c8
[ "BSD-3-Clause" ]
null
null
null
import importlib import inspect import os import warnings from unittest.mock import patch import cloudpickle import numpy as np import pandas as pd import pytest from skopt.space import Categorical from evalml.exceptions import ( ComponentNotYetFittedError, EnsembleMissingPipelinesError, MethodPropertyNot...
33.763897
190
0.6308
import importlib import inspect import os import warnings from unittest.mock import patch import cloudpickle import numpy as np import pandas as pd import pytest from skopt.space import Categorical from evalml.exceptions import ( ComponentNotYetFittedError, EnsembleMissingPipelinesError, MethodPropertyNot...
true
true
1c0de67b82f6aa4e8d6e06609e95db539ab941e3
82
py
Python
settings.py
zhj12138/ebook-manager
773974c9da3de1e79af4cfffe06ee1c546ef3e86
[ "MIT" ]
null
null
null
settings.py
zhj12138/ebook-manager
773974c9da3de1e79af4cfffe06ee1c546ef3e86
[ "MIT" ]
1
2020-10-05T10:47:04.000Z
2020-10-05T10:47:04.000Z
settings.py
zhj12138/ebook-manager
773974c9da3de1e79af4cfffe06ee1c546ef3e86
[ "MIT" ]
null
null
null
# 此文件存储用户的设置,以及一些重要的参数 # 需要将这些信息存储到一个文件中 # 每次打开应用时需要从文件中读取相应的参数 # 目前计划使用json文件存储
13.666667
22
0.829268
true
true
1c0de6b5c1f3d047f879195a5c32d5ee7d3eea5e
192
py
Python
Ch_8_Data Has to Go Somewhere/write_binary_file.py
brianchiang-tw/Introducing_Python
557fcddb6329741a177d6ee1d24122b36e106235
[ "MIT" ]
1
2020-07-21T08:34:08.000Z
2020-07-21T08:34:08.000Z
Ch_8_Data Has to Go Somewhere/write_binary_file.py
brianchiang-tw/Introducing_Python
557fcddb6329741a177d6ee1d24122b36e106235
[ "MIT" ]
null
null
null
Ch_8_Data Has to Go Somewhere/write_binary_file.py
brianchiang-tw/Introducing_Python
557fcddb6329741a177d6ee1d24122b36e106235
[ "MIT" ]
null
null
null
bdata = bytes(range(0,256)) file_length = len(bdata) print('length of binary file', file_length) # 'w' for write # 'b' for binary fout = open('bfile', 'wb') fout.write(bdata) fout.close()
14.769231
43
0.671875
bdata = bytes(range(0,256)) file_length = len(bdata) print('length of binary file', file_length) fout = open('bfile', 'wb') fout.write(bdata) fout.close()
true
true
1c0de6c3af253b7c6dadfe68024336a95100f8ed
21,338
py
Python
tests/components/homekit/test_type_covers.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
1
2017-05-30T22:21:05.000Z
2017-05-30T22:21:05.000Z
tests/components/homekit/test_type_covers.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
58
2020-08-03T07:33:02.000Z
2022-03-31T06:02:05.000Z
tests/components/homekit/test_type_covers.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
1
2021-08-16T02:53:15.000Z
2021-08-16T02:53:15.000Z
"""Test different accessory types: Covers.""" from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_CURRENT_TILT_POSITION, ATTR_POSITION, ATTR_TILT_POSITION, DOMAIN, SUPPORT_SET_POSITION, SUPPORT_SET_TILT_POSITION, SUPPORT_STOP, ) from homeassistant.components.homekit...
37.500879
92
0.74529
from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_CURRENT_TILT_POSITION, ATTR_POSITION, ATTR_TILT_POSITION, DOMAIN, SUPPORT_SET_POSITION, SUPPORT_SET_TILT_POSITION, SUPPORT_STOP, ) from homeassistant.components.homekit.const import ( ATTR_OBSTRUCTION_DETECTED,...
true
true
1c0de718d0f9f5c83999de53b71e5d2160c29bf1
1,640
py
Python
resources/lib/helpers/kodi_ops.py
CastagnaIT/script.appcast
a9c0d6c30316599d6892f944ac185a9331af4ec1
[ "BSD-2-Clause", "MIT" ]
2
2021-01-16T21:45:57.000Z
2021-01-24T06:31:16.000Z
resources/lib/helpers/kodi_ops.py
CastagnaIT/script.appcast
a9c0d6c30316599d6892f944ac185a9331af4ec1
[ "BSD-2-Clause", "MIT" ]
null
null
null
resources/lib/helpers/kodi_ops.py
CastagnaIT/script.appcast
a9c0d6c30316599d6892f944ac185a9331af4ec1
[ "BSD-2-Clause", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright (C) 2021 Stefano Gottardo (script.appcast) Generic Kodi operations SPDX-License-Identifier: MIT See LICENSES/MIT.md for more information. """ import json import xbmc from resources.lib.globals import G def json_rpc(method, params=None): """ Executes a J...
28.77193
88
0.645122
import json import xbmc from resources.lib.globals import G def json_rpc(method, params=None): request_data = {'jsonrpc': '2.0', 'method': method, 'id': 1, 'params': params or {}} request = json.dumps(request_data) raw_response = xbmc.executeJSONRPC(request) response = js...
true
true
1c0de7de82b19de7f72414a4debba822a4f05eb6
899
py
Python
share/qt/clean_mac_info_plist.py
ameri-coin/americoin
c67f6d9d340c16d206b4bfe1e679d44d14894a92
[ "MIT" ]
null
null
null
share/qt/clean_mac_info_plist.py
ameri-coin/americoin
c67f6d9d340c16d206b4bfe1e679d44d14894a92
[ "MIT" ]
null
null
null
share/qt/clean_mac_info_plist.py
ameri-coin/americoin
c67f6d9d340c16d206b4bfe1e679d44d14894a92
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Jonas Schnelli, 2013 # make sure the Americoin-Qt.app contains the right plist (including the right version) # fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267) from string import Template from datetime import date bitcoinDir = "./"; i...
29.966667
109
0.726363
from string import Template from datetime import date bitcoinDir = "./"; inFile = bitcoinDir+"/share/qt/Info.plist" outFile = "Americoin-Qt.app/Contents/Info.plist" version = "unknown"; fileForGrabbingVersion = bitcoinDir+"bitcoin-qt.pro" for line in open(fileForGrabbingVersion): lineArr = line.replace("...
false
true
1c0de7dfd2c5cc622fb9da8f2128c7fc72bdf191
337
py
Python
Voter.py
stellaloncaric/Dru-tveni-izbori-i-preferencijalno-glasanje
09e2562cbcd96ab25f0e6ff2a4d3d867a5265d98
[ "MIT" ]
null
null
null
Voter.py
stellaloncaric/Dru-tveni-izbori-i-preferencijalno-glasanje
09e2562cbcd96ab25f0e6ff2a4d3d867a5265d98
[ "MIT" ]
null
null
null
Voter.py
stellaloncaric/Dru-tveni-izbori-i-preferencijalno-glasanje
09e2562cbcd96ab25f0e6ff2a4d3d867a5265d98
[ "MIT" ]
null
null
null
def getChoicesList(voter): array = [] array.append(voter.get('1st')) array.append(voter.get('2nd')) array.append(voter.get('3rd')) return array class Voter: name = '' choices = [] def __init__(self, voter): self.name = voter.get('name') self.choices = getC...
21.0625
44
0.578635
def getChoicesList(voter): array = [] array.append(voter.get('1st')) array.append(voter.get('2nd')) array.append(voter.get('3rd')) return array class Voter: name = '' choices = [] def __init__(self, voter): self.name = voter.get('name') self.choices = getC...
true
true
1c0de8b23bf617fc430c8bbfa926e64ae5b5ba5e
2,624
py
Python
data/cirq_new/cirq_program/startCirq_pragma262.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_pragma262.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_pragma262.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=15 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np class Opty(cirq.PointOptimizer): def optimization_at( ...
32.395062
92
0.645579
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np class Opty(cirq.PointOptimizer): def optimization_at( self, circuit: 'cirq.Circuit', index: int, op: 'cirq.Operation' ) -> Optional[cirq.PointOpti...
true
true
1c0de9de994c28bec664f85237e2f73c62380ce3
3,147
py
Python
dask_image/ndmorph/__init__.py
jakirkham/dask-image
f28094d4ee705b015f3437ed60a9b0495031b156
[ "BSD-3-Clause" ]
null
null
null
dask_image/ndmorph/__init__.py
jakirkham/dask-image
f28094d4ee705b015f3437ed60a9b0495031b156
[ "BSD-3-Clause" ]
null
null
null
dask_image/ndmorph/__init__.py
jakirkham/dask-image
f28094d4ee705b015f3437ed60a9b0495031b156
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import scipy.ndimage from . import _utils from . import _ops from ..dispatch._dispatch_ndmorph import ( dispatch_binary_dilation, dispatch_binary_erosion) __all__ = [ "binary_closing", "binary_dilation", "binary_erosion", "binary_opening", ] @_utils._update_wrapper(sc...
25.379032
57
0.593263
import scipy.ndimage from . import _utils from . import _ops from ..dispatch._dispatch_ndmorph import ( dispatch_binary_dilation, dispatch_binary_erosion) __all__ = [ "binary_closing", "binary_dilation", "binary_erosion", "binary_opening", ] @_utils._update_wrapper(scipy.ndimage.binary_closi...
true
true
1c0debcbb44dd4da112faefb742f3f2ff777143c
11,448
py
Python
tests/smoke/obssmoke_test.py
garethdempsey/covid-19-test-result
3b967486f0f5c62c6ef7ed338f76b8c5864d3fb4
[ "MIT" ]
2
2021-03-12T14:16:45.000Z
2021-04-21T10:06:00.000Z
tests/smoke/obssmoke_test.py
garethdempsey/covid-19-test-result
3b967486f0f5c62c6ef7ed338f76b8c5864d3fb4
[ "MIT" ]
77
2021-03-10T12:19:10.000Z
2022-03-24T13:11:02.000Z
tests/smoke/obssmoke_test.py
garethdempsey/covid-19-test-result
3b967486f0f5c62c6ef7ed338f76b8c5864d3fb4
[ "MIT" ]
2
2021-04-11T07:31:39.000Z
2021-09-23T15:26:49.000Z
from typing import List from uuid import uuid4 from time import time import asyncio import pytest from smoke import conftest from aiohttp import ClientResponse from api_test_utils import env from api_test_utils import poll_until from api_test_utils.api_session_client import APISessionClient from api_test_utils.api_test...
34.690909
133
0.627795
from typing import List from uuid import uuid4 from time import time import asyncio import pytest from smoke import conftest from aiohttp import ClientResponse from api_test_utils import env from api_test_utils import poll_until from api_test_utils.api_session_client import APISessionClient from api_test_utils.api_test...
true
true
1c0decce160bf4cc938c67f7d28374323a85c7ac
11,696
py
Python
usaspending_api/awards/serializers.py
animatecitizen/usaspending-api
556511ff51fe80a8be8361daa5876fd684a04efe
[ "CC0-1.0" ]
null
null
null
usaspending_api/awards/serializers.py
animatecitizen/usaspending-api
556511ff51fe80a8be8361daa5876fd684a04efe
[ "CC0-1.0" ]
null
null
null
usaspending_api/awards/serializers.py
animatecitizen/usaspending-api
556511ff51fe80a8be8361daa5876fd684a04efe
[ "CC0-1.0" ]
null
null
null
from rest_framework import serializers from usaspending_api.accounts.serializers import TasSerializer from usaspending_api.awards.models import Award, FinancialAccountsByAwards, Subaward from usaspending_api.awards.models import TransactionNormalized, TransactionFPDS, TransactionFABS from usaspending_api.common.helper...
32.579387
116
0.531036
from rest_framework import serializers from usaspending_api.accounts.serializers import TasSerializer from usaspending_api.awards.models import Award, FinancialAccountsByAwards, Subaward from usaspending_api.awards.models import TransactionNormalized, TransactionFPDS, TransactionFABS from usaspending_api.common.helper...
true
true
1c0ded031d96057360cda2cd6ca332bccaf9543e
25,941
py
Python
pyxnat/core/search.py
onealbao/pyxnat
bd7e09a9751d9035b1f86fb9a9c5387c466fba84
[ "BSD-3-Clause" ]
null
null
null
pyxnat/core/search.py
onealbao/pyxnat
bd7e09a9751d9035b1f86fb9a9c5387c466fba84
[ "BSD-3-Clause" ]
null
null
null
pyxnat/core/search.py
onealbao/pyxnat
bd7e09a9751d9035b1f86fb9a9c5387c466fba84
[ "BSD-3-Clause" ]
null
null
null
import os import re import glob import csv import difflib try: from StringIO import StringIO except ImportError: from io import StringIO try: unicode except NameError: unicode = str from six import string_types from lxml import etree import json from .jsonutil import JsonTable, get_column, get_where, ...
35.102842
97
0.493582
import os import re import glob import csv import difflib try: from StringIO import StringIO except ImportError: from io import StringIO try: unicode except NameError: unicode = str from six import string_types from lxml import etree import json from .jsonutil import JsonTable, get_column, get_where, ...
true
true
1c0deea419d0b39e5fdc0937dea83a5a762c00e4
22,918
py
Python
test/test_parse_fr.py
filips123/lingua-franca
ef30cc0eaf3ad4d2d7340ba864564d12fd26dc54
[ "Apache-2.0" ]
null
null
null
test/test_parse_fr.py
filips123/lingua-franca
ef30cc0eaf3ad4d2d7340ba864564d12fd26dc54
[ "Apache-2.0" ]
null
null
null
test/test_parse_fr.py
filips123/lingua-franca
ef30cc0eaf3ad4d2d7340ba864564d12fd26dc54
[ "Apache-2.0" ]
1
2020-09-22T12:39:17.000Z
2020-09-22T12:39:17.000Z
# # Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
55.091346
79
0.544768
import unittest from datetime import datetime, time from lingua_franca import load_language, unload_language, set_default_lang from lingua_franca.internal import FunctionNotLocalizedError from lingua_franca.parse import get_gender from lingua_franca.parse import extract_datetime from lingua_franca.parse import extract...
true
true
1c0def2cb27ed6b73a3311b366ef6d86d637eb9d
1,959
py
Python
scripts/artifacts/chromeExtensions.py
gforce4n6/RLEAPP
1dc4e9769ff6bf5818b5b0dd079ea6016cc11133
[ "MIT" ]
26
2021-08-17T21:56:48.000Z
2022-03-21T09:35:01.000Z
scripts/artifacts/chromeExtensions.py
gforce4n6/RLEAPP
1dc4e9769ff6bf5818b5b0dd079ea6016cc11133
[ "MIT" ]
3
2021-08-19T01:28:23.000Z
2022-03-01T03:11:33.000Z
scripts/artifacts/chromeExtensions.py
gforce4n6/RLEAPP
1dc4e9769ff6bf5818b5b0dd079ea6016cc11133
[ "MIT" ]
10
2021-08-19T01:14:52.000Z
2022-03-13T08:38:19.000Z
import datetime import json import os from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows def get_chromeExtensions(files_found, report_folder, seeker, wrap_text): for file_found in files_found: file_found = str(file_found) ...
36.277778
110
0.612047
import datetime import json import os from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows def get_chromeExtensions(files_found, report_folder, seeker, wrap_text): for file_found in files_found: file_found = str(file_found) ...
true
true
1c0def501d02b869d0fb8e93e374cc3d935d0b00
5,987
py
Python
tests/expectdata/statements/fcst_capiq_cat_annual.py
nickderobertis/py-finstmt
7903bce83b31e4425ac680020bf7d3536ed1ed11
[ "MIT" ]
3
2021-11-30T21:03:25.000Z
2022-01-04T10:18:54.000Z
tests/expectdata/statements/fcst_capiq_cat_annual.py
nickderobertis/py-finstmt
7903bce83b31e4425ac680020bf7d3536ed1ed11
[ "MIT" ]
23
2020-03-24T18:14:22.000Z
2022-03-12T00:19:51.000Z
tests/expectdata/statements/fcst_capiq_cat_annual.py
whoopnip/py-finstmt
7903bce83b31e4425ac680020bf7d3536ed1ed11
[ "MIT" ]
3
2021-05-15T11:13:08.000Z
2021-11-30T21:03:28.000Z
import pandas as pd FCST_CAPIQ_CAT_A_INDEX_str = ["2019-12-31 00:00:00", "2020-12-31 00:00:00"] FCST_CAPIQ_CAT_A_INDEX = [pd.to_datetime(val) for val in FCST_CAPIQ_CAT_A_INDEX_str] FCST_CAPIQ_CAT_A_INDEX_DATA_DICT = dict( revenue=pd.Series( [54630.06518336638, 54538.284820343906], index=FCST_CAPIQ_...
27.3379
84
0.630867
import pandas as pd FCST_CAPIQ_CAT_A_INDEX_str = ["2019-12-31 00:00:00", "2020-12-31 00:00:00"] FCST_CAPIQ_CAT_A_INDEX = [pd.to_datetime(val) for val in FCST_CAPIQ_CAT_A_INDEX_str] FCST_CAPIQ_CAT_A_INDEX_DATA_DICT = dict( revenue=pd.Series( [54630.06518336638, 54538.284820343906], index=FCST_CAPIQ_...
true
true
1c0def68e3bc457b7b79689bfbdeb454a9b9581d
1,877
py
Python
app/email.py
VincentZhengg/skeleton
ee326c7027d0ca97007b71cb7f4b52af244c175c
[ "MIT" ]
null
null
null
app/email.py
VincentZhengg/skeleton
ee326c7027d0ca97007b71cb7f4b52af244c175c
[ "MIT" ]
null
null
null
app/email.py
VincentZhengg/skeleton
ee326c7027d0ca97007b71cb7f4b52af244c175c
[ "MIT" ]
null
null
null
from logging.handlers import SMTPHandler from threading import Thread from flask import current_app, render_template from flask_mail import Message from app.extensions import mail class SSLSMTPHandler(SMTPHandler): def emit(self, record): """ Emit a record. Format the record and send it...
33.517857
79
0.569526
from logging.handlers import SMTPHandler from threading import Thread from flask import current_app, render_template from flask_mail import Message from app.extensions import mail class SSLSMTPHandler(SMTPHandler): def emit(self, record): try: import smtplib from email.utils impo...
true
true
1c0defbb313ba84847dd243540ae291d5866556a
2,724
py
Python
coreapi/migrations/0001_initial.py
recentfahim/smartbusinessbd
61a74ae629f2c6e2317c41da23476c8780446e84
[ "Apache-2.0" ]
null
null
null
coreapi/migrations/0001_initial.py
recentfahim/smartbusinessbd
61a74ae629f2c6e2317c41da23476c8780446e84
[ "Apache-2.0" ]
null
null
null
coreapi/migrations/0001_initial.py
recentfahim/smartbusinessbd
61a74ae629f2c6e2317c41da23476c8780446e84
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.8 on 2020-03-22 18:36 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='City', fields=[ ...
43.238095
137
0.557636
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='City', fields=[ ('id', models.AutoField(auto_created=True,...
true
true
1c0df28a615c576b95370b8c14eac7f539949cb3
124,441
py
Python
ironicclient/tests/unit/osc/v1/test_baremetal_node.py
ljmcgann/python-ironicclient
a5485dc29fe551e4cb5feaad52cd93d67b0ab53e
[ "Apache-2.0" ]
null
null
null
ironicclient/tests/unit/osc/v1/test_baremetal_node.py
ljmcgann/python-ironicclient
a5485dc29fe551e4cb5feaad52cd93d67b0ab53e
[ "Apache-2.0" ]
null
null
null
ironicclient/tests/unit/osc/v1/test_baremetal_node.py
ljmcgann/python-ironicclient
a5485dc29fe551e4cb5feaad52cd93d67b0ab53e
[ "Apache-2.0" ]
null
null
null
# # Copyright 2015 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 law or agree...
32.347544
79
0.583883
import copy from unittest import mock from osc_lib.tests import utils as oscutils from ironicclient.common import utils as commonutils from ironicclient import exc from ironicclient.osc.v1 import baremetal_node from ironicclient.tests.unit.osc.v1 import fakes as baremetal_fakes from ironicclient.v1 import utils as v...
true
true
1c0df347bec3bf08a598349df1ac1d3197e8a012
6,549
py
Python
octobus/base.py
haokui/octobus
66ba4aaf24cc43cee0f1fec226df09a451b513c1
[ "BSD-3-Clause" ]
1
2021-04-30T09:32:51.000Z
2021-04-30T09:32:51.000Z
octobus/base.py
haokui/octobus
66ba4aaf24cc43cee0f1fec226df09a451b513c1
[ "BSD-3-Clause" ]
null
null
null
octobus/base.py
haokui/octobus
66ba4aaf24cc43cee0f1fec226df09a451b513c1
[ "BSD-3-Clause" ]
null
null
null
""" core APIs of the data models """ from collections import defaultdict import numpy as np import pandas as pd class FeatureSet: """ currently, just a named list of feature names """ def __init__(self, feature_names=None, name=None): self.feature_names = feature_names self.name = name...
30.460465
109
0.627424
from collections import defaultdict import numpy as np import pandas as pd class FeatureSet: def __init__(self, feature_names=None, name=None): self.feature_names = feature_names self.name = name def __getitem__(self, key): return self.feature_names[key] class DataSource: def __...
true
true
1c0df47367d1a48d77869c4276fc825b93a7b5bb
599
py
Python
lesscpy/lib/reserved.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
3
2018-11-27T06:30:23.000Z
2021-05-30T15:56:32.000Z
lesscpy/lib/reserved.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2018-11-15T02:00:31.000Z
2021-12-06T02:20:32.000Z
lesscpy/lib/reserved.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2018-04-04T12:38:47.000Z
2018-04-04T12:38:47.000Z
""" Reserved token names Copyright (c) See LICENSE for details. <jtm@robot.is> """ tokens = { '@media': 'css_media', '@page': 'css_page', '@import': 'css_import', '@charset': 'css_charset', '@font-face': 'css_font_face', '@namespace': 'css_namespace', '@keyframes': 'css_key...
22.185185
42
0.590985
tokens = { '@media': 'css_media', '@page': 'css_page', '@import': 'css_import', '@charset': 'css_charset', '@font-face': 'css_font_face', '@namespace': 'css_namespace', '@keyframes': 'css_keyframes', '@-moz-keyframes': 'css_keyframes', '@-webkit-keyframes': 'css_keyframes', '@-m...
true
true
1c0df5391c9a02986951d65840f2d157046f4034
1,802
py
Python
movie_gallery.py
kuldipem/udacity-movie-site
c39b585d0f743529a83a839970d21db3765a9d44
[ "MIT" ]
null
null
null
movie_gallery.py
kuldipem/udacity-movie-site
c39b585d0f743529a83a839970d21db3765a9d44
[ "MIT" ]
null
null
null
movie_gallery.py
kuldipem/udacity-movie-site
c39b585d0f743529a83a839970d21db3765a9d44
[ "MIT" ]
null
null
null
import movie import fresh_tomatoes # I have collecte my favourite movie and its most important # details together to build an intresting webpage dangal = movie.Movie('Dangal', 'Story about first indian woman wrestler.', 'https://upload.wikimedia.org/wikipedia/en/9/99/Dan' ...
51.485714
80
0.565483
import movie import fresh_tomatoes dangal = movie.Movie('Dangal', 'Story about first indian woman wrestler.', 'https://upload.wikimedia.org/wikipedia/en/9/99/Dan' +'gal_Poster.jpg', '') adhm = movie.Movie('Ae Dil Hai Muskil', ...
true
true
1c0df5460f50ac42081ca3d54ff4c21fa462867b
255
py
Python
src/test/test.py
tohyongcheng/pipspect
8090d9d80e47dff8d12b319246a39dcd1c384b7e
[ "MIT" ]
22
2016-05-06T01:00:49.000Z
2021-05-26T19:04:40.000Z
src/test/test.py
tohyongcheng/pipspect
8090d9d80e47dff8d12b319246a39dcd1c384b7e
[ "MIT" ]
1
2016-05-06T18:11:59.000Z
2016-05-07T03:47:24.000Z
src/test/test.py
tohyongcheng/pipspect
8090d9d80e47dff8d12b319246a39dcd1c384b7e
[ "MIT" ]
null
null
null
import unittest import mock from src import pipspect class TestPipSpect(unittest.TestCase): def setUp(self): pass def test_success(self): self.assertTrue(pipspect.pipspect(mock)) if __name__ == '__main__': unittest.main()
15.9375
48
0.694118
import unittest import mock from src import pipspect class TestPipSpect(unittest.TestCase): def setUp(self): pass def test_success(self): self.assertTrue(pipspect.pipspect(mock)) if __name__ == '__main__': unittest.main()
true
true
1c0df57fe174547f41fa2c6f19e0240e4f14622d
124,874
py
Python
python_scripts/shellies_discovery.py
ncosemans/Home-Assistant_Config
fdfe45c4e6c19d57300761a1e9b99c79c5801187
[ "MIT" ]
null
null
null
python_scripts/shellies_discovery.py
ncosemans/Home-Assistant_Config
fdfe45c4e6c19d57300761a1e9b99c79c5801187
[ "MIT" ]
null
null
null
python_scripts/shellies_discovery.py
ncosemans/Home-Assistant_Config
fdfe45c4e6c19d57300761a1e9b99c79c5801187
[ "MIT" ]
null
null
null
""" This script adds MQTT discovery support for Shellies devices. """ ATTR_MANUFACTURER = "Allterco Robotics" ATTR_POWER_AC = "ac" ATTR_RELAY = "relay" ATTR_ROLLER = "roller" ATTR_SHELLY = "Shelly" COMP_FAN = "fan" COMP_LIGHT = "light" COMP_SWITCH = "switch" CONF_DEVELOP = "develop" CONF_DISCOVERY_PREFIX = "discovery...
36.226864
810
0.643481
ATTR_MANUFACTURER = "Allterco Robotics" ATTR_POWER_AC = "ac" ATTR_RELAY = "relay" ATTR_ROLLER = "roller" ATTR_SHELLY = "Shelly" COMP_FAN = "fan" COMP_LIGHT = "light" COMP_SWITCH = "switch" CONF_DEVELOP = "develop" CONF_DISCOVERY_PREFIX = "discovery_prefix" CONF_EXPIRE_AFTER = "expire_after" CONF_EXT_SWITCH = "ext-swi...
true
true
1c0df58191b327751091342413219b206233a857
10,606
py
Python
modules/s3/sync_adapter/ftp.py
nursix/STL
682d8455c8e1c761f48542dad96da08767301923
[ "MIT" ]
1
2017-11-16T14:50:19.000Z
2017-11-16T14:50:19.000Z
modules/s3/sync_adapter/ftp.py
vpccalderara/sahana
6eb3f9798879dfa51bbe5d2b84829b1402671499
[ "MIT" ]
null
null
null
modules/s3/sync_adapter/ftp.py
vpccalderara/sahana
6eb3f9798879dfa51bbe5d2b84829b1402671499
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ S3 Synchronization: Peer Repository Adapter for FTP @copyright: 2015-2017 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to ...
35.119205
83
0.503111
import sys from gluon import * from ..s3sync import S3SyncBaseAdapter from ..s3query import S3URLQuery, FS from ..s3rest import S3Request from ..s3export import S3Exporter try: from cStringIO import StringIO except: from StringIO import StringIO class S3SyncAdapter(S3SyncBaseAdapter): def reg...
true
true
1c0df5cc7a87bc6a7e44ac100d261274cd575485
1,723
py
Python
tests/garage/tf/policies/test_categorical_policies.py
fangqyi/garage
ddafba385ef005f46f913ab352f9638760e5b412
[ "MIT" ]
1
2021-03-02T08:43:20.000Z
2021-03-02T08:43:20.000Z
tests/garage/tf/policies/test_categorical_policies.py
fangqyi/garage
ddafba385ef005f46f913ab352f9638760e5b412
[ "MIT" ]
null
null
null
tests/garage/tf/policies/test_categorical_policies.py
fangqyi/garage
ddafba385ef005f46f913ab352f9638760e5b412
[ "MIT" ]
null
null
null
""" This script creates a unittest that tests Categorical policies in garage.tf.policies. """ import gym import pytest from garage.envs import normalize from garage.np.baselines import LinearFeatureBaseline from garage.tf.algos import TRPO from garage.tf.envs import TfEnv from garage.tf.experiment import Lo...
34.46
79
0.679629
import gym import pytest from garage.envs import normalize from garage.np.baselines import LinearFeatureBaseline from garage.tf.algos import TRPO from garage.tf.envs import TfEnv from garage.tf.experiment import LocalTFRunner from garage.tf.optimizers import ConjugateGradientOptimizer from garage.tf.optimizer...
true
true
1c0df624bd162b9446e449186cc4855cf927da52
232,352
py
Python
src/tests/test_pagure_flask_ui_issues.py
yifengyou/learn-pagure
e54ba955368918c92ad2be6347b53bb2c24a228c
[ "Unlicense" ]
null
null
null
src/tests/test_pagure_flask_ui_issues.py
yifengyou/learn-pagure
e54ba955368918c92ad2be6347b53bb2c24a228c
[ "Unlicense" ]
null
null
null
src/tests/test_pagure_flask_ui_issues.py
yifengyou/learn-pagure
e54ba955368918c92ad2be6347b53bb2c24a228c
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ (c) 2015-2018 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon <pingou@pingoured.fr> """ from __future__ import unicode_literals, absolute_import from unittest.case import SkipTest import json import unittest import shutil import sys import os try: import pyclamd except Imp...
39.731874
235
0.498722
from __future__ import unicode_literals, absolute_import from unittest.case import SkipTest import json import unittest import shutil import sys import os try: import pyclamd except ImportError: pyclamd = None import pagure_messages import six import tempfile import re from datetime import datetime, timedel...
true
true
1c0df98cd4fec4509e83cacb67127d1048bd8fcc
1,245
py
Python
angus/plugins/cloud_audience/__init__.py
angus-ai/honorata
ab5261c1c392fdac70a8f6eb84739acb2098a5e7
[ "Apache-2.0" ]
null
null
null
angus/plugins/cloud_audience/__init__.py
angus-ai/honorata
ab5261c1c392fdac70a8f6eb84739acb2098a5e7
[ "Apache-2.0" ]
null
null
null
angus/plugins/cloud_audience/__init__.py
angus-ai/honorata
ab5261c1c392fdac70a8f6eb84739acb2098a5e7
[ "Apache-2.0" ]
null
null
null
# 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 this file exc...
33.648649
62
0.740562
from angus.pipeline.admin import Template from angus.pipeline.services.decompressor import Decompressor from angus.pipeline.services.web import FrameServer from .sceneanalysis import SceneAnalysisClient def templates(): return [ Template("cloud-audience", [ Decompressor, SceneAna...
true
true
1c0dfbb7f2e01a2f54e16fb82e1d24d8453904b7
2,093
py
Python
models/pointnet_cls.py
KaidongLi/pytorch-LatticePointClassifier
5c00bb0f808a928ea57acb8a79364d62eb955cee
[ "MIT" ]
null
null
null
models/pointnet_cls.py
KaidongLi/pytorch-LatticePointClassifier
5c00bb0f808a928ea57acb8a79364d62eb955cee
[ "MIT" ]
null
null
null
models/pointnet_cls.py
KaidongLi/pytorch-LatticePointClassifier
5c00bb0f808a928ea57acb8a79364d62eb955cee
[ "MIT" ]
1
2022-03-29T21:03:38.000Z
2022-03-29T21:03:38.000Z
import torch.nn as nn import torch.utils.data import torch.nn.functional as F from pointnet import PointNetEncoder, feature_transform_reguliarzer class get_model(nn.Module): def __init__(self, k=40, normal_channel=True): super(get_model, self).__init__() if normal_channel: channel = 6 ...
34.883333
94
0.637363
import torch.nn as nn import torch.utils.data import torch.nn.functional as F from pointnet import PointNetEncoder, feature_transform_reguliarzer class get_model(nn.Module): def __init__(self, k=40, normal_channel=True): super(get_model, self).__init__() if normal_channel: channel = 6 ...
true
true
1c0dfbd18b646e79b87f362a14acaa5f068ab1f0
4,696
py
Python
tally_ho/apps/tally/management/commands/import_staff_list.py
crononauta/tally-ho
ba2207bfaef27bee3ff13a393983ca493f767238
[ "Apache-2.0" ]
null
null
null
tally_ho/apps/tally/management/commands/import_staff_list.py
crononauta/tally-ho
ba2207bfaef27bee3ff13a393983ca493f767238
[ "Apache-2.0" ]
null
null
null
tally_ho/apps/tally/management/commands/import_staff_list.py
crononauta/tally-ho
ba2207bfaef27bee3ff13a393983ca493f767238
[ "Apache-2.0" ]
null
null
null
import codecs import csv from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy from tally_ho.libs.permissions import groups from tally_ho.apps.tally.models.user_profile import UserProfile STAFF_LIST_PATH = 'data/staff_list....
34.028986
84
0.643526
import codecs import csv from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy from tally_ho.libs.permissions import groups from tally_ho.apps.tally.models.user_profile import UserProfile STAFF_LIST_PATH = 'data/staff_list....
false
true
1c0dfd66fe96a9c50d7c993b8304b79ae41a56ad
2,875
py
Python
create_header.py
dullin/MATLAB-Header-Generator
a1c55fce494c0d31318a37d973645c2a6059a474
[ "MIT" ]
null
null
null
create_header.py
dullin/MATLAB-Header-Generator
a1c55fce494c0d31318a37d973645c2a6059a474
[ "MIT" ]
null
null
null
create_header.py
dullin/MATLAB-Header-Generator
a1c55fce494c0d31318a37d973645c2a6059a474
[ "MIT" ]
null
null
null
def create(fcn): #header = [] #header.append('%{} - ONELINEDESCRIPTION\n'.format(fcn['name'].upper())) #header.append('%MOREDESCRIPTION\n') #header.append('%\n') #header.append('% Syntax: ') # Have to append each line individually if I want to add indent at the end header = ['%{} - ONELINE...
35.060976
104
0.566957
def create(fcn): header = ['%{} - ONELINEDESCRIPTION\n'.format(fcn['name'].upper()), '%MOREDESCRIPTION\n', '%\n', '% Syntax: '] if fcn['output'] is not None: header.append('[{}'.format(fcn['output'][0])) if len(fcn['output']) > 1: ...
true
true
1c0dfe21c0c260a47eabec53a8065d95d39299fd
575
py
Python
app/database/main.py
space-logistics-org/spacenet
fd004437ed7b27dd6dc41a374e1dedfcea92e37d
[ "MIT" ]
1
2022-02-17T18:01:41.000Z
2022-02-17T18:01:41.000Z
app/database/main.py
space-logistics-org/spacenet
fd004437ed7b27dd6dc41a374e1dedfcea92e37d
[ "MIT" ]
2
2021-06-19T19:41:15.000Z
2021-07-21T17:07:48.000Z
app/database/main.py
space-logistics-org/spacenet
fd004437ed7b27dd6dc41a374e1dedfcea92e37d
[ "MIT" ]
3
2021-06-16T16:31:12.000Z
2022-02-17T18:02:57.000Z
""" This module includes application routers and static files used for the database editor. """ from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from sqlalchemy.orm import Session # define the application app = FastAPI( title="SpaceNet Database Editor", description="Application to edit S...
27.380952
87
0.76
from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from sqlalchemy.orm import Session app = FastAPI( title="SpaceNet Database Editor", description="Application to edit SpaceNet database objects.", version="0.0" ) from .api import main as api app.mount('/api', api.app) app.mount("/", ...
true
true
1c0dff2da6fdeffb450a6ee7942c63a781cdd8aa
353
py
Python
setup.py
wholewheattoast/quickshot
ef8d494f2ff2e486a270232e66fb96b48b3ee102
[ "Apache-2.0" ]
null
null
null
setup.py
wholewheattoast/quickshot
ef8d494f2ff2e486a270232e66fb96b48b3ee102
[ "Apache-2.0" ]
3
2021-02-04T01:26:00.000Z
2021-02-04T23:01:56.000Z
setup.py
wholewheattoast/quickshot
ef8d494f2ff2e486a270232e66fb96b48b3ee102
[ "Apache-2.0" ]
null
null
null
import setuptools setuptools.setup( name='Quickshot', version='1.2', author="Shawn Eisenach", author_email="shawn@wholewheattoast.com", packages=setuptools.find_packages(), description="A simple tool to visdiff two web pages.", long_description=open('README.md').read(), long_description...
27.153846
58
0.716714
import setuptools setuptools.setup( name='Quickshot', version='1.2', author="Shawn Eisenach", author_email="shawn@wholewheattoast.com", packages=setuptools.find_packages(), description="A simple tool to visdiff two web pages.", long_description=open('README.md').read(), long_description...
true
true
1c0dff8c46f0f98058f2a1127cf119506915b2a5
283
py
Python
BitManipulation/260.Single_Number_III/260.Single_Number_III_BitManipulation.py
patrickpeng0928/Leetcode
f0a7e0f951cd9a0bc7962b81ac61dd5fe33dcc15
[ "MIT" ]
null
null
null
BitManipulation/260.Single_Number_III/260.Single_Number_III_BitManipulation.py
patrickpeng0928/Leetcode
f0a7e0f951cd9a0bc7962b81ac61dd5fe33dcc15
[ "MIT" ]
null
null
null
BitManipulation/260.Single_Number_III/260.Single_Number_III_BitManipulation.py
patrickpeng0928/Leetcode
f0a7e0f951cd9a0bc7962b81ac61dd5fe33dcc15
[ "MIT" ]
null
null
null
class Solution(object): def singleNumberIIIBitManipulation(self, nums): """ Time - O(n) Space - O(1) :type nums: List[int] :rtype: int """ def singleNumberIIIBitManipulation2(self, nums): """ Time - O(n) Space - O(1) :type nums: List[int] :rtype: int """
15.722222
49
0.614841
class Solution(object): def singleNumberIIIBitManipulation(self, nums): def singleNumberIIIBitManipulation2(self, nums):
true
true
1c0dfffb38858ea3ef0f25acab7a83688645f6c3
2,421
py
Python
rasa_test/Scripts/plac_runner.py
mehtajinesh/MultipurposeChatBot
b51c7f1d91a48cccc3d6f7b9782ec21d0e4fc74b
[ "MIT" ]
null
null
null
rasa_test/Scripts/plac_runner.py
mehtajinesh/MultipurposeChatBot
b51c7f1d91a48cccc3d6f7b9782ec21d0e4fc74b
[ "MIT" ]
null
null
null
rasa_test/Scripts/plac_runner.py
mehtajinesh/MultipurposeChatBot
b51c7f1d91a48cccc3d6f7b9782ec21d0e4fc74b
[ "MIT" ]
null
null
null
#!d:\github\multipurposechatbot\rasa_test\scripts\python.exe from __future__ import with_statement import os import sys import shlex import plac def run(fnames, cmd, verbose): "Run batch scripts and tests" for fname in fnames: with open(fname) as f: lines = list(f) if not lines[0]....
33.164384
76
0.602644
from __future__ import with_statement import os import sys import shlex import plac def run(fnames, cmd, verbose): for fname in fnames: with open(fname) as f: lines = list(f) if not lines[0].startswith('#!'): sys.exit('Missing or incorrect shebang line!') firstline ...
true
true
1c0e011730b8b32bd5691d4ce94dddf712d9e95d
1,530
py
Python
src/bot/commands.py
ryanvilbrandt/discord_commission_queues
b13d908f73b8593b87280b66ce8128cd13899799
[ "MIT" ]
null
null
null
src/bot/commands.py
ryanvilbrandt/discord_commission_queues
b13d908f73b8593b87280b66ce8128cd13899799
[ "MIT" ]
null
null
null
src/bot/commands.py
ryanvilbrandt/discord_commission_queues
b13d908f73b8593b87280b66ce8128cd13899799
[ "MIT" ]
null
null
null
from typing import Optional from discord.ext.commands import Context, Cog, command, Bot from discord.ext.tasks import loop from src.bot.functions import Functions from src.db.db import Db class Commands(Cog): def __init__(self, bot: Bot): self.bot = bot self.f = Functions(bot) async def in...
30.6
81
0.687582
from typing import Optional from discord.ext.commands import Context, Cog, command, Bot from discord.ext.tasks import loop from src.bot.functions import Functions from src.db.db import Db class Commands(Cog): def __init__(self, bot: Bot): self.bot = bot self.f = Functions(bot) async def in...
true
true
1c0e015ed6b0ee54050a17d47d953a633d4bab88
4,912
py
Python
src/oci/apigateway/models/route_authorization_policy.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/apigateway/models/route_authorization_policy.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/apigateway/models/route_authorization_policy.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
39.934959
245
0.685057
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class RouteAuthorizationPolicy(object): TYPE_ANONYMOUS = "ANONYMOUS" TYPE_ANY_OF = "ANY_OF" TYPE_...
true
true
1c0e01c673e948c06d6edb9eae757f19def212d7
2,420
py
Python
tests/solvers/vi/vi_solver_test.py
qqhann/ShinRL
5f95f01d8061d1dc3ffdc84f4049ab88daa00758
[ "MIT" ]
34
2021-12-09T07:12:57.000Z
2022-03-11T08:17:20.000Z
tests/solvers/vi/vi_solver_test.py
qqhann/ShinRL
5f95f01d8061d1dc3ffdc84f4049ab88daa00758
[ "MIT" ]
null
null
null
tests/solvers/vi/vi_solver_test.py
qqhann/ShinRL
5f95f01d8061d1dc3ffdc84f4049ab88daa00758
[ "MIT" ]
4
2021-12-11T07:48:01.000Z
2022-03-01T23:50:33.000Z
from shinrl import DiscreteViSolver, Pendulum def test_vi_tabular_dp(): pend_env = Pendulum() pend_env.reset() config = DiscreteViSolver.DefaultConfig( explore="oracle", approx="tabular", eval_interval=3, add_interval=1, steps_per_epoch=10, ) mixins = Discre...
27.191011
65
0.659504
from shinrl import DiscreteViSolver, Pendulum def test_vi_tabular_dp(): pend_env = Pendulum() pend_env.reset() config = DiscreteViSolver.DefaultConfig( explore="oracle", approx="tabular", eval_interval=3, add_interval=1, steps_per_epoch=10, ) mixins = Discre...
true
true
1c0e01d6006da2dda46c43aba8e8098e1a6e449d
3,019
py
Python
14.py
Michael-Naguib/ProjectEuler
702ad04177b6dd2958b6c0b99682e7971612270c
[ "MIT" ]
null
null
null
14.py
Michael-Naguib/ProjectEuler
702ad04177b6dd2958b6c0b99682e7971612270c
[ "MIT" ]
1
2019-05-07T04:53:43.000Z
2019-05-08T19:32:30.000Z
14.py
Michael-N/ProjectEuler
702ad04177b6dd2958b6c0b99682e7971612270c
[ "MIT" ]
null
null
null
''' Author: Michael Sherif Naguib Date: November 5, 2018 @: University of Tulsa Question #14: Which starting number, under one million, produces the longest chain? Example: The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n i...
39.723684
200
0.639285
import math def collatz(x): if x//2 == x/2: return x/2 else: return 3*x+1 def sequenceLengthCollatz(n,use_found_lengths=[]): length=1 c=n while c!=1: c = collatz(c) for num_and_len in use_found_lengths: if c==num_and_len[0]: ...
true
true
1c0e01fdc0eb0d9ad5016a603a353cd1bca84808
589
py
Python
preprocess/extracted_audio_transcript.py
EUMSSI/EUMSSI-platform
9a88354f9baa1f4b4ddd2eee7e7273b0f2678056
[ "Apache-2.0" ]
1
2017-04-26T07:00:34.000Z
2017-04-26T07:00:34.000Z
preprocess/extracted_audio_transcript.py
EUMSSI/EUMSSI-platform
9a88354f9baa1f4b4ddd2eee7e7273b0f2678056
[ "Apache-2.0" ]
11
2015-06-09T08:59:42.000Z
2017-11-24T14:32:45.000Z
preprocess/extracted_audio_transcript.py
EUMSSI/EUMSSI-platform
9a88354f9baa1f4b4ddd2eee7e7273b0f2678056
[ "Apache-2.0" ]
1
2018-11-27T17:38:08.000Z
2018-11-27T17:38:08.000Z
#!/usr/bin/env python import datetime import json from extract_converter import ExtractConverter import click def convert(x): meta = " ".join([w['item'] for w in x['result']['content']]) available_data = ['audio_transcript'] return meta, available_data @click.command() @click.option('--reset', is_flag=...
23.56
99
0.70798
import datetime import json from extract_converter import ExtractConverter import click def convert(x): meta = " ".join([w['item'] for w in x['result']['content']]) available_data = ['audio_transcript'] return meta, available_data @click.command() @click.option('--reset', is_flag=True, help="reset data...
true
true
1c0e026fed11b995d1b0c70f420338f247cc01d7
2,534
py
Python
custom_components/hacs/repositories/plugin.py
Swampen/home-assistant-config
c9cd4027df1d460fd27d469a53804320a0d1aaa1
[ "MIT" ]
1,383
2018-06-23T20:16:57.000Z
2022-03-30T09:10:06.000Z
config/custom_components/hacs/repositories/plugin.py
jclark2019/home-assistant-config
a1354a8889e12b961fd16f4800c452b4fd0124f0
[ "MIT" ]
303
2020-10-16T18:38:06.000Z
2022-03-31T07:16:38.000Z
config/custom_components/hacs/repositories/plugin.py
jclark2019/home-assistant-config
a1354a8889e12b961fd16f4800c452b4fd0124f0
[ "MIT" ]
270
2018-12-17T05:54:10.000Z
2022-03-23T20:28:54.000Z
"""Class for plugins in HACS.""" import json from custom_components.hacs.exceptions import HacsException from custom_components.hacs.helpers.classes.repository import HacsRepository from custom_components.hacs.helpers.functions.information import find_file_name class HacsPluginRepository(HacsRepository): """Plug...
33.342105
97
0.622731
import json from custom_components.hacs.exceptions import HacsException from custom_components.hacs.helpers.classes.repository import HacsRepository from custom_components.hacs.helpers.functions.information import find_file_name class HacsPluginRepository(HacsRepository): def __init__(self, full_name): ...
true
true
1c0e02f2c8b0fa19db8636081dd481a88145fe58
1,228
py
Python
opencamlib/scripts/ocl_stlsurf_polydata.py
JohnyEngine/CNC
e4c77250ab2b749d3014022cbb5eb9924e939993
[ "Apache-2.0" ]
null
null
null
opencamlib/scripts/ocl_stlsurf_polydata.py
JohnyEngine/CNC
e4c77250ab2b749d3014022cbb5eb9924e939993
[ "Apache-2.0" ]
null
null
null
opencamlib/scripts/ocl_stlsurf_polydata.py
JohnyEngine/CNC
e4c77250ab2b749d3014022cbb5eb9924e939993
[ "Apache-2.0" ]
1
2020-07-04T13:58:00.000Z
2020-07-04T13:58:00.000Z
import ocl import camvtk import time if __name__ == "__main__": p = ocl.Point() p.x=7 p.y=8 p.z=-3 print p q = ocl.Point(1,2,3) r = p + q t = ocl.Triangle(p,q,r) print t s= ocl.STLSurf() print s s.addTriangle(t) s.addTriangle(t) print s print "end." ...
23.169811
77
0.601792
import ocl import camvtk import time if __name__ == "__main__": p = ocl.Point() p.x=7 p.y=8 p.z=-3 print p q = ocl.Point(1,2,3) r = p + q t = ocl.Triangle(p,q,r) print t s= ocl.STLSurf() print s s.addTriangle(t) s.addTriangle(t) print s print "end." ...
false
true
1c0e032a726b8a729c457500e8bc8a79b3b79f65
215
py
Python
setup.py
NiumXp/kastle
4734ef251a4ba4ff54af188f94c3a678c4527a1a
[ "MIT" ]
null
null
null
setup.py
NiumXp/kastle
4734ef251a4ba4ff54af188f94c3a678c4527a1a
[ "MIT" ]
2
2021-06-11T16:06:46.000Z
2021-06-13T15:43:11.000Z
setup.py
NiumXp/kastle
4734ef251a4ba4ff54af188f94c3a678c4527a1a
[ "MIT" ]
1
2021-06-10T17:06:19.000Z
2021-06-10T17:06:19.000Z
from setuptools import setup readme = '' with open('README.md') as f: readme = f.read() setup( name='kastle', description='A web framework for Python that prioritizes simplicity.', packages=['kastle'] )
15.357143
72
0.688372
from setuptools import setup readme = '' with open('README.md') as f: readme = f.read() setup( name='kastle', description='A web framework for Python that prioritizes simplicity.', packages=['kastle'] )
true
true
1c0e032f3cbdfaa7e0b30283ddcd36d2bf72ba29
4,641
py
Python
Object_detection_video.py
rajvi-tiwari/Vision_for_trash_bot
6ea82d0281d5ef1f6bbc6ad1bce07b43d74cff13
[ "Apache-2.0" ]
null
null
null
Object_detection_video.py
rajvi-tiwari/Vision_for_trash_bot
6ea82d0281d5ef1f6bbc6ad1bce07b43d74cff13
[ "Apache-2.0" ]
null
null
null
Object_detection_video.py
rajvi-tiwari/Vision_for_trash_bot
6ea82d0281d5ef1f6bbc6ad1bce07b43d74cff13
[ "Apache-2.0" ]
null
null
null
# This program uses a TensorFlow-trained classifier to perform object detection. # It loads the classifier and uses it to perform object detection on a video. # It draws boxes, scores, and labels around the objects of interest in each # frame of the video. ## Some of the code is copied from Google's example at #...
38.040984
123
0.742943
## https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb ## and some is copied from Dat Tran's example at import os import cv2 import numpy as np import tensorflow as tf import sys sys.path.append("..") from utils import label_map_util from utils...
true
true
1c0e0342104bb4bec1e89ffdec43651373cac7dc
27,356
py
Python
nuage_tempest_plugin/services/nuage_network_client.py
nuagenetworks/nuage-tempest-plugin
ac1bfb0709c7bbaf04017af3050fb3ed1ad1324a
[ "Apache-1.1" ]
1
2021-01-03T01:47:51.000Z
2021-01-03T01:47:51.000Z
nuage_tempest_plugin/services/nuage_network_client.py
nuagenetworks/nuage-tempest-plugin
ac1bfb0709c7bbaf04017af3050fb3ed1ad1324a
[ "Apache-1.1" ]
null
null
null
nuage_tempest_plugin/services/nuage_network_client.py
nuagenetworks/nuage-tempest-plugin
ac1bfb0709c7bbaf04017af3050fb3ed1ad1324a
[ "Apache-1.1" ]
1
2020-10-16T12:04:39.000Z
2020-10-16T12:04:39.000Z
# Copyright 2015 Alcatel-Lucent USA 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 l...
40.952096
79
0.634998
import json from six.moves.urllib import parse as urlparse from tempest.lib.common import rest_client as service_client from tempest.lib.common.utils import data_utils from nuage_tempest_plugin.lib.topology import Topology import nuage_tempest_plugin.lib.utils.constants as constants CONF = Topology.get_conf() cla...
true
true
1c0e03a0d7186cdf5d0cb9274bda004abb1dc838
7,981
py
Python
data/sentences.py
Kyumin-Park/mellotron
330081d4c23664686e8c68d74a9222ec4633ffa6
[ "BSD-3-Clause" ]
null
null
null
data/sentences.py
Kyumin-Park/mellotron
330081d4c23664686e8c68d74a9222ec4633ffa6
[ "BSD-3-Clause" ]
null
null
null
data/sentences.py
Kyumin-Park/mellotron
330081d4c23664686e8c68d74a9222ec4633ffa6
[ "BSD-3-Clause" ]
null
null
null
sentences = [ # # VCTK_unseen_reference # # parallel # "having guidelines in advance is helpful.", #3 # "another high street retailer was not so lucky.", #1 # "people have been placed in a state of alarm.", #1 # "finding suitable replacements would not be easy.", #2 ...
76.740385
693
0.67573
sentences = [ # "as long as it is possible, we will keep going.", #2 # "both were later released after a check-up.", #1 # "millions of british jobs depend on europe.", #5 # "i ...
true
true
1c0e03ab2ca9769eaecc4a1483379d3bdf3caedb
938
py
Python
tests/compat.py
taleinat/htmldammit
bde09689ded55e229f4158dfdda3b374ab56fe92
[ "MIT" ]
2
2018-01-15T16:40:54.000Z
2018-01-18T15:01:32.000Z
tests/compat.py
taleinat/htmldammit
bde09689ded55e229f4158dfdda3b374ab56fe92
[ "MIT" ]
null
null
null
tests/compat.py
taleinat/htmldammit
bde09689ded55e229f4158dfdda3b374ab56fe92
[ "MIT" ]
null
null
null
"""Compatibility support of testing tools for different Python versions""" # The required modules are installed as necessary for different Python # versions by `tox`. See `tox.ini` for details. import sys __all__ = [ 'unittest', 'mock', 'html_escape', ] # The `unittest2` module is a backport of the new un...
29.3125
78
0.719616
import sys __all__ = [ 'unittest', 'mock', 'html_escape', ] if sys.version_info < (3, 4): import unittest2 as unittest else: import unittest if sys.version_info < (3, 3): import mock else: import unittest.mock as mock if sys.version_info < (3, 2): from cgi import escape as html_escap...
true
true
1c0e05ba8c4eae30b215c46ba4b37e10d1f2d58b
1,141
py
Python
vim/eclim/autoload/eclim/python/rope/base/stdmods.py
muff1nman/Vim
5ace6423b7502ef84ef50f30226e7d67791139c3
[ "MIT" ]
null
null
null
vim/eclim/autoload/eclim/python/rope/base/stdmods.py
muff1nman/Vim
5ace6423b7502ef84ef50f30226e7d67791139c3
[ "MIT" ]
null
null
null
vim/eclim/autoload/eclim/python/rope/base/stdmods.py
muff1nman/Vim
5ace6423b7502ef84ef50f30226e7d67791139c3
[ "MIT" ]
null
null
null
import os import sys from rope.base import utils def _stdlib_path(): import inspect return os.path.dirname(inspect.getsourcefile(inspect)) @utils.cached(1) def standard_modules(): return python_modules() | dynload_modules() @utils.cached(1) def python_modules(): result = set() lib_path = _stdli...
27.829268
65
0.597721
import os import sys from rope.base import utils def _stdlib_path(): import inspect return os.path.dirname(inspect.getsourcefile(inspect)) @utils.cached(1) def standard_modules(): return python_modules() | dynload_modules() @utils.cached(1) def python_modules(): result = set() lib_path = _stdli...
true
true
1c0e07491724b1725bd1990bdcd45e7925958365
225
py
Python
havenir_officeutils/office_utils/doctype/supplier_balance_comparison/test_supplier_balance_comparison.py
ahmadpak/havenir_officeutils
c164a752017d9980618b9f5e55b70f958f8508a8
[ "MIT" ]
2
2020-09-11T13:27:47.000Z
2020-12-24T22:34:33.000Z
havenir_officeutils/office_utils/doctype/supplier_balance_comparison/test_supplier_balance_comparison.py
MohammadAhmad1990/havenir_officeutils
c164a752017d9980618b9f5e55b70f958f8508a8
[ "MIT" ]
null
null
null
havenir_officeutils/office_utils/doctype/supplier_balance_comparison/test_supplier_balance_comparison.py
MohammadAhmad1990/havenir_officeutils
c164a752017d9980618b9f5e55b70f958f8508a8
[ "MIT" ]
2
2019-11-17T16:46:16.000Z
2019-11-26T16:08:46.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2019, Havenir and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestSupplierBalanceComparison(unittest.TestCase): pass
20.454545
55
0.777778
from __future__ import unicode_literals import unittest class TestSupplierBalanceComparison(unittest.TestCase): pass
true
true
1c0e076a3e28fe1f263bd0d30e7c5bffed06b5de
694
py
Python
docparse2.py
akinorioyama/xmlcheck
514d585bbf6d649b4cd211defb3f8bc8c3c3745d
[ "MIT" ]
null
null
null
docparse2.py
akinorioyama/xmlcheck
514d585bbf6d649b4cd211defb3f8bc8c3c3745d
[ "MIT" ]
null
null
null
docparse2.py
akinorioyama/xmlcheck
514d585bbf6d649b4cd211defb3f8bc8c3c3745d
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET tree = ET.ElementTree(file='FR.xml') indent = 0 ignoreElems = ['/word/document.xml'] def printRecur(root, f): """Recursively prints the tree.""" # print('root tag:', root.tag, root.text) global indent if root.tag in ignoreElems: return f.write(' ' * inden...
27.76
98
0.606628
import xml.etree.ElementTree as ET tree = ET.ElementTree(file='FR.xml') indent = 0 ignoreElems = ['/word/document.xml'] def printRecur(root, f): global indent if root.tag in ignoreElems: return f.write(' ' * indent + '%s: %s' % (root.tag.title(), root.attrib.get('name', root.text))+"\r") ...
true
true
1c0e07fb3ac85899b7bda5a884b1de5d16857953
6,329
py
Python
tebless/widgets/window.py
Akhail/Tebless
87faff5547f168d0cf2d5caaf313c1efe1c19950
[ "MIT" ]
5
2017-09-20T02:12:25.000Z
2019-10-22T14:12:07.000Z
tebless/widgets/window.py
mdbetancourt/Tebless
87faff5547f168d0cf2d5caaf313c1efe1c19950
[ "MIT" ]
3
2021-06-14T14:20:53.000Z
2021-11-15T17:47:37.000Z
tebless/widgets/window.py
Akhail/Tebless
87faff5547f168d0cf2d5caaf313c1efe1c19950
[ "MIT" ]
1
2021-04-13T14:03:53.000Z
2021-04-13T14:03:53.000Z
# Copyright (c) 2017 Michel Betancourt # # This software is released under the MIT License. # https://opensource.org/licenses/MIT """ core.py Created by Michel Betancourt on 2017. Copyright (c) 2017 ACT. All rights reserved. """ __all__ = ['Window'] from time import sleep from threading import Thread from functools ...
29.853774
76
0.526149
__all__ = ['Window'] from time import sleep from threading import Thread from functools import partial from events import Events from tebless.utils import Store from tebless.devs import Widget, echo from tebless.utils.keyboard import KEY_ENTER, KEY_ESCAPE, KEY_DOWN, KEY_UP class Window(Widget): def __init__(s...
true
true
1c0e0820f7dccf96c317ae8de80fa5585e8581e0
1,182
py
Python
venv/Lib/site-packages/pandas/tests/arrays/masked/test_function.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
7
2022-01-16T12:28:16.000Z
2022-03-04T15:31:45.000Z
venv/Lib/site-packages/pandas/tests/arrays/masked/test_function.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
45
2019-06-12T20:35:20.000Z
2022-03-07T05:45:56.000Z
venv/Lib/site-packages/pandas/tests/arrays/masked/test_function.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
3
2020-08-04T02:48:32.000Z
2020-08-17T01:20:09.000Z
import numpy as np import pytest from pandas.core.dtypes.common import is_integer_dtype import pandas as pd import pandas._testing as tm arrays = [pd.array([1, 2, 3, None], dtype=dtype) for dtype in tm.ALL_EA_INT_DTYPES] arrays += [ pd.array([0.141, -0.268, 5.895, None], dtype=dtype) for dtype in tm.FLOAT_EA_DTY...
26.266667
87
0.701354
import numpy as np import pytest from pandas.core.dtypes.common import is_integer_dtype import pandas as pd import pandas._testing as tm arrays = [pd.array([1, 2, 3, None], dtype=dtype) for dtype in tm.ALL_EA_INT_DTYPES] arrays += [ pd.array([0.141, -0.268, 5.895, None], dtype=dtype) for dtype in tm.FLOAT_EA_DTY...
true
true
1c0e0ce77294141f0dd3f91db56b5ed1c60df4ec
3,526
py
Python
aliyun-python-sdk-sas/aliyunsdksas/request/v20181203/DescribeGroupedMaliciousFilesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-sas/aliyunsdksas/request/v20181203/DescribeGroupedMaliciousFilesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-sas/aliyunsdksas/request/v20181203/DescribeGroupedMaliciousFilesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# 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 u...
32.054545
88
0.762337
from aliyunsdkcore.request import RpcRequest from aliyunsdksas.endpoint import endpoint_data class DescribeGroupedMaliciousFilesRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Sas', '2018-12-03', 'DescribeGroupedMaliciousFiles','sas') self.set_method('POST') if hasattr(self, "endpoint_map...
true
true
1c0e0d3c57853fc0c19f206020c4f3caeba41d33
459
py
Python
sandman2/admin.py
0xflotus/sandman2
3cae8fd1881b0242336b99b64bebb81071b324b9
[ "Apache-2.0" ]
1,899
2015-01-04T02:36:31.000Z
2022-03-31T16:28:36.000Z
sandman2/admin.py
0xflotus/sandman2
3cae8fd1881b0242336b99b64bebb81071b324b9
[ "Apache-2.0" ]
251
2015-03-18T09:08:55.000Z
2022-03-21T17:25:13.000Z
sandman2/admin.py
0xflotus/sandman2
3cae8fd1881b0242336b99b64bebb81071b324b9
[ "Apache-2.0" ]
238
2015-03-18T09:04:20.000Z
2022-03-27T10:12:53.000Z
"""This module contains the custom admin class that allows for a nicer admin interface.""" # pylint: disable=maybe-no-member,too-few-public-methods # Third-party imports from flask_admin.contrib.sqla import ModelView class CustomAdminView(ModelView): # pylint: disable=no-init """Define custom templates for each...
30.6
76
0.742919
from flask_admin.contrib.sqla import ModelView class CustomAdminView(ModelView): list_template = 'list.html' create_template = 'create.html' edit_template = 'edit.html' column_display_pk = True
true
true
1c0e0d5d2a6945e9b1f5e9ba5001d5f297f4dc63
7,057
py
Python
src/test/tests/unit/compiler_warnings.py
eddieTest/visit
ae7bf6f5f16b01cf6b672d34e2d293fa7170616b
[ "BSD-3-Clause" ]
null
null
null
src/test/tests/unit/compiler_warnings.py
eddieTest/visit
ae7bf6f5f16b01cf6b672d34e2d293fa7170616b
[ "BSD-3-Clause" ]
null
null
null
src/test/tests/unit/compiler_warnings.py
eddieTest/visit
ae7bf6f5f16b01cf6b672d34e2d293fa7170616b
[ "BSD-3-Clause" ]
1
2020-03-18T23:17:43.000Z
2020-03-18T23:17:43.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: compiler_warnings.py # # Tests: changes in compiler warnings # # Mark C. Miller, Sun Jul 13 21:45:49 PDT 2014 # ---------------------------------------------------------------------------- import t...
33.131455
114
0.611025
import time, os.path, json, subprocess def ShouldSkip(srcfile, msg): srcfile_tmp = "global skip list" if srcfile in skip_list: srcfile_tmp = srcfile for skipmsg in skip_list[srcfile_tmp][0]: minlen = min(len(skipmsg),len(msg)) if msg[0:minlen] == skipmsg[0:minlen]: retur...
true
true
1c0e0e56d87d300cc80f9afefd8c1e5bbf96e609
2,872
py
Python
python/spacyNLP/2000sNLP.py
am0eba-byte/blues
9dfa4918ea6c97bc2473a8af479bd8df453db143
[ "CC0-1.0" ]
3
2021-02-20T15:16:12.000Z
2021-03-06T23:45:38.000Z
python/spacyNLP/2000sNLP.py
am0eba-byte/blues
9dfa4918ea6c97bc2473a8af479bd8df453db143
[ "CC0-1.0" ]
3
2021-04-26T17:56:01.000Z
2022-02-12T17:33:07.000Z
python/spacyNLP/2000sNLP.py
am0eba-byte/blues
9dfa4918ea6c97bc2473a8af479bd8df453db143
[ "CC0-1.0" ]
null
null
null
from collections import Counter import pygal import spacy # nlp = spacy.cli.download("en_core_web_sm") nlp = spacy.load('en_core_web_sm') lemmatizer = nlp.get_pipe("lemmatizer") nineties = open("rawLyrics/twothouLyricsNLP.txt", "r") words = nineties.read() ninetiesWords = nlp(words) def nouncollector(words): No...
30.88172
92
0.708217
from collections import Counter import pygal import spacy nlp = spacy.load('en_core_web_sm') lemmatizer = nlp.get_pipe("lemmatizer") nineties = open("rawLyrics/twothouLyricsNLP.txt", "r") words = nineties.read() ninetiesWords = nlp(words) def nouncollector(words): Nouns = [] count = 0 for token in words...
true
true
1c0e0f277dee6bd8089d98ea9166298954440eaf
17,463
py
Python
src/azure-cli/azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py
psignoret/azure-cli
1a4a043750315f9a7f2894b4287126089978b615
[ "MIT" ]
2
2020-08-08T11:00:25.000Z
2020-08-08T11:00:30.000Z
src/azure-cli/azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py
psignoret/azure-cli
1a4a043750315f9a7f2894b4287126089978b615
[ "MIT" ]
2
2021-01-15T09:24:07.000Z
2021-01-15T09:30:10.000Z
src/azure-cli/azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py
psignoret/azure-cli
1a4a043750315f9a7f2894b4287126089978b615
[ "MIT" ]
1
2020-11-12T01:49:27.000Z
2020-11-12T01:49:27.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
53.240854
470
0.657848
import os from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer from azure.cli.command_modules.ams._test_utils import _get_test_data_file class AmsStreamingPolicyTests(ScenarioTest): @ResourceGroupPreparer() @StorageAccountPreparer(parameter_name='storage_account_for_crea...
true
true
1c0e0fe6156fb90a68d907c3456c5f0674755bb6
27,727
py
Python
src/data/transform.py
chahuja/aisle
08d854f837767129eb454d32db8814d3b51a071e
[ "MIT" ]
13
2020-11-19T20:04:25.000Z
2022-03-17T09:54:54.000Z
src/data/transform.py
chahuja/aisle
08d854f837767129eb454d32db8814d3b51a071e
[ "MIT" ]
1
2021-09-22T12:13:17.000Z
2021-09-22T12:13:17.000Z
src/data/transform.py
chahuja/aisle
08d854f837767129eb454d32db8814d3b51a071e
[ "MIT" ]
2
2021-02-26T15:46:16.000Z
2021-09-22T05:50:27.000Z
import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import pickle as pkl from pathlib import Path from tqdm import tqdm from pathlib import Path import sklearn.cluster import sklearn.mixture import numpy as np imp...
34.920655
175
0.625167
import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import pickle as pkl from pathlib import Path from tqdm import tqdm from pathlib import Path import sklearn.cluster import sklearn.mixture import numpy as np imp...
true
true
1c0e0fe688b9cf7447d0a612fca7fa9fde95f34e
6,562
py
Python
src/data_explore.py
sarmstr5/kaggle_intel_mobleODT_cervix_classification
800e713a30827fc3701525b8e64c39ae97b7634a
[ "MIT" ]
null
null
null
src/data_explore.py
sarmstr5/kaggle_intel_mobleODT_cervix_classification
800e713a30827fc3701525b8e64c39ae97b7634a
[ "MIT" ]
null
null
null
src/data_explore.py
sarmstr5/kaggle_intel_mobleODT_cervix_classification
800e713a30827fc3701525b8e64c39ae97b7634a
[ "MIT" ]
null
null
null
import platform import os, pickle import pandas as pd def get_file_paths(): if 'c001' in platform.node(): # colfax cluster abspath_dataset_dir_train_1 = '/data/kaggle/train/Type_1' abspath_dataset_dir_train_2 = '/data/kaggle/train/Type_2' abspath_dataset_dir_train_3 = '/data/kaggle/tr...
44.945205
203
0.694453
import platform import os, pickle import pandas as pd def get_file_paths(): if 'c001' in platform.node(): abspath_dataset_dir_train_1 = '/data/kaggle/train/Type_1' abspath_dataset_dir_train_2 = '/data/kaggle/train/Type_2' abspath_dataset_dir_train_3 = '/data/kaggle/train/Type_3' ...
true
true
1c0e1065b413200fb7a4bfe51fc2e93b36214aba
3,230
py
Python
lib/models/dilated_linknet.py
BloodAxe/segmentation-networks-benchmark
2e3feb560102230be9369ab442b4a59cc86dff61
[ "MIT" ]
34
2018-04-16T07:53:27.000Z
2021-01-14T11:42:13.000Z
lib/models/dilated_linknet.py
BloodAxe/segmentation-networks-benchmark
2e3feb560102230be9369ab442b4a59cc86dff61
[ "MIT" ]
1
2019-02-11T10:43:31.000Z
2019-02-11T12:56:02.000Z
lib/models/dilated_linknet.py
BloodAxe/segmentation-networks-benchmark
2e3feb560102230be9369ab442b4a59cc86dff61
[ "MIT" ]
5
2018-05-16T05:58:33.000Z
2020-01-10T06:50:43.000Z
from torch import nn import torch from torchvision import models import torchvision from torch.nn import functional as F from lib.models.dilated_resnet import dilated_resnet34 class DecoderBlockLinkNet(nn.Module): def __init__(self, in_channels, n_filters): super().__init__() self.relu = nn.ReLU...
32.3
92
0.593498
from torch import nn import torch from torchvision import models import torchvision from torch.nn import functional as F from lib.models.dilated_resnet import dilated_resnet34 class DecoderBlockLinkNet(nn.Module): def __init__(self, in_channels, n_filters): super().__init__() self.relu = nn.ReLU...
true
true
1c0e107c9677c1b44b78d2f109eab84e72d22876
567
py
Python
micropython/p5_fan_speed.py
monkmakes/micro_bit_kit
fa8184fbbe54d721d9fc36dd57e2838263540769
[ "MIT" ]
null
null
null
micropython/p5_fan_speed.py
monkmakes/micro_bit_kit
fa8184fbbe54d721d9fc36dd57e2838263540769
[ "MIT" ]
null
null
null
micropython/p5_fan_speed.py
monkmakes/micro_bit_kit
fa8184fbbe54d721d9fc36dd57e2838263540769
[ "MIT" ]
null
null
null
from microbit import * min_power = 600 max_power = 1023 power_step = (max_power - min_power) / 9 speed = 0 def set_power(speed): display.show(str(speed)) if speed == 0: pin0.write_analog(0) else: pin0.write_analog(speed * power_step + min_power) set_power(speed) while True: if ...
20.25
57
0.574956
from microbit import * min_power = 600 max_power = 1023 power_step = (max_power - min_power) / 9 speed = 0 def set_power(speed): display.show(str(speed)) if speed == 0: pin0.write_analog(0) else: pin0.write_analog(speed * power_step + min_power) set_power(speed) while True: if ...
true
true
1c0e122c8200a043cdaf03cf9da7304d1ab4ddd1
4,387
py
Python
numcodecs/tests/test_shuffle.py
manishgit138/numcodecs
322baaca4162c43a6e37d4f4c0d0f0fd51faa554
[ "MIT" ]
1
2020-12-22T08:50:25.000Z
2020-12-22T08:50:25.000Z
numcodecs/tests/test_shuffle.py
manishgit138/numcodecs
322baaca4162c43a6e37d4f4c0d0f0fd51faa554
[ "MIT" ]
null
null
null
numcodecs/tests/test_shuffle.py
manishgit138/numcodecs
322baaca4162c43a6e37d4f4c0d0f0fd51faa554
[ "MIT" ]
null
null
null
from multiprocessing import Pool from multiprocessing.pool import ThreadPool import numpy as np import pytest try: from numcodecs.shuffle import Shuffle except ImportError: # pragma: no cover pytest.skip( "numcodecs.shuffle not available", allow_module_level=True ) from numcodecs.tests.common...
28.861842
81
0.649191
from multiprocessing import Pool from multiprocessing.pool import ThreadPool import numpy as np import pytest try: from numcodecs.shuffle import Shuffle except ImportError: pytest.skip( "numcodecs.shuffle not available", allow_module_level=True ) from numcodecs.tests.common import (check_enco...
true
true
1c0e12a1434ac2e80c050c430b8d3b715b99a8ee
727
py
Python
setup.py
fabaff/pywilight
f2b74aa4323cd0c677e2dae61430c3ab6374b7c5
[ "MIT" ]
1
2021-04-02T17:24:25.000Z
2021-04-02T17:24:25.000Z
setup.py
fabaff/pywilight
f2b74aa4323cd0c677e2dae61430c3ab6374b7c5
[ "MIT" ]
null
null
null
setup.py
fabaff/pywilight
f2b74aa4323cd0c677e2dae61430c3ab6374b7c5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import setuptools with open("README.md", "r") as fh: long_description = fh.read() version = '0.0.65' setuptools.setup( name="pywilight", version=version, author="Leonardo Figueiro", author_email="leoagfig@gmail.com", description="Python API for W...
25.964286
59
0.660248
import setuptools with open("README.md", "r") as fh: long_description = fh.read() version = '0.0.65' setuptools.setup( name="pywilight", version=version, author="Leonardo Figueiro", author_email="leoagfig@gmail.com", description="Python API for WiLight in Home Assistant", long_descriptio...
true
true
1c0e12b40610edb4ee768e98b7edd822cff7b10d
15,699
py
Python
rest_api/migrations/0001_initial.py
InspectorIncognito/gtfs-editor
4e3245f44ec44aeb2d28aa25786dc95a3193fb81
[ "MIT" ]
2
2021-10-01T16:11:20.000Z
2022-01-15T10:55:40.000Z
rest_api/migrations/0001_initial.py
InspectorIncognito/gtfs-editor
4e3245f44ec44aeb2d28aa25786dc95a3193fb81
[ "MIT" ]
3
2021-06-10T19:17:55.000Z
2022-03-05T08:37:46.000Z
rest_api/migrations/0001_initial.py
InspectorIncognito/gtfs-editor
4e3245f44ec44aeb2d28aa25786dc95a3193fb81
[ "MIT" ]
1
2022-03-05T08:37:53.000Z
2022-03-05T08:37:53.000Z
# Generated by Django 3.0.7 on 2020-10-01 20:31 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Agency', fields=[ ...
50.641935
143
0.559845
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Agency', fields=[ ('id', models.AutoField(auto_created=Tru...
true
true
1c0e13e8a8560f055dca3bbca961e4eca01a4e2c
19
py
Python
projects/pyviz-comms/test.py
quinn-dougherty/python-on-nix
910d3f6554acd4a4ef0425ebccd31104dccb283c
[ "Unlicense" ]
25
2021-10-30T19:54:59.000Z
2022-03-29T06:11:02.000Z
projects/pyviz-comms/test.py
quinn-dougherty/python-on-nix
910d3f6554acd4a4ef0425ebccd31104dccb283c
[ "Unlicense" ]
21
2021-10-19T01:09:38.000Z
2022-03-24T16:08:53.000Z
projects/pyviz-comms/test.py
quinn-dougherty/python-on-nix
910d3f6554acd4a4ef0425ebccd31104dccb283c
[ "Unlicense" ]
3
2022-01-25T20:25:13.000Z
2022-03-08T02:58:50.000Z
import pyviz_comms
9.5
18
0.894737
import pyviz_comms
true
true
1c0e15422f61fe7769e218e4e4574ed92145e1a6
11,874
py
Python
cogs/fun.py
blitzwolfz/DevilBot
147b7e2f5e4764a7a61437e494c95cb95569ec79
[ "Apache-2.0" ]
null
null
null
cogs/fun.py
blitzwolfz/DevilBot
147b7e2f5e4764a7a61437e494c95cb95569ec79
[ "Apache-2.0" ]
null
null
null
cogs/fun.py
blitzwolfz/DevilBot
147b7e2f5e4764a7a61437e494c95cb95569ec79
[ "Apache-2.0" ]
null
null
null
import discord from discord.ext import commands import asyncio, aiohttp, io import urllib.parse import secrets, typing, random class funCog(commands.Cog): """Fun commands""" def __init__(self, bot): self.bot = bot self.db_conn = bot.db_conn self.colour = 0xff9300 self.footer =...
46.382813
116
0.535203
import discord from discord.ext import commands import asyncio, aiohttp, io import urllib.parse import secrets, typing, random class funCog(commands.Cog): def __init__(self, bot): self.bot = bot self.db_conn = bot.db_conn self.colour = 0xff9300 self.footer = 'Bot developed by Devi...
true
true
1c0e15d5308b66d23ee71b97512d108369e339e4
2,229
py
Python
amigo/amigo.py
bt3gl/Google-Cloud-Platform-Security
6edd42fc04d38381c795da6d36fecafadd59a381
[ "Apache-2.0" ]
4
2019-10-28T03:12:50.000Z
2020-03-08T23:54:01.000Z
amigo/amigo.py
bt3gl/Google-Cloud-Platform-Security
6edd42fc04d38381c795da6d36fecafadd59a381
[ "Apache-2.0" ]
null
null
null
amigo/amigo.py
bt3gl/Google-Cloud-Platform-Security
6edd42fc04d38381c795da6d36fecafadd59a381
[ "Apache-2.0" ]
2
2020-03-08T23:54:03.000Z
2020-04-20T21:13:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # menu.py # # Entry point and CLI for Amigo. # from lib.reporter import Reporter from lib.analytics import Analytics from lib.util import read_config_file, save_to_json_file, print_to_stdout # TODO: Add CLI with ArgParse # SETEC-1480 def main(): config = r...
30.958333
114
0.472409
from lib.reporter import Reporter from lib.analytics import Analytics from lib.util import read_config_file, save_to_json_file, print_to_stdout def main(): config = read_config_file() # # ################################################...
true
true
1c0e16a7b0b221b77f5aaf1e5ce0729dd32074ae
360
py
Python
trash/dolo/tests/test_global_msplines.py
zhuang13atJHU/dolo
a40c82f3c87e7a051b56fb9d1a0d646433481167
[ "BSD-2-Clause" ]
1
2018-12-27T05:32:04.000Z
2018-12-27T05:32:04.000Z
trash/dolo/tests/test_global_msplines.py
zhuang13atJHU/dolo
a40c82f3c87e7a051b56fb9d1a0d646433481167
[ "BSD-2-Clause" ]
null
null
null
trash/dolo/tests/test_global_msplines.py
zhuang13atJHU/dolo
a40c82f3c87e7a051b56fb9d1a0d646433481167
[ "BSD-2-Clause" ]
null
null
null
import unittest class TestGlobal(unittest.TestCase): def test_global_solution(self): from dolo import yaml_import, time_iteration filename = 'examples/models/compat/rbc.yaml' model = yaml_import(filename) import time t1 = time.time() dr = time_iteration(mode...
18
71
0.663889
import unittest class TestGlobal(unittest.TestCase): def test_global_solution(self): from dolo import yaml_import, time_iteration filename = 'examples/models/compat/rbc.yaml' model = yaml_import(filename) import time t1 = time.time() dr = time_iteration(mode...
true
true
1c0e182162d6f53560af7ae99fa2ed6a5793a620
1,510
pyw
Python
VRCOrganizer/main.pyw
TurtleP/VRCOrganizer
99b535422b96985802975650010e86dcd6c150e2
[ "MIT" ]
null
null
null
VRCOrganizer/main.pyw
TurtleP/VRCOrganizer
99b535422b96985802975650010e86dcd6c150e2
[ "MIT" ]
null
null
null
VRCOrganizer/main.pyw
TurtleP/VRCOrganizer
99b535422b96985802975650010e86dcd6c150e2
[ "MIT" ]
null
null
null
import re import shutil import sys from datetime import datetime from pathlib import Path import pymsgbox def get_stat_value(stat_info: float) -> str: """ Grab the stat info and format it into a date time string. Something that we can properly parse. """ __timestamp = datetime.fromtimestamp(stat...
23.968254
90
0.637086
import re import shutil import sys from datetime import datetime from pathlib import Path import pymsgbox def get_stat_value(stat_info: float) -> str: __timestamp = datetime.fromtimestamp(stat_info) return __timestamp.strftime("%Y-%m-%d") def get_date(file_path: Path) -> str | None: __match = None ...
true
true
1c0e18db625c7fcded53743de916e41fd4ca792c
2,734
py
Python
lib/surface/compute/instances/set_scheduling.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/instances/set_scheduling.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/instances/set_scheduling.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
36.453333
75
0.743233
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.compute import base_classes from googlecloudsdk.calliope import arg_parsers from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.compute.instances import flag...
true
true
1c0e18ff534a31ee1e87175765c250a9ec9a8d0f
11,183
py
Python
database/study_models.py
changchunlei/beiwe-backend
88546daa6750a6b8a5a795b020cf47dbd0a09343
[ "BSD-3-Clause" ]
null
null
null
database/study_models.py
changchunlei/beiwe-backend
88546daa6750a6b8a5a795b020cf47dbd0a09343
[ "BSD-3-Clause" ]
null
null
null
database/study_models.py
changchunlei/beiwe-backend
88546daa6750a6b8a5a795b020cf47dbd0a09343
[ "BSD-3-Clause" ]
null
null
null
import operator from datetime import datetime from typing import Optional from dateutil.tz import gettz from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.db.models import F, Func from django.utils import timezone from django.utils.timezone import localtime from config.cons...
46.40249
110
0.720647
import operator from datetime import datetime from typing import Optional from dateutil.tz import gettz from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.db.models import F, Func from django.utils import timezone from django.utils.timezone import localtime from config.cons...
true
true
1c0e1977f8e6a53db4197a0830a24b83cbe066d6
286
py
Python
python_activity_1/pyAct1.py
rglukins/activities
b9d7366440e06d0b451c8e0fa14e680c712279ad
[ "MIT" ]
null
null
null
python_activity_1/pyAct1.py
rglukins/activities
b9d7366440e06d0b451c8e0fa14e680c712279ad
[ "MIT" ]
null
null
null
python_activity_1/pyAct1.py
rglukins/activities
b9d7366440e06d0b451c8e0fa14e680c712279ad
[ "MIT" ]
null
null
null
import os import csv cereal_csv_path = os.path.join(".", "Resources", "cereal.csv") with open(cereal_csv_path, newline = "") as csvfile: csv_reader = csv.reader (csvfile, delimiter =",") for row in csv_reader: if(float(row[7]) >= 5): print(row)
20.428571
62
0.601399
import os import csv cereal_csv_path = os.path.join(".", "Resources", "cereal.csv") with open(cereal_csv_path, newline = "") as csvfile: csv_reader = csv.reader (csvfile, delimiter =",") for row in csv_reader: if(float(row[7]) >= 5): print(row)
true
true
1c0e198db8974e3f2c003e04003222a209329e5c
7,834
py
Python
benchmark/agents/maac/tf_policy.py
beark007/smarts_ppo
8f6aa33a6fcfb74dc0b8e92951d6b70d6e2874de
[ "MIT" ]
null
null
null
benchmark/agents/maac/tf_policy.py
beark007/smarts_ppo
8f6aa33a6fcfb74dc0b8e92951d6b70d6e2874de
[ "MIT" ]
null
null
null
benchmark/agents/maac/tf_policy.py
beark007/smarts_ppo
8f6aa33a6fcfb74dc0b8e92951d6b70d6e2874de
[ "MIT" ]
null
null
null
# MIT License # # Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved. # # 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 th...
33.91342
87
0.704876
import numpy as np from collections import OrderedDict from gym import spaces from ray.rllib.models.preprocessors import Preprocessor from ray.rllib.agents.trainer_template import build_trainer from ray.rllib.agents.trainer import with_common_config from ray.rllib.agents.a3c.a3c_tf_policy import A3CLoss from ray.rlli...
true
true
1c0e19ec63393c9112a854a0f3d764c5f3839fa6
76,214
py
Python
deerlab/model.py
thcasey3/DeerLab
27ff814fb8c2771740bd7928f283c1f70e88215c
[ "MIT" ]
null
null
null
deerlab/model.py
thcasey3/DeerLab
27ff814fb8c2771740bd7928f283c1f70e88215c
[ "MIT" ]
null
null
null
deerlab/model.py
thcasey3/DeerLab
27ff814fb8c2771740bd7928f283c1f70e88215c
[ "MIT" ]
null
null
null
# model.py - DeerLab's modelling interface # --------------------------------------------------------------------------- # This file is a part of DeerLab. License is MIT (see LICENSE.md). # Copyright(c) 2019-2021: Luis Fabregas, Stefan Stoll and other contributors. import numpy as np from scipy.sparse.construct...
45.230861
244
0.540859
# --------------------------------------------------------------------------- # This file is a part of DeerLab. License is MIT (see LICENSE.md). # Copyright(c) 2019-2021: Luis Fabregas, Stefan Stoll and other contributors. import numpy as np from scipy.sparse.construct import block_diag from scipy.optimize impo...
true
true
1c0e1b25222355deacaa88969cb961d0bc018eb4
895
py
Python
configs/segformer/segformer_mit_fuse-b0_256x256_20k_nyuv2.py
h1063135843/mmsegmentation
b10f32691916e609807f8414f8b95e70ac22b3b3
[ "Apache-2.0" ]
3
2021-08-10T14:00:18.000Z
2021-08-11T13:04:20.000Z
configs/segformer/segformer_mit_fuse-b0_256x256_20k_nyuv2.py
h1063135843/mmsegmentation
b10f32691916e609807f8414f8b95e70ac22b3b3
[ "Apache-2.0" ]
null
null
null
configs/segformer/segformer_mit_fuse-b0_256x256_20k_nyuv2.py
h1063135843/mmsegmentation
b10f32691916e609807f8414f8b95e70ac22b3b3
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../_base_/models/segformer_mit-b0.py', '../_base_/datasets/nyu_v2.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py' ] model = dict( pretrained='pretrain/mit_b0.pth', backbone=dict(type='EDFT',backbone="Segformer",in_channels=4), decode_head=dict(num_classes=40)...
24.189189
75
0.618994
_base_ = [ '../_base_/models/segformer_mit-b0.py', '../_base_/datasets/nyu_v2.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py' ] model = dict( pretrained='pretrain/mit_b0.pth', backbone=dict(type='EDFT',backbone="Segformer",in_channels=4), decode_head=dict(num_classes=40)...
true
true
1c0e1b52b4bbb3232a876106d71c17aaf0c8f26a
206
py
Python
placement-algorithms/example/algorithm.py
my5G/OPlaceRAN
cc6fe5223b9b2a32d7963b2304762fe2a0265298
[ "Apache-2.0" ]
1
2022-02-22T07:19:59.000Z
2022-02-22T07:19:59.000Z
placement-algorithms/example/algorithm.py
my5G/OPlaceRAN
cc6fe5223b9b2a32d7963b2304762fe2a0265298
[ "Apache-2.0" ]
1
2022-01-15T20:26:01.000Z
2022-01-15T20:26:01.000Z
placement-algorithms/example/algorithm.py
my5G/OPlaceRAN
cc6fe5223b9b2a32d7963b2304762fe2a0265298
[ "Apache-2.0" ]
1
2022-01-07T18:49:10.000Z
2022-01-07T18:49:10.000Z
import time from utils import output_result, initial_validation initial_validation() # Placement algorithm execution # time.sleep(60*15) output_result([{"id": "1", "ru": "16", "cu": "16", "du": "16"}])
18.727273
64
0.68932
import time from utils import output_result, initial_validation initial_validation() output_result([{"id": "1", "ru": "16", "cu": "16", "du": "16"}])
true
true
1c0e1bcef68a421826435f13e42b8d34f7f6c499
2,449
py
Python
pyfr/util.py
jappa/PyFR
d99120c1db245c7a2a35c72dae51ea72c49efef5
[ "BSD-3-Clause" ]
null
null
null
pyfr/util.py
jappa/PyFR
d99120c1db245c7a2a35c72dae51ea72c49efef5
[ "BSD-3-Clause" ]
null
null
null
pyfr/util.py
jappa/PyFR
d99120c1db245c7a2a35c72dae51ea72c49efef5
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from contextlib import contextmanager import functools as ft import io import itertools as it import os import cPickle as pickle import shutil class memoize(object): def __init__(self, func): self.func = func def __get__(self, instance, owner): return self.func if ins...
21.295652
77
0.602695
from contextlib import contextmanager import functools as ft import io import itertools as it import os import cPickle as pickle import shutil class memoize(object): def __init__(self, func): self.func = func def __get__(self, instance, owner): return self.func if instance is None else ft.pa...
true
true
1c0e1cfd24c9faf9ecf91e1467e5f5150b4a40ab
1,367
py
Python
tuir/exceptions.py
c4pt0r/tuir
ba3435cca3e4e66c029230e523fa24b775378874
[ "MIT" ]
7
2021-05-21T20:40:57.000Z
2022-03-08T09:18:01.000Z
tuir/exceptions.py
c4pt0r/tuir
ba3435cca3e4e66c029230e523fa24b775378874
[ "MIT" ]
null
null
null
tuir/exceptions.py
c4pt0r/tuir
ba3435cca3e4e66c029230e523fa24b775378874
[ "MIT" ]
1
2022-03-07T14:52:33.000Z
2022-03-07T14:52:33.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals class EscapeInterrupt(Exception): "Signal that the ESC key has been pressed" class ConfigError(Exception): "There was a problem with the configuration" class TUIRError(Exception): "Base TUIR error class" class AccountError(TUIRError): ...
21.359375
77
0.734455
from __future__ import unicode_literals class EscapeInterrupt(Exception): class ConfigError(Exception): class TUIRError(Exception): class AccountError(TUIRError): class SubmissionError(TUIRError): class SubredditError(TUIRError): class NoSubmissionsError(TUIRError): def __init__(self, name): ...
true
true