hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
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
209
max_issues_repo_name
stringlengths
5
121
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
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
a27c2d4e2eec5b31723ebe29ac68b766f91736e6
3,376
py
Python
nicos_virt_mlz/panda/setups/mono_cu.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_virt_mlz/panda/setups/mono_cu.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_virt_mlz/panda/setups/mono_cu.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
description = 'PANDA Cu-monochromator' group = 'lowlevel' includes = ['monofoci', 'monoturm', 'panda_mtt'] excludes = ['mono_pg', 'mono_si', 'mono_heusler'] extended = dict(dynamic_loaded = True) devices = dict( mono_cu = device('nicos.devices.tas.Monochromator', description = 'PANDA Cu monochromator',...
32.461538
88
0.592713
c9a874c6c61a5ebe08e8a4787e017e32d02dcded
5,064
py
Python
tests/test_ensemble.py
cbegeman/SmartSim
572ff2791d4b9312cdbb477ff8a4088824f499e4
[ "BSD-2-Clause" ]
null
null
null
tests/test_ensemble.py
cbegeman/SmartSim
572ff2791d4b9312cdbb477ff8a4088824f499e4
[ "BSD-2-Clause" ]
null
null
null
tests/test_ensemble.py
cbegeman/SmartSim
572ff2791d4b9312cdbb477ff8a4088824f499e4
[ "BSD-2-Clause" ]
null
null
null
import pytest from smartsim import Experiment from smartsim.entity import Ensemble, Model from smartsim.error import EntityExistsError, SSUnsupportedError, UserStrategyError from smartsim.settings import RunSettings """ Test ensemble creation TODO: test to add - test batch settings/run_setting combinations and error...
28.290503
84
0.634676
a2c8547f238c0b4d5fddff1d19873ede89488a53
491
py
Python
buffer/scripts-emb-ext/sources/java_ext/pkgs/scripts/TPK.py
zaqwes8811/coordinator-tasks
7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a
[ "MIT" ]
null
null
null
buffer/scripts-emb-ext/sources/java_ext/pkgs/scripts/TPK.py
zaqwes8811/coordinator-tasks
7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a
[ "MIT" ]
15
2015-03-07T12:46:41.000Z
2015-04-11T09:08:36.000Z
projects/shadow/kmap-builder-jython27/test_scripts/TPK.py
zaqwes8811/vocabulary-cards
abeab5c86b1c6f68d8796475cba80c4f2c6055ff
[ "Apache-2.0" ]
null
null
null
# How it known pyclasspath? # ['D:\\github-develop\\couples-compiling-and-scripting\\java\\Lib', '__classpath__', '__pyclasspath__/'] from math import sqrt import sys def TPK(): def f(t): return sqrt(abs(t))+5*t**3 print "Enter a number at each prompt" a = [int(raw_input(">")) for i in range(11)] ...
24.55
105
0.547862
f5821492a509560ca80f39d2db3eec04d697b10b
79,542
py
Python
wikisql_full_sup/sqlova/utils/utils_wikisql.py
taoyds/grappa
42d7655eeab5b9c0ed0918d0c39d3ddcccffa52a
[ "Apache-2.0", "CC-BY-4.0" ]
17
2021-08-24T20:36:49.000Z
2022-02-21T08:02:58.000Z
wikisql_full_sup/sqlova/utils/utils_wikisql.py
taoyds/grappa
42d7655eeab5b9c0ed0918d0c39d3ddcccffa52a
[ "Apache-2.0", "CC-BY-4.0" ]
5
2021-08-24T23:43:44.000Z
2022-01-14T08:55:54.000Z
wikisql_full_sup/sqlova/utils/utils_wikisql.py
taoyds/grappa
42d7655eeab5b9c0ed0918d0c39d3ddcccffa52a
[ "Apache-2.0", "CC-BY-4.0" ]
4
2021-08-24T18:39:32.000Z
2022-02-01T18:36:16.000Z
# Copyright 2019-present NAVER Corp. # Apache License v2.0 # Wonseok Hwang import os, json import random as rd from copy import deepcopy from matplotlib.pylab import * import torch import torchvision.datasets as dsets import torch.nn as nn import torch.nn.functional as F from .utils import generate_perm_inv from ...
30.118137
168
0.573433
0cfec02b33337beb40ce2c7db57376d241c1865a
46
py
Python
src/entsoe/exceptions.py
olemagnp/entsoeAPI
658b84c632299c8fc8f5a8289527904b2fc1a2ee
[ "MIT" ]
null
null
null
src/entsoe/exceptions.py
olemagnp/entsoeAPI
658b84c632299c8fc8f5a8289527904b2fc1a2ee
[ "MIT" ]
null
null
null
src/entsoe/exceptions.py
olemagnp/entsoeAPI
658b84c632299c8fc8f5a8289527904b2fc1a2ee
[ "MIT" ]
null
null
null
class DataNotReadyError(ValueError): pass
15.333333
36
0.782609
d072c080d0b609c55b1357630ff7147c4d3b0e36
705
py
Python
backend/app/__init__.py
huybery/-sunglasses-huybery-blog
f41795bd8d38b8fec74adc4868ba5e52ac12cc14
[ "MIT" ]
null
null
null
backend/app/__init__.py
huybery/-sunglasses-huybery-blog
f41795bd8d38b8fec74adc4868ba5e52ac12cc14
[ "MIT" ]
null
null
null
backend/app/__init__.py
huybery/-sunglasses-huybery-blog
f41795bd8d38b8fec74adc4868ba5e52ac12cc14
[ "MIT" ]
null
null
null
# coding=utf-8 from flask import Flask from flask import render_template from flask_cors import CORS from flask_mongoengine import MongoEngine from flask_httpauth import HTTPBasicAuth # Flask 实例 blog = Flask(__name__, instance_relative_config=True, static_folder = "../../dist/static", template_folde...
20.735294
56
0.702128
7187375445e50ed7d16fa880cfd986f991ba9e78
1,010
py
Python
kubernetes/test/test_extensions_v1beta1_scale.py
woqer/python
3a6fe8231cefe1fa39a0a69d4b2f33044ab32745
[ "Apache-2.0" ]
1
2019-07-12T05:38:06.000Z
2019-07-12T05:38:06.000Z
kubernetes/test/test_extensions_v1beta1_scale.py
woqer/python
3a6fe8231cefe1fa39a0a69d4b2f33044ab32745
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_extensions_v1beta1_scale.py
woqer/python
3a6fe8231cefe1fa39a0a69d4b2f33044ab32745
[ "Apache-2.0" ]
1
2021-05-18T12:25:56.000Z
2021-05-18T12:25:56.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.11.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
22.444444
105
0.722772
d7bbc3d021b7b82a7d7466c7e8f25c509e22340d
1,987
py
Python
max/game_state.py
thexa4/Spades
1b6c5003d5bec13421418e1e563db435fac18286
[ "MIT" ]
1
2018-01-27T16:45:51.000Z
2018-01-27T16:45:51.000Z
max/game_state.py
thexa4/Spades
1b6c5003d5bec13421418e1e563db435fac18286
[ "MIT" ]
null
null
null
max/game_state.py
thexa4/Spades
1b6c5003d5bec13421418e1e563db435fac18286
[ "MIT" ]
1
2018-01-27T16:45:56.000Z
2018-01-27T16:45:56.000Z
import tensorflow as tf class PlayerState: def __init__(self): self.tricks = 0 self.bid = -1 self.empty_suits = [0, 0, 0, 0] class GameState: def __init__(self, hand, seen, scores, tricks, bids, empty_suits): self.hand = [0] * 52 self.seen = [0] * 52 self.my_sco...
32.048387
108
0.559134
11d8b1ffcabcacbd247563f72017b26a99643c6d
8,152
py
Python
contrib/devtools/update-translations.py
swampcoin/AeriumX
76c4340a9e16ec326b20c4d7a07be88d84ee97e3
[ "MIT" ]
5
2018-06-10T21:32:12.000Z
2019-01-13T14:47:12.000Z
contrib/devtools/update-translations.py
swampcoin/AeriumX
76c4340a9e16ec326b20c4d7a07be88d84ee97e3
[ "MIT" ]
1
2019-07-07T08:25:21.000Z
2019-07-07T08:25:21.000Z
contrib/devtools/update-translations.py
swampcoin/AeriumX
76c4340a9e16ec326b20c4d7a07be88d84ee97e3
[ "MIT" ]
13
2018-06-16T18:01:29.000Z
2020-08-02T16:36:33.000Z
#!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the follo...
38.635071
124
0.633955
e0bf2bd37b3dccdba45325aa7cbe698f13c5315d
12,098
py
Python
pyNastran/converters/usm3d/usm3d_io.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
1
2021-08-02T09:49:24.000Z
2021-08-02T09:49:24.000Z
pyNastran/converters/usm3d/usm3d_io.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
1
2021-06-07T16:33:59.000Z
2021-06-07T16:33:59.000Z
pyNastran/converters/usm3d/usm3d_io.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
1
2021-10-14T03:52:44.000Z
2021-10-14T03:52:44.000Z
"""Defines the GUI IO file for Usm3d.""" import os from collections import defaultdict, OrderedDict import numpy as np from pyNastran.utils import object_attributes from pyNastran.utils.numpy_utils import integer_float_types from pyNastran.converters.usm3d.usm3d_reader import Usm3d from pyNastran.converters.usm3d.tim...
36.221557
99
0.531906
f74801f9c674e14b256db3eb764a33d36dc9aecb
873
py
Python
myproject/urls.py
felix13/django-signals
24e6b565b5db336e59ff51f41fa3980bc2b98f40
[ "MIT" ]
null
null
null
myproject/urls.py
felix13/django-signals
24e6b565b5db336e59ff51f41fa3980bc2b98f40
[ "MIT" ]
null
null
null
myproject/urls.py
felix13/django-signals
24e6b565b5db336e59ff51f41fa3980bc2b98f40
[ "MIT" ]
null
null
null
"""myproject 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-bas...
33.576923
77
0.701031
8933b205dca74acdbbe84c55025cd60403c304d4
497
py
Python
resources/PyInstaller-3.0/build/lib/PyInstaller/hooks/hook-pint.py
dvt32/mypymodoro
7d2db639ea828e4db9caa84cd6f747f542ab22d8
[ "MIT" ]
null
null
null
resources/PyInstaller-3.0/build/lib/PyInstaller/hooks/hook-pint.py
dvt32/mypymodoro
7d2db639ea828e4db9caa84cd6f747f542ab22d8
[ "MIT" ]
null
null
null
resources/PyInstaller-3.0/build/lib/PyInstaller/hooks/hook-pint.py
dvt32/mypymodoro
7d2db639ea828e4db9caa84cd6f747f542ab22d8
[ "MIT" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2015, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this softwa...
33.133333
78
0.539235
2d12e81e16aae2451ef3daa1371107e73b68255a
627
py
Python
learning_blogs/migrations/0001_initial.py
komaron/learning_blog
9a2054ca47218eff6f5b7c9fb460090272dcd16d
[ "MIT" ]
null
null
null
learning_blogs/migrations/0001_initial.py
komaron/learning_blog
9a2054ca47218eff6f5b7c9fb460090272dcd16d
[ "MIT" ]
null
null
null
learning_blogs/migrations/0001_initial.py
komaron/learning_blog
9a2054ca47218eff6f5b7c9fb460090272dcd16d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-29 00:57 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Topics...
25.08
114
0.596491
703f3367bb8f5b14c167baa295f5d34ed36f63f0
1,513
py
Python
trial_error/watch_policies.py
rushabh268/kubernetes-network-policy-controller
6c3b6c8565a5e5459f1e92fdac754cccf3b98176
[ "Apache-2.0" ]
2
2018-01-24T21:31:31.000Z
2018-03-20T20:19:23.000Z
trial_error/watch_policies.py
rushabh268/kubernetes-network-policy-controller
6c3b6c8565a5e5459f1e92fdac754cccf3b98176
[ "Apache-2.0" ]
null
null
null
trial_error/watch_policies.py
rushabh268/kubernetes-network-policy-controller
6c3b6c8565a5e5459f1e92fdac754cccf3b98176
[ "Apache-2.0" ]
2
2021-06-06T13:13:27.000Z
2021-06-16T16:32:19.000Z
from kubernetes import client, config, watch import time from tornado.ioloop import IOLoop from tornado import gen def create_new_policy_rules(network_policy, callback): print 'Checking policy contents to add iptables based rules' print network_policy time.sleep(1) callback(network_policy) def create_...
37.825
103
0.699273
8856ce5afb2528825e5d178669eeb3c22d532afb
3,320
py
Python
tensorflow/contrib/data/python/kernel_tests/unique_dataset_op_test.py
Esail/tensorflow
2538e68a69e585696175bd972cae119e06bde294
[ "Apache-2.0" ]
1
2019-01-03T13:49:53.000Z
2019-01-03T13:49:53.000Z
tensorflow/contrib/data/python/kernel_tests/unique_dataset_op_test.py
Esail/tensorflow
2538e68a69e585696175bd972cae119e06bde294
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/data/python/kernel_tests/unique_dataset_op_test.py
Esail/tensorflow
2538e68a69e585696175bd972cae119e06bde294
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 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...
39.52381
80
0.631325
c61845ed64e50763fd767c2823894d36507470c1
7,066
py
Python
cs/capsnet.py
satabios/ressurect
4da1f0d59af69fce6c9f70a0ac8e989ae2f75cdb
[ "MIT" ]
null
null
null
cs/capsnet.py
satabios/ressurect
4da1f0d59af69fce6c9f70a0ac8e989ae2f75cdb
[ "MIT" ]
null
null
null
cs/capsnet.py
satabios/ressurect
4da1f0d59af69fce6c9f70a0ac8e989ae2f75cdb
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable USE_CUDA = True if torch.cuda.is_available() else False class ConvLayer(nn.Module): def __init__(self, in_channels=1, out_channels=256, kernel_size=9): super(ConvLayer, self).__init__() ...
39.255556
120
0.576847
42a72d9bd983649b0b5cee229474319cdddb72a8
1,021
py
Python
source/emp_main/migrations/0002_auto_20201014_1114.py
LukasLandwich/energy_management_panel
9f9d6cf935573bbe6a49206ece0a82e3a98061d2
[ "MIT-0", "CC-BY-4.0", "MIT" ]
3
2020-11-18T09:18:51.000Z
2021-05-18T18:10:22.000Z
source/emp_main/migrations/0002_auto_20201014_1114.py
candytthh/energy_management_panel
6cf0ceac0c51b22155299f29bbfbe23bbd30f882
[ "MIT" ]
2
2020-11-24T09:03:41.000Z
2021-04-07T19:46:28.000Z
source/emp_main/migrations/0002_auto_20201014_1114.py
candytthh/energy_management_panel
6cf0ceac0c51b22155299f29bbfbe23bbd30f882
[ "MIT" ]
2
2020-11-17T10:29:38.000Z
2020-11-17T12:47:36.000Z
# Generated by Django 3.1 on 2020-10-14 11:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('emp_main', '0001_initial'), ] operations = [ migrations.AddField( model_name='datapoint', name='short_name', ...
42.541667
440
0.673849
1e94c7c83fbefb012b07ca7800ee4d3e09c4634b
3,069
py
Python
DataStructure/linkedlist/DoublyLinkedList.py
abegpatel/LinkedList-Data-Structure-Implementation
dce73f6d2b36260003fc3d8f5ad49e1609a97c88
[ "MIT" ]
1
2021-06-12T06:52:07.000Z
2021-06-12T06:52:07.000Z
DataStructure/linkedlist/DoublyLinkedList.py
abegpatel/LinkedList-Data-Structure-Implementation
dce73f6d2b36260003fc3d8f5ad49e1609a97c88
[ "MIT" ]
null
null
null
DataStructure/linkedlist/DoublyLinkedList.py
abegpatel/LinkedList-Data-Structure-Implementation
dce73f6d2b36260003fc3d8f5ad49e1609a97c88
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Mar 24 20:29:47 2021 @author: Abeg """ #Doubly Linkedlist import gc class Node: def __init__(self, data): self.data = data self.next = None self.prev = None class DoublyLinkedList: def __init__(self): ...
20.324503
60
0.493646
a9fe8d422704072ebfaff972ec371c93fdcc62c4
1,361
py
Python
jarvis/jobs/avinor.py
unstad/jarvis2
8f1876249aea327f773c5747c2225753d6bc90d5
[ "MIT" ]
83
2017-03-17T02:16:30.000Z
2022-02-20T18:39:40.000Z
jarvis/jobs/avinor.py
unstad/jarvis2
8f1876249aea327f773c5747c2225753d6bc90d5
[ "MIT" ]
3
2017-06-05T19:16:48.000Z
2021-04-20T22:42:38.000Z
jarvis/jobs/avinor.py
unstad/jarvis2
8f1876249aea327f773c5747c2225753d6bc90d5
[ "MIT" ]
30
2017-03-24T07:17:33.000Z
2021-11-17T20:05:36.000Z
# -*- coding: utf-8 -*- import requests from jobs import AbstractJob from xml.etree import ElementTree as etree class Avinor(AbstractJob): def __init__(self, conf): self.interval = conf["interval"] self.from_airport = conf["from"] self.to_airport = conf["to"] self.timeout = conf.g...
29.586957
87
0.540044
264a7d03edd934a9b14e21e67e7db46a2bf9d839
5,850
py
Python
tool/src/main.py
moatom/alistice
222217928d9634b14e3c192abedc8c7d419ab868
[ "MIT" ]
null
null
null
tool/src/main.py
moatom/alistice
222217928d9634b14e3c192abedc8c7d419ab868
[ "MIT" ]
null
null
null
tool/src/main.py
moatom/alistice
222217928d9634b14e3c192abedc8c7d419ab868
[ "MIT" ]
null
null
null
import os import json import tempfile import sys import subprocess import safariOnMac from utils import getFiletime, get_firefox_default_profile_paths, normalizeChromeBookmarks, send from bookmarks_parser import parse from configparser import ConfigParser, NoOptionError settings_path = 'settings.ini' # Referred to ...
39
112
0.599145
4b95283ef8c196f2aaa20000a2cbf659dba28412
349
py
Python
q2_feature_table/tests/filter/__init__.py
jwdebelius/q2-feature-table
2c84e1f330230d5968b140674fe0ca3cd2ce8712
[ "BSD-3-Clause" ]
1
2017-05-20T00:28:41.000Z
2017-05-20T00:28:41.000Z
q2_feature_table/tests/filter/__init__.py
jwdebelius/q2-feature-table
2c84e1f330230d5968b140674fe0ca3cd2ce8712
[ "BSD-3-Clause" ]
15
2016-09-13T23:23:39.000Z
2016-10-27T23:22:44.000Z
q2_feature_table/tests/filter/__init__.py
jwdebelius/q2-feature-table
2c84e1f330230d5968b140674fe0ca3cd2ce8712
[ "BSD-3-Clause" ]
4
2016-10-08T19:49:57.000Z
2022-03-30T11:23:00.000Z
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
43.625
78
0.415473
8146dcfe1a9cc88ec69e98373d7af0e3338a7610
4,048
py
Python
telemetry/telemetry/internal/backends/chrome/tab_list_backend.py
bopopescu/chromium72-third-party-catapult
774e1355b871e13bb858147a136e9cb476f55030
[ "BSD-3-Clause" ]
1
2019-01-04T10:08:58.000Z
2019-01-04T10:08:58.000Z
telemetry/telemetry/internal/backends/chrome/tab_list_backend.py
kind-john/catapult
29635376119833f172a58a48a3282d353ce55d2b
[ "BSD-3-Clause" ]
null
null
null
telemetry/telemetry/internal/backends/chrome/tab_list_backend.py
kind-john/catapult
29635376119833f172a58a48a3282d353ce55d2b
[ "BSD-3-Clause" ]
1
2020-07-24T04:42:31.000Z
2020-07-24T04:42:31.000Z
# Copyright 2013 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. import json from telemetry.core import exceptions from telemetry.internal.backends.chrome_inspector import inspector_backend_list from telemetry.internal.br...
35.2
79
0.707263
c577599d3efea6d4a65cf138f29050f4e4dbfe3e
3,650
py
Python
fitloop/defaults/configure_optimizer.py
18alantom/fitloop
9b38a937956678065803c782950a588e9c7a8b8b
[ "MIT" ]
null
null
null
fitloop/defaults/configure_optimizer.py
18alantom/fitloop
9b38a937956678065803c782950a588e9c7a8b8b
[ "MIT" ]
null
null
null
fitloop/defaults/configure_optimizer.py
18alantom/fitloop
9b38a937956678065803c782950a588e9c7a8b8b
[ "MIT" ]
null
null
null
import numpy as np from copy import deepcopy from fitloop.helpers.constants import Module, Optimizer, Optional, Union, List from fitloop.helpers.utils import unf_last_n, get_layers, get_lrs def configure_optimizer(state, lr:Optional[Union[List[float], slice, float, np.ndarray]]=None, unlock:Optional[U...
34.761905
78
0.525479
8361e0075528987f03e2cae6d3455261a6000c05
816
py
Python
hackerrank/python/Algorithms/02_Implementation/07_DivisbleSumPairs/solution.py
edlabao/cs-practice
44b94e71f063a663b6c98a5da2f0066764d01a38
[ "MIT" ]
null
null
null
hackerrank/python/Algorithms/02_Implementation/07_DivisbleSumPairs/solution.py
edlabao/cs-practice
44b94e71f063a663b6c98a5da2f0066764d01a38
[ "MIT" ]
null
null
null
hackerrank/python/Algorithms/02_Implementation/07_DivisbleSumPairs/solution.py
edlabao/cs-practice
44b94e71f063a663b6c98a5da2f0066764d01a38
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Problem: https://www.hackerrank.com/challenges/taum-and-bday/problem Level: Easy Max Score: 25 """ def solve(n, k, ar): # Initialize the number of pairs evenly divisible by k. answer = 0 # Initialize a set which will contain tuples of index pairs we've # already seen. ...
22.054054
69
0.540441
5564510b40b877ea7ac47fd7abce51c8b846d0a7
2,381
py
Python
configfiles/repo/locks.py
mincrmatt12/configfiles
509065bfb7b343fd36a307e9c246f0e8efde0f65
[ "MIT" ]
null
null
null
configfiles/repo/locks.py
mincrmatt12/configfiles
509065bfb7b343fd36a307e9c246f0e8efde0f65
[ "MIT" ]
null
null
null
configfiles/repo/locks.py
mincrmatt12/configfiles
509065bfb7b343fd36a307e9c246f0e8efde0f65
[ "MIT" ]
null
null
null
""" Implements the locking functionality of repositories """ from paramiko.transport import Transport from ..auth import authenticate_transport, interpret_urlish from socket import socket class RepoReadLock: def __init__(self, url): self.url = url self.transport = None self.client = None ...
28.011765
71
0.616548
130a71a3d0297bcafa4ab3a20c34509208382bea
2,043
py
Python
sdk/python/feast/loaders/yaml.py
Yanson/feast
a72e2127bd002397106ce00c64ed31c09abeae2f
[ "Apache-2.0" ]
null
null
null
sdk/python/feast/loaders/yaml.py
Yanson/feast
a72e2127bd002397106ce00c64ed31c09abeae2f
[ "Apache-2.0" ]
null
null
null
sdk/python/feast/loaders/yaml.py
Yanson/feast
a72e2127bd002397106ce00c64ed31c09abeae2f
[ "Apache-2.0" ]
null
null
null
import yaml def yaml_loader(yml, load_single=False): """ Loads one or more Feast resources from a YAML path or string. Multiple resources can be divided by three hyphens '---' Args: yml: A path ending in .yaml or .yml, or a YAML string load_single: Expect only a single YAML resource, ...
26.532468
112
0.629466
480dd335610a6c7f925497bbf81cbc6d82a90fe2
4,438
py
Python
tests/decorators/test_validation.py
lumikanta/connexion
b6530d32aaee92ebbdfef501540d642a26185174
[ "Apache-2.0" ]
null
null
null
tests/decorators/test_validation.py
lumikanta/connexion
b6530d32aaee92ebbdfef501540d642a26185174
[ "Apache-2.0" ]
null
null
null
tests/decorators/test_validation.py
lumikanta/connexion
b6530d32aaee92ebbdfef501540d642a26185174
[ "Apache-2.0" ]
1
2019-03-21T18:21:32.000Z
2019-03-21T18:21:32.000Z
from jsonschema import ValidationError import pytest from connexion.decorators.validation import ParameterValidator from connexion.json_schema import (Draft4RequestValidator, Draft4ResponseValidator) from mock import MagicMock def test_get_valid_parameter(): result = ParameterV...
30.819444
105
0.65187
ed8a321b65dc71d799cc5b2f7aabba93444a8742
476
py
Python
setup.py
charlesblakemore/physics_util
4e8bc50ee41b6e4b1f9b49e4238efd457d5cdca8
[ "MIT" ]
null
null
null
setup.py
charlesblakemore/physics_util
4e8bc50ee41b6e4b1f9b49e4238efd457d5cdca8
[ "MIT" ]
null
null
null
setup.py
charlesblakemore/physics_util
4e8bc50ee41b6e4b1f9b49e4238efd457d5cdca8
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open("README.rst", "r") as fh: long_description = fh.read() setup(name="physics_util", version=1.0, package_dir={"": "lib"}, packages=find_packages(), author="Charles Blakemore", author_email="chas.blakemore@gmail.com", description="Co...
31.733333
72
0.705882
a12c35a76c56c53c5c8bf6d2d7c0573d77898002
38,236
py
Python
Tools/px_uploader.py
usrl-uofsc/PX4-Autopilot
6d3d2674f80ebadc4a6f2e069db0aa07455551d5
[ "BSD-3-Clause" ]
3
2020-12-20T18:20:31.000Z
2021-05-26T08:16:46.000Z
Tools/px_uploader.py
usrl-uofsc/PX4-Autopilot
6d3d2674f80ebadc4a6f2e069db0aa07455551d5
[ "BSD-3-Clause" ]
3
2020-02-23T22:49:17.000Z
2020-09-14T08:57:08.000Z
Tools/px_uploader.py
usrl-uofsc/PX4-Autopilot
6d3d2674f80ebadc4a6f2e069db0aa07455551d5
[ "BSD-3-Clause" ]
2
2020-08-07T05:12:45.000Z
2021-07-28T04:16:07.000Z
#!/usr/bin/env python3 ############################################################################ # # Copyright (c) 2012-2017 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
41.97146
250
0.595826
9bf2daeea8357f4498155fd3db15ed9247347af9
3,404
py
Python
python3/base/boardgame.py
LetMeR00t/SA4BG
260046db25e68651600bef1d53efabc1e1461d16
[ "Apache-2.0" ]
null
null
null
python3/base/boardgame.py
LetMeR00t/SA4BG
260046db25e68651600bef1d53efabc1e1461d16
[ "Apache-2.0" ]
null
null
null
python3/base/boardgame.py
LetMeR00t/SA4BG
260046db25e68651600bef1d53efabc1e1461d16
[ "Apache-2.0" ]
null
null
null
## IMPORTS ## from base.game import Game from base.player import Player ## CLASS ## class BoardGame(): """ Define a BoardGame class """ def __init__(self, game=None, players=[]): """ Default constructor that instanciates a BoardGame class Args: game: A Game object that represents the ...
22.543046
91
0.606345
26cf3579aa60c1dba8e945d0a2a27f7afcfebbd4
2,755
py
Python
Chapter03/serverless/cupping/handlers/graphql.py
carltyndall/Serverless-Design-Patterns-and-Best-Practices
c15f8b8d0023f40c8f8e49e5e43ce42408a4ca59
[ "MIT" ]
37
2017-11-13T14:22:43.000Z
2022-03-08T17:09:19.000Z
Chapter03/serverless/cupping/handlers/graphql.py
saibaldas/Serverless-Design-Patterns-and-Best-Practices
c15f8b8d0023f40c8f8e49e5e43ce42408a4ca59
[ "MIT" ]
4
2021-03-01T23:27:55.000Z
2022-03-08T22:51:30.000Z
Chapter03/serverless/cupping/handlers/graphql.py
carltyndall/Serverless-Design-Patterns-and-Best-Practices
c15f8b8d0023f40c8f8e49e5e43ce42408a4ca59
[ "MIT" ]
24
2018-04-13T09:08:12.000Z
2022-03-31T15:16:44.000Z
import json import graphene from graphene_sqlalchemy import SQLAlchemyObjectType from .decorators import decode_json from ..models import SessionModel from ..persistence.cupping import Cupping from ..persistence.session import Session from ..persistence.queries import ( get_cuppings, get_sessions, ) ...
26.490385
89
0.697278
07cb3c4461ff6b4648facf4ce6196d60ec83dc1b
2,898
py
Python
SportsStats/Parsers/parser_utils.py
Jammin-Coder/hockey-player-stats
44d98b32c97a2513c578d1b41aeb5fab5a653747
[ "Apache-2.0" ]
null
null
null
SportsStats/Parsers/parser_utils.py
Jammin-Coder/hockey-player-stats
44d98b32c97a2513c578d1b41aeb5fab5a653747
[ "Apache-2.0" ]
null
null
null
SportsStats/Parsers/parser_utils.py
Jammin-Coder/hockey-player-stats
44d98b32c97a2513c578d1b41aeb5fab5a653747
[ "Apache-2.0" ]
null
null
null
def xor(condition1, condition2) -> bool: """ XOR (Exclusive OR) Function. If one of the provided conditions is true, return True, if both are true, return False. :param condition1: :param condition2: :return: """ if condition1 and condition2: return False if condition1 or...
27.339623
73
0.584886
c561154bb0c9b2a079820e2a30765a5b794a98fd
5,816
py
Python
book/chap22/corner/setrun.py
geoflows/geoclaw-4.x
c8879d25405017b38392aa3b1ea422ff3e3604ea
[ "BSD-3-Clause" ]
7
2016-11-13T03:11:51.000Z
2021-09-07T18:59:48.000Z
book/chap22/corner/setrun.py
che-wenchao/D-Claw
8ab5d971c9a7a7130e03a447a4b8642e292f4e88
[ "BSD-3-Clause" ]
11
2020-01-14T18:00:37.000Z
2022-03-29T14:25:24.000Z
book/chap22/corner/setrun.py
che-wenchao/D-Claw
8ab5d971c9a7a7130e03a447a4b8642e292f4e88
[ "BSD-3-Clause" ]
6
2020-01-14T17:15:42.000Z
2021-12-03T17:28:44.000Z
""" Module to set up run time parameters for Clawpack. The values set in the function setrun are then written out to data files that will be read in by the Fortran code. """ import os from pyclaw import data #------------------------------ def setrun(claw_pkg='classic'): #------------------------------ ...
27.305164
79
0.544017
608dd1cd4f77cea62c489274630700d3610a9949
496
py
Python
scalr/factory/policy.py
ngine-io/scalr
b611042e3c7b2a2ec6d2c0cc0b9a910ec96e0904
[ "MIT" ]
20
2020-07-02T10:18:46.000Z
2022-02-27T00:46:54.000Z
scalr/factory/policy.py
ngine-io/scalr
b611042e3c7b2a2ec6d2c0cc0b9a910ec96e0904
[ "MIT" ]
3
2021-07-04T09:15:05.000Z
2021-07-12T19:59:41.000Z
scalr/factory/policy.py
ngine-io/scalr
b611042e3c7b2a2ec6d2c0cc0b9a910ec96e0904
[ "MIT" ]
1
2022-01-10T06:47:54.000Z
2022-01-10T06:47:54.000Z
from scalr.factory import Factory from scalr.model.policy import Policy from scalr.policy.random import RandomPolicy from scalr.policy.web import WebPolicy from scalr.policy.prometheus import PrometheusPolicy class PolicyFactory(Factory): def __init__(self): self.cloud_classes = { 'random': ...
24.8
52
0.683468
fc4f3c96c7cd75a361694de732aea57a097bbd4e
19,042
py
Python
src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_maintenance_configurations_operations.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
2
2021-03-24T21:06:20.000Z
2021-03-24T21:07:58.000Z
src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_maintenance_configurations_operations.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
3
2020-05-27T20:16:26.000Z
2020-07-23T19:46:49.000Z
src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2021_02_01/operations/_maintenance_configurations_operations.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
5
2020-09-08T22:46:48.000Z
2020-11-08T14:54:35.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
49.07732
216
0.680286
d7eef4ac23c881846f37bdfcbfce952c53a93d7e
28,516
py
Python
test/asyncio_tests/test_examples.py
onovy/motor
24120b947493a6272f49e1164054191f999fe5f2
[ "Apache-2.0" ]
null
null
null
test/asyncio_tests/test_examples.py
onovy/motor
24120b947493a6272f49e1164054191f999fe5f2
[ "Apache-2.0" ]
null
null
null
test/asyncio_tests/test_examples.py
onovy/motor
24120b947493a6272f49e1164054191f999fe5f2
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-present MongoDB, 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 wri...
32.221469
78
0.473313
1df094cd652dbb4d1954b81f76715c22f0238711
7,237
py
Python
python/qpid_dispatch_internal/router/path.py
jdanekrh/qpid-dispatch-fuzz
e7bcfea402852524ad4ef3c50795fb7cbecebf67
[ "Apache-2.0" ]
null
null
null
python/qpid_dispatch_internal/router/path.py
jdanekrh/qpid-dispatch-fuzz
e7bcfea402852524ad4ef3c50795fb7cbecebf67
[ "Apache-2.0" ]
null
null
null
python/qpid_dispatch_internal/router/path.py
jdanekrh/qpid-dispatch-fuzz
e7bcfea402852524ad4ef3c50795fb7cbecebf67
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
33.197248
99
0.540003
6e82612d1a518696a1b706dead452bd5e047112c
1,114
py
Python
rplugin/python3/vim_tc_explorer/filter.py
philip-karlsson/vim-tc-explorer
0da89d71cea17fe13c358ed289c01f68688f6f32
[ "MIT" ]
72
2018-02-02T11:12:29.000Z
2019-08-20T15:58:48.000Z
rplugin/python3/vim_tc_explorer/filter.py
philip-karlsson/vim-tc-explorer
0da89d71cea17fe13c358ed289c01f68688f6f32
[ "MIT" ]
8
2018-02-03T11:15:30.000Z
2019-03-13T14:51:50.000Z
rplugin/python3/vim_tc_explorer/filter.py
philip-karlsson/vim-tc-explorer
0da89d71cea17fe13c358ed289c01f68688f6f32
[ "MIT" ]
2
2018-02-03T10:28:06.000Z
2018-02-04T07:52:49.000Z
# ============================================================================ # FILE: filter.py # AUTHOR: Philip Karlsson <philipkarlsson at me.com> # License: MIT license # ============================================================================ import re class filter(object): def __init__(self): pa...
32.764706
78
0.490126
565326502991223f3a47b1a1c502b8a981e79996
529
py
Python
app/user/serializer.py
umarta/django-recipe
24edb7145e46a4afd8c1df4230e21813acd573ec
[ "MIT" ]
null
null
null
app/user/serializer.py
umarta/django-recipe
24edb7145e46a4afd8c1df4230e21813acd573ec
[ "MIT" ]
null
null
null
app/user/serializer.py
umarta/django-recipe
24edb7145e46a4afd8c1df4230e21813acd573ec
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): """serializer for the users object""" class Meta: model = get_user_model() fields = ('email', 'password', 'name') extra_kwars = {'password': {'writ...
31.117647
73
0.691871
66fa9aec4d7030288b3bd57d7e156247d82c97ec
4,564
py
Python
workflow/scripts/xcor.py
JAMKuttan/chipseq_analysis
f8e4853bfdb4de8540026ae0b23235d72a1114ad
[ "MIT" ]
null
null
null
workflow/scripts/xcor.py
JAMKuttan/chipseq_analysis
f8e4853bfdb4de8540026ae0b23235d72a1114ad
[ "MIT" ]
null
null
null
workflow/scripts/xcor.py
JAMKuttan/chipseq_analysis
f8e4853bfdb4de8540026ae0b23235d72a1114ad
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # * -------------------------------------------------------------------------- # * Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/chipseq_analysis/LICENSE.md) # * -------------------------------------------------------------------------- # '''Compute cross-correlation analysi...
26.381503
96
0.614154
f4013d75d77002b6ce47ea4c9db781a3051c39e4
11,366
py
Python
rapid7vmconsole/models/user_edit.py
kiblik/vm-console-client-python
038f6d33e8b2654a558326c6eb87f09ee23e0e22
[ "MIT" ]
61
2018-05-17T05:57:09.000Z
2022-03-08T13:59:21.000Z
rapid7vmconsole/models/user_edit.py
kiblik/vm-console-client-python
038f6d33e8b2654a558326c6eb87f09ee23e0e22
[ "MIT" ]
33
2018-06-26T16:21:14.000Z
2022-03-03T20:55:47.000Z
rapid7vmconsole/models/user_edit.py
kiblik/vm-console-client-python
038f6d33e8b2654a558326c6eb87f09ee23e0e22
[ "MIT" ]
43
2018-02-24T05:45:53.000Z
2022-03-31T22:15:16.000Z
# coding: utf-8 """ Python InsightVM API Client OpenAPI spec version: 3 Contact: support@rapid7.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class UserEdit(object): """NOTE: This class is auto generated by the swagge...
28.415
198
0.57716
79a94b8a4bf84c31e022d5fd82fefb4e09639a59
42,504
py
Python
kubespec/k8s/apps/v1beta2.py
machinezone/kubespec
0d493d8d834643968d7c852c561e6c634c8c1556
[ "BSD-3-Clause" ]
7
2019-10-22T14:21:16.000Z
2021-03-18T15:57:41.000Z
kubespec/k8s/apps/v1beta2.py
machinezone/kubespec
0d493d8d834643968d7c852c561e6c634c8c1556
[ "BSD-3-Clause" ]
null
null
null
kubespec/k8s/apps/v1beta2.py
machinezone/kubespec
0d493d8d834643968d7c852c561e6c634c8c1556
[ "BSD-3-Clause" ]
null
null
null
# Code is generated: DO NOT EDIT # Copyright 2019 Machine Zone, Inc. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from kubespec import context from kubespec import types from kubespec.k8s import base from kubespec.k8s import runtime from k...
37.882353
154
0.643563
475ee3af816ab87a6f27201a80e19d9d8210d7f9
84
py
Python
python/testData/mover/multiLineSelectionDifferentLevelsMoveOutFromFunction_afterUp.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/mover/multiLineSelectionDifferentLevelsMoveOutFromFunction_afterUp.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/mover/multiLineSelectionDifferentLevelsMoveOutFromFunction_afterUp.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
<caret><selection>n = 0 while n: print("spam")</selection> def func(): pass
14
29
0.607143
c7602d5254333aadd69564f719f84a8fe3040b08
4,388
py
Python
tests/test_core/test_views.py
aaron-parsons/pymalcolm
4e7ebd6b09382ab7e013278a81097d17873fa5c4
[ "Apache-2.0" ]
null
null
null
tests/test_core/test_views.py
aaron-parsons/pymalcolm
4e7ebd6b09382ab7e013278a81097d17873fa5c4
[ "Apache-2.0" ]
null
null
null
tests/test_core/test_views.py
aaron-parsons/pymalcolm
4e7ebd6b09382ab7e013278a81097d17873fa5c4
[ "Apache-2.0" ]
null
null
null
import unittest from annotypes import Anno, add_call_types from mock import Mock from malcolm.core import Attribute, StringMeta, BlockModel, Process, \ MethodModel, Part, Controller from malcolm.core.models import BlockMeta from malcolm.core.views import make_view class TestAttribute(unittest.TestCase): def...
32.503704
82
0.646992
65cf718622fde86a90a6ea1f839a66640d84e793
1,835
py
Python
Python/Fundamentals/Final Exam Practice/Practice 3/Secret Chat.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
Python/Fundamentals/Final Exam Practice/Practice 3/Secret Chat.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
Python/Fundamentals/Final Exam Practice/Practice 3/Secret Chat.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
import re msg=input() msg=[char for char in msg] specs=["?","*","+"] while True: command=input() if command!="Reveal": match = False if "InsertSpace" in command: command=command.split(":|:") ind=int(command[1]) msg.insert(ind," ") match=True ...
32.192982
61
0.454496
b052f2a7a3ec2a6c679b99ad05c3c419510b3d5a
2,923
py
Python
dworp/environment.py
cash/dworp
b7b0280183d4fa54b65bf5a3d4008bf64b7434dc
[ "BSD-3-Clause" ]
null
null
null
dworp/environment.py
cash/dworp
b7b0280183d4fa54b65bf5a3d4008bf64b7434dc
[ "BSD-3-Clause" ]
null
null
null
dworp/environment.py
cash/dworp
b7b0280183d4fa54b65bf5a3d4008bf64b7434dc
[ "BSD-3-Clause" ]
null
null
null
from abc import ABC, abstractmethod import logging import numpy as np class Environment(ABC): """Environment for the simulation Args: size (int): length of the state vector Attributes: state (np.array): environment state vector of floats """ logger = logging.getLogger(__name__) ...
26.572727
90
0.56312
1fe23961dcbc56a29b507d637e276dce145eecca
1,600
py
Python
src/aiodynamo/http/httpx.py
uvve/aiodynamo
39100748691ffe2c34caae4dcddaddb1dfa505a5
[ "Apache-2.0" ]
34
2019-03-04T08:14:30.000Z
2022-02-14T18:01:41.000Z
src/aiodynamo/http/httpx.py
uvve/aiodynamo
39100748691ffe2c34caae4dcddaddb1dfa505a5
[ "Apache-2.0" ]
81
2019-09-05T05:50:34.000Z
2022-02-16T07:56:21.000Z
src/aiodynamo/http/httpx.py
Tinche/aiodynamo
963a6baecb7782fb5820179e2ec0c041a527d02e
[ "Apache-2.0" ]
12
2020-02-18T06:37:25.000Z
2022-02-02T06:43:21.000Z
import json from contextlib import contextmanager from dataclasses import dataclass from typing import Any, Dict, Iterator, Optional, cast from httpx import AsyncClient, HTTPError from yarl import URL from aiodynamo.types import Timeout from ..errors import exception_from_response from .base import HTTP, Headers, Re...
30.769231
78
0.616875
9398380f6c739d98b2ebe7a7d8b46ddc07d6a851
2,052
py
Python
elasticsearch_metrics/management/commands/sync_metrics.py
aaxelb/django-elasticsearch-metrics
8a02ffc57f57257843834d4f84c41480f4e27fbd
[ "MIT" ]
5
2018-08-21T19:48:39.000Z
2021-04-01T22:11:31.000Z
elasticsearch_metrics/management/commands/sync_metrics.py
aaxelb/django-elasticsearch-metrics
8a02ffc57f57257843834d4f84c41480f4e27fbd
[ "MIT" ]
18
2018-07-26T16:04:53.000Z
2018-08-30T19:31:30.000Z
elasticsearch_metrics/management/commands/sync_metrics.py
aaxelb/django-elasticsearch-metrics
8a02ffc57f57257843834d4f84c41480f4e27fbd
[ "MIT" ]
5
2019-04-01T17:47:08.000Z
2022-01-28T17:23:11.000Z
from django.core.management.base import BaseCommand, CommandError from elasticsearch_metrics.registry import registry from elasticsearch_metrics.management.color import color_style class Command(BaseCommand): help = "Ensures index templates exist for all Metric classes." def add_arguments(self, parser): ...
38
90
0.578947
77acae264f3a4516723b574c3d1108c3f60b391e
137,496
py
Python
test/orm/test_relationships.py
NicolasRolin/sqlalchemy
f3e18baa00489b2a85293edcdb4c98cb409c8c93
[ "MIT" ]
1
2021-03-15T13:59:07.000Z
2021-03-15T13:59:07.000Z
test/orm/test_relationships.py
NicolasRolin/sqlalchemy
f3e18baa00489b2a85293edcdb4c98cb409c8c93
[ "MIT" ]
null
null
null
test/orm/test_relationships.py
NicolasRolin/sqlalchemy
f3e18baa00489b2a85293edcdb4c98cb409c8c93
[ "MIT" ]
null
null
null
from sqlalchemy.testing import assert_raises, assert_raises_message import datetime import sqlalchemy as sa from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, MetaData, and_, \ select, func from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relatio...
32.713776
79
0.511891
6b0c1a3c855c7b46dfc9cd43523e6a250334bac4
185
py
Python
02_pr_twinkle.py
AmreshTripathy/Python
e86420fef7f52da393be5b50ac2f13bddfeb3306
[ "Apache-2.0" ]
4
2021-05-27T05:06:09.000Z
2021-06-12T17:12:47.000Z
02_pr_twinkle.py
AmreshTripathy/Python
e86420fef7f52da393be5b50ac2f13bddfeb3306
[ "Apache-2.0" ]
null
null
null
02_pr_twinkle.py
AmreshTripathy/Python
e86420fef7f52da393be5b50ac2f13bddfeb3306
[ "Apache-2.0" ]
null
null
null
print ('''Twinkle twinkle little star. How I wonder what you are. Up above the world so high. Like a diamond in the sky. Twinkle twinkle little star. How I wonder what you are.''')
30.833333
39
0.724324
48fbecd8044c20dffab8ab21365e1acdd2191c2b
2,459
py
Python
ldpop/moran_finite.py
jeffspence/ldpop
be1db1c339a8b0e86f707c8f57d35a05d2b3a5a0
[ "MIT" ]
12
2016-04-15T20:56:07.000Z
2021-07-18T06:30:52.000Z
ldpop/moran_finite.py
jeffspence/ldpop
be1db1c339a8b0e86f707c8f57d35a05d2b3a5a0
[ "MIT" ]
1
2018-03-16T04:49:48.000Z
2018-03-16T08:17:26.000Z
ldpop/moran_finite.py
jeffspence/ldpop
be1db1c339a8b0e86f707c8f57d35a05d2b3a5a0
[ "MIT" ]
3
2018-05-11T01:10:27.000Z
2021-01-11T00:19:30.000Z
''' Created on Jan 23, 2015 @author: jkamm ''' from __future__ import absolute_import from builtins import range from .moran_augmented import AbstractMoranStates from .moran_augmented import c_haps from .moran_augmented import build_mut_rates from .moran_augmented import build_copy_rates from .moran_augmented import g...
29.626506
79
0.623017
d75ed187e139ab39ea1320ac2d7bd0fe23f8dc1d
659
py
Python
src/ruptures/metrics/__init__.py
antoinedemathelin/ruptures
2860a5aeea6c99d03049445a6d37c79f94fda18f
[ "BSD-2-Clause" ]
942
2018-01-20T20:11:43.000Z
2022-03-29T09:30:29.000Z
ruptures/metrics/__init__.py
shortwhiteguy/ruptures
8fb0f369d72078f93ee2259350200e207937393e
[ "BSD-2-Clause" ]
171
2018-03-08T18:15:32.000Z
2022-03-31T18:36:00.000Z
ruptures/metrics/__init__.py
shortwhiteguy/ruptures
8fb0f369d72078f93ee2259350200e207937393e
[ "BSD-2-Clause" ]
144
2018-03-05T20:54:36.000Z
2022-03-31T08:59:54.000Z
r""" ==================================================================================================== Evaluation ==================================================================================================== :mod:`ruptures.metrics` provides metrics to evaluate change point detection performances and :mod:`ru...
27.458333
100
0.52959
2cda739234291aed44bac8a7667b65bbb4990d66
1,600
py
Python
gilded_rose_ifs_extracted_unified.py
ransaked1/GildedRosePython
135b5790fa55470955e311a09a3bbcd6731a4c41
[ "MIT" ]
1
2022-03-01T21:34:08.000Z
2022-03-01T21:34:08.000Z
gilded_rose_ifs_extracted_unified.py
ransaked1/GildedRosePython
135b5790fa55470955e311a09a3bbcd6731a4c41
[ "MIT" ]
null
null
null
gilded_rose_ifs_extracted_unified.py
ransaked1/GildedRosePython
135b5790fa55470955e311a09a3bbcd6731a4c41
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from logic_checks import * class GildedRose(object): def __init__(self, items): self.items = items def update_quality(self): for item in self.items: update_item(item) def update_item(item): if itemIsConjuredCheck(item): if sellIn...
30.188679
94
0.683125
e8a3d8403678a959ed7a7c91d8c11491a0fdc4e2
4,004
py
Python
gn_model/ncbi_lookup.py
bionlproc/biocppi_extraction
a683473e2c16f65328456d2a084e9455e243c349
[ "MIT" ]
2
2018-09-23T08:55:31.000Z
2020-08-21T02:16:07.000Z
gn_model/ncbi_lookup.py
bionlproc/biocppi_extraction
a683473e2c16f65328456d2a084e9455e243c349
[ "MIT" ]
null
null
null
gn_model/ncbi_lookup.py
bionlproc/biocppi_extraction
a683473e2c16f65328456d2a084e9455e243c349
[ "MIT" ]
1
2019-04-16T17:40:01.000Z
2019-04-16T17:40:01.000Z
#!/usr/bin/env python import sys, os, random, pickle, re, time import urllib2, urllib import pandas as pd api_endpoint = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi' pubtator_api_endpoint = 'https://www.ncbi.nlm.nih.gov/CBBresearch/Lu/Demo/RESTful/tmTool.cgi/Gene/{}/PubTator/' def gene_normalization(s...
31.03876
111
0.614635
02d712f276f5607d8a8776802deebb2ba48c09e7
1,320
py
Python
pima-indians-diabetes.py
380560524/keras_first_network
ef8149545c307bedd81c0351943080e67590078e
[ "MIT" ]
null
null
null
pima-indians-diabetes.py
380560524/keras_first_network
ef8149545c307bedd81c0351943080e67590078e
[ "MIT" ]
null
null
null
pima-indians-diabetes.py
380560524/keras_first_network
ef8149545c307bedd81c0351943080e67590078e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[36]: # first neural network with keras tutorial import numpy as np import pandas as pd import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers import Dense # In[37]: # load the dataset rawdata = pd.read_csv('pima-indians-diabetes.csv') data...
17.368421
81
0.685606
032e19517c3c8e3b647a7905d3096dcb722feadf
6,048
py
Python
AI source/Code AI/Code AI/18110150_AIW1/18110150.py
Minhvu87/AI
9c6c7d67c7643539d112664cfada6a35495547ae
[ "Apache-2.0" ]
null
null
null
AI source/Code AI/Code AI/18110150_AIW1/18110150.py
Minhvu87/AI
9c6c7d67c7643539d112664cfada6a35495547ae
[ "Apache-2.0" ]
null
null
null
AI source/Code AI/Code AI/18110150_AIW1/18110150.py
Minhvu87/AI
9c6c7d67c7643539d112664cfada6a35495547ae
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: from queue import Queue, PriorityQueue from collections import deque import networkx as nx import matplotlib.pyplot as plt # In[2]: input_file = open('/home/minhvu/Documents/A.I/A.I lab1/BFS.txt', 'r') f = input_file.read().splitlines() N = int(f[0])#Number of node...
25.627119
75
0.510086
3ab2bef7cff4bc885f2a05e74192e7d563978040
3,319
py
Python
portal/migrations/versions/ab32aa0457a8_.py
ivan-c/truenth-portal
0b9d39ae43f42ea3413ed9634f295f5d856cbc77
[ "BSD-3-Clause" ]
3
2017-01-15T10:11:57.000Z
2018-10-02T23:46:44.000Z
portal/migrations/versions/ab32aa0457a8_.py
pep8speaks/true_nth_usa_portal
31ff755b0cfe61ab908e2a399e3c41ef17ca8c16
[ "BSD-3-Clause" ]
876
2016-04-04T20:45:11.000Z
2019-02-28T00:10:36.000Z
portal/migrations/versions/ab32aa0457a8_.py
pep8speaks/true_nth_usa_portal
31ff755b0cfe61ab908e2a399e3c41ef17ca8c16
[ "BSD-3-Clause" ]
9
2016-04-13T01:18:55.000Z
2018-09-19T20:44:23.000Z
"""empty message Revision ID: ab32aa0457a8 Revises: 8062d67a91e0 Create Date: 2016-08-24 11:22:46.376711 """ # revision identifiers, used by Alembic. revision = 'ab32aa0457a8' down_revision = '8062d67a91e0' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import text def strings_from_template():...
39.047059
160
0.686351
5d0a9a391dcb42eb7aac510e3850cb4c245ee0a5
878
py
Python
interfaces/python/tests/test_bable_script.py
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
13
2018-07-04T16:35:37.000Z
2021-03-03T10:41:07.000Z
interfaces/python/tests/test_bable_script.py
iotile/baBLE
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
11
2018-06-01T20:32:32.000Z
2019-01-21T17:03:47.000Z
interfaces/python/tests/test_bable_script.py
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
null
null
null
import re from bable_interface.scripts import bable_script def test_help(capsys): """ Test if the bable script returns the help if no option is given. """ result = bable_script.main([]) assert result == 0 # capsys is a fixture provided by pytest to read stdout, stderr out, _ = capsys.readouterr()...
28.322581
99
0.659453
d3ba18e75d771d29983a373c6f94a6909a00ee44
1,770
py
Python
main.py
ialifinaritra/Text_Summarization
c3edc144a71b663e99fc3c4e9e148117b5cfda85
[ "MIT" ]
3
2021-01-24T19:13:56.000Z
2021-11-04T16:29:56.000Z
main.py
svngoku/Text_Summarization
c3edc144a71b663e99fc3c4e9e148117b5cfda85
[ "MIT" ]
null
null
null
main.py
svngoku/Text_Summarization
c3edc144a71b663e99fc3c4e9e148117b5cfda85
[ "MIT" ]
3
2021-02-22T16:48:55.000Z
2021-11-04T19:34:57.000Z
from Summarizer import Summarizer from absl import app from absl import flags import numpy as np FLAGS = flags.FLAGS flags.DEFINE_string( "text_path", "", "path to the text to summarize" ) flags.DEFINE_string( "model", "flaubert", "Use either 'camembert' or 'flaubert' for model" ) flags.DEF...
21.325301
122
0.677401
9e537fba2f0d40f324b06dba30d34ab2fd357c21
464
py
Python
CHAOS-Challenge/main.py
tueimage/meta-segmentation-msc-2018
d497e6ea99b89fdb54e11568452894f022269043
[ "MIT" ]
3
2019-07-16T12:31:38.000Z
2020-07-22T17:03:53.000Z
CHAOS-Challenge/main.py
tueimage/meta-segmentation-msc-2018
d497e6ea99b89fdb54e11568452894f022269043
[ "MIT" ]
null
null
null
CHAOS-Challenge/main.py
tueimage/meta-segmentation-msc-2018
d497e6ea99b89fdb54e11568452894f022269043
[ "MIT" ]
1
2020-12-10T12:56:06.000Z
2020-12-10T12:56:06.000Z
import model from utils import train_generator import os from keras.callbacks import ModelCheckpoint os.environ["CUDA_VISIBLE_DEVICES"] = "1,2" def main(): m = model.unet() callbacks = [ModelCheckpoint('best_model.h5', monitor='loss', period = 20)] history = m.fit_generator(train_generator(5), steps_per_epo...
27.294118
122
0.713362
dea226d90ff21a3e22f3450d60d500f892c5eb98
112,326
py
Python
src/transformers/pipelines.py
moscow25/transformers
a25c9fc8e14f3e8914116e6142af2a9589dc8e63
[ "Apache-2.0" ]
null
null
null
src/transformers/pipelines.py
moscow25/transformers
a25c9fc8e14f3e8914116e6142af2a9589dc8e63
[ "Apache-2.0" ]
null
null
null
src/transformers/pipelines.py
moscow25/transformers
a25c9fc8e14f3e8914116e6142af2a9589dc8e63
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The HuggingFace Inc. team. # # 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...
43.185698
183
0.613384
ffa1e3005b5fbe9eb36c61d5d0bb8e152febd166
19,947
py
Python
tests/python/pants_test/pantsd/test_pantsd_integration.py
billybecker/pants
ee101f3e360b712aceb9dacf7723aaf9b5567f04
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/pantsd/test_pantsd_integration.py
billybecker/pants
ee101f3e360b712aceb9dacf7723aaf9b5567f04
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/pantsd/test_pantsd_integration.py
billybecker/pants
ee101f3e360b712aceb9dacf7723aaf9b5567f04
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import itertools import os import signal import threading import time import unittest fro...
38.507722
111
0.682709
a28b2c999ddd63975c70f6af4a0a37b9743a8ab1
2,611
py
Python
maskrcnn_benchmark/modeling/detector/generalized_rcnn.py
witwitchayakarn/6DVNET
f13b35162ad90fa49d777f3a41383e9d34eb4820
[ "MIT" ]
null
null
null
maskrcnn_benchmark/modeling/detector/generalized_rcnn.py
witwitchayakarn/6DVNET
f13b35162ad90fa49d777f3a41383e9d34eb4820
[ "MIT" ]
null
null
null
maskrcnn_benchmark/modeling/detector/generalized_rcnn.py
witwitchayakarn/6DVNET
f13b35162ad90fa49d777f3a41383e9d34eb4820
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """ Implements the Generalized R-CNN framework """ import torch from torch import nn from maskrcnn_benchmark.structures.image_list import to_image_list from ..backbone import build_backbone from ..rpn.rpn import build_rpn from ..roi_...
36.774648
97
0.633857
ddda0ba404c1c8bdbb808b0a2c76ebcd778b9659
3,249
py
Python
phoenix/wizard/views/source.py
TeriForey/fawkes
1b51430d2f952d9802f13fa1f2d0f68df706c43e
[ "Apache-2.0" ]
null
null
null
phoenix/wizard/views/source.py
TeriForey/fawkes
1b51430d2f952d9802f13fa1f2d0f68df706c43e
[ "Apache-2.0" ]
6
2016-12-01T16:17:10.000Z
2020-11-11T03:19:31.000Z
phoenix/wizard/views/source.py
TeriForey/fawkes
1b51430d2f952d9802f13fa1f2d0f68df706c43e
[ "Apache-2.0" ]
null
null
null
import colander import deform from deform.widget import RadioChoiceWidget from pyramid.view import view_config from owslib.wps import WebProcessingService from phoenix.esgf.search import query_params_from_appstruct from phoenix.esgf.metadata import process_constraints from phoenix.wizard.views import Wizard SOURCE_...
38.678571
110
0.662665
ffb0d13c7af8dbd90e928fe42518545154a6feb6
2,912
py
Python
wph_syntheses/sufficient_stat.py
Ttantto/wph_quijote
2ada4366794d6bedf070862fbe0172a2045e5483
[ "BSD-3-Clause" ]
null
null
null
wph_syntheses/sufficient_stat.py
Ttantto/wph_quijote
2ada4366794d6bedf070862fbe0172a2045e5483
[ "BSD-3-Clause" ]
1
2020-09-13T01:30:02.000Z
2020-09-15T07:44:08.000Z
wph_syntheses/sufficient_stat.py
Ttantto/wph_quijote
2ada4366794d6bedf070862fbe0172a2045e5483
[ "BSD-3-Clause" ]
1
2020-09-22T22:40:19.000Z
2020-09-22T22:40:19.000Z
import torch from .utils import periodic_dis def compute_idx_of_sufficient_stat(L, J, dj, dl, dn): L2 = L * 2 idx_j1, idx_j2, idx_k1, idx_k2, idx_ell2, idx_dn1, idx_dn2 = [], [], [], [], [], [], [] idx_lists = (idx_j1, idx_j2, idx_k1, idx_k2, idx_ell2, idx_dn1, idx_dn2) # j1=j2, k1=0,1, k2=0 or 1 ...
39.890411
113
0.590316
9bf00a0eb4e04d9ed73c46d77d9e6a435e5b2494
602
py
Python
tests/regressions/python/925_none_dtype.py
NanmiaoWu/phylanx
295b5f82cc39925a0d53e77ba3b6d02a65204535
[ "BSL-1.0" ]
83
2017-08-27T15:09:13.000Z
2022-01-18T17:03:41.000Z
tests/regressions/python/925_none_dtype.py
NanmiaoWu/phylanx
295b5f82cc39925a0d53e77ba3b6d02a65204535
[ "BSL-1.0" ]
808
2017-08-27T15:35:01.000Z
2021-12-14T17:30:50.000Z
tests/regressions/python/925_none_dtype.py
NanmiaoWu/phylanx
295b5f82cc39925a0d53e77ba3b6d02a65204535
[ "BSL-1.0" ]
55
2017-08-27T15:09:22.000Z
2022-03-25T12:07:34.000Z
# Copyright (c) 2019 Bita Hasheminezhad # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # 925: Cannot pass a None dtype import numpy as np from phylanx import Phylanx @Phylanx def eye_eager(n, dtype, name): ...
24.08
79
0.686047
b6550f681bf9f9fc8073b16b2be3ccdbeee97568
5,300
py
Python
pykvm/exitreason.py
JonathonReinhart/pykvm
9520793fdc56759cd133f7149c59603d05122158
[ "MIT" ]
1
2017-07-14T05:34:44.000Z
2017-07-14T05:34:44.000Z
pykvm/exitreason.py
JonathonReinhart/pykvm
9520793fdc56759cd133f7149c59603d05122158
[ "MIT" ]
null
null
null
pykvm/exitreason.py
JonathonReinhart/pykvm
9520793fdc56759cd133f7149c59603d05122158
[ "MIT" ]
null
null
null
# pykvm # https://github.com/JonathonReinhart/pykvm # (C) 2015 Jonathon Reinhart from kvmstructs import * class KvmExit(object): # Exit reasons KVM_EXIT_UNKNOWN = 0 KVM_EXIT_EXCEPTION = 1 KVM_EXIT_IO = 2 KVM_EXIT_HYPERCALL = 3 KVM_EXIT_DEBUG = 4 ...
29.775281
98
0.610943
506b17d2bbff870e522d6d80f719d856a538ff16
8,030
py
Python
ldaptor/ldapfilter.py
tv42/ldaptor
3f227602c8c021b9e943136a2dc8d7db44a11e50
[ "MIT" ]
1
2015-11-25T04:01:26.000Z
2015-11-25T04:01:26.000Z
ldaptor/ldapfilter.py
tv42/ldaptor
3f227602c8c021b9e943136a2dc8d7db44a11e50
[ "MIT" ]
null
null
null
ldaptor/ldapfilter.py
tv42/ldaptor
3f227602c8c021b9e943136a2dc8d7db44a11e50
[ "MIT" ]
2
2019-11-06T02:14:10.000Z
2022-01-10T08:34:11.000Z
#!/usr/bin/python from ldaptor.protocols import pureldap """ RFC2254: filter = "(" filtercomp ")" filtercomp = and / or / not / item and = "&" filterlist or = "|" filterlist not = "!" filter filterlist = 1*filter item = simple /...
33.598326
92
0.672727
60c9b47db2084c71caff5dc17422fa711cb75f22
3,972
py
Python
control/old/logic/velo.py
mwmajew/Tonic
f09b9f95ac5281e9299638e4bd513d31ef703bc9
[ "MIT" ]
91
2019-03-21T22:27:34.000Z
2022-02-17T09:19:09.000Z
control/old/logic/velo.py
mwmajew/Tonic
f09b9f95ac5281e9299638e4bd513d31ef703bc9
[ "MIT" ]
19
2018-11-30T16:53:15.000Z
2021-01-04T20:32:51.000Z
control/old/logic/velo.py
mwmajew/Tonic
f09b9f95ac5281e9299638e4bd513d31ef703bc9
[ "MIT" ]
11
2019-07-02T13:07:43.000Z
2021-12-17T04:43:00.000Z
from logic.action import Action from logic.calibration import VideoCalibration from logic.inverse_perspective import InversePerspective import cv2 import numpy as np class Velo(Action): def __init__(self): pass def action(self, **kwargs): return self.inverse(kwargs['img']) def to_inverse_perspecti...
30.090909
102
0.679003
480812ee33e0588a52ba42aafae225a3ef1ab29f
1,626
py
Python
12th project cs/sql_manager.py
Jatin-Ya/ChatApp-12th-project-
77ced9b18205728334f4370fbce8d74687bc5373
[ "Apache-2.0" ]
null
null
null
12th project cs/sql_manager.py
Jatin-Ya/ChatApp-12th-project-
77ced9b18205728334f4370fbce8d74687bc5373
[ "Apache-2.0" ]
null
null
null
12th project cs/sql_manager.py
Jatin-Ya/ChatApp-12th-project-
77ced9b18205728334f4370fbce8d74687bc5373
[ "Apache-2.0" ]
null
null
null
import mysql.connector m=mysql.connector.connect(host='localhost',database='project',user='root',password='1234') mc=m.cursor() suid="" ruid="" def entrycheck(uid,password): global suid suid=str(uid) q="SELECT uid,password FROM main where uid= %s and password= %s;" mc.execute(q,(uid,passw...
21.116883
96
0.54674
4b577822bf2d03a471cf9d77458c9ba1ec53cc9c
19,013
py
Python
challenges/Street_map_service/poller/for-testing/machine.py
pingjuiliao/cb-multios
64ededd0b87030eda7c40c4388a4ad8283712d8e
[ "MIT" ]
473
2016-08-01T12:48:16.000Z
2022-03-09T18:13:14.000Z
challenges/Street_map_service/poller/for-testing/machine.py
pingjuiliao/cb-multios
64ededd0b87030eda7c40c4388a4ad8283712d8e
[ "MIT" ]
71
2016-08-01T03:33:44.000Z
2022-03-09T18:37:04.000Z
challenges/Street_map_service/poller/for-testing/machine.py
pingjuiliao/cb-multios
64ededd0b87030eda7c40c4388a4ad8283712d8e
[ "MIT" ]
121
2016-08-01T04:07:53.000Z
2022-03-07T11:08:09.000Z
from generator.actions import Actions import random import string class map: def __init__(self, newName): self.mapName = newName self.roadList = [] def setMapName(self, newName): self.mapName = newName return def getMapName(self): return self.mapName def addroad(self, roadName, length): newRoad = [road...
33.77087
161
0.658865
896f4dca8432c62de21783c81face6b2ec9ff8fd
1,297
py
Python
src/ensembl/production/portal/apps.py
Ensembl/ensembl_production_api
ba94acb02ec42c7b94244a6c5909374fd46f8c5d
[ "Apache-2.0" ]
null
null
null
src/ensembl/production/portal/apps.py
Ensembl/ensembl_production_api
ba94acb02ec42c7b94244a6c5909374fd46f8c5d
[ "Apache-2.0" ]
2
2019-03-14T13:50:37.000Z
2019-03-15T13:35:49.000Z
src/ensembl/production/portal/apps.py
Ensembl/ensembl_production_api
ba94acb02ec42c7b94244a6c5909374fd46f8c5d
[ "Apache-2.0" ]
1
2019-03-15T11:17:27.000Z
2019-03-15T11:17:27.000Z
# See the NOTICE file distributed with this work for additional information # regarding copyright ownership. # 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....
37.057143
77
0.744025
96e5dbfccdbcb44f06412147086c10be65fb297f
1,735
py
Python
network/neighbour_attention.py
darsh169/Representation-Learning-for-Information-Extraction
f38c183f0f8aa119c698b257e52dc77648b3e9f4
[ "Apache-2.0" ]
53
2021-02-22T15:36:20.000Z
2022-02-09T12:13:17.000Z
network/neighbour_attention.py
darsh169/Representation-Learning-for-Information-Extraction
f38c183f0f8aa119c698b257e52dc77648b3e9f4
[ "Apache-2.0" ]
15
2021-02-22T15:12:29.000Z
2022-03-27T12:49:01.000Z
network/neighbour_attention.py
darsh169/Representation-Learning-for-Information-Extraction
f38c183f0f8aa119c698b257e52dc77648b3e9f4
[ "Apache-2.0" ]
20
2021-02-24T14:45:44.000Z
2022-02-01T12:11:45.000Z
import torch import torch.nn as nn import math import torch.nn.functional as F def attention(q, k, v, d_k, mask=None, dropout=None): scores = torch.matmul(q, k.transpose(-2, -1)) / math.sqrt(d_k) if mask is not None: mask = mask.unsqueeze(1) scores = scores.masked_fill(mask == 0, -1e9) s...
28.916667
66
0.604611
bad9375279b04641eaead4f5c7131c54d0e97a62
2,470
py
Python
dashboard.py
SMU-SIS/gae_bingo
6aadf623b52ffb70c0a4cb6c6b54084481f03c70
[ "MIT" ]
1
2022-01-21T06:47:00.000Z
2022-01-21T06:47:00.000Z
dashboard.py
marcia/gae_bingo
c9c784f992816e137c2a071c91ef33a69566442f
[ "MIT" ]
null
null
null
dashboard.py
marcia/gae_bingo
c9c784f992816e137c2a071c91ef33a69566442f
[ "MIT" ]
null
null
null
import logging import csv import os import StringIO import urllib from google.appengine.ext.webapp import RequestHandler from .config import can_control_experiments from .cache import BingoCache from .stats import describe_result_in_words class Dashboard(RequestHandler): def get(self): if not can_contro...
30.493827
158
0.616194
51c9858cfe851b471ee8e3516aefe9d062505e66
7,171
py
Python
tests/gold_tests/tls/tls_tunnel_forward.test.py
rwbarber2/trafficserver
a5a85234b7c13b938f3dae70f1e641bbc598e0bf
[ "Apache-2.0" ]
1
2021-05-03T06:39:52.000Z
2021-05-03T06:39:52.000Z
tests/gold_tests/tls/tls_tunnel_forward.test.py
rwbarber2/trafficserver
a5a85234b7c13b938f3dae70f1e641bbc598e0bf
[ "Apache-2.0" ]
null
null
null
tests/gold_tests/tls/tls_tunnel_forward.test.py
rwbarber2/trafficserver
a5a85234b7c13b938f3dae70f1e641bbc598e0bf
[ "Apache-2.0" ]
null
null
null
''' ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License");...
59.264463
135
0.701157
57d9cecdf936dc2777e73caba7688339f1695ce5
15,668
py
Python
core/service/models.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
22
2015-01-16T01:36:32.000Z
2020-06-08T00:46:18.000Z
core/service/models.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
8
2015-12-28T18:56:19.000Z
2019-04-01T17:33:48.000Z
core/service/models.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
13
2015-01-13T20:56:22.000Z
2022-02-23T06:01:17.000Z
from django.db import models from django.core.exceptions import ValidationError from systems.models import Allocation, System from core.mixins import ObjectUrlMixin from core.service import constants from core.utils import to_a, mozillian_a from core.site.models import Site class Dependency(models.Model): # dep...
36.607477
79
0.569951
c4b8ff84d455e8b215aa56dcef66c97babf93860
1,189
py
Python
graph/importance.py
phykn/xai_tree
66f5cb4ea77686364478b1f16f937678b2e544a8
[ "Apache-2.0" ]
1
2022-02-06T17:49:26.000Z
2022-02-06T17:49:26.000Z
graph/importance.py
phykn/xai_tree
66f5cb4ea77686364478b1f16f937678b2e544a8
[ "Apache-2.0" ]
null
null
null
graph/importance.py
phykn/xai_tree
66f5cb4ea77686364478b1f16f937678b2e544a8
[ "Apache-2.0" ]
null
null
null
import pandas as pd import altair as alt from altair import Chart from typing import List def plot_importance( features: List[str], importance: List[float], target: str='', num: int=10 ) -> Chart: source = pd.DataFrame( data = {'feature': features, 'importance': importance} ...
21.618182
63
0.439865
9e55ca2371f93c5937d28064a1a49158bfac4600
498
py
Python
feedo/applications/index/views.py
washwash/django-feedo
29f515bdb05b56e1bf44f5d3d9049982914d996f
[ "MIT" ]
null
null
null
feedo/applications/index/views.py
washwash/django-feedo
29f515bdb05b56e1bf44f5d3d9049982914d996f
[ "MIT" ]
null
null
null
feedo/applications/index/views.py
washwash/django-feedo
29f515bdb05b56e1bf44f5d3d9049982914d996f
[ "MIT" ]
null
null
null
from django.shortcuts import redirect from django.urls import reverse from django.views.generic import TemplateView class IndexView(TemplateView): @property def template_name(self): return 'index_sign_up.html' def dispatch(self, request, *args, **kwargs): if self.request.user.is_authenti...
26.210526
72
0.720884
22f8e976a84936bbb13aa9aaf05e76bd38ff5774
514
py
Python
Final Milestone/MovieLens/read_ratings.py
starbuck10/CS109a_DataScience_UserRatings_Team_Project
379c93b42600eeee4db34865062a5437adba25a6
[ "MIT" ]
1
2016-10-19T00:33:15.000Z
2016-10-19T00:33:15.000Z
Final Milestone/MovieLens/read_ratings.py
starbuck10/CS109a_DataScience_UserRatings_Team_Project
379c93b42600eeee4db34865062a5437adba25a6
[ "MIT" ]
null
null
null
Final Milestone/MovieLens/read_ratings.py
starbuck10/CS109a_DataScience_UserRatings_Team_Project
379c93b42600eeee4db34865062a5437adba25a6
[ "MIT" ]
null
null
null
from datetime import datetime import pandas as pd from common import elapsed_time def date_parse(time_in_secs): return datetime.utcfromtimestamp(float(time_in_secs)) def read_ratings_df_with_timestamp(file_name): with elapsed_time('loaded csv'): ratings_df = pd.read_csv(file_name, parse_dates=['ti...
23.363636
94
0.762646
59a9d963b39edd35898e92287495eb4dda5add12
9,663
py
Python
SimModel_Python_API/simmodel_swig/Release/SimGeomVector_Vector_Default.py
EnEff-BIM/EnEffBIM-Framework
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
[ "MIT" ]
3
2016-05-30T15:12:16.000Z
2022-03-22T08:11:13.000Z
SimModel_Python_API/simmodel_swig/Release/SimGeomVector_Vector_Default.py
EnEff-BIM/EnEffBIM-Framework
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
[ "MIT" ]
21
2016-06-13T11:33:45.000Z
2017-05-23T09:46:52.000Z
SimModel_Python_API/simmodel_swig/Release/SimGeomVector_Vector_Default.py
EnEff-BIM/EnEffBIM-Framework
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
[ "MIT" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.7 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path imp...
38.345238
133
0.733313
3057c9232ed5782b178fc59ca3b7ab35c1bee8fa
1,896
py
Python
tasks.py
ww3pl/marshmallow-jsonapi
375a42f9ec4a8f4951b0e30c5bb3401d486d4855
[ "MIT" ]
null
null
null
tasks.py
ww3pl/marshmallow-jsonapi
375a42f9ec4a8f4951b0e30c5bb3401d486d4855
[ "MIT" ]
null
null
null
tasks.py
ww3pl/marshmallow-jsonapi
375a42f9ec4a8f4951b0e30c5bb3401d486d4855
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import webbrowser from invoke import task, run docs_dir = 'docs' build_dir = os.path.join(docs_dir, '_build') @task def test(ctx): flake(ctx) import pytest errcode = pytest.main(['tests']) sys.exit(errcode) @task def flake(ctx): """Run flake8 on codeb...
23.7
86
0.638186
066445cf7c4fcde18446af9a498fedb58d4db1c4
674
py
Python
test/test_interface.py
Factern/factern-client-python
2453dbf0d683417142fe98514ef6de2742f14f92
[ "MIT" ]
null
null
null
test/test_interface.py
Factern/factern-client-python
2453dbf0d683417142fe98514ef6de2742f14f92
[ "MIT" ]
null
null
null
test/test_interface.py
Factern/factern-client-python
2453dbf0d683417142fe98514ef6de2742f14f92
[ "MIT" ]
2
2018-07-20T15:02:06.000Z
2018-08-01T20:38:38.000Z
# coding: utf-8 """ Factern API """ from __future__ import absolute_import import unittest import factern_client from factern_client.com.factern.model.interface import Interface # noqa: E501 from factern_client.rest import ApiException class TestInterface(unittest.TestCase): """Interface unit test stubs...
19.257143
79
0.686944
6214b66e4b2336831949f276b485ea4608557c07
118
py
Python
dbsync/syncers/gearman.py
zhoubangtao/dbsync
5b7231a245b903f00c12a3bc0a50e7bc171bc9a8
[ "Apache-2.0" ]
null
null
null
dbsync/syncers/gearman.py
zhoubangtao/dbsync
5b7231a245b903f00c12a3bc0a50e7bc171bc9a8
[ "Apache-2.0" ]
null
null
null
dbsync/syncers/gearman.py
zhoubangtao/dbsync
5b7231a245b903f00c12a3bc0a50e7bc171bc9a8
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- __author__ = 'nathan' from base import BaseSyncer class GearmanSyncer(BaseSyncer): pass
13.111111
32
0.694915
dd89243673d523aba531173be3bff3ea2908843e
498
py
Python
plasmapy/dispersion/tests/test_twofluiddispersionsolver.py
qudsiramiz/PlasmaPy
d3e46056d26926d488408b357523c90ac5445e47
[ "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-1-Clause", "BSD-3-Clause" ]
1
2019-10-15T17:41:05.000Z
2019-10-15T17:41:05.000Z
plasmapy/dispersion/tests/test_twofluiddispersionsolver.py
ahmadryan/PlasmaPy
d3e46056d26926d488408b357523c90ac5445e47
[ "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-1-Clause", "BSD-3-Clause" ]
13
2021-07-06T18:21:31.000Z
2022-03-01T20:15:12.000Z
plasmapy/dispersion/tests/test_twofluiddispersionsolver.py
qudsiramiz/PlasmaPy
d3e46056d26926d488408b357523c90ac5445e47
[ "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-1-Clause", "BSD-3-Clause" ]
null
null
null
"""Tests for the two fluid dispersion solver""" import numpy as np import pytest from astropy import units as u from plasmapy.dispersion.two_fluid_dispersion_solver import two_fluid_dispersion_solution k = 0.01 * u.m ** -1 theta = 30 * u.deg B = 8.3E-9 * u.T T_e = 1.6e6 * u.K T_i = 4.e5 * u.K z = 1 k_arr = np.lins...
19.153846
59
0.624498
ec56dc2dff7ee3820d50e3e62ff4dc259883e019
4,186
py
Python
banditpylib/learners/ordinary_mnl_learner/ucb.py
XiGYmax/banditpylib
07698a1c6b17720a8199dea76580546fe3dfb9be
[ "MIT" ]
null
null
null
banditpylib/learners/ordinary_mnl_learner/ucb.py
XiGYmax/banditpylib
07698a1c6b17720a8199dea76580546fe3dfb9be
[ "MIT" ]
null
null
null
banditpylib/learners/ordinary_mnl_learner/ucb.py
XiGYmax/banditpylib
07698a1c6b17720a8199dea76580546fe3dfb9be
[ "MIT" ]
null
null
null
from typing import List, Tuple, Set, Optional import numpy as np from banditpylib.bandits import search_best_assortment, Reward, \ local_search_best_assortment from .utils import OrdinaryMNLLearner class UCB(OrdinaryMNLLearner): """UCB policy :cite:`DBLP:journals/ior/AgrawalAGZ19`""" def __init__(self, ...
32.449612
80
0.650263
4b83ed87fcf339767071a497d9eb8e73a6fb0ec7
123
py
Python
transparent_keras/tests/__init__.py
angeloskath/transparent-keras
8a56ccb9a11b89f4bbc964ae624bac63768901e8
[ "MIT" ]
null
null
null
transparent_keras/tests/__init__.py
angeloskath/transparent-keras
8a56ccb9a11b89f4bbc964ae624bac63768901e8
[ "MIT" ]
null
null
null
transparent_keras/tests/__init__.py
angeloskath/transparent-keras
8a56ccb9a11b89f4bbc964ae624bac63768901e8
[ "MIT" ]
null
null
null
import unittest from test_transparent_model import TransparentModelTest if __name__ == "__main__": unittest.main()
13.666667
55
0.780488
7a99ca5b6b282439df80e7caffb4485d2cb86366
4,061
py
Python
src/lib/detectors/ctdet_line.py
SunLoveSheep/Sem-LSD
8c085217c372588fbb9ca37c5aef32d66270560f
[ "MIT" ]
5
2020-09-17T12:09:10.000Z
2022-03-09T08:30:19.000Z
src/lib/detectors/ctdet_line.py
SunLoveSheep/Sem-LSD
8c085217c372588fbb9ca37c5aef32d66270560f
[ "MIT" ]
2
2021-04-04T11:53:37.000Z
2022-03-09T15:40:23.000Z
src/lib/detectors/ctdet_line.py
SunLoveSheep/Sem-LSD
8c085217c372588fbb9ca37c5aef32d66270560f
[ "MIT" ]
2
2020-05-12T06:41:08.000Z
2020-06-01T07:08:16.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import time import torch from external_nms.nms import soft_nms from models.decode import ctdet_line_decode from models.utils import flip_tensor from utils.post_process import ctdetline_post_...
40.61
112
0.628909
64246f9031d87ff799ceefbd1faf0f5bb995bf67
17,161
py
Python
lingvo/core/metrics.py
Mddct/lingvo
256ebddeed406cc0fe5c43f0c69a15aa93e1ece1
[ "Apache-2.0" ]
null
null
null
lingvo/core/metrics.py
Mddct/lingvo
256ebddeed406cc0fe5c43f0c69a15aa93e1ece1
[ "Apache-2.0" ]
null
null
null
lingvo/core/metrics.py
Mddct/lingvo
256ebddeed406cc0fe5c43f0c69a15aa93e1ece1
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # 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 ...
30.809695
82
0.674961
94dd7255a131fa71f028bdc373501722c791d969
95,652
py
Python
sdk/google_appengine/google/appengine/ext/mapreduce/input_readers.py
ProfessionalIT/maxigenios-website
11604aa1a25b5746340ba145a7cbf4d69ebe772c
[ "MIT" ]
null
null
null
sdk/google_appengine/google/appengine/ext/mapreduce/input_readers.py
ProfessionalIT/maxigenios-website
11604aa1a25b5746340ba145a7cbf4d69ebe772c
[ "MIT" ]
null
null
null
sdk/google_appengine/google/appengine/ext/mapreduce/input_readers.py
ProfessionalIT/maxigenios-website
11604aa1a25b5746340ba145a7cbf4d69ebe772c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
32.358593
80
0.677383
482e71afe545e90d56ce3fb96fe9d95219c79f10
334
py
Python
packages/api-server/api_server/logger.py
mayman99/rmf-web
5670bd943567c6a866ec6345c972e6fb84d73476
[ "Apache-2.0" ]
23
2021-04-13T23:01:12.000Z
2022-03-21T02:15:24.000Z
packages/api-server/api_server/logger.py
mayman99/rmf-web
5670bd943567c6a866ec6345c972e6fb84d73476
[ "Apache-2.0" ]
326
2021-03-10T17:32:17.000Z
2022-03-30T04:42:14.000Z
packages/api-server/api_server/logger.py
mayman99/rmf-web
5670bd943567c6a866ec6345c972e6fb84d73476
[ "Apache-2.0" ]
13
2021-04-10T10:33:36.000Z
2022-02-22T15:39:58.000Z
import logging import sys from fastapi.logger import logger as _logger from .app_config import app_config logger: logging.Logger = _logger handler = logging.StreamHandler(sys.stdout) handler.setFormatter(logging.Formatter(logging.BASIC_FORMAT)) logger.addHandler(handler) logger.setLevel(app_config.log_level) logger...
22.266667
61
0.823353
90a76f22ca553aaf65478ee1ff91f0662d469e1c
63,662
py
Python
vedo/utils.py
kclamar/vedo
2fd8b02ba8debcabbf43f0a4decbc141854273e1
[ "CC0-1.0" ]
null
null
null
vedo/utils.py
kclamar/vedo
2fd8b02ba8debcabbf43f0a4decbc141854273e1
[ "CC0-1.0" ]
null
null
null
vedo/utils.py
kclamar/vedo
2fd8b02ba8debcabbf43f0a4decbc141854273e1
[ "CC0-1.0" ]
null
null
null
import vtk from vtk.util.numpy_support import numpy_to_vtk, vtk_to_numpy, numpy_to_vtkIdTypeArray import numpy as np import vedo from vedo.colors import printc import time import math import sys import os __doc__ = ( """ Utilities submodule. """ + vedo.docs._defs ) __all__ = [ "ProgressBar", "geometry...
33.506316
112
0.516258
d820c787f0cfb2dc77a62100939af79454b85732
53,367
py
Python
mac/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/apis_map.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
null
null
null
mac/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/apis_map.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
null
null
null
mac/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/apis_map.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2015 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
43.671849
109
0.613937
f946c0be911a247fcc1f658977db5aefb6c0faf3
2,447
py
Python
src/Products/Five/tests/test_directives.py
dek4nice/Zope
ec4765fc0007c4e78aafcbeef510077444f8551a
[ "ZPL-2.1" ]
1
2018-11-30T12:39:27.000Z
2018-11-30T12:39:27.000Z
src/Products/Five/tests/test_directives.py
dek4nice/Zope
ec4765fc0007c4e78aafcbeef510077444f8551a
[ "ZPL-2.1" ]
null
null
null
src/Products/Five/tests/test_directives.py
dek4nice/Zope
ec4765fc0007c4e78aafcbeef510077444f8551a
[ "ZPL-2.1" ]
1
2018-11-30T12:39:34.000Z
2018-11-30T12:39:34.000Z
############################################################################## # # Copyright (c) 2004, 2005 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
31.779221
78
0.628525
4b5eb786c4439649ca8c46f11fb56b2016781ad0
4,900
py
Python
tests/test_bollards.py
JeanmarieAlder/bollards-api
39c82a53575ecd2fbd7f98864512a5494b800836
[ "MIT" ]
1
2021-07-26T06:40:04.000Z
2021-07-26T06:40:04.000Z
tests/test_bollards.py
JeanmarieAlder/bollards-api
39c82a53575ecd2fbd7f98864512a5494b800836
[ "MIT" ]
null
null
null
tests/test_bollards.py
JeanmarieAlder/bollards-api
39c82a53575ecd2fbd7f98864512a5494b800836
[ "MIT" ]
null
null
null
from io import BytesIO from pytest_mock import MockerFixture def test_list_page(client): """Test that list page displays correctly""" rv = client.get('/list') resp = rv.data print(resp) assert b'<h1 class="m-2">Bollards List</h1>' in resp assert b'<b>No 3a</b>' in resp assert b'<b>No 1</b...
31.012658
145
0.642245
adbd625c1f05c5e61a4c4ca77372a7de429b407a
1,040
py
Python
to_offer/34_PathInTree.py
Run0812/algorithm
1a73ce6e81cf8c3ebe58f736204dc686e85d44c5
[ "MIT" ]
null
null
null
to_offer/34_PathInTree.py
Run0812/algorithm
1a73ce6e81cf8c3ebe58f736204dc686e85d44c5
[ "MIT" ]
null
null
null
to_offer/34_PathInTree.py
Run0812/algorithm
1a73ce6e81cf8c3ebe58f736204dc686e85d44c5
[ "MIT" ]
null
null
null
""" 面试题34:二叉树中和为某一值的路径 题目:输入一棵二叉树和一个整数,打印出二叉树中节点值的和为输入整数的所有路径。 从树的根节点开始往下一直到叶节点所经过的节点形成一条路径。 例: 给定如下二叉树,以及目标和 sum = 22, 5 / \ 4 8 / / \ 11 13 4 / \ / \ 7 2 5 1 打印: [5,4,11,2], [5,8,4,5] """ def path_in_tree(root, sum)...
23.636364
88
0.522115
eeaeeeda1c0e470fb0d370e7e110111097795824
452
py
Python
PythonCode/PyCom/Examples/WiFi.py
CarterWS/Summer2020
120f8ed5e225dcbf9f469daf17a787e3f0b93417
[ "MIT" ]
null
null
null
PythonCode/PyCom/Examples/WiFi.py
CarterWS/Summer2020
120f8ed5e225dcbf9f469daf17a787e3f0b93417
[ "MIT" ]
null
null
null
PythonCode/PyCom/Examples/WiFi.py
CarterWS/Summer2020
120f8ed5e225dcbf9f469daf17a787e3f0b93417
[ "MIT" ]
11
2020-06-03T10:12:28.000Z
2020-06-05T16:02:40.000Z
''' https://docs.pycom.io/tutorials/all/wlan.html ''' import machine from network import WLAN wlan = WLAN(mode=WLAN.STA) nets = wlan.scan() nets for net in nets: if net.ssid == 'HighPeaks': print('Network found!') wlan.connect(net.ssid, auth=(net.sec, 'password'), timeout=5000) while not...
22.6
72
0.634956
98df11ee041b6343a449ee9adef74ced417c26c0
8,942
py
Python
server/libs/effect_service.py
florian-h05/music_led_strip_control
8764638479c31941972efaf05048f79358ed6f44
[ "MIT" ]
195
2019-12-26T11:19:27.000Z
2022-03-28T04:20:34.000Z
server/libs/effect_service.py
ElGammler/music_led_strip_control
b208333357cfee6343723a1849ff56eb25186003
[ "MIT" ]
144
2019-09-07T19:10:13.000Z
2022-03-30T07:24:02.000Z
server/libs/effect_service.py
ElGammler/music_led_strip_control
b208333357cfee6343723a1849ff56eb25186003
[ "MIT" ]
51
2019-12-02T00:13:47.000Z
2022-03-29T17:26:47.000Z
from libs.effects.effect_spectrum_analyzer import EffectSpectrumAnalyzer # pylint: disable=E0611, E0401 from libs.effects.effect_direction_changer import EffectDirectionChanger # pylint: disable=E0611, E0401 from libs.effects.effect_advanced_scroll import EffectAdvancedScroll # pylint: disable=E0611, E0401 from libs...
48.597826
162
0.699732
fb603a43f9e2362dd5bdc7ac4c760cab40e9a63e
1,593
py
Python
tests/queries/0_stateless/00962_temporary_live_view_watch_live.py
ageraab/ClickHouse
7cf35388407ee57f4e75c7040202274fea793ca2
[ "Apache-2.0" ]
3
2021-09-14T08:36:18.000Z
2022-02-24T02:55:38.000Z
tests/queries/0_stateless/00962_temporary_live_view_watch_live.py
ageraab/ClickHouse
7cf35388407ee57f4e75c7040202274fea793ca2
[ "Apache-2.0" ]
3
2020-02-18T14:59:34.000Z
2020-02-19T10:42:18.000Z
tests/queries/0_stateless/00962_temporary_live_view_watch_live.py
ageraab/ClickHouse
7cf35388407ee57f4e75c7040202274fea793ca2
[ "Apache-2.0" ]
2
2021-01-04T06:43:51.000Z
2021-05-14T03:17:13.000Z
#!/usr/bin/env python import os import sys import signal CURDIR = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(CURDIR, 'helpers')) from client import client, prompt, end_of_block log = None # uncomment the line below for debugging #log=sys.stdout with client(name='client1>', log=log) ...
33.1875
94
0.684871
c8867f44baecc6de2b922d2138f36c0e85fc8b72
1,905
py
Python
examples/structured.py
BLooperZ/lilliput
509d31c0de9d7fc6a5d29ef3e9351dd8ad73fd11
[ "MIT" ]
null
null
null
examples/structured.py
BLooperZ/lilliput
509d31c0de9d7fc6a5d29ef3e9351dd8ad73fd11
[ "MIT" ]
null
null
null
examples/structured.py
BLooperZ/lilliput
509d31c0de9d7fc6a5d29ef3e9351dd8ad73fd11
[ "MIT" ]
null
null
null
import io from dataclasses import dataclass, field from typing import Sequence from lilliput.meta import typedef from lilliput.structure import Structure, sequence_unpacker from lilliput.word import uint16le, uint8, ByteOrder from lilliput.text import cstring from lilliput.raw import RawBytes, consume from lilliput.re...
32.844828
356
0.729134
b02e515e4284aaaf7a567174d2ba6cbc600a92d2
905
py
Python
crawling_prac/recipeKR/run.py
chunbo777/RECIPENLGforMC
144e4d5fe9d02a0dc644b018322268fa30af984e
[ "Apache-2.0" ]
1
2022-01-21T05:58:50.000Z
2022-01-21T05:58:50.000Z
crawling_prac/recipeKR/run.py
chunbo777/RECIPENLGforMC
144e4d5fe9d02a0dc644b018322268fa30af984e
[ "Apache-2.0" ]
null
null
null
crawling_prac/recipeKR/run.py
chunbo777/RECIPENLGforMC
144e4d5fe9d02a0dc644b018322268fa30af984e
[ "Apache-2.0" ]
null
null
null
import os from scrapy.cmdline import execute os.chdir(os.path.dirname(os.path.realpath(__file__))) try: execute( # ["scrapy", "crawl", "ssg"] # ["scrapy", "crawl", "wtable"] # ["scrapy", "crawl", "haemuk"] # ["scrapy", "crawl", "ssgrecipe"] # ["scrapy", "crawl", "manrecipe1...
33.518519
53
0.523757