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
958d94cf080ae3091570afce88a5e68658678c8a
5,297
py
Python
data/p3BR/R1/benchmark/startQiskit_QC145.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startQiskit_QC145.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startQiskit_QC145.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=28 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from...
28.788043
140
0.628469
21a99c53a1fff9b635b517b2588e50411d486e40
7,263
py
Python
scripts/spikeglx_spikeinterface_pipeline.py
catalystneuro/brody-lab-to-nwb
bb792591eae988b2dec1a3a608979832da8f884d
[ "MIT" ]
null
null
null
scripts/spikeglx_spikeinterface_pipeline.py
catalystneuro/brody-lab-to-nwb
bb792591eae988b2dec1a3a608979832da8f884d
[ "MIT" ]
10
2021-05-24T22:17:27.000Z
2022-03-30T05:42:02.000Z
scripts/spikeglx_spikeinterface_pipeline.py
catalystneuro/brody-lab-to-nwb
bb792591eae988b2dec1a3a608979832da8f884d
[ "MIT" ]
null
null
null
# SpikeInterface pipeline for Brody Lab from pathlib import Path from pprint import pprint import spikeextractors as se import spiketoolkit as st import spikesorters as ss n_jobs = 4 chunk_mb = 2000 export_raw_to_phy = False export_curated_to_phy = True # Define sorter and params sorter = "ironclust" sorter_param...
30.775424
109
0.751755
95b740680b31f20497ef0d2967797db745319771
381
py
Python
SegregateEvenOdd.py
jissdeodates/Data-Structures-using-Python
4c143976b7d38d62af57e0d2fadb96121f7658e6
[ "Apache-2.0" ]
null
null
null
SegregateEvenOdd.py
jissdeodates/Data-Structures-using-Python
4c143976b7d38d62af57e0d2fadb96121f7658e6
[ "Apache-2.0" ]
7
2021-10-05T17:31:16.000Z
2021-10-05T18:12:28.000Z
SegregateEvenOdd.py
jissdeodates/Data-Structures-using-Python
4c143976b7d38d62af57e0d2fadb96121f7658e6
[ "Apache-2.0" ]
7
2021-10-04T05:33:50.000Z
2021-10-05T18:09:30.000Z
# fn to segregate even and odd numbers in array # Time Complexity = O(n) & Space Complexity = O(1) def segregate_even_odd(arr,n): i = -1 j = 0 while j != n: if arr[j] % 2 == 0: i += 1 arr[i],arr[j] = arr[j],arr[i] j += 1 return arr # Driver's Code arr = [7,5,8,4...
21.166667
50
0.530184
9c6ed126069f51b8e0d3b76e2935cf2b3a9d84d8
1,754
py
Python
Lab1-2/tests.py
AriosJentu/BigDataCource
2f46296d9637148d67326fdbfa791b313124d479
[ "MIT" ]
null
null
null
Lab1-2/tests.py
AriosJentu/BigDataCource
2f46296d9637148d67326fdbfa791b313124d479
[ "MIT" ]
null
null
null
Lab1-2/tests.py
AriosJentu/BigDataCource
2f46296d9637148d67326fdbfa791b313124d479
[ "MIT" ]
null
null
null
import pytest from model import PictureFile def test_file_lab1_p1(): file = PictureFile("tests/lab1f1.json") file.open() file.read_meta() file.close() assert file.width == file.height == 3 def test_file_lab1_p2_default(): file = PictureFile("tests/lab1f2.json") file.open() file.read_meta() data = "[" d...
15.522124
47
0.620867
092a497bb66aa323912955ef276311603ecf4b0a
902
py
Python
apps/shasta/matrixMultiplication3.py
praneethnamburi/blender-ScriptViz
95554873ecebc0aa6b151d90d2ecf952be4b8880
[ "MIT" ]
10
2020-06-12T06:39:11.000Z
2022-02-03T00:24:28.000Z
apps/shasta/matrixMultiplication3.py
praneethnamburi/blender-ScriptViz
95554873ecebc0aa6b151d90d2ecf952be4b8880
[ "MIT" ]
null
null
null
apps/shasta/matrixMultiplication3.py
praneethnamburi/blender-ScriptViz
95554873ecebc0aa6b151d90d2ecf952be4b8880
[ "MIT" ]
1
2021-04-13T01:55:16.000Z
2021-04-13T01:55:16.000Z
"""Demonstrate matrix multiplication on points forming 3d objects using blender.""" from bpn_init import * #pylint: disable=wildcard-import, unused-wildcard-import bpy.data.scenes['Scene'].cursor.location[0] = -10 msh = get('Suzy') if not msh: msh = bpn.new.monkey('Suzy') coords = msh.v.T # Exercis...
21.47619
84
0.569845
39fb68983b91158f6c945ebf447373176e336059
20,292
py
Python
AutoDiff/forwardNode.py
chelsilarious/AutoDiff
b4ff703f85288bafd85148edb093d7cd47cbed50
[ "MIT" ]
null
null
null
AutoDiff/forwardNode.py
chelsilarious/AutoDiff
b4ff703f85288bafd85148edb093d7cd47cbed50
[ "MIT" ]
null
null
null
AutoDiff/forwardNode.py
chelsilarious/AutoDiff
b4ff703f85288bafd85148edb093d7cd47cbed50
[ "MIT" ]
null
null
null
import numpy as np class ForwardNode(): def __init__(self, value, trace=1.0, var='x1'): ''' Constructor =========== Input: self - a ForwardNode variable value - int/flot, specifying the value of the current variable trace - int/float/np.array, derivative(s) ...
35.78836
146
0.550956
510e888a09f37f77ff4bf7e4a39879286468cb55
915
py
Python
mp_server/src/api_requests.py
daryu519/2021-2-OSSProj-OTS-7
136e0e78164b5acc7c631dd7629b775ba62fc823
[ "MIT" ]
null
null
null
mp_server/src/api_requests.py
daryu519/2021-2-OSSProj-OTS-7
136e0e78164b5acc7c631dd7629b775ba62fc823
[ "MIT" ]
null
null
null
mp_server/src/api_requests.py
daryu519/2021-2-OSSProj-OTS-7
136e0e78164b5acc7c631dd7629b775ba62fc823
[ "MIT" ]
null
null
null
import requests from .config import DB_SERVER_URL try: from .secret_key import SECRET_KEY async def db_post_winner(user_id: str): try: requests.post(url=DB_SERVER_URL + '/winner', data={'name': user_id, 'key': SECRET_KEY}, timeout=2) except requests.exceptions.Timeout: p...
30.5
110
0.642623
50f0fbcb31f76e9ec7913ab5b64bc79614ce7913
28,861
py
Python
tests/integration/roster/test_nhl_roster.py
MArtinherz/sportsipy
24f4c1d5e3bb8ecc56e21568961588491e9cfd2a
[ "MIT" ]
221
2018-05-15T19:48:03.000Z
2021-01-05T15:36:21.000Z
tests/integration/roster/test_nhl_roster.py
MArtinherz/sportsipy
24f4c1d5e3bb8ecc56e21568961588491e9cfd2a
[ "MIT" ]
502
2018-07-25T03:09:26.000Z
2021-01-06T16:07:02.000Z
tests/integration/roster/test_nhl_roster.py
MArtinherz/sportsipy
24f4c1d5e3bb8ecc56e21568961588491e9cfd2a
[ "MIT" ]
72
2021-01-21T13:17:00.000Z
2022-03-31T21:43:25.000Z
import mock import os import pandas as pd import pytest from flexmock import flexmock from sportsipy import utils from sportsipy.nhl.roster import Player, Roster from sportsipy.nhl.teams import Team YEAR = 2018 def read_file(filename): filepath = os.path.join(os.path.dirname(__file__), 'nhl', filename) retu...
37.875328
78
0.554659
5f1f898ed62872f28d1fbf504aa39da8df67d212
9,103
py
Python
test/t_compliance/t_check/test_base_check.py
tsehrer/auditree-framework
aa76b5450f7a77c1078048c226b1601a560d9779
[ "Apache-2.0" ]
null
null
null
test/t_compliance/t_check/test_base_check.py
tsehrer/auditree-framework
aa76b5450f7a77c1078048c226b1601a560d9779
[ "Apache-2.0" ]
15
2020-11-10T23:01:35.000Z
2021-08-19T23:30:27.000Z
test/t_compliance/t_check/test_base_check.py
dlminvestments/auditree-framework
19858c17797a7626fe20f0489d1aab163c6d69ec
[ "Apache-2.0" ]
null
null
null
# -*- mode:python; coding:utf-8 -*- # Copyright (c) 2020 IBM Corp. 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 # # ...
38.901709
79
0.604196
882027f070477a8df4032f7079aa2d1653bb0a7f
5,604
py
Python
ascend/data/tensor.py
bazige/ascendfly
cb176fd35b7f71e2e529f00583edc110f9afd364
[ "Apache-2.0" ]
2
2021-09-17T02:47:50.000Z
2022-02-12T03:21:52.000Z
ascend/data/tensor.py
bazige/ascendfly
cb176fd35b7f71e2e529f00583edc110f9afd364
[ "Apache-2.0" ]
null
null
null
ascend/data/tensor.py
bazige/ascendfly
cb176fd35b7f71e2e529f00583edc110f9afd364
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Copyright 2020 Huawei Technologies Co., Ltd 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 Unles...
34.592593
109
0.607066
e85e69f4d1f7a200ce36362f5f98dcc0d92bc4d4
2,306
py
Python
Bounce.py
Jashu1602/Bounce
dba7cc8544401a4417db76ea0090ef5070e8db5d
[ "Apache-2.0" ]
null
null
null
Bounce.py
Jashu1602/Bounce
dba7cc8544401a4417db76ea0090ef5070e8db5d
[ "Apache-2.0" ]
null
null
null
Bounce.py
Jashu1602/Bounce
dba7cc8544401a4417db76ea0090ef5070e8db5d
[ "Apache-2.0" ]
null
null
null
from tkinter import* import random import time tk=Tk() tk.title("Bounce!") tk.resizable(0,0) tk.wm_attributes("-topmost",1) canvas=Canvas(tk,width=500,height=500,bd=0,highlightthickness=0) canvas.pack() tk.update() class Ball: def __init__(self,canvas,paddle,color): self.canvas=canvas self.paddle=p...
27.783133
64
0.579358
82a8faac8e564ce45118ebfa8c39b88d3434987a
6,221
py
Python
aiokubernetes/watch/watch.py
tantioch/aiokubernetes
2f332498598ece14d22f8e59ecb02665db6db68d
[ "Apache-2.0" ]
1
2018-07-11T01:35:31.000Z
2018-07-11T01:35:31.000Z
aiokubernetes/watch/watch.py
revoteon/aiokubernetes
730eae03e4779563740f07ad3ecef180b511ac18
[ "Apache-2.0" ]
null
null
null
aiokubernetes/watch/watch.py
revoteon/aiokubernetes
730eae03e4779563740f07ad3ecef180b511ac18
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 The Kubernetes 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 or agreed to ...
38.639752
84
0.63575
c588648582e28c3af59fd7fa5d5414d97d92b219
1,158
py
Python
Basic Data Structures/array/leet_039_CombinationSum.py
rush2catch/algorithms-leetcode
38a5e6aa33d48fa14fe09c50c28a2eaabd736e55
[ "MIT" ]
null
null
null
Basic Data Structures/array/leet_039_CombinationSum.py
rush2catch/algorithms-leetcode
38a5e6aa33d48fa14fe09c50c28a2eaabd736e55
[ "MIT" ]
null
null
null
Basic Data Structures/array/leet_039_CombinationSum.py
rush2catch/algorithms-leetcode
38a5e6aa33d48fa14fe09c50c28a2eaabd736e55
[ "MIT" ]
null
null
null
# Problem: Combination Sum # Difficulty: Medium # Category: Array # Leetcode 39: https://leetcode.com/problems/combination-sum/description/ # Description: """ Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The ...
23.16
155
0.683074
007d063395c478eb9c26a7c4d4383d2f8c53e8c1
874
py
Python
osd/components/boolean.py
bmeyers/optimal-signal-demixing
87b65a9d3c02ee6b8e5156e6fc457aed041852b1
[ "BSD-3-Clause" ]
1
2021-12-17T02:58:25.000Z
2021-12-17T02:58:25.000Z
osd/components/boolean.py
bmeyers/optimal-signal-demixing
87b65a9d3c02ee6b8e5156e6fc457aed041852b1
[ "BSD-3-Clause" ]
null
null
null
osd/components/boolean.py
bmeyers/optimal-signal-demixing
87b65a9d3c02ee6b8e5156e6fc457aed041852b1
[ "BSD-3-Clause" ]
null
null
null
''' Boolean Signal This module contains the class for Boolean signal Author: Bennet Meyers ''' import numpy as np from osd.components.component import Component class Boolean(Component): def __init__(self, scale=1, shift=0, **kwargs): super().__init__(**kwargs) self.scale = scale self....
23.621622
62
0.608696
40806074398bfac17206e3af857c8690beb8f834
1,793
py
Python
python/forgetpwd.py
fanhuajun/notes
bd3b76de6dd7b11e2eb5b78f07eb575420adb459
[ "Apache-2.0" ]
2
2021-01-24T20:07:03.000Z
2021-12-09T06:23:28.000Z
python/forgetpwd.py
fanhuajun/notes
bd3b76de6dd7b11e2eb5b78f07eb575420adb459
[ "Apache-2.0" ]
null
null
null
python/forgetpwd.py
fanhuajun/notes
bd3b76de6dd7b11e2eb5b78f07eb575420adb459
[ "Apache-2.0" ]
1
2021-02-25T09:18:03.000Z
2021-02-25T09:18:03.000Z
import requests import json def forgetPwd(codeIn): url = "http://localhost:8681/ssoserver/ModifyNextServlet" querystring = {"code":codeIn,"phone":"18729968867","spm": "0.1798988093245859","username":"fanhuajun"} headers = { 'User-Agent': "PostmanRuntime/7.20.1", 'Accept': "*/*", 'Ca...
32.6
106
0.639152
978facc5c617fd975bcb593a38d537fe4215677e
21,315
py
Python
pytorch_segmentation/main.py
lutbook/pytorch-segmentation-pipeline
eb29d1bf240c158c64d81177e9be93cd958c0026
[ "MIT" ]
null
null
null
pytorch_segmentation/main.py
lutbook/pytorch-segmentation-pipeline
eb29d1bf240c158c64d81177e9be93cd958c0026
[ "MIT" ]
null
null
null
pytorch_segmentation/main.py
lutbook/pytorch-segmentation-pipeline
eb29d1bf240c158c64d81177e9be93cd958c0026
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch.nn.modules import loss from torchvision import transforms from torchvision.transforms.functional import crop from torchsummary import summary from torch.optim import SGD, lr_scheduler from torch.utils.tensorboard import SummaryWriter import os, time, cv2, argparse, functoo...
49.685315
145
0.496223
4a522bfc558a66ad6ad906c44b86cfebbfe0ebbe
2,895
py
Python
userbot/modules/create.py
newkanekibot/CilikUserbot
472b1215f0dedc33957737f6f57f8c1c93f115f0
[ "Naumen", "Condor-1.1", "MS-PL" ]
4
2022-01-31T14:35:01.000Z
2022-03-31T06:42:39.000Z
userbot/modules/create.py
newkanekibot/CilikUserbot
472b1215f0dedc33957737f6f57f8c1c93f115f0
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2022-03-19T15:54:46.000Z
2022-03-19T15:54:46.000Z
userbot/modules/create.py
newkanekibot/CilikUserbot
472b1215f0dedc33957737f6f57f8c1c93f115f0
[ "Naumen", "Condor-1.1", "MS-PL" ]
22
2022-01-29T20:29:35.000Z
2022-03-31T06:42:41.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module for filter commands """ from telethon.tl import functions from userbot import CMD_HANDLER as cmd f...
34.058824
90
0.520553
bede742a047f3b312881e571c28c842d81f9ae54
15,337
py
Python
coco-caption/pycocotools/coco.py
SimonK91/im2txt_char
c90c9e7de21f9391b8b5e8d87c87d15bd4aa788c
[ "Apache-2.0" ]
null
null
null
coco-caption/pycocotools/coco.py
SimonK91/im2txt_char
c90c9e7de21f9391b8b5e8d87c87d15bd4aa788c
[ "Apache-2.0" ]
null
null
null
coco-caption/pycocotools/coco.py
SimonK91/im2txt_char
c90c9e7de21f9391b8b5e8d87c87d15bd4aa788c
[ "Apache-2.0" ]
null
null
null
__author__ = 'tylin' __version__ = '1.0.1' # Interface for accessing the Microsoft COCO dataset. # Microsoft COCO is a large image dataset designed for object detection, # segmentation, and caption generation. pycocotools is a Python API that # assists in loading, parsing and visualizing the annotations in COCO. # Ple...
41.451351
128
0.554085
43fa7fe30409a694aa90ff9842ab450898102b1e
113
py
Python
control de repeticion/punto 1.py
Vargas13sebas/Algoritmos_programacion
84889c377952c8c8fe4f709eb111abe708410e1b
[ "MIT" ]
null
null
null
control de repeticion/punto 1.py
Vargas13sebas/Algoritmos_programacion
84889c377952c8c8fe4f709eb111abe708410e1b
[ "MIT" ]
null
null
null
control de repeticion/punto 1.py
Vargas13sebas/Algoritmos_programacion
84889c377952c8c8fe4f709eb111abe708410e1b
[ "MIT" ]
null
null
null
import math a = 10 b = 1 a = int b = int(input("digite numero : ")) suma = b + 1 print("la suma es : ",suma)
10.272727
34
0.557522
4b3145ee24abe144796478cd86e8c7cccc6fa3b0
2,697
py
Python
chrome/test/functional/tracing/tab_tracker.py
Crystalnix/BitPop
1fae4ecfb965e163f6ce154b3988b3181678742a
[ "BSD-3-Clause" ]
7
2015-05-20T22:41:35.000Z
2021-11-18T19:07:59.000Z
chrome/test/functional/tracing/tab_tracker.py
Crystalnix/BitPop
1fae4ecfb965e163f6ce154b3988b3181678742a
[ "BSD-3-Clause" ]
1
2015-02-02T06:55:08.000Z
2016-01-20T06:11:59.000Z
chrome/test/functional/tracing/tab_tracker.py
Crystalnix/BitPop
1fae4ecfb965e163f6ce154b3988b3181678742a
[ "BSD-3-Clause" ]
2
2015-12-08T00:37:41.000Z
2017-04-06T05:34:05.000Z
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import uuid class TabTracker(object): """Uniquely track tabs within a window. This allows the creation of tabs whose indices can be determined e...
32.107143
79
0.713756
ef7bd578c7bea83fe6be9a085b81dd8ee148236f
532
py
Python
superadmin/adminauth/models.py
nkmrohit/python
bd644d51909cda548684b5da98eab998564f3568
[ "Apache-2.0" ]
null
null
null
superadmin/adminauth/models.py
nkmrohit/python
bd644d51909cda548684b5da98eab998564f3568
[ "Apache-2.0" ]
null
null
null
superadmin/adminauth/models.py
nkmrohit/python
bd644d51909cda548684b5da98eab998564f3568
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Create your models here. class Person(models.Model): """ an actual singular human being """ name = models.CharField(blank=True, max_length=100) email = models.EmailField() created_at = models.DateTimeField(auto_n...
38
69
0.682331
99d2c4613091adf01cb982ccd52d36c8ee40179a
1,053
py
Python
pipeline_files/rename_abyss_contigs.py
juliadouglasf/snakemake-partial-genome-pipeline
896e46046103573b5bac1896b9fad122c34ed94b
[ "MIT" ]
2
2021-05-28T20:55:37.000Z
2021-06-02T16:47:28.000Z
pipeline_files/rename_abyss_contigs.py
juliadouglasf/snakemake-partial-genome-pipeline
896e46046103573b5bac1896b9fad122c34ed94b
[ "MIT" ]
null
null
null
pipeline_files/rename_abyss_contigs.py
juliadouglasf/snakemake-partial-genome-pipeline
896e46046103573b5bac1896b9fad122c34ed94b
[ "MIT" ]
1
2021-06-24T14:27:07.000Z
2021-06-24T14:27:07.000Z
""" Author: Jackson Eyres Copyright: Government of Canada License: MIT """ from Bio import SeqIO import os import glob import argparse def main(): parser = argparse.ArgumentParser(description='Renames Abyss contigs to more closely match SPAdes') parser.add_argument("input", type=str, he...
27.710526
102
0.602089
189257632e8195e7e9ac12deaf9c333e2508d1c5
2,235
py
Python
users/middleware.py
shubhankar5/Mitron-Achatting-app-in-django
524086254794a713110e496b70588865116c322f
[ "Apache-2.0" ]
7
2021-03-10T13:28:30.000Z
2021-12-22T15:40:16.000Z
users/middleware.py
shubhankar5/Mitron-Achatting-app-in-django
524086254794a713110e496b70588865116c322f
[ "Apache-2.0" ]
1
2022-03-11T04:29:39.000Z
2022-03-12T17:57:23.000Z
users/middleware.py
shubhankar5/Mitron-Achatting-app-in-django
524086254794a713110e496b70588865116c322f
[ "Apache-2.0" ]
4
2021-07-10T16:49:28.000Z
2022-03-11T04:54:21.000Z
from django.conf import settings from django.shortcuts import redirect from django.urls import reverse from . import views as user_views from django.core.cache import cache from datetime import datetime from django.contrib import auth import time from django.contrib import messages from django.contrib.auth import logou...
30.616438
81
0.733781
028200a9cb9fdc7f5251bb533a762409fd336958
50,927
py
Python
src/sage/combinat/sf/witt.py
drvinceknight/sage
00199fb220aa173d8585b9e90654dafd3247d82d
[ "BSL-1.0" ]
2
2015-08-11T05:05:47.000Z
2019-05-15T17:27:25.000Z
src/sage/combinat/sf/witt.py
kaushik94/sage
00199fb220aa173d8585b9e90654dafd3247d82d
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/sf/witt.py
kaushik94/sage
00199fb220aa173d8585b9e90654dafd3247d82d
[ "BSL-1.0" ]
1
2020-07-24T12:04:03.000Z
2020-07-24T12:04:03.000Z
""" Witt symmetric functions """ #***************************************************************************** # Copyright (C) 2007 Mike Hansen <mhansen@gmail.com> # 2012 Mike Zabrocki <mike.zabrocki@gmail.com> # 2013 Darij Grinberg <darijgrinberg@gmail.com> # # Distribut...
38.610311
159
0.53235
f487360ed97adf8e2a216a3c8a2bd775384d8be0
4,716
py
Python
backend/config/settings.py
itechub/Jane
3f4bbc75c5eab8fa1789c985367bdf3cc334adfb
[ "MIT" ]
4
2019-12-22T10:33:01.000Z
2020-04-19T02:46:44.000Z
backend/config/settings.py
itechub/Jane
3f4bbc75c5eab8fa1789c985367bdf3cc334adfb
[ "MIT" ]
37
2019-10-14T10:07:19.000Z
2020-09-24T15:35:30.000Z
backend/config/settings.py
itechub/Jane
3f4bbc75c5eab8fa1789c985367bdf3cc334adfb
[ "MIT" ]
null
null
null
""" Django settings for jane project. Generated by 'django-admin startproject' using Django 2.1.4. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import datetime...
27.260116
103
0.712044
8eca268e1eac0f03e5e4ab62e2deabdbd5d78694
10,578
py
Python
demos/text_to_speech_demo/python/models/mel2wave_ie.py
xcmyz/open_model_zoo
f09cd03628759e0de8d09996fb43dc8f5ba2b724
[ "Apache-2.0" ]
null
null
null
demos/text_to_speech_demo/python/models/mel2wave_ie.py
xcmyz/open_model_zoo
f09cd03628759e0de8d09996fb43dc8f5ba2b724
[ "Apache-2.0" ]
null
null
null
demos/text_to_speech_demo/python/models/mel2wave_ie.py
xcmyz/open_model_zoo
f09cd03628759e0de8d09996fb43dc8f5ba2b724
[ "Apache-2.0" ]
null
null
null
""" Copyright (c) 2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
37.378092
118
0.585839
2845d2a7ecd18dc234dcccdbc15e6a17ab853832
739
py
Python
sols/1108.py
Paul11100/LeetCode
9896c579dff1812c0c76964db8d60603ee715e35
[ "MIT" ]
null
null
null
sols/1108.py
Paul11100/LeetCode
9896c579dff1812c0c76964db8d60603ee715e35
[ "MIT" ]
null
null
null
sols/1108.py
Paul11100/LeetCode
9896c579dff1812c0c76964db8d60603ee715e35
[ "MIT" ]
null
null
null
class Solution(object): # Replace (Accepted + Top Voted), O(1) time, O(1) space (Question specifically for IP address) def defangIPaddr(self, address): """ :type address: str :rtype: str """ return address.replace('.', '[.]') # # Join and Split (Top Voted), O(1) time...
35.190476
98
0.568336
0657e4b48d78a94c42bc6056ec6410a5174907bd
2,897
py
Python
recommender_app/movies_app.py
fra-mari/Two_Movie_Recommenders
da046e06e3ee27699f51b8870c4433f984680c69
[ "MIT" ]
null
null
null
recommender_app/movies_app.py
fra-mari/Two_Movie_Recommenders
da046e06e3ee27699f51b8870c4433f984680c69
[ "MIT" ]
null
null
null
recommender_app/movies_app.py
fra-mari/Two_Movie_Recommenders
da046e06e3ee27699f51b8870c4433f984680c69
[ "MIT" ]
null
null
null
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" This module produces the web application for the Movie Recommender. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" import random import logging import pandas as pd from flask import Flask from flask import render_template f...
38.626667
168
0.699344
7d691c6a6fab8b1992f04ef78c3b71d8b4afb62a
3,804
py
Python
tests/unit_tests/test_tethys_quotas/test_enforce_quota.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
79
2015-10-05T13:13:28.000Z
2022-02-01T12:30:33.000Z
tests/unit_tests/test_tethys_quotas/test_enforce_quota.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
542
2015-08-12T22:11:32.000Z
2022-03-29T22:18:08.000Z
tests/unit_tests/test_tethys_quotas/test_enforce_quota.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
71
2016-01-16T01:03:41.000Z
2022-03-31T17:55:54.000Z
import unittest from unittest import mock from tethys_quotas.decorators import enforce_quota from tethys_quotas.models import ResourceQuota from django.http import HttpRequest from tethys_apps.models import TethysApp from django.core.exceptions import PermissionDenied @enforce_quota(codename='foo') def a_controller(r...
41.347826
119
0.721083
a53787be0101d42d3392cf45de1e12fefcd38929
562
py
Python
mediaplatform/migrations/0006_link_media_items_to_channel.py
jbrownrs/issue-376-GDS-link
e8cce1b79f46b98a7d24b2da5eca48430fd904a3
[ "MIT" ]
5
2019-01-07T17:22:34.000Z
2020-10-08T15:03:12.000Z
mediaplatform/migrations/0006_link_media_items_to_channel.py
jbrownrs/issue-376-GDS-link
e8cce1b79f46b98a7d24b2da5eca48430fd904a3
[ "MIT" ]
203
2017-12-14T09:51:56.000Z
2018-08-28T14:04:08.000Z
mediaplatform/migrations/0006_link_media_items_to_channel.py
jbrownrs/issue-376-GDS-link
e8cce1b79f46b98a7d24b2da5eca48430fd904a3
[ "MIT" ]
5
2018-10-22T11:36:01.000Z
2020-07-20T05:47:49.000Z
# Generated by Django 2.0.7 on 2018-07-31 09:37 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('mediaplatform', '0005_add_channel_model'), ] operations = [ migrations.AddField( model_name='me...
28.1
186
0.669039
f00846aca7a272abddc7e77b69ea6646404ba432
1,037
py
Python
running_dashboard/admin.py
meir412/running_website
66d810f6fcfd68351e7372bfa315ddeee2ea4cf7
[ "MIT" ]
1
2020-04-14T10:32:40.000Z
2020-04-14T10:32:40.000Z
running_dashboard/admin.py
meir412/running_website
66d810f6fcfd68351e7372bfa315ddeee2ea4cf7
[ "MIT" ]
18
2020-04-09T15:37:10.000Z
2021-06-10T18:52:43.000Z
running_dashboard/admin.py
meir412/running_website
66d810f6fcfd68351e7372bfa315ddeee2ea4cf7
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.sessions.models import Session from django.contrib.gis import admin as gis_admin from running_dashboard.models import Run, Neighborhood # Register your models here. class SessionAdmin(admin.ModelAdmin): def _session_data(self, obj): return obj.get_dec...
30.5
155
0.720347
3a102afc8ba5423def5dcdf3e1a5d70e8a29d713
570
py
Python
tensorflow_tutorial/simple_linear_model/simple_linear_model.py
adrianB3/cv_practice
615e3f94f985e882bf9c21ab087d056c869571ee
[ "MIT" ]
null
null
null
tensorflow_tutorial/simple_linear_model/simple_linear_model.py
adrianB3/cv_practice
615e3f94f985e882bf9c21ab087d056c869571ee
[ "MIT" ]
null
null
null
tensorflow_tutorial/simple_linear_model/simple_linear_model.py
adrianB3/cv_practice
615e3f94f985e882bf9c21ab087d056c869571ee
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import tensorflow as tf import numpy as np from sklearn.metrics import confusion_matrix print (tf.__version__) from tensorflow.examples.tutorials.mnist import input_data data = input_data.read_data_sets('data\\MNIST\\') print("Size of: ") print(" - Training-set:\t\t{}".form...
30
59
0.742105
c3dd93a5200a5469305f7d1297c2c67766cf2b17
181
py
Python
1.py
PSedigh/Python_Class
638c73a1b237ef950ebc65994cdc7d7f1330f6ea
[ "MIT" ]
null
null
null
1.py
PSedigh/Python_Class
638c73a1b237ef950ebc65994cdc7d7f1330f6ea
[ "MIT" ]
null
null
null
1.py
PSedigh/Python_Class
638c73a1b237ef950ebc65994cdc7d7f1330f6ea
[ "MIT" ]
null
null
null
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> print("Rasoul") #
36.2
90
0.651934
e5cb3c4519bc92f396d36c953f0dd110b210b01a
1,190
py
Python
app/core/models.py
badari412/recipe-app-api
551442e4bfce2aa51cf040334131bb079f39668d
[ "MIT" ]
null
null
null
app/core/models.py
badari412/recipe-app-api
551442e4bfce2aa51cf040334131bb079f39668d
[ "MIT" ]
null
null
null
app/core/models.py
badari412/recipe-app-api
551442e4bfce2aa51cf040334131bb079f39668d
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): """Creates and saves a new User""" if not email: raise ValueEr...
32.162162
76
0.690756
98b15eadd52a1ab7a6b283aa9d19567aab708e2d
15,933
py
Python
evaluation.py
MEHAMMEDAMINE/ABSA-BERT-pair
a5f978574de2e0514b2a09143a3122d2db6df561
[ "MIT" ]
null
null
null
evaluation.py
MEHAMMEDAMINE/ABSA-BERT-pair
a5f978574de2e0514b2a09143a3122d2db6df561
[ "MIT" ]
null
null
null
evaluation.py
MEHAMMEDAMINE/ABSA-BERT-pair
a5f978574de2e0514b2a09143a3122d2db6df561
[ "MIT" ]
null
null
null
import argparse import collections import numpy as np import pandas as pd from sklearn import metrics from sklearn.preprocessing import label_binarize def get_y_true(task_name): """ Read file to obtain y_true. All of five tasks of Sentihood use the test set of task-BERT-pair-NLI-M to get true labels. ...
37.053488
120
0.510576
bd93ded6ca2faa117a06d147d2cb1fb23a87ba8e
3,236
py
Python
news_crawler/crawler_rss.py
rodrigocaputo/gpn
62632bea13ea912ae8a48bd9a6b6ac3c3664845f
[ "MIT" ]
null
null
null
news_crawler/crawler_rss.py
rodrigocaputo/gpn
62632bea13ea912ae8a48bd9a6b6ac3c3664845f
[ "MIT" ]
null
null
null
news_crawler/crawler_rss.py
rodrigocaputo/gpn
62632bea13ea912ae8a48bd9a6b6ac3c3664845f
[ "MIT" ]
null
null
null
import feedparser, mysql.connector, threading, os from time import mktime, localtime, strftime, sleep from datetime import datetime mysql_host = os.environ.get('MYSQL_HOST', 'localhost') mysql_user = os.environ.get('MYSQL_USER', 'root') mysql_password = os.environ.get('MYSQL_PASS', 'root') mysql_database = os.environ....
33.020408
118
0.66471
7cca9d5e42589b2be8481f46ed4a362b047d9bed
1,367
py
Python
{{cookiecutter.projectname}}/setup.py
tobyontour/cookiecutter-django-standalone
711b7e1096ebc351eb54a6c254e3bd96c556b75a
[ "BSD-2-Clause" ]
null
null
null
{{cookiecutter.projectname}}/setup.py
tobyontour/cookiecutter-django-standalone
711b7e1096ebc351eb54a6c254e3bd96c556b75a
[ "BSD-2-Clause" ]
1
2020-05-21T21:04:45.000Z
2020-05-22T13:24:49.000Z
{{cookiecutter.projectname}}/setup.py
tobyontour/cookiecutter-django-standalone
711b7e1096ebc351eb54a6c254e3bd96c556b75a
[ "BSD-2-Clause" ]
null
null
null
import setuptools with open("README.rst", "r") as fh: long_description = fh.read() setuptools.setup( name="{{cookiecutter.projectname}}-pkg-{{cookiecutter.pypiusername}}", # Replace with your own username version="0.0.1", author="{{ cookiecutter.author}}", author_email="{{ cookiecutter.author_emai...
36.945946
107
0.624726
18cd107fafa5bf21b2e6eb3b98548550c38b8e69
4,278
py
Python
pypgdelta/sql/state/_table.py
SindreOsnes/pypgdelta
00234903a4e3c1c61ac5cc295133b6a69334fbeb
[ "MIT" ]
null
null
null
pypgdelta/sql/state/_table.py
SindreOsnes/pypgdelta
00234903a4e3c1c61ac5cc295133b6a69334fbeb
[ "MIT" ]
null
null
null
pypgdelta/sql/state/_table.py
SindreOsnes/pypgdelta
00234903a4e3c1c61ac5cc295133b6a69334fbeb
[ "MIT" ]
null
null
null
import psycopg2 import psycopg2.extras from collections import OrderedDict from typing import Dict, List def get_sql_tables_and_views(connection: psycopg2.extensions.connection) -> List[psycopg2.extras.RealDictRow]: """Function for getting the tables and views for a sql database :param psycopg2.extensions.co...
38.890909
111
0.64259
ee4c82ecf77a18795753c05453232d7f11ae8ab3
3,968
py
Python
customSDK/servicefabric/models/node_open_failed_event.py
leikong/service-fabric-cli
6ec1b1c8445b7cc5a889f3b172b47a6017c8888c
[ "MIT" ]
1
2020-06-16T22:32:27.000Z
2020-06-16T22:32:27.000Z
customSDK/servicefabric/models/node_open_failed_event.py
leikong/service-fabric-cli
6ec1b1c8445b7cc5a889f3b172b47a6017c8888c
[ "MIT" ]
null
null
null
customSDK/servicefabric/models/node_open_failed_event.py
leikong/service-fabric-cli
6ec1b1c8445b7cc5a889f3b172b47a6017c8888c
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
42.212766
212
0.624748
b319ed21ff0d8cdee9a4f9a476b616cfce1daeab
597
py
Python
backend/puzzle/serializers/comment.py
mductran/puzzle
c4598f5420dff126fa67db1e0adee1677a8baf8f
[ "Apache-2.0" ]
null
null
null
backend/puzzle/serializers/comment.py
mductran/puzzle
c4598f5420dff126fa67db1e0adee1677a8baf8f
[ "Apache-2.0" ]
null
null
null
backend/puzzle/serializers/comment.py
mductran/puzzle
c4598f5420dff126fa67db1e0adee1677a8baf8f
[ "Apache-2.0" ]
null
null
null
from rest_framework import serializers from puzzle.models import Comment from puzzle.models import Account class CommentSerializer(serializers.ModelSerializer): author_name = serializers.CharField(source="author.user.username", read_only=True) class Meta: model = Comment fields = ["id", "...
35.117647
95
0.723618
5eba2aace8768cc661d1f29c24ca967146c00613
102
py
Python
recport/main.py
CircleOnCircles/recport
371f8af612f7a0787eab9267ffe65f372c7badb2
[ "MIT" ]
null
null
null
recport/main.py
CircleOnCircles/recport
371f8af612f7a0787eab9267ffe65f372c7badb2
[ "MIT" ]
null
null
null
recport/main.py
CircleOnCircles/recport
371f8af612f7a0787eab9267ffe65f372c7badb2
[ "MIT" ]
1
2020-02-03T13:52:22.000Z
2020-02-03T13:52:22.000Z
import sys def run1(): print("hello world!") print(sys.argv) def run2(): print("bye")
9.272727
25
0.568627
a25f818381ff1fca723cecf8b18ecf459efb3565
1,530
py
Python
measure/migrations/0001_initial.py
mpsk2/tut-backend
af467809b79b6c1ee84e506cebc7e5ac3fa675bd
[ "MIT" ]
null
null
null
measure/migrations/0001_initial.py
mpsk2/tut-backend
af467809b79b6c1ee84e506cebc7e5ac3fa675bd
[ "MIT" ]
null
null
null
measure/migrations/0001_initial.py
mpsk2/tut-backend
af467809b79b6c1ee84e506cebc7e5ac3fa675bd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-12 13:37 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): initial = True dependencies = [ migratio...
35.581395
118
0.60915
ab261b899c032501f4abe5be1d5a574f37cabebb
1,719
py
Python
scripts/python_scripts/processcsv/old/fill_in_ip_opt.py
akazachk/pha
4120f70554cb0a149d5ab52e04409302e78059fa
[ "MIT" ]
1
2021-09-16T19:58:35.000Z
2021-09-16T19:58:35.000Z
scripts/python_scripts/processcsv/old/fill_in_ip_opt.py
akazachk/pha
4120f70554cb0a149d5ab52e04409302e78059fa
[ "MIT" ]
null
null
null
scripts/python_scripts/processcsv/old/fill_in_ip_opt.py
akazachk/pha
4120f70554cb0a149d5ab52e04409302e78059fa
[ "MIT" ]
null
null
null
import processcsv import csv import utility import argparse import sys import shutil # Default values default_ip_opt_fname = "ip_opt.csv" default_in_fname = "lg-info.csv" default_out_fname = "lg-info-ip.csv" inst_col = 0 def fill_in_ip_opt(in_fname, out_fname, ip_opt_fname, overwrite = None): """ Fills in IP opt ...
27.725806
92
0.719604
d3fe8b4e36c091c3a912d70e39b4ec5fb225dc93
20
py
Python
test/__init__.py
rata-mahata/python-training
369d8e3a494cf25b59e0ced3882463be56eb0905
[ "Apache-2.0" ]
null
null
null
test/__init__.py
rata-mahata/python-training
369d8e3a494cf25b59e0ced3882463be56eb0905
[ "Apache-2.0" ]
null
null
null
test/__init__.py
rata-mahata/python-training
369d8e3a494cf25b59e0ced3882463be56eb0905
[ "Apache-2.0" ]
null
null
null
__author__ = 'Olga'
10
19
0.7
780e8b51ddb99c165719167fb2f527598aac8e02
1,977
py
Python
PyEntity/modules/Image.py
AncientEntity/Pygine
b8a9d4bab645f2886417bf9027a8e26ea15769ec
[ "MIT" ]
2
2020-06-01T06:03:16.000Z
2022-02-15T20:39:27.000Z
PyEntity/modules/Image.py
AncientEntity/PyEntity
b8a9d4bab645f2886417bf9027a8e26ea15769ec
[ "MIT" ]
null
null
null
PyEntity/modules/Image.py
AncientEntity/PyEntity
b8a9d4bab645f2886417bf9027a8e26ea15769ec
[ "MIT" ]
null
null
null
import pygame from PyEntity import Globals def Image(img,override=-1): if(isinstance(img,pygame.Surface)): if(override == -1): Globals.loadedImages.append(img) else: Globals.loadedImages[override] = img Globals.loadedImageLocations.append("runtime") return ...
38.764706
117
0.677795
109b1c6c0cd3baafe6326218a0d3e682e989ce70
5,651
py
Python
tests/test_formating.py
hellock/mmaction2
def3b651ab7818ece637d8637dddacbca027910c
[ "Apache-2.0" ]
1
2021-11-02T15:21:42.000Z
2021-11-02T15:21:42.000Z
tests/test_formating.py
hellock/mmaction2
def3b651ab7818ece637d8637dddacbca027910c
[ "Apache-2.0" ]
null
null
null
tests/test_formating.py
hellock/mmaction2
def3b651ab7818ece637d8637dddacbca027910c
[ "Apache-2.0" ]
null
null
null
import numpy as np import pytest import torch from mmcv.parallel import DataContainer as DC from mmaction.datasets.pipelines import (Collect, FormatShape, ImageToTensor, ToDataContainer, ToTensor, Transpose) def check_keys_contain(result_keys, target_keys): """Check if al...
36.224359
78
0.651035
6ef32bccc0c4af6fc68a42b50cc46bf75236ee40
2,355
py
Python
data/p4VQE/R4/benchmark/startQiskit_noisy48.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startQiskit_noisy48.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startQiskit_noisy48.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=9 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 collection...
26.460674
118
0.62845
804a6b089e2540d8a68e0cb2a84a3c1ee89727be
373
py
Python
event/consts.py
kthaisse/website
be0d0e0763ae2a6b8351c08b432229eae9521f1d
[ "MIT" ]
1
2020-03-19T09:44:16.000Z
2020-03-19T09:44:16.000Z
event/consts.py
kthaisse/website
be0d0e0763ae2a6b8351c08b432229eae9521f1d
[ "MIT" ]
43
2020-02-22T09:32:27.000Z
2022-03-22T11:24:51.000Z
event/consts.py
kthaisse/website
be0d0e0763ae2a6b8351c08b432229eae9521f1d
[ "MIT" ]
3
2020-03-06T13:27:12.000Z
2022-02-07T09:01:07.000Z
from event.enums import ScheduleType SCHEDULE_EMOJIS = { ScheduleType.GENERAL: "📌", ScheduleType.CEREMONY: "🎤", ScheduleType.TALK: "🗣️", ScheduleType.TEAM_BUILDING: "👋", ScheduleType.MEAL: "🍔", ScheduleType.DEMO: "👩‍🏫", ScheduleType.EVENT_START: "🏁", ScheduleType.EVENT_END: "🏁"...
24.866667
36
0.632708
af0401da0233e21ba883a6978e9ce589d848293c
3,810
py
Python
tests/test_flask.py
ShacharOch/anyway
dd62eeec19d478aca78bf9eb151110a26690495d
[ "BSD-3-Clause" ]
null
null
null
tests/test_flask.py
ShacharOch/anyway
dd62eeec19d478aca78bf9eb151110a26690495d
[ "BSD-3-Clause" ]
null
null
null
tests/test_flask.py
ShacharOch/anyway
dd62eeec19d478aca78bf9eb151110a26690495d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from six.moves import http_client import six from anyway import app as flask_app from anyway.utilities import open_utf8 import json import pytest from functools import partial from urlobject import URLObject from collections import Counter @pytest.fixture def app(): return flask_app.test_cl...
39.278351
490
0.701837
c3e78a66970284a8b85be9a73d650584c2a18653
2,004
py
Python
CarlosCardona_Ejercicio10.py
CarlosCardona953/Carlos-Cardona-Ejercicio10-LAB
4a07fc9c2e7ba4a2da5ad1ffea5ee58af03a4e1d
[ "MIT" ]
null
null
null
CarlosCardona_Ejercicio10.py
CarlosCardona953/Carlos-Cardona-Ejercicio10-LAB
4a07fc9c2e7ba4a2da5ad1ffea5ee58af03a4e1d
[ "MIT" ]
null
null
null
CarlosCardona_Ejercicio10.py
CarlosCardona953/Carlos-Cardona-Ejercicio10-LAB
4a07fc9c2e7ba4a2da5ad1ffea5ee58af03a4e1d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[9]: import os import numpy as np import matplotlib.pyplot as plt import pandas as pd import csv import urllib from io import StringIO from io import BytesIO from datetime import datetime import scipy.signal as signal from pandas.plotting import register_matplotlib_converte...
24.439024
418
0.749501
8df400684ea7581b28972cee8036c41834e03c69
177
py
Python
tests/utilities/data_source.py
fossabot/sample-excel
07644f8d7199f479a50533b3a8d78ac3be3b5ebf
[ "MIT" ]
null
null
null
tests/utilities/data_source.py
fossabot/sample-excel
07644f8d7199f479a50533b3a8d78ac3be3b5ebf
[ "MIT" ]
3
2019-09-04T09:47:34.000Z
2021-03-01T02:29:51.000Z
tests/utilities/data_source.py
fossabot/sample-excel
07644f8d7199f479a50533b3a8d78ac3be3b5ebf
[ "MIT" ]
2
2021-03-01T02:27:04.000Z
2022-03-02T11:37:54.000Z
from pathlib import Path class DataSource: @classmethod def data_path(cls, book_name) -> Path: return Path(__file__).parent.parent.parent.joinpath(book_name)
19.666667
70
0.723164
bcf7964a07071a350f968fce6123783b8faa9b51
2,973
py
Python
pallete-gen.py
s0rg/telegram-pywal
7ec0e4f363a62ed72984b49d9bf1676e05cdd9fc
[ "MIT" ]
null
null
null
pallete-gen.py
s0rg/telegram-pywal
7ec0e4f363a62ed72984b49d9bf1676e05cdd9fc
[ "MIT" ]
null
null
null
pallete-gen.py
s0rg/telegram-pywal
7ec0e4f363a62ed72984b49d9bf1676e05cdd9fc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import os import os.path CONSTANTS = "colors.tpg-constants" OUT_NAME = "colors.tdesktop-palette" WAL_COLORS = os.path.expanduser("~/.cache/wal/colors") OUT_DIR = os.path.expanduser("~/.cache/telegram-palette-gen") SCALES = [ ("20", float(1/5)), ("30", float(3/10)), ("40"...
21.543478
86
0.572822
3b8958c0b43fda31d0f846a4d571c3e73120f367
4,546
py
Python
utils.py
foamliu/CRNN
d74ea032d5daa1d6385c0c3ad3083d89c1740c3a
[ "MIT" ]
6
2019-07-27T06:10:40.000Z
2020-10-17T06:43:15.000Z
utils.py
foamliu/CRNN
d74ea032d5daa1d6385c0c3ad3083d89c1740c3a
[ "MIT" ]
2
2019-08-25T08:13:50.000Z
2019-08-25T08:28:10.000Z
utils.py
foamliu/CRNN
d74ea032d5daa1d6385c0c3ad3083d89c1740c3a
[ "MIT" ]
1
2020-05-03T07:30:02.000Z
2020-05-03T07:30:02.000Z
import argparse import logging import os import cv2 as cv import torch from config import max_target_len, dict, converter def clip_gradient(optimizer, grad_clip): """ Clips gradients computed during backpropagation to avoid explosion of gradients. :param optimizer: optimizer with the gradients to be cli...
31.569444
111
0.655301
f3a8bcbe8d37d2803c9a5830298d2943d22347d3
6,144
py
Python
minke/migrations/0003_auto_20190326_1648.py
django-minke/minke
72e6849a1f71d4597724613168d3902df91cbe5f
[ "BSD-3-Clause" ]
2
2019-06-17T10:00:27.000Z
2019-11-20T11:57:25.000Z
minke/migrations/0003_auto_20190326_1648.py
thomst/django-minke
72e6849a1f71d4597724613168d3902df91cbe5f
[ "BSD-3-Clause" ]
1
2020-01-07T13:27:41.000Z
2020-01-07T13:33:16.000Z
minke/migrations/0003_auto_20190326_1648.py
django-minke/minke
72e6849a1f71d4597724613168d3902df91cbe5f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2019-03-26 16:48 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import minke.messages import minke.utils class Migration(migrations.Migration): dependencie...
35.929825
174
0.519368
2d5c5cfe6c3dd5de2920cf1f6f2567330181e41c
28,234
py
Python
research/object_detection/builders/preprocessor_builder_test.py
akineeic/models
2912042352009c9993dc05403624100bfe42d9c1
[ "Apache-2.0" ]
18
2022-01-14T09:58:27.000Z
2022-01-14T09:58:37.000Z
research/object_detection/builders/preprocessor_builder_test.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
5
2020-10-01T09:02:34.000Z
2021-02-21T12:50:11.000Z
research/object_detection/builders/preprocessor_builder_test.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
8
2019-06-06T20:37:15.000Z
2022-03-04T13:54:38.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.572539
80
0.680456
4096fabcc7fe12d59d9828b5f33d658e13899a07
9,741
py
Python
src/tequila/circuit/gradient.py
dwierichs/tequila
3df09f7e710314237aa5474476b1b262293e7873
[ "MIT" ]
null
null
null
src/tequila/circuit/gradient.py
dwierichs/tequila
3df09f7e710314237aa5474476b1b262293e7873
[ "MIT" ]
null
null
null
src/tequila/circuit/gradient.py
dwierichs/tequila
3df09f7e710314237aa5474476b1b262293e7873
[ "MIT" ]
null
null
null
from tequila.circuit.compiler import Compiler from tequila.objective.objective import Objective, ExpectationValueImpl, Variable,\ assign_variable, identity, VectorObjective from tequila import TequilaException from tequila.simulators.simulator_api import compile import typing import copy from numpy import pi from t...
39.278226
132
0.643979
be02a80e3c99fd462f2423d1b01ba2e370850bdd
40,744
py
Python
pytorch_lightning/trainer/connectors/accelerator_connector.py
neptune-ml/pytorch-lightning
3bcaed52454f3e6c3bce5513032e34302e5b1bb6
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/connectors/accelerator_connector.py
neptune-ml/pytorch-lightning
3bcaed52454f3e6c3bce5513032e34302e5b1bb6
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/connectors/accelerator_connector.py
neptune-ml/pytorch-lightning
3bcaed52454f3e6c3bce5513032e34302e5b1bb6
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
49.506683
120
0.634057
cdc7f7a1709a788b0511c4f171311963efeb2456
671
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.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 ...
39.470588
94
0.600596
76d94359858a84bbe011ac52251e0bfc64dbf4d2
206
py
Python
arpeggio/calibrate.py
ronniyjoseph/Arpeggio
a3cc043ff1d6305c4407541555a5a20be6c575e5
[ "MIT" ]
null
null
null
arpeggio/calibrate.py
ronniyjoseph/Arpeggio
a3cc043ff1d6305c4407541555a5a20be6c575e5
[ "MIT" ]
null
null
null
arpeggio/calibrate.py
ronniyjoseph/Arpeggio
a3cc043ff1d6305c4407541555a5a20be6c575e5
[ "MIT" ]
null
null
null
"""Module that performs the calibration . Defines a class and relevant functions that interface with corrcal to calbrate visibilties """ class CorrCal: def __init__(self): pass return
18.727273
66
0.713592
8d977cc115cc80d843c5067b60731be5514df532
1,245
py
Python
examples/simple_eventlet_receive.py
7Geese/kombu
b51d1d678e198a80d7e5fd95f32674c7d8e04a75
[ "BSD-3-Clause" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/kombu-4.3.0/examples/simple_eventlet_receive.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/kombu-4.3.0/examples/simple_eventlet_receive.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
""" Example that sends a single message and exits using the simple interface. You can use `simple_receive.py` (or `complete_receive.py`) to receive the message sent. """ from __future__ import absolute_import, unicode_literals import eventlet from kombu import Connection eventlet.monkey_patch() def wait_many(ti...
29.642857
77
0.64498
5bb284aa522886558fc7dd66a026ebb1825cf71f
1,035
py
Python
src/upcoming_python_events/with_selenium.py
codermrhasan/web-scraping-with-python
7cd9b6d3d5af3b85a214e8531e5a29cdb68ef405
[ "MIT" ]
null
null
null
src/upcoming_python_events/with_selenium.py
codermrhasan/web-scraping-with-python
7cd9b6d3d5af3b85a214e8531e5a29cdb68ef405
[ "MIT" ]
1
2021-03-31T19:41:22.000Z
2021-03-31T19:41:22.000Z
src/upcoming_python_events/with_selenium.py
codermrhasan/web-scraping-with-python
7cd9b6d3d5af3b85a214e8531e5a29cdb68ef405
[ "MIT" ]
null
null
null
from selenium import webdriver def scraper(): url = 'https://www.python.org/events/python-events/' driver = webdriver.Chrome(executable_path='chromedriver') driver.get(url) events = driver.find_elements_by_xpath('//ul[contains(@class, "list-recent-events")]/li') print( f"\n Upcomin...
33.387097
103
0.582609
edea597edf4a71359729014fbb75d6264e39f144
420
py
Python
configs/_base_/schedules/bdd100k_lane_12e.py
XDong18/mmsegmentation
9a14288a654b66babfdfe4f6fa77edc4cd127d41
[ "Apache-2.0" ]
null
null
null
configs/_base_/schedules/bdd100k_lane_12e.py
XDong18/mmsegmentation
9a14288a654b66babfdfe4f6fa77edc4cd127d41
[ "Apache-2.0" ]
null
null
null
configs/_base_/schedules/bdd100k_lane_12e.py
XDong18/mmsegmentation
9a14288a654b66babfdfe4f6fa77edc4cd127d41
[ "Apache-2.0" ]
null
null
null
# optimizer optimizer = dict(type='SGD', lr=0.002, momentum=0.9, weight_decay=0.0005) optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2)) # learning policy lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False) # runtime settings runner = dict(type='IterBasedRunner', max_iters=103824) che...
46.666667
73
0.766667
9a4802b78a83f49b14d91ebd9ca42fc781ece10e
519
py
Python
Dataset/Leetcode/train/38/306.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/38/306.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/38/306.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: def XXX(self, n: int) -> str: if n == 1: return str(1) count = 1 result = '' temp = self.XXX(n-1) for i in range(len(temp)): if i == (len(temp)-1): result += (str(count) + temp[i]) return result ...
25.95
48
0.356455
7f171f5ed48bd2d99364419653d38e56803c8424
31,607
py
Python
pycqed/measurement/quantum_experiment.py
sergimasot/PycQED_py3
54ad1b14929ffe5cc87cf59423a970e4b9baa3e1
[ "MIT" ]
null
null
null
pycqed/measurement/quantum_experiment.py
sergimasot/PycQED_py3
54ad1b14929ffe5cc87cf59423a970e4b9baa3e1
[ "MIT" ]
null
null
null
pycqed/measurement/quantum_experiment.py
sergimasot/PycQED_py3
54ad1b14929ffe5cc87cf59423a970e4b9baa3e1
[ "MIT" ]
null
null
null
import traceback import numpy as np from pycqed.analysis_v3 import helper_functions from pycqed.measurement.waveform_control.sequence import Sequence from pycqed.utilities.general import temporary_value from pycqed.utilities.timer import Timer, Checkpoint from pycqed.measurement.waveform_control.circuit_builder impor...
47.529323
108
0.573133
d8abb4a61d8af7758ac982e903bc309c627ad90b
2,645
py
Python
pysaurus/database/viewport/layers/search_layer.py
notoraptor/pysaurus
3bf5fe8c15e0e0e580e5edaea05b4a1298641367
[ "MIT" ]
null
null
null
pysaurus/database/viewport/layers/search_layer.py
notoraptor/pysaurus
3bf5fe8c15e0e0e580e5edaea05b4a1298641367
[ "MIT" ]
4
2021-08-13T14:03:02.000Z
2022-03-05T16:02:45.000Z
pysaurus/database/viewport/layers/search_layer.py
notoraptor/pysaurus
3bf5fe8c15e0e0e580e5edaea05b4a1298641367
[ "MIT" ]
null
null
null
from typing import Optional from pysaurus.core import functions from pysaurus.database.video import Video from pysaurus.database.video_features import VideoFeatures from pysaurus.database.viewport.layers.layer import Layer from pysaurus.database.viewport.layers.source_layer import SourceLayer from pysaurus.database.vi...
40.692308
88
0.665784
9051576df0dc2d03382dc3e87b1346ceef0baebd
7,126
py
Python
zhaquirks/tuya/ts0043.py
ha-zig/zha-device-handlers
71adabe3912f86e7392d1dcfd70c8a686577da8e
[ "Apache-2.0" ]
null
null
null
zhaquirks/tuya/ts0043.py
ha-zig/zha-device-handlers
71adabe3912f86e7392d1dcfd70c8a686577da8e
[ "Apache-2.0" ]
null
null
null
zhaquirks/tuya/ts0043.py
ha-zig/zha-device-handlers
71adabe3912f86e7392d1dcfd70c8a686577da8e
[ "Apache-2.0" ]
null
null
null
"""Tuya 3 Button Remote.""" from zigpy.profiles import zha from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import Basic, OnOff, Ota, PowerConfiguration, Time from . import TuyaSmartRemoteOnOffCluster from ..const import ( BUTTON_1, BUTTON_2, BUTTON_3, COMMAND, DEVICE_TYPE, ...
36.92228
149
0.53817
969c9196a35a6735da0c8826a965743679d3b267
4,184
py
Python
pymc/backends/text.py
RoyalTS/pymc
53aff9951018cdaf1d070f63fa4b42c456b9d5ee
[ "Apache-2.0" ]
2
2016-03-07T15:25:10.000Z
2020-11-21T18:38:31.000Z
pymc/backends/text.py
RoyalTS/pymc
53aff9951018cdaf1d070f63fa4b42c456b9d5ee
[ "Apache-2.0" ]
null
null
null
pymc/backends/text.py
RoyalTS/pymc
53aff9951018cdaf1d070f63fa4b42c456b9d5ee
[ "Apache-2.0" ]
null
null
null
"""Text file trace backend After sampling with NDArray backend, save results as text files. As this other backends, this can be used by passing the backend instance to `sample`. >>> import pymc as pm >>> db = pm.backends.Text('test') >>> trace = pm.sample(..., trace=db) Or sampling can be performed with...
28.855172
72
0.642925
245c43bb7e673d8cd464ff98440eac3f0b9383c3
1,969
py
Python
django_mailbox/south_migrations/0004_auto__add_field_message_outgoing.py
JBwebkrone/django-mailbox-1
40263b66703332d82c179d79f5ea0d80fc1ea388
[ "MIT" ]
225
2015-01-02T14:53:59.000Z
2022-03-04T23:07:34.000Z
django_mailbox/south_migrations/0004_auto__add_field_message_outgoing.py
JBwebkrone/django-mailbox-1
40263b66703332d82c179d79f5ea0d80fc1ea388
[ "MIT" ]
182
2015-02-06T23:29:50.000Z
2022-01-20T21:50:39.000Z
django_mailbox/south_migrations/0004_auto__add_field_message_outgoing.py
JBwebkrone/django-mailbox-1
40263b66703332d82c179d79f5ea0d80fc1ea388
[ "MIT" ]
138
2015-01-18T16:57:34.000Z
2022-03-24T19:33:38.000Z
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Message.outgoing' db.add_column('django_mailbox_message', 'outgoing', self.gf('django.db.model...
45.790698
145
0.577958
e1f933e2005ae6cea37fe51d265fe7ef79f7e4b2
7,415
py
Python
testscripts/RDKB/component/WIFIHAL/TS_WIFIHAL_5GHzIsApSsidAdvertisementEnabled.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/WIFIHAL/TS_WIFIHAL_5GHzIsApSsidAdvertisementEnabled.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/WIFIHAL/TS_WIFIHAL_5GHzIsApSsidAdvertisementEnabled.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
########################################################################## # If not stated otherwise in this file or this component's Licenses.txt # file the following copyright and licenses apply: # # Copyright 2017 RDK Management # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not...
45.490798
224
0.73648
5bb6b32ace4876b6472a342c4fb44f9bf16064d3
5,077
py
Python
Modules/NavWidgets/Wifi.py
macromorgan/pocketchip-menu
1f824b07ba179b386079528f2bf0496ec0c9c94f
[ "MIT" ]
1
2021-11-12T12:57:59.000Z
2021-11-12T12:57:59.000Z
Modules/NavWidgets/Wifi.py
macromorgan/pocketchip-menu
1f824b07ba179b386079528f2bf0496ec0c9c94f
[ "MIT" ]
null
null
null
Modules/NavWidgets/Wifi.py
macromorgan/pocketchip-menu
1f824b07ba179b386079528f2bf0496ec0c9c94f
[ "MIT" ]
null
null
null
import pygame from Modules.Globals import * import Modules.DBusMain as DBusMain import dbus from Modules.GenWidgets.Widget import * from multiprocessing import Value class Wifi(Widget): def __init__(self, parent=None): self.parent = parent self.size = (26, 24) self.pos = (self.parent.parent...
49.77451
129
0.602521
4bdc08710ad4864ce87374daf01cc37ef3e62a5a
448
py
Python
Systems/Engine/Scene.py
RippeR37/PyPong
601db4346f7c27c88226ce79317008941cbc5754
[ "MIT" ]
1
2018-12-06T06:16:49.000Z
2018-12-06T06:16:49.000Z
Systems/Engine/Scene.py
RippeR37/PyPong
601db4346f7c27c88226ce79317008941cbc5754
[ "MIT" ]
10
2016-01-07T19:22:44.000Z
2016-01-10T14:32:37.000Z
Systems/Engine/Scene.py
RippeR37/PyPong
601db4346f7c27c88226ce79317008941cbc5754
[ "MIT" ]
null
null
null
class Scene(object): def __init__(self, stackable=True, stack_usable=True): self._is_stackable = stackable self._is_stack_usable = stack_usable def is_stackable(self): return self._is_stackable def is_stack_usable(self): return self._is_stack_usable def update(self, d...
21.333333
60
0.660714
e709698585e7dfb1d43865fdd8961dafef650846
4,015
py
Python
test.py
brandonhorst/cdev-client-py
42febafa43735e8ff8dae05021037358490c5b3d
[ "MIT" ]
1
2015-02-16T19:41:16.000Z
2015-02-16T19:41:16.000Z
test.py
brandonhorst/cdev-client-py
42febafa43735e8ff8dae05021037358490c5b3d
[ "MIT" ]
null
null
null
test.py
brandonhorst/cdev-client-py
42febafa43735e8ff8dae05021037358490c5b3d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import unittest import cdev class TestCDEVServer(unittest.TestCase): def setUp(self): self.instance = cdev.CacheInstance('bigfoot', 57776, '_SYSTEM', 'SYS') def get_samples(self): namespaces = self.instance.get_namespaces() self.assertIn('SAMPLES', [namespace.n...
40.969388
199
0.694147
dd15b4adf5284ee286128267209807e79946353a
14,132
py
Python
federated-MPI/mpi_advanced_classifier.py
dylan-fan/federated-averaging-tutorials
9320d1fce7e4740a8fdaf391f69ca00cbd0d0990
[ "Apache-2.0" ]
1
2019-02-10T13:22:00.000Z
2019-02-10T13:22:00.000Z
federated-MPI/mpi_advanced_classifier.py
dylan-fan/federated-averaging-tutorials
9320d1fce7e4740a8fdaf391f69ca00cbd0d0990
[ "Apache-2.0" ]
null
null
null
federated-MPI/mpi_advanced_classifier.py
dylan-fan/federated-averaging-tutorials
9320d1fce7e4740a8fdaf391f69ca00cbd0d0990
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 coMind. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
45.440514
216
0.706553
af52f6f11aaa653ff5ac95411a97fc3b3cf46179
2,838
py
Python
MauricioGonzalez_Ejercicio10.py
lmgonzalezc/MauricioGonzalez_Ejercicio10Lab
862c1f6c7454db229f5eb6e9c136bd43dde088e3
[ "MIT" ]
null
null
null
MauricioGonzalez_Ejercicio10.py
lmgonzalezc/MauricioGonzalez_Ejercicio10Lab
862c1f6c7454db229f5eb6e9c136bd43dde088e3
[ "MIT" ]
null
null
null
MauricioGonzalez_Ejercicio10.py
lmgonzalezc/MauricioGonzalez_Ejercicio10Lab
862c1f6c7454db229f5eb6e9c136bd43dde088e3
[ "MIT" ]
null
null
null
import urllib from io import StringIO from io import BytesIO import csv import numpy as np from datetime import datetime import matplotlib.pylab as plt import pandas as pd import scipy.signal as signal from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() datos=pd.read_c...
37.342105
182
0.713531
357e1a4558c1757165b854d22ee21a014d3ce9ec
9,047
py
Python
src/demos/python/chrono-tensorflow/envs/chtrain_pendulum.py
rxdu/chrono
d7183358f95d74d90f412880894d10a17b9f7bff
[ "BSD-3-Clause" ]
null
null
null
src/demos/python/chrono-tensorflow/envs/chtrain_pendulum.py
rxdu/chrono
d7183358f95d74d90f412880894d10a17b9f7bff
[ "BSD-3-Clause" ]
null
null
null
src/demos/python/chrono-tensorflow/envs/chtrain_pendulum.py
rxdu/chrono
d7183358f95d74d90f412880894d10a17b9f7bff
[ "BSD-3-Clause" ]
null
null
null
import pychrono as chrono from pychrono import irrlicht as chronoirr import numpy as np class Model(object): def __init__(self, render): self.render = render self.observation_space= np.empty([4,1]) self.action_space= np.empty([1,1]) self.info = {} self.timestep = 0.01 # --------...
37.695833
138
0.626948
20ef3297771ae316c546c0d93710a87eaaf4c49f
925
py
Python
pypy/translator/js/test/test_rpbc.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
pypy/translator/js/test/test_rpbc.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
null
null
null
pypy/translator/js/test/test_rpbc.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
2
2016-07-29T07:09:50.000Z
2016-10-16T08:50:26.000Z
import py from pypy.translator.js.test.runtest import JsTest from pypy.rpython.test.test_rpbc import BaseTestRPBC # ====> ../../../rpython/test/test_rpbc.py class TestJsPBC(JsTest, BaseTestRPBC): def test_single_pbc_getattr(self): class C: def __init__(self, v1, v2): self.v1 =...
25
53
0.492973
0893d261c0e7b1fba8c20dba202031608deb5dc2
659
py
Python
wecom_material/__init__.py
rainbow-studio-solution/wecom
937ea9c15c5ef42ba749c67335ede85544292aad
[ "MulanPSL-1.0" ]
5
2021-12-17T06:44:41.000Z
2022-02-05T03:34:07.000Z
wecom_material/__init__.py
rainbow-studio-solution/wecom
937ea9c15c5ef42ba749c67335ede85544292aad
[ "MulanPSL-1.0" ]
null
null
null
wecom_material/__init__.py
rainbow-studio-solution/wecom
937ea9c15c5ef42ba749c67335ede85544292aad
[ "MulanPSL-1.0" ]
2
2022-02-06T13:27:56.000Z
2022-02-27T08:06:59.000Z
# -*- coding: utf-8 -*- from . import models import os.path from odoo import api, SUPERUSER_ID, _ from odoo.exceptions import UserError def pre_init_hook(cr): env = api.Environment(cr, SUPERUSER_ID, {}) path = env["ir.config_parameter"].get_param("wecom.resources_path") if path: if not os.path...
26.36
88
0.596358
dd09aaed197588ca392bcce5fc3121f9d5d36aac
1,868
py
Python
client/init.py
mikaelbrandin/armory
222e549fbf2cf89a874cad96a8bb7edd186e4800
[ "Apache-2.0" ]
null
null
null
client/init.py
mikaelbrandin/armory
222e549fbf2cf89a874cad96a8bb7edd186e4800
[ "Apache-2.0" ]
null
null
null
client/init.py
mikaelbrandin/armory
222e549fbf2cf89a874cad96a8bb7edd186e4800
[ "Apache-2.0" ]
null
null
null
__author__ = 'kra869' import os import configparser from . import utils def directory_filter(args): return os.getcwd(); def init(context): parser = context.register_command('init', command_init, help='Initialize a new repository', directory_filter=directory_filter) parser.add_argument('repository', me...
28.738462
130
0.700214
530d06fc39e5f5cc48c5240278254fb6de7f4a50
20,113
py
Python
irrd/storage/queries.py
morrowc/irrd
8a2af9a6648a73fc3c31d21cf07ef80a49031a14
[ "BSD-2-Clause" ]
null
null
null
irrd/storage/queries.py
morrowc/irrd
8a2af9a6648a73fc3c31d21cf07ef80a49031a14
[ "BSD-2-Clause" ]
1
2021-04-20T14:57:52.000Z
2021-04-20T14:57:52.000Z
irrd/storage/queries.py
morrowc/irrd
8a2af9a6648a73fc3c31d21cf07ef80a49031a14
[ "BSD-2-Clause" ]
null
null
null
import logging from typing import List, Optional import sqlalchemy as sa from IPy import IP from sqlalchemy.sql import Select, ColumnCollection import sqlalchemy.dialects.postgresql as pg from irrd.conf import get_setting from irrd.rpki.status import RPKIStatus from irrd.rpsl.rpsl_objects import lookup_field_names fr...
37.454376
119
0.611843
344271dda42c7eaa326c9c84749dc8bf09960da0
3,279
py
Python
agents/DDPGActor.py
schkip/MLProject_Quadcopter
148da1c5ffc4ff409144200be5a943b6ca2e22b2
[ "MIT" ]
null
null
null
agents/DDPGActor.py
schkip/MLProject_Quadcopter
148da1c5ffc4ff409144200be5a943b6ca2e22b2
[ "MIT" ]
null
null
null
agents/DDPGActor.py
schkip/MLProject_Quadcopter
148da1c5ffc4ff409144200be5a943b6ca2e22b2
[ "MIT" ]
null
null
null
from keras import layers, models, optimizers, regularizers from keras import backend as K class Actor: """Actor (Policy) Model.""" def __init__(self, state_size, action_size, action_low, action_high): """Initialize parameters and build model. Params ====== state_size (int)...
41.506329
105
0.640439
3c8a099c74e9c7b1b5de66c52080337a8c397d98
12,865
py
Python
pex/common.py
Djailla/pex
cf20f8fce16cc5d78962835ecc2824f372f17412
[ "Apache-2.0" ]
null
null
null
pex/common.py
Djailla/pex
cf20f8fce16cc5d78962835ecc2824f372f17412
[ "Apache-2.0" ]
null
null
null
pex/common.py
Djailla/pex
cf20f8fce16cc5d78962835ecc2824f372f17412
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, print_function import atexit import contextlib import errno import os import shutil import stat import sys import tempfile import threading import ...
30.413712
100
0.68286
0d5a87cfa9d015c5f57f58893513f639d838e139
6,805
py
Python
metaworld/envs/mujoco/sawyer_xyz/sawyer_push_v2.py
Simon0xzx/metaworld
2d441eed70b6f5cb1f35883b0517c4bd2812268c
[ "MIT" ]
null
null
null
metaworld/envs/mujoco/sawyer_xyz/sawyer_push_v2.py
Simon0xzx/metaworld
2d441eed70b6f5cb1f35883b0517c4bd2812268c
[ "MIT" ]
null
null
null
metaworld/envs/mujoco/sawyer_xyz/sawyer_push_v2.py
Simon0xzx/metaworld
2d441eed70b6f5cb1f35883b0517c4bd2812268c
[ "MIT" ]
1
2020-10-28T11:51:08.000Z
2020-10-28T11:51:08.000Z
import numpy as np from gym.spaces import Box from metaworld.envs.env_util import get_asset_full_path from metaworld.envs.mujoco.sawyer_xyz.base import SawyerXYZEnv, _assert_task_is_set class SawyerPushEnvV2(SawyerXYZEnv): """ Motivation for V2: V1 was very difficult to solve because the observation ...
34.897436
89
0.588685
e56563cfb4f2d14718f61139ce287ef6ffb4087f
24,404
py
Python
pypy/rlib/parsing/makepackrat.py
benoitc/pypy
a3e1b12d1d01dc29056b7badc051ffc034297658
[ "MIT" ]
1
2020-01-21T11:10:51.000Z
2020-01-21T11:10:51.000Z
pypy/rlib/parsing/makepackrat.py
benoitc/pypy
a3e1b12d1d01dc29056b7badc051ffc034297658
[ "MIT" ]
null
null
null
pypy/rlib/parsing/makepackrat.py
benoitc/pypy
a3e1b12d1d01dc29056b7badc051ffc034297658
[ "MIT" ]
null
null
null
from __future__ import with_statement import py import sys from pypy.rlib.parsing.tree import Nonterminal, Symbol, RPythonVisitor from pypy.rlib.parsing.codebuilder import Codebuilder from pypy.rlib.objectmodel import we_are_translated class BacktrackException(Exception): def __init__(self, error=None): se...
32.582109
81
0.550074
0f8dfcb7e2239463e5bc74a17c08e393ea0568d9
15,120
py
Python
calla/JTG/wind.py
warmwaver/calla
6667bfc51e3ed66eb0ae3491f827b893e4d8aa0b
[ "MIT" ]
7
2018-10-11T09:03:09.000Z
2022-02-23T01:34:12.000Z
calla/JTG/wind.py
warmwaver/calla
6667bfc51e3ed66eb0ae3491f827b893e4d8aa0b
[ "MIT" ]
null
null
null
calla/JTG/wind.py
warmwaver/calla
6667bfc51e3ed66eb0ae3491f827b893e4d8aa0b
[ "MIT" ]
1
2021-03-13T11:59:43.000Z
2021-03-13T11:59:43.000Z
"""JTG/T 3360-01-2018 公路桥梁抗风设计规范""" __all__ = [ 'wind_reference_speed', 'wind_girder', 'wind_element', 'flutter_stability' ] from calla import abacus, InputError, numeric from collections import OrderedDict from math import pi, sqrt, sin, cos, tan class wind_reference_speed(abacus): ''' 设...
36.258993
102
0.451587
edbc130ffd0d6ed36f3b91e78d9674457d393b2d
833
py
Python
iwork/api_urls.py
kellyyk/blueking_work1-5
3661d96ba12a9884227d2c4c559212398398c973
[ "Apache-2.0" ]
null
null
null
iwork/api_urls.py
kellyyk/blueking_work1-5
3661d96ba12a9884227d2c4c559212398398c973
[ "Apache-2.0" ]
3
2020-02-12T02:55:30.000Z
2021-06-10T21:39:23.000Z
iwork/api_urls.py
kellyyk/blueking_work1-5
3661d96ba12a9884227d2c4c559212398398c973
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云(BlueKing) available. Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obt...
49
115
0.773109
dbc87814589d433494c8f68cc0eee4ee39d0ed77
1,091
py
Python
scripts/convert_notebooks.py
nnadeau/academic-kickstart
1696b6f9fc1c4069731bb1d473787bf772463158
[ "MIT" ]
null
null
null
scripts/convert_notebooks.py
nnadeau/academic-kickstart
1696b6f9fc1c4069731bb1d473787bf772463158
[ "MIT" ]
21
2020-04-08T12:17:11.000Z
2021-02-17T21:20:04.000Z
scripts/convert_notebooks.py
nnadeau/academic-kickstart
1696b6f9fc1c4069731bb1d473787bf772463158
[ "MIT" ]
null
null
null
import logging import subprocess from pathlib import Path from typing import Optional import fire import nbconvert import nbformat def main(path: Optional[str] = None): if path: paths = [Path(path)] else: # glob notebooks paths = list((Path.cwd() / "content").rglob("*.ipynb")) ...
24.244444
82
0.579285
5b4b253beb1491b165669b2b289bdc13781af29f
909
py
Python
tensorflow_datasets/video/__init__.py
suvarnak/datasets
682b5adee6c36e9867f397076080ec23d9616dcc
[ "Apache-2.0" ]
1
2019-03-02T22:54:29.000Z
2019-03-02T22:54:29.000Z
tensorflow_datasets/video/__init__.py
rsepassi/datasets
299f482da52aebe910e91053dbb06a36355f4cde
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/video/__init__.py
rsepassi/datasets
299f482da52aebe910e91053dbb06a36355f4cde
[ "Apache-2.0" ]
1
2020-01-01T04:48:04.000Z
2020-01-01T04:48:04.000Z
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets 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 appl...
41.318182
78
0.80308
a7a0260d4a4ae9676e24e33944a886e76e03b9e8
9,400
py
Python
instrumentation/opentelemetry-instrumentation-pyramid/tests/test_programmatic.py
willarmiros/opentelemetry-python-contrib
0d34ef26b75f9a3bc275bf828b5a806d39ba1a40
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-07-18T07:59:09.000Z
2021-07-18T07:59:09.000Z
instrumentation/opentelemetry-instrumentation-pyramid/tests/test_programmatic.py
willarmiros/opentelemetry-python-contrib
0d34ef26b75f9a3bc275bf828b5a806d39ba1a40
[ "Apache-2.0", "BSD-3-Clause" ]
3
2020-12-30T17:37:13.000Z
2021-06-06T01:02:30.000Z
instrumentation/opentelemetry-instrumentation-pyramid/tests/test_programmatic.py
open-o11y/opentelemetry-python-contrib
c5c6977584a3661f5698c3c45e3d92231db13f78
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-11-20T06:31:17.000Z
2021-11-20T06:31:17.000Z
# Copyright The OpenTelemetry 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 or agreed to in ...
38.52459
118
0.674255
55f5e32c3bc577bbed3936951abbd391c2ebc823
5,538
py
Python
MLOps/Neptune.AI/examples_ThetaGPU/1Layer_ANN/run_trainTurbModel.py
rickybalin/ALCF
3696756d2af90f1ba179caa46d2001d07db5e01d
[ "BSD-3-Clause" ]
null
null
null
MLOps/Neptune.AI/examples_ThetaGPU/1Layer_ANN/run_trainTurbModel.py
rickybalin/ALCF
3696756d2af90f1ba179caa46d2001d07db5e01d
[ "BSD-3-Clause" ]
null
null
null
MLOps/Neptune.AI/examples_ThetaGPU/1Layer_ANN/run_trainTurbModel.py
rickybalin/ALCF
3696756d2af90f1ba179caa46d2001d07db5e01d
[ "BSD-3-Clause" ]
null
null
null
# General imports import numpy as np from time import perf_counter from datetime import datetime import logging import argparse import torch # Neptune import neptune.new as neptune # Import help functions from NeuralNets import trainNN, predictNN, timeStats ## Set up logger def setup_logger(name, log_file, level=lo...
40.423358
195
0.698989
7c33e0364cc970a0e2431daa3333d37b2aee679c
4,537
py
Python
src/m2/src/feat38.py
pvzteam/pvz_recsys2019
3fd14d3b82033474d2e172402abd0ebc5e7b0afc
[ "Apache-2.0" ]
1
2019-07-24T08:41:53.000Z
2019-07-24T08:41:53.000Z
src/m2/src/feat38.py
pvzteam/pvz_recsys2019
3fd14d3b82033474d2e172402abd0ebc5e7b0afc
[ "Apache-2.0" ]
null
null
null
src/m2/src/feat38.py
pvzteam/pvz_recsys2019
3fd14d3b82033474d2e172402abd0ebc5e7b0afc
[ "Apache-2.0" ]
1
2020-12-02T09:49:12.000Z
2020-12-02T09:49:12.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # 基础模块 import os import sys import gc import json import time import functools from datetime import datetime # 数据处理 import numpy as np import pandas as pd from math import sqrt from collections import Counter from sklearn.feature_extraction.text import CountVectorizer # ...
26.074713
88
0.659026
6c17dcb7c0626ebfea970e94b97807e2e321e8f5
14,818
py
Python
lettuce/features/softwaresupport/kea4_server_bind/functions.py
godfryd/forge
711cae4c59be06229b6aad09941e643b8ff972fd
[ "ISC" ]
null
null
null
lettuce/features/softwaresupport/kea4_server_bind/functions.py
godfryd/forge
711cae4c59be06229b6aad09941e643b8ff972fd
[ "ISC" ]
null
null
null
lettuce/features/softwaresupport/kea4_server_bind/functions.py
godfryd/forge
711cae4c59be06229b6aad09941e643b8ff972fd
[ "ISC" ]
null
null
null
# Copyright (C) 2013 Internet Systems Consortium. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTE...
39.097625
116
0.611621
36f66bfdecde3132e6cb0c74afc512cddee97f9f
3,114
py
Python
droxi/drox/resolver.py
andydude/droxtools
d608ceb715908fb00398c0d28eee74286fef3750
[ "MIT" ]
null
null
null
droxi/drox/resolver.py
andydude/droxtools
d608ceb715908fb00398c0d28eee74286fef3750
[ "MIT" ]
null
null
null
droxi/drox/resolver.py
andydude/droxtools
d608ceb715908fb00398c0d28eee74286fef3750
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # droxi # Copyright (c) 2014, Andrew Robbins, All rights reserved. # # This library ("it") is free software; it is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; you can redistribute it and/or modify it under the terms of the # GNU Lesser Gen...
34.21978
93
0.614644
e974bbd0911a9ecec9d892fbeac7384493209056
85,324
py
Python
venv/Lib/site-packages/numpy/testing/_private/utils.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
41
2021-06-19T13:57:18.000Z
2021-12-02T17:08:53.000Z
venv/Lib/site-packages/numpy/testing/_private/utils.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
14
2021-03-26T20:54:22.000Z
2021-04-06T17:18:53.000Z
venv/Lib/site-packages/numpy/testing/_private/utils.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
8
2021-06-19T14:25:50.000Z
2022-03-25T02:00:29.000Z
""" Utility function to facilitate testing. """ import os import sys import platform import re import gc import operator import warnings from functools import partial, wraps import shutil import contextlib from tempfile import mkdtemp, mkstemp from unittest.case import SkipTest from warnings import WarningMessage impo...
33.85873
97
0.599374
969b817c6eb4bcec28a9b673d20d80823ec3a455
29
py
Python
python/testData/refactoring/rename/renameUpdatesImportReferences/before/bar.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/refactoring/rename/renameUpdatesImportReferences/before/bar.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/refactoring/rename/renameUpdatesImportReferences/before/bar.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
import foo from foo import f
9.666667
17
0.793103
911d97d36f228fe8f68be1e7de5a43ee6a3724b6
1,073
py
Python
setup.py
GAUTAMMISTRY/pybiology
ff082055fb6ec973c800f85da5fa4c6ae9992940
[ "Unlicense" ]
null
null
null
setup.py
GAUTAMMISTRY/pybiology
ff082055fb6ec973c800f85da5fa4c6ae9992940
[ "Unlicense" ]
null
null
null
setup.py
GAUTAMMISTRY/pybiology
ff082055fb6ec973c800f85da5fa4c6ae9992940
[ "Unlicense" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', "Operating System :: OS Independent", "License :: Freely Distributable", 'Programming Language :: Python :: ...
32.515152
66
0.67288
42c5638bf5ecc7d2b6a1c56fa046cf42fb9132b8
46,226
py
Python
tests/test_functionality.py
Girgitt/yappi
f6fa1abaa4ec30c750b615e35176a76cdaaae0cc
[ "MIT" ]
null
null
null
tests/test_functionality.py
Girgitt/yappi
f6fa1abaa4ec30c750b615e35176a76cdaaae0cc
[ "MIT" ]
null
null
null
tests/test_functionality.py
Girgitt/yappi
f6fa1abaa4ec30c750b615e35176a76cdaaae0cc
[ "MIT" ]
1
2018-03-26T15:30:42.000Z
2018-03-26T15:30:42.000Z
import os import sys import time import yappi import _yappi import utils import multiprocessing # added to fix http://bugs.python.org/issue15881 for > Py2.6 if sys.version_info < (2, 7): # use unittest2 for < Py2.7 import unittest2 as _unittest else: import unittest as _unittest class BasicUsag...
34.522778
111
0.525397
23bfec3adb85c5125f40138266a830f1d04896f9
1,724
py
Python
recipes/extract_a_sub_table_from_some_big_table.py
jdum/odfdo
2494d0bed39f5a55974643206e9bafeed40f3a6b
[ "Apache-2.0" ]
18
2018-04-19T08:30:48.000Z
2022-02-14T11:00:27.000Z
recipes/extract_a_sub_table_from_some_big_table.py
jdum/odfdo
2494d0bed39f5a55974643206e9bafeed40f3a6b
[ "Apache-2.0" ]
15
2018-04-22T00:52:41.000Z
2021-07-05T10:16:38.000Z
recipes/extract_a_sub_table_from_some_big_table.py
jdum/odfdo
2494d0bed39f5a55974643206e9bafeed40f3a6b
[ "Apache-2.0" ]
6
2018-04-22T00:14:12.000Z
2021-12-06T01:42:07.000Z
#!/usr/bin/env python """ Create a table of 1000 lines and 100 columns, extract a sub table of 100 lines 26 columns, save the result in a spreadsheet document. """ import os from odfdo import Document, Table, Row, Cell def suite(n): if n % 2 == 0: return n / 2 return 3 * n + 1 if __name__ == "__mai...
23.944444
78
0.609629
8f2c7d2f82cd6cc570dd692b1b9d1f01e95f882c
5,239
py
Python
mmdet/models/roi_heads/mask_scoring_roi_head.py
hyperlist/mmdetection
ba4918de7fb21a96edc373584fa21a17d098a843
[ "Apache-2.0" ]
null
null
null
mmdet/models/roi_heads/mask_scoring_roi_head.py
hyperlist/mmdetection
ba4918de7fb21a96edc373584fa21a17d098a843
[ "Apache-2.0" ]
null
null
null
mmdet/models/roi_heads/mask_scoring_roi_head.py
hyperlist/mmdetection
ba4918de7fb21a96edc373584fa21a17d098a843
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import paddle from mmdet.core import bbox2roi from ..builder import HEADS, build_head from .standard_roi_head import StandardRoIHead @HEADS.register_module() class MaskScoringRoIHead(StandardRoIHead): """Mask Scoring RoIHead for Mask Scoring RCNN. https://arxi...
45.95614
83
0.563657
f35276b28fc8444f642f39de9a8661e85ab36bf2
11,867
py
Python
micronet/compression/quantization/wbwtab/quantize.py
jay757425789/micronet
351d184527e9867e0394878cf91b64ffd5c6b109
[ "MIT" ]
1
2021-07-30T08:34:19.000Z
2021-07-30T08:34:19.000Z
micronet/compression/quantization/wbwtab/quantize.py
jay757425789/micronet
351d184527e9867e0394878cf91b64ffd5c6b109
[ "MIT" ]
null
null
null
micronet/compression/quantization/wbwtab/quantize.py
jay757425789/micronet
351d184527e9867e0394878cf91b64ffd5c6b109
[ "MIT" ]
null
null
null
import copy import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Function # ********************* 二值(+-1) *********************** # activation class BinaryActivation(Function): @staticmethod def forward(self, input): self.save_for_backward(input) outpu...
43.468864
123
0.45142
20aa01f089431e83405bdfefdda891fa467ddc3b
17,472
py
Python
tests/app/main/views/test_tour.py
alphagov-mirror/notifications-admin
04d051df6b85cf596a7d6d0f28474b04673e420a
[ "MIT" ]
null
null
null
tests/app/main/views/test_tour.py
alphagov-mirror/notifications-admin
04d051df6b85cf596a7d6d0f28474b04673e420a
[ "MIT" ]
null
null
null
tests/app/main/views/test_tour.py
alphagov-mirror/notifications-admin
04d051df6b85cf596a7d6d0f28474b04673e420a
[ "MIT" ]
null
null
null
import pytest from flask import url_for from app import current_user from tests import validate_route_permission from tests.conftest import SERVICE_ONE_ID, create_template, normalize_spaces def test_should_200_for_tour_start( client_request, mock_get_service_template_with_multiple_placeholders, service_o...
28.226171
113
0.663004