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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f72c7eba9adcee72dd6bb67f5e168999469e292c
1,058
py
Python
XXBDailyFresh/apps/user/urls.py
sixTiger/XXBDailyFresh
5c6976eff8e073f79b50e7829e10332ccd8df43d
[ "MIT" ]
null
null
null
XXBDailyFresh/apps/user/urls.py
sixTiger/XXBDailyFresh
5c6976eff8e073f79b50e7829e10332ccd8df43d
[ "MIT" ]
null
null
null
XXBDailyFresh/apps/user/urls.py
sixTiger/XXBDailyFresh
5c6976eff8e073f79b50e7829e10332ccd8df43d
[ "MIT" ]
null
null
null
"""XXBDailyFresh URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
39.185185
81
0.680529
from django.urls import path from apps.user.views import RegisterView urlpatterns = [ path('register/', RegisterView.as_view(), name='register'), ]
true
true
f72c7fa8536014c7a70bc5bf40a892ab8804afca
4,820
py
Python
Tsukihime/nscript_parser.py
Samyuth/LomandoCrawler
2d6bc7bd79678b78ac7c30e88b72127134e99b91
[ "MIT" ]
null
null
null
Tsukihime/nscript_parser.py
Samyuth/LomandoCrawler
2d6bc7bd79678b78ac7c30e88b72127134e99b91
[ "MIT" ]
1
2022-03-31T09:40:48.000Z
2022-03-31T09:44:48.000Z
Tsukihime/nscript_parser.py
Samyuth/LomandoCrawler
2d6bc7bd79678b78ac7c30e88b72127134e99b91
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Mar 16 02:05:23 2022 @author: Sagi """ ''' Sample choice node text: ;-BLOCK------------------------------------------------------------------------- *f20 # Label gosub *regard_update !sd if %sceneskip==1 && %1020==1 skip 4 gosub *s20 mov %1020,1 skip 9 `You have already vie...
27.542857
94
0.527386
import re from Graph import * class TextNode(): def __init__(self, label=None, text=None, children=None): if label is not None: self.label = label else: self.label = None if text is not None: self.text = text else: self.text = "" ...
true
true
f72c80155df71399c41c13f3793341aca06db318
2,677
py
Python
plugins/cylance_protect/unit_test/test_update_agent.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/cylance_protect/unit_test/test_update_agent.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/cylance_protect/unit_test/test_update_agent.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
import sys import os sys.path.append(os.path.abspath("../")) from unittest import TestCase from icon_cylance_protect.connection.connection import Connection from icon_cylance_protect.actions.update_agent import UpdateAgent import json import logging class TestUpdateAgent(TestCase): def test_integration_update_a...
36.671233
116
0.668285
import sys import os sys.path.append(os.path.abspath("../")) from unittest import TestCase from icon_cylance_protect.connection.connection import Connection from icon_cylance_protect.actions.update_agent import UpdateAgent import json import logging class TestUpdateAgent(TestCase): def test_integration_update_a...
true
true
f72c80b9bc4510e5476205c3adf1bfd5dea678af
1,931
py
Python
model-optimizer/extensions/front/onnx/detectionoutput_ext.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
2
2020-11-18T14:14:06.000Z
2020-11-28T04:55:57.000Z
model-optimizer/extensions/front/onnx/detectionoutput_ext.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
30
2020-11-13T11:44:07.000Z
2022-02-21T13:03:16.000Z
model-optimizer/extensions/front/onnx/detectionoutput_ext.py
mmakridi/openvino
769bb7709597c14debdaa356dd60c5a78bdfa97e
[ "Apache-2.0" ]
3
2021-03-09T08:27:29.000Z
2021-04-07T04:58:54.000Z
""" Copyright (C) 2018-2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
43.886364
109
0.684619
from math import log import numpy as np from extensions.ops.detectionoutput_onnx import ExperimentalDetectronDetectionOutput from mo.front.extractor import FrontExtractorOp from mo.front.onnx.extractors.utils import onnx_attr class ExperimentalDetectronDetectionOutputFrontExtractor(FrontExtractorOp): op = 'Exp...
true
true
f72c811a9b903e14fbd5d11e5e45b9449c6237b3
2,159
py
Python
test/chemistry/test_driver_gaussian_extra.py
hushaohan/aqua
8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d
[ "Apache-2.0" ]
2
2020-06-29T16:08:12.000Z
2020-08-07T22:42:13.000Z
test/chemistry/test_driver_gaussian_extra.py
hushaohan/aqua
8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d
[ "Apache-2.0" ]
null
null
null
test/chemistry/test_driver_gaussian_extra.py
hushaohan/aqua
8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d
[ "Apache-2.0" ]
1
2022-01-25T07:09:10.000Z
2022-01-25T07:09:10.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
36.59322
85
0.672534
import unittest from test.chemistry import QiskitChemistryTestCase from qiskit.chemistry.drivers import GaussianDriver def _check_valid(): pass class TestDriverGaussianExtra(QiskitChemistryTestCase): def setUp(self): super().setUp() self.good_check = GaussianDriver._check_valid ...
true
true
f72c82f4acdaefe35bcc5d195dbe520974fda99d
1,269
py
Python
qiskit_nature/algorithms/excited_states_solvers/__init__.py
divshacker/qiskit-nature
08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb
[ "Apache-2.0" ]
132
2021-01-28T14:51:11.000Z
2022-03-25T21:10:47.000Z
qiskit_nature/algorithms/excited_states_solvers/__init__.py
divshacker/qiskit-nature
08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb
[ "Apache-2.0" ]
449
2021-01-28T19:57:43.000Z
2022-03-31T17:01:50.000Z
qiskit_nature/algorithms/excited_states_solvers/__init__.py
divshacker/qiskit-nature
08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb
[ "Apache-2.0" ]
109
2021-01-28T13:17:46.000Z
2022-03-30T23:53:39.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
28.840909
89
0.711584
from .excited_states_solver import ExcitedStatesSolver from .qeom import QEOM from .eigensolver_factories import EigensolverFactory, NumPyEigensolverFactory from .excited_states_eigensolver import ExcitedStatesEigensolver __all__ = [ "ExcitedStatesSolver", "ExcitedStatesEigensolver", "EigensolverFactory"...
true
true
f72c838e66c47527c0a178012ed8acbdbcfe18e4
827
gyp
Python
ui/aura_extra/aura_extra.gyp
hefen1/chromium
52f0b6830e000ca7c5e9aa19488af85be792cc88
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ui/aura_extra/aura_extra.gyp
hefen1/chromium
52f0b6830e000ca7c5e9aa19488af85be792cc88
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ui/aura_extra/aura_extra.gyp
hefen1/chromium
52f0b6830e000ca7c5e9aa19488af85be792cc88
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2020-04-04T13:34:56.000Z
2020-11-04T07:17:52.000Z
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'targets': [ { # GN version: //ui/aura_extra 'target_name': 'aura_extra', 'type': '<(...
24.323529
72
0.53688
{ 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'aura_extra', 'type': '<(component)', 'dependencies': [ '../../base/base.gyp:base', '../../skia/skia.gyp:skia', '../aura/aura.gyp:aura', '../base/ui_base.gyp:ui_base', '.....
true
true
f72c844451481add20eff334fb82624c5d7efbe7
1,662
py
Python
lab-05-1-logistic_regression.py
KANG91/Deep_Learning
e3e9de769ab835215d0ebeee79ff869afbe64ebf
[ "MIT" ]
null
null
null
lab-05-1-logistic_regression.py
KANG91/Deep_Learning
e3e9de769ab835215d0ebeee79ff869afbe64ebf
[ "MIT" ]
null
null
null
lab-05-1-logistic_regression.py
KANG91/Deep_Learning
e3e9de769ab835215d0ebeee79ff869afbe64ebf
[ "MIT" ]
null
null
null
# Lab 5 Logistic Regression Classifier import tensorflow as tf tf.set_random_seed(777) # for reproducibility x_data = [[1, 2], [2, 3], [3, 1], [4, 3], [5, 3], [6, 2]] y_data = [[0], [0], [0], [1], [1], [1]] # placeholders for a tensor that will be always fed. X = tf.placeholder(tf.float32, shape=[None, 2]) Y = tf.pl...
28.169492
76
0.628159
import tensorflow as tf tf.set_random_seed(777) x_data = [[1, 2], [2, 3], [3, 1], [4, 3], [5, 3], [6, 2]] y_data = [[0], [0], [0], [1], [1], [1]] X = tf.placeholder(tf.float32, shape=[None, 2]) Y = tf.placeholder(tf.float32, shape=[None, 1]) W = tf.Variable(tf.random_normal([2, 1]), name='weight') b = tf.Variable(t...
true
true
f72c8477a6936f3991993793141885a0bb21af12
4,436
py
Python
tests/unit/models/physics/MeniscusTest.py
edgargmartinez/OpenPNM
c68745993b3e9895f53938164a9cf6305500748e
[ "MIT" ]
3
2019-07-05T22:07:21.000Z
2019-07-05T22:07:30.000Z
tests/unit/models/physics/MeniscusTest.py
edgargmartinez/OpenPNM
c68745993b3e9895f53938164a9cf6305500748e
[ "MIT" ]
null
null
null
tests/unit/models/physics/MeniscusTest.py
edgargmartinez/OpenPNM
c68745993b3e9895f53938164a9cf6305500748e
[ "MIT" ]
null
null
null
import openpnm as op import openpnm.models.physics as pm import scipy as sp class MeniscusTest: def setup_class(self): sp.random.seed(1) self.net = op.network.Cubic(shape=[5, 1, 5], spacing=5e-5) self.geo = op.geometry.StickAndBall(network=self.net, ...
37.277311
72
0.511046
import openpnm as op import openpnm.models.physics as pm import scipy as sp class MeniscusTest: def setup_class(self): sp.random.seed(1) self.net = op.network.Cubic(shape=[5, 1, 5], spacing=5e-5) self.geo = op.geometry.StickAndBall(network=self.net, ...
true
true
f72c85576b8389695f555dc9f2032aaaf2f1f2df
19,881
py
Python
plugins/modules/oci_network_drg.py
LaudateCorpus1/oci-ansible-collection
2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_network_drg.py
LaudateCorpus1/oci-ansible-collection
2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_network_drg.py
LaudateCorpus1/oci-ansible-collection
2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2020, 2022 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
41.076446
160
0.632866
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_network_drg short_description: Manage a Drg resource in Oracle Cloud Infrastruc...
true
true
f72c8559dfd7a6014d9c69e946707586ad068801
2,817
py
Python
src/dashboard/pages/visualization/visualization.py
ddlatumalea/disease_and_life
aa8c84fdd4a0b41bc0ee275538ac70a362eb26ba
[ "Apache-2.0" ]
null
null
null
src/dashboard/pages/visualization/visualization.py
ddlatumalea/disease_and_life
aa8c84fdd4a0b41bc0ee275538ac70a362eb26ba
[ "Apache-2.0" ]
null
null
null
src/dashboard/pages/visualization/visualization.py
ddlatumalea/disease_and_life
aa8c84fdd4a0b41bc0ee275538ac70a362eb26ba
[ "Apache-2.0" ]
null
null
null
from pathlib import Path import panel as pn import pandas as pd import plotly.express as px from models.pages import Page from models.utils.paths import get_prepared_data_path, get_standardized_data_file from dashboard.widgets import heatmap PREPARED_DATA_DIR = get_prepared_data_path() PREPARED_DATA_FILE = get_stand...
32.011364
111
0.624778
from pathlib import Path import panel as pn import pandas as pd import plotly.express as px from models.pages import Page from models.utils.paths import get_prepared_data_path, get_standardized_data_file from dashboard.widgets import heatmap PREPARED_DATA_DIR = get_prepared_data_path() PREPARED_DATA_FILE = get_stand...
true
true
f72c85a0942c0540d2abee2d9180bd484b5864a7
6,141
py
Python
main.py
akashrchandran/pokeowo
0b2621494ef56f350239817546b843814fe3448e
[ "MIT" ]
null
null
null
main.py
akashrchandran/pokeowo
0b2621494ef56f350239817546b843814fe3448e
[ "MIT" ]
null
null
null
main.py
akashrchandran/pokeowo
0b2621494ef56f350239817546b843814fe3448e
[ "MIT" ]
null
null
null
import datetime import json import multiprocessing import os import random import re import time import discum version = 'v0.01' config_path = 'data/config.json' logo = f''' ###### ### ### ## ####### ### ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ...
37.218182
96
0.485752
import datetime import json import multiprocessing import os import random import re import time import discum version = 'v0.01' config_path = 'data/config.json' logo = f''' ###### ### ### ## ####### ### ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ...
true
true
f72c86f6141b9e5ce714030b5766cf7cff25194c
1,327
py
Python
isolated_functions.py
wonabru/chainnet
f8ec1e2b580af837cba3322ffe69b95156b1b9a1
[ "MIT" ]
5
2019-04-20T18:54:55.000Z
2019-08-23T09:17:20.000Z
isolated_functions.py
wonabru/chainnet
f8ec1e2b580af837cba3322ffe69b95156b1b9a1
[ "MIT" ]
null
null
null
isolated_functions.py
wonabru/chainnet
f8ec1e2b580af837cba3322ffe69b95156b1b9a1
[ "MIT" ]
null
null
null
import ast import re import pickle from Crypto.PublicKey import RSA from base64 import b64decode,b64encode from tkinter import messagebox def str2obj(s): return ast.literal_eval(s.replace('true', 'True').replace('false', 'False')) def trim_name(name): return name.replace('@','').replace('#','') def remove_sp...
21.063492
117
0.679729
import ast import re import pickle from Crypto.PublicKey import RSA from base64 import b64decode,b64encode from tkinter import messagebox def str2obj(s): return ast.literal_eval(s.replace('true', 'True').replace('false', 'False')) def trim_name(name): return name.replace('@','').replace('#','') def remove_sp...
true
true
f72c87804c39b074934faddfa6a15a81e1a36cb8
4,587
py
Python
robot/hsin_agent.py
kanokkorn/watering_robot
b39fed532519e2b89a9f1ae1a3d1b72bb550cc1b
[ "MIT" ]
5
2020-04-01T13:55:12.000Z
2022-03-04T03:32:25.000Z
robot/hsin_agent.py
kanokkorn/watering_robot
b39fed532519e2b89a9f1ae1a3d1b72bb550cc1b
[ "MIT" ]
7
2019-12-21T10:26:40.000Z
2021-06-25T15:15:05.000Z
robot/hsin_agent.py
kanokkorn/watering_robot
b39fed532519e2b89a9f1ae1a3d1b72bb550cc1b
[ "MIT" ]
1
2020-06-03T07:41:21.000Z
2020-06-03T07:41:21.000Z
# import modules from gps3 import gps3 import serial import math import time import csv import os # setup gps socket ser = serial.Serial("/dev/ttyUSB0", 9600) gps_socket = gps3.GPSDSocket() data_stream = gps3.DataStream() gps_socket.connect() gps_socket.watch() # read csv files def track(): # prefix parameter ...
36.404762
105
0.419228
from gps3 import gps3 import serial import math import time import csv import os ser = serial.Serial("/dev/ttyUSB0", 9600) gps_socket = gps3.GPSDSocket() data_stream = gps3.DataStream() gps_socket.connect() gps_socket.watch() def track(): distance = 10 earth_radius = 6371e3 k = 1 with open("rob...
true
true
f72c8854af948f34376eadc837477a9b431ff2c9
2,138
py
Python
app/core/radiofrequency/__init__.py
FHellmann/MLWTF
582c3505d638907a848d5a6c739ee99981300f17
[ "Apache-2.0" ]
null
null
null
app/core/radiofrequency/__init__.py
FHellmann/MLWTF
582c3505d638907a848d5a6c739ee99981300f17
[ "Apache-2.0" ]
null
null
null
app/core/radiofrequency/__init__.py
FHellmann/MLWTF
582c3505d638907a848d5a6c739ee99981300f17
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python """ Author: Fabio Hellmann <info@fabio-hellmann.de> This is a layer between the raw execution unit and the database. """ import logging from datetime import datetime from . import rf_rpi from .models import Protocol, Signal from ..gpio import RaspberryPi3 as GPIO_PI from app.database impor...
30.985507
120
0.713751
import logging from datetime import datetime from . import rf_rpi from .models import Protocol, Signal from ..gpio import RaspberryPi3 as GPIO_PI from app.database import db from app.database.models import DataSource, DataSourceType from app.database.converter import converter _LOGGER = logging.getLogger(__name__) ...
true
true
f72c886994bd9fb0a5722665191651370d918e92
2,908
py
Python
tests/riscv/APIs/State_force.py
Wlgen/force-riscv
9f09b86c5a21ca00f8e5ade8e5186d65bc3e26f8
[ "Apache-2.0" ]
111
2020-06-12T22:31:30.000Z
2022-03-19T03:45:20.000Z
tests/riscv/APIs/State_force.py
Wlgen/force-riscv
9f09b86c5a21ca00f8e5ade8e5186d65bc3e26f8
[ "Apache-2.0" ]
34
2020-06-12T20:23:40.000Z
2022-03-15T20:04:31.000Z
tests/riscv/APIs/State_force.py
Wlgen/force-riscv
9f09b86c5a21ca00f8e5ade8e5186d65bc3e26f8
[ "Apache-2.0" ]
32
2020-06-12T19:15:26.000Z
2022-02-20T11:38:31.000Z
# # Copyright (C) [2020] Futurewei Technologies, Inc. # # FORCE-RISCV is 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 # # THIS SOFTWARE IS PR...
38.263158
77
0.725241
import RandomUtils from Enums import EStateElementDuplicateMode from State import State from base.Sequence import Sequence from riscv.EnvRISCV import EnvRISCV from riscv.GenThreadRISCV import GenThreadRISCV class MainSequence(Sequence): def generate(self, **kargs): state = State() state.setDuplic...
true
true
f72c88bad07b64edf6012e96a4a6af0ebf4b41c8
12,698
py
Python
mai_version/trees/TILDEQueryScorer.py
joschout/tilde
1403b50842b83f2edd6b16b1fbe24b9bec2d0048
[ "Apache-2.0" ]
16
2019-03-06T06:11:33.000Z
2022-02-07T21:30:25.000Z
mai_version/trees/TILDEQueryScorer.py
joschout/tilde
1403b50842b83f2edd6b16b1fbe24b9bec2d0048
[ "Apache-2.0" ]
4
2019-10-08T14:48:23.000Z
2020-03-26T00:31:57.000Z
mai_version/trees/TILDEQueryScorer.py
krishnangovindraj/tilde
5243a02d92f375d56ffc49ab8c3d1a87e31e99b9
[ "Apache-2.0" ]
4
2019-08-14T05:40:47.000Z
2020-08-05T13:21:16.000Z
import math from typing import Iterable, Set, List, Optional import problog import time from problog.logic import And, Term from mai_version.classification.example_partitioning import ExamplePartitioner from mai_version.representation.TILDE_query import TILDEQuery from mai_version.representation.example import Exampl...
52.040984
158
0.654198
import math from typing import Iterable, Set, List, Optional import problog import time from problog.logic import And, Term from mai_version.classification.example_partitioning import ExamplePartitioner from mai_version.representation.TILDE_query import TILDEQuery from mai_version.representation.example import Exampl...
true
true
f72c8a7510c49c3ae446f48e397b061791a320e4
13,771
py
Python
logreg.py
naver/cog
5b34ca90757116b9cfae11d8838927ba73e1ede8
[ "BSD-3-Clause" ]
13
2021-10-13T11:13:55.000Z
2022-03-11T04:41:41.000Z
logreg.py
naver/cog
5b34ca90757116b9cfae11d8838927ba73e1ede8
[ "BSD-3-Clause" ]
null
null
null
logreg.py
naver/cog
5b34ca90757116b9cfae11d8838927ba73e1ede8
[ "BSD-3-Clause" ]
null
null
null
# ImageNet-CoG Benchmark # Copyright 2021-present NAVER Corp. # 3-Clause BSD License​ import argparse import copy import logging import math import os import shutil import time import optuna import torch as th import feature_ops import metrics import utils from iterators import TorchIterator from meters import Avera...
37.625683
140
0.600392
import argparse import copy import logging import math import os import shutil import time import optuna import torch as th import feature_ops import metrics import utils from iterators import TorchIterator from meters import AverageMeter, ProgressMeter logger = logging.getLogger() class LogReg: def __init__...
true
true
f72c8ab58a23d585b39a3037e18747d52bcb4b75
1,132
py
Python
Chapter02/Ch02_Code/GUI_tabbed_two_mighty_labels.py
mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition
18e4632106169991e9b75680bdd7250c9d77c3be
[ "MIT" ]
2
2021-01-12T03:13:29.000Z
2021-01-12T03:13:31.000Z
Chapter02/Ch02_Code/GUI_tabbed_two_mighty_labels.py
mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition
18e4632106169991e9b75680bdd7250c9d77c3be
[ "MIT" ]
null
null
null
Chapter02/Ch02_Code/GUI_tabbed_two_mighty_labels.py
mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition
18e4632106169991e9b75680bdd7250c9d77c3be
[ "MIT" ]
1
2022-02-22T02:06:32.000Z
2022-02-22T02:06:32.000Z
''' May 2017 @author: Burkhard A. Meier ''' #====================== # imports #====================== import tkinter as tk from tkinter import ttk # Create instance win = tk.Tk() # Add a title win.title("Python GUI") tabControl = ttk.Notebook(win) # Create Tab Control tab1 = ttk.Frame(tabControl)...
25.155556
65
0.620141
import tkinter as tk from tkinter import ttk win = tk.Tk() win.title("Python GUI") tabControl = ttk.Notebook(win) tab1 = ttk.Frame(tabControl) tabControl.add(tab1, text='Tab 1') tab2 = ttk.Frame(tabControl) tabControl.add(tab2, text='Tab 2') tabControl.pack(expand=1, fil...
true
true
f72c8ecfbd321747538079c852e41d9f1f85d700
3,446
py
Python
sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_validate.py
kashifkhan/azure-sdk-for-python
9c28b76e89b0855e41bd12d5b4a59b51acd47eec
[ "MIT" ]
null
null
null
sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_validate.py
kashifkhan/azure-sdk-for-python
9c28b76e89b0855e41bd12d5b4a59b51acd47eec
[ "MIT" ]
null
null
null
sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_validate.py
kashifkhan/azure-sdk-for-python
9c28b76e89b0855e41bd12d5b4a59b51acd47eec
[ "MIT" ]
null
null
null
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import functools from ._version import VERSIONS_SUPPORTED def check_for_unsupported_actions_types(*args, **kwargs): client = args[0] # this assumes the clien...
35.163265
119
0.589089
import functools from ._version import VERSIONS_SUPPORTED def check_for_unsupported_actions_types(*args, **kwargs): client = args[0] selected_api_version = client._api_version if "actions" not in kwargs: actions = args[2] else: actions = kwargs.get("actions") if actions is...
true
true
f72c8ed99253eaa655d08778cb9bf6fa834191af
10,956
py
Python
google/ads/google_ads/v0/proto/resources/shared_criterion_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v0/proto/resources/shared_criterion_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v0/proto/resources/shared_criterion_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v0/proto/resources/shared_criterion.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message...
59.221622
1,457
0.793264
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
f72c907b1f918fdf342d234b59f8c92fc6aa1d93
2,070
py
Python
cows_bulls.py
hmlewis-astro/coding_practice
a781443399766bf13df0d2de93f0ce3acda0c77d
[ "MIT" ]
null
null
null
cows_bulls.py
hmlewis-astro/coding_practice
a781443399766bf13df0d2de93f0ce3acda0c77d
[ "MIT" ]
null
null
null
cows_bulls.py
hmlewis-astro/coding_practice
a781443399766bf13df0d2de93f0ce3acda0c77d
[ "MIT" ]
null
null
null
''' File name: pythonpractice.py Author: Hannah Lewis Date created: 08/03/2020 Date last modified: 08/03/2020 Python Version: 3.7 ''' import random def main(): ''' Create a program that will play the “cows and bulls” game with the user. ''' print("You will try to guess a random 4-digit nu...
27.972973
117
0.522705
import random def main(): print("You will try to guess a random 4-digit number.") print("A 'cow' is a correct digit in the correct place.") print("A 'bull' is a correct digit in the wrong place.") print("The game ends when you get 4 cows!\n") print("You can type 'exit' at any tim...
true
true
f72c90b37b41d597ef1c839e1131577727a7329a
227
py
Python
game/admin.py
zxalif/simpleapi
89d9f1c81b7c8e46d9764573fc1070a453751b4a
[ "MIT" ]
null
null
null
game/admin.py
zxalif/simpleapi
89d9f1c81b7c8e46d9764573fc1070a453751b4a
[ "MIT" ]
8
2020-06-05T23:34:44.000Z
2022-02-10T09:11:05.000Z
game/admin.py
zxalif/simpleapi
89d9f1c81b7c8e46d9764573fc1070a453751b4a
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import ( Category, Game, Thread, ThreadImage ) admin.site.register(Category) admin.site.register(Game) admin.site.register(Thread) admin.site.register(ThreadImage)
17.461538
32
0.748899
from django.contrib import admin from .models import ( Category, Game, Thread, ThreadImage ) admin.site.register(Category) admin.site.register(Game) admin.site.register(Thread) admin.site.register(ThreadImage)
true
true
f72c9168c0692e02e3f54b61d9c5f5e6399fc4d3
867
py
Python
blog/pelican-plugins/headerid/headerid.py
lemonsong/lemonsong.github.io
14a65b8c2506c95bab64f50143f3850be3edadc1
[ "MIT" ]
null
null
null
blog/pelican-plugins/headerid/headerid.py
lemonsong/lemonsong.github.io
14a65b8c2506c95bab64f50143f3850be3edadc1
[ "MIT" ]
1
2022-01-10T04:39:05.000Z
2022-01-10T04:39:05.000Z
blog/pelican-plugins/headerid/headerid.py
lemonsong/lemonsong.github.io
14a65b8c2506c95bab64f50143f3850be3edadc1
[ "MIT" ]
null
null
null
from pelican import readers from pelican.readers import PelicanHTMLTranslator from pelican import signals from docutils import nodes def register(): class HeaderIDPatchedPelicanHTMLTranslator(PelicanHTMLTranslator): def depart_title(self, node): close_tag = self.context[-1] parent =...
43.35
113
0.635525
from pelican import readers from pelican.readers import PelicanHTMLTranslator from pelican import signals from docutils import nodes def register(): class HeaderIDPatchedPelicanHTMLTranslator(PelicanHTMLTranslator): def depart_title(self, node): close_tag = self.context[-1] parent =...
true
true
f72c916ef8e95900c5ab3a87d685611c982bda39
2,960
py
Python
linsae/cogs/Events.py
drakedeveloper/Linsae
1a866fbb95df3a7270e446dca18e9dca8beb2c3a
[ "Apache-2.0" ]
1
2019-06-27T00:47:21.000Z
2019-06-27T00:47:21.000Z
linsae/cogs/Events.py
drakedeveloper/Linsae
1a866fbb95df3a7270e446dca18e9dca8beb2c3a
[ "Apache-2.0" ]
null
null
null
linsae/cogs/Events.py
drakedeveloper/Linsae
1a866fbb95df3a7270e446dca18e9dca8beb2c3a
[ "Apache-2.0" ]
null
null
null
import discord import time import asyncio from datetime import datetime import time from discord.ext import tasks, commands from tinydb import TinyDB, Query import re class Events(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_guild...
55.849057
294
0.631419
import discord import time import asyncio from datetime import datetime import time from discord.ext import tasks, commands from tinydb import TinyDB, Query import re class Events(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_guild...
true
true
f72c919a5fbacff307b79548546b94830a8d5ed5
26,995
py
Python
kivymd/uix/list.py
akaminetzkyp/KivyMD
940791ee1217e09184d8916c0eccc7534f097a48
[ "MIT" ]
1
2020-07-01T12:39:51.000Z
2020-07-01T12:39:51.000Z
kivymd/uix/list.py
ayo6706/KivyMD
c67850fd9f505d20a9e86ab89a39918daf34cd43
[ "MIT" ]
null
null
null
kivymd/uix/list.py
ayo6706/KivyMD
c67850fd9f505d20a9e86ab89a39918daf34cd43
[ "MIT" ]
null
null
null
""" Components/List =============== .. seealso:: `Material Design spec, Lists <https://material.io/components/lists>`_ .. rubric:: Lists are continuous, vertical indexes of text or images. .. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/lists.png :align: center The class :...
27.185297
113
0.655195
from kivy.lang import Builder from kivy.metrics import dp from kivy.properties import ( StringProperty, NumericProperty, ListProperty, OptionProperty, BooleanProperty, ) from kivy.uix.behaviors import ButtonBehavior from kivy.uix.floatlayout import FloatLayout from kivy.uix.image import Image impo...
true
true
f72c928677b51e691762e5e54a0552edfcb7fb7d
4,361
py
Python
lab4/predict_income_romain_claret_and_sylvain_robert-nicoud_lab4.py
RomainClaret/msc.ml.labs
4e6b8e1c1ab841ab8ebbaee13f6ae43e9a1c44a5
[ "MIT" ]
null
null
null
lab4/predict_income_romain_claret_and_sylvain_robert-nicoud_lab4.py
RomainClaret/msc.ml.labs
4e6b8e1c1ab841ab8ebbaee13f6ae43e9a1c44a5
[ "MIT" ]
null
null
null
lab4/predict_income_romain_claret_and_sylvain_robert-nicoud_lab4.py
RomainClaret/msc.ml.labs
4e6b8e1c1ab841ab8ebbaee13f6ae43e9a1c44a5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # 12.04.21 # Assignment lab 04 # Master Class: Machine Learning (5MI2018) # Faculty of Economic Science # University of Neuchatel (Switzerland) # Lab 4, see ML21_Exercise_4.pdf for more information # https://github.com/RomainClaret/msc.ml.labs # Authors: # - Romain Claret @RomainClaret # - Sy...
36.341667
167
0.687686
import warnings import pickle import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn.metrics import accuracy_score warnings.filterwarnings("ignore") filename = 'adult.test' file_handler = open(filename, 'r').readlines()[1:] prefix_file = "adult_2021_cw_" week_number = 1 split_into = 10 ...
true
true
f72c93dc9d0c650ab8f3bacc646cd04dbfed3888
92
py
Python
app/admin/__init__.py
baz1nga/Work-Shift
77df03120c4bc512703f02a653a6bbc982b14857
[ "MIT" ]
null
null
null
app/admin/__init__.py
baz1nga/Work-Shift
77df03120c4bc512703f02a653a6bbc982b14857
[ "MIT" ]
null
null
null
app/admin/__init__.py
baz1nga/Work-Shift
77df03120c4bc512703f02a653a6bbc982b14857
[ "MIT" ]
null
null
null
from flask import Blueprint bp = Blueprint('admin', __name__) from app.admin import views
15.333333
33
0.771739
from flask import Blueprint bp = Blueprint('admin', __name__) from app.admin import views
true
true
f72c94f9f4bcc67b00da8e6ffb7d26d5bc04f527
1,108
py
Python
puzzle14/14a.py
muellerd/advent_of_code20
4d9619de165b584f406ef8a1b136d79355dfe3e1
[ "MIT" ]
null
null
null
puzzle14/14a.py
muellerd/advent_of_code20
4d9619de165b584f406ef8a1b136d79355dfe3e1
[ "MIT" ]
null
null
null
puzzle14/14a.py
muellerd/advent_of_code20
4d9619de165b584f406ef8a1b136d79355dfe3e1
[ "MIT" ]
null
null
null
rows = [] with open("C:\\Privat\\advent_of_code20\\puzzle14\\input1.txt") as f: for line in f: rows.append(line.strip()) #print(rows) memory = {} currentMask = "" for line in rows: split = line.split(' = ') if 'mask' in split[0]: currentMask = split[1].strip() else: # value in...
21.307692
69
0.525271
rows = [] with open("C:\\Privat\\advent_of_code20\\puzzle14\\input1.txt") as f: for line in f: rows.append(line.strip()) memory = {} currentMask = "" for line in rows: split = line.split(' = ') if 'mask' in split[0]: currentMask = split[1].strip() else: bit = format(in...
true
true
f72c9587c2b7459c937e13b276ff7e0feb632297
3,314
py
Python
detect_image.py
YunYang1994/CodeFun
36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068
[ "MIT" ]
150
2019-06-19T03:54:40.000Z
2019-10-21T07:09:02.000Z
detect_image.py
YunYang1994/cv-notebooks
36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068
[ "MIT" ]
7
2019-11-26T07:27:42.000Z
2020-04-02T03:35:29.000Z
detect_image.py
YunYang1994/cv-notebooks
36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068
[ "MIT" ]
25
2019-11-27T11:07:56.000Z
2020-03-19T15:44:20.000Z
#! /usr/bin/env python # coding=utf-8 #================================================================ # Copyright (C) 2020 * Ltd. All rights reserved. # # Editor : VIM # File name : detect_image.py # Author : YunYang1994 # Created date: 2020-03-19 14:05:53 # Description : # #==================...
36.822222
96
0.601992
import os import cv2 import time import numpy as np import tensorflow as tf from PIL import Image, ImageFont, ImageDraw from mtcnn import pnet, rnet, onet from models import IResnet from utils import detect_face, align_face, recognize_face model = IResnet(tflite_model="IResnet.tflite") font = ImageFont.truetype('we...
true
true
f72c966881d67f6b446e37599487a4a5d041df9b
60,197
py
Python
heat/engine/resources/openstack/nova/server.py
maestro-hybrid-cloud/heat
91a4bb3170bd81b1c67a896706851e55709c9b5a
[ "Apache-2.0" ]
null
null
null
heat/engine/resources/openstack/nova/server.py
maestro-hybrid-cloud/heat
91a4bb3170bd81b1c67a896706851e55709c9b5a
[ "Apache-2.0" ]
null
null
null
heat/engine/resources/openstack/nova/server.py
maestro-hybrid-cloud/heat
91a4bb3170bd81b1c67a896706851e55709c9b5a
[ "Apache-2.0" ]
null
null
null
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
42.037011
79
0.570842
import copy import uuid from oslo_config import cfg from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_utils import uuidutils import six from heat.common import exception from heat.common.i18n import _ from heat.engine import attributes from heat.engine.clients import progress fro...
true
true
f72c9842321b24921292819e0294421b24b2f549
3,305
py
Python
src/draw.py
lRomul/argus-bengali-ai
e64374230f5390a17305769126ff4bfc9a2a8644
[ "MIT" ]
2
2020-05-08T09:25:38.000Z
2020-10-04T16:15:29.000Z
src/draw.py
lRomul/argus-bengali-ai
e64374230f5390a17305769126ff4bfc9a2a8644
[ "MIT" ]
2
2022-01-13T03:19:24.000Z
2022-03-12T00:48:13.000Z
src/draw.py
lRomul/argus-bengali-ai
e64374230f5390a17305769126ff4bfc9a2a8644
[ "MIT" ]
null
null
null
import time import random import numpy as np from pathlib import Path from PIL import Image, ImageDraw, ImageFont, ImageFilter import torch from torch.utils.data import Dataset from src import config def draw_grapheme(grapheme, font_path, size=(137, 236)): height, width = size image = Image.new('RGB', (widt...
36.318681
112
0.607867
import time import random import numpy as np from pathlib import Path from PIL import Image, ImageDraw, ImageFont, ImageFilter import torch from torch.utils.data import Dataset from src import config def draw_grapheme(grapheme, font_path, size=(137, 236)): height, width = size image = Image.new('RGB', (widt...
true
true
f72c98f625fd6ff9df578e247df919138a312028
1,260
py
Python
selectionsort.py
maxProgrammer/Entendendo_Algoritmos
8bc6ef9b7869150ef624333490b68d94b197cb75
[ "MIT" ]
null
null
null
selectionsort.py
maxProgrammer/Entendendo_Algoritmos
8bc6ef9b7869150ef624333490b68d94b197cb75
[ "MIT" ]
null
null
null
selectionsort.py
maxProgrammer/Entendendo_Algoritmos
8bc6ef9b7869150ef624333490b68d94b197cb75
[ "MIT" ]
null
null
null
#algoritmo utilizado para ordenação de uma lista. #a cada execução ele percorre toda lista e coloca o menor na posição (n-1) def encontraMenor(lista): #armazena o valor do indice 0 a variavel menorValor = lista[0] #considera que index zero tem o menor valor menorIndex = 0 #percorre lista do indice...
28
74
0.674603
def encontraMenor(lista): menorValor = lista[0] menorIndex = 0 for i in range(1,len(lista) - 1): if lista[i] < menorValor: menorValor = lista[i] menorIndex = i return menorIndex def ordenaSelecao(lista): ordLista = [] ...
true
true
f72c99bc69fba8eb8ab5186eeff081f18b9e24a7
3,124
py
Python
src/dataset_prepare.py
dd-dos/Emotion-detection
23eb94cbceb70890cf6b0f63e84d80eae7336c85
[ "MIT" ]
null
null
null
src/dataset_prepare.py
dd-dos/Emotion-detection
23eb94cbceb70890cf6b0f63e84d80eae7336c85
[ "MIT" ]
null
null
null
src/dataset_prepare.py
dd-dos/Emotion-detection
23eb94cbceb70890cf6b0f63e84d80eae7336c85
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from PIL import Image from tqdm import tqdm import os # convert string to integer def atoi(s): n = 0 for i in s: n = n*10 + ord(i) - ord("0") return n # making folders outer_names = ['test','train'] inner_names = ['angry', 'disgusted', 'fearful', 'happy', 's...
30.330097
87
0.546735
import numpy as np import pandas as pd from PIL import Image from tqdm import tqdm import os def atoi(s): n = 0 for i in s: n = n*10 + ord(i) - ord("0") return n outer_names = ['test','train'] inner_names = ['angry', 'disgusted', 'fearful', 'happy', 'sad', 'surprised', 'neutral'] os.makedirs('dat...
true
true
f72c9a79f61fe1255118ac76e5e76311780f9ee8
1,612
py
Python
demos/grouped_mr_heart/demo_predict.py
mathpluscode/DeepReg
80854094feafec998fa6237199066556c73f31f9
[ "Apache-2.0" ]
null
null
null
demos/grouped_mr_heart/demo_predict.py
mathpluscode/DeepReg
80854094feafec998fa6237199066556c73f31f9
[ "Apache-2.0" ]
null
null
null
demos/grouped_mr_heart/demo_predict.py
mathpluscode/DeepReg
80854094feafec998fa6237199066556c73f31f9
[ "Apache-2.0" ]
null
null
null
import argparse from datetime import datetime from deepreg.predict import predict name = "grouped_mr_heart" # parser is used to simplify testing, by default it is not used # please run the script with --no-test flag to ensure non-testing mode # for instance: # python script.py --no-test parser = argparse.ArgumentPar...
26.866667
72
0.628412
import argparse from datetime import datetime from deepreg.predict import predict name = "grouped_mr_heart" parser = argparse.ArgumentParser() parser.add_argument( "--test", help="Execute the script for test purpose", dest="test", action="store_true", ) parser.add_argument( "--no-test", help=...
true
true
f72c9cd27adbff3953b5021bda4fe373f564264d
2,110
py
Python
core/helper/config.py
caostorm/smng
f1cff4010a0645ae8e1182cd3c961d97cecf4a6e
[ "MIT" ]
null
null
null
core/helper/config.py
caostorm/smng
f1cff4010a0645ae8e1182cd3c961d97cecf4a6e
[ "MIT" ]
null
null
null
core/helper/config.py
caostorm/smng
f1cff4010a0645ae8e1182cd3c961d97cecf4a6e
[ "MIT" ]
1
2019-06-26T13:05:45.000Z
2019-06-26T13:05:45.000Z
#coding=utf-8 import json from core.helper.crypt import pwd_crypt from core.helper.globalvar import global_const import sys class options_config: class ErrorTypeNotSupport(BaseException): def __init__(self): pass def __str__(self): return "This type didn't support" def...
30.142857
90
0.519431
import json from core.helper.crypt import pwd_crypt from core.helper.globalvar import global_const import sys class options_config: class ErrorTypeNotSupport(BaseException): def __init__(self): pass def __str__(self): return "This type didn't support" def __init__(self...
true
true
f72c9d1c53416fbc1312ed7ced97e6c382733715
12,177
py
Python
tensorflow_addons/layers/normalizations.py
tzachar/addons
e352207da32e4670a36a295ea477c476118cb0d9
[ "Apache-2.0" ]
null
null
null
tensorflow_addons/layers/normalizations.py
tzachar/addons
e352207da32e4670a36a295ea477c476118cb0d9
[ "Apache-2.0" ]
null
null
null
tensorflow_addons/layers/normalizations.py
tzachar/addons
e352207da32e4670a36a295ea477c476118cb0d9
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.292453
79
0.642687
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import tensorflow as tf @tf.keras.utils.register_keras_serializable(package='Addons') class GroupNormalization(tf.keras.layers.Layer): def __init__(self, groups=2, ...
true
true
f72c9e1c750207443829a4d4625294cef174db04
4,966
py
Python
restaurants/views.py
sunilsm7/django_resto
b7698653093af7e6f26dd0d0c7b8d6046b402ea4
[ "MIT" ]
1
2017-08-03T01:40:12.000Z
2017-08-03T01:40:12.000Z
restaurants/views.py
sunilsm7/django_resto
b7698653093af7e6f26dd0d0c7b8d6046b402ea4
[ "MIT" ]
null
null
null
restaurants/views.py
sunilsm7/django_resto
b7698653093af7e6f26dd0d0c7b8d6046b402ea4
[ "MIT" ]
null
null
null
from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from django.contrib.contenttypes.models import ContentType from django.core.paginator import Paginator from django.core.urlresolvers import reverse, reverse_lazy from d...
31.833333
139
0.762384
from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from django.contrib.contenttypes.models import ContentType from django.core.paginator import Paginator from django.core.urlresolvers import reverse, reverse_lazy from d...
true
true
f72c9ff03b849eba70778f598d05555ab5123a75
1,072
py
Python
core/tests/test_managers/test_project.py
erexer/polyaxon
be14dae1ed56d568983388736bcdaf27a7baa4a4
[ "Apache-2.0" ]
null
null
null
core/tests/test_managers/test_project.py
erexer/polyaxon
be14dae1ed56d568983388736bcdaf27a7baa4a4
[ "Apache-2.0" ]
null
null
null
core/tests/test_managers/test_project.py
erexer/polyaxon
be14dae1ed56d568983388736bcdaf27a7baa4a4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, 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 ...
33.5
74
0.767724
import pytest from polyaxon_sdk import V1Project from tests.utils import BaseTestCase from polyaxon.managers.project import ProjectManager @pytest.mark.managers_mark class TestProjectManager(BaseTestCase): def test_default_props(self): assert ProjectManager.is_all_visibility() is True assert Pr...
true
true
f72ca02b98c9b0c00c8385d82a02c58fe350bf58
16,524
py
Python
src/ner_model/typer/data_translator.py
fracivilization/distant_ner_using_thesaurus
cebfb2bd950123ce3ef18e501314778cc41de71e
[ "Apache-2.0" ]
null
null
null
src/ner_model/typer/data_translator.py
fracivilization/distant_ner_using_thesaurus
cebfb2bd950123ce3ef18e501314778cc41de71e
[ "Apache-2.0" ]
null
null
null
src/ner_model/typer/data_translator.py
fracivilization/distant_ner_using_thesaurus
cebfb2bd950123ce3ef18e501314778cc41de71e
[ "Apache-2.0" ]
null
null
null
import dataclasses from enum import unique import click import datasets from datasets import features from datasets.arrow_dataset import Dataset from datasets.dataset_dict import DatasetDict from src.ner_model.chunker.abstract_model import Chunker from src.utils.utils import remove_BIE import dataclasses from seqeval.m...
37.216216
86
0.60633
import dataclasses from enum import unique import click import datasets from datasets import features from datasets.arrow_dataset import Dataset from datasets.dataset_dict import DatasetDict from src.ner_model.chunker.abstract_model import Chunker from src.utils.utils import remove_BIE import dataclasses from seqeval.m...
true
true
f72ca25004c0c4905aca487d4e9c73657cbe9a5d
482
py
Python
app/http/middleware/HelloWorldMiddleware.py
llaski/masonite-tutorial
f89dc88ccf7924b477dfe971fdb981a82e63d5fe
[ "MIT" ]
null
null
null
app/http/middleware/HelloWorldMiddleware.py
llaski/masonite-tutorial
f89dc88ccf7924b477dfe971fdb981a82e63d5fe
[ "MIT" ]
1
2021-06-02T00:33:40.000Z
2021-06-02T00:33:40.000Z
app/http/middleware/HelloWorldMiddleware.py
llaski/masonite-tutorial
f89dc88ccf7924b477dfe971fdb981a82e63d5fe
[ "MIT" ]
null
null
null
"""HelloWorld Middleware.""" from masonite.request import Request class HelloWorldMiddleware: """HelloWorld Middleware.""" def __init__(self, request: Request): """Inject Any Dependencies From The Service Container. Arguments: Request {masonite.request.Request} -- The Masonite r...
21.909091
77
0.636929
from masonite.request import Request class HelloWorldMiddleware: def __init__(self, request: Request): self.request = request def before(self): print('Hello World') def after(self): print('Goodbye World')
true
true
f72ca260e47ced61e897e70195c321f15e9d783d
3,962
py
Python
misc/learnpy/k-means/loadiris.py
mutazag/mdsi
efecc8f650ddf6866154389f98d4ce0a9803db18
[ "MIT" ]
null
null
null
misc/learnpy/k-means/loadiris.py
mutazag/mdsi
efecc8f650ddf6866154389f98d4ce0a9803db18
[ "MIT" ]
null
null
null
misc/learnpy/k-means/loadiris.py
mutazag/mdsi
efecc8f650ddf6866154389f98d4ce0a9803db18
[ "MIT" ]
null
null
null
import pandas as pd from sklearn import datasets # load iris data set iris = datasets.load_iris() print(iris) species = [iris.target_names[x] for x in iris.target] iris = pd.DataFrame(iris['data'], columns = ['Sepal_Length', 'Sepal_Width', 'Petal_Length', 'Petal_Width']) iris['Species'] = species iris.head() iri...
29.132353
108
0.694346
import pandas as pd from sklearn import datasets iris = datasets.load_iris() print(iris) species = [iris.target_names[x] for x in iris.target] iris = pd.DataFrame(iris['data'], columns = ['Sepal_Length', 'Sepal_Width', 'Petal_Length', 'Petal_Width']) iris['Species'] = species iris.head() iris.dtypes iris['coun...
true
true
f72ca2f478e2f86936751094fd9d66c1fab0a9ee
1,734
py
Python
run-gat-2-8.py
urialon/bottleneck
481fbb95edc6ae711da40b6305b40c12ce6a6d29
[ "MIT" ]
null
null
null
run-gat-2-8.py
urialon/bottleneck
481fbb95edc6ae711da40b6305b40c12ce6a6d29
[ "MIT" ]
null
null
null
run-gat-2-8.py
urialon/bottleneck
481fbb95edc6ae711da40b6305b40c12ce6a6d29
[ "MIT" ]
null
null
null
import main from common import Task, STOP, GNN_TYPE from attrdict import AttrDict from experiment import Experiment import torch override_params = { 2: {'batch_size': 64, 'eval_every': 1000}, 3: {'batch_size': 64}, 4: {'batch_size': 1024}, 5: {'batch_size': 1024}, 6: {'batch_size': 1024}, 7: {'...
33.346154
99
0.632641
import main from common import Task, STOP, GNN_TYPE from attrdict import AttrDict from experiment import Experiment import torch override_params = { 2: {'batch_size': 64, 'eval_every': 1000}, 3: {'batch_size': 64}, 4: {'batch_size': 1024}, 5: {'batch_size': 1024}, 6: {'batch_size': 1024}, 7: {'...
true
true
f72ca4cbe79a2f6143b41e5d9b7ad5d70a93a0a8
884
py
Python
enrich/followthemoney_enrich/cache.py
achievement008/followthemoney
bda06d62c81c82e62cd0c53117d8804939b40f62
[ "MIT" ]
137
2017-10-20T09:36:32.000Z
2022-03-24T18:49:16.000Z
enrich/followthemoney_enrich/cache.py
achievement008/followthemoney
bda06d62c81c82e62cd0c53117d8804939b40f62
[ "MIT" ]
505
2017-10-24T13:14:06.000Z
2022-03-28T20:21:45.000Z
enrich/followthemoney_enrich/cache.py
achievement008/followthemoney
bda06d62c81c82e62cd0c53117d8804939b40f62
[ "MIT" ]
32
2017-12-19T15:22:07.000Z
2022-02-18T11:01:28.000Z
import os import json from redis import Redis from normality import stringify class Cache(object): def get(self, key): return None def has(self, key): return self.get(key) is not None def store(self, key, value): pass class RedisCache(Cache): EXPIRE = 84600 * 90 URL = o...
22.1
62
0.61991
import os import json from redis import Redis from normality import stringify class Cache(object): def get(self, key): return None def has(self, key): return self.get(key) is not None def store(self, key, value): pass class RedisCache(Cache): EXPIRE = 84600 * 90 URL = o...
true
true
f72ca4f157e0f5d299e44df76de3bb9ba9ff45ad
13,454
py
Python
env/lib/python3.7/encodings/mac_cyrillic.py
JacobMiske/nuclear-database-APIs
bc9fb6afb9aa0d98dde5d744d8f22b2791597e78
[ "MIT" ]
null
null
null
env/lib/python3.7/encodings/mac_cyrillic.py
JacobMiske/nuclear-database-APIs
bc9fb6afb9aa0d98dde5d744d8f22b2791597e78
[ "MIT" ]
null
null
null
env/lib/python3.7/encodings/mac_cyrillic.py
JacobMiske/nuclear-database-APIs
bc9fb6afb9aa0d98dde5d744d8f22b2791597e78
[ "MIT" ]
1
2020-05-01T20:23:35.000Z
2020-05-01T20:23:35.000Z
""" Python Character Mapping Codec mac_cyrillic generated from 'MAPPINGS/VENDORS/APPLE/CYRILLIC.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
43.681818
118
0.549353
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='strict'): return codecs.charmap_decode(input,errors,decoding_table) class IncrementalEncoder(codecs.IncrementalEncoder): ...
true
true
f72ca5261e26e28890b2ead99f9ab8ea92310208
9,487
py
Python
test/fb_cases_util.py
savinshynu/turbo_seti
7d756f130af5a323403affcdcb9f9bfa62325836
[ "MIT" ]
33
2017-05-09T03:31:38.000Z
2022-03-26T01:29:35.000Z
test/fb_cases_util.py
savinshynu/turbo_seti
7d756f130af5a323403affcdcb9f9bfa62325836
[ "MIT" ]
284
2018-03-13T13:57:09.000Z
2022-03-30T21:59:34.000Z
test/fb_cases_util.py
savinshynu/turbo_seti
7d756f130af5a323403affcdcb9f9bfa62325836
[ "MIT" ]
116
2017-08-08T17:27:30.000Z
2022-03-24T21:24:40.000Z
r''' Utility functions for test_fb_cases.py ''' from os import mkdir, remove from os.path import dirname from shutil import rmtree import logging import pandas as pd import numpy as np import setigen as stg from turbo_seti.find_doppler.find_doppler import FindDoppler from fb_cases_def import HERE, DEBUGGING, RTOL_DIFF...
41.792952
101
0.64288
from os import mkdir, remove from os.path import dirname from shutil import rmtree import logging import pandas as pd import numpy as np import setigen as stg from turbo_seti.find_doppler.find_doppler import FindDoppler from fb_cases_def import HERE, DEBUGGING, RTOL_DIFF, TestResultRecord, SetigenParms DF_REFERENCE =...
true
true
f72ca647ec6c0d280fd1a1ba4d668d4a17a782b2
5,517
py
Python
backend/course/migrations/0001_initial.py
crowdbotics-apps/utawala-main-altar-29305
f450b7e301bc63a8400e7a9b0e39f4b7f931e2fd
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/course/migrations/0001_initial.py
crowdbotics-apps/utawala-main-altar-29305
f450b7e301bc63a8400e7a9b0e39f4b7f931e2fd
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/course/migrations/0001_initial.py
crowdbotics-apps/utawala-main-altar-29305
f450b7e301bc63a8400e7a9b0e39f4b7f931e2fd
[ "FTL", "AML", "RSA-MD" ]
null
null
null
# Generated by Django 2.2.24 on 2021-07-31 08:35 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] op...
49.258929
179
0.595251
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f72ca651974209e177cd6e0b852ffe740ce4bc1b
57,027
py
Python
tensorflow/python/ipu/utils.py
DebeshJha/tensorflow-1
2b5a225c49d25273532d11c424d37ce394d7579a
[ "Apache-2.0" ]
2
2021-03-08T23:32:06.000Z
2022-01-13T03:43:49.000Z
tensorflow/python/ipu/utils.py
DebeshJha/tensorflow-1
2b5a225c49d25273532d11c424d37ce394d7579a
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ipu/utils.py
DebeshJha/tensorflow-1
2b5a225c49d25273532d11c424d37ce394d7579a
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.296926
96
0.668806
import collections from enum import Enum import os import time import numpy as np from tensorflow.compiler.plugin.poplar.driver.config_pb2 import IpuOptions from tensorflow.compiler.plugin.poplar.driver.trace_pb2 import IpuTraceEvent from tensorflow.compiler.plugin.poplar.driver import config_pb2 from tensorflow.comp...
true
true
f72ca776ebc6d065e702f3c8cb4da790bde5d2ce
3,892
py
Python
tests/data/residues/GLN.py
uw-ipd/privileged_residues
78078c22ba537651a1b6bd1404c05246ab73a3e3
[ "Apache-2.0" ]
null
null
null
tests/data/residues/GLN.py
uw-ipd/privileged_residues
78078c22ba537651a1b6bd1404c05246ab73a3e3
[ "Apache-2.0" ]
20
2018-08-13T22:50:46.000Z
2018-11-03T22:29:03.000Z
tests/data/residues/GLN.py
uw-ipd/privileged_residues
78078c22ba537651a1b6bd1404c05246ab73a3e3
[ "Apache-2.0" ]
1
2018-08-25T06:03:43.000Z
2018-08-25T06:03:43.000Z
from tests.util import pick_ray from pyrosetta import Pose from pyrosetta.rosetta.core.import_pose import pose_from_pdbstring name = "GLN" contents = """ ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N ATOM 2 CA ALA A 1 1.458 0.000 0.000 1.00 0.00 C ATOM ...
48.049383
78
0.43705
from tests.util import pick_ray from pyrosetta import Pose from pyrosetta.rosetta.core.import_pose import pose_from_pdbstring name = "GLN" contents = """ ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N ATOM 2 CA ALA A 1 1.458 0.000 0.000 1.00 0.00 C ATOM ...
true
true
f72ca7d3d97e12ab7b405dcff314bdb6c0a78755
3,337
py
Python
examples/pointer_generator/preprocess.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
16,259
2018-05-02T02:31:30.000Z
2022-03-31T21:50:23.000Z
examples/pointer_generator/preprocess.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
3,863
2018-05-02T13:42:39.000Z
2022-03-31T19:03:32.000Z
examples/pointer_generator/preprocess.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
4,796
2018-05-02T07:55:51.000Z
2022-03-31T14:46:45.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse from itertools import zip_longest def replace_oovs(source_in, target_in, vocabulary, source_out, targ...
32.398058
85
0.605034
import argparse from itertools import zip_longest def replace_oovs(source_in, target_in, vocabulary, source_out, target_out): def format_unk(pos): return "<unk-{}>".format(pos) if target_in is None: target_in = [] for seq_num, (source_seq, target_seq) in enumerate( zip_longest(...
true
true
f72ca9ee9ae4957b92084a00b5624be329e8478f
349
py
Python
Capitulo_02/exercise2_4.py
thiagosouzalink/my_codes-exercices-book-curso_intensivo_de_python
841aa855a7450ad3d0ba65393ba0b6debcd6a770
[ "MIT" ]
null
null
null
Capitulo_02/exercise2_4.py
thiagosouzalink/my_codes-exercices-book-curso_intensivo_de_python
841aa855a7450ad3d0ba65393ba0b6debcd6a770
[ "MIT" ]
null
null
null
Capitulo_02/exercise2_4.py
thiagosouzalink/my_codes-exercices-book-curso_intensivo_de_python
841aa855a7450ad3d0ba65393ba0b6debcd6a770
[ "MIT" ]
null
null
null
""" 2.4 – Letras maiúsculas e minúsculas em nomes: Armazene o nome de uma pessoa em uma variável e então apresente o nome dessa pessoa em letras minúsculas, em letras maiúsculas e somente com a primeira letra maiúscula. """ nome = "José" # Minúsculas print(nome.lower()) # Maiúsculas print(nome.upper()) # Somente a ...
24.928571
215
0.747851
nome = "José" print(nome.lower()) print(nome.upper()) print(nome[0])
true
true
f72caa1cc50710b6f6793c4a96821b65b2e32acb
2,025
py
Python
src/routes/users.py
tombrereton/flask-api-starter-kit
2e244bfc4f5659e91fd7cd27388c37bf32baeaec
[ "MIT" ]
null
null
null
src/routes/users.py
tombrereton/flask-api-starter-kit
2e244bfc4f5659e91fd7cd27388c37bf32baeaec
[ "MIT" ]
null
null
null
src/routes/users.py
tombrereton/flask-api-starter-kit
2e244bfc4f5659e91fd7cd27388c37bf32baeaec
[ "MIT" ]
null
null
null
from http import HTTPStatus from typing import List from apifairy import body, other_responses, response from flask import Blueprint, jsonify from flask import request from src.config import DefaultConfig from src.dtos.user import UserDto from src.requests.user import CreateUserRequestSchema, CreateUserRequest, Creat...
33.196721
108
0.74963
from http import HTTPStatus from typing import List from apifairy import body, other_responses, response from flask import Blueprint, jsonify from flask import request from src.config import DefaultConfig from src.dtos.user import UserDto from src.requests.user import CreateUserRequestSchema, CreateUserRequest, Creat...
true
true
f72caa4b74837bd62d61442cc130cfd18f4a2cb9
602
py
Python
src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
3
2021-03-26T00:48:20.000Z
2022-03-29T22:05:39.000Z
src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
1
2017-12-28T04:51:44.000Z
2017-12-28T04:51:44.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
37.625
94
0.465116
from azure.cli.core.help_files import helps helps['find'] = """ type: command short-summary: Find Azure CLI commands. examples: - name: Search for commands containing 'vm' or 'secret' text: > az find -q vm secret """
true
true
f72caa944d2ed0ef2d12c5b7459dddcc53fc9b34
12,347
py
Python
EPro-PnP-Det/epropnp_det/core/bbox_3d/misc.py
Lakonik/EPro-PnP
931df847190ce10eddd1dc3e3168ce1a2f295ffa
[ "Apache-2.0" ]
19
2022-03-21T10:22:24.000Z
2022-03-30T15:43:46.000Z
EPro-PnP-Det/epropnp_det/core/bbox_3d/misc.py
Lakonik/EPro-PnP
931df847190ce10eddd1dc3e3168ce1a2f295ffa
[ "Apache-2.0" ]
null
null
null
EPro-PnP-Det/epropnp_det/core/bbox_3d/misc.py
Lakonik/EPro-PnP
931df847190ce10eddd1dc3e3168ce1a2f295ffa
[ "Apache-2.0" ]
3
2022-03-26T08:08:24.000Z
2022-03-30T11:17:11.000Z
""" Copyright (C) 2010-2022 Alibaba Group Holding Limited. This file is modified from https://github.com/tjiiv-cprg/MonoRUn """ import math import numpy as np import torch from pytorch3d.structures.meshes import Meshes from epropnp_det.ops.iou3d.iou3d_utils import nms_gpu def gen_unit_noc(num_pts, device=None): ...
37.990769
113
0.53268
import math import numpy as np import torch from pytorch3d.structures.meshes import Meshes from epropnp_det.ops.iou3d.iou3d_utils import nms_gpu def gen_unit_noc(num_pts, device=None): indices = torch.arange(0, num_pts, dtype=torch.float32, device=device) + 0.5 phi = torch.arccos(1 - 2 * indices / num_pts) ...
true
true
f72cab0568521a363e71061115573b79f5eea8ff
22,874
py
Python
sdk/python/pulumi_azure_nextgen/compute/v20191201/virtual_machine.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/compute/v20191201/virtual_machine.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/compute/v20191201/virtual_machine.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# 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 from ... import _utilities, _tables from...
65.354286
1,169
0.707135
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['VirtualMachine'] class VirtualMachine(pulumi.CustomResource): def __init__(__self__, ...
true
true
f72cab35e960fe08f1ad7e2c27dda165a8cea5a9
352
py
Python
qualysapi/__init__.py
trolldbois/qualysapi
33de3cda1e1073e5c960740e38864d1f551bfd3d
[ "Apache-2.0" ]
4
2019-03-20T14:49:01.000Z
2020-06-19T19:03:54.000Z
qualysapi/__init__.py
trolldbois/qualysapi
33de3cda1e1073e5c960740e38864d1f551bfd3d
[ "Apache-2.0" ]
2
2019-02-05T16:20:44.000Z
2019-02-06T09:50:27.000Z
qualysapi/__init__.py
trolldbois/qualysapi
33de3cda1e1073e5c960740e38864d1f551bfd3d
[ "Apache-2.0" ]
1
2020-06-01T18:57:41.000Z
2020-06-01T18:57:41.000Z
# -*- coding: future_fstrings -*- # This is the version string assigned to the entire egg post # setup.py install # Ownership and Copyright Information. from __future__ import absolute_import __author__ = "Parag Baxi <parag.baxi@gmail.com>" __copyright__ = "Copyright 2011-2013, Parag Baxi" __license__ = "BSD-new" fro...
29.333333
60
0.772727
from __future__ import absolute_import __author__ = "Parag Baxi <parag.baxi@gmail.com>" __copyright__ = "Copyright 2011-2013, Parag Baxi" __license__ = "BSD-new" from qualysapi.util import connect
true
true
f72cab98f8c6d40b4cfe232aace0f320986b5a88
607
py
Python
biosimulators_utils/sedml/exceptions.py
biosimulators/Biosimulators_utils
c1363467263120bf1166da2b75e38fc7f56dc94f
[ "MIT" ]
2
2021-06-02T13:26:34.000Z
2021-12-27T23:12:47.000Z
biosimulators_utils/sedml/exceptions.py
biosimulators/Biosimulators_utils
c1363467263120bf1166da2b75e38fc7f56dc94f
[ "MIT" ]
102
2020-12-06T19:47:43.000Z
2022-03-31T12:56:17.000Z
biosimulators_utils/sedml/exceptions.py
biosimulators/Biosimulators_utils
c1363467263120bf1166da2b75e38fc7f56dc94f
[ "MIT" ]
4
2021-01-27T19:56:34.000Z
2022-02-03T21:08:20.000Z
""" Exceptions for SED-ML :Author: Jonathan Karr <karr@mssm.edu> :Date: 2021-01-12 :Copyright: 2021, Center for Reproducible Biomedical Modeling :License: MIT """ from ..exceptions import BioSimulatorsException __all__ = [ 'SedmlExecutionError', 'UnsupportedModelLanguageError', ] class SedmlExecutionError(...
24.28
81
0.742998
from ..exceptions import BioSimulatorsException __all__ = [ 'SedmlExecutionError', 'UnsupportedModelLanguageError', ] class SedmlExecutionError(BioSimulatorsException): pass class UnsupportedModelLanguageError(BioSimulatorsException, NotImplementedError): pass
true
true
f72cabca4a5200b7b635654d553d20ae2f30155f
3,356
py
Python
tests/bindings/test_python.py
mfkiwl/hgdb
6279b2d671b09094b7e69c592fa8f2eca3f6bacd
[ "BSD-2-Clause" ]
34
2021-01-19T21:14:06.000Z
2022-03-31T18:42:58.000Z
tests/bindings/test_python.py
mfkiwl/hgdb
6279b2d671b09094b7e69c592fa8f2eca3f6bacd
[ "BSD-2-Clause" ]
33
2021-01-12T18:50:16.000Z
2022-03-23T04:49:20.000Z
tests/bindings/test_python.py
mfkiwl/hgdb
6279b2d671b09094b7e69c592fa8f2eca3f6bacd
[ "BSD-2-Clause" ]
2
2021-03-28T06:58:46.000Z
2022-03-31T02:55:53.000Z
import sqlite3 import tempfile import hgdb import os import pytest def get_conn_cursor(db_name): conn = sqlite3.connect(db_name) c = conn.cursor() return conn, c def test_store_instance(): with tempfile.TemporaryDirectory() as temp: db_name = os.path.join(temp, "debug.db") db = hgdb....
31.660377
105
0.61025
import sqlite3 import tempfile import hgdb import os import pytest def get_conn_cursor(db_name): conn = sqlite3.connect(db_name) c = conn.cursor() return conn, c def test_store_instance(): with tempfile.TemporaryDirectory() as temp: db_name = os.path.join(temp, "debug.db") db = hgdb....
true
true
f72cac3af394de7e0476052b87a340105bd5386f
2,482
py
Python
bot.py
StarkGang/TagChecker
390191a03afc17c9003a046954586532947d10d4
[ "MIT" ]
1
2021-07-18T01:12:55.000Z
2021-07-18T01:12:55.000Z
bot.py
StarkGang/TagChecker
390191a03afc17c9003a046954586532947d10d4
[ "MIT" ]
null
null
null
bot.py
StarkGang/TagChecker
390191a03afc17c9003a046954586532947d10d4
[ "MIT" ]
null
null
null
from pyrogram import filters, Client import logging import os from pyrogram.types import ( ChatPermissions, InlineKeyboardButton, InlineKeyboardMarkup ) logging.basicConfig(level=logging.INFO) API_ID = int(os.environ.get("API_ID", 6)) API_HASH = os.environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e") ...
26.404255
92
0.657937
from pyrogram import filters, Client import logging import os from pyrogram.types import ( ChatPermissions, InlineKeyboardButton, InlineKeyboardMarkup ) logging.basicConfig(level=logging.INFO) API_ID = int(os.environ.get("API_ID", 6)) API_HASH = os.environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e") ...
true
true
f72cad1a00cbc3a4cfeedd1cef65f5d5f630641b
2,143
py
Python
oneflow/python/framework/watcher.py
666DZY666/oneflow
2062cb211dd1e0619d610659e6d41598d5f73e17
[ "Apache-2.0" ]
null
null
null
oneflow/python/framework/watcher.py
666DZY666/oneflow
2062cb211dd1e0619d610659e6d41598d5f73e17
[ "Apache-2.0" ]
null
null
null
oneflow/python/framework/watcher.py
666DZY666/oneflow
2062cb211dd1e0619d610659e6d41598d5f73e17
[ "Apache-2.0" ]
1
2021-11-10T07:57:01.000Z
2021-11-10T07:57:01.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
35.716667
86
0.792814
from __future__ import absolute_import import traceback import oneflow.core.record.record_pb2 as record_util import oneflow.python.framework.local_blob as local_blob_util import oneflow.python.framework.ofblob as ofblob import oneflow.python.framework.remote_blob as remote_blob_util import oneflow.python.framework.se...
true
true
f72cad26cae4ebe6adabb39d7a5dfcd09cf17363
31,637
py
Python
sdk/python/pulumi_f5bigip/ltm/snat.py
pulumi/pulumi-f5bigip
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
[ "ECL-2.0", "Apache-2.0" ]
4
2018-12-21T23:30:33.000Z
2021-10-12T16:38:27.000Z
sdk/python/pulumi_f5bigip/ltm/snat.py
pulumi/pulumi-f5bigip
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
[ "ECL-2.0", "Apache-2.0" ]
61
2019-01-09T01:50:19.000Z
2022-03-31T15:27:17.000Z
sdk/python/pulumi_f5bigip/ltm/snat.py
pulumi/pulumi-f5bigip
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
[ "ECL-2.0", "Apache-2.0" ]
1
2019-10-05T10:36:30.000Z
2019-10-05T10:36:30.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
46.939169
535
0.649746
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * __all__ = ['SnatArgs', 'Snat'] @pulumi.input_type class SnatArgs: def __init__(__self__, *, name: pulumi...
true
true
f72cad63668c1a50f31829882512b8a9df77f041
12,170
py
Python
keystone-moon/keystone/tests/unit/test_backend_endpoint_policy.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
1
2019-05-08T06:09:35.000Z
2019-05-08T06:09:35.000Z
keystone-moon/keystone/tests/unit/test_backend_endpoint_policy.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
4
2018-08-22T14:51:02.000Z
2018-10-17T14:04:26.000Z
keystone-moon/keystone/tests/unit/test_backend_endpoint_policy.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
5
2018-08-03T17:19:34.000Z
2019-01-11T15:54:42.000Z
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
48.68
79
0.607313
import uuid from six.moves import range from testtools import matchers from keystone import exception from keystone.tests import unit class PolicyAssociationTests(object): def _assert_correct_policy(self, endpoint, policy): ref = ( self.endpoint_policy_api.get_policy_for_endpoint(endpoint[...
true
true
f72cae2c89049bcff133dee51ea839c617f5fd7f
372
py
Python
supervisely/src/mask_image.py
supervisely-ecosystem/ritm-interactive-segmentation
c86df3c7c95ce20ffd3c9cc5e3f07abe8c162f4c
[ "MIT" ]
1
2022-03-25T14:36:18.000Z
2022-03-25T14:36:18.000Z
supervisely/src/mask_image.py
supervisely-ecosystem/ritm-interactive-segmentation
c86df3c7c95ce20ffd3c9cc5e3f07abe8c162f4c
[ "MIT" ]
null
null
null
supervisely/src/mask_image.py
supervisely-ecosystem/ritm-interactive-segmentation
c86df3c7c95ce20ffd3c9cc5e3f07abe8c162f4c
[ "MIT" ]
1
2022-03-17T06:39:39.000Z
2022-03-17T06:39:39.000Z
import sly_globals as g def get_mask_from_clicks(image_np, clicks_list): g.CONTROLLER.set_image(image_np) for click in clicks_list: g.CONTROLLER.add_click(click.coords[1], click.coords[0], click.is_positive) try: res_mask = g.CONTROLLER.result_mask except Exception(f"Couldn't process i...
28.615385
83
0.712366
import sly_globals as g def get_mask_from_clicks(image_np, clicks_list): g.CONTROLLER.set_image(image_np) for click in clicks_list: g.CONTROLLER.add_click(click.coords[1], click.coords[0], click.is_positive) try: res_mask = g.CONTROLLER.result_mask except Exception(f"Couldn't process i...
true
true
f72caed168c08d84dcc3dd7cb27e247c5df1716d
348
py
Python
Algorithms/kadane_algorithm/python-kadane-algorithm-O(n).py
omega07/Yet_Another_Algorithms_Repository
7c967e115e96b3c07010a3bf94ca1cdb898a6e82
[ "MIT" ]
33
2019-10-14T19:19:43.000Z
2021-11-30T13:40:20.000Z
Algorithms/kadane_algorithm/python-kadane-algorithm-O(n).py
omega07/Yet_Another_Algorithms_Repository
7c967e115e96b3c07010a3bf94ca1cdb898a6e82
[ "MIT" ]
317
2019-10-14T18:35:22.000Z
2020-03-03T17:45:06.000Z
Algorithms/kadane_algorithm/python-kadane-algorithm-O(n).py
omega07/Yet_Another_Algorithms_Repository
7c967e115e96b3c07010a3bf94ca1cdb898a6e82
[ "MIT" ]
332
2019-10-14T18:39:08.000Z
2021-09-02T16:19:11.000Z
def maxSubArraySum(a,size): max_so_far =a[0] curr_max = a[0] for i in range(1,size): curr_max = max(a[i], curr_max + a[i]) max_so_far = max(max_so_far,curr_max) return max_so_far a = [-2, -3, 4, -1, -2, 1, 5, -3] print("Maximum contiguous sum is" , m...
23.2
61
0.531609
def maxSubArraySum(a,size): max_so_far =a[0] curr_max = a[0] for i in range(1,size): curr_max = max(a[i], curr_max + a[i]) max_so_far = max(max_so_far,curr_max) return max_so_far a = [-2, -3, 4, -1, -2, 1, 5, -3] print("Maximum contiguous sum is" , m...
true
true
f72caeec9c99f7dddcbe170095eba9f6591f69ab
910
py
Python
dwavebinarycsp/package_info.py
JoelPasvolsky/dwavebinarycsp
ef260bff6d606d8176b287bb6e27a05d6f72de9f
[ "Apache-2.0" ]
null
null
null
dwavebinarycsp/package_info.py
JoelPasvolsky/dwavebinarycsp
ef260bff6d606d8176b287bb6e27a05d6f72de9f
[ "Apache-2.0" ]
null
null
null
dwavebinarycsp/package_info.py
JoelPasvolsky/dwavebinarycsp
ef260bff6d606d8176b287bb6e27a05d6f72de9f
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 D-Wave Systems 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...
43.333333
98
0.661538
__version__ = '0.1.3' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'Solves constraints satisfaction problems with binary quadratic model samplers'
true
true
f72cb12504a8487b6ebb6f694946918cd78f6d7b
267
py
Python
output/models/nist_data/atomic/integer/schema_instance/nistschema_sv_iv_atomic_integer_total_digits_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/integer/schema_instance/nistschema_sv_iv_atomic_integer_total_digits_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/integer/schema_instance/nistschema_sv_iv_atomic_integer_total_digits_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.integer.schema_instance.nistschema_sv_iv_atomic_integer_total_digits_2_xsd.nistschema_sv_iv_atomic_integer_total_digits_2 import NistschemaSvIvAtomicIntegerTotalDigits2 __all__ = [ "NistschemaSvIvAtomicIntegerTotalDigits2", ]
44.5
204
0.898876
from output.models.nist_data.atomic.integer.schema_instance.nistschema_sv_iv_atomic_integer_total_digits_2_xsd.nistschema_sv_iv_atomic_integer_total_digits_2 import NistschemaSvIvAtomicIntegerTotalDigits2 __all__ = [ "NistschemaSvIvAtomicIntegerTotalDigits2", ]
true
true
f72cb1f015fcd1360def9463bd8e6047da25b737
11,947
py
Python
examples/ex_icub_trust_cognitive_architecture/endorsement.py
riccardobrue/SOM-example-1
8a977e73844f9206ee1704be577f8a7521d2b306
[ "MIT" ]
null
null
null
examples/ex_icub_trust_cognitive_architecture/endorsement.py
riccardobrue/SOM-example-1
8a977e73844f9206ee1704be577f8a7521d2b306
[ "MIT" ]
null
null
null
examples/ex_icub_trust_cognitive_architecture/endorsement.py
riccardobrue/SOM-example-1
8a977e73844f9206ee1704be577f8a7521d2b306
[ "MIT" ]
1
2021-03-16T16:02:16.000Z
2021-03-16T16:02:16.000Z
#!/usr/bin/python # The MIT License (MIT) # # Copyright (c) 2017 Massimiliano Patacchiola # # 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 ...
44.913534
133
0.601657
from speech_recognition import SpeechRecognizer from icub import iCub import cv2 import random import time import os import sys def initialise(): my_speech = SpeechRecognizer( hmm_path="/home/massimiliano/pyERA/examples/ex_icub_trust_cognitive_architecture/sphinx/model/en-us/en-us", languag...
true
true
f72cb22b484e4768378d4a3b0201733382c540d7
2,332
py
Python
tests/integration/test_sdv.py
joanvaquer/SDV
83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28
[ "MIT" ]
null
null
null
tests/integration/test_sdv.py
joanvaquer/SDV
83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28
[ "MIT" ]
null
null
null
tests/integration/test_sdv.py
joanvaquer/SDV
83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28
[ "MIT" ]
null
null
null
from sdv import SDV, load_demo def test_sdv(): metadata, tables = load_demo(metadata=True) sdv = SDV() sdv.fit(metadata, tables) # Sample all sampled = sdv.sample_all() assert set(sampled.keys()) == {'users', 'sessions', 'transactions'} assert len(sampled['users']) == 10 # Sample w...
31.945205
87
0.694683
from sdv import SDV, load_demo def test_sdv(): metadata, tables = load_demo(metadata=True) sdv = SDV() sdv.fit(metadata, tables) sampled = sdv.sample_all() assert set(sampled.keys()) == {'users', 'sessions', 'transactions'} assert len(sampled['users']) == 10 sampled = sdv.sampl...
true
true
f72cb255bbd9dbaa14f82003586431b14c8cdf93
340
py
Python
WebApp/admin.py
divij-pherwani/PythonProject
3ba262be580022cffc840f4cf967363eb7d3417b
[ "MIT" ]
null
null
null
WebApp/admin.py
divij-pherwani/PythonProject
3ba262be580022cffc840f4cf967363eb7d3417b
[ "MIT" ]
null
null
null
WebApp/admin.py
divij-pherwani/PythonProject
3ba262be580022cffc840f4cf967363eb7d3417b
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import StudentDetail, UniversityDetail, CourseDetail, CourseName, ApplicationDetail admin.site.register(StudentDetail) admin.site.register(UniversityDetail) admin.site.register(CourseDetail) admin.site.register(CourseName) admin.site.register(ApplicationDetail) # Registe...
28.333333
96
0.844118
from django.contrib import admin from .models import StudentDetail, UniversityDetail, CourseDetail, CourseName, ApplicationDetail admin.site.register(StudentDetail) admin.site.register(UniversityDetail) admin.site.register(CourseDetail) admin.site.register(CourseName) admin.site.register(ApplicationDetail)
true
true
f72cb2583a8f94f5dbbfd81abcd00d5e5a7903fa
2,490
py
Python
serpcord/models/guild.py
PgBiel/serpcord
482736dc691027417edcd6500cdfbf9053f92b63
[ "MIT" ]
null
null
null
serpcord/models/guild.py
PgBiel/serpcord
482736dc691027417edcd6500cdfbf9053f92b63
[ "MIT" ]
null
null
null
serpcord/models/guild.py
PgBiel/serpcord
482736dc691027417edcd6500cdfbf9053f92b63
[ "MIT" ]
null
null
null
import typing import datetime from typing import Mapping, Any, Optional, Iterable, List from .model_abc import JsonAPIModel from .snowflake import Snowflake from .user import User from .enums import PermissionFlags from .permissions import Role from serpcord.utils.model import _init_model_from_mapping_json_data if ty...
46.111111
120
0.701606
import typing import datetime from typing import Mapping, Any, Optional, Iterable, List from .model_abc import JsonAPIModel from .snowflake import Snowflake from .user import User from .enums import PermissionFlags from .permissions import Role from serpcord.utils.model import _init_model_from_mapping_json_data if ty...
true
true
f72cb27896211cd7a2fb7552b1e8abcbeb59a726
713
py
Python
dns/migrations/0016_autozones_path.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
dns/migrations/0016_autozones_path.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
dns/migrations/0016_autozones_path.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# ---------------------------------------------------------------------- # autozones_path # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Third-party m...
29.708333
92
0.4446
from django.db import models from noc.core.migration.base import BaseMigration class Migration(BaseMigration): def migrate(self): self.db.add_column( "dns_dnsserver", "autozones_path", models.CharField( "Autozones path", max_length=256, blank=True, nul...
true
true
f72cb379e5c099506c5177d3a7d4578f63d14794
8,765
py
Python
models/resnet_cifar_quant.py
mengjian0502/GroupLasso_Quant
1c54c940739babf86e362ffc57752c2aa4c8986d
[ "MIT" ]
null
null
null
models/resnet_cifar_quant.py
mengjian0502/GroupLasso_Quant
1c54c940739babf86e362ffc57752c2aa4c8986d
[ "MIT" ]
null
null
null
models/resnet_cifar_quant.py
mengjian0502/GroupLasso_Quant
1c54c940739babf86e362ffc57752c2aa4c8986d
[ "MIT" ]
null
null
null
""" ResNet on CIFAR10 """ import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init from .quant import ClippedReLU, int_conv2d, int_linear from .mpdr_score import get_mpdr_score import math class DownsampleA(nn.Module): def __init__(self, nIn, nOut, stride): super(DownsampleA,...
37.780172
196
0.650542
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init from .quant import ClippedReLU, int_conv2d, int_linear from .mpdr_score import get_mpdr_score import math class DownsampleA(nn.Module): def __init__(self, nIn, nOut, stride): super(DownsampleA, self).__init__() asse...
true
true
f72cb40930dc9e29198e8bc1f4a2818b2e161a8f
449
py
Python
util.py
codefordc/us-congress-pizza-flag-tracker
766c72e01e2c01342d4c6dbe2108fded2022ee74
[ "CC0-1.0" ]
5
2021-01-31T14:29:43.000Z
2021-07-15T16:22:30.000Z
util.py
rajindermavi/us-congress-pizza-flag-tracker
10827f3d6f2ef0cc434a475fc9782fc840cb81ab
[ "CC0-1.0" ]
85
2021-05-12T23:31:29.000Z
2022-03-30T21:23:58.000Z
util.py
rajindermavi/us-congress-pizza-flag-tracker
10827f3d6f2ef0cc434a475fc9782fc840cb81ab
[ "CC0-1.0" ]
8
2021-04-11T16:44:15.000Z
2021-10-30T21:14:17.000Z
import json from config import db from models import UserModel def table_record_to_json(record): modelClass = type(record) columns = [record for record in filter(lambda item: not item.startswith('_'),modelClass.__dict__)] json_value = {column_name: str(getattr(record, column_name))for column_name in colu...
28.0625
102
0.752784
import json from config import db from models import UserModel def table_record_to_json(record): modelClass = type(record) columns = [record for record in filter(lambda item: not item.startswith('_'),modelClass.__dict__)] json_value = {column_name: str(getattr(record, column_name))for column_name in colu...
true
true
f72cb478099ad21f4b980eaa5ef8fdbe1740ca81
519
py
Python
models/utils.py
clabrugere/numpy-basics
81efb4b8ac58fc17dc8f6c676004bbc3a99a92c3
[ "MIT" ]
1
2020-10-27T18:05:26.000Z
2020-10-27T18:05:26.000Z
models/utils.py
clabrugere/numpy-basics
81efb4b8ac58fc17dc8f6c676004bbc3a99a92c3
[ "MIT" ]
null
null
null
models/utils.py
clabrugere/numpy-basics
81efb4b8ac58fc17dc8f6c676004bbc3a99a92c3
[ "MIT" ]
null
null
null
import numpy as np def confusion_matrix(y_true, y_hat, threshold=.5): def _to_class(y): return np.array([1 if i >= threshold else 0 for i in y]) n_classes = len(np.unique(y_true)) cm = np.zeros((n_classes, n_classes)) y_hat = _to_class(y_hat) for a, p in zip(y_true, y_hat): ...
24.714286
64
0.572254
import numpy as np def confusion_matrix(y_true, y_hat, threshold=.5): def _to_class(y): return np.array([1 if i >= threshold else 0 for i in y]) n_classes = len(np.unique(y_true)) cm = np.zeros((n_classes, n_classes)) y_hat = _to_class(y_hat) for a, p in zip(y_true, y_hat): ...
true
true
f72cb4e3d578253909cb6f62152c5f20859236b5
276
py
Python
translator/app/modules/speech.py
sharad461/nepali-translator
d35ba1586e4ad14ddae71b24caf49aac66d63a2e
[ "Apache-2.0" ]
29
2019-08-04T03:05:23.000Z
2021-12-14T14:09:57.000Z
translator/app/modules/speech.py
sharad461/nepali-translator
d35ba1586e4ad14ddae71b24caf49aac66d63a2e
[ "Apache-2.0" ]
3
2020-10-09T01:35:45.000Z
2021-06-02T12:24:31.000Z
translator/app/modules/speech.py
sharad461/nepali-translator
d35ba1586e4ad14ddae71b24caf49aac66d63a2e
[ "Apache-2.0" ]
9
2019-11-04T10:01:34.000Z
2021-12-20T02:03:40.000Z
import speech_recognition as sr def rec(): r = sr.Recognizer() with sr.Microphone() as source: audio = r.listen(source) try: text = r.recognize_google(audio) return(text) except: return("Sorry, couldn't recognize your voice. Please try again.")
21.230769
68
0.666667
import speech_recognition as sr def rec(): r = sr.Recognizer() with sr.Microphone() as source: audio = r.listen(source) try: text = r.recognize_google(audio) return(text) except: return("Sorry, couldn't recognize your voice. Please try again.")
true
true
f72cb63e07c6ebb1781cffd6e5ba78d6f5d59509
1,201
py
Python
sonata/datamodules/base_datamodule.py
sergevkim/sonata
2250b60174628ee76fb7d54bf50e4b8b07b505d5
[ "MIT" ]
1
2021-03-15T19:01:43.000Z
2021-03-15T19:01:43.000Z
sonata/datamodules/base_datamodule.py
sergevkim/sonata
2250b60174628ee76fb7d54bf50e4b8b07b505d5
[ "MIT" ]
null
null
null
sonata/datamodules/base_datamodule.py
sergevkim/sonata
2250b60174628ee76fb7d54bf50e4b8b07b505d5
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from pathlib import Path import torch from torch import Tensor from torch.utils.data import Dataset, DataLoader class BaseDataModule(ABC): def __init__( self, data_path: Path, batch_size: int, num_workers: int, ): ...
21.836364
48
0.587843
from abc import ABC, abstractmethod from pathlib import Path import torch from torch import Tensor from torch.utils.data import Dataset, DataLoader class BaseDataModule(ABC): def __init__( self, data_path: Path, batch_size: int, num_workers: int, ): ...
true
true
f72cb68570a41741af7a25b02a5d19503e0f3386
3,806
py
Python
netket/operator/boson.py
gpescia/MyNetKet
958510966a5870d9d491de0628903cf1fc210921
[ "Apache-2.0" ]
null
null
null
netket/operator/boson.py
gpescia/MyNetKet
958510966a5870d9d491de0628903cf1fc210921
[ "Apache-2.0" ]
11
2021-07-12T15:20:14.000Z
2022-01-17T09:40:41.000Z
netket/operator/boson.py
gpescia/MyNetKet
958510966a5870d9d491de0628903cf1fc210921
[ "Apache-2.0" ]
1
2021-04-25T15:47:32.000Z
2021-04-25T15:47:32.000Z
# Copyright 2021 The NetKet 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 ...
29.503876
96
0.672622
from netket.utils.types import DType from netket.hilbert import AbstractHilbert from ._local_operator import LocalOperator as _LocalOperator def destroy( hilbert: AbstractHilbert, site: int, dtype: DType = float ) -> _LocalOperator: import numpy as np N = hilbert.size_at_index(site) D = np.array(...
true
true
f72cb81ea991aa6ce3d971ea1b6e47347518c4cb
31
py
Python
day2/oddno1.py
nikhilsamninan/python-files
15198459081097058a939b40b5e8ef754e578fe0
[ "Apache-2.0" ]
null
null
null
day2/oddno1.py
nikhilsamninan/python-files
15198459081097058a939b40b5e8ef754e578fe0
[ "Apache-2.0" ]
null
null
null
day2/oddno1.py
nikhilsamninan/python-files
15198459081097058a939b40b5e8ef754e578fe0
[ "Apache-2.0" ]
null
null
null
print(tuple(range(201,400,2)))
15.5
30
0.709677
print(tuple(range(201,400,2)))
true
true
f72cb9eb47ac3d1bf036724169c33be5cd5d5d60
338
py
Python
dogstatsd/__init__.py
ian28223/datadog-unix-agent
09c75778b512361c83ff10e7cdb37b887bcaa8fe
[ "Apache-2.0" ]
13
2018-08-11T01:40:51.000Z
2022-01-02T09:07:43.000Z
dogstatsd/__init__.py
ian28223/datadog-unix-agent
09c75778b512361c83ff10e7cdb37b887bcaa8fe
[ "Apache-2.0" ]
21
2018-05-28T13:16:23.000Z
2021-08-19T15:43:40.000Z
dogstatsd/__init__.py
ian28223/datadog-unix-agent
09c75778b512361c83ff10e7cdb37b887bcaa8fe
[ "Apache-2.0" ]
15
2018-05-10T15:09:41.000Z
2022-03-21T06:46:21.000Z
# Unless explicitly stated otherwise all files in this repository are licensed # under the Apache License Version 2.0. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2018 Datadog, Inc. from .server import Server from .reporter import Reporter __all__ = [ "Server", ...
26
83
0.748521
from .server import Server from .reporter import Reporter __all__ = [ "Server", "Reporter", ]
true
true
f72cba691951b7828f5ece31e4d5727f90f7fb13
428
py
Python
gallery/migrations/0006_image_image.py
dennis027/Gallery
282c1807087beb2e2a5ea1d51b5b6891145c20a0
[ "MIT" ]
null
null
null
gallery/migrations/0006_image_image.py
dennis027/Gallery
282c1807087beb2e2a5ea1d51b5b6891145c20a0
[ "MIT" ]
null
null
null
gallery/migrations/0006_image_image.py
dennis027/Gallery
282c1807087beb2e2a5ea1d51b5b6891145c20a0
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2021-07-03 12:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gallery', '0005_remove_image_image'), ] operations = [ migrations.AddField( model_name='image', name='image', ...
21.4
62
0.598131
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gallery', '0005_remove_image_image'), ] operations = [ migrations.AddField( model_name='image', name='image', field=models.CharField(default=1, max_leng...
true
true
f72cbb0f0e9ed11c2ce819bd187907cbc6229269
1,190
py
Python
examples/pure_jax.py
kingoflolz/DALL-E
d3f3e9a57a31b1e1cc74a449a9e6e5a0442f0ac7
[ "MIT" ]
7
2021-04-10T15:03:37.000Z
2021-07-05T02:49:51.000Z
examples/pure_jax.py
kingoflolz/DALL-E
d3f3e9a57a31b1e1cc74a449a9e6e5a0442f0ac7
[ "MIT" ]
null
null
null
examples/pure_jax.py
kingoflolz/DALL-E
d3f3e9a57a31b1e1cc74a449a9e6e5a0442f0ac7
[ "MIT" ]
1
2021-10-01T07:47:41.000Z
2021-10-01T07:47:41.000Z
import io import jax import requests import PIL from PIL import ImageOps import numpy as np import jax.numpy as jnp from dall_e_jax import get_encoder, get_decoder, map_pixels, unmap_pixels target_image_size = 256 def download_image(url): resp = requests.get(url) resp.raise_for_status() return PIL.Ima...
26.444444
110
0.730252
import io import jax import requests import PIL from PIL import ImageOps import numpy as np import jax.numpy as jnp from dall_e_jax import get_encoder, get_decoder, map_pixels, unmap_pixels target_image_size = 256 def download_image(url): resp = requests.get(url) resp.raise_for_status() return PIL.Ima...
true
true
f72cbbad2bdf77b532dac0c510c9856f9ed9388e
12,421
py
Python
src/run_joint_confidence_cdcOriginalGan.py
williamsashbee/Confident_classifier
cba3ef862b310afc3af6c4a62b524f032f45549e
[ "MIT" ]
null
null
null
src/run_joint_confidence_cdcOriginalGan.py
williamsashbee/Confident_classifier
cba3ef862b310afc3af6c4a62b524f032f45549e
[ "MIT" ]
null
null
null
src/run_joint_confidence_cdcOriginalGan.py
williamsashbee/Confident_classifier
cba3ef862b310afc3af6c4a62b524f032f45549e
[ "MIT" ]
null
null
null
############################################## # This code is based on samples from pytorch # ############################################## # Writer: Kimin Lee from __future__ import print_function import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import d...
37.3003
132
0.622494
from __future__ import print_function import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import data_loader import numpy as np import torchvision.utils as vutils import models from torchvision import datasets, transforms from torch.autograd import Variable i...
true
true
f72cbd007d1006b7c1318b34026adba9042de0cd
5,497
py
Python
tb_rest_client/models/models_ce/page_data_ota_package_info.py
jernkuan/thingsboard-python-rest-client
3fb25272507494e6d494b27ca2380d3c543562e5
[ "Apache-2.0" ]
null
null
null
tb_rest_client/models/models_ce/page_data_ota_package_info.py
jernkuan/thingsboard-python-rest-client
3fb25272507494e6d494b27ca2380d3c543562e5
[ "Apache-2.0" ]
null
null
null
tb_rest_client/models/models_ce/page_data_ota_package_info.py
jernkuan/thingsboard-python-rest-client
3fb25272507494e6d494b27ca2380d3c543562e5
[ "Apache-2.0" ]
1
2021-11-26T11:24:56.000Z
2021-11-26T11:24:56.000Z
# coding: utf-8 """ ThingsBoard REST API For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>. # noqa: E501 OpenAPI spec version: 2.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-...
29.084656
163
0.593778
import pprint import re import six class PageDataOtaPackageInfo(object): swagger_types = { 'data': 'list[OtaPackageInfo]', 'has_next': 'bool', 'total_elements': 'int', 'total_pages': 'int' } attribute_map = { 'data': 'data', 'has_next': 'hasNext', ...
true
true
f72cbd8032bfba00a07e989b6b537df95ff4361b
8,128
py
Python
Chapter2/LFM.py
7125messi/rencommend_system_learning
4a8bcef241c4c0357cfbe4d1a9828b847974b69c
[ "Apache-2.0" ]
3
2019-10-10T15:49:42.000Z
2020-05-31T07:39:10.000Z
Chapter2/LFM.py
7125messi/rencommend_system_learning
4a8bcef241c4c0357cfbe4d1a9828b847974b69c
[ "Apache-2.0" ]
null
null
null
Chapter2/LFM.py
7125messi/rencommend_system_learning
4a8bcef241c4c0357cfbe4d1a9828b847974b69c
[ "Apache-2.0" ]
2
2019-09-18T07:59:48.000Z
2020-01-16T15:00:48.000Z
# 导入包 import random import math import numpy as np import time from tqdm import tqdm from tqdm import trange # 1 通用函数定义 ## 定义装饰器,监控运行时间 def timmer(func): def wrapper(*args, **kwargs): start_time = time.time() res = func(*args, **kwargs) stop_time = time.time() print('Func {},run tim...
29.028571
93
0.506275
import random import math import numpy as np import time from tqdm import tqdm from tqdm import trange def timmer(func): def wrapper(*args, **kwargs): start_time = time.time() res = func(*args, **kwargs) stop_time = time.time() print('Func {},run time:{}'.format(func.__name__,stop_t...
true
true
f72cbd82ce65ea7deeb9b12673a6fa17f65eaeaa
2,015
py
Python
intake_questgdal/base.py
Aquaveo/intake_questgdal
c11cd111a53b7270391c6923d0e252c4abbbc56b
[ "BSD-3-Clause" ]
null
null
null
intake_questgdal/base.py
Aquaveo/intake_questgdal
c11cd111a53b7270391c6923d0e252c4abbbc56b
[ "BSD-3-Clause" ]
1
2019-06-06T15:28:15.000Z
2019-06-06T15:28:15.000Z
intake_questgdal/base.py
Aquaveo/intake_questgdal
c11cd111a53b7270391c6923d0e252c4abbbc56b
[ "BSD-3-Clause" ]
null
null
null
from intake.source.base import DataSource, Schema import rasterio import xarray as xr import warnings # from . import __version__ class quest_gdal_base(DataSource): """Reads an HDF5 table Parameters ---------- path: str File to load. tablename: str Name of table to load. metad...
26.168831
72
0.4933
from intake.source.base import DataSource, Schema import rasterio import xarray as xr import warnings class quest_gdal_base(DataSource): version = '0.0.1' container = 'dataframe' partition_access = False path = '' def _get_schema(self): if self.pat...
true
true
f72cbdde941379a53be16076b51cf17c429ca67d
6,353
py
Python
mooringlicensing/management/commands/approval_renewal_notices.py
jawaidm/mooringlicensing
b22e74209da8655c8ad3af99e00f36d17c8ef73f
[ "Apache-2.0" ]
null
null
null
mooringlicensing/management/commands/approval_renewal_notices.py
jawaidm/mooringlicensing
b22e74209da8655c8ad3af99e00f36d17c8ef73f
[ "Apache-2.0" ]
2
2021-03-05T06:48:11.000Z
2021-03-26T08:14:17.000Z
mooringlicensing/management/commands/approval_renewal_notices.py
jawaidm/mooringlicensing
b22e74209da8655c8ad3af99e00f36d17c8ef73f
[ "Apache-2.0" ]
2
2021-09-19T15:45:19.000Z
2021-10-05T05:07:41.000Z
from django.core.management.base import BaseCommand from django.utils import timezone from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import Q from mooringlicensing.components.approvals.models import ( Approval, WaitingListAllocation, AnnualAdmi...
45.705036
160
0.668346
from django.core.management.base import BaseCommand from django.utils import timezone from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import Q from mooringlicensing.components.approvals.models import ( Approval, WaitingListAllocation, AnnualAdmi...
true
true
f72cbe35893af2f1b2c363e8fe4e587be57b909c
6,321
py
Python
InterventionsMIP/main.py
haoxiangyang89/COVID_Staged_Alert
4c2cc5ef1d38c140875380a5f10a0fe1eaf8a47a
[ "MIT" ]
1
2021-06-24T19:27:01.000Z
2021-06-24T19:27:01.000Z
InterventionsMIP/main.py
haoxiangyang89/COVID_Staged_Alert
4c2cc5ef1d38c140875380a5f10a0fe1eaf8a47a
[ "MIT" ]
null
null
null
InterventionsMIP/main.py
haoxiangyang89/COVID_Staged_Alert
4c2cc5ef1d38c140875380a5f10a0fe1eaf8a47a
[ "MIT" ]
3
2021-12-15T13:32:25.000Z
2022-02-24T13:57:07.000Z
from InterventionsMIP import project_path, instances_path import multiprocessing as mp from threshold_policy import threshold_policy_search from interventions import Intervension from epi_params import EpiSetup, ParamDistribution from utils import parse_arguments from reporting.plotting import plot_stoch_simulations f...
64.5
150
0.424933
from InterventionsMIP import project_path, instances_path import multiprocessing as mp from threshold_policy import threshold_policy_search from interventions import Intervension from epi_params import EpiSetup, ParamDistribution from utils import parse_arguments from reporting.plotting import plot_stoch_simulations f...
true
true
f72cbe73762b18771ed1651cd35031464722fae9
19,152
py
Python
official/nlp/transformer/transformer_main.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
4
2020-03-13T14:01:32.000Z
2021-05-31T17:17:32.000Z
official/nlp/transformer/transformer_main.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
10
2019-12-28T21:31:19.000Z
2020-04-12T20:01:58.000Z
official/nlp/transformer/transformer_main.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
8
2020-04-12T04:30:33.000Z
2021-09-17T20:54:44.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.457831
80
0.688753
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tempfile from absl import app from absl import flags from absl import logging import tensorflow as tf from official.modeling import performance from official.nlp.transformer import compute_bl...
true
true
f72cbea6b5b5fb4a9f0c9efd4d8092605bb087d6
18,884
py
Python
src/sentry/models/dsymfile.py
percipient/sentry
84c6f75ab40e12677c81d9210c3fe8ad66d7a0c3
[ "BSD-3-Clause" ]
null
null
null
src/sentry/models/dsymfile.py
percipient/sentry
84c6f75ab40e12677c81d9210c3fe8ad66d7a0c3
[ "BSD-3-Clause" ]
8
2019-12-28T23:49:55.000Z
2022-03-02T04:34:18.000Z
src/sentry/models/dsymfile.py
percipient/sentry
84c6f75ab40e12677c81d9210c3fe8ad66d7a0c3
[ "BSD-3-Clause" ]
null
null
null
""" sentry.models.dsymfile ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os import shutil import hashlib import six import tempfile from requests.exceptions import Reque...
32.061121
81
0.54157
from __future__ import absolute_import import os import shutil import hashlib import six import tempfile from requests.exceptions import RequestException from jsonfield import JSONField from itertools import chain from django.db import models, router, transaction, connection, IntegrityError from django.utils import ...
true
true
f72cbf17e64a21584865047b98978bd2193a31f9
53,060
py
Python
graphics/basic_plot_functions.py
JCSDA/mpas-jedi
e0780d1fd295912ee4cfb758854c52b6764d4ab9
[ "Apache-2.0" ]
2
2021-09-25T01:20:10.000Z
2021-12-17T18:44:53.000Z
graphics/basic_plot_functions.py
JCSDA/mpas-jedi
e0780d1fd295912ee4cfb758854c52b6764d4ab9
[ "Apache-2.0" ]
null
null
null
graphics/basic_plot_functions.py
JCSDA/mpas-jedi
e0780d1fd295912ee4cfb758854c52b6764d4ab9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from copy import deepcopy import cartopy.crs as ccrs import datetime as dt import logging from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import matplotlib matplotlib.use('AGG') import matplotlib.axes as maxes import matplotlib.cm as cm import matplotl...
35.827144
115
0.561006
from copy import deepcopy import cartopy.crs as ccrs import datetime as dt import logging from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import matplotlib matplotlib.use('AGG') import matplotlib.axes as maxes import matplotlib.cm as cm import matplotlib.colors as colors fro...
true
true
f72cbfd0caae91239053996913ba8621fe6047da
636
py
Python
RestaurantReview/manage.py
sehyun-seankim/Django_project_restaurant_review
5d2eb90486f8064aec16538a71c667d830d3db37
[ "MIT" ]
null
null
null
RestaurantReview/manage.py
sehyun-seankim/Django_project_restaurant_review
5d2eb90486f8064aec16538a71c667d830d3db37
[ "MIT" ]
null
null
null
RestaurantReview/manage.py
sehyun-seankim/Django_project_restaurant_review
5d2eb90486f8064aec16538a71c667d830d3db37
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'RestaurantReview.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: rai...
28.909091
80
0.687107
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'RestaurantReview.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and...
true
true
f72cbfdf7f7c4f11bbe1601b54f70466e1e3e688
5,321
py
Python
slackclient/_response.py
lovexi/CodingMonkey-Bot-Python-version
52561d2b15a78119769099d304a98f80da53a010
[ "MIT" ]
null
null
null
slackclient/_response.py
lovexi/CodingMonkey-Bot-Python-version
52561d2b15a78119769099d304a98f80da53a010
[ "MIT" ]
null
null
null
slackclient/_response.py
lovexi/CodingMonkey-Bot-Python-version
52561d2b15a78119769099d304a98f80da53a010
[ "MIT" ]
null
null
null
import json import random import math import os from crawling._twitter import twitter_crawling class Response(object): def __init__(self, token): self.name = "" self.token = token self.greetingList = ['Hello {}, welcome to the Equifax Hackathon channel! Have fun :). You can type help for mo...
58.472527
153
0.516256
import json import random import math import os from crawling._twitter import twitter_crawling class Response(object): def __init__(self, token): self.name = "" self.token = token self.greetingList = ['Hello {}, welcome to the Equifax Hackathon channel! Have fun :). You can type help for mo...
true
true
f72cc038fe01f625fd75044fc25d9c661707b934
241
py
Python
fabfile/__init__.py
lem-usp/Bio507
67b8f8f677e6c1f39ad257d456f0cc0cac289022
[ "MIT" ]
null
null
null
fabfile/__init__.py
lem-usp/Bio507
67b8f8f677e6c1f39ad257d456f0cc0cac289022
[ "MIT" ]
null
null
null
fabfile/__init__.py
lem-usp/Bio507
67b8f8f677e6c1f39ad257d456f0cc0cac289022
[ "MIT" ]
null
null
null
from fabric.state import output from .development import * # # Fabric configuration # output['debug'] = False # see full command list def help(): ''' Fabfile documentation ''' local('python -c "import fabfile; help(fabfile)"')
16.066667
54
0.680498
from fabric.state import output from .development import * output['debug'] = False def help(): local('python -c "import fabfile; help(fabfile)"')
true
true
f72cc0e34bd07cf91c3cd084ab5e50132bdbe531
5,036
py
Python
sahara/plugins/vanilla/hadoop2/validation.py
hortonworksqe/sahara
b8edeaf2b6a475728bf9fd2ddc3a860dc6c23270
[ "Apache-2.0" ]
1
2016-04-13T17:07:05.000Z
2016-04-13T17:07:05.000Z
sahara/plugins/vanilla/hadoop2/validation.py
hortonworksqe/sahara
b8edeaf2b6a475728bf9fd2ddc3a860dc6c23270
[ "Apache-2.0" ]
null
null
null
sahara/plugins/vanilla/hadoop2/validation.py
hortonworksqe/sahara
b8edeaf2b6a475728bf9fd2ddc3a860dc6c23270
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 Mirantis 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...
41.619835
79
0.633241
from sahara.plugins.general import exceptions as ex from sahara.plugins.general import utils as u from sahara.plugins.vanilla.hadoop2 import config_helper as cu from sahara.plugins.vanilla import utils as vu from sahara.utils import general as gu def validate_cluster_creating(pctx, cluster): nn_count = _get_inst...
true
true
f72cc0fbea74a83a8775b2c4a4948f97cf3aff29
5,959
py
Python
DeepReinforcementLearning/funcs.py
Christoper-Harvey/1st-Capstone
93630a4d5f4a2d939c8b5f74f11b5b33052e3f72
[ "MIT" ]
1
2019-06-13T13:11:52.000Z
2019-06-13T13:11:52.000Z
DeepReinforcementLearning/funcs.py
Christoper-Harvey/1st-Capstone
93630a4d5f4a2d939c8b5f74f11b5b33052e3f72
[ "MIT" ]
null
null
null
DeepReinforcementLearning/funcs.py
Christoper-Harvey/1st-Capstone
93630a4d5f4a2d939c8b5f74f11b5b33052e3f72
[ "MIT" ]
2
2019-04-30T19:14:11.000Z
2019-06-13T13:11:57.000Z
import numpy as np import random import loggers as lg from game import Game, GameState from model import Residual_CNN from agent import Agent, User import config def playMatchesBetweenVersions(env, run_version, player1version, player2version, EPISODES, logger, turns_until_tau0, goes_first = 0): if player1...
41.096552
167
0.545058
import numpy as np import random import loggers as lg from game import Game, GameState from model import Residual_CNN from agent import Agent, User import config def playMatchesBetweenVersions(env, run_version, player1version, player2version, EPISODES, logger, turns_until_tau0, goes_first = 0): if player1...
true
true
f72cc221951afaa2a1888c4d748a5068c84f56dc
3,916
py
Python
topasgraphsim/src/functions/dp.py
sebasj13/topas-create-graphs
5ccdbcbbe39461917cc015aa59805e518421431c
[ "MIT" ]
1
2021-12-20T10:56:40.000Z
2021-12-20T10:56:40.000Z
topasgraphsim/src/functions/dp.py
sebasj13/topas-create-graphs
5ccdbcbbe39461917cc015aa59805e518421431c
[ "MIT" ]
null
null
null
topasgraphsim/src/functions/dp.py
sebasj13/topas-create-graphs
5ccdbcbbe39461917cc015aa59805e518421431c
[ "MIT" ]
1
2021-12-26T06:29:22.000Z
2021-12-26T06:29:22.000Z
import numpy as np import scipy.integrate as integrate import scipy.interpolate as interpolate def calculate_parameters(axis, dose, cax=False): """ A function to calculate the relevant descriptive parameters of dose profiles. """ interpolated_axis = np.linspace(axis[0], axis[-1], len(axis) * 100...
27.77305
88
0.516854
import numpy as np import scipy.integrate as integrate import scipy.interpolate as interpolate def calculate_parameters(axis, dose, cax=False): interpolated_axis = np.linspace(axis[0], axis[-1], len(axis) * 100) akima_dose_interpolator = interpolate.Akima1DInterpolator(axis, dose) interpolated_dose = np...
true
true
f72cc242a75bff056fc4182f50f291db178b0519
5,780
py
Python
sonarqube/community/user_groups.py
0x646e78/python-sonarqube-api
c641ab4dd180b4184f2663bd28277aa796b36417
[ "MIT" ]
null
null
null
sonarqube/community/user_groups.py
0x646e78/python-sonarqube-api
c641ab4dd180b4184f2663bd28277aa796b36417
[ "MIT" ]
null
null
null
sonarqube/community/user_groups.py
0x646e78/python-sonarqube-api
c641ab4dd180b4184f2663bd28277aa796b36417
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Author: Jialiang Shi from sonarqube.utils.rest_client import RestClient from sonarqube.utils.config import ( API_USER_GROUPS_SEARCH_ENDPOINT, API_USER_GROUPS_CREATE_ENDPOINT, API_USER_GROUPS_DELETE_ENDPOINT, API_USER_GROUPS_UPDATE_ENDPOINT, API_USER_GR...
30.582011
120
0.59654
from sonarqube.utils.rest_client import RestClient from sonarqube.utils.config import ( API_USER_GROUPS_SEARCH_ENDPOINT, API_USER_GROUPS_CREATE_ENDPOINT, API_USER_GROUPS_DELETE_ENDPOINT, API_USER_GROUPS_UPDATE_ENDPOINT, API_USER_GROUPS_USERS_ENDPOINT, API_USER_GROUPS_ADD_USER_ENDPOINT, API_U...
true
true
f72cc2a756c43756ba71fb67aa4ae3e1efa74f2f
5,550
py
Python
userbot/modules/locks.py
RiSecID/Auto
d06ef712666a35ddbf0c123dbb86705096cbbb56
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-04-10T13:11:46.000Z
2020-04-10T13:11:46.000Z
userbot/modules/locks.py
RiSecID/Auto
d06ef712666a35ddbf0c123dbb86705096cbbb56
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/locks.py
RiSecID/Auto
d06ef712666a35ddbf0c123dbb86705096cbbb56
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-12-02T14:59:04.000Z
2020-12-02T14:59:04.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. from telethon.tl.functions.messages import EditChatDefaultBannedRightsRequest from telethon.tl.types import ChatBa...
29.057592
80
0.544505
from telethon.tl.functions.messages import EditChatDefaultBannedRightsRequest from telethon.tl.types import ChatBannedRights from userbot import CMD_HELP from userbot.events import register @register(outgoing=True, pattern=r"^.lock ?(.*)") async def locks(event): input_str = event.pattern_match.group(...
true
true
f72cc5c07d47e87c78a7d4236d54674e5f436c66
230
py
Python
pycones/sponsorship/managers.py
python-spain/PyConES2015
af78ad7f1d7df747a2f5428be87a5b061457dd24
[ "MIT" ]
null
null
null
pycones/sponsorship/managers.py
python-spain/PyConES2015
af78ad7f1d7df747a2f5428be87a5b061457dd24
[ "MIT" ]
null
null
null
pycones/sponsorship/managers.py
python-spain/PyConES2015
af78ad7f1d7df747a2f5428be87a5b061457dd24
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models class SponsorManager(models.Manager): def active(self): return self.get_query_set().filter(active=True).order_by("level")
23
73
0.726087
from __future__ import unicode_literals from django.db import models class SponsorManager(models.Manager): def active(self): return self.get_query_set().filter(active=True).order_by("level")
true
true
f72cc5f2ca3bea87b59576ba3da7939aab82e2af
116
py
Python
URI/1 - INICIANTE/Python/1759 - HoHoHo.py
william-james-pj/LogicaProgramacao
629f746e34da2e829dc7ea2e489ac36bb1b1fb13
[ "MIT" ]
1
2020-04-14T16:48:16.000Z
2020-04-14T16:48:16.000Z
URI/1 - INICIANTE/Python/1759 - HoHoHo.py
william-james-pj/LogicaProgramacao
629f746e34da2e829dc7ea2e489ac36bb1b1fb13
[ "MIT" ]
null
null
null
URI/1 - INICIANTE/Python/1759 - HoHoHo.py
william-james-pj/LogicaProgramacao
629f746e34da2e829dc7ea2e489ac36bb1b1fb13
[ "MIT" ]
null
null
null
n = int(input()) for y in range(0, n): if(y == n-1): print('Ho!') else: print('Ho', end=' ')
19.333333
28
0.413793
n = int(input()) for y in range(0, n): if(y == n-1): print('Ho!') else: print('Ho', end=' ')
true
true