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
f5cf563ad5f4520a3d477423e348053686acbf41
28,545
py
Python
django/contrib/formtools/wizard/views.py
deployed/django
9db4271bd11ac23a5a5652bbcdf8fb6d4b997651
[ "BSD-3-Clause" ]
1
2016-06-06T07:21:04.000Z
2016-06-06T07:21:04.000Z
django/contrib/formtools/wizard/views.py
deployed/django
9db4271bd11ac23a5a5652bbcdf8fb6d4b997651
[ "BSD-3-Clause" ]
null
null
null
django/contrib/formtools/wizard/views.py
deployed/django
9db4271bd11ac23a5a5652bbcdf8fb6d4b997651
[ "BSD-3-Clause" ]
null
null
null
from collections import OrderedDict import re from django import forms from django.shortcuts import redirect from django.core.urlresolvers import reverse from django.forms import formsets, ValidationError from django.views.generic import TemplateView from django.utils.decorators import classonlymethod from django.util...
38.783967
90
0.625293
e3326ca8d7b7f34946af23656578298378330c65
1,627
py
Python
intro/part03-08_string_multiplied/test/test_string_multiplied.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
intro/part03-08_string_multiplied/test/test_string_multiplied.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
intro/part03-08_string_multiplied/test/test_string_multiplied.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
import unittest from unittest.mock import patch from tmc import points from tmc.utils import load_module, reload_module, get_stdout from functools import reduce from random import randint exercise = 'src.string_multiplied' def format_tuple(d : tuple): return str(d).replace("'","") @points('2.string_multiplied')...
43.972973
197
0.634911
e53d22761ea0dcabde1eb28e4745d446ff7920ed
1,508
py
Python
airflow/example_dags/example_postgres_to_gcs.py
Densol92/airflow
ce3635d64f2eba9616709fb9d998676aa34b0875
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
5
2020-07-17T07:33:58.000Z
2022-03-02T06:23:47.000Z
airflow/example_dags/example_postgres_to_gcs.py
Densol92/airflow
ce3635d64f2eba9616709fb9d998676aa34b0875
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
7
2020-06-03T14:55:17.000Z
2021-12-30T00:01:50.000Z
airflow/example_dags/example_postgres_to_gcs.py
Densol92/airflow
ce3635d64f2eba9616709fb9d998676aa34b0875
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
12
2020-01-09T14:02:39.000Z
2022-01-24T07:18:51.000Z
# -*- coding: utf-8 -*- # # 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 #...
33.511111
67
0.746021
77ba81b9edf7456afc0753fe3a16556e3d93addf
570
py
Python
projects/migrations/0012_auto_20160421_0921.py
kilinger/marathon-rocketchat-hubot
682454b90265eb2c66ea222cf0c970370816a9e1
[ "BSD-3-Clause" ]
1
2018-07-10T07:03:12.000Z
2018-07-10T07:03:12.000Z
projects/migrations/0012_auto_20160421_0921.py
kilinger/marathon-rocketchat-hubot
682454b90265eb2c66ea222cf0c970370816a9e1
[ "BSD-3-Clause" ]
null
null
null
projects/migrations/0012_auto_20160421_0921.py
kilinger/marathon-rocketchat-hubot
682454b90265eb2c66ea222cf0c970370816a9e1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0011_auto_20160317_0943'), ] operations = [ migrations.AddField( model_name='project', n...
22.8
53
0.589474
7acce6419f3657aac7df0add668c521fe24e4b51
2,862
py
Python
tensorflow_probability/python/internal/backend/numpy/internal/utils.py
nxdao2000/probability
33d2bc1cb0e7b6284579ea7f3692b9d056e0d700
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/backend/numpy/internal/utils.py
nxdao2000/probability
33d2bc1cb0e7b6284579ea7f3692b9d056e0d700
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/backend/numpy/internal/utils.py
nxdao2000/probability
33d2bc1cb0e7b6284579ea7f3692b9d056e0d700
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
28.058824
88
0.701258
91e8c3dea059de23d9a228d72dab429e31a7904e
773
py
Python
Codes/Subscriber_Publisher/Tutorial/I_Hear.py
Diwij/ros-tutorials
5f372c5f15035d982ef3dffde08b330f38d8d4fb
[ "MIT" ]
null
null
null
Codes/Subscriber_Publisher/Tutorial/I_Hear.py
Diwij/ros-tutorials
5f372c5f15035d982ef3dffde08b330f38d8d4fb
[ "MIT" ]
null
null
null
Codes/Subscriber_Publisher/Tutorial/I_Hear.py
Diwij/ros-tutorials
5f372c5f15035d982ef3dffde08b330f38d8d4fb
[ "MIT" ]
null
null
null
#!/usr/bin/python import rospy from std_msgs.msg import String def chatter_callback(message): #get_caller_id(): Get fully resolved name of local node rospy.loginfo(rospy.get_caller_id() + " I heard %s", message.data) def listener(): # In ROS, nodes are uniquely named. If two nodes with the same #...
30.92
72
0.711514
159dcf5bc58c5ff5bb1d88027b29f045cb4e128a
713
py
Python
scripts/test_SBVAT.py
Sharpiless/GraphGallery
5e8895cc2ca2fc06a31bfc58bc3b7a52e1ceddd0
[ "MIT" ]
1
2020-11-22T10:14:58.000Z
2020-11-22T10:14:58.000Z
scripts/test_SBVAT.py
mengliu1998/GraphGallery
025ac09e883f3e1e1b02000e086830c935884a6e
[ "MIT" ]
null
null
null
scripts/test_SBVAT.py
mengliu1998/GraphGallery
025ac09e883f3e1e1b02000e086830c935884a6e
[ "MIT" ]
1
2020-11-22T10:14:59.000Z
2020-11-22T10:14:59.000Z
import tensorflow as tf import numpy as np import networkx as nx import scipy.sparse as sp import graphgallery from graphgallery.data import Planetoid data = Planetoid('cora', root="~/GraphData/datasets/", verbose=False) graph = data.graph idx_train, idx_val, idx_test = data.split() print(graph) from gr...
29.708333
78
0.73913
2121495a8f471a5f315af2bdbc5cf3fb3223d689
5,542
py
Python
dCC_Python_SodaMachine/user_interface.py
dmartinez91/SodaMachineDebug
7cd47a52106422b10632fa208b9ef7d372c3f735
[ "MIT" ]
null
null
null
dCC_Python_SodaMachine/user_interface.py
dmartinez91/SodaMachineDebug
7cd47a52106422b10632fa208b9ef7d372c3f735
[ "MIT" ]
null
null
null
dCC_Python_SodaMachine/user_interface.py
dmartinez91/SodaMachineDebug
7cd47a52106422b10632fa208b9ef7d372c3f735
[ "MIT" ]
null
null
null
import os def simulation_main_menu(): """Main menu prompting user to choose an option""" validate_user_selection = (False, None) while validate_user_selection[0] is False: print("\t\t-Simulation menu-") print("\tPress -1- to begin transaction") print("\tPress -2- to check wallet f...
34
109
0.662035
2285f6cba370d9c312925c60c4f86c376956cd9e
2,997
py
Python
examples/demo/basic/draw_layers.py
burnpanck/chaco
6457cdd28625991ba69fbbee105051cab237aa51
[ "BSD-3-Clause" ]
3
2017-09-17T17:32:06.000Z
2022-03-15T13:04:43.000Z
examples/demo/basic/draw_layers.py
burnpanck/chaco
6457cdd28625991ba69fbbee105051cab237aa51
[ "BSD-3-Clause" ]
null
null
null
examples/demo/basic/draw_layers.py
burnpanck/chaco
6457cdd28625991ba69fbbee105051cab237aa51
[ "BSD-3-Clause" ]
5
2015-05-17T16:08:11.000Z
2021-02-23T09:23:42.000Z
#!/usr/bin/env python """ Demonstrates the use of drawing layers in Chaco. Three classes of functions are plotted: bessels, sines, and Struve functions. """ # Major library imports from numpy import linspace, sin from scipy.special import jn, struve # Enthought library imports from enable.api import Component, Compo...
31.882979
88
0.552219
7b625001d98ee53d25976120ce54f146e6753baa
2,323
py
Python
FSRNN.py
amujika/Fast-Slow-LSTM
f63a5998d0a3f347f6a4587893e57baa4bd15320
[ "Apache-2.0" ]
110
2017-05-25T05:28:49.000Z
2021-06-07T12:08:40.000Z
FSRNN.py
amujika/Fast-Slow-LSTM
f63a5998d0a3f347f6a4587893e57baa4bd15320
[ "Apache-2.0" ]
1
2019-10-17T19:56:35.000Z
2019-10-22T13:03:46.000Z
FSRNN.py
amujika/Fast-Slow-LSTM
f63a5998d0a3f347f6a4587893e57baa4bd15320
[ "Apache-2.0" ]
21
2017-05-25T23:42:05.000Z
2020-12-17T03:32:58.000Z
import tensorflow as tf class FSRNNCell(tf.contrib.rnn.RNNCell): def __init__(self, fast_cells, slow_cell, keep_prob=1.0, training=True): """Initialize the basic Fast-Slow RNN. Args: fast_cells: A list of RNN cells that will be used for the fast RNN. The cells must...
43.018519
91
0.620749
b3b1262583131a3c0a8b4cfc3d98ff7e00be7005
3,696
py
Python
sygma/models.py
tenth-speed-writer/sygma
f0cc33a2b7c22dc754979ffc871244995126d257
[ "bzip2-1.0.6" ]
null
null
null
sygma/models.py
tenth-speed-writer/sygma
f0cc33a2b7c22dc754979ffc871244995126d257
[ "bzip2-1.0.6" ]
null
null
null
sygma/models.py
tenth-speed-writer/sygma
f0cc33a2b7c22dc754979ffc871244995126d257
[ "bzip2-1.0.6" ]
null
null
null
from django.db import models as m class Grantmaker(m.Model): name = m.CharField(max_length=250) kind = m.CharField(max_length=20, choices=[("OPEN", "Open"), ("PRIVATE", "Private"), ("GOVT", "Government")]) description =...
44.53012
81
0.603626
1244486c749bbc0b8fbad70022ed8e7f15f38d43
8,045
py
Python
TimeCockpit.Tasks.Jira/TimeCockpit.Tasks.Jira.py
software-architects/TimeCockpit.Scripts
06877bccdaf89dc4867f528205323d3dab233850
[ "MIT" ]
1
2020-04-21T04:16:17.000Z
2020-04-21T04:16:17.000Z
TimeCockpit.Tasks.Jira/TimeCockpit.Tasks.Jira.py
software-architects/TimeCockpit.Scripts
06877bccdaf89dc4867f528205323d3dab233850
[ "MIT" ]
null
null
null
TimeCockpit.Tasks.Jira/TimeCockpit.Tasks.Jira.py
software-architects/TimeCockpit.Scripts
06877bccdaf89dc4867f528205323d3dab233850
[ "MIT" ]
3
2019-02-15T04:50:36.000Z
2020-06-19T07:19:54.000Z
def importJIRATasks(actionContext): from TimeCockpit.Data import EntityObject, DataContextType dc = actionContext.DataContext if dc.DataContextType != DataContextType.Server: raise ArgumentException("Action can only be executed on a server data context.") clr.AddReference("TimeCockpit.Common") from System.Coll...
43.722826
238
0.709633
ce69489cd87e15874a2a68b6197327de5dd967d7
20,478
py
Python
tools/mo/openvino/tools/mo/utils/custom_replacement_config.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
1
2021-04-20T08:14:51.000Z
2021-04-20T08:14:51.000Z
tools/mo/openvino/tools/mo/utils/custom_replacement_config.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
58
2020-11-06T12:13:45.000Z
2022-03-28T13:20:11.000Z
tools/mo/openvino/tools/mo/utils/custom_replacement_config.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
2
2019-09-20T01:33:37.000Z
2019-09-20T08:42:11.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import json import logging as log import os from re import compile, match from openvino.tools.mo.graph.graph import Node, Graph from openvino.tools.mo.utils.error import Error from openvino.tools.mo.utils.graph import nodes_matching_nam...
48.990431
120
0.653286
0c79558344c939752aa45c34d9b7d682db9580dd
697
py
Python
server/src/administer/urls.py
ekbanasolutions/aditas
2e8291202cb6781a1a0855a1cccb86348b710b71
[ "MIT" ]
2
2019-01-03T07:42:45.000Z
2019-03-15T09:06:12.000Z
server/src/administer/urls.py
ekbanatechnology/aditas
2e8291202cb6781a1a0855a1cccb86348b710b71
[ "MIT" ]
null
null
null
server/src/administer/urls.py
ekbanatechnology/aditas
2e8291202cb6781a1a0855a1cccb86348b710b71
[ "MIT" ]
2
2019-01-21T10:34:44.000Z
2021-07-06T08:49:41.000Z
from django.conf.urls import url from nodes import nodes from . import administer # from django.conf.urls import include, url from django.views.generic import TemplateView urlpatterns = [ url(r'^$', nodes.Nodes_status.as_view(), name="index"), url(r'^add_cluster$', administer.AddCluster.as_view(), name="add_c...
46.466667
100
0.734577
7dc87e8ffd8c73ead27df67bc0a18f11cbc4a7f0
341
py
Python
Assignment1/svd.py
njucjc/machine-learning
1adcbad8d1e9f9a187036bec01d1a5ce798e44e0
[ "MIT" ]
null
null
null
Assignment1/svd.py
njucjc/machine-learning
1adcbad8d1e9f9a187036bec01d1a5ce798e44e0
[ "MIT" ]
null
null
null
Assignment1/svd.py
njucjc/machine-learning
1adcbad8d1e9f9a187036bec01d1a5ce798e44e0
[ "MIT" ]
null
null
null
import numpy as np def svd_train(raw_data, k): """ 输入:原始数据矩阵raw_data、降维后的维度k 输出:投影矩阵 参考:https://blog.csdn.net/u012421852/article/details/80439403 """ u, s, vt = np.linalg.svd(raw_data) return vt[:k, :len(vt)].T def svd_test(new_data, v): """ 输入:新数据和投影矩阵 输出:降维后的数据 """ re...
18.944444
64
0.612903
ea1daa9a7ec8fd959900f68b41adaf0120d44a68
9,909
py
Python
aea/cli/core.py
lrahmani/agents-aea
9bd1d51530fc21bf41b5adea031cda19a94b048b
[ "Apache-2.0" ]
null
null
null
aea/cli/core.py
lrahmani/agents-aea
9bd1d51530fc21bf41b5adea031cda19a94b048b
[ "Apache-2.0" ]
null
null
null
aea/cli/core.py
lrahmani/agents-aea
9bd1d51530fc21bf41b5adea031cda19a94b048b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
29.144118
88
0.694116
d1f94c908b073d78742d30e220d3e99477afa69c
32,419
py
Python
CodeIA/venv/Lib/site-packages/mpmath/calculus/optimization.py
Finasty-lab/IA-Python
286113504906fec11a5aa5fd1d12e38536b1c859
[ "Apache-2.0" ]
445
2019-01-26T13:50:26.000Z
2022-03-18T05:17:38.000Z
Library/lib/python3.7/site-packages/mpmath/calculus/optimization.py
gengyong/Carnets
8930a14f69360d4db115a85ff9e0f6efa80fa2e7
[ "BSD-3-Clause" ]
242
2019-01-29T15:48:27.000Z
2022-03-31T22:09:21.000Z
Library/lib/python3.7/site-packages/mpmath/calculus/optimization.py
gengyong/Carnets
8930a14f69360d4db115a85ff9e0f6efa80fa2e7
[ "BSD-3-Clause" ]
31
2019-03-10T09:51:27.000Z
2022-02-14T23:11:12.000Z
from copy import copy from ..libmp.backend import xrange, print_ class OptimizationMethods(object): def __init__(ctx): pass ############## # 1D-SOLVERS # ############## class Newton: """ 1d-solver generating pairs of approximative root and error. Needs starting points x0 close to the root. ...
29.633455
98
0.518554
415e116f3872bf8a85ee856f7329af97b54e0988
6,736
py
Python
force_verify.py
haakonvt/LearningTensorFlow
6988a15af2ac916ae1a5e23b2c5bde9630cc0519
[ "MIT" ]
5
2018-09-06T12:52:12.000Z
2020-05-09T01:40:12.000Z
force_verify.py
haakonvt/LearningTensorFlow
6988a15af2ac916ae1a5e23b2c5bde9630cc0519
[ "MIT" ]
null
null
null
force_verify.py
haakonvt/LearningTensorFlow
6988a15af2ac916ae1a5e23b2c5bde9630cc0519
[ "MIT" ]
4
2018-02-06T08:42:06.000Z
2019-04-16T11:23:06.000Z
from create_train_data import generate_symmfunc_input_Si_Behler import numpy as np from file_management import findPathToData, readXYZ_Files from plot_tools import plotErrorEvolutionSWvsNN, plotEvolutionSWvsNN_N_diff_epochs, plotForcesSWvsNN, plotLAMMPSforces1atomEvo from create_train_data import PES_Stillinger_Weber i...
41.073171
126
0.634056
ee1ed474924d4d90215aa95a07b29cf4f297b32a
4,367
py
Python
fusion_genes_compare.py
Hammarn/Scripts
eb9fb51b614d29aea425168aa16c58410d975f46
[ "MIT" ]
null
null
null
fusion_genes_compare.py
Hammarn/Scripts
eb9fb51b614d29aea425168aa16c58410d975f46
[ "MIT" ]
null
null
null
fusion_genes_compare.py
Hammarn/Scripts
eb9fb51b614d29aea425168aa16c58410d975f46
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import re import argparse import sys def read_files_store_data(input_files,output_file): fusion_dict={} for input_file in input_files: if input_file.endswith("star-fusion.fusion_candidates.final.abridged"): #We have a star fusion file with open(i...
38.991071
130
0.596977
8441ad32d286aabf26e1e99035938be2fca3af1b
820
py
Python
ferenda/sources/legal/se/__init__.py
eckberg/ferenda
c420f43c508edb4c4a41e79cb188e9760347d432
[ "BSD-2-Clause" ]
null
null
null
ferenda/sources/legal/se/__init__.py
eckberg/ferenda
c420f43c508edb4c4a41e79cb188e9760347d432
[ "BSD-2-Clause" ]
null
null
null
ferenda/sources/legal/se/__init__.py
eckberg/ferenda
c420f43c508edb4c4a41e79cb188e9760347d432
[ "BSD-2-Clause" ]
1
2022-01-04T09:15:03.000Z
2022-01-04T09:15:03.000Z
# flake8: noqa from rdflib import Namespace RPUBL = Namespace('http://rinfo.lagrummet.se/ns/2008/11/rinfo/publ#') URISPACE = Namespace('http://rinfo.lagrummet.se/sys/uri/space#') RINFOEX = Namespace("http://lagen.nu/terms#") from .swedishlegalsource import SwedishLegalSource, SwedishLegalStore, SwedishLegalHandler, Swe...
35.652174
113
0.812195
5d4c46dc9ac537f1e72dcbae2ff665b4dfff5e06
14,409
py
Python
eZmaxApi/model/ezsignformfieldgroup_edit_object_v1_response.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
eZmaxApi/model/ezsignformfieldgroup_edit_object_v1_response.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
eZmaxApi/model/ezsignformfieldgroup_edit_object_v1_response.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
""" eZmax API Definition (Full) This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501 The version of the OpenAPI document: 1.1.7 Contact: support-api@ezmax.ca Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401...
43.796353
121
0.58519
979fef75cdf725e9306ed164013ce1a463472fb3
16,130
py
Python
Lib/test/test_fractions.py
weimingtom/wpython
d51bfe48ec4c0ade1514f1351dff700c63ca112a
[ "PSF-2.0" ]
5
2020-06-30T05:06:40.000Z
2021-05-24T08:38:33.000Z
Lib/test/test_fractions.py
weimingtom/wpython
d51bfe48ec4c0ade1514f1351dff700c63ca112a
[ "PSF-2.0" ]
null
null
null
Lib/test/test_fractions.py
weimingtom/wpython
d51bfe48ec4c0ade1514f1351dff700c63ca112a
[ "PSF-2.0" ]
2
2015-10-01T18:28:20.000Z
2020-09-09T16:25:27.000Z
"""Tests for Lib/fractions.py.""" from decimal import Decimal from test.test_support import run_unittest import math import operator import fractions import unittest from copy import copy, deepcopy from cPickle import dumps, loads F = fractions.Fraction gcd = fractions.gcd class GcdTest(unittest.TestCase): def ...
40.325
79
0.563422
0ffa3309b09bb0093e3a77784f4f1032f426e979
7,819
py
Python
eeg_modelling/eeg_viewer/similarity_test.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
eeg_modelling/eeg_viewer/similarity_test.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
eeg_modelling/eeg_viewer/similarity_test.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
37.772947
79
0.638061
a26e3bb5967926f4cfa436a4b241ac15e21486b4
1,983
py
Python
demoproject/web/utils/jinja2backend.py
waleoyediran/django-starter
eb5df81ae503781746606902f24938693230dd54
[ "MIT" ]
null
null
null
demoproject/web/utils/jinja2backend.py
waleoyediran/django-starter
eb5df81ae503781746606902f24938693230dd54
[ "MIT" ]
null
null
null
demoproject/web/utils/jinja2backend.py
waleoyediran/django-starter
eb5df81ae503781746606902f24938693230dd54
[ "MIT" ]
null
null
null
import sys import six from django.template.backends.jinja2 import Jinja2, Template from django.template.backends.utils import csrf_token_lazy, csrf_input_lazy from django.template.exceptions import TemplateDoesNotExist from jinja2.exceptions import TemplateSyntaxError from jinja2.utils import import_string import jinj...
36.054545
78
0.666667
f7ace920857a1ed8ec3e9a8cacc9d831b07aa5b5
7,656
py
Python
env/plane.py
mrernst/rl_robotics_research
0bc446cfb69591cb4ee3ce8d39815c463090a5f6
[ "MIT" ]
null
null
null
env/plane.py
mrernst/rl_robotics_research
0bc446cfb69591cb4ee3ce8d39815c463090a5f6
[ "MIT" ]
null
null
null
env/plane.py
mrernst/rl_robotics_research
0bc446cfb69591cb4ee3ce8d39815c463090a5f6
[ "MIT" ]
null
null
null
import gym import numpy as np import cv2 from gym import spaces def line_intersection(line1, line2): # calculate the intersection point xdiff = (line1[0][0] - line1[1][0], line2[0][0] - line2[1][0]) ydiff = (line1[0][1] - line1[1][1], line2[0] [1] - line2[1][1]) # Typo was here def det(a, b): ...
31.377049
111
0.455199
560729c6e6f6a22d84c7558bb8007335207be519
38,065
py
Python
tests/fast_tests/test_environments.py
remusionita/flow_rl
f26cd13bdcc89c00fe980cd8d7873c88af8e2744
[ "MIT" ]
2
2020-12-03T21:13:39.000Z
2022-03-13T09:12:43.000Z
tests/fast_tests/test_environments.py
remusionita/flow_rl
f26cd13bdcc89c00fe980cd8d7873c88af8e2744
[ "MIT" ]
1
2019-12-05T09:04:05.000Z
2019-12-05T21:23:49.000Z
tests/fast_tests/test_environments.py
remusionita/flow_rl
f26cd13bdcc89c00fe980cd8d7873c88af8e2744
[ "MIT" ]
3
2019-12-07T11:36:21.000Z
2020-01-04T16:29:57.000Z
import random import numpy as np import unittest import os from scipy.optimize import fsolve from copy import deepcopy from flow.core.params import VehicleParams from flow.core.params import NetParams, EnvParams, SumoParams, InFlows from flow.controllers import IDMController, RLController from flow.networks import Ring...
32.506405
84
0.568606
f70f010c765e7d5b11c81cbf2a8a5f6563f97562
1,657
py
Python
pyrasterframes/python/geomesa_pyspark/types.py
jdenisgiguere/rasterframes
4226cde5223e67ab0e9f27c98bc1053d0a4b7a4e
[ "Apache-2.0" ]
null
null
null
pyrasterframes/python/geomesa_pyspark/types.py
jdenisgiguere/rasterframes
4226cde5223e67ab0e9f27c98bc1053d0a4b7a4e
[ "Apache-2.0" ]
null
null
null
pyrasterframes/python/geomesa_pyspark/types.py
jdenisgiguere/rasterframes
4226cde5223e67ab0e9f27c98bc1053d0a4b7a4e
[ "Apache-2.0" ]
null
null
null
"""*********************************************************************** This file was created by Astraea, Inc., 2018 from an excerpt of the original: Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. All rights reserved. This program and the accompanying materials are made available under ...
24.014493
77
0.652384
4996016e19c0a4612f6785d846a3f53d4e3c28e1
2,055
py
Python
day_16/day_16.py
niccolomarcon/AoC_2020
1afe7453f7ad8c789a3f804c29159c0bb62a7499
[ "MIT" ]
null
null
null
day_16/day_16.py
niccolomarcon/AoC_2020
1afe7453f7ad8c789a3f804c29159c0bb62a7499
[ "MIT" ]
null
null
null
day_16/day_16.py
niccolomarcon/AoC_2020
1afe7453f7ad8c789a3f804c29159c0bb62a7499
[ "MIT" ]
null
null
null
from functools import partial from heap import Heap from itertools import chain, groupby from math import prod from sys import argv import re def extract(rule): regex = re.compile(r'([\w ]+): (\d+)-(\d+) or (\d+)-(\d+)') match = regex.match(rule).groups() name, (a, b, c, d) = match[0], map(int, match[1:])...
33.145161
79
0.642336
558c9fb2258f416970464c4afd62fb7d64159be5
14,921
py
Python
sysmontask/disk.py
bastian-src/SysMonTask
95868e230efa130e820f91893a3c8d5664632ac4
[ "BSD-3-Clause" ]
null
null
null
sysmontask/disk.py
bastian-src/SysMonTask
95868e230efa130e820f91893a3c8d5664632ac4
[ "BSD-3-Clause" ]
null
null
null
sysmontask/disk.py
bastian-src/SysMonTask
95868e230efa130e820f91893a3c8d5664632ac4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # import gi # gi.require_version("Gtk", "3.24") from gi.repository import Gtk as g import psutil as ps,cairo from time import time from os import popen try: from gi_composites import GtkTemplate except: from sysmontask.gi_composites import GtkTemplate if __name__=='sysmontask.disk': ...
38.65544
158
0.622813
5114e508a171b59b04de1f47545c20cd8ab4ca67
3,182
py
Python
openGaussBase/testcase/SECURITY/PERMISSIONS/Opengauss_Function_Security_Schema_Case0003.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SECURITY/PERMISSIONS/Opengauss_Function_Security_Schema_Case0003.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SECURITY/PERMISSIONS/Opengauss_Function_Security_Schema_Case0003.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
37.880952
109
0.604337
1deffff14047ed4609d3219a59fab9709345d9f7
22,856
py
Python
tests/inspectdb/tests.py
Mr-Destructive/django
d3a64bea51676fcf8a0ae593cf7b103939e12c87
[ "BSD-3-Clause", "0BSD" ]
2
2021-08-09T14:01:01.000Z
2021-11-11T14:02:53.000Z
tests/inspectdb/tests.py
Mr-Destructive/django
d3a64bea51676fcf8a0ae593cf7b103939e12c87
[ "BSD-3-Clause", "0BSD" ]
3
2020-01-21T17:58:28.000Z
2022-03-30T14:16:15.000Z
tests/inspectdb/tests.py
Mr-Destructive/django
d3a64bea51676fcf8a0ae593cf7b103939e12c87
[ "BSD-3-Clause", "0BSD" ]
1
2021-04-15T01:05:57.000Z
2021-04-15T01:05:57.000Z
import os import re from io import StringIO from unittest import mock, skipUnless from django.core.management import call_command from django.db import connection from django.db.backends.base.introspection import TableInfo from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from .models import ...
48.016807
117
0.649632
1ce8132e6a9a756ae0a6c3f15f7c41c2fdbc4b29
2,646
py
Python
examples/howto/server_embed/flask_gunicorn_embed.py
kevin1kevin1k/bokeh
9f34b5b710e2748ec803c12918ec1706098a3477
[ "BSD-3-Clause" ]
17
2020-06-14T03:47:35.000Z
2022-03-07T00:25:23.000Z
examples/howto/server_embed/flask_gunicorn_embed.py
kevin1kevin1k/bokeh
9f34b5b710e2748ec803c12918ec1706098a3477
[ "BSD-3-Clause" ]
12
2020-07-22T22:40:09.000Z
2021-03-17T14:10:27.000Z
examples/howto/server_embed/flask_gunicorn_embed.py
kevin1kevin1k/bokeh
9f34b5b710e2748ec803c12918ec1706098a3477
[ "BSD-3-Clause" ]
8
2020-06-14T03:47:23.000Z
2021-11-20T15:14:04.000Z
try: import asyncio except ImportError: raise RuntimeError("This example requries Python3 / asyncio") from flask import Flask, render_template from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from bokeh.application import Application from bokeh.application.handlers import FunctionH...
32.268293
96
0.726757
74c2ababb2e4ff79c82bb2b693fd769f9893592f
125
py
Python
plugins/zmcms_cms.py
cflq3/getcms
6cf07da0ea3ec644866df715cff1f311a46ee378
[ "MIT" ]
22
2016-09-01T08:27:07.000Z
2021-01-11T13:32:59.000Z
plugins/zmcms_cms.py
cflq3/getcms
6cf07da0ea3ec644866df715cff1f311a46ee378
[ "MIT" ]
null
null
null
plugins/zmcms_cms.py
cflq3/getcms
6cf07da0ea3ec644866df715cff1f311a46ee378
[ "MIT" ]
20
2015-11-07T19:09:48.000Z
2018-05-02T03:10:41.000Z
#!/usr/bin/env python # encoding: utf-8 def run(whatweb, pluginname): whatweb.recog_from_content(pluginname, "zmcms")
15.625
51
0.72
62f4b5007ef454a4a6ae90fa7b29317345e08317
427
py
Python
accounts/views.py
MasqueCrow/Social-Project
6a8c8c273208a4930acdb53f3e7265a152adc71c
[ "MIT" ]
null
null
null
accounts/views.py
MasqueCrow/Social-Project
6a8c8c273208a4930acdb53f3e7265a152adc71c
[ "MIT" ]
5
2021-03-19T03:52:05.000Z
2021-06-10T19:18:26.000Z
accounts/views.py
MasqueCrow/Social-Project
6a8c8c273208a4930acdb53f3e7265a152adc71c
[ "MIT" ]
1
2021-08-24T18:06:27.000Z
2021-08-24T18:06:27.000Z
from django.contrib.auth import login,logout from django.urls import reverse_lazy from django.views.generic import CreateView from accounts import forms # Create your views here. class SignUp(CreateView): form_class = forms.UserCreateForm #Once user has successfully submit their sign up form #redirect user...
32.846154
57
0.782201
961b41ac7e12348d2cd9bb21a06c9a3f33d3b4af
4,545
py
Python
tests/test_message.py
jfkinslow/flask-mailing
dda99214b783b60fabc7dfad209fff4438eaf61c
[ "MIT" ]
null
null
null
tests/test_message.py
jfkinslow/flask-mailing
dda99214b783b60fabc7dfad209fff4438eaf61c
[ "MIT" ]
null
null
null
tests/test_message.py
jfkinslow/flask-mailing
dda99214b783b60fabc7dfad209fff4438eaf61c
[ "MIT" ]
null
null
null
import pytest from flask_mailing.schemas import Message, MultipartSubtypeEnum from flask_mailing.msg import MailMsg import os CONTENT = "file test content" def test_initialize(): message = Message( subject="test subject", recipients=["uzezio22@gmail.com"], body="test", subtype="pl...
24.175532
105
0.59824
61deb4d774467746acc59872062b6cf9cde48c46
3,762
py
Python
mapclientplugins/monodomain2dstep/step.py
mapclient-plugins/mapclientplugins.monodomain2d
7329558abba85f46d8802d2efe01966c188739e1
[ "Apache-2.0" ]
null
null
null
mapclientplugins/monodomain2dstep/step.py
mapclient-plugins/mapclientplugins.monodomain2d
7329558abba85f46d8802d2efe01966c188739e1
[ "Apache-2.0" ]
null
null
null
mapclientplugins/monodomain2dstep/step.py
mapclient-plugins/mapclientplugins.monodomain2d
7329558abba85f46d8802d2efe01966c188739e1
[ "Apache-2.0" ]
1
2021-06-03T02:51:18.000Z
2021-06-03T02:51:18.000Z
''' MAP Client Plugin Step ''' import json from PySide import QtGui from mapclient.mountpoints.workflowstep import WorkflowStepMountPoint from mapclientplugins.monodomain2dstep.configuredialog import ConfigureDialog from mapclientplugins.monodomain2dstep.mono2dwidget import Mono2DWidget class monodomain2dStep(Work...
33
95
0.636098
6c9081be76d6dc85ae8f784e4027a8c6e4bdcf3f
468
py
Python
pdb_ipython_nose.py
ryneeverett/ipython_nose
14161dc23ac7aab123304874442044b9fe3e10ff
[ "Unlicense" ]
41
2015-01-21T16:16:51.000Z
2022-01-20T08:49:49.000Z
pdb_ipython_nose.py
ryneeverett/ipython_nose
14161dc23ac7aab123304874442044b9fe3e10ff
[ "Unlicense" ]
6
2017-09-01T12:51:10.000Z
2018-02-08T09:37:40.000Z
pdb_ipython_nose.py
ryneeverett/ipython_nose
14161dc23ac7aab123304874442044b9fe3e10ff
[ "Unlicense" ]
8
2015-04-10T18:00:41.000Z
2020-05-31T15:17:28.000Z
import types import ipython_nose test_module = types.ModuleType('test_module') from nose.plugins.skip import SkipTest def test_foo(): assert True def test_bar(): assert False def test_baz(): raise Exception() def test_quux(): raise SkipTest() test_module.test_foo = test_foo test_module.test_bar =...
17.333333
45
0.762821
c300293233ff6c2007b83884e8c2183daef17484
23,080
py
Python
US_coronavirus_map.py
rashecl/COVID_Inisghts
c6be339512c4ffa9cf94cfc567f597e160c068b2
[ "MIT" ]
null
null
null
US_coronavirus_map.py
rashecl/COVID_Inisghts
c6be339512c4ffa9cf94cfc567f597e160c068b2
[ "MIT" ]
null
null
null
US_coronavirus_map.py
rashecl/COVID_Inisghts
c6be339512c4ffa9cf94cfc567f597e160c068b2
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('Agg') import numpy as np from bokeh.io import show from bokeh.layouts import column, row from bokeh.io import curdoc from bokeh.models import LogColorMapper, LinearColorMapper, ColorBar, ColumnDataSource, LogTicker, RadioGroup, Div from bokeh.models import WheelZoomTool, TapTool, Save...
45.254902
212
0.648397
9f8b56fece9d54ceb3ea65def091258f35bd59e0
1,823
py
Python
troika/http/exceptions.py
troika-framework/troika-http
f27547e7567891db6b40cbbc8b9b03267b5e6fac
[ "BSD-3-Clause" ]
null
null
null
troika/http/exceptions.py
troika-framework/troika-http
f27547e7567891db6b40cbbc8b9b03267b5e6fac
[ "BSD-3-Clause" ]
null
null
null
troika/http/exceptions.py
troika-framework/troika-http
f27547e7567891db6b40cbbc8b9b03267b5e6fac
[ "BSD-3-Clause" ]
null
null
null
"""Troika HTTP Exceptions""" import http class HTTPException(Exception): """Base exception for all Troika HTTP exceptions""" class Finish(HTTPException): """Raise to finish processing the HTTP Request""" class HTTPError(HTTPException): """HTTP Request Error Raise to finish the HTTP Request handli...
27.208955
74
0.632474
0261dfe6123e598e2e98e668c5e8b71d387879a7
5,096
py
Python
ucscentralsdk/mometa/compute/ComputeIOHubEnvStats.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/compute/ComputeIOHubEnvStats.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/compute/ComputeIOHubEnvStats.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for ComputeIOHubEnvStats ManagedObject.""" from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class ComputeIOHubEnvStatsConsts(): SUSPECT_FALSE = "false" ...
62.91358
273
0.664443
de1f69d9efc211cc958211ea0c31ce23e7eed08a
467
py
Python
src/radical/saga/adaptors/cpi/context.py
wjlei1990/radical.saga
de022ea4fb29d95e8acffff8a68aa8648de807d4
[ "MIT" ]
12
2019-04-13T21:41:45.000Z
2021-08-03T09:43:25.000Z
src/radical/saga/adaptors/cpi/context.py
wjlei1990/radical.saga
de022ea4fb29d95e8acffff8a68aa8648de807d4
[ "MIT" ]
103
2019-04-10T14:23:41.000Z
2022-03-15T19:43:56.000Z
src/radical/saga/adaptors/cpi/context.py
wjlei1990/radical.saga
de022ea4fb29d95e8acffff8a68aa8648de807d4
[ "MIT" ]
7
2019-07-11T07:59:56.000Z
2022-02-02T22:28:24.000Z
__author__ = "Andre Merzky" __copyright__ = "Copyright 2012-2013, The SAGA Project" __license__ = "MIT" from .base import CPIBase from .decorators import CPI_SYNC_CALL as SYNC from .decorators import CPI_ASYNC_CALL as ASYNC class Context (CPIBase) : @SYNC def init_instance (self, t...
17.961538
55
0.657388
279510d13f633f760fc90910723a1a3018f760e4
432
py
Python
tests/digital_tickler_test.py
geritwagner/digital-tickler
bdca1f1c243808cd3fb9d184beaacd51e45b8b22
[ "MIT" ]
null
null
null
tests/digital_tickler_test.py
geritwagner/digital-tickler
bdca1f1c243808cd3fb9d184beaacd51e45b8b22
[ "MIT" ]
null
null
null
tests/digital_tickler_test.py
geritwagner/digital-tickler
bdca1f1c243808cd3fb9d184beaacd51e45b8b22
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tests for `digital_tickler` package.""" import unittest from digital_tickler import digital_tickler # noqa class TestDigital_tickler(unittest.TestCase): """Tests for `digital_tickler` package.""" def setUp(self): """Set up test fixtures, if any.""" def tearDown(self): ...
22.736842
51
0.659722
101e71ae7c32afdaffc59a6504b6623021aca48c
29,240
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_ssh_public_keys_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2021-09-07T18:39:05.000Z
2021-09-07T18:39:05.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_ssh_public_keys_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_ssh_public_keys_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.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 may ...
41.125176
203
0.678112
a6188877d3b0404a75c2004ab93de24527e45b74
1,416
py
Python
liesym/groups/_sp.py
npapapietro/liesym
56bce3290e35d111b86413191516c41a09f0a07d
[ "MIT" ]
2
2021-09-09T22:25:25.000Z
2022-01-22T01:15:47.000Z
liesym/groups/_sp.py
npapapietro/liesym
56bce3290e35d111b86413191516c41a09f0a07d
[ "MIT" ]
1
2021-12-20T00:15:26.000Z
2021-12-20T01:54:07.000Z
liesym/groups/_sp.py
npapapietro/liesym
56bce3290e35d111b86413191516c41a09f0a07d
[ "MIT" ]
1
2021-09-09T22:25:31.000Z
2021-09-09T22:25:31.000Z
from __future__ import annotations from sympy import Matrix, zeros from ._base import LieGroup from ..algebras import C def _iachello_basis(dim): """Basis noted in Francesco Iachello's text. """ n = dim / 2 def E(i, j): mat = zeros(dim) mat[i, j] = 1 return mat for k in...
24.842105
88
0.561441
2df6ef7871683c6d0d16bf0f8c577513a499be43
11,617
py
Python
pyscf/lo/pipek.py
shufay/pyscf
c7ea840b012a59fce5fa4114ef3274a7cf00165e
[ "Apache-2.0" ]
1
2021-11-12T11:55:25.000Z
2021-11-12T11:55:25.000Z
pyscf/lo/pipek.py
shufay/pyscf
c7ea840b012a59fce5fa4114ef3274a7cf00165e
[ "Apache-2.0" ]
2
2020-01-29T20:21:02.000Z
2020-08-03T18:28:52.000Z
pyscf/lo/pipek.py
shufay/pyscf
c7ea840b012a59fce5fa4114ef3274a7cf00165e
[ "Apache-2.0" ]
1
2020-07-09T20:34:10.000Z
2020-07-09T20:34:10.000Z
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
39.784247
93
0.593441
680797bdc320d921661bac084262c4d7f7243a98
595
py
Python
ContactBook/core/database.py
TheDesTrucToRR/Hacktoberfest-2021
2757383c7432909dfbdbda61fb9ca9f6de495cfe
[ "MIT" ]
14
2021-10-01T16:53:27.000Z
2021-10-17T13:15:44.000Z
ContactBook/core/database.py
TheDesTrucToRR/Hacktoberfest-2021
2757383c7432909dfbdbda61fb9ca9f6de495cfe
[ "MIT" ]
37
2021-10-01T17:14:52.000Z
2021-10-21T17:26:14.000Z
ContactBook/core/database.py
TheDesTrucToRR/Hacktoberfest-2021
2757383c7432909dfbdbda61fb9ca9f6de495cfe
[ "MIT" ]
38
2021-10-01T16:59:16.000Z
2021-10-30T16:05:31.000Z
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from core.config import config DATABASE_URL = config.db_url engine = create_async_engine( DATABASE_URL, echo=config.debug ) Base = declarative_b...
22.884615
68
0.771429
7c9657579855c74aef3d80252786d64faa8ba108
1,146
py
Python
tor4/nn/modules/linear.py
kbrodt/tor4
d09740b746c534e67a72f492c7c03654f5888a46
[ "MIT" ]
null
null
null
tor4/nn/modules/linear.py
kbrodt/tor4
d09740b746c534e67a72f492c7c03654f5888a46
[ "MIT" ]
null
null
null
tor4/nn/modules/linear.py
kbrodt/tor4
d09740b746c534e67a72f492c7c03654f5888a46
[ "MIT" ]
null
null
null
import math import tor4 from ...tensor import Tensor from .. import functional as F from .. import init from ..parameter import Parameter from .module import Module class Linear(Module): def __init__(self, in_features: int, out_features: int, bias: bool = True) -> None: self.in_features = in_features ...
31.833333
112
0.659686
7a44aa5e5d3cdaa5f1f8d2442cc9541e03efc588
9,377
py
Python
reco_utils/recommender/lightfm/lightfm_utils.py
suhoy901/recommenders
8ec9f1950d694a5aeaa3d463ac23cad661a30a11
[ "MIT" ]
28
2021-11-12T08:26:40.000Z
2022-03-27T07:21:24.000Z
reco_utils/recommender/lightfm/lightfm_utils.py
xynm/recommenders
839e0444fcf9f1a085de88417c61f8f938b932c9
[ "MIT" ]
5
2021-11-10T02:58:32.000Z
2022-03-21T16:13:11.000Z
reco_utils/recommender/lightfm/lightfm_utils.py
xynm/recommenders
839e0444fcf9f1a085de88417c61f8f938b932c9
[ "MIT" ]
9
2021-11-03T07:14:47.000Z
2022-02-22T13:42:04.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import lightfm from lightfm.evaluation import precision_at_k, recall_at_k def model_perf_plots(df): """Function to plot model...
34.72963
120
0.65426
16565004e002e38ef4746e25368aeb015e499c7e
123
py
Python
controller/page/tools.py
supersheep/huixiang
7d209681ed6699ef7f28383b982f4e4a74c6eb37
[ "MIT" ]
4
2015-10-10T08:34:37.000Z
2021-11-07T20:26:07.000Z
controller/page/tools.py
supersheep/huixiang
7d209681ed6699ef7f28383b982f4e4a74c6eb37
[ "MIT" ]
null
null
null
controller/page/tools.py
supersheep/huixiang
7d209681ed6699ef7f28383b982f4e4a74c6eb37
[ "MIT" ]
null
null
null
from config.setting import render from base import base class tools(base): def GET(self): return render.tools()
24.6
33
0.715447
7b84c9b3d4421a1ff235ee7bf3332ef0a383103d
8,324
py
Python
ct_tests/lib/ims_test_api_helpers.py
Cray-HPE/ims
d684cb1cd04cad4ee2246049ae27d3291dd5f469
[ "MIT" ]
1
2022-01-26T21:18:52.000Z
2022-01-26T21:18:52.000Z
ct_tests/lib/ims_test_api_helpers.py
Cray-HPE/ims
d684cb1cd04cad4ee2246049ae27d3291dd5f469
[ "MIT" ]
2
2021-12-17T21:47:53.000Z
2022-02-28T15:55:34.000Z
ct_tests/lib/ims_test_api_helpers.py
Cray-HPE/ims
d684cb1cd04cad4ee2246049ae27d3291dd5f469
[ "MIT" ]
null
null
null
# # MIT License # # (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the...
38.716279
116
0.697381
54fb0c5222404ddf746e659676a586204705dc9b
587
py
Python
tasks/migrations/0005_alter_task_user.py
nrblt/ToDoAppWithAuth
8b1b3fb9b4717e78701de808eb3b063c86c84f7a
[ "MIT" ]
null
null
null
tasks/migrations/0005_alter_task_user.py
nrblt/ToDoAppWithAuth
8b1b3fb9b4717e78701de808eb3b063c86c84f7a
[ "MIT" ]
null
null
null
tasks/migrations/0005_alter_task_user.py
nrblt/ToDoAppWithAuth
8b1b3fb9b4717e78701de808eb3b063c86c84f7a
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-01-16 14:58 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('tasks', '0004_task_user'...
26.681818
133
0.67121
dbf3ad422db34702dac6459a7f0b54ab9cc445de
14,774
py
Python
sql/utils/tests.py
yetHandsome/Archery
784b6459478a9adad3dab657ab6a005964975be9
[ "Apache-2.0" ]
null
null
null
sql/utils/tests.py
yetHandsome/Archery
784b6459478a9adad3dab657ab6a005964975be9
[ "Apache-2.0" ]
null
null
null
sql/utils/tests.py
yetHandsome/Archery
784b6459478a9adad3dab657ab6a005964975be9
[ "Apache-2.0" ]
1
2021-05-11T02:10:42.000Z
2021-05-11T02:10:42.000Z
# -*- coding: UTF-8 -*- """ @author: hhyo @license: Apache Licence @file: tests.py @time: 2019/03/14 """ import datetime import json from unittest.mock import patch from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.test imp...
40.476712
140
0.629755
2fab08ad9860059835e11bb6f2f414622de5bd5b
850
py
Python
045_ssd_mobilenet_v2_oid_v4/01_float32/02_weight_quantization.py
IgiArdiyanto/PINTO_model_zoo
9247b56a7dff37f28a8a7822a7ef4dd9adf7234d
[ "MIT" ]
1,529
2019-12-11T13:36:23.000Z
2022-03-31T18:38:27.000Z
045_ssd_mobilenet_v2_oid_v4/01_float32/02_weight_quantization.py
IgiArdiyanto/PINTO_model_zoo
9247b56a7dff37f28a8a7822a7ef4dd9adf7234d
[ "MIT" ]
200
2020-01-06T09:24:42.000Z
2022-03-31T17:29:08.000Z
045_ssd_mobilenet_v2_oid_v4/01_float32/02_weight_quantization.py
IgiArdiyanto/PINTO_model_zoo
9247b56a7dff37f28a8a7822a7ef4dd9adf7234d
[ "MIT" ]
288
2020-02-21T14:56:02.000Z
2022-03-30T03:00:35.000Z
### tf-nightly==2.3.0-rc1 import tensorflow.compat.v1 as tf # Weight Quantization - Input/Output=float32 graph_def_file="export/tflite_graph.pb" input_arrays=["normalized_input_image_tensor"] output_arrays=['TFLite_Detection_PostProcess','TFLite_Detection_PostProcess:1','TFLite_Detection_PostProcess:2','TFLite_Detect...
53.125
145
0.838824
7445a31ba6906dd89af106a660544edf16b35063
3,211
py
Python
mmedit/models/common/linear_module.py
Jian137/mmediting-1
e1ac6c93441ec96696d0b530f040b91b809015b6
[ "Apache-2.0" ]
1,884
2020-07-09T18:53:43.000Z
2022-03-31T12:06:18.000Z
mmedit/models/common/linear_module.py
Jian137/mmediting-1
e1ac6c93441ec96696d0b530f040b91b809015b6
[ "Apache-2.0" ]
622
2020-07-09T18:52:27.000Z
2022-03-31T14:41:09.000Z
mmedit/models/common/linear_module.py
Jian137/mmediting-1
e1ac6c93441ec96696d0b530f040b91b809015b6
[ "Apache-2.0" ]
361
2020-07-09T19:21:47.000Z
2022-03-31T09:58:27.000Z
# Copyright (c) OpenMMLab. All rights reserved. import torch.nn as nn from mmcv.cnn import build_activation_layer, kaiming_init class LinearModule(nn.Module): """A linear block that contains linear/norm/activation layers. For low level vision, we add spectral norm and padding layer. Args: in_fea...
35.677778
78
0.591093
1ebcc698b6d7bda036f6e3afcccd2eafed411ce6
509
py
Python
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_NumberofErrors/IncidentsCheck_Widget_NumberofErrors_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_NumberofErrors/IncidentsCheck_Widget_NumberofErrors_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_NumberofErrors/IncidentsCheck_Widget_NumberofErrors_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import pytest import demistomock as demisto from IncidentsCheck_Widget_NumberofErrors import main @pytest.mark.parametrize('list_, expected', [ ([{'Contents': '4@7,5@7,44@3,45@3,46@3,47@3,85@48,86@48'}], 8), ([{'Contents': ''}], 0), ([{}], 0) ]) def test_script(mocker, list_, expected): mocker.patch.o...
26.789474
70
0.67387
861d977c7134d83756b34c8ee7dbdb0d27da6da1
2,763
py
Python
canvas_grab/config/organize_mode.py
Victrid/canvas_grab
cf03ec76e29ebe7a74b0ce99eadf920999c4e809
[ "MIT" ]
173
2020-03-01T11:58:04.000Z
2022-03-08T06:38:34.000Z
canvas_grab/config/organize_mode.py
ADSWT518/canvas_grab
a91c9fa867319f050e547c109c071c91ff7daa63
[ "MIT" ]
77
2020-03-03T04:25:24.000Z
2022-03-31T22:43:47.000Z
canvas_grab/config/organize_mode.py
ADSWT518/canvas_grab
a91c9fa867319f050e547c109c071c91ff7daa63
[ "MIT" ]
35
2020-03-03T05:19:05.000Z
2022-03-29T08:46:14.000Z
import questionary from ..configurable import Configurable, Interactable from ..utils import find_choice from ..snapshot import CanvasFileSnapshot, CanvasModuleSnapshot from ..error import CanvasGrabCliError class OrganizeMode(Configurable, Interactable): """OrganizeMode decides how data are stored on disk. ...
34.974684
86
0.601882
00d65368d3da628512e929b39f83f8830b21d744
581
py
Python
setup.py
pizzapanther/gae_boto
0de2d83cae8ccc951cecb6cbfd81aadb9a36dd41
[ "BSD-3-Clause" ]
1
2016-11-20T03:36:06.000Z
2016-11-20T03:36:06.000Z
setup.py
pizzapanther/gae_boto
0de2d83cae8ccc951cecb6cbfd81aadb9a36dd41
[ "BSD-3-Clause" ]
1
2017-03-20T03:32:37.000Z
2017-03-20T03:32:37.000Z
setup.py
pizzapanther/gae_boto
0de2d83cae8ccc951cecb6cbfd81aadb9a36dd41
[ "BSD-3-Clause" ]
null
null
null
import os from setuptools import setup, find_packages MY_DIR = os.path.normpath(os.path.dirname(__file__)) setup( name = "gae_boto", version = '13.10.1', description = "A recreation of Amazon Boto library that is is compatible with Google App Engine and easier to use.", url = "https://github.com/pizzapanther...
27.666667
118
0.693632
74aa7d5f3fcd9ad4e9e57b715ce16901b830cf1d
377
py
Python
app/admin/interview_scheduler.py
RandyDeng/InterviewScheduler
044d39873c4efb0d523772c42af62e8699336f63
[ "MIT" ]
null
null
null
app/admin/interview_scheduler.py
RandyDeng/InterviewScheduler
044d39873c4efb0d523772c42af62e8699336f63
[ "MIT" ]
null
null
null
app/admin/interview_scheduler.py
RandyDeng/InterviewScheduler
044d39873c4efb0d523772c42af62e8699336f63
[ "MIT" ]
null
null
null
from flask import session SESSION_METADATA = 'interview_scheduler_metadata' SESSION_SCHEDULE = 'interview_scheduler_schedule' def clean_metadata(): session.pop(SESSION_METADATA) def clean_schedule(): session.pop(SESSION_SCHEDULE) def clean_session(): clean_metadata() clean_schedule() def json_...
13.962963
49
0.753316
a15d7de586a5a1b933dd5abf377f00d87de30865
2,345
py
Python
skeletonutils.py
1fth3n3ls3/pylib
889298a2fe6faacfed838c89f1421880572523ff
[ "MIT" ]
1
2020-05-26T15:59:26.000Z
2020-05-26T15:59:26.000Z
skeletonutils.py
1fth3n3ls3/pylib
889298a2fe6faacfed838c89f1421880572523ff
[ "MIT" ]
null
null
null
skeletonutils.py
1fth3n3ls3/pylib
889298a2fe6faacfed838c89f1421880572523ff
[ "MIT" ]
null
null
null
import pymel.core as pmc import utils # Version 3 def safe_setparent(node, parent): """`node.setParent(parent)` if `parent` is not the same as `node`'s existing parent. """ if node.getParent() != parent: node.setParent(parent) GREEN = 14 BLUE = 6 YELLOW = 17 def _convert_to_j...
28.950617
92
0.558635
aaa49b9ffcf5ed538b68fa67761454249a68b818
3,681
py
Python
tests/test_wos.py
lawlesst/wos2vivo
e0258aa5ccb3acb0924a61bf225f2e6aa439876e
[ "MIT" ]
6
2018-04-06T00:06:27.000Z
2019-11-06T20:54:09.000Z
tests/test_wos.py
rpritchett/wos2vivo
e0258aa5ccb3acb0924a61bf225f2e6aa439876e
[ "MIT" ]
5
2018-02-23T15:27:29.000Z
2019-10-30T00:19:32.000Z
tests/test_wos.py
rpritchett/wos2vivo
e0258aa5ccb3acb0924a61bf225f2e6aa439876e
[ "MIT" ]
null
null
null
import base64 import os from unittest import TestCase import betamax from betamax_serializers import pretty_json betamax.Betamax.register_serializer(pretty_json.PrettyJSONSerializer) # Directory where test data is stored. TEST_PATH = os.path.join( os.path.dirname(os.path.realpath(__file__)) ) # setup recorder w...
34.083333
127
0.536811
0e64815944dbd7b89eb0ba47704f3593cb63f9cb
87,828
py
Python
Lib/datetime.py
mbeacom/cpython
65d98d0f53f558d7c799098da0abf376068c15fd
[ "CNRI-Python-GPL-Compatible" ]
854
2017-09-11T16:42:28.000Z
2022-03-27T14:17:09.000Z
Lib/datetime.py
mbeacom/cpython
65d98d0f53f558d7c799098da0abf376068c15fd
[ "CNRI-Python-GPL-Compatible" ]
164
2017-09-24T20:40:32.000Z
2021-10-30T01:35:05.000Z
Lib/datetime.py
mbeacom/cpython
65d98d0f53f558d7c799098da0abf376068c15fd
[ "CNRI-Python-GPL-Compatible" ]
73
2017-09-13T18:07:48.000Z
2022-03-17T13:02:29.000Z
"""Concrete date/time and related types. See http://www.iana.org/time-zones/repository/tz-link.html for time zone and DST data sources. """ import time as _time import math as _math import sys def _cmp(x, y): return 0 if x == y else 1 if x > y else -1 MINYEAR = 1 MAXYEAR = 9999 _MAXORDINAL = 3652059 # date.max...
34.90779
94
0.564194
55bd50eb0b265e12741be5b117aa2da111e7ab5e
3,708
py
Python
train_USCL/loss/nt_xent.py
mrzhu666/USCL
8a4741046ef8f337b1e9439d1575db670a11355c
[ "MIT" ]
22
2020-11-24T07:40:28.000Z
2022-03-29T11:33:44.000Z
train_USCL/loss/nt_xent.py
mrzhu666/USCL
8a4741046ef8f337b1e9439d1575db670a11355c
[ "MIT" ]
2
2022-01-02T11:10:36.000Z
2022-02-25T02:09:26.000Z
train_USCL/loss/nt_xent.py
mrzhu666/USCL
8a4741046ef8f337b1e9439d1575db670a11355c
[ "MIT" ]
5
2020-11-25T15:19:30.000Z
2022-01-01T16:14:59.000Z
import torch import numpy as np class NTXentLoss(torch.nn.Module): def __init__(self, device, batch_size, temperature, use_cosine_similarity): super(NTXentLoss, self).__init__() self.batch_size = batch_size self.temperature = temperature self.device = device self.softmax =...
42.136364
130
0.661003
10062c1d96db14031cb7f80ab6ed20945ee0e6bc
421
py
Python
script/module_load.py
ScarletAI/Arch-Apple-Installer
1614f27ac06dc28022d0d2fec40f5b896e4410e8
[ "MIT" ]
4
2021-12-20T16:26:23.000Z
2021-12-21T10:21:20.000Z
script/module_load.py
ScarletAI/Arch-Apple-Installer
1614f27ac06dc28022d0d2fec40f5b896e4410e8
[ "MIT" ]
1
2022-01-02T02:03:16.000Z
2022-01-02T02:03:16.000Z
script/module_load.py
ScarletAI/Arch-Apple-Installer
1614f27ac06dc28022d0d2fec40f5b896e4410e8
[ "MIT" ]
null
null
null
import sys, struct, usb.core data = open(sys.argv[1], 'rb').read() dev = usb.core.find(idVendor=0x05ac, idProduct=0x4141) if dev is None: raise ValueError("Device not found") dev.set_configuration() dev.ctrl_transfer(0x21, 2, 0, 0, 0) dev.ctrl_transfer(0x21, 1, 0, 0, struct.pack("I", len(data))) dev.write(2, data,...
32.384615
61
0.67696
a36cdcc1e153c67f5992b234da1c22e63a270d2f
3,593
py
Python
cmd/lit-qt/rpcui.py
tnakagawa/lit
57c63ed5cc9584bff083047c8fc0b5be1c4fde2f
[ "MIT" ]
560
2016-11-16T02:10:02.000Z
2022-03-26T16:28:58.000Z
cmd/lit-qt/rpcui.py
tnakagawa/lit
57c63ed5cc9584bff083047c8fc0b5be1c4fde2f
[ "MIT" ]
374
2016-11-29T21:42:49.000Z
2021-02-16T13:30:44.000Z
cmd/lit-qt/rpcui.py
metalicjames/lit
8cbd0bc0cf689fca6a0dfcf13e4e0ed2672b8c15
[ "MIT" ]
126
2016-12-15T21:26:19.000Z
2022-02-22T21:23:03.000Z
#!/usr/bin/env python from PyQt4 import QtCore, QtGui #Extend the library search path to our `qt_files` directory import sys sys.path.append("qt_files") import socket import json #ui file import import rpcui_ui #Handles rpc communications and conjugate response handler functions class rpcCom(): def __init__(...
26.419118
88
0.628166
824514830fc36cfd8b49f70b6163d4c00d92c9ad
50,164
py
Python
hyper_resource/resources/FeatureCollectionResource.py
IDEHCO3/kanban-backend
902732f0fd569627925356d6b9d68a5ec7680b88
[ "MIT" ]
null
null
null
hyper_resource/resources/FeatureCollectionResource.py
IDEHCO3/kanban-backend
902732f0fd569627925356d6b9d68a5ec7680b88
[ "MIT" ]
null
null
null
hyper_resource/resources/FeatureCollectionResource.py
IDEHCO3/kanban-backend
902732f0fd569627925356d6b9d68a5ec7680b88
[ "MIT" ]
null
null
null
import json from operator import itemgetter import requests from django.core import cache from django.contrib.gis.db.models import Extent, Union, MakeLine from django.contrib.gis.geos import GeometryCollection, GEOSGeometry from rest_framework.response import Response from hyper_resource.resources.AbstractResource...
60.51146
191
0.757396
c4c35d4a65748711b557793c10a11059ae57b4d8
2,401
py
Python
alipay/aop/api/domain/AlipayFundTransCommonQueryModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
1
2022-03-07T06:11:10.000Z
2022-03-07T06:11:10.000Z
alipay/aop/api/domain/AlipayFundTransCommonQueryModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayFundTransCommonQueryModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
1
2021-10-05T03:01:09.000Z
2021-10-05T03:01:09.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayFundTransCommonQueryModel(object): def __init__(self): self._biz_scene = None self._order_id = None self._out_biz_no = None self._product_code = None @p...
27.918605
75
0.589338
75ed0e666fe64c1a95867afc54edfeda70f37860
30,324
py
Python
src/practice_problem3.py
craannj/13-Exam2Practice
1717a3db485efb0adfecf46f0f154b18fe0e2f75
[ "MIT" ]
null
null
null
src/practice_problem3.py
craannj/13-Exam2Practice
1717a3db485efb0adfecf46f0f154b18fe0e2f75
[ "MIT" ]
null
null
null
src/practice_problem3.py
craannj/13-Exam2Practice
1717a3db485efb0adfecf46f0f154b18fe0e2f75
[ "MIT" ]
null
null
null
""" PRACTICE Exam 2, practice_problem 3. Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues, and Nathaniel Craan. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. ###############################################################...
37.810474
79
0.574627
4680eafea5288fee85a15e2d61446c6cb75b5dee
328
py
Python
neo/io/spikeglxio.py
Mario-Kart-Felix/python-neo
951c97cf9eb56f5489da88940de920329e0f4c1b
[ "BSD-3-Clause" ]
199
2015-01-20T13:49:13.000Z
2022-03-21T18:35:29.000Z
neo/io/spikeglxio.py
Mario-Kart-Felix/python-neo
951c97cf9eb56f5489da88940de920329e0f4c1b
[ "BSD-3-Clause" ]
905
2015-01-07T09:21:15.000Z
2022-03-31T16:29:44.000Z
neo/io/spikeglxio.py
Mario-Kart-Felix/python-neo
951c97cf9eb56f5489da88940de920329e0f4c1b
[ "BSD-3-Clause" ]
178
2015-01-05T12:34:39.000Z
2022-02-20T23:06:52.000Z
from neo.io.basefromrawio import BaseFromRaw from neo.rawio.spikeglxrawio import SpikeGLXRawIO class SpikeGLXIO(SpikeGLXRawIO, BaseFromRaw): __doc__ = SpikeGLXRawIO.__doc__ mode = 'dir' def __init__(self, dirname): SpikeGLXRawIO.__init__(self, dirname=dirname) BaseFromRaw.__init__(self, d...
27.333333
53
0.753049
760944f9c4c5f3f888722bcdd52cf188b30d29c9
6,365
py
Python
tests/unit/extractors/title/url_title_extractor_pt.py
victormartinez/ferret
2cadfa47d0842656c7c56136c004cf9ba488df9f
[ "Apache-2.0" ]
11
2017-03-26T15:36:50.000Z
2020-03-05T01:42:07.000Z
tests/unit/extractors/title/url_title_extractor_pt.py
victormartinez/ferret
2cadfa47d0842656c7c56136c004cf9ba488df9f
[ "Apache-2.0" ]
null
null
null
tests/unit/extractors/title/url_title_extractor_pt.py
victormartinez/ferret
2cadfa47d0842656c7c56136c004cf9ba488df9f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from ferret.extractors.title_extractor import UrlTitleExtractor def _get_url_title_extractor(url, html): return UrlTitleExtractor(url, html) def _get_contents_of_file(path): with open(path, 'r') as content_file: return content_file.read() @pytest.mark.parametr...
148.023256
431
0.79183
400287125754d9e7d5c535b97d4dfc755711da2a
3,776
py
Python
contrib/macdeploy/custom_dsstore.py
HostXcoin/HSX
ce7dc6e88d70b615126d67d222a0c673ed9e581d
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
HostXcoin/HSX
ce7dc6e88d70b615126d67d222a0c673ed9e581d
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
HostXcoin/HSX
ce7dc6e88d70b615126d67d222a0c673ed9e581d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
61.901639
1,817
0.727489
53b9fac96ef86119fa06eb910b71330d5ce62c7f
709
py
Python
Collaboration/__init__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
4
2019-03-11T18:05:49.000Z
2021-05-22T21:09:09.000Z
Collaboration/__init__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
Collaboration/__init__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2019-03-18T18:53:36.000Z
2019-03-18T18:53:36.000Z
''' Python mapping for the Collaboration framework. This module does not contain docstrings for the wrapped code, check Apple's documentation for details on how to use these functions and classes. ''' import sys import objc import Foundation from Collaboration import _metadata sys.modules['Collaboration'] = objc.Ob...
27.269231
80
0.724965
3879721df5d958f5d19eb9e5dd65e9fa56c2504b
2,359
py
Python
mamba/component/gui/qt/open_project_qt/__init__.py
ismaelJimenez/mamba_server
e6e2343291a0df24f226bde0d13e5bfa74cc3650
[ "MIT" ]
null
null
null
mamba/component/gui/qt/open_project_qt/__init__.py
ismaelJimenez/mamba_server
e6e2343291a0df24f226bde0d13e5bfa74cc3650
[ "MIT" ]
null
null
null
mamba/component/gui/qt/open_project_qt/__init__.py
ismaelJimenez/mamba_server
e6e2343291a0df24f226bde0d13e5bfa74cc3650
[ "MIT" ]
null
null
null
############################################################################ # # Copyright (c) Mamba Developers. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ############################################################################ """ Open P...
34.188406
78
0.593048
595501118a7fc1f5c68ced5cf388344db4fdb8ad
8,943
py
Python
setup_wizard.py
hunterunger/emailAutoBlock
d058ebc4170ac727571f5d59607ed6ec5ba0d8a3
[ "MIT" ]
null
null
null
setup_wizard.py
hunterunger/emailAutoBlock
d058ebc4170ac727571f5d59607ed6ec5ba0d8a3
[ "MIT" ]
null
null
null
setup_wizard.py
hunterunger/emailAutoBlock
d058ebc4170ac727571f5d59607ed6ec5ba0d8a3
[ "MIT" ]
null
null
null
import getpass import os from widgets import Style, clear_console, wait_indicator, config class SetupWizard: def __init__(self): clear_console() self.smtp_port = '' self.username = '' self.password = '' self.imap_address = '' self.smtp_address = '' ...
43.202899
120
0.518059
eb6049b1929eda2618dd25a4be6ac4f47adda1cc
2,219
py
Python
y-stream/y-stream-trackers.py
sfowl/elliott
31df959bc286bbe55e1d97a18747d904ea8fb150
[ "Apache-2.0" ]
null
null
null
y-stream/y-stream-trackers.py
sfowl/elliott
31df959bc286bbe55e1d97a18747d904ea8fb150
[ "Apache-2.0" ]
null
null
null
y-stream/y-stream-trackers.py
sfowl/elliott
31df959bc286bbe55e1d97a18747d904ea8fb150
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from __future__ import print_function import bugzilla import os import sys api_key=None try: api_key = open(os.path.expanduser('~/.bugzilla_apikey')).read().strip() except FileNotFoundError: # api key in ~/.config/python-bugzilla/bugzillarc will be used pass bz = bugzilla.RHBugzi...
31.7
112
0.681839
059f8543104a70d9cb90e0be23aca41dae929463
15,787
py
Python
pandas/tests/indexing/multiindex/test_setitem.py
trevransom/pandas
a6311fb7197e20c5cad703d32e350787ac3430b2
[ "BSD-3-Clause" ]
1
2020-10-30T15:34:46.000Z
2020-10-30T15:34:46.000Z
pandas/tests/indexing/multiindex/test_setitem.py
trevransom/pandas
a6311fb7197e20c5cad703d32e350787ac3430b2
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/indexing/multiindex/test_setitem.py
trevransom/pandas
a6311fb7197e20c5cad703d32e350787ac3430b2
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pytest import pandas as pd from pandas import DataFrame, MultiIndex, Series, Timestamp, date_range, isna, notna import pandas._testing as tm import pandas.core.common as com class TestMultiIndexSetItem: def test_setitem_multiindex(self): for index_fn in ("loc",): de...
33.950538
114
0.519161
bea4e9f0c5fa87dc6bf79ca729287ec6d3fffe64
1,493
py
Python
Colloquiums/2020-2021/Colloquium_3/Exercise_3_tests.py
Szymon-Budziak/ASD_exercises_solutions
36ccbdae03a6c7e4ad141a2b7b01bef9353574ee
[ "MIT" ]
7
2021-12-28T23:38:42.000Z
2022-03-29T16:36:16.000Z
Colloquiums/2020-2021/Colloquium_3/Exercise_3_tests.py
Szymon-Budziak/ASD_exercises_solutions
36ccbdae03a6c7e4ad141a2b7b01bef9353574ee
[ "MIT" ]
null
null
null
Colloquiums/2020-2021/Colloquium_3/Exercise_3_tests.py
Szymon-Budziak/ASD_exercises_solutions
36ccbdae03a6c7e4ad141a2b7b01bef9353574ee
[ "MIT" ]
4
2021-06-29T20:21:52.000Z
2022-03-12T10:04:17.000Z
# ------------------------------------ G1 = [ [0, 1, 1, 0, 1], [1, 0, 0, 1, 0], [1, 0, 0, 0, 1], [0, 1, 0, 0, 1], [1, 0, 1, 1, 0], ] K1 = ['B', 'B', 'G', 'G', 'B'] D1 = 2 R1 = 2 T1 = [G1, K1, D1, R1] # ------------------------------------ G2 = [ [0, 1, 1, 1], [1, 0, 1, 1], [1, 1, 0, 1], ...
20.175676
69
0.261889
b149e23b2c523dbb0034c7fcb5a096e9a89ac545
1,951
py
Python
test/test_ezsignsignature_response_compound.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
test/test_ezsignsignature_response_compound.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
test/test_ezsignsignature_response_compound.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
""" eZmax API Definition (Full) This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501 The version of the OpenAPI document: 1.1.7 Contact: support-api@ezmax.ca Generated by: https://openapi-generator.tech """ import sys import unittest import eZmaxApi from...
39.816327
112
0.822142
308642c3ca3a6eb7f015f2a9e8edd349f3858413
1,151
py
Python
datajob/__init__.py
LorenzoCevolani/datajob
dbb0775c63df2cabcbff77b0df2015eac429a126
[ "Apache-2.0" ]
90
2021-01-04T20:08:20.000Z
2022-03-14T11:20:24.000Z
datajob/__init__.py
LorenzoCevolani/datajob
dbb0775c63df2cabcbff77b0df2015eac429a126
[ "Apache-2.0" ]
93
2020-12-12T22:10:33.000Z
2021-11-21T16:12:24.000Z
datajob/__init__.py
LorenzoCevolani/datajob
dbb0775c63df2cabcbff77b0df2015eac429a126
[ "Apache-2.0" ]
13
2020-12-12T22:11:01.000Z
2021-09-22T14:37:09.000Z
import logging import os import pathlib import shlex import subprocess from pathlib import Path from rich.console import Console ROOT_DIR = pathlib.Path(__file__).parent.absolute() DEFAULT_STACK_STAGE = "dev" # if someone tried to log something before basicConfig is called, Python creates a default handler that # goe...
31.108108
103
0.755864
4821c49de4801307b168bb63e9957499a7ca167b
21,691
py
Python
src/dataset/trans/jaad_trans.py
DongxuGuo1997/TransNet
a720c0b1ac18db19796409b51e1cab96b744a4f0
[ "MIT" ]
6
2021-01-12T08:41:01.000Z
2021-05-01T16:26:29.000Z
src/dataset/trans/jaad_trans.py
DongxuGuo1997/VITA_stop_go
a720c0b1ac18db19796409b51e1cab96b744a4f0
[ "MIT" ]
null
null
null
src/dataset/trans/jaad_trans.py
DongxuGuo1997/VITA_stop_go
a720c0b1ac18db19796409b51e1cab96b744a4f0
[ "MIT" ]
null
null
null
import os import numpy as np import pickle import copy # -------------------------------------------------------------------- def get_split_vids(split_vids_path, image_set, subset='default') -> list: """ Returns a list of video ids for a given data split :param: split_vids_path: path of JAAD spli...
46.151064
119
0.533447
5a92951a5bf91063b94691a38c939cef4b7b0c16
1,830
py
Python
km_api/functional_tests/know_me/journal/serialization_helpers.py
knowmetools/km-api
e4b72484c42e88a6c0087c9b1d5fef240e66cbb0
[ "Apache-2.0" ]
4
2017-08-03T00:46:31.000Z
2018-11-06T03:32:32.000Z
km_api/functional_tests/know_me/journal/serialization_helpers.py
knowmetools/km-api
e4b72484c42e88a6c0087c9b1d5fef240e66cbb0
[ "Apache-2.0" ]
526
2017-06-27T18:13:59.000Z
2021-06-10T18:00:21.000Z
km_api/functional_tests/know_me/journal/serialization_helpers.py
knowmetools/km-api
e4b72484c42e88a6c0087c9b1d5fef240e66cbb0
[ "Apache-2.0" ]
1
2017-07-10T19:46:27.000Z
2017-07-10T19:46:27.000Z
from functional_tests.serialization_helpers import ( user_info, build_full_file_url, ) from test_utils import serialized_time def serialize_comment(comment, build_full_url, is_list=False): """ Serialize a comment on a journal entry. """ def serialize(value): return { "id":...
30
76
0.608197
bfd9a1e280908acc6eb074e8c9f3e14466f5b4ec
3,807
py
Python
allennlp/training/metrics/auc.py
prateekkolhar/allennlp
b0aab6689e04271c8478cb662fd64384b1ab0298
[ "Apache-2.0" ]
null
null
null
allennlp/training/metrics/auc.py
prateekkolhar/allennlp
b0aab6689e04271c8478cb662fd64384b1ab0298
[ "Apache-2.0" ]
null
null
null
allennlp/training/metrics/auc.py
prateekkolhar/allennlp
b0aab6689e04271c8478cb662fd64384b1ab0298
[ "Apache-2.0" ]
null
null
null
from typing import Optional from overrides import overrides import torch from sklearn import metrics from allennlp.common.checks import ConfigurationError from allennlp.training.metrics.metric import Metric @Metric.register("auc") class Auc(Metric): """ The AUC Metric measures the area under the receiver-op...
44.788235
112
0.603625
25b10133191788cd85085fd4612ae7cea0f122f3
14,125
py
Python
python/paddle/distributed/fleet/launch.py
TochkaAI/Paddle
481ee79fc92304f33165f7ed0679f16c36862cea
[ "Apache-2.0" ]
3
2021-06-08T14:24:36.000Z
2021-06-08T14:24:38.000Z
python/paddle/distributed/fleet/launch.py
chenyanlei1/Paddle
f249a5f05f0f5832279244d88c8cb4eaaad1fbd4
[ "Apache-2.0" ]
null
null
null
python/paddle/distributed/fleet/launch.py
chenyanlei1/Paddle
f249a5f05f0f5832279244d88c8cb4eaaad1fbd4
[ "Apache-2.0" ]
1
2021-08-04T14:28:58.000Z
2021-08-04T14:28:58.000Z
# Copyright (c) 2019 PaddlePaddle 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 appli...
37.367725
139
0.650478
6732283fc99c5437c07d5401b7fc0e82b5da0db5
23,222
py
Python
tamil/utf8.py
subramani95/open-tamil
eadb7192b685a5cdd6b1c86e7157b92a94a52e4d
[ "MIT" ]
null
null
null
tamil/utf8.py
subramani95/open-tamil
eadb7192b685a5cdd6b1c86e7157b92a94a52e4d
[ "MIT" ]
null
null
null
tamil/utf8.py
subramani95/open-tamil
eadb7192b685a5cdd6b1c86e7157b92a94a52e4d
[ "MIT" ]
null
null
null
## This Python file uses the following encoding: utf-8 ## ## (C) 2007, 2008, 2013, 2015, 2016 Muthiah Annamalai <ezhillang@gmail.com> ## (C) 2013 msathia <msathia@gmail.com> ## ## This file is dual licensed - originally GPL v3 from Ezhil, and ## then as part of open-tamil package in MIT license. ## ## Licensed under GP...
36.512579
118
0.538886
2e81c947dda8b8c2edf4d7a0c57d8dd2e4515a63
253
py
Python
app/api/api_v1/api.py
OPEN-NEXT/import-export
db3e720f29cdc30846667f7cd6ba3cc653146fc4
[ "MIT" ]
null
null
null
app/api/api_v1/api.py
OPEN-NEXT/import-export
db3e720f29cdc30846667f7cd6ba3cc653146fc4
[ "MIT" ]
25
2021-03-09T15:27:44.000Z
2021-06-09T10:09:43.000Z
app/api/api_v1/api.py
wikifactory/import-export
f7775d52d23b06a47cdaad13ae48e7727bb850fd
[ "MIT" ]
null
null
null
from fastapi import APIRouter from app.api.api_v1.endpoints import job, service api_router = APIRouter() api_router.include_router(job.router, prefix="/job", tags=["job"]) api_router.include_router(service.router, prefix="/service", tags=["service"])
31.625
78
0.774704
93d3fa678ebfc36d25fb4da9d874fd5796c38e63
323,971
py
Python
inspire_magpie/labels.py
jstypka/inspire-magpie
7294b9f5347197f59bf7b3f9d164f2ff35a52cef
[ "MIT" ]
1
2017-11-17T17:30:36.000Z
2017-11-17T17:30:36.000Z
inspire_magpie/labels.py
jstypka/inspire-magpie
7294b9f5347197f59bf7b3f9d164f2ff35a52cef
[ "MIT" ]
6
2016-05-03T09:25:19.000Z
2019-03-22T00:45:43.000Z
inspire_magpie/labels.py
jstypka/inspire-magpie
7294b9f5347197f59bf7b3f9d164f2ff35a52cef
[ "MIT" ]
2
2016-04-13T13:53:36.000Z
2016-04-28T14:51:42.000Z
# -*- coding: utf-8 -*- # # This file is part of Inspire-Magpie. # Copyright (c) 2016 CERN # # Inspire-Magpie is a free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for # more details. """Labels. .. codeauthor:: Jan Stypka <jan.stypka@cern.ch> .. codeauthor...
27.739618
77
0.630072
bcfcf5fed290e0b8a57424c35bbc94da80ab0d00
4,514
py
Python
WeBlog/config.py
imrocky1976/web
3af7fbd82af8b4d2737672779d5742825b94a6fe
[ "MIT" ]
null
null
null
WeBlog/config.py
imrocky1976/web
3af7fbd82af8b4d2737672779d5742825b94a6fe
[ "MIT" ]
4
2020-03-24T17:13:37.000Z
2022-03-08T21:09:48.000Z
WeBlog/config.py
imrocky1976/web
3af7fbd82af8b4d2737672779d5742825b94a6fe
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: # python -c 'import os; print(os.urandom(16))' SECRET_KEY = os.environ.get('SECRET_KEY') or b'\xd4Y\x0bJ\x9e\x9fx+\x9bh\xba\x9a=\xee,\x08' MAIL_SERVER = os.environ.get('MAIL_SERVER', 'smtp.126.com') MAI...
35.265625
129
0.650421
34ac813e359d4f54d196f6b16a7e29929b0e4687
3,162
py
Python
grr/tools/export_plugins/collection_plugin_test.py
mikecb/grr
52fdd977729af2a09a147301c55b8b7f1eccfa67
[ "Apache-2.0" ]
2
2019-06-02T13:11:16.000Z
2019-06-25T13:30:46.000Z
grr/tools/export_plugins/collection_plugin_test.py
mikecb/grr
52fdd977729af2a09a147301c55b8b7f1eccfa67
[ "Apache-2.0" ]
null
null
null
grr/tools/export_plugins/collection_plugin_test.py
mikecb/grr
52fdd977729af2a09a147301c55b8b7f1eccfa67
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Tests for the collection export tool plugin.""" import argparse import mock from grr.lib import access_control from grr.lib import config_lib from grr.lib import data_store from grr.lib import email_alerts from grr.lib import flags from grr.lib import rdfvalue from grr.lib import test_lib f...
32.265306
79
0.692916
ca8899da5adb151d5164f78c77126014d6a2a524
1,477
py
Python
operant/base.py
williamhogman/operant
69fd07b5e4300ed27458b133acec5df186246172
[ "BSD-2-Clause" ]
1
2015-01-24T10:54:47.000Z
2015-01-24T10:54:47.000Z
operant/base.py
williamhogman/operant
69fd07b5e4300ed27458b133acec5df186246172
[ "BSD-2-Clause" ]
null
null
null
operant/base.py
williamhogman/operant
69fd07b5e4300ed27458b133acec5df186246172
[ "BSD-2-Clause" ]
null
null
null
""" Bases shared by the different gamification components""" from six import string_types class Registry(object): """Class providing a collection of named objects. Components use which components use to register objects to indentifiers and provide smart regisration functions""" def __init__(se...
32.108696
71
0.608666
160d793e374b8491921c490b78cbe3656f28f1f5
3,881
py
Python
ThreeBotPackages/threebot/mail/actors/mail.py
Pishoy/jumpscaleX_threebot
781e839857fecfa601a31d98d86d304e3a6b3b4e
[ "Apache-2.0" ]
null
null
null
ThreeBotPackages/threebot/mail/actors/mail.py
Pishoy/jumpscaleX_threebot
781e839857fecfa601a31d98d86d304e3a6b3b4e
[ "Apache-2.0" ]
null
null
null
ThreeBotPackages/threebot/mail/actors/mail.py
Pishoy/jumpscaleX_threebot
781e839857fecfa601a31d98d86d304e3a6b3b4e
[ "Apache-2.0" ]
1
2019-10-28T08:16:11.000Z
2019-10-28T08:16:11.000Z
from Jumpscale import j import binascii from io import BytesIO import json import os from JumpscaleLibs.servers.mail.smtp import app from JumpscaleLibs.servers.mail.imap.bcdbmailbox import BCDBMailboxdir class mail(j.baseclasses.threebot_actor): def _init(self, **kwargs): models = j.servers.imap.get_mode...
25.03871
89
0.536975
5b409b12bfbe543323196bdd201be74daf8bc0da
2,560
py
Python
src/gamesbyexample/rockpaperscissors.py
spp2/PythonStdioGames
7edc6a07ef816a44579800e773f30217541971fa
[ "MIT" ]
null
null
null
src/gamesbyexample/rockpaperscissors.py
spp2/PythonStdioGames
7edc6a07ef816a44579800e773f30217541971fa
[ "MIT" ]
null
null
null
src/gamesbyexample/rockpaperscissors.py
spp2/PythonStdioGames
7edc6a07ef816a44579800e773f30217541971fa
[ "MIT" ]
null
null
null
"""Rock, Paper, Scissors, by Al Sweigart al@inventwithpython.com The classic hand game of luck. This and other games are available at https://nostarch.com/XX Tags: short, game""" __version__ = 0 import random, time, sys print('''Rock, Paper, Scissors, by Al Sweigart al@inventwithpython.com - Rock beats scissors. - Pap...
30.117647
71
0.58125
74d28a79a462e9eaa7eac1ce3fdd58f8efb653e6
382
py
Python
clientmanagement/utilities.py
isstek/clientmanagement
26bd6bbd974f24211dd0ae4b1c75ee8e4b150767
[ "MIT" ]
null
null
null
clientmanagement/utilities.py
isstek/clientmanagement
26bd6bbd974f24211dd0ae4b1c75ee8e4b150767
[ "MIT" ]
11
2019-05-02T20:10:16.000Z
2022-02-10T07:10:25.000Z
clientmanagement/utilities.py
isstek/clientmanagement
26bd6bbd974f24211dd0ae4b1c75ee8e4b150767
[ "MIT" ]
2
2020-11-04T03:05:23.000Z
2020-11-05T08:14:14.000Z
def humanize_bytes(bytes, precision=1): abbrevs = ( (1<<50, 'PB'), (1<<40, 'TB'), (1<<30, 'GB'), (1<<20, 'MB'), (1<<10, 'kB'), (1, 'bytes') ) if bytes == 1: return '1 byte' for factor, suffix in abbrevs: if bytes >= factor: br...
22.470588
58
0.431937
e1dd65d679c6a83fd8851d877406a0b20ec6f6fe
13,049
py
Python
src/models/regression.py
oxanozaep/Restaurant_visitors_forecasting
987dfa3c79da060e19bea6a79d991179c15e7d74
[ "MIT" ]
null
null
null
src/models/regression.py
oxanozaep/Restaurant_visitors_forecasting
987dfa3c79da060e19bea6a79d991179c15e7d74
[ "MIT" ]
null
null
null
src/models/regression.py
oxanozaep/Restaurant_visitors_forecasting
987dfa3c79da060e19bea6a79d991179c15e7d74
[ "MIT" ]
null
null
null
import warnings warnings.filterwarnings('ignore') import pandas as pd import numpy as np import pickle import statsmodels.formula.api as smf import statsmodels.api as sm from statsmodels.tsa.seasonal import seasonal_decompose import seaborn as sns import pandas_profiling import datetime import sqlite3 import calendar ...
49.61597
420
0.699211
d78001c976f4b4829889bc787ebffcb1acebf123
130
py
Python
src/misc-experiments/ws-client.py
danja/chatterbox
59ebf9d65bac38854a6162bc0f6f4b9f6d43d330
[ "MIT" ]
2
2021-02-19T22:30:59.000Z
2021-03-19T19:07:36.000Z
src/misc-experiments/ws-client.py
danja/chatterbox
59ebf9d65bac38854a6162bc0f6f4b9f6d43d330
[ "MIT" ]
null
null
null
src/misc-experiments/ws-client.py
danja/chatterbox
59ebf9d65bac38854a6162bc0f6f4b9f6d43d330
[ "MIT" ]
null
null
null
import websocket ws = websocket.WebSocket() ws.connect("ws://192.168.0.142/ws") result = ws.recv() print(result) ws.close()
13
35
0.676923
1725f57eb54ba3369b0c4300defff19feee2406f
7,589
py
Python
model.py
jfrancis71/pixel-cnn-pp
150ab5dfeead19a598a49e8ecf427e519e433a68
[ "MIT" ]
null
null
null
model.py
jfrancis71/pixel-cnn-pp
150ab5dfeead19a598a49e8ecf427e519e433a68
[ "MIT" ]
null
null
null
model.py
jfrancis71/pixel-cnn-pp
150ab5dfeead19a598a49e8ecf427e519e433a68
[ "MIT" ]
null
null
null
import pdb import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from .layers import * from .utils import * import numpy as np class PixelCNNLayer_up(nn.Module): def __init__(self, nr_resnet, nr_filters, resnet_nonlinearity, nr_conditional=None): super(Pi...
44.380117
158
0.572671
1855c13c502f9f21832f1aef6b41ac62b04b3cac
1,620
py
Python
netta/get_image.py
zhangdafu12/web
64ce7db4697167215bf9ee25cd5bdc0bd15b5831
[ "MIT" ]
null
null
null
netta/get_image.py
zhangdafu12/web
64ce7db4697167215bf9ee25cd5bdc0bd15b5831
[ "MIT" ]
1
2020-03-30T09:26:59.000Z
2020-03-30T09:26:59.000Z
netta/get_image.py
zhangdafu12/web
64ce7db4697167215bf9ee25cd5bdc0bd15b5831
[ "MIT" ]
null
null
null
import re import time from selenium import webdriver from selenium.webdriver.common.keys import Keys def func(name): result = [] browser = webdriver.Chrome() browser.get('https://image.baidu.com') time.sleep(1) input = browser.find_element_by_id('kw') input.send_keys(name) input.send_keys(...
28.421053
98
0.6
29c2f3fa1ec5835d826b9dfc247f071f0b97305d
1,754
py
Python
src/exifread/utils.py
vincentchevrier/sortphotos_vc
edfb4c88a442a3215171c8bb67fa3b1ce056f3e7
[ "MIT" ]
1
2016-05-02T21:24:00.000Z
2016-05-02T21:24:00.000Z
OSX/exifread/utils.py
stuporglue/ImportMedia
7388798b2c7ff6c0c87aa6a9971ec05f523ff359
[ "BSD-3-Clause" ]
null
null
null
OSX/exifread/utils.py
stuporglue/ImportMedia
7388798b2c7ff6c0c87aa6a9971ec05f523ff359
[ "BSD-3-Clause" ]
1
2021-05-15T21:08:50.000Z
2021-05-15T21:08:50.000Z
""" Misc utilities. """ def make_string(seq): """ Don't throw an exception when given an out of range character. """ string = '' for c in seq: # Screen out non-printing characters if 32 <= c and c < 256: string += chr(c) # If no printing chars if not string: ...
22.779221
81
0.551311
d95b7617d5ee98872c36ec9b7b461044974cddff
933
py
Python
orders/utils.py
JaveBychkov/dmitriy-shop
71856b0c9dff375e5491b001790807b3c7b01ae8
[ "MIT" ]
null
null
null
orders/utils.py
JaveBychkov/dmitriy-shop
71856b0c9dff375e5491b001790807b3c7b01ae8
[ "MIT" ]
null
null
null
orders/utils.py
JaveBychkov/dmitriy-shop
71856b0c9dff375e5491b001790807b3c7b01ae8
[ "MIT" ]
null
null
null
from django.core.mail import EmailMultiAlternatives from django.template import loader from django.utils.html import strip_tags def get_email_obj(subject, context, template, mail_to): """ Return the instance of EmailMultiAlternative email with attached html template that was rendered with given context. ...
28.272727
73
0.681672
95e875d2e13aedf0ca1945f0a3102f6d0b3be80d
2,956
py
Python
parlai/mturk/tasks/dealnodeal/run.py
ricsinaruto/ParlAI
733b627ae456d6b11a2fc4624088a781bc6c1d03
[ "MIT" ]
258
2020-04-10T07:01:06.000Z
2022-03-26T11:49:30.000Z
parlai/mturk/tasks/dealnodeal/run.py
ricsinaruto/ParlAI
733b627ae456d6b11a2fc4624088a781bc6c1d03
[ "MIT" ]
33
2020-04-10T04:28:51.000Z
2022-03-31T02:52:02.000Z
parlai/mturk/tasks/dealnodeal/run.py
ricsinaruto/ParlAI
733b627ae456d6b11a2fc4624088a781bc6c1d03
[ "MIT" ]
43
2020-04-14T10:43:33.000Z
2022-03-13T02:27:54.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. from parlai.core.params import ParlaiParser from parlai.mturk.core.mturk_manager import MTurkManager from parlai.mturk.ta...
30.474227
76
0.647497
835348119366391f23d5fe0baa57ad1158c97ca3
4,067
py
Python
matrix/kcompress.py
rebryant/Cloud-BDD
83731533f7cd97ee8c8bd8b1d062137ee9e85f67
[ "BSD-3-Clause" ]
2
2017-02-20T06:33:34.000Z
2021-05-21T13:29:43.000Z
matrix/kcompress.py
rebryant/Cloud-BDD
83731533f7cd97ee8c8bd8b1d062137ee9e85f67
[ "BSD-3-Clause" ]
2
2021-01-20T23:25:08.000Z
2021-08-03T15:42:56.000Z
matrix/kcompress.py
rebryant/Cloud-BDD
83731533f7cd97ee8c8bd8b1d062137ee9e85f67
[ "BSD-3-Clause" ]
1
2021-06-22T08:56:23.000Z
2021-06-22T08:56:23.000Z
#!/usr/bin/python # Given existing solution, extract its kernel # Then generate kernels that reduce number of products in matrix multiplication import sys import circuit import brent dim = (3,3,3) sourceAuxCount = 23 targetAuxCount = 22 ckt = circuit.Circuit() sourceKernel = None testCount = 0 saveFiles = True # ...
31.527132
91
0.596263
614ddb13a3cf960d884b7650fee762666fd6095a
43,241
py
Python
sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_models.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_models.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_models.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
1
2021-05-19T02:55:10.000Z
2021-05-19T02:55:10.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 may ...
35.618616
138
0.63338