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
4c35bb436b9ed6741e7fba7e084c65f45d41b764
2,585
py
Python
data/p4VQE/R4/benchmark/startQiskit_Class724.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startQiskit_Class724.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startQiskit_Class724.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=15 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collectio...
28.097826
118
0.637524
970f6dc0b40c55eebf94bbe221246c99b56d495d
33,381
py
Python
conda/_vendor/auxlib/entity.py
peschue/conda
dc25e8c8765c5dfd1f99d697617bc6148224e194
[ "BSD-3-Clause" ]
1
2018-12-21T22:11:55.000Z
2018-12-21T22:11:55.000Z
conda/_vendor/auxlib/entity.py
peschue/conda
dc25e8c8765c5dfd1f99d697617bc6148224e194
[ "BSD-3-Clause" ]
null
null
null
conda/_vendor/auxlib/entity.py
peschue/conda
dc25e8c8765c5dfd1f99d697617bc6148224e194
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ This module provides serializable, validatable, type-enforcing domain objects and data transfer objects. It has many of the same motivations as the python `Marshmallow <http://marshmallow.readthedocs.org/en/latest/why.html>`_ package. It is most similar to `Schematics <http://schematics.read...
35.473964
127
0.606093
7f20147bc657611bddd1459d20e2a6a5652b7655
1,243
py
Python
sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.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 ...
34.527778
76
0.624296
d274aac19ed2bf05afb93a894e04a54ae1e0995f
495
py
Python
django_rest_framework/posts_app/models.py
KushalVenkatesh/drf-secure-apis-demo
ef24928f9ad58e205827ce93ab3be3d1e80af715
[ "Apache-2.0" ]
1
2021-08-31T06:09:00.000Z
2021-08-31T06:09:00.000Z
django_rest_framework/posts_app/models.py
KushalVenkatesh/drf-secure-apis-demo
ef24928f9ad58e205827ce93ab3be3d1e80af715
[ "Apache-2.0" ]
null
null
null
django_rest_framework/posts_app/models.py
KushalVenkatesh/drf-secure-apis-demo
ef24928f9ad58e205827ce93ab3be3d1e80af715
[ "Apache-2.0" ]
1
2021-08-31T06:08:59.000Z
2021-08-31T06:08:59.000Z
from django.db import models # Create your models here. class Post(models.Model): title = models.CharField(max_length=150) description = models.CharField(max_length=1000) author = models.CharField(max_length=150) created_at = models.IntegerField() votes = models.IntegerField() class Comment(mod...
27.5
60
0.745455
323c5cb2493e1057e0b3ce180a384d8ee50a6091
34
py
Python
utils/__init__.py
elviswf/pytorch_cv
a7f11f857a0c1d5e5a807aeed5e594659212fba0
[ "Apache-2.0" ]
29
2018-05-24T12:47:23.000Z
2021-12-31T02:05:27.000Z
tools/__init__.py
mxguo/DriverPostureClassification
44b22e98e8952f9846db73177874de5c332e5cf5
[ "MIT" ]
null
null
null
tools/__init__.py
mxguo/DriverPostureClassification
44b22e98e8952f9846db73177874de5c332e5cf5
[ "MIT" ]
9
2018-05-24T13:39:42.000Z
2020-10-23T08:29:01.000Z
from .visualize import Visualizer
17
33
0.852941
9abbbb58601604ab5abba4c59ebb4be7c599e870
670
py
Python
p7.py
fiskenslakt/aoc-2021
9f59f94364b1bdab11d167fe1848d2b0266f1b3b
[ "MIT" ]
null
null
null
p7.py
fiskenslakt/aoc-2021
9f59f94364b1bdab11d167fe1848d2b0266f1b3b
[ "MIT" ]
null
null
null
p7.py
fiskenslakt/aoc-2021
9f59f94364b1bdab11d167fe1848d2b0266f1b3b
[ "MIT" ]
null
null
null
from aocd import data, submit # data = '16,1,2,0,4,2,7,1,2,14' pos = [int(p) for p in data.split(',')] best_fuel = float('inf') best_pos = None for h in range(min(pos), max(pos)+1): fuel = 0 for p in pos: fuel += abs(p - h) if fuel < best_fuel: best_fuel = fuel best_pos = h print...
19.705882
43
0.577612
5e6237065b82d92b71059b90b3b7dbda63337c03
9,814
py
Python
rllib/utils/numpy.py
kifarid/ray
43c97c2afb979987be82fa50048674e9b6776d5d
[ "Apache-2.0" ]
3
2021-08-29T20:41:21.000Z
2022-01-31T18:47:51.000Z
rllib/utils/numpy.py
QPC-database/amazon-ray
55aa4cac02a412b96252aea4e8c3f177a28324a1
[ "Apache-2.0" ]
64
2021-06-19T07:06:15.000Z
2022-03-26T07:13:16.000Z
rllib/utils/numpy.py
majacQ/ray
bc08c6cdcc7ddf4da751ca2a972defd3db509061
[ "Apache-2.0" ]
1
2021-05-20T22:00:15.000Z
2021-05-20T22:00:15.000Z
import numpy as np import tree # pip install dm_tree from ray.rllib.utils.framework import try_import_tf, try_import_torch from ray.rllib.utils.typing import TensorType, Union tf1, tf, tfv = try_import_tf() torch, _ = try_import_torch() SMALL_NUMBER = 1e-6 # Some large int number. May be increased here, if needed. ...
33.267797
79
0.612798
79c05b58af237ebcea09426131cf28adb0e3e7ac
19,300
py
Python
pyiron/base/master/generic.py
SanderBorgmans/pyiron
81121b767b1d6371eb7c07be8e9301eba48aa557
[ "BSD-3-Clause" ]
null
null
null
pyiron/base/master/generic.py
SanderBorgmans/pyiron
81121b767b1d6371eb7c07be8e9301eba48aa557
[ "BSD-3-Clause" ]
null
null
null
pyiron/base/master/generic.py
SanderBorgmans/pyiron
81121b767b1d6371eb7c07be8e9301eba48aa557
[ "BSD-3-Clause" ]
2
2020-03-17T17:00:08.000Z
2020-03-22T15:17:59.000Z
# coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. import inspect import textwrap from pyiron.base.job.generic import GenericJob """ The GenericMaster is the template cla...
35.740741
120
0.616477
71e89fbffab7d66002cbb1b878f3c6054be11dee
1,421
py
Python
example/mnist-embeddings.py
iamsdas/visdom
87e6bbc1b25598251735e1a098aae8074950a82b
[ "Apache-2.0" ]
8,366
2017-03-16T16:39:54.000Z
2021-01-05T11:08:15.000Z
example/mnist-embeddings.py
Pandinosaurus/visdom
026958a66ce743f59e8f5232e974138c76b31675
[ "Apache-2.0" ]
665
2017-03-16T16:51:32.000Z
2021-01-05T02:38:57.000Z
example/mnist-embeddings.py
Pandinosaurus/visdom
026958a66ce743f59e8f5232e974138c76b31675
[ "Apache-2.0" ]
1,120
2017-03-16T17:18:17.000Z
2021-01-04T06:57:37.000Z
#!/usr/bin/env python3 # Copyright 2017-present, The Visdom Authors # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import visdom import numpy as np from PIL import Image # type: ignore import base64 as b64 # type: igno...
29.604167
83
0.704433
df7903e7ac9195f24512f648d0859ed737a8a0f8
8,226
py
Python
crestdsl/simulation/z3conditionchangecalculator.py
stklik/CREST
7fd97c50b0c6c923e1c477105bed4f0ea032bb99
[ "MIT" ]
14
2019-08-06T10:17:46.000Z
2022-03-13T12:50:59.000Z
crestdsl/simulation/z3conditionchangecalculator.py
stklik/CREST
7fd97c50b0c6c923e1c477105bed4f0ea032bb99
[ "MIT" ]
16
2018-01-20T00:54:24.000Z
2019-07-24T15:43:42.000Z
crestdsl/simulation/z3conditionchangecalculator.py
stklik/CREST
7fd97c50b0c6c923e1c477105bed4f0ea032bb99
[ "MIT" ]
1
2021-02-01T15:33:24.000Z
2021-02-01T15:33:24.000Z
import astor import z3 from .to_z3 import Z3Converter, get_minimum_dt_of_several_anonymous from crestdsl import sourcehelper as SH from .epsilon import Epsilon import logging logger = logging.getLogger(__name__) def get_behaviour_change_dt_from_constraintset(solver, constraints, dt, ctx=z3.main_ctx()): times = {c...
38.985782
119
0.633479
1d3e0cf9f28c9e6c82f8fc396e535cd7c100ab0e
4,599
py
Python
src/transform_data.py
liannah/credit_default_prediction
10a372b9524d726c2d25e6b59fe91e4df1a18b22
[ "MIT" ]
2
2021-11-23T01:07:30.000Z
2021-12-09T20:09:10.000Z
src/transform_data.py
liannah/credit_default_prediction
10a372b9524d726c2d25e6b59fe91e4df1a18b22
[ "MIT" ]
23
2021-11-19T19:30:38.000Z
2021-12-13T22:43:57.000Z
src/transform_data.py
liannah/credit_default_prediction
10a372b9524d726c2d25e6b59fe91e4df1a18b22
[ "MIT" ]
5
2021-11-19T04:43:36.000Z
2021-11-20T01:09:58.000Z
#!/usr/bin/env python # Author: Taiwo Owoseni # date: 2021-11-23 """Transforms csv file and output transformed data to directory as csv file. Usage: src/transform_data.py --input_path=<input_path> --out_dir =<out_dir> Options: --input_path=<input_path> Path (filepath) to cleaned data (script supports only csv) --...
31.285714
100
0.642096
22a9957df9b7d88d7b0855d9d3e65958887fd09f
13,208
py
Python
project/nutrihacker/tests/test_daily_log.py
COSC481W-2020Fall/cosc481w-581-2020-fall-nutrition-helper
a8ddb4b8c0703e376d5bb0f668ef003e2ed203e8
[ "MIT" ]
1
2021-03-18T00:12:09.000Z
2021-03-18T00:12:09.000Z
project/nutrihacker/tests/test_daily_log.py
COSC481W-2020Fall/cosc481w-581-2020-fall-nutrition-helper
a8ddb4b8c0703e376d5bb0f668ef003e2ed203e8
[ "MIT" ]
104
2020-09-09T18:52:33.000Z
2020-12-16T15:17:56.000Z
project/nutrihacker/tests/test_daily_log.py
COSC481W-2020Fall/cosc481w-581-2020-fall-nutrition-helper
a8ddb4b8c0703e376d5bb0f668ef003e2ed203e8
[ "MIT" ]
1
2021-03-17T21:35:51.000Z
2021-03-17T21:35:51.000Z
from datetime import datetime, timedelta from decimal import Decimal from django.test import TestCase from django.urls import reverse from django.contrib.auth.models import User from nutrihacker.models import DailyLog, MealLog, MealFood, Food # populates temp database def create_foods(): foods = { 'sweetroll': ['...
32.53202
126
0.663462
af33a31658688310d5af6b0e8c8d4b5a68afd40c
3,374
py
Python
helpers.py
riccardocadei/Metropolis-Hastings-for-optimization
2d69685285b216cfd78df9558667f7b9fa27f4a0
[ "MIT" ]
null
null
null
helpers.py
riccardocadei/Metropolis-Hastings-for-optimization
2d69685285b216cfd78df9558667f7b9fa27f4a0
[ "MIT" ]
null
null
null
helpers.py
riccardocadei/Metropolis-Hastings-for-optimization
2d69685285b216cfd78df9558667f7b9fa27f4a0
[ "MIT" ]
null
null
null
""" Some helpful functions to run markov chain simulations. """ import scipy.stats as st import numpy as np import scipy as sp import pandas as pd import matplotlib.pyplot as plt import copy import time from DatasetGenerator import * def vect_to_S(x): """ Compute the subset S of cities corresponding to the ve...
29.33913
129
0.658566
73f281c4de5e4799fbd2108224e9d438e948dadb
17,729
py
Python
python/fire_rs/planning/demo_winterpaper.py
arthur-bit-monnot/fire-rs-saop
321e16fceebf44e8e97b482c24f37fbf6dd7d162
[ "BSD-2-Clause" ]
13
2018-11-19T15:51:23.000Z
2022-01-16T11:24:21.000Z
python/fire_rs/planning/demo_winterpaper.py
fire-rs-laas/fire-rs-saop
321e16fceebf44e8e97b482c24f37fbf6dd7d162
[ "BSD-2-Clause" ]
14
2017-10-12T16:19:19.000Z
2018-03-12T12:07:56.000Z
python/fire_rs/planning/demo_winterpaper.py
fire-rs-laas/fire-rs-saop
321e16fceebf44e8e97b482c24f37fbf6dd7d162
[ "BSD-2-Clause" ]
4
2018-03-12T12:28:55.000Z
2021-07-07T18:32:17.000Z
# Copyright (c) 2017, CNRS-LAAS # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and the f...
39.93018
109
0.626939
420a219bef785cb6ad220b8079a251a612d00fbe
6,542
py
Python
seq2seqmodel.py
privateai-group1/SEAL
4422aee7c0b35a7048ce998e31f373755c099444
[ "MIT" ]
3
2020-01-27T11:58:30.000Z
2022-02-14T14:57:43.000Z
seq2seqmodel.py
privateai-group1/SEAL
4422aee7c0b35a7048ce998e31f373755c099444
[ "MIT" ]
null
null
null
seq2seqmodel.py
privateai-group1/SEAL
4422aee7c0b35a7048ce998e31f373755c099444
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.optim as optim from torchtext.datasets import TranslationDataset, Multi30k from torchtext.data import Field, BucketIterator import spacy import numpy as np import random import math import time spacy_de = spacy.load('de') spacy_en = spacy.load('en') def tokenize_de(...
30.287037
100
0.606237
ca4f5c9f036a0f5fa3b0a338d8377d92c37d1b5f
5,721
py
Python
app/user/tests/test_user_api.py
zybex86/reicpe-app-api
3b4dbc93b7c1e97e1fba96da2c5f1e3534da030a
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
zybex86/reicpe-app-api
3b4dbc93b7c1e97e1fba96da2c5f1e3534da030a
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
zybex86/reicpe-app-api
3b4dbc93b7c1e97e1fba96da2c5f1e3534da030a
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') ME_URL = reverse('user:me') def create_user(**params...
30.593583
76
0.626289
ba43791eb39934c6cbd95d2f65426b50044f8684
7,106
py
Python
tools/rotorspeed_v2.py
TUDelft-DataDrivenControl/FRED
f837f4a126e693519fa5ab7c913cb26570ca5278
[ "MIT" ]
null
null
null
tools/rotorspeed_v2.py
TUDelft-DataDrivenControl/FRED
f837f4a126e693519fa5ab7c913cb26570ca5278
[ "MIT" ]
null
null
null
tools/rotorspeed_v2.py
TUDelft-DataDrivenControl/FRED
f837f4a126e693519fa5ab7c913cb26570ca5278
[ "MIT" ]
null
null
null
from fenics import * from fenics_adjoint import * import numpy as np from pyadjoint import Block from pyadjoint.overloaded_function import overload_function import scipy.interpolate def read_rosco_curves(): filename = "Cp_Ct_Cq.DTU10MW.txt" with open(filename, "r") as f: datafile = f.readlines() fo...
34.663415
101
0.621024
d27e21d645c4965ab93c46117caf11da2cb05560
1,439
py
Python
demo.py
sychen/initialize-virtualenv
bcd6950fe2b43c73a156e8d3c4e0f732eacb63de
[ "Apache-2.0" ]
null
null
null
demo.py
sychen/initialize-virtualenv
bcd6950fe2b43c73a156e8d3c4e0f732eacb63de
[ "Apache-2.0" ]
null
null
null
demo.py
sychen/initialize-virtualenv
bcd6950fe2b43c73a156e8d3c4e0f732eacb63de
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import sys import os import collections import json import inspect import time import getpass import re import datetime import argparse def get_script_directory(): return os.path.realpath( os.path.dirname( inspect.getfile( ...
22.138462
74
0.715775
248581488ed2fad0f1f2cfa0461d5313ae502a33
1,349
py
Python
wiki_to_text.py
ITNano/WikiSubtitleReader
d9816a452f74f6d70e147eba688838d3b97189d5
[ "Apache-2.0" ]
1
2019-01-20T14:46:16.000Z
2019-01-20T14:46:16.000Z
wiki_to_text.py
ITNano/WikiSubtitleReader
d9816a452f74f6d70e147eba688838d3b97189d5
[ "Apache-2.0" ]
4
2016-08-08T06:56:46.000Z
2016-09-26T13:30:14.000Z
wiki_to_text.py
ITNano/WikiSubtitleReader
d9816a452f74f6d70e147eba688838d3b97189d5
[ "Apache-2.0" ]
1
2018-08-11T08:01:56.000Z
2018-08-11T08:01:56.000Z
# -*- coding: utf-8 -*- from raw_to_ass import Raw_to_ass_parser import os.path #exists import sys #exit and argv import codecs #to write utf-8 output import kuplett_parser import diff_tool from meta_parser import get_metadata from preprocess import preprocess_ass def wiki_to_text(username,password,outputdir,sourcefi...
34.589744
104
0.670126
6b906e2ed1025b67f37aabace63ecee4a3ab4ef4
1,671
py
Python
pyleus/storm/__init__.py
poros/pyleus
41fdb9f5808a824a58c89b8e9cf667de4948f2b7
[ "Apache-2.0" ]
null
null
null
pyleus/storm/__init__.py
poros/pyleus
41fdb9f5808a824a58c89b8e9cf667de4948f2b7
[ "Apache-2.0" ]
null
null
null
pyleus/storm/__init__.py
poros/pyleus
41fdb9f5808a824a58c89b8e9cf667de4948f2b7
[ "Apache-2.0" ]
null
null
null
"""Package containing pyleus implementation of major Storm entities. """ from __future__ import absolute_import from collections import namedtuple DEFAULT_STREAM = "default" StormTuple = namedtuple('StormTuple', "id comp stream task values") """Namedtuple representing a Storm tuple. * **id**\(``str`` or ``long``): ...
30.381818
77
0.682226
ffb6ccad26fb18ff4e18fe3d82daa72d2fa19bd3
30,106
py
Python
source_codes/cfDNApipeline.py
dkleftogi/cfDNA_AnalysisPipeline
0ccb1c01e2c5629cbf89049ff2335b50b3b66881
[ "MIT" ]
6
2019-08-28T23:10:46.000Z
2021-10-07T20:14:05.000Z
source_codes/cfDNApipeline.py
dkleftogi/cfDNA_AnalysisPipeline
0ccb1c01e2c5629cbf89049ff2335b50b3b66881
[ "MIT" ]
null
null
null
source_codes/cfDNApipeline.py
dkleftogi/cfDNA_AnalysisPipeline
0ccb1c01e2c5629cbf89049ff2335b50b3b66881
[ "MIT" ]
1
2020-04-28T07:14:45.000Z
2020-04-28T07:14:45.000Z
#!/usr/local/bin/python ''' cfDNA analysis pipeline main script BEGIN COPYRIGHT NOTICE cfDNApipeline code -- (c) 2019 Dimitrios Kleftogiannis -- GIS -- A*STAR Copyright 2019 Genome Institute of Singapore (GIS) and Agency for Science, Technology and Research (A*STAR). This Program is free software l...
47.560821
408
0.565635
2d8e60603370fa93f0c6e0fc27aa27f8a4a075af
16,892
py
Python
ncpi_fhir_utility/app.py
jecos/ncpi-fhir-utility
7d2380b737d931f61b53431f5083f093b6aaaad4
[ "Apache-2.0" ]
null
null
null
ncpi_fhir_utility/app.py
jecos/ncpi-fhir-utility
7d2380b737d931f61b53431f5083f093b6aaaad4
[ "Apache-2.0" ]
null
null
null
ncpi_fhir_utility/app.py
jecos/ncpi-fhir-utility
7d2380b737d931f61b53431f5083f093b6aaaad4
[ "Apache-2.0" ]
null
null
null
""" General module for methods called by the ncpi_fhir_utility.cli - Validation of FHIR data model using IG publisher - Remove resource configuration from IG - Publish FHIR data model (conformance and example resources) to Simplifier.net """ from collections import defaultdict from copy import deepcop...
35.265136
114
0.647881
558c562a8f1a3cab94307152cc2642d4aff63ddf
1,610
py
Python
program/execute.py
alfanyRizaMahendra/tf2-object-detection-api
79a56f591744ae795b37b8c9c3ade212c37dba5f
[ "MIT" ]
null
null
null
program/execute.py
alfanyRizaMahendra/tf2-object-detection-api
79a56f591744ae795b37b8c9c3ade212c37dba5f
[ "MIT" ]
null
null
null
program/execute.py
alfanyRizaMahendra/tf2-object-detection-api
79a56f591744ae795b37b8c9c3ade212c37dba5f
[ "MIT" ]
null
null
null
import subprocess models = [ # 'faster-rcnn-resnet50-6000', # 'faster-rcnn-resnet50-5000', # 'faster-rcnn-resnet50-4000', # 'ssd-mobilenet-v2-4000', # 'ssd-mobilenet-v2-6000', 'ssd-mobilenet-v2-5000', ] threshold_setup = [0.3] test_images_folders = ['1', '2'] for threshold in threshold_setup:...
39.268293
292
0.61677
bd8410bfa585453f1b95ce7a697c3be34fa7c086
2,889
py
Python
ports/stm32/modules/ophyra_mpu60.py
Krasn4ck/micropython
3570ed274d8201d52dfebdb2cebc280d9f46d59c
[ "MIT" ]
null
null
null
ports/stm32/modules/ophyra_mpu60.py
Krasn4ck/micropython
3570ed274d8201d52dfebdb2cebc280d9f46d59c
[ "MIT" ]
null
null
null
ports/stm32/modules/ophyra_mpu60.py
Krasn4ck/micropython
3570ed274d8201d52dfebdb2cebc280d9f46d59c
[ "MIT" ]
1
2021-03-25T16:47:07.000Z
2021-03-25T16:47:07.000Z
import pyb import time from pyb import I2C class MPU6050_init(object): def __init__(self): self.saddres = 104 self.accel = 0 self.env_gyr = 0 self.env_accel = 0 self.gyr = 0 self.acel = 2 self.tem = 340 self.g = 0 self.y = 128 self.sen ...
26.504587
60
0.527172
9b1f07f1dcfb26cf44440ec3dcb47abe34c92a22
1,559
py
Python
app/controllers/admin/uri_model_view.py
politeauthority/simple-honey
a875773c3299044b113c339203c909b6c4391fb4
[ "MIT" ]
null
null
null
app/controllers/admin/uri_model_view.py
politeauthority/simple-honey
a875773c3299044b113c339203c909b6c4391fb4
[ "MIT" ]
1
2021-06-01T21:43:04.000Z
2021-06-01T21:43:04.000Z
app/controllers/admin/uri_model_view.py
politeauthority/simple-honey
a875773c3299044b113c339203c909b6c4391fb4
[ "MIT" ]
null
null
null
"""URI Model View Admin view controller to display all registered and non registed uris in the Simple-Honey system. """ from flask_admin.form import SecureForm from wtforms import validators from app.controllers.admin.base_model_view import BaseModelView from app.utilities import formatters from app.utilities import ...
31.816327
97
0.644003
38ba6fb8fb176bb844d5da48e2113a7681b3916a
6,816
py
Python
benchmarks/medley/floyd_warshall/floyd_warshall.py
MA2G1/polybench-python
a6fe1f505e1066fe703b15943836ea4eceeddd94
[ "Apache-2.0" ]
2
2021-05-12T11:57:46.000Z
2022-01-12T12:14:17.000Z
benchmarks/medley/floyd_warshall/floyd_warshall.py
MA2G1/polybench-python
a6fe1f505e1066fe703b15943836ea4eceeddd94
[ "Apache-2.0" ]
null
null
null
benchmarks/medley/floyd_warshall/floyd_warshall.py
MA2G1/polybench-python
a6fe1f505e1066fe703b15943836ea4eceeddd94
[ "Apache-2.0" ]
2
2020-11-17T11:52:35.000Z
2021-12-15T07:41:10.000Z
# Copyright 2019 Miguel Angel Abella Gonzalez <miguel.abella@udc.es> # # 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 ap...
40.094118
101
0.58304
74b7ccfd806fcd2f73f069a89330a6b5b3ca18e2
1,421
py
Python
Constants/colors.py
bahaozsahin/pygame-2048
ee2ff9f2766970c9f0ed64c249b3aa55252f561b
[ "MIT" ]
1
2021-12-01T13:55:54.000Z
2021-12-01T13:55:54.000Z
Constants/colors.py
bahaozsahin/tkinter-2048
ee2ff9f2766970c9f0ed64c249b3aa55252f561b
[ "MIT" ]
1
2021-04-11T11:47:56.000Z
2021-04-11T11:47:56.000Z
Constants/colors.py
bahaozsahin/tkinter-2048
ee2ff9f2766970c9f0ed64c249b3aa55252f561b
[ "MIT" ]
null
null
null
#Used the same color scheme as the mobile game class c: GRID_COLOR = "#a39489" EMPTY_CELL_COLOR = "#c2b3a9" SCORE_LABEL_FONT = ("Verdana", 20) SCORE_FONT = ("Helvetica", 32, "bold") GAME_OVER_FONT = ("Helvetica", 48, "bold") GAME_OVER_FONT_COLOR = "#ffffff" WINNER_BG = "#ffcc00" ...
27.326923
47
0.447572
f3f0d8992dad1fc6e02c6b841dff6ff5e43a677b
1,261
py
Python
wflow/wflow/sphy/subzone.py
quanpands/wflow
b454a55e4a63556eaac3fbabd97f8a0b80901e5a
[ "MIT" ]
null
null
null
wflow/wflow/sphy/subzone.py
quanpands/wflow
b454a55e4a63556eaac3fbabd97f8a0b80901e5a
[ "MIT" ]
null
null
null
wflow/wflow/sphy/subzone.py
quanpands/wflow
b454a55e4a63556eaac3fbabd97f8a0b80901e5a
[ "MIT" ]
null
null
null
# -Function to calculate capillary rise def CapilRise(pcr, subfield, subwater, capmax, rootwater, rootsat, rootfield): subrelwat = pcr.max(pcr.min((subwater / subfield), 1), 0) rootrelwat = pcr.max(pcr.min((rootwater / rootfield), 1), 0) caprise = pcr.min(subwater, capmax * (1 - rootrelwat) * subrelwat) ...
42.033333
87
0.684377
e181140acb8240d79762248b27716e5bbc667795
2,171
py
Python
metabolic_inefficiency/power_model.py
klarnemann/metabolic_inefficiency
3686497d99112b4f4a7e737247a42fa1f005c188
[ "MIT" ]
null
null
null
metabolic_inefficiency/power_model.py
klarnemann/metabolic_inefficiency
3686497d99112b4f4a7e737247a42fa1f005c188
[ "MIT" ]
null
null
null
metabolic_inefficiency/power_model.py
klarnemann/metabolic_inefficiency
3686497d99112b4f4a7e737247a42fa1f005c188
[ "MIT" ]
null
null
null
import numpy as np from scipy.optimize import curve_fit def power_func(x, a, p): ''' Power function of x, given parameters a and p. Parematers ---------- x : numpy.ndarray, shape (n_voxels) data a : float parameter p : float parameter''' return a * x**p def power...
34.460317
93
0.65638
682f18abc4565dfe0582a01e84ef5cdbe8156f8c
3,761
py
Python
snippets/graph/weighted_unionfind.py
KATO-Hiro/Somen-Soupy
d9a3f44a3f4ab1a491b8fb2ef151966cce4804b1
[ "CC0-1.0" ]
1
2021-05-04T01:33:17.000Z
2021-05-04T01:33:17.000Z
snippets/graph/weighted_unionfind.py
KATO-Hiro/Somen-Soupy
d9a3f44a3f4ab1a491b8fb2ef151966cce4804b1
[ "CC0-1.0" ]
113
2019-06-08T11:50:10.000Z
2022-03-24T04:49:55.000Z
snippets/graph/weighted_unionfind.py
KATO-Hiro/Somen-Soupy
d9a3f44a3f4ab1a491b8fb2ef151966cce4804b1
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Usage: n, m = map(int, input().split()) uf = WeightedUnionFind(n) for i in range(m): li, ri, wi = map(int, input().split()) li -= 1 ri -= 1 uf.merge_if_needs(li, ri, wi) """ class WeightedUnionFind: """Represents a data structure that tra...
33.580357
80
0.590534
9525bd141fd910a98a1f323f383e54aaf40d5452
1,426
py
Python
hw4/hw4-code-Q2.py
kgarg8/cs559-uic-neural-networks
49ff812b0b6ecc4bbfc5151fb435c3c70c1a63b4
[ "MIT" ]
null
null
null
hw4/hw4-code-Q2.py
kgarg8/cs559-uic-neural-networks
49ff812b0b6ecc4bbfc5151fb435c3c70c1a63b4
[ "MIT" ]
null
null
null
hw4/hw4-code-Q2.py
kgarg8/cs559-uic-neural-networks
49ff812b0b6ecc4bbfc5151fb435c3c70c1a63b4
[ "MIT" ]
null
null
null
import math, numpy as np, matplotlib.pyplot as plt np.random.seed(111) x = np.array([i+1 for i in range(50)]) u = np.random.uniform(-1, 1, 50) y = np.array([u_i + i + 1 for i, u_i in enumerate(u)]) N = len(x) sum_x = np.sum(x) sum_y = np.sum(y) sum_x_2 = np.sum([x_i**2 for x_i in x]) sum_x_y = np.sum([x_i*...
25.927273
77
0.61641
ecc52f66d38fd33512f18675798eca6e7b63a622
5,503
py
Python
control4/agents/nn_reactive_agent.py
sfpd/rlreloaded
650c64ec22ad45996c8c577d85b1a4f20aa1c692
[ "MIT" ]
null
null
null
control4/agents/nn_reactive_agent.py
sfpd/rlreloaded
650c64ec22ad45996c8c577d85b1a4f20aa1c692
[ "MIT" ]
null
null
null
control4/agents/nn_reactive_agent.py
sfpd/rlreloaded
650c64ec22ad45996c8c577d85b1a4f20aa1c692
[ "MIT" ]
null
null
null
from control4.core.optimizable_agent import OptimizableAgent from control4.core.cpd import DiagonalGaussian from control4.config import floatX, resolve_cfg_loc from control4.nn.nn import MLP from control4.algs.alg_params import string2dict import json, numpy as np import theano,theano.tensor as TT #pylint: disable=F040...
35.96732
120
0.612393
9cfa34015599bf366ed70c5d7f98ade4dbbe1c65
8,302
py
Python
interbotix_perception_toolbox/interbotix_perception_modules/src/interbotix_perception_modules/armtag.py
Drojas251/interbotix_ros_toolboxes
212d1fbdad4019dd628e029ef1a8493a04b795cb
[ "BSD-2-Clause" ]
8
2021-08-24T15:27:33.000Z
2022-03-13T10:44:54.000Z
interbotix_perception_toolbox/interbotix_perception_modules/src/interbotix_perception_modules/armtag.py
Drojas251/interbotix_ros_toolboxes
212d1fbdad4019dd628e029ef1a8493a04b795cb
[ "BSD-2-Clause" ]
4
2021-07-26T18:42:05.000Z
2022-02-15T17:23:18.000Z
interbotix_perception_toolbox/interbotix_perception_modules/src/interbotix_perception_modules/armtag.py
Drojas251/interbotix_ros_toolboxes
212d1fbdad4019dd628e029ef1a8493a04b795cb
[ "BSD-2-Clause" ]
9
2021-06-03T08:12:04.000Z
2022-02-16T01:53:24.000Z
import rospy import numpy as np import tf2_ros from geometry_msgs.msg import TransformStamped, Quaternion, Point from tf.transformations import euler_from_quaternion, quaternion_from_euler from interbotix_perception_modules.apriltag import InterbotixAprilTagInterface from interbotix_common_modules import angle_manipula...
55.346667
168
0.68622
d96c5c6a520004d9115a8d13381eb14b7cc10b52
6,134
py
Python
indico/modules/events/clone.py
EdverCompany/indico
c4b5e7b2e3a47355d850a342ed527c09334ef336
[ "MIT" ]
null
null
null
indico/modules/events/clone.py
EdverCompany/indico
c4b5e7b2e3a47355d850a342ed527c09334ef336
[ "MIT" ]
2
2021-05-26T09:16:52.000Z
2021-05-26T09:28:59.000Z
indico/modules/events/clone.py
andrea-guarino-sonarsource/indico
2dada1f293daea913dec85ebb33c29a9f2cb92ac
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.db import db from indico.core.db.sqlalchemy.principals import clone_principals from indic...
39.070064
120
0.69987
f6f9acfae489f2b0b4a03d4bb3c8af5c67f1dc6b
192
py
Python
AtCoder/ABC/000-159/ABC141_D.py
sireline/PyCode
8578467710c3c1faa89499f5d732507f5d9a584c
[ "MIT" ]
null
null
null
AtCoder/ABC/000-159/ABC141_D.py
sireline/PyCode
8578467710c3c1faa89499f5d732507f5d9a584c
[ "MIT" ]
null
null
null
AtCoder/ABC/000-159/ABC141_D.py
sireline/PyCode
8578467710c3c1faa89499f5d732507f5d9a584c
[ "MIT" ]
null
null
null
import heapq N, M = [int(n) for n in input().split()] A = [-int(n) for n in input().split()] heapq.heapify(A) [heapq.heappush(A, -(-heapq.heappop(A)//2)) for _ in range(M)] print(-sum(A))
24
65
0.604167
64f94e1659da4c216d9a6dad359ca083622c1b80
2,660
py
Python
import/dataframe_helpers.py
flywheel-apps/flywheel-tutorials
7fc6ac9bb262573584260beaa83506eb1c5d8b58
[ "MIT" ]
null
null
null
import/dataframe_helpers.py
flywheel-apps/flywheel-tutorials
7fc6ac9bb262573584260beaa83506eb1c5d8b58
[ "MIT" ]
null
null
null
import/dataframe_helpers.py
flywheel-apps/flywheel-tutorials
7fc6ac9bb262573584260beaa83506eb1c5d8b58
[ "MIT" ]
null
null
null
""" Various functions to facilitate the cleaning and formating of pandas dataframes. This may be expanded as the need arises. """ import copy import datetime import logging import numpy as np log = logging.getLogger(__name__) def convert_time_to_seconds(time_span, scale): """ Convert arbitrary time...
23.539823
84
0.589098
41996107ce033099b6548c71c6cb4d46404ec838
2,711
py
Python
homeassistant/components/wallbox/const.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
homeassistant/components/wallbox/const.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
79
2020-07-23T07:13:37.000Z
2022-03-22T06:02:37.000Z
homeassistant/components/wallbox/const.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
6
2018-02-04T03:48:55.000Z
2022-01-24T20:37:04.000Z
"""Constants for the Wallbox integration.""" from homeassistant.const import ( CONF_ICON, CONF_NAME, CONF_UNIT_OF_MEASUREMENT, ELECTRICAL_CURRENT_AMPERE, ENERGY_KILO_WATT_HOUR, LENGTH_KILOMETERS, PERCENTAGE, POWER_KILO_WATT, STATE_UNAVAILABLE, ) DOMAIN = "wallbox" CONF_STATION = "s...
27.11
60
0.618591
cd6b1fff3e554f09daaa5b0da4a4873248accd41
437
py
Python
coover/__init__.py
coverosu/coover
3ed295a1e3bde9091f506bc8835faf9d12ec1176
[ "MIT" ]
null
null
null
coover/__init__.py
coverosu/coover
3ed295a1e3bde9091f506bc8835faf9d12ec1176
[ "MIT" ]
null
null
null
coover/__init__.py
coverosu/coover
3ed295a1e3bde9091f506bc8835faf9d12ec1176
[ "MIT" ]
1
2020-10-22T09:48:20.000Z
2020-10-22T09:48:20.000Z
"""\ This package is mainly for people who want to code with python around osu, but doesn't want to write anything Using this packag for code that I tend to rewrite a lot such as `requests` type code. """ __title__ = 'coover' __author__ = 'coverosu' __license__ = 'MIT' __copyright__ = 'Copyright 2020 coverosu' __versi...
29.133333
109
0.750572
fb1c3656dabbec2198d8230719062062e4a20056
3,150
py
Python
pychron/dashboard/tasks/server/panes.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
1
2019-02-27T21:57:44.000Z
2019-02-27T21:57:44.000Z
pychron/dashboard/tasks/server/panes.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
80
2018-07-17T20:10:20.000Z
2021-08-17T15:38:24.000Z
pychron/dashboard/tasks/server/panes.py
AGESLDEO/pychron
1a81e05d9fba43b797f335ceff6837c016633bcf
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # Copyright 2013 Jake Ross # # 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...
42.567568
119
0.564127
b48bfde97f334bbe87b1183363efa1ccfd0ca715
8,444
py
Python
python/tvm/relay/op/nn/_nn.py
qqsun8819/tvm
53ac89ede7cddd1649b01b2ff10cc67a963757ce
[ "Apache-2.0" ]
null
null
null
python/tvm/relay/op/nn/_nn.py
qqsun8819/tvm
53ac89ede7cddd1649b01b2ff10cc67a963757ce
[ "Apache-2.0" ]
null
null
null
python/tvm/relay/op/nn/_nn.py
qqsun8819/tvm
53ac89ede7cddd1649b01b2ff10cc67a963757ce
[ "Apache-2.0" ]
null
null
null
#pylint: disable=invalid-name, unused-argument """Backend compiler related feature registration""" import topi from topi.util import get_const_int, get_const_tuple from .. import op as reg from ..op import OpPattern, schedule_injective # relu reg.register_schedule("nn.relu", schedule_injective) reg.register_pattern("n...
34.748971
90
0.709261
6c1733f0e97a75b2c4bbfcf1320a69ab3b513f2e
959
py
Python
Chapter09/email_exfil.py
Mazuco/Black-Hat-Python
0f7432d523d88ddb4295d9e558ead679961ecbb2
[ "MIT" ]
1
2021-12-14T07:05:49.000Z
2021-12-14T07:05:49.000Z
Chapter09/email_exfil.py
Mazuco/Black-Hat-Python
0f7432d523d88ddb4295d9e558ead679961ecbb2
[ "MIT" ]
null
null
null
Chapter09/email_exfil.py
Mazuco/Black-Hat-Python
0f7432d523d88ddb4295d9e558ead679961ecbb2
[ "MIT" ]
1
2021-06-12T12:25:52.000Z
2021-06-12T12:25:52.000Z
import smtplib import time import win32com.client smtp_server = 'smtp.example.com' smtp_port = 587 smtp_acct = 'tim@example.com' smtp_password = 'seKret' tgt_accts = ['tim@elsewhere.com'] def plain_email(subject, contents): message = f'Subject: {subject}\nFrom {smtp_acct}\n' message += f'To: {tgt_accts}\n\n{c...
28.205882
61
0.705944
15f961d58288b84081aa3687f9f5d743dbb7aa4e
10,024
py
Python
pychron/lasers/tasks/plugins/laser_plugin.py
WiscAr/pychron
8d335d53ba7a5fc70760d9a7cb60540ad169ae84
[ "Apache-2.0" ]
null
null
null
pychron/lasers/tasks/plugins/laser_plugin.py
WiscAr/pychron
8d335d53ba7a5fc70760d9a7cb60540ad169ae84
[ "Apache-2.0" ]
80
2018-07-17T20:10:20.000Z
2021-08-17T15:38:24.000Z
pychron/lasers/tasks/plugins/laser_plugin.py
WiscAr/pychron
8d335d53ba7a5fc70760d9a7cb60540ad169ae84
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
39.003891
112
0.538109
7937043fa47d893b22b424a9d3db3e3364711f63
2,573
py
Python
mermer/server/upnp.py
sumilying/mermer-chain
a493e56c3aca6cef341aff0eae04f5e52bc55f09
[ "Apache-2.0" ]
2
2021-11-12T13:32:35.000Z
2021-11-16T08:47:28.000Z
mermer/server/upnp.py
sumilying/mermer-blockchain
a493e56c3aca6cef341aff0eae04f5e52bc55f09
[ "Apache-2.0" ]
null
null
null
mermer/server/upnp.py
sumilying/mermer-blockchain
a493e56c3aca6cef341aff0eae04f5e52bc55f09
[ "Apache-2.0" ]
null
null
null
import logging import threading from queue import Queue from typing import Optional try: import miniupnpc except ImportError: pass log = logging.getLogger(__name__) class UPnP: thread: Optional[threading.Thread] = None queue: Queue = Queue() def __init__(self): def run(): t...
34.306667
119
0.502138
3289b5cf6479505fa72a7aeb23fd337785275bf0
1,645
py
Python
listools/llogic/symmetric_difference.py
jgarte/listools
17ef56fc7dde701890213f248971d8dc7a6e6b7c
[ "MIT" ]
2
2019-01-22T03:50:43.000Z
2021-04-22T16:12:17.000Z
listools/llogic/symmetric_difference.py
jgarte/listools
17ef56fc7dde701890213f248971d8dc7a6e6b7c
[ "MIT" ]
2
2019-01-22T03:57:49.000Z
2021-04-22T22:03:47.000Z
listools/llogic/symmetric_difference.py
jgarte/listools
17ef56fc7dde701890213f248971d8dc7a6e6b7c
[ "MIT" ]
1
2021-04-22T21:13:00.000Z
2021-04-22T21:13:00.000Z
def symmetric_difference(list_1: list, list_2: list) -> list: r"""llogic.symmetric_difference(list_1, list_2) Returns the symmetric difference of two lists (omitting repetitions). The order of the elements of the output depends on their order in the lists. The order of the inputs lists does affect the ...
33.571429
78
0.577508
29b1de50936b64cd20a03704df67768e7561eea7
1,668
py
Python
tests/test_shared_paths.py
HirniMeshram/Shapely
5c57829f31c227111aa232fe61841e7969c19ca0
[ "BSD-3-Clause" ]
null
null
null
tests/test_shared_paths.py
HirniMeshram/Shapely
5c57829f31c227111aa232fe61841e7969c19ca0
[ "BSD-3-Clause" ]
null
null
null
tests/test_shared_paths.py
HirniMeshram/Shapely
5c57829f31c227111aa232fe61841e7969c19ca0
[ "BSD-3-Clause" ]
null
null
null
from . import unittest from shapely.geometry import Point, LineString, Polygon, MultiLineString, \ GeometryCollection from shapely.geos import geos_version from shapely.ops import shared_paths @unittest.skipIf(geos_version < (3, 3, 0), 'GEOS 3.3.0 required') class SharedPaths(unittest.Tes...
37.066667
75
0.586331
94aa6de1a0aa1e1ed5049f88bc45e1d859171e0a
3,352
py
Python
profiles_project/settings.py
elam91/django-noob-api
3106daa5cb0e1cb634e507862b3bddbb04e0cbe1
[ "MIT" ]
null
null
null
profiles_project/settings.py
elam91/django-noob-api
3106daa5cb0e1cb634e507862b3bddbb04e0cbe1
[ "MIT" ]
null
null
null
profiles_project/settings.py
elam91/django-noob-api
3106daa5cb0e1cb634e507862b3bddbb04e0cbe1
[ "MIT" ]
null
null
null
""" Django settings for profiles_project project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
27.47541
91
0.699284
94a6e1e81a9d2817822faac305221950536452d7
740
py
Python
MatrixDiagonalSum.py
vanigupta20024/Programming-Challenges
578dba33e9f6b04052a503bcb5de9b32f33494a5
[ "MIT" ]
14
2020-10-15T21:47:18.000Z
2021-12-01T06:06:51.000Z
MatrixDiagonalSum.py
vanigupta20024/Programming-Challenges
578dba33e9f6b04052a503bcb5de9b32f33494a5
[ "MIT" ]
null
null
null
MatrixDiagonalSum.py
vanigupta20024/Programming-Challenges
578dba33e9f6b04052a503bcb5de9b32f33494a5
[ "MIT" ]
4
2020-06-15T14:40:45.000Z
2021-06-15T06:22:03.000Z
''' Given a square matrix mat, return the sum of the matrix diagonals. Only include the sum of all the elements on the primary diagonal and all the elements on the secondary diagonal that are not part of the primary diagonal. n == mat.length == mat[i].length 1 <= n <= 100 1 <= mat[i][j] <= 100 ''' class Solution: ...
25.517241
154
0.475676
a01862d54b3fb79d0ad18b3daa9c3d00fe2bac8a
4,032
py
Python
src/support/azext_support/_completers.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/support/azext_support/_completers.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/support/azext_support/_completers.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
59.294118
118
0.651538
26b3a2ce7c873906e0d643e437789a303bfa03dd
31,447
py
Python
tensorflow/python/ipu/ops/pipelining_ops.py
DebeshJha/tensorflow-1
2b5a225c49d25273532d11c424d37ce394d7579a
[ "Apache-2.0" ]
2
2021-03-08T23:32:06.000Z
2022-01-13T03:43:49.000Z
tensorflow/python/ipu/ops/pipelining_ops.py
DebeshJha/tensorflow-1
2b5a225c49d25273532d11c424d37ce394d7579a
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ipu/ops/pipelining_ops.py
DebeshJha/tensorflow-1
2b5a225c49d25273532d11c424d37ce394d7579a
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.553451
112
0.705854
c2d7fda69d41540373249fbd989048982b52cfbf
1,392
py
Python
app/core/tests/test_admin.py
mamirjamali/recepe_lon_dev
cacb5e14f11b10b48bfe3b8592174058e9607ee2
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
mamirjamali/recepe_lon_dev
cacb5e14f11b10b48bfe3b8592174058e9607ee2
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
mamirjamali/recepe_lon_dev
cacb5e14f11b10b48bfe3b8592174058e9607ee2
[ "MIT" ]
null
null
null
# from django import urls from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( ...
32.372093
69
0.624282
42e696aa6c7e63f4b6ed0b4030965dff515ec2d8
5,920
py
Python
src/test-apps/happy/bin/weave-wdm-next.py
aiw-google/openweave-core
5dfb14b21d0898ef95bb62ff564cadfeea4b4702
[ "Apache-2.0" ]
1
2021-08-10T12:08:31.000Z
2021-08-10T12:08:31.000Z
src/test-apps/happy/bin/weave-wdm-next.py
aiw-google/openweave-core
5dfb14b21d0898ef95bb62ff564cadfeea4b4702
[ "Apache-2.0" ]
1
2019-03-26T04:47:32.000Z
2019-03-26T04:47:32.000Z
src/test-apps/happy/bin/weave-wdm-next.py
aiw-google/openweave-core
5dfb14b21d0898ef95bb62ff564cadfeea4b4702
[ "Apache-2.0" ]
1
2021-03-16T03:22:52.000Z
2021-03-16T03:22:52.000Z
#!/usr/bin/env python # # Copyright (c) 2016-2017 Nest Labs, Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lice...
33.828571
130
0.594932
78de2df810210edf97d812e13e2fe4619e6d4d86
6,066
py
Python
autotest/test_gwf_csub_sub02.py
MODFLOW-USGS/modflow6
6cc0f91b93e0615b68c9239c32cd5bff7f0696b9
[ "CC0-1.0" ]
102
2017-12-19T09:56:38.000Z
2022-03-30T01:47:28.000Z
autotest/test_gwf_csub_sub02.py
MODFLOW-USGS/modflow6
6cc0f91b93e0615b68c9239c32cd5bff7f0696b9
[ "CC0-1.0" ]
331
2018-01-10T21:22:48.000Z
2022-03-29T05:57:00.000Z
autotest/test_gwf_csub_sub02.py
MODFLOW-USGS/modflow6
6cc0f91b93e0615b68c9239c32cd5bff7f0696b9
[ "CC0-1.0" ]
87
2017-12-13T21:40:39.000Z
2022-03-30T05:31:40.000Z
import os import pytest try: import pymake except: msg = "Error. Pymake package is not available.\n" msg += "Try installing using the following command:\n" msg += " pip install https://github.com/modflowpy/pymake/zipball/master" raise Exception(msg) try: import flopy except: msg = "Error. ...
21.587189
88
0.582756
99e7947b1f7a4a9ffacb53e759e438f392cd4df6
860
py
Python
Worker/WebCheck/wafw00f/plugins/yundun.py
p4sschen/Toy4Recon
e4fa6a512b238cca6d6d072ed5c66899de60bb06
[ "MIT" ]
1
2020-12-16T13:14:05.000Z
2020-12-16T13:14:05.000Z
Worker/WebCheck/wafw00f/plugins/yundun.py
p4sschen/Toy4Recon
e4fa6a512b238cca6d6d072ed5c66899de60bb06
[ "MIT" ]
null
null
null
Worker/WebCheck/wafw00f/plugins/yundun.py
p4sschen/Toy4Recon
e4fa6a512b238cca6d6d072ed5c66899de60bb06
[ "MIT" ]
null
null
null
#!/usr/bin/env python NAME = 'Yundun (Yundun)' def is_waf(self): # Yundun has its own server header set if self.matchheader(('Server', 'YUNDUN')): return True # X-Cache too sometimes if self.matchheader(('X-Cache', 'YUNDUN')): return True # Found more fingerprints for Yundun dur...
30.714286
96
0.601163
7174283494fe7547add9ca626c1d3283e31a77b7
43,414
py
Python
pandas/tests/series/test_missing.py
lorenzocestaro/pandas
a73e4518cf3d10fd239cdbd1be3bcda43443bf2a
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
pandas/tests/series/test_missing.py
lorenzocestaro/pandas
a73e4518cf3d10fd239cdbd1be3bcda43443bf2a
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
pandas/tests/series/test_missing.py
lorenzocestaro/pandas
a73e4518cf3d10fd239cdbd1be3bcda43443bf2a
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytz from datetime import timedelta, datetime from distutils.version import LooseVersion from numpy import nan import numpy as np import pandas as pd from pandas import (Series, DataFrame, isnull, date_range, MultiIndex, Index, Timestamp, Na...
38.693405
79
0.559105
d309f3ef579b4a8841bbb440e44e17d881833e60
7,230
py
Python
src/fhir_types/FHIR_Timing_Repeat.py
anthem-ai/fhir-types
42348655fb3a9b3f131b911d6bc0782da8c14ce4
[ "Apache-2.0" ]
2
2022-02-03T00:51:30.000Z
2022-02-03T18:42:43.000Z
src/fhir_types/FHIR_Timing_Repeat.py
anthem-ai/fhir-types
42348655fb3a9b3f131b911d6bc0782da8c14ce4
[ "Apache-2.0" ]
null
null
null
src/fhir_types/FHIR_Timing_Repeat.py
anthem-ai/fhir-types
42348655fb3a9b3f131b911d6bc0782da8c14ce4
[ "Apache-2.0" ]
null
null
null
from typing import Any, List, Literal, TypedDict from .FHIR_code import FHIR_code from .FHIR_decimal import FHIR_decimal from .FHIR_Duration import FHIR_Duration from .FHIR_Element import FHIR_Element from .FHIR_Period import FHIR_Period from .FHIR_positiveInt import FHIR_positiveInt from .FHIR_Range import FHIR_Range...
61.271186
836
0.670954
be16099c5e79082522272f3940e0a030a8e3765a
16,666
py
Python
docker/optimization/pyOpt/tags/v1.2.0/pyOpt/pyPSQP/pyPSQP.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
3
2021-01-06T03:01:18.000Z
2022-03-21T03:02:55.000Z
docker/optimization/pyOpt/tags/v1.2.0/pyOpt/pyPSQP/pyPSQP.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
null
null
null
docker/optimization/pyOpt/tags/v1.2.0/pyOpt/pyPSQP/pyPSQP.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ''' pyPSQP - A Python pyOpt interface to PSQP. Copyright (c) 2008-2014 by pyOpt Developers All rights reserved. Revision: 1.1 $Date: 31/07/2014 21:00$ Tested on: --------- Win32 with g77 Linux with pathf95 Linux with gfortran Linux with g77 Developers: ----------- - Dr. Ruben E. Perez (RP) ...
26.837359
165
0.552742
dd99016ceb11b93851eaa940b462910c5f9ab5eb
398
py
Python
exercs/ex104.py
gugamacedo/logica-e-algoritmos
787e771cf9ecebe876ac895fd0b544476d8e3b15
[ "MIT" ]
null
null
null
exercs/ex104.py
gugamacedo/logica-e-algoritmos
787e771cf9ecebe876ac895fd0b544476d8e3b15
[ "MIT" ]
null
null
null
exercs/ex104.py
gugamacedo/logica-e-algoritmos
787e771cf9ecebe876ac895fd0b544476d8e3b15
[ "MIT" ]
null
null
null
# faça a função leia_int() que funcionará como um input, mas que só aceita Int def leia_int(texto): while True: num = str(input((texto))).replace(' ', '') if num.isnumeric(): num = int(num) return num else: print('\033[31mErro!\033[m') num = l...
28.428571
79
0.557789
99474f4fc8fc3df199b558b4045309b09c684b8a
1,587
py
Python
Python/currency_convertor.py
TheDesTrucToRR/Hacktoberfest-2021
2757383c7432909dfbdbda61fb9ca9f6de495cfe
[ "MIT" ]
14
2021-10-01T16:53:27.000Z
2021-10-17T13:15:44.000Z
Python/currency_convertor.py
TheDesTrucToRR/Hacktoberfest-2021
2757383c7432909dfbdbda61fb9ca9f6de495cfe
[ "MIT" ]
37
2021-10-01T17:14:52.000Z
2021-10-21T17:26:14.000Z
Python/currency_convertor.py
TheDesTrucToRR/Hacktoberfest-2021
2757383c7432909dfbdbda61fb9ca9f6de495cfe
[ "MIT" ]
38
2021-10-01T16:59:16.000Z
2021-10-30T16:05:31.000Z
#Currency Convertor import tkinter as tk import tkinter.ttk as ttk from forex_python.converter import CurrencyRates def convertcurr(rate): x = amount.get() y = currency_from.get() z = currency_to.get() curr = CurrencyRates() f = curr.convert(y,z,x) final.set(format(f, '.2f')) root = tk.Tk() root.geometry('450x...
30.519231
126
0.711405
f3d170a2d7826234f4cbefd70f6ffe1a7fc6b8de
60
py
Python
retina/model/necks/registry.py
mike112223/retina
cdad3af8240471619f42e9edd1caf68a0241bea6
[ "Apache-2.0" ]
null
null
null
retina/model/necks/registry.py
mike112223/retina
cdad3af8240471619f42e9edd1caf68a0241bea6
[ "Apache-2.0" ]
null
null
null
retina/model/necks/registry.py
mike112223/retina
cdad3af8240471619f42e9edd1caf68a0241bea6
[ "Apache-2.0" ]
null
null
null
from retina.utils import Registry NECKS = Registry('neck')
15
33
0.766667
9310d46be375f9502ecca0a5ef5a1da251fad6bc
19,078
py
Python
utils/plots.py
heieureka/emotic
93cd79e30e03c3fd3a4a478dcf645db569fe2a1b
[ "MIT" ]
8
2022-01-11T14:35:38.000Z
2022-03-31T09:47:26.000Z
utils/plots.py
heieureka/emotic
93cd79e30e03c3fd3a4a478dcf645db569fe2a1b
[ "MIT" ]
null
null
null
utils/plots.py
heieureka/emotic
93cd79e30e03c3fd3a4a478dcf645db569fe2a1b
[ "MIT" ]
4
2022-01-17T00:51:38.000Z
2022-03-30T16:12:28.000Z
# Plotting utils import glob import math import os import random from copy import copy from pathlib import Path import cv2 import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import torch import yaml from PIL import Image, ImageDraw, ImageFont from utils.gen...
42.489978
121
0.575951
2f7dcf4c22b4d1c0c7d38301f88b9ef4e705040d
4,294
py
Python
python-lib/modellightgbm/dku_lightgbm.py
shippeo/dss-plugin-model-lightgbm
9c2bf2e010775501d7ff2ffdf25d1b51c01a0187
[ "MIT" ]
3
2021-06-15T16:02:38.000Z
2021-12-08T06:38:47.000Z
python-lib/modellightgbm/dku_lightgbm.py
shippeo/dss-plugin-model-lightgbm
9c2bf2e010775501d7ff2ffdf25d1b51c01a0187
[ "MIT" ]
null
null
null
python-lib/modellightgbm/dku_lightgbm.py
shippeo/dss-plugin-model-lightgbm
9c2bf2e010775501d7ff2ffdf25d1b51c01a0187
[ "MIT" ]
1
2021-06-15T16:06:02.000Z
2021-06-15T16:06:02.000Z
from lightgbm import LGBMClassifier, LGBMRegressor class DkuLGBMClassifier(LGBMClassifier): def __init__(self, boosting_type='gbdt', num_leaves=31, max_depth=-1, learning_rate=0.1, n_estimators=100, subsample_for_bin=200000, objective=None, class_weight=None, min_split_gain=0.0, min_...
97.590909
196
0.688402
4275b5420be205c170623355f3cad808be1b8f18
288
py
Python
peal/models/__init__.py
leyuanheart/PEAL
451863918a2a8c574c7c41ea756ebb16cd7065cb
[ "MIT" ]
null
null
null
peal/models/__init__.py
leyuanheart/PEAL
451863918a2a8c574c7c41ea756ebb16cd7065cb
[ "MIT" ]
null
null
null
peal/models/__init__.py
leyuanheart/PEAL
451863918a2a8c574c7c41ea756ebb16cd7065cb
[ "MIT" ]
null
null
null
from sale.models.box2d_models import DQNNetwork, QuantileNetwork, MultiHeadQNetwork from sale.models.basic_models import MLPNetwork, WeightNetwork __all__ = ['DQNNetwork', 'QuantileNetwork', 'MultiHeadQNetwork', 'MLPNetwork', 'WeightNetwork']
36
83
0.697917
5c893326fabe635e9c3b22a69254f6c8d32df3ee
3,344
py
Python
kapture_localization/utils/pairsfile.py
jkabalar/kapture-localization
647ef7cfdfbdac37297682baca1bf13608b6d6e8
[ "BSD-3-Clause" ]
118
2020-11-04T16:48:12.000Z
2022-03-28T13:15:37.000Z
kapture_localization/utils/pairsfile.py
jkabalar/kapture-localization
647ef7cfdfbdac37297682baca1bf13608b6d6e8
[ "BSD-3-Clause" ]
23
2020-10-19T09:01:37.000Z
2022-03-25T09:12:31.000Z
kapture_localization/utils/pairsfile.py
jkabalar/kapture-localization
647ef7cfdfbdac37297682baca1bf13608b6d6e8
[ "BSD-3-Clause" ]
29
2020-11-25T05:28:32.000Z
2022-03-23T07:20:23.000Z
# Copyright 2020-present NAVER Corp. Under BSD 3-clause license import kapture_localization.utils.path_to_kapture # noqa: F401 import kapture from kapture_localization.utils.logging import getLogger from kapture.io.csv import table_from_file from collections import OrderedDict from typing import Dict, List, Tuple d...
41.283951
111
0.650718
ff13038786188a421bccf939abca99192e6af3d7
188
py
Python
tests/integrations/pytorch_lightning/loggers_test.py
allenai/tango
80c90caefae4ad1c3f8472718ddada912cd8fcf9
[ "Apache-2.0" ]
52
2021-09-24T17:52:34.000Z
2022-03-29T22:55:02.000Z
tests/integrations/pytorch_lightning/loggers_test.py
keppy/tango
fbb78935a1c8a88c049e5ace0a2d0c7eeb4c8893
[ "Apache-2.0" ]
90
2021-09-29T04:23:29.000Z
2022-03-31T21:23:02.000Z
tests/integrations/pytorch_lightning/loggers_test.py
keppy/tango
fbb78935a1c8a88c049e5ace0a2d0c7eeb4c8893
[ "Apache-2.0" ]
8
2021-11-13T01:56:22.000Z
2022-02-27T03:29:42.000Z
from tango.integrations.pytorch_lightning.loggers import LightningLogger def test_all_loggers_registered(): assert "pytorch_lightning::CSVLogger" in LightningLogger.list_available()
31.333333
77
0.845745
a8ffe6570ecaafb2ef7df0f67a991b2f501272f9
974
py
Python
packages/pyright-internal/src/tests/samples/function16.py
sasano8/pyright
e804f324ee5dbd25fd37a258791b3fd944addecd
[ "MIT" ]
4,391
2019-05-07T01:18:57.000Z
2022-03-31T20:45:44.000Z
packages/pyright-internal/src/tests/samples/function16.py
sasano8/pyright
e804f324ee5dbd25fd37a258791b3fd944addecd
[ "MIT" ]
2,740
2019-05-07T03:29:30.000Z
2022-03-31T12:57:46.000Z
packages/pyright-internal/src/tests/samples/function16.py
sasano8/pyright
e804f324ee5dbd25fd37a258791b3fd944addecd
[ "MIT" ]
455
2019-05-07T12:55:14.000Z
2022-03-31T17:09:15.000Z
# This sample tests the handling of an unpacked TypedDict passed as # an argument to a function. from typing import TypedDict class TD1(TypedDict): arg1: int arg2: str class TD2(TD1): arg3: float def func1(arg1: int, arg2: str): pass def func2(arg1: int, arg2: str, arg3: float): pass def ...
16.793103
67
0.666324
e53e90033f79a47b8f0b44c624eb4ddb480798a8
7,351
py
Python
userbot/modules/updater.py
DazRepo/Uro-bot
010825f4f7462fd3d8fbf89085ed1f94ba7d5e67
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/updater.py
DazRepo/Uro-bot
010825f4f7462fd3d8fbf89085ed1f94ba7d5e67
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/updater.py
DazRepo/Uro-bot
010825f4f7462fd3d8fbf89085ed1f94ba7d5e67
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
""" This module updates the userbot based on upstream revision """ import asyncio import sys from os import environ, execle, remove from git import Repo from git.exc import GitCommandError, InvalidGitRepositoryError, NoSuchPathError from userbot import CMD_HANDLER as cmd from userbot import CMD_HELP, HEROKU_API_KEY,...
34.511737
91
0.600871
6ce72ae19420b3a0a63ae59ac57bc51b0c6db8e1
4,880
py
Python
huaweicloud-sdk-ivs/huaweicloudsdkivs/v2/model/req_data_by_id_card_image.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-ivs/huaweicloudsdkivs/v2/model/req_data_by_id_card_image.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-ivs/huaweicloudsdkivs/v2/model/req_data_by_id_card_image.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ReqDataByIdCardImage: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The k...
29.221557
80
0.608402
10c539487b96af6a13903f27fc8edbdc94029828
5,435
py
Python
workflow/dags/tasks/preprocess/data_pipeline_utils_test.py
isabella232/driblet
2d51de919681deca1ca4cb483996c68587fd9ba8
[ "Apache-2.0" ]
22
2019-07-09T08:57:37.000Z
2021-11-14T18:36:17.000Z
workflow/dags/tasks/preprocess/data_pipeline_utils_test.py
isabella232/driblet
2d51de919681deca1ca4cb483996c68587fd9ba8
[ "Apache-2.0" ]
17
2019-12-16T22:01:23.000Z
2022-03-01T23:10:23.000Z
workflow/dags/tasks/preprocess/data_pipeline_utils_test.py
isabella232/driblet
2d51de919681deca1ca4cb483996c68587fd9ba8
[ "Apache-2.0" ]
8
2019-11-03T20:11:33.000Z
2021-09-15T10:01:02.000Z
# coding=utf-8 # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
31.783626
79
0.702484
2da953e587edb271e3d1bac9f36606b1a459fd33
2,044
py
Python
src/scripts/NormWavepacket.py
WaveBlocks/WaveBlocks
2af3730dcf27e54006ec602e696b4d4df25459d8
[ "BSD-3-Clause" ]
null
null
null
src/scripts/NormWavepacket.py
WaveBlocks/WaveBlocks
2af3730dcf27e54006ec602e696b4d4df25459d8
[ "BSD-3-Clause" ]
null
null
null
src/scripts/NormWavepacket.py
WaveBlocks/WaveBlocks
2af3730dcf27e54006ec602e696b4d4df25459d8
[ "BSD-3-Clause" ]
null
null
null
"""The WaveBlocks Project Compute the norms of the homogeneous wavepackets as well as the sum of all norms. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011 R. Bourquin @license: Modified BSD License """ from WaveBlocks import PotentialFactory from WaveBlocks import HagedornWavepacket def compute_norm(iom...
34.644068
105
0.720646
bb5614548721dbd02b47d773b87b828f419beb5a
30,511
py
Python
pred_diff/imputers/impute.py
PredDiff/PredDiffTabular
ae116c5179615d8163c1421e1feb7dcfbd1c2b5e
[ "BSD-3-Clause" ]
1
2021-05-04T15:09:25.000Z
2021-05-04T15:09:25.000Z
pred_diff/imputers/impute.py
PredDiff/PredDiffTabular
ae116c5179615d8163c1421e1feb7dcfbd1c2b5e
[ "BSD-3-Clause" ]
null
null
null
pred_diff/imputers/impute.py
PredDiff/PredDiffTabular
ae116c5179615d8163c1421e1feb7dcfbd1c2b5e
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pandas as pd import scipy import scipy.stats as st from typing import List, Union from tqdm.auto import tqdm from sklearn.experimental import enable_iterative_imputer # noqa from sklearn.impute import IterativeImputer as IterativeImputerOriginal from .IterativeImputerPR import IterativeIm...
51.021739
360
0.623546
33ef2cb1b003bd4767695cd47e9d1205d09948d4
9,072
py
Python
helios/extensibility/plugin_manager.py
hyperevo/py-helios-node
ff417fe3fe90f85c9f95b3d8a5f0dd4c80532ee8
[ "MIT" ]
null
null
null
helios/extensibility/plugin_manager.py
hyperevo/py-helios-node
ff417fe3fe90f85c9f95b3d8a5f0dd4c80532ee8
[ "MIT" ]
null
null
null
helios/extensibility/plugin_manager.py
hyperevo/py-helios-node
ff417fe3fe90f85c9f95b3d8a5f0dd4c80532ee8
[ "MIT" ]
null
null
null
from abc import ( ABC, abstractmethod, ) from argparse import ( ArgumentParser, Namespace, _SubParsersAction, ) import asyncio import logging from typing import ( Any, Awaitable, Dict, Iterable, List, Optional, Union, ) from lahja import ( Endpoint, EventBus, ) ...
33.977528
98
0.622575
9f26b375d9428c4b6cc2841227ca29e34bfef14f
7,285
py
Python
build/webpage.py
munkm/yt-3.0-paper
f0fd907ae1cdec74e4b7bf880c812d9046bfcc44
[ "CC-BY-4.0", "CC0-1.0" ]
9
2019-05-06T10:33:03.000Z
2021-12-15T17:36:21.000Z
build/webpage.py
munkm/yt-3.0-paper
f0fd907ae1cdec74e4b7bf880c812d9046bfcc44
[ "CC-BY-4.0", "CC0-1.0" ]
38
2019-05-06T17:13:44.000Z
2019-10-22T23:27:44.000Z
build/webpage.py
munkm/yt-3.0-paper
f0fd907ae1cdec74e4b7bf880c812d9046bfcc44
[ "CC-BY-4.0", "CC0-1.0" ]
3
2019-07-25T13:15:42.000Z
2020-10-22T23:56:51.000Z
import argparse import os import pathlib import shutil import subprocess def parse_arguments(): """ Read and process command line arguments. """ parser = argparse.ArgumentParser() parser.add_argument( '--checkout', nargs='?', const='gh-pages', default=None, help='branch to ...
33.726852
207
0.650377
34930793f5479d421143fdadea404fa86e33751b
332
py
Python
tests/blackbox/conftest.py
biocatchltd/Heksher
b50b3659a606cb188437adb1f95747efb3ba7b59
[ "MIT" ]
3
2021-01-21T11:41:06.000Z
2021-10-20T06:51:53.000Z
tests/blackbox/conftest.py
biocatchltd/Heksher
b50b3659a606cb188437adb1f95747efb3ba7b59
[ "MIT" ]
18
2021-02-01T06:38:53.000Z
2022-02-14T13:46:33.000Z
tests/blackbox/conftest.py
biocatchltd/Heksher
b50b3659a606cb188437adb1f95747efb3ba7b59
[ "MIT" ]
null
null
null
from docker import DockerClient from pytest import fixture @fixture(scope='session') def docker_client(): # todo improve when yellowbox is upgraded try: ret = DockerClient.from_env() ret.ping() except Exception: return DockerClient(base_url='tcp://localhost:2375') else: ...
22.133333
60
0.671687
0aa3199c6901dc582ca0d843e830d822aa796709
993
py
Python
script/debug ast/ast_IfJump.py
virtuNat/discord.ATH
fb6473708cc0c1db2d5d5ba48ea53c1d6a8b0bb9
[ "MIT" ]
2
2017-12-12T03:34:59.000Z
2017-12-17T22:33:37.000Z
script/debug ast/ast_IfJump.py
GiovanH/discord.-ATH
aa73ccd56736525a7f7018e4e11ab5b6ea706e88
[ "MIT" ]
null
null
null
script/debug ast/ast_IfJump.py
GiovanH/discord.-ATH
aa73ccd56736525a7f7018e4e11ab5b6ea706e88
[ "MIT" ]
2
2017-11-16T03:43:24.000Z
2017-11-30T06:07:37.000Z
#!/usr/bin/env python from athstmt import * from athinterpreter import TildeAthInterp stmts = AthStatementList([ AthTokenStatement('PROCREATE', [IdentifierToken('TEST'), None]), TildeAthLoop(False, AthStatementList([ CondiJump([IdentifierToken('TEST'), 3]), AthTokenStatement('print', [LiteralTo...
43.173913
109
0.645519
2d0c3fc6520b68a085d096b9b11063d85980024d
2,885
py
Python
pyrobolearn/models/hmm/hmm.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
2
2021-01-21T21:08:30.000Z
2022-03-29T16:45:49.000Z
pyrobolearn/models/hmm/hmm.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
null
null
null
pyrobolearn/models/hmm/hmm.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
1
2020-09-29T21:25:39.000Z
2020-09-29T21:25:39.000Z
# This file describes the Hidden Markov Model # -*- coding: utf-8 -*- # TODO: implement this model from gaussian import Gaussian from model import Model from hmmlearn.hmm import GaussianHMM class HMM(object): r"""Hidden Markov Models Description: emission probabilities, transition probabilities,... Re...
21.691729
109
0.581282
effb8307d9b417e58b1bf4bbd557bd63b2e4224f
750
py
Python
HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltCandidateJetProbabilityComputer_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:24:46.000Z
2021-11-30T16:24:46.000Z
HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltCandidateJetProbabilityComputer_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
4
2021-11-29T13:57:56.000Z
2022-03-29T06:28:36.000Z
HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltCandidateJetProbabilityComputer_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:16:05.000Z
2021-11-30T16:16:05.000Z
import FWCore.ParameterSet.Config as cms hltCandidateJetProbabilityComputer = cms.ESProducer("CandidateJetProbabilityESProducer", a_dR = cms.double(-0.001053), a_pT = cms.double(0.005263), b_dR = cms.double(0.6263), b_pT = cms.double(0.3684), deltaR = cms.double(0.3), impactParameterType = cms....
34.090909
88
0.688
84fa1c3fdf7c7bd189fb84d48ab1971564996570
3,682
py
Python
scripts/environments/hexagon/convert_to_polar.py
bhillmann/hexalys
c6c102b90e2684f1c85992eaae6325b8be0c8aa6
[ "MIT" ]
null
null
null
scripts/environments/hexagon/convert_to_polar.py
bhillmann/hexalys
c6c102b90e2684f1c85992eaae6325b8be0c8aa6
[ "MIT" ]
null
null
null
scripts/environments/hexagon/convert_to_polar.py
bhillmann/hexalys
c6c102b90e2684f1c85992eaae6325b8be0c8aa6
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import scipy as sp import scipy.ndimage def main(): from environments.hexagon import open_hexagon_emulator img = open_hexagon_emulator.captureIm() plot_cart_image(img) plot_polar_image(img) def plot_polar_image(data, origin=None): """Plots an i...
30.941176
78
0.648561
0ff6d44f888b334920506c43455f300a3e542fe5
208
py
Python
tph/learn/views.py
ono-t01/django-rpi-tph-monitor
30894d937ece11f8c7d087dd735cd79b203f0cf4
[ "MIT" ]
null
null
null
tph/learn/views.py
ono-t01/django-rpi-tph-monitor
30894d937ece11f8c7d087dd735cd79b203f0cf4
[ "MIT" ]
null
null
null
tph/learn/views.py
ono-t01/django-rpi-tph-monitor
30894d937ece11f8c7d087dd735cd79b203f0cf4
[ "MIT" ]
null
null
null
""" Views contoroller. @date 10 January 2020 @author mitsuhisaT <asihustim@gmail.com> """ import logging from django.shortcuts import render logger = logging.getLogger(__name__) # Create your views here.
14.857143
40
0.764423
75458d4d45bd100783dd847892a4fdae5a238d95
30,667
py
Python
data-pipeline/bcreg/tests/bcreg_scenario_generation_test.py
esune/von-bc-registries-agent
712008543e579eee46be23c418f2eeb41626bfcd
[ "Apache-2.0" ]
1
2019-09-06T07:40:15.000Z
2019-09-06T07:40:15.000Z
data-pipeline/bcreg/tests/bcreg_scenario_generation_test.py
esune/von-bc-registries-agent
712008543e579eee46be23c418f2eeb41626bfcd
[ "Apache-2.0" ]
null
null
null
data-pipeline/bcreg/tests/bcreg_scenario_generation_test.py
esune/von-bc-registries-agent
712008543e579eee46be23c418f2eeb41626bfcd
[ "Apache-2.0" ]
1
2019-06-12T13:47:22.000Z
2019-06-12T13:47:22.000Z
import time from bcreg.bcregistries import BCRegistries, system_type, MIN_START_DATE, MAX_END_DATE from bcreg.eventprocessor import EventProcessor from bcreg.tests.sample_corps import sample_test_corps def test_generate_corp_sql(): specific_corps = [ 'A0059733','A0040189','A0059933','A006093...
102.565217
619
0.69671
7b28fc9e2a06ba75944fa9f03de47a767c89d64e
2,051
py
Python
kiwi_scp/commands/decorators.py
yavook/kiwi-scp
ca4263d913cfbdedc8b14334e3cad61c3b95f0a7
[ "MIT" ]
null
null
null
kiwi_scp/commands/decorators.py
yavook/kiwi-scp
ca4263d913cfbdedc8b14334e3cad61c3b95f0a7
[ "MIT" ]
null
null
null
kiwi_scp/commands/decorators.py
yavook/kiwi-scp
ca4263d913cfbdedc8b14334e3cad61c3b95f0a7
[ "MIT" ]
null
null
null
from typing import Callable, Type, Optional, Tuple import click from .cmd import KiwiCommandType, KiwiCommand from ..instance import Instance _pass_instance = click.make_pass_decorator( Instance, ensure=True, ) _project_arg = click.argument( "project_name", metavar="PROJECT", type=str, ) _proje...
24.416667
110
0.612384
55959675db0e9ab6b53e6e9266e0ae547aa52c22
701
py
Python
view/distanceinfobox.py
siralmat/2018-trek-assignment
522186e1dfceb0253ad18d8cf82b5c9ddc0ee7bb
[ "MIT" ]
null
null
null
view/distanceinfobox.py
siralmat/2018-trek-assignment
522186e1dfceb0253ad18d8cf82b5c9ddc0ee7bb
[ "MIT" ]
null
null
null
view/distanceinfobox.py
siralmat/2018-trek-assignment
522186e1dfceb0253ad18d8cf82b5c9ddc0ee7bb
[ "MIT" ]
null
null
null
""" Module: distanceinfobox Author: siralmat """ from PyQt5 import QtWidgets as Qw from view.ui_distanceinfobox import Ui_DistanceInfoBox class DistanceInfoBox(Qw.QWidget): """Small widget to display information about a distance.""" def __init__(self, parent): """Set up layout.""" super().__in...
30.478261
71
0.669044
49df766becac117cc7713fbc7f92a7c9c0aa124a
1,258
py
Python
host/nodeserver/src/nodetypes.py
jbernardis/mycmri
8b84d7483ec42c31dc0da57a46f6d4d264a43836
[ "MIT" ]
null
null
null
host/nodeserver/src/nodetypes.py
jbernardis/mycmri
8b84d7483ec42c31dc0da57a46f6d4d264a43836
[ "MIT" ]
null
null
null
host/nodeserver/src/nodetypes.py
jbernardis/mycmri
8b84d7483ec42c31dc0da57a46f6d4d264a43836
[ "MIT" ]
null
null
null
OUTPUT_ON = b'1' OUTPUT_OFF = b'0' OUTPUT_PULSE = b'P' OUTPUT_CURRENT = b'O' INPUT_DELTA = b'D' INPUT_CURRENT = b'C' TURNOUT_NORMAL = b'N' TURNOUT_REVERSE = b'R' IDENTIFY = b'Y' SERVO_ANGLE = b'A' SET_TURNOUT = b'T' GET_TURNOUT = b'G' CONFIG = b'F' ACKNOWLEDGE = b'!' STORE = b'W' ERRORRESPONSE = b'E' WARNINGRESPONSE = ...
20.966667
42
0.689189
7d8dd6aaeeeb357d01d33ca9b2e3f07540c96bb5
1,861
py
Python
03_SweynTooth/libs/scapy/extlib.py
Charmve/BLE-Security-Att-Def
3652d84bf4ac0c694bb3c4c0f611098da9122af0
[ "BSD-2-Clause" ]
149
2020-10-23T23:31:51.000Z
2022-03-15T00:25:35.000Z
03_SweynTooth/libs/scapy/extlib.py
Charmve/BLE-Security-Att-Def
3652d84bf4ac0c694bb3c4c0f611098da9122af0
[ "BSD-2-Clause" ]
1
2021-04-12T19:24:00.000Z
2021-04-27T03:11:07.000Z
03_SweynTooth/libs/scapy/extlib.py
Charmve/BLE-Security-Att-Def
3652d84bf4ac0c694bb3c4c0f611098da9122af0
[ "BSD-2-Clause" ]
22
2020-11-17T02:52:40.000Z
2022-03-15T00:26:38.000Z
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ External link to programs """ import os import subprocess from scapy.error import log_loading # Notice: this file must n...
29.078125
112
0.675981
6a1203ccf0cc099c355da1cafb7f88311692c9fd
577
py
Python
insta/migrations/0004_auto_20180515_1050.py
muturi254/instagram
8b8196ce0a1b5cefbe24d63202086479f0f06b27
[ "MIT" ]
1
2018-05-11T11:25:13.000Z
2018-05-11T11:25:13.000Z
insta/migrations/0004_auto_20180515_1050.py
muturi254/instagram
8b8196ce0a1b5cefbe24d63202086479f0f06b27
[ "MIT" ]
null
null
null
insta/migrations/0004_auto_20180515_1050.py
muturi254/instagram
8b8196ce0a1b5cefbe24d63202086479f0f06b27
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-05-15 10:50 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('insta', '0003_auto_20180515_...
25.086957
110
0.670711
e67431fca83cf2d85c3a01ff732f78a60fa4b7e8
1,926
py
Python
src/gtk/toga_gtk/widgets/webview.py
d3r3kk/toga
2d8c0eb30371c4ef4f0610251233569e9c618e93
[ "BSD-3-Clause" ]
2
2019-02-19T17:19:24.000Z
2020-04-13T21:22:24.000Z
src/gtk/toga_gtk/widgets/webview.py
d3r3kk/toga
2d8c0eb30371c4ef4f0610251233569e9c618e93
[ "BSD-3-Clause" ]
2
2019-10-26T20:54:06.000Z
2019-10-26T21:43:43.000Z
src/gtk/toga_gtk/widgets/webview.py
d3r3kk/toga
2d8c0eb30371c4ef4f0610251233569e9c618e93
[ "BSD-3-Clause" ]
4
2019-02-13T17:54:15.000Z
2019-10-26T21:16:27.000Z
import gi from gi.repository import Gtk # The following import will fail if WebKit or it's API wrappers aren't # installed; handle failure gracefully # (see https://github.com/pybee/toga/issues/26) # Accept any API version greater than 3.0 WebKit2 = None for version in ['4.0', '3.0']: try: gi.require_vers...
31.57377
162
0.669782
f890932fe5c436f898b9c2d5be81c458df61f84c
6,535
py
Python
sqlparse/formatter.py
vmuriart/sqlparse
0c1c96e237269ba6b964a766c4fc2fc503af5d9c
[ "BSD-3-Clause" ]
1
2017-06-26T01:39:21.000Z
2017-06-26T01:39:21.000Z
sqlparse/formatter.py
vmuriart/sqlparse
0c1c96e237269ba6b964a766c4fc2fc503af5d9c
[ "BSD-3-Clause" ]
2
2016-05-25T01:09:04.000Z
2016-05-30T18:06:17.000Z
sqlparse/formatter.py
vmuriart/sqlparse
0c1c96e237269ba6b964a766c4fc2fc503af5d9c
[ "BSD-3-Clause" ]
1
2020-04-27T10:41:31.000Z
2020-04-27T10:41:31.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2016 Andi Albrecht, albrecht.andi@gmail.com # # This module is part of python-sqlparse and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php """SQL formatter""" from sqlparse import filters from sqlparse.exceptions import SQLParseError ...
37.342857
78
0.633665
5f67cf5afe18ca0462bbc3e7dcf6d3059249d48b
18,587
py
Python
CRNN/train_crnn.py
erichan2046/Multi-Label-Text-Classification-1
6e36d0566240eb8e44eda69e90a04e83e199f147
[ "Apache-2.0" ]
null
null
null
CRNN/train_crnn.py
erichan2046/Multi-Label-Text-Classification-1
6e36d0566240eb8e44eda69e90a04e83e199f147
[ "Apache-2.0" ]
null
null
null
CRNN/train_crnn.py
erichan2046/Multi-Label-Text-Classification-1
6e36d0566240eb8e44eda69e90a04e83e199f147
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- __author__ = 'Randolph' import os import sys import time import logging import tensorflow as tf from utils import data_helpers as dh from text_crnn import TextCRNN from tensorboard.plugins import projector # Parameters # ================================================== TRAIN_OR_RESTORE = in...
52.654391
119
0.616237
ecac3ada13d33e9f972abda546f10c98cc6ac365
32,847
py
Python
Gem/PythonTests/Automated/atom_utils/hydra_editor_utils.py
aws-lumberyard-dev/o3de-atomtest
d14f88e8649a7de86945906376fcf3e60c81d339
[ "Apache-2.0", "MIT" ]
2
2021-07-18T11:20:41.000Z
2022-02-01T20:17:50.000Z
Gem/PythonTests/Automated/atom_utils/hydra_editor_utils.py
aws-lumberyard-dev/o3de-atomtest
d14f88e8649a7de86945906376fcf3e60c81d339
[ "Apache-2.0", "MIT" ]
5
2021-07-14T02:24:07.000Z
2021-10-04T21:24:35.000Z
Gem/PythonTests/Automated/atom_utils/hydra_editor_utils.py
aws-lumberyard-dev/o3de-atomtest
d14f88e8649a7de86945906376fcf3e60c81d339
[ "Apache-2.0", "MIT" ]
7
2021-07-06T18:21:14.000Z
2021-12-06T09:12:40.000Z
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ import collections.abc import os from typing import List from math import isclose import azlmbr.bus as bus impo...
43.50596
141
0.720857
ee7629361ad0396ffd40a08da825ed558afbd26f
198
py
Python
Data science/Analise de dados/exercicio python/Exemplo01.py
Andrelirao/aulas-graduacao
c7e8ebf1ad6b5309720bab9ea0a2472d153cd169
[ "MIT" ]
10
2021-04-06T23:45:09.000Z
2021-05-26T00:20:28.000Z
Data science/Analise de dados/exercicio python/Exemplo01.py
Andrelirao/aulas-graduacao
c7e8ebf1ad6b5309720bab9ea0a2472d153cd169
[ "MIT" ]
37
2021-03-22T12:41:55.000Z
2021-06-29T00:42:50.000Z
Data science/Analise de dados/exercicio python/Exemplo01.py
Andrelirao/aulas-graduacao
c7e8ebf1ad6b5309720bab9ea0a2472d153cd169
[ "MIT" ]
10
2020-05-19T23:23:29.000Z
2021-09-07T13:49:58.000Z
# -*- coding: utf-8 -*- """ Created on Fri Apr 17 08:39:11 2020 @author: luisc """ import csv arquivo = open('titanic.csv'); linhas = csv.reader(arquivo); for linha in linhas: print(linha)
12.375
35
0.636364
76e1792b5f47d6d8a073f3cf1c71e3c950522974
30,684
py
Python
amratom/space.py
arturgontijo/singnet-das
e92f6e4818687b35e33bb78c13eb843badf28383
[ "MIT" ]
null
null
null
amratom/space.py
arturgontijo/singnet-das
e92f6e4818687b35e33bb78c13eb843badf28383
[ "MIT" ]
null
null
null
amratom/space.py
arturgontijo/singnet-das
e92f6e4818687b35e33bb78c13eb843badf28383
[ "MIT" ]
null
null
null
import logging import io import random import re from copy import deepcopy from contextlib import contextmanager from opencog.atomspace import create_child_atomspace, Atom from opencog.utilities import push_default_atomspace, pop_default_atomspace from opencog.type_constructors import * from opencog.bindlink import ex...
46.77439
111
0.559249
5554a1593e734bb5a814947adb5878e8049db65d
526
py
Python
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/lokl-30054
4ee7f41bc8ab7b55ea06e273b4764ee7bff5fd43
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/lokl-30054
4ee7f41bc8ab7b55ea06e273b4764ee7bff5fd43
[ "FTL", "AML", "RSA-MD" ]
10
2021-08-29T22:26:13.000Z
2022-03-20T15:31:39.000Z
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/lokl-30054
4ee7f41bc8ab7b55ea06e273b4764ee7bff5fd43
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "lokl-30054.botics.co" site_params = { "name": "lokl", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(default...
20.230769
61
0.65019
3494c6ef31fd8f39c3ab276723124d5dd8672026
14,111
py
Python
cinder/tests/hacking/checks.py
cloudification-io/cinder
23d76e01f2b4f3771b57fb287084a4884238b827
[ "Apache-2.0" ]
571
2015-01-01T17:47:26.000Z
2022-03-23T07:46:36.000Z
cinder/tests/hacking/checks.py
dFarui/cinder
b2922384054ddbd46e071fd07372a75a21d7f85d
[ "Apache-2.0" ]
37
2015-01-22T23:27:04.000Z
2021-02-05T16:38:48.000Z
cinder/tests/hacking/checks.py
dFarui/cinder
b2922384054ddbd46e071fd07372a75a21d7f85d
[ "Apache-2.0" ]
841
2015-01-04T17:17:11.000Z
2022-03-31T12:06:51.000Z
# Copyright (c) 2014 OpenStack Foundation. # # 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 ...
36.275064
79
0.638013
5aeb136361b33cf15c31e98429e70ac5071ad578
4,725
py
Python
local_data_api/models.py
Apoalex92/local-data-api
19e9274c20b9eaabc4bc619a0aa75c9a7fa9020b
[ "MIT" ]
null
null
null
local_data_api/models.py
Apoalex92/local-data-api
19e9274c20b9eaabc4bc619a0aa75c9a7fa9020b
[ "MIT" ]
null
null
null
local_data_api/models.py
Apoalex92/local-data-api
19e9274c20b9eaabc4bc619a0aa75c9a7fa9020b
[ "MIT" ]
null
null
null
from __future__ import annotations from base64 import b64encode from datetime import date, datetime, time from decimal import Decimal from enum import Enum from typing import Any, Callable, Dict, List, Optional, Union from pydantic import BaseModel from pydantic import Field as Field_ TYPE_HINT_TO_CONVERTER: Dict[st...
28.293413
86
0.700741
1db6bc1256dbdab53489d47cf4851b977810125b
1,656
py
Python
kunquat/tracker/ui/views/sheet/replacebutton.py
cyberixae/kunquat
06ae72b2c1519686cc510ce887d9d45a5c3fa3a3
[ "CC0-1.0" ]
null
null
null
kunquat/tracker/ui/views/sheet/replacebutton.py
cyberixae/kunquat
06ae72b2c1519686cc510ce887d9d45a5c3fa3a3
[ "CC0-1.0" ]
null
null
null
kunquat/tracker/ui/views/sheet/replacebutton.py
cyberixae/kunquat
06ae72b2c1519686cc510ce887d9d45a5c3fa3a3
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Author: Tomi Jylhä-Ollila, Finland 2014 # # This file is part of Kunquat. # # CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/ # # To the extent possible under law, Kunquat Affirmers have waived all # copyright and related or neighboring rights to Kunquat. # from PyQt4....
27.6
70
0.682367
e247eef10ee10ab97e46d7055b02b982ce1f2017
3,096
py
Python
modules/disabled/api_anilist.py
Kubinyete/navibot
89526dcbab322aa135a7ee517d2c0f454b4550be
[ "MIT" ]
null
null
null
modules/disabled/api_anilist.py
Kubinyete/navibot
89526dcbab322aa135a7ee517d2c0f454b4550be
[ "MIT" ]
null
null
null
modules/disabled/api_anilist.py
Kubinyete/navibot
89526dcbab322aa135a7ee517d2c0f454b4550be
[ "MIT" ]
null
null
null
import io from navibot.client import BotCommand, Slider from navibot.errors import CommandError from libs.anilist import AniListApi class CAnilist(BotCommand): def __init__(self, bot): super().__init__( bot, name = "anilist", aliases = ['anl'], description ...
34.786517
146
0.476421
4288a9929c057a4c012430e03bf585ab28ccbd91
2,236
py
Python
Course_1/mergesort_countinv.py
julesbertrand/Stanford-alg
068a76d3b3108df6fb09136fbfe373648bbfbe90
[ "MIT" ]
null
null
null
Course_1/mergesort_countinv.py
julesbertrand/Stanford-alg
068a76d3b3108df6fb09136fbfe373648bbfbe90
[ "MIT" ]
null
null
null
Course_1/mergesort_countinv.py
julesbertrand/Stanford-alg
068a76d3b3108df6fb09136fbfe373648bbfbe90
[ "MIT" ]
null
null
null
""" ### Merge sort Complexity: - $6n$ operations per level - $\log_2(n)$ recursive calls - Total in time : $6n \log_2(n) + 6n = O(n\log(n))$ - In memory: $O(n)$ as need not in place Inversions algorithm Complexity: same as merge sort, $O(n\log(n))$ in time and $O(n)$ in memory """ import numpy as np def merge_sor...
23.536842
62
0.386852
6addd0ec6af996106ff183a132355ee076aceabf
8,928
py
Python
test/test_client.py
rowenarono95/radiant-mlhub
c79629c7b8cd90950224a6424091e8b23c07ec12
[ "Apache-2.0" ]
null
null
null
test/test_client.py
rowenarono95/radiant-mlhub
c79629c7b8cd90950224a6424091e8b23c07ec12
[ "Apache-2.0" ]
null
null
null
test/test_client.py
rowenarono95/radiant-mlhub
c79629c7b8cd90950224a6424091e8b23c07ec12
[ "Apache-2.0" ]
null
null
null
import os from radiant_mlhub.session import Session from urllib.parse import urljoin, parse_qs, urlsplit import pytest import radiant_mlhub.client from radiant_mlhub.exceptions import EntityDoesNotExist, MLHubException, AuthenticationError class TestClient: @pytest.mark.vcr def test_collection_does_not_exi...
38.317597
112
0.699933
d964e44cb575cab78593d5119a02ad97491338db
72,266
py
Python
azure-iot-device/tests/iothub/shared_client_tests.py
jimbobbennett/azure-iot-sdk-python
06cee421761d80b9d7d761bd23a7c6876bf7fdd3
[ "MIT" ]
null
null
null
azure-iot-device/tests/iothub/shared_client_tests.py
jimbobbennett/azure-iot-sdk-python
06cee421761d80b9d7d761bd23a7c6876bf7fdd3
[ "MIT" ]
null
null
null
azure-iot-device/tests/iothub/shared_client_tests.py
jimbobbennett/azure-iot-sdk-python
06cee421761d80b9d7d761bd23a7c6876bf7fdd3
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """This mo...
43.718088
193
0.710099
8ffbb2fa1497afc4bb951b792bf7223c9a8ccaa2
5,939
py
Python
training_pipelines.py
FreedomSlow/Recommendation-Systems
9799ce1ef8c5a5dc89fb2059c081065c87b4f294
[ "Apache-2.0" ]
null
null
null
training_pipelines.py
FreedomSlow/Recommendation-Systems
9799ce1ef8c5a5dc89fb2059c081065c87b4f294
[ "Apache-2.0" ]
null
null
null
training_pipelines.py
FreedomSlow/Recommendation-Systems
9799ce1ef8c5a5dc89fb2059c081065c87b4f294
[ "Apache-2.0" ]
null
null
null
import torch from tqdm import tqdm import utils from torch.utils.tensorboard import SummaryWriter import loss_functions import torchmetrics def train_recommendation_model(net, train_iter, val_iter, epochs, learning_rate=1e-4, loss=None, device=None, save_optim=None, scheduler=None, sche...
35.993939
111
0.618623
ebe647946eebe2329f093676e72fa6b7122b5f8f
644
py
Python
hrp/researches/migrations/0016_review_research.py
ken-mathenge/health_research_portal
e7e5ac8109c002a2d666c27ad076bbe040e00e5f
[ "MIT" ]
1
2020-01-21T10:27:35.000Z
2020-01-21T10:27:35.000Z
hrp/researches/migrations/0016_review_research.py
ken-mathenge/health_research_portal
e7e5ac8109c002a2d666c27ad076bbe040e00e5f
[ "MIT" ]
13
2020-03-23T09:25:15.000Z
2020-07-14T12:41:14.000Z
hrp/researches/migrations/0016_review_research.py
KennethMathenge/health_research_portal
e7e5ac8109c002a2d666c27ad076bbe040e00e5f
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-03-17 09:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("researches", "0015_review_reviewchecklist"), ] operations = [ migrations.AddField( model_name="...
24.769231
60
0.57764