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
777c4729d40bb1f0f429d00e41ed45d451a3a6e8
1,259
py
Python
01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Roberto/exc0069.py
moacirsouza/nadas
ad98d73b4281d1581fd2b2a9d29001acb426ee56
[ "MIT" ]
1
2020-07-03T13:54:18.000Z
2020-07-03T13:54:18.000Z
01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Roberto/exc0069.py
moacirsouza/nadas
ad98d73b4281d1581fd2b2a9d29001acb426ee56
[ "MIT" ]
null
null
null
01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Roberto/exc0069.py
moacirsouza/nadas
ad98d73b4281d1581fd2b2a9d29001acb426ee56
[ "MIT" ]
null
null
null
print(""" 069) Crie um programa que leia a idade e o sexo de várias pessoas. A cada pessoa cadastrada, o programa deverá perguntar se o usuário quer ou não continuar. No final, mostre: A) Quantas pessoas tem mais de 18 anos. B) Quantos homens foram cadastrados. C) Quantas mulheres tem menos de 20 anos. """) pessoascom...
35.971429
89
0.66799
87cef05d70d44b820a64ae72991c09c59e4965e1
4,215
py
Python
scripts/fetch_oauth_credentials.py
dkuspawono/chromium-dashboard
e793b004b010737d98af15b7350d7888a791a3e9
[ "Apache-2.0" ]
1
2019-04-23T13:43:52.000Z
2019-04-23T13:43:52.000Z
scripts/fetch_oauth_credentials.py
dkuspawono/chromium-dashboard
e793b004b010737d98af15b7350d7888a791a3e9
[ "Apache-2.0" ]
7
2021-03-02T01:47:10.000Z
2022-03-08T23:31:37.000Z
scripts/fetch_oauth_credentials.py
dkuspawono/chromium-dashboard
e793b004b010737d98af15b7350d7888a791a3e9
[ "Apache-2.0" ]
1
2017-09-03T01:23:23.000Z
2017-09-03T01:23:23.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013 Google Inc. All Rights Reserved. """OAuth 2.0 Bootstrapper for App Engine dev server development. Adapted from: https://code.google.com/p/google-cloud-storage-samples/source/browse/gs-oauth.py """ __author__ = ('ericbidelman@chromium.org (Eric Bidelman), '...
30.323741
80
0.720996
d9acf25075dce5d8de49278103be676d14c3c3b8
218
py
Python
app/requests.py
Albert-Byrone/Blog
55bc02aa4822bf81a2ab0e31274b1d14a875dd5e
[ "MIT" ]
null
null
null
app/requests.py
Albert-Byrone/Blog
55bc02aa4822bf81a2ab0e31274b1d14a875dd5e
[ "MIT" ]
3
2021-06-08T20:32:03.000Z
2022-03-12T00:03:04.000Z
app/requests.py
Albert-Byrone/Blog
55bc02aa4822bf81a2ab0e31274b1d14a875dd5e
[ "MIT" ]
1
2022-03-23T12:18:44.000Z
2022-03-23T12:18:44.000Z
import requests,json def get_quotes(): response = requests.get('http://quotes.stormconsultancy.co.uk/random.json') if response.status_code == 200: quote = response.json() return quote
24.222222
79
0.651376
9450602312c134ebe6129c7b9068b7549ebf4ee5
181
py
Python
Python/02Basics/escapeSequence.py
Adi75-dev/Repogorgon
c598a275f64e5d82af132f9fdcef06138c9d66cb
[ "MIT" ]
null
null
null
Python/02Basics/escapeSequence.py
Adi75-dev/Repogorgon
c598a275f64e5d82af132f9fdcef06138c9d66cb
[ "MIT" ]
null
null
null
Python/02Basics/escapeSequence.py
Adi75-dev/Repogorgon
c598a275f64e5d82af132f9fdcef06138c9d66cb
[ "MIT" ]
null
null
null
message = "Python \"Programming" print(message) # #==>Comments # \" # \'==>For Using Quotes in String # \\==>For Using Backslash in string # \n==>New Line # """==>Multiline Strings
20.111111
36
0.635359
4b93c55b4e74a0b1045704d7793d7efaa9bc7018
1,546
py
Python
tools/api_proto_plugin/utils.py
jaricftw/envoy
766f3fb8dbdafce402631c43c16fda46ed003462
[ "Apache-2.0" ]
1
2021-01-07T10:58:06.000Z
2021-01-07T10:58:06.000Z
tools/api_proto_plugin/utils.py
jaricftw/envoy
766f3fb8dbdafce402631c43c16fda46ed003462
[ "Apache-2.0" ]
4
2021-06-02T16:01:15.000Z
2021-11-25T21:03:24.000Z
tools/api_proto_plugin/utils.py
jaricftw/envoy
766f3fb8dbdafce402631c43c16fda46ed003462
[ "Apache-2.0" ]
1
2020-03-28T12:23:29.000Z
2020-03-28T12:23:29.000Z
import glob import os def ProtoFileCanonicalFromLabel(label): """Compute path from API root to a proto file from a Bazel proto label. Args: label: Bazel source proto label string. Returns: A string with the path, e.g. for @envoy_api//envoy/type/matcher:metadata.proto this would be envoy/type/match...
37.707317
98
0.72251
4551537492d68f5472c33b345f5d85d52785f2e3
974
py
Python
setup.py
Picasel/django-admitad
7df25dffa5bb7b8c57a53afaa274ea4dca3bc420
[ "MIT" ]
3
2019-01-29T05:45:42.000Z
2020-09-22T14:42:33.000Z
setup.py
Picasel/django-admitad
7df25dffa5bb7b8c57a53afaa274ea4dca3bc420
[ "MIT" ]
8
2018-11-27T11:39:39.000Z
2019-06-29T07:55:02.000Z
setup.py
k0t3n/django-admitad
7df25dffa5bb7b8c57a53afaa274ea4dca3bc420
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='django-admitad', version='1.1.3', packages=['admitad'], package_data={ 'admitad': ['migrations/*.py'] }, install_requires=[ 'Django>=1.11', ], url='https://github.com/Picasel/django-admitad', license='MIT License', author...
31.419355
89
0.599589
6fe2a82d81859f7b808b839cb0ff65a36bfef851
6,006
py
Python
createimage.py
1024jp/LensCalibrator
266c18a334f96aed0a7d002bfb162a2f5b7a4982
[ "MIT" ]
16
2017-03-01T06:09:11.000Z
2021-11-19T09:44:15.000Z
createimage.py
1024jp/LensCalibrator
266c18a334f96aed0a7d002bfb162a2f5b7a4982
[ "MIT" ]
1
2019-03-20T01:18:38.000Z
2019-03-20T01:18:38.000Z
createimage.py
1024jp/LensCalibrator
266c18a334f96aed0a7d002bfb162a2f5b7a4982
[ "MIT" ]
2
2019-03-20T01:00:07.000Z
2020-03-04T14:30:49.000Z
#!/usr/bin/env python """ Undistort image. (C) 2016-2018 1024jp """ import math import os import sys import cv2 import numpy as np from modules import argsparser from modules.datafile import Data from modules.undistortion import Undistorter from modules.projection import Projector # constants SUFFIX = "_calib" c...
29.880597
79
0.577922
4a7b2e73c28034dddb5a8ab9cf1ddbf3c78a3724
1,571
py
Python
backend/api/views.py
camuer/MTU-Open-Source-Tech-Chat
252ebe0cc4c4b8c65165f51f8ba0c487135d00eb
[ "MIT" ]
null
null
null
backend/api/views.py
camuer/MTU-Open-Source-Tech-Chat
252ebe0cc4c4b8c65165f51f8ba0c487135d00eb
[ "MIT" ]
null
null
null
backend/api/views.py
camuer/MTU-Open-Source-Tech-Chat
252ebe0cc4c4b8c65165f51f8ba0c487135d00eb
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from rest_framework import status, permissions from rest_framework.decorators import detail_route from rest_framework.response import Response from rest_framework_mongoengine import viewsets, generics from .models import Board, Thread from .serializers import BoardSerializer,...
39.275
106
0.749841
b934558201b5ad2928420ac85243305d13952407
1,535
py
Python
count-words.py
bacovcin/corpus-tools
01e1c4d857d5d1f64a602bd22e91989217260a77
[ "MIT" ]
2
2015-01-27T19:27:06.000Z
2016-04-14T22:05:21.000Z
count-words.py
bacovcin/corpus-tools
01e1c4d857d5d1f64a602bd22e91989217260a77
[ "MIT" ]
null
null
null
count-words.py
bacovcin/corpus-tools
01e1c4d857d5d1f64a602bd22e91989217260a77
[ "MIT" ]
null
null
null
from sys import argv from PTree import * print(argv) targets = argv[1].split(':') code_slot = int(argv[2]) - 1 trees = ParseFiles(argv[2:]) def updateCoding(tree,target,slot): def countwords(tree,target,target_found): count = 0 if target_found == 1: if tree.height > 0: ...
27.410714
56
0.484691
0bf4591e341e59068414960a29bdd7aab65be975
53,506
py
Python
venv/Lib/site-packages/zope/component/tests/test_zcml.py
xanderstevenson/webex-card-sampler
e8c8040205b4a7194e396fa38a0d82ba93173806
[ "MIT" ]
29
2015-05-27T23:41:12.000Z
2021-10-13T00:42:36.000Z
venv/Lib/site-packages/zope/component/tests/test_zcml.py
xanderstevenson/webex-card-sampler
e8c8040205b4a7194e396fa38a0d82ba93173806
[ "MIT" ]
55
2015-01-26T19:34:55.000Z
2021-12-01T15:40:46.000Z
venv/Lib/site-packages/zope/component/tests/test_zcml.py
xanderstevenson/webex-card-sampler
e8c8040205b4a7194e396fa38a0d82ba93173806
[ "MIT" ]
13
2015-01-27T04:46:30.000Z
2021-09-29T05:33:39.000Z
############################################################################## # # Copyright (c) 2012 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
42.566428
86
0.625051
26f9c3374713c1f45d7d6f6b1e7a5887d268388e
65,532
py
Python
openstack_dashboard/dashboards/project/networks/tests.py
spandanb/horizon
4a96f2e2a2b087508c369e0bea891a29829a673d
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/networks/tests.py
spandanb/horizon
4a96f2e2a2b087508c369e0bea891a29829a673d
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/networks/tests.py
spandanb/horizon
4a96f2e2a2b087508c369e0bea891a29829a673d
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 NEC 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 ag...
44.188806
79
0.57697
ff4f2f9419c2934869d731e71906e0fbd44dcddc
23,803
py
Python
dbas/tests/test_lib.py
hhucn/dbas
7996dbe0c66149c710217839877a1ec4e7eb46ed
[ "MIT" ]
23
2017-05-18T13:33:51.000Z
2021-12-26T18:04:09.000Z
dbas/tests/test_lib.py
hhucn/dbas
7996dbe0c66149c710217839877a1ec4e7eb46ed
[ "MIT" ]
8
2019-12-26T17:19:44.000Z
2020-05-28T15:38:31.000Z
dbas/tests/test_lib.py
hhucn/dbas
7996dbe0c66149c710217839877a1ec4e7eb46ed
[ "MIT" ]
7
2017-09-27T11:15:42.000Z
2021-12-26T18:12:38.000Z
from datetime import date import transaction from dbas import lib from dbas.database import DBDiscussionSession from dbas.database.discussion_model import User, Argument, Statement, TextVersion, Issue, Premise, PremiseGroup from dbas.handler.history import SessionHistory from dbas.helper.url import UrlManager from db...
56.67381
297
0.706508
ebaf1d18f774015fa5986f6dbf188c6714d09e7c
2,069
py
Python
tools/skpbench/_adb.py
TheRakeshPurohit/skia
817dd601f85f986a99d102de8dc42ee8638a56f9
[ "BSD-3-Clause" ]
null
null
null
tools/skpbench/_adb.py
TheRakeshPurohit/skia
817dd601f85f986a99d102de8dc42ee8638a56f9
[ "BSD-3-Clause" ]
null
null
null
tools/skpbench/_adb.py
TheRakeshPurohit/skia
817dd601f85f986a99d102de8dc42ee8638a56f9
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function import re import time import subprocess import sys class Adb: def __init__(self, device_serial=None, adb_binary=None, echo=False): self.__inv...
27.959459
90
0.668439
31855fba1ce87ce1b1e10f22f1518bbde29fee7a
17,553
py
Python
genome_sampler/plugin_setup.py
gregcaporaso/genome-sampler
ea708406f05aa883ce6622dc9602398c6f9950c8
[ "BSD-3-Clause" ]
4
2020-07-04T21:39:32.000Z
2022-03-18T11:08:48.000Z
genome_sampler/plugin_setup.py
gregcaporaso/genome-sampler
ea708406f05aa883ce6622dc9602398c6f9950c8
[ "BSD-3-Clause" ]
57
2020-05-28T18:26:37.000Z
2021-03-11T22:12:16.000Z
genome_sampler/plugin_setup.py
gregcaporaso/genome-sampler
ea708406f05aa883ce6622dc9602398c6f9950c8
[ "BSD-3-Clause" ]
6
2020-05-28T22:28:52.000Z
2022-01-24T14:53:16.000Z
import sys import tempfile import skbio import pandas as pd import qiime2 from qiime2.plugin import ( Plugin, Metadata, Int, Range, Choices, Str, MetadataColumn, Categorical, Float, List, Citations, Bool, TypeMatch, ) from q2_types.feature_data import ( FeatureDa...
39.268456
79
0.623597
4d7f6673d1ddb01e3860927533ffc0e9b4ebb20b
6,677
py
Python
snake/common/clip_trim/clip_trim_snake.py
smyang2018/NGS-pipe
9da959f546d9133ef325899e7bf916bcfafb8930
[ "Apache-2.0" ]
null
null
null
snake/common/clip_trim/clip_trim_snake.py
smyang2018/NGS-pipe
9da959f546d9133ef325899e7bf916bcfafb8930
[ "Apache-2.0" ]
null
null
null
snake/common/clip_trim/clip_trim_snake.py
smyang2018/NGS-pipe
9da959f546d9133ef325899e7bf916bcfafb8930
[ "Apache-2.0" ]
1
2022-03-17T03:15:02.000Z
2022-03-17T03:15:02.000Z
# This rule clips bases with too low quality from the reads # and removes adapter contamination in the reads if not 'TRIMMOMATICIN' in globals(): TRIMMOMATICIN = FASTQDIR if not 'TRIMMOMATICOUT' in globals(): TRIMMOMATICOUT = OUTDIR + 'cliptrim/' rule trimmomatic_paired: input: forward = TRIMMOMATIC...
47.692857
141
0.602516
188c60443ee5049bd80f477011aef0eb7fff54ff
26,756
py
Python
protocol26490.py
deniauma/sc2analyzer
404379127101765cc083ee5af25b4248dfbd4172
[ "MIT" ]
31
2015-01-19T09:42:02.000Z
2021-01-02T12:42:07.000Z
protocol26490.py
deniauma/sc2analyzer
404379127101765cc083ee5af25b4248dfbd4172
[ "MIT" ]
null
null
null
protocol26490.py
deniauma/sc2analyzer
404379127101765cc083ee5af25b4248dfbd4172
[ "MIT" ]
9
2015-04-02T04:24:54.000Z
2017-09-08T11:17:19.000Z
# Copyright (c) 2013 Blizzard Entertainment # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publi...
57.416309
1,783
0.629616
f80940bc71be0160bcc5d06b6f47be93b8c1afab
1,537
py
Python
new_version/make_own_db.py
ilyashirko/devman_edu_review_3
8c3eeba5fa35db503d1520e4a5c3c75c195e15f4
[ "Unlicense" ]
null
null
null
new_version/make_own_db.py
ilyashirko/devman_edu_review_3
8c3eeba5fa35db503d1520e4a5c3c75c195e15f4
[ "Unlicense" ]
null
null
null
new_version/make_own_db.py
ilyashirko/devman_edu_review_3
8c3eeba5fa35db503d1520e4a5c3c75c195e15f4
[ "Unlicense" ]
null
null
null
import json import os import urllib.request import urllib.parse from tqdm import tqdm from tmdb_helpers import get_user_api_key from tmdb_helpers import make_tmdb_api_request def load_films(user_api_key, films_amount=1000): all_films = [] for film_id in tqdm(range(films_amount)): # более дружелюбное...
41.540541
121
0.682498
c3ffde89f0e8ad8110033598275180d2db559d95
1,383
py
Python
setup.py
amacd31/bom_sdf_parser
545bff291242aa2f6d9cd2e2018ebad5e576e31c
[ "BSD-3-Clause" ]
1
2018-01-12T03:16:12.000Z
2018-01-12T03:16:12.000Z
setup.py
amacd31/bom_sdf_parser
545bff291242aa2f6d9cd2e2018ebad5e576e31c
[ "BSD-3-Clause" ]
null
null
null
setup.py
amacd31/bom_sdf_parser
545bff291242aa2f6d9cd2e2018ebad5e576e31c
[ "BSD-3-Clause" ]
null
null
null
import os from io import open import versioneer from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='bom_sdf_reader', version=versioneer.get_version(), cmdclass=vers...
32.162791
138
0.649313
d03b1321ddf1500392a5d9bec59f126314fb59a4
3,079
py
Python
cherrypy/test/test_auth_basic.py
doguitar/crossword
f73a336bbb7ca7778782334bb6c2059453e2756f
[ "MIT" ]
null
null
null
cherrypy/test/test_auth_basic.py
doguitar/crossword
f73a336bbb7ca7778782334bb6c2059453e2756f
[ "MIT" ]
4
2016-03-23T20:36:37.000Z
2016-03-23T21:04:34.000Z
cherrypy/test/test_auth_basic.py
doguitar/crossword
f73a336bbb7ca7778782334bb6c2059453e2756f
[ "MIT" ]
null
null
null
# This file is part of CherryPy <http://www.cherrypy.org/> # -*- coding: utf-8 -*- # vim:ts=4:sw=4:expandtab:fileencoding=utf-8 from hashlib import md5 import cherrypy from cherrypy._cpcompat import ntob from cherrypy.lib import auth_basic from cherrypy.test import helper class BasicAuthTest(helper.CPWebCase): ...
32.072917
78
0.578435
c516c711ea5c2d6b51d93b3d13e22445a3bf8576
70,437
py
Python
mabwiser/mab.py
ncilfone/mabwiser
329125d4110312d6001e9486e1cb3490a90565c4
[ "Apache-2.0" ]
null
null
null
mabwiser/mab.py
ncilfone/mabwiser
329125d4110312d6001e9486e1cb3490a90565c4
[ "Apache-2.0" ]
null
null
null
mabwiser/mab.py
ncilfone/mabwiser
329125d4110312d6001e9486e1cb3490a90565c4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 """ This module defines the public interface of the **MABWiser Library** providing access to the following modules: - ``MAB`` - ``LearningPolicy`` - ``NeighborhoodPolicy`` """ from typing import List, Union, Dict, NamedT...
47.146586
120
0.601658
32e6b2edec906e64f99235e5027b7c87cc45cda8
19,716
py
Python
slides/snippets/slides_snippets.py
mcodik/python-samples
147ffb2ffa66c12a156d252f7b269d5cd5633571
[ "Apache-2.0" ]
2
2020-06-12T10:22:20.000Z
2020-11-20T12:31:10.000Z
slides/snippets/slides_snippets.py
mcodik/python-samples
147ffb2ffa66c12a156d252f7b269d5cd5633571
[ "Apache-2.0" ]
null
null
null
slides/snippets/slides_snippets.py
mcodik/python-samples
147ffb2ffa66c12a156d252f7b269d5cd5633571
[ "Apache-2.0" ]
1
2019-01-17T23:30:38.000Z
2019-01-17T23:30:38.000Z
# Copyright 2018 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 to in writing, s...
36.715084
80
0.496602
ffb0226c7b2e8356bd71259d099a24337bbd0141
168
py
Python
tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingAverage_Seasonal_MonthOfYear_AR.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingAverage_Seasonal_MonthOfYear_AR.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingAverage_Seasonal_MonthOfYear_AR.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Fisher'] , ['MovingAverage'] , ['Seasonal_MonthOfYear'] , ['AR'] );
42
90
0.761905
9563e83b08fb0ceb11989095403e1547ed9cee01
16,848
py
Python
src/scNet.py
BlackParure/AI-StarCraft-II
7feee4addff9881b3c735791f4a43421f813fcfc
[ "Apache-2.0" ]
7
2019-01-17T16:46:24.000Z
2020-09-09T06:35:26.000Z
src/scNet.py
BlackParure/AI-StarCraft-II
7feee4addff9881b3c735791f4a43421f813fcfc
[ "Apache-2.0" ]
null
null
null
src/scNet.py
BlackParure/AI-StarCraft-II
7feee4addff9881b3c735791f4a43421f813fcfc
[ "Apache-2.0" ]
null
null
null
from torch import nn from lib.layers.Replicate_unit import Replicate_unit1d from lib.layers.FC_LSTM_unit import FC_lstm_stacked from lib.layers.Conv_LSTM_unit import CONV_lstm_unit import random import torch.nn.functional as F import torch from pysc2.lib import actions import numpy as np class scNet(nn.Module): de...
41.6
125
0.64708
b5337ae64b548612eb5801bc97bf8c7770c45934
177
py
Python
python/hello/main.py
useMecbcode/2022WinterRepos
44838cafed3b4c47375fb675600ca15ff021741f
[ "Apache-2.0" ]
null
null
null
python/hello/main.py
useMecbcode/2022WinterRepos
44838cafed3b4c47375fb675600ca15ff021741f
[ "Apache-2.0" ]
null
null
null
python/hello/main.py
useMecbcode/2022WinterRepos
44838cafed3b4c47375fb675600ca15ff021741f
[ "Apache-2.0" ]
null
null
null
class Node(object): def __init__(self, value): self.__init__(value, None) def __init__(self, value, next): self.data = value self.next = next
17.7
36
0.59322
d74bb5802b13b869bc0bde242587caa41ea1b7c7
928
py
Python
win_dein_deoplete/.vim/.cache/.vimrc/.dein/rplugin/python3/denite/source/colorscheme.py
takkii/dotfile
7daf848c718ee10603a68a6e37a1002a827ec72f
[ "MIT" ]
1
2018-10-11T21:31:43.000Z
2018-10-11T21:31:43.000Z
win_dein_deoplete/.vim/.cache/.vimrc/.dein/rplugin/python3/denite/source/colorscheme.py
takkii/dotfile
7daf848c718ee10603a68a6e37a1002a827ec72f
[ "MIT" ]
null
null
null
win_dein_deoplete/.vim/.cache/.vimrc/.dein/rplugin/python3/denite/source/colorscheme.py
takkii/dotfile
7daf848c718ee10603a68a6e37a1002a827ec72f
[ "MIT" ]
null
null
null
# ============================================================================ # FILE: colorscheme.py # AUTHOR: Prabir Shrestha <mail at prabir.me> # License: MIT license # ============================================================================ from .base import Base from os import path from denite.util import gl...
29.935484
78
0.519397
5dbfe3e252457f19b4b823184d1708d3a89c69eb
2,993
py
Python
src/custom-providers/azext_custom_providers/custom.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/custom-providers/azext_custom_providers/custom.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/custom-providers/azext_custom_providers/custom.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "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. # --------------------------------------------------------------------...
55.425926
174
0.528567
5ce2af245e12b59ced52687c838948322eb6bd5e
1,975
py
Python
celescope/tag/multi_tag.py
Chenjunjie1996/CeleScope
5cb30e66ee6e4d2b54dcc38edfb2efa5d5b0ba9d
[ "MIT" ]
29
2020-12-10T15:14:28.000Z
2022-03-14T12:35:42.000Z
celescope/tag/multi_tag.py
Chenjunjie1996/CeleScope
5cb30e66ee6e4d2b54dcc38edfb2efa5d5b0ba9d
[ "MIT" ]
40
2021-02-08T13:27:21.000Z
2022-03-23T08:32:39.000Z
celescope/tag/multi_tag.py
Chenjunjie1996/CeleScope
5cb30e66ee6e4d2b54dcc38edfb2efa5d5b0ba9d
[ "MIT" ]
14
2020-12-21T10:08:08.000Z
2022-03-22T07:36:16.000Z
from celescope.tag.__init__ import __ASSAY__ from celescope.tools.multi import Multi class Multi_tag(Multi): """ Usage ``` multi_tag \\ --mapfile ./tag.mapfile\\ --barcode_fasta ./smk_barcode.fa\\ --fq_pattern L25C45\\ --mod shell ``` """ def mapping_tag(se...
29.044118
93
0.56557
50da267e8a5f78f5f9a93cab6829770501fb7a91
1,420
py
Python
kolibri/core/device/utils.py
hosammr/kolibri
f51b73cc60f38f995497365b52b86721ab2a0441
[ "MIT" ]
1
2019-12-04T10:48:53.000Z
2019-12-04T10:48:53.000Z
kolibri/core/device/utils.py
hosammr/kolibri
f51b73cc60f38f995497365b52b86721ab2a0441
[ "MIT" ]
null
null
null
kolibri/core/device/utils.py
hosammr/kolibri
f51b73cc60f38f995497365b52b86721ab2a0441
[ "MIT" ]
1
2019-12-04T12:26:16.000Z
2019-12-04T12:26:16.000Z
""" Do all imports of the device settings model inside the function scope here, so as to allow these functions to be easily imported without worrying about circular imports. """ from django.db.utils import OperationalError from django.db.utils import ProgrammingError class DeviceNotProvisioned(Exception): pass ...
25.818182
78
0.727465
0dc315126e4d0afc074e6efda80fa60bff1fbb92
613
py
Python
templates/de_template.py
lucapost/nicelyventilated.it
2cf9f98229ef869d94be7594d5b3189bfca27396
[ "MIT" ]
null
null
null
templates/de_template.py
lucapost/nicelyventilated.it
2cf9f98229ef869d94be7594d5b3189bfca27396
[ "MIT" ]
null
null
null
templates/de_template.py
lucapost/nicelyventilated.it
2cf9f98229ef869d94be7594d5b3189bfca27396
[ "MIT" ]
null
null
null
import datetime LANG = "de" TITLE = "haus" SUBTITLE = "Wohnung zu Mieten in Zentrum von Rom, in dem <span>Esquilino Viertel</span>, in der nahe des <span>Hauptbahnhof Termini</span>" DESC = "Wohnung zu Mieten in Zentrum von Rom, in dem Esquilino Viertel, in der nahe des Hauptbahnhof Termini" MENU = "<li><p><a href=\"#...
61.3
275
0.665579
873a1b7164d005a0b71266bde8caa6b3b6414912
723
py
Python
mwe.py
boisjacques/qed-minitopo
4733278ac4341b97001e16d218e83ef66cb424a6
[ "MIT" ]
null
null
null
mwe.py
boisjacques/qed-minitopo
4733278ac4341b97001e16d218e83ef66cb424a6
[ "MIT" ]
null
null
null
mwe.py
boisjacques/qed-minitopo
4733278ac4341b97001e16d218e83ef66cb424a6
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import pandas as pd import numpy as np titles = ["nlnd", "nlmd", "nlhd", "mlnd", "mlmd", "mlhd", "hlnd", "hlmd", "hlhd"] plotData = pd.DataFrame(np.random.rand(20, 9), columns=titles) failureRates = pd.DataFrame(np.random.rand(9, 1), index=titles) color = {'boxes': 'DarkGreen', 'whisker...
34.428571
95
0.697095
9a65cd020cf151b818a86860f004bab2c55b337b
192
py
Python
source/util/architecture/settings.py
seemir/stressa
7c3b178cf13f74ee010dbd44ce99188de3862ef7
[ "MIT" ]
null
null
null
source/util/architecture/settings.py
seemir/stressa
7c3b178cf13f74ee010dbd44ce99188de3862ef7
[ "MIT" ]
337
2019-09-27T12:26:14.000Z
2022-03-31T04:13:04.000Z
source/util/architecture/settings.py
seemir/stressa
7c3b178cf13f74ee010dbd44ce99188de3862ef7
[ "MIT" ]
1
2019-11-08T13:40:30.000Z
2019-11-08T13:40:30.000Z
# -*- coding: utf-8 -*- __author__ = 'Samir Adrik' __email__ = 'samir.adrik@gmail.com' from source.util import __version__ name = "diagrams\\" + "Stressa v." + __version__ font_size = "16"
19.2
48
0.677083
949b2ef5ec80cd34ac48d2a5e9f948ee4ef3a5b1
3,667
py
Python
patron/tests/unit/scheduler/test_rpcapi.py
casbin/openstack-patron
b41b1262f3a52c8cc9f6b6bdf87be5a1abcf6d25
[ "Apache-2.0" ]
null
null
null
patron/tests/unit/scheduler/test_rpcapi.py
casbin/openstack-patron
b41b1262f3a52c8cc9f6b6bdf87be5a1abcf6d25
[ "Apache-2.0" ]
null
null
null
patron/tests/unit/scheduler/test_rpcapi.py
casbin/openstack-patron
b41b1262f3a52c8cc9f6b6bdf87be5a1abcf6d25
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
35.259615
78
0.649577
430c852e335aea9c0e86255b5f9c90e35ec7a273
216
py
Python
bip_utils/base58/__init__.py
MIPPLTeam/bip_utils
c66446e7ac3879d2cf6308c5b8eb7f7705292660
[ "MIT" ]
149
2020-05-15T08:11:43.000Z
2022-03-29T16:34:42.000Z
bip_utils/base58/__init__.py
MIPPLTeam/bip_utils
c66446e7ac3879d2cf6308c5b8eb7f7705292660
[ "MIT" ]
41
2020-04-03T15:57:56.000Z
2022-03-31T08:25:11.000Z
bip_utils/base58/__init__.py
MIPPLTeam/bip_utils
c66446e7ac3879d2cf6308c5b8eb7f7705292660
[ "MIT" ]
55
2020-04-03T17:05:15.000Z
2022-03-24T12:43:42.000Z
from bip_utils.base58.base58_ex import Base58ChecksumError from bip_utils.base58.base58 import Base58Alphabets, Base58Decoder, Base58Encoder from bip_utils.base58.base58_xmr import Base58XmrDecoder, Base58XmrEncoder
54
81
0.888889
25956866c449266fdba089f111ca5a389fbfdb4f
148
py
Python
.history/my_classes/ScopesClosuresAndDecorators/nonLocalScopes_20210710183537.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/nonLocalScopes_20210710183537.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/nonLocalScopes_20210710183537.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
""" NonLocal Scopes Inner Functions We can define functions from inside another function: """ def outer_func(): # some code
21.142857
53
0.635135
7152d0cb216239726db5033d23403772057b9680
9,267
py
Python
bot/exts/evergreen/fun.py
AbooMinister25/sir-lancebot
3b04c70976b1606ecd543154f1fd19077080aaf5
[ "MIT" ]
null
null
null
bot/exts/evergreen/fun.py
AbooMinister25/sir-lancebot
3b04c70976b1606ecd543154f1fd19077080aaf5
[ "MIT" ]
3
2021-08-21T07:26:51.000Z
2022-03-12T01:05:58.000Z
bot/exts/evergreen/fun.py
AbooMinister25/sir-lancebot
3b04c70976b1606ecd543154f1fd19077080aaf5
[ "MIT" ]
null
null
null
import functools import json import logging import random from pathlib import Path from typing import Callable, Iterable, Tuple, Union from discord import Embed, Message from discord.ext import commands from discord.ext.commands import BadArgument, Bot, Cog, Context, MessageConverter, clean_content from bot import ut...
37.366935
112
0.628467
2c94a08ba97b85c9ff56126f1625b016276493a9
214,407
py
Python
cadnano2/ui/mainwindow/icons_rc.py
elija-feigl/cadnano2
e0e3ac250f6951087b7863ab2999eee01c063e32
[ "MIT" ]
null
null
null
cadnano2/ui/mainwindow/icons_rc.py
elija-feigl/cadnano2
e0e3ac250f6951087b7863ab2999eee01c063e32
[ "MIT" ]
null
null
null
cadnano2/ui/mainwindow/icons_rc.py
elija-feigl/cadnano2
e0e3ac250f6951087b7863ab2999eee01c063e32
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt6 (Qt v5.10.1) # # WARNING! All changes made in this file will be lost! from PyQt6 import QtCore qt_resource_data = b"\ \x00\x00\x0c\xf2\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x64\x...
61.682106
113
0.725918
7fba48d7d0b5422b541aa7c261cdabbcf06e445d
214,306
py
Python
twisted/mail/imap4.py
jMyles/twisted
a5108c0db829847bbfd4bf427868eb0b13da0465
[ "Unlicense", "MIT" ]
3
2018-11-25T01:09:55.000Z
2021-08-24T01:56:36.000Z
twisted/mail/imap4.py
jMyles/twisted
a5108c0db829847bbfd4bf427868eb0b13da0465
[ "Unlicense", "MIT" ]
1
2022-03-04T17:40:22.000Z
2022-03-04T17:40:22.000Z
twisted/mail/imap4.py
jMyles/twisted
a5108c0db829847bbfd4bf427868eb0b13da0465
[ "Unlicense", "MIT" ]
3
2018-11-09T03:38:09.000Z
2020-02-24T06:26:10.000Z
# -*- test-case-name: twisted.mail.test.test_imap -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An IMAP4 protocol implementation @author: Jp Calderone To do:: Suspend idle timeout while server is processing Use an async message parser instead of buffering in memory Figure out ...
34.267029
124
0.582891
9b07d6c94a1a34448594f9b5a3371923f500f9c1
6,532
py
Python
naslib/optimizers/oneshot/drnas/optimizer.py
FanKuan44/NASLib
a8226e76e3dfe289f0c412bf48d197db17a03b9c
[ "Apache-2.0" ]
1
2022-03-28T09:35:33.000Z
2022-03-28T09:35:33.000Z
naslib/optimizers/oneshot/drnas/optimizer.py
zhengjian2322/NASLib
afa98c3ffa623aabe8d38bfe243e51b93a845de4
[ "Apache-2.0" ]
null
null
null
naslib/optimizers/oneshot/drnas/optimizer.py
zhengjian2322/NASLib
afa98c3ffa623aabe8d38bfe243e51b93a845de4
[ "Apache-2.0" ]
null
null
null
import numpy as np import torch import logging from torch.autograd import Variable from torch.distributions.dirichlet import Dirichlet from torch.distributions.kl import kl_divergence import torch.nn.functional as F from naslib.search_spaces.core.primitives import AbstractPrimitive from naslib.optimizers.oneshot.darts...
33.84456
108
0.645285
fe6178839cbbe504b9e6e6ed4fae148fca1af450
20,380
py
Python
python/ray/tests/test_basic.py
heyitsmui/ray
bed1be611e075a1e676c0bc66e26824e728108b2
[ "Apache-2.0" ]
null
null
null
python/ray/tests/test_basic.py
heyitsmui/ray
bed1be611e075a1e676c0bc66e26824e728108b2
[ "Apache-2.0" ]
null
null
null
python/ray/tests/test_basic.py
heyitsmui/ray
bed1be611e075a1e676c0bc66e26824e728108b2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import io import json import logging import os import pickle import sys import time import weakref import numpy as np import pytest import ray import ray.cluster_utils import ray.test_utils logger = logging.getLogger(__name__) # https://github.com/ray-project/ray/issues/6662 def test_ignore_http_pr...
27.765668
79
0.615309
ebd1ec0dc2b71198cfd1f63f4c0430eed11130da
8,438
py
Python
CalculationUI.py
atharvaagrawal/analysis-of-NSE
578020878f66478967dd91782fb9f4f01c815431
[ "MIT" ]
4
2019-07-04T16:34:15.000Z
2021-11-23T03:15:35.000Z
CalculationUI.py
atharvaagrawal/analysis-of-NSE
578020878f66478967dd91782fb9f4f01c815431
[ "MIT" ]
null
null
null
CalculationUI.py
atharvaagrawal/analysis-of-NSE
578020878f66478967dd91782fb9f4f01c815431
[ "MIT" ]
2
2021-07-04T15:09:29.000Z
2021-11-12T04:06:21.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Calculation.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from Calculation.CalculatingLast5Days import CalculatingLast5Days from PyQt5 import QtCore, QtGui, QtWidgets ...
49.05814
109
0.702892
cbc3260ac12e1f3b4a766d8b82b47b234d796c5b
8,524
py
Python
mmdet/core/bbox/transforms.py
hmtrii/mmdetection
a998e0ac45118482b4a1fa320c2f0611f35fb0d1
[ "Apache-2.0" ]
null
null
null
mmdet/core/bbox/transforms.py
hmtrii/mmdetection
a998e0ac45118482b4a1fa320c2f0611f35fb0d1
[ "Apache-2.0" ]
null
null
null
mmdet/core/bbox/transforms.py
hmtrii/mmdetection
a998e0ac45118482b4a1fa320c2f0611f35fb0d1
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch def bbox_flip(bboxes, img_shape, direction='horizontal'): """Flip bboxes horizontally or vertically. Args: bboxes (Tensor): Shape (..., 4*k) img_shape (tuple): Image shape. direction (str): Flip...
34.370968
80
0.547865
7220f87cbd8adf5bc5aac8ecd65552098fdc4534
5,472
py
Python
inference-engine/ie_bridges/python/tests/test_Blob.py
tkrupa-intel/openvino
8c0ff5d9065486d23901a9c27debd303661f465f
[ "Apache-2.0" ]
1
2021-01-17T03:24:52.000Z
2021-01-17T03:24:52.000Z
inference-engine/ie_bridges/python/tests/test_Blob.py
tkrupa-intel/openvino
8c0ff5d9065486d23901a9c27debd303661f465f
[ "Apache-2.0" ]
29
2020-12-08T07:33:34.000Z
2022-02-21T13:03:37.000Z
inference-engine/ie_bridges/python/tests/test_Blob.py
dorloff/openvino
1c3848a96fdd325b044babe6d5cd26db341cf85b
[ "Apache-2.0" ]
null
null
null
import pytest import numpy as np from openvino.inference_engine import TensorDesc, Blob from conftest import image_path path_to_image = image_path() def test_init_with_tensor_desc(): tensor_desc = TensorDesc("FP32", [1, 3, 127, 127], "NHWC") blob = Blob(tensor_desc) assert isinstance(blob.buffer, np.n...
35.303226
80
0.664839
b48195fc12aa1e354e74f62d8b5a531d1d2c2039
1,454
py
Python
backend.py
3bru/stajProject
8b936f49ab26063b5e2f7af7d02f90dd4fb047b4
[ "MIT" ]
1
2020-05-18T21:59:37.000Z
2020-05-18T21:59:37.000Z
backend.py
3bru/stajProject
8b936f49ab26063b5e2f7af7d02f90dd4fb047b4
[ "MIT" ]
null
null
null
backend.py
3bru/stajProject
8b936f49ab26063b5e2f7af7d02f90dd4fb047b4
[ "MIT" ]
null
null
null
import sqlite3 class Database: def __init__(self, db): self.conn = sqlite3.connect(db) self.cur = self.conn.cursor() self.cur.execute( "CREATE TABLE IF NOT EXISTS staj1 (id INTEGER PRIMARY KEY, title TEXT, author TEXT, year INTEGER, isbn TEXT)") self.conn.commit() ...
36.35
122
0.576341
b0b124ece7df5b918b13dd67198b249a27352a9b
1,428
py
Python
aptsources_cleanup/util/itertools.py
Erotemic/aptsources-cleanup
ac5fc5ccf5df81b414ccfed23c7d7efad355fcd5
[ "MIT" ]
null
null
null
aptsources_cleanup/util/itertools.py
Erotemic/aptsources-cleanup
ac5fc5ccf5df81b414ccfed23c7d7efad355fcd5
[ "MIT" ]
null
null
null
aptsources_cleanup/util/itertools.py
Erotemic/aptsources-cleanup
ac5fc5ccf5df81b414ccfed23c7d7efad355fcd5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 __all__ = ('filterfalse', 'accumulate', 'foreach', 'unique', 'count') from .functools import comp from .collections import ExtSet from itertools import filterfalse, accumulate def foreach(func, iterable0, *iterables, star_call=False): """Call 'func' on each item in 'iterable'.""" if ite...
23.409836
76
0.629552
b00837467c33d31f043fbed1f1451a26ae7d8a8e
11,049
py
Python
twisted/web/test/test_domhelpers.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
9
2017-07-10T04:27:31.000Z
2020-07-31T08:54:08.000Z
twisted/web/test/test_domhelpers.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
5
2020-06-05T18:16:39.000Z
2022-01-13T00:45:49.000Z
twisted/web/test/test_domhelpers.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
6
2017-02-13T09:11:02.000Z
2021-06-29T11:22:18.000Z
# -*- test-case-name: twisted.web.test.test_domhelpers -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Specific tests for (some of) the methods in L{twisted.web.domhelpers}. """ from xml.dom import minidom from twisted.trial.unittest import TestCase from twisted.web import microdom ...
35.990228
146
0.616255
e10916fb80807dbf14350fbf909962ce062956fd
1,264
py
Python
Project Euler/Problem 19/sol1.py
srivama/Python
809d4c077c179feb077f09a3cd2501f9724366a2
[ "MIT" ]
null
null
null
Project Euler/Problem 19/sol1.py
srivama/Python
809d4c077c179feb077f09a3cd2501f9724366a2
[ "MIT" ]
null
null
null
Project Euler/Problem 19/sol1.py
srivama/Python
809d4c077c179feb077f09a3cd2501f9724366a2
[ "MIT" ]
null
null
null
from __future__ import print_function ''' Counting Sundays Problem 19 You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight,...
24.307692
105
0.626582
45af10793f73985848b52e6ee9e054ca3b92289c
10,509
py
Python
carveme/universe/thermodynamics.py
xuanyuanXIV/carveme
889f4d06d000f90711d92a9fada6bd413d353263
[ "Apache-2.0" ]
null
null
null
carveme/universe/thermodynamics.py
xuanyuanXIV/carveme
889f4d06d000f90711d92a9fada6bd413d353263
[ "Apache-2.0" ]
null
null
null
carveme/universe/thermodynamics.py
xuanyuanXIV/carveme
889f4d06d000f90711d92a9fada6bd413d353263
[ "Apache-2.0" ]
null
null
null
from __future__ import division from builtins import zip import pandas as pd import numpy as np from reframed import load_cbmodel #from framed import NET, TVA from math import sqrt try: from component_contribution.kegg_model import KeggModel from component_contribution.component_contribution_trainer import Com...
33.04717
127
0.617185
415e37f6a85c6929f146772e0e120ab3f240e57e
1,797
py
Python
venv/Lib/site-packages/streamlit/proto/RootContainer_pb2.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
7
2022-01-16T12:28:16.000Z
2022-03-04T15:31:45.000Z
venv/Lib/site-packages/streamlit/proto/RootContainer_pb2.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
8
2021-09-22T12:47:32.000Z
2022-01-14T21:30:38.000Z
venv/Lib/site-packages/streamlit/proto/RootContainer_pb2.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
1
2021-03-30T05:02:53.000Z
2021-03-30T05:02:53.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: streamlit/proto/RootContainer.proto """Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _mess...
29.459016
145
0.782415
ec7534684a724b420f350b29ed00bddc0a5d55a7
1,694
py
Python
bot/welpers/utilities/terminal.py
xdwtf/mmbot
952bc90b9d0563e635a44210a147a29603d1355a
[ "Unlicense" ]
null
null
null
bot/welpers/utilities/terminal.py
xdwtf/mmbot
952bc90b9d0563e635a44210a147a29603d1355a
[ "Unlicense" ]
null
null
null
bot/welpers/utilities/terminal.py
xdwtf/mmbot
952bc90b9d0563e635a44210a147a29603d1355a
[ "Unlicense" ]
null
null
null
import asyncio class Terminal: def __init__(self, process: asyncio.subprocess.Process) -> None: self._process = process self._stdout = b"" self._stderr = b"" self._stdout_line = b"" self._stderr_line = b"" self._finished = False def cancel(self) -> None: ...
27.770492
78
0.566706
032d334451c06816d1757b9c6c6f63b4f2c62031
21,500
py
Python
netbox/netbox/settings.py
royvegard/netbox
f0acaa16c41ca23865968555efc4364acfc5983f
[ "Apache-2.0" ]
null
null
null
netbox/netbox/settings.py
royvegard/netbox
f0acaa16c41ca23865968555efc4364acfc5983f
[ "Apache-2.0" ]
null
null
null
netbox/netbox/settings.py
royvegard/netbox
f0acaa16c41ca23865968555efc4364acfc5983f
[ "Apache-2.0" ]
null
null
null
import importlib import logging import os import platform import re import socket import warnings from urllib.parse import urlsplit from django.contrib.messages import constants as messages from django.core.exceptions import ImproperlyConfigured, ValidationError from django.core.validators import URLValidator # # En...
33.69906
123
0.714791
b6772ab392f7f068035ad4fd8c87f7f72b85da5a
1,100
py
Python
sokoban_verifier.py
jlagun/sokoban
9df8ddb9b9ba94e354ea0891fddf140695f2b274
[ "MIT" ]
null
null
null
sokoban_verifier.py
jlagun/sokoban
9df8ddb9b9ba94e354ea0891fddf140695f2b274
[ "MIT" ]
null
null
null
sokoban_verifier.py
jlagun/sokoban
9df8ddb9b9ba94e354ea0891fddf140695f2b274
[ "MIT" ]
null
null
null
from gym_sokoban.envs.sokoban_env_fast import SokobanEnvFast import pandas as pd def check_solution(actions, seed=0, size=8, num_boxes=2): dim_room = (size, size) env = SokobanEnvFast(dim_room=dim_room, num_boxes=num_boxes, seed=seed, ...
28.205128
89
0.58
f8208833e1f7c3bf7033288178ed94edd920a6e4
255,399
py
Python
nova/virt/libvirt/driver.py
bopopescu/nova-26
3154f2cb0eb0d8c447c6d18ee0bab5e7dbeba60b
[ "Apache-2.0" ]
null
null
null
nova/virt/libvirt/driver.py
bopopescu/nova-26
3154f2cb0eb0d8c447c6d18ee0bab5e7dbeba60b
[ "Apache-2.0" ]
null
null
null
nova/virt/libvirt/driver.py
bopopescu/nova-26
3154f2cb0eb0d8c447c6d18ee0bab5e7dbeba60b
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 University Of Minho # (c) Copyright 2013 Hewlett-Pa...
43.112593
79
0.567254
e1d6fb9ee90223a9298ea63aada2683b7c12f1b1
7,048
py
Python
scripts/factory-common-install/py/src/nsf_factory_common_install/repo_workspace.py
jraygauthier/nixos_secure_factory
67adb93b153902226301d4a68e7b6e3a0af660c2
[ "Apache-2.0" ]
1
2021-04-17T10:13:42.000Z
2021-04-17T10:13:42.000Z
scripts/factory-common-install/py/src/nsf_factory_common_install/repo_workspace.py
jraygauthier/nixos_secure_factory
67adb93b153902226301d4a68e7b6e3a0af660c2
[ "Apache-2.0" ]
4
2019-10-21T17:40:17.000Z
2021-11-11T13:46:20.000Z
scripts/factory-common-install/py/src/nsf_factory_common_install/repo_workspace.py
jraygauthier/nixos_secure_factory
67adb93b153902226301d4a68e7b6e3a0af660c2
[ "Apache-2.0" ]
2
2019-10-10T18:32:01.000Z
2021-08-24T16:02:09.000Z
import os from pathlib import Path from typing import Optional from .file_current_device_state import CurrentDeviceStateFile from .file_factory_state import FactoryStateFile, FactoryStateFileError from .types_device import ( DeviceInstanceStateAccessError, DeviceInstanceStateFileAccessError, DeviceInstanc...
31.464286
90
0.651249
f90957e5a37550238146e8f162786b9b91bfc5ea
176
py
Python
src/python/threadHelpers/ThreadHelperFunctions.py
NRizzoInc/RaspberryPi
c66e882accdf72ad7738fa16c1492b4b1ed54eab
[ "MIT" ]
2
2021-01-06T22:56:14.000Z
2021-01-06T22:56:41.000Z
src/python/threadHelpers/ThreadHelperFunctions.py
NRizzoInc/RaspberryPi
c66e882accdf72ad7738fa16c1492b4b1ed54eab
[ "MIT" ]
28
2020-12-17T23:55:11.000Z
2021-02-17T21:23:17.000Z
src/python/threadHelpers/ThreadHelperFunctions.py
NRizzoInc/RaspberryPi
c66e882accdf72ad7738fa16c1492b4b1ed54eab
[ "MIT" ]
null
null
null
from threading import Thread def startAndJoinThread(threadObj:Thread): """Helper function that starts and joins a thread""" threadObj.start() threadObj.join()
29.333333
57
0.721591
15e1741ad10d899ace8025fbb90dd539de1dcb72
7,104
py
Python
python/Whitepoint.py
KelSolaar/nuke-colortools
5480713dec92e0c259d7d86d6774d7c7bb3b61da
[ "MIT" ]
52
2020-02-12T04:38:44.000Z
2022-02-13T21:31:17.000Z
python/Whitepoint.py
KelSolaar/nuke-colortools
5480713dec92e0c259d7d86d6774d7c7bb3b61da
[ "MIT" ]
3
2020-11-10T05:36:51.000Z
2021-07-25T14:54:31.000Z
python/Whitepoint.py
KelSolaar/nuke-colortools
5480713dec92e0c259d7d86d6774d7c7bb3b61da
[ "MIT" ]
15
2020-02-12T04:41:13.000Z
2022-03-20T21:49:03.000Z
import nuke float3 = nuke.math.Vector3 float3x3 = nuke.math.Matrix3 def transpose(m): # Transpose (swap rows and columns) of a nuke.math.Matrix3 return float3x3(m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], m[8]) def set_matrix(m): # Populate a nuke.math.Matrix3 with a 3x3 python list (either 3x3 or 1x9...
46.12987
152
0.597832
69929eedefe16f30d5da544b0daef05885cf34a8
7,141
py
Python
pontoon/base/tests/views/test_locale_agnostic.py
anujpandey785/pontoon
15052884c364bb6928dc07b651ca273a345bf5a8
[ "BSD-3-Clause" ]
null
null
null
pontoon/base/tests/views/test_locale_agnostic.py
anujpandey785/pontoon
15052884c364bb6928dc07b651ca273a345bf5a8
[ "BSD-3-Clause" ]
4
2021-01-12T12:00:43.000Z
2021-12-13T20:49:04.000Z
pontoon/base/tests/views/test_locale_agnostic.py
sa-tasche/pontoon
f02cb9e92add6c035b1cbe66c301afcd95ae0489
[ "BSD-3-Clause" ]
3
2017-10-15T13:15:47.000Z
2018-10-10T09:03:19.000Z
from unittest.mock import MagicMock, PropertyMock, patch import pytest from django.http import HttpResponse from django.urls import reverse from django.contrib.auth.models import User, AnonymousUser @patch("pontoon.base.views.get_object_or_404") @patch("pontoon.base.views.utils.get_project_locale_from_request") @pa...
36.065657
81
0.726229
2ea91bd0f96053f5988c55fdf4374176f74a97ed
22,695
py
Python
src/sage/combinat/root_system/dynkin_diagram.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/root_system/dynkin_diagram.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/root_system/dynkin_diagram.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
1
2020-07-24T12:20:37.000Z
2020-07-24T12:20:37.000Z
""" Dynkin diagrams AUTHORS: - Travis Scrimshaw (2012-04-22): Nicolas M. Thiery moved Cartan matrix creation to here and I cached results for speed. - Travis Scrimshaw (2013-06-11): Changed inputs of Dynkin diagrams to handle other Dynkin diagrams and graphs. Implemented remaining Cartan type methods. - Christi...
29.940633
118
0.512007
a7cfe0a5c837421a33029fed17a0a3af8e284adb
34,792
py
Python
cherilibs/trunk/tools/analyse_trace.py
tupipa/beri
cef1b41d52592cfa7454ddf59f9f2994e447cd66
[ "Apache-2.0" ]
36
2015-05-29T16:47:19.000Z
2022-02-08T21:16:26.000Z
cherilibs/trunk/tools/analyse_trace.py
tupipa/beri
cef1b41d52592cfa7454ddf59f9f2994e447cd66
[ "Apache-2.0" ]
1
2015-10-14T13:05:21.000Z
2015-10-19T20:34:03.000Z
cherilibs/trunk/tools/analyse_trace.py
tupipa/beri
cef1b41d52592cfa7454ddf59f9f2994e447cd66
[ "Apache-2.0" ]
15
2015-06-11T07:10:58.000Z
2021-06-18T05:14:54.000Z
#!/usr/bin/env python #- # Copyright (c) 2012, 2014 Robert M. Norton # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_...
46.889488
458
0.620775
e296827cdcd9472d32b2909c6668f50b47512c2c
3,268
py
Python
account/views.py
shiv-source/online-photographer-finder
d72089fef03a6ebc30c96a29820a0751f70d5b9a
[ "MIT" ]
1
2020-06-19T22:41:59.000Z
2020-06-19T22:41:59.000Z
account/views.py
shiv-source/online-photographer-finder
d72089fef03a6ebc30c96a29820a0751f70d5b9a
[ "MIT" ]
null
null
null
account/views.py
shiv-source/online-photographer-finder
d72089fef03a6ebc30c96a29820a0751f70d5b9a
[ "MIT" ]
null
null
null
# from django.shortcuts import render,redirect # from django.contrib.auth.models import User,auth # # Create your views here. # def login(request): # if request.method == 'POST': # username = request.POST['username'] # password = request.POST['password'] # user = auth.authenticate(usernam...
36.311111
138
0.601897
33d7e3cf22d23aaf09887ce4feed5e2dcb506999
430
py
Python
livia_ui/cli/command/converters/IntValueConverter.py
sing-group/livia-ui
809d90d4429bdd48ad2b8bf6b9546b7ea0ca6dcf
[ "MIT" ]
null
null
null
livia_ui/cli/command/converters/IntValueConverter.py
sing-group/livia-ui
809d90d4429bdd48ad2b8bf6b9546b7ea0ca6dcf
[ "MIT" ]
null
null
null
livia_ui/cli/command/converters/IntValueConverter.py
sing-group/livia-ui
809d90d4429bdd48ad2b8bf6b9546b7ea0ca6dcf
[ "MIT" ]
null
null
null
from typing import Type, Any, Optional from livia_ui.cli.command.converters.ValueConverter import ValueConverter from livia_ui.cli.command.converters import value_converter @value_converter class IntValueConverter(ValueConverter[int]): def can_convert(self, value_type: Type[Any]) -> bool: return value_ty...
30.714286
73
0.753488
394d64e5c598d3f9493a59bf1767d8721e764ed7
1,760
py
Python
scripts/dataentry/sponsors.py
dlg4nlp/dlg4nlp.github.io
bf20f86def08182f144a3bd0c095f06bd8edf66b
[ "MIT" ]
14
2021-06-20T08:19:33.000Z
2022-03-06T01:34:49.000Z
scripts/dataentry/sponsors.py
teddylfwu/AAAI21-Virtual-Conference
aa5f260d586fdf65b7128ee533a1910b85d1452c
[ "MIT" ]
null
null
null
scripts/dataentry/sponsors.py
teddylfwu/AAAI21-Virtual-Conference
aa5f260d586fdf65b7128ee533a1910b85d1452c
[ "MIT" ]
1
2021-07-24T03:34:53.000Z
2021-07-24T03:34:53.000Z
from collections import defaultdict from pathlib import Path from typing import Dict, List import pandas as pd import dateutil.parser from ruamel import yaml import ruamel from scripts.dataentry.paths import PATH_YAMLS, PATH_ZOOM_ACCOUNTS_WITH_PASSWORDS root = Path(r"D:\Dropbox\emnlp2020\sponsors\clean\yamls") de...
29.333333
85
0.659091
5bf647defcaef1a441a3d76ec7d94841aaa4b9f5
11,112
py
Python
main.py
uasier/xszc
d68e955889e3274af27346424707c3c917b69f93
[ "MIT" ]
29
2019-04-02T07:23:05.000Z
2021-06-11T03:24:06.000Z
main.py
uasier/xszc
d68e955889e3274af27346424707c3c917b69f93
[ "MIT" ]
null
null
null
main.py
uasier/xszc
d68e955889e3274af27346424707c3c917b69f93
[ "MIT" ]
11
2019-04-02T10:22:43.000Z
2021-11-07T07:23:24.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ info: author:uasier github:https://github.com/uasier/ update_time:2019-4-1 """ import time # 用来延时 from selenium import webdriver # selenium方式爬数据 import pymysql # 用来操作数据库 import logging # 设置日志 # 日志相关配置 logger = logging.Logger('log', level=logging.WARNING) sh = logg...
40.407273
112
0.553186
53f84e46a92f924764e50fd23917304ffbb2f75e
3,747
py
Python
synthetic_data/utils/utils.py
kasra-hosseini/synthetic_data_release
768fe15cae6a033a17390d8dc2152bb75a083ca2
[ "MIT", "BSD-3-Clause" ]
null
null
null
synthetic_data/utils/utils.py
kasra-hosseini/synthetic_data_release
768fe15cae6a033a17390d8dc2152bb75a083ca2
[ "MIT", "BSD-3-Clause" ]
null
null
null
synthetic_data/utils/utils.py
kasra-hosseini/synthetic_data_release
768fe15cae6a033a17390d8dc2152bb75a083ca2
[ "MIT", "BSD-3-Clause" ]
null
null
null
import json import random from os import path import numpy as np from pandas import cut, get_dummies from IPython.display import display_html def json_numpy_serialzer(o): """ Serialize numpy types for json Parameters: o (object): any python object which fails to be serialized by json Example: ...
26.020833
94
0.603683
39d37d2054287001ff21f9a84752029cb4599a2d
4,426
py
Python
senior/KinD/evaluate_LOLdataset.py
LeiGitHub1024/lowlight
86649ae4275b8908d39561792a8068d391318f8d
[ "MIT" ]
null
null
null
senior/KinD/evaluate_LOLdataset.py
LeiGitHub1024/lowlight
86649ae4275b8908d39561792a8068d391318f8d
[ "MIT" ]
null
null
null
senior/KinD/evaluate_LOLdataset.py
LeiGitHub1024/lowlight
86649ae4275b8908d39561792a8068d391318f8d
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import print_function import os import time import random from PIL import Image import tensorflow as tf import numpy as np from utils import * from model import * from glob import glob sess = tf.Session() input_decom = tf.placeholder(tf.float32, [None, None, None, 3], name='input_decom...
39.873874
128
0.764799
c0b76d7c377cebfc289b2f96937c4e03bcbe81de
397
py
Python
sample_project/neo4jadmin/neo4jadmin/wsgi.py
SinaSaderi/django-neomodel-admin
f2b1c22dbecc252b3aaa6e0dcf3ea3b5ce480202
[ "BSD-3-Clause" ]
null
null
null
sample_project/neo4jadmin/neo4jadmin/wsgi.py
SinaSaderi/django-neomodel-admin
f2b1c22dbecc252b3aaa6e0dcf3ea3b5ce480202
[ "BSD-3-Clause" ]
null
null
null
sample_project/neo4jadmin/neo4jadmin/wsgi.py
SinaSaderi/django-neomodel-admin
f2b1c22dbecc252b3aaa6e0dcf3ea3b5ce480202
[ "BSD-3-Clause" ]
null
null
null
""" WSGI config for neo4jadmin project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SE...
23.352941
78
0.788413
bd17a2c70775a8dc4fd2e240ee39e405b18876d5
19,149
py
Python
gluonts/distribution/lds.py
lostella/gluon-ts
d0a605abdf072324e6c6df8a0ead740f01768924
[ "Apache-2.0" ]
null
null
null
gluonts/distribution/lds.py
lostella/gluon-ts
d0a605abdf072324e6c6df8a0ead740f01768924
[ "Apache-2.0" ]
null
null
null
gluonts/distribution/lds.py
lostella/gluon-ts
d0a605abdf072324e6c6df8a0ead740f01768924
[ "Apache-2.0" ]
2
2019-10-12T21:52:14.000Z
2019-11-20T18:47:56.000Z
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
32.566327
84
0.591571
193a092ed62f7b69506b30517bd83f2b00a1a6bf
2,201
py
Python
code/processing/growth_rates/2021-08-18_r2_DoubleKO_acetate/analysis.py
cremerlab/useless_expression
a6020674f0ae73b4cc6173de60a0ea93016ee562
[ "MIT" ]
null
null
null
code/processing/growth_rates/2021-08-18_r2_DoubleKO_acetate/analysis.py
cremerlab/useless_expression
a6020674f0ae73b4cc6173de60a0ea93016ee562
[ "MIT" ]
null
null
null
code/processing/growth_rates/2021-08-18_r2_DoubleKO_acetate/analysis.py
cremerlab/useless_expression
a6020674f0ae73b4cc6173de60a0ea93016ee562
[ "MIT" ]
null
null
null
#%% import numpy as np import pandas as pd import futileprot.viz import altair as alt import altair_saver import scipy.stats colors, palette = futileprot.viz.altair_style() # Add metadata DATE = '2021-08-18' RUN_NO = 2 STRAINS = 'DoubleKO' MEDIUM = 'acetate' # Load the measurement data data = pd.read_csv(f'./output...
32.367647
89
0.547024
e71f66c4f62ea9b73becf987ae71973059ddefeb
332
py
Python
toontown/toon/DistributedNPCScientistAI.py
CrankySupertoon01/Toontown-2
60893d104528a8e7eb4aced5d0015f22e203466d
[ "MIT" ]
1
2021-02-13T22:40:50.000Z
2021-02-13T22:40:50.000Z
toontown/toon/DistributedNPCScientistAI.py
CrankySupertoonArchive/Toontown-2
60893d104528a8e7eb4aced5d0015f22e203466d
[ "MIT" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
toontown/toon/DistributedNPCScientistAI.py
CrankySupertoonArchive/Toontown-2
60893d104528a8e7eb4aced5d0015f22e203466d
[ "MIT" ]
2
2019-12-02T01:39:10.000Z
2021-02-13T22:41:00.000Z
import DistributedNPCToonBaseAI, random Animation = random.choice(["ScientistPlay", "ScientistWork", "ScientistLessWork", "ScientistJealous"]) class DistributedNPCScientistAI(DistributedNPCToonBaseAI.DistributedNPCToonBaseAI): def getStartAnimState(self): return 'ScientistEmcee' if self.npcId == 2020 els...
36.888889
102
0.801205
db05cbe903442c938060f2d1233d60b8b46227fb
7,678
py
Python
Customers/models.py
solvable/rr
314ae475ac9a56779d5deb3c457427bf6d8dcb5f
[ "MIT" ]
null
null
null
Customers/models.py
solvable/rr
314ae475ac9a56779d5deb3c457427bf6d8dcb5f
[ "MIT" ]
null
null
null
Customers/models.py
solvable/rr
314ae475ac9a56779d5deb3c457427bf6d8dcb5f
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.conf import settings from django.db import models import geocoder from django.core.urlresolvers import reverse from .choices import * from schedule.models import Event, EventRelation, Calendar import datetime from datetime import timedelta # Create your models here. ...
36.216981
203
0.652253
0f27cf9318790732576fc45360862bcb4d323688
5,907
py
Python
tensorflow/compiler/tests/complex_div_test.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
848
2019-12-03T00:16:17.000Z
2022-03-31T22:53:17.000Z
tensorflow/compiler/tests/complex_div_test.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
1,056
2019-12-15T01:20:31.000Z
2022-02-10T02:06:28.000Z
tensorflow/compiler/tests/complex_div_test.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
506
2019-12-03T00:46:26.000Z
2022-03-30T10:34:56.000Z
# 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...
34.54386
80
0.487049
05c41d816568221174fc576b90c8c6472d22ebb0
3,976
py
Python
apps/breakfast/toast/programmer/tools/mig/ReadToastTlvCmdMsg.py
mtaghiza/tinyos-main-1
cac075f7eae46c6a37409e66137a78b9bc3a64b1
[ "BSD-3-Clause" ]
null
null
null
apps/breakfast/toast/programmer/tools/mig/ReadToastTlvCmdMsg.py
mtaghiza/tinyos-main-1
cac075f7eae46c6a37409e66137a78b9bc3a64b1
[ "BSD-3-Clause" ]
null
null
null
apps/breakfast/toast/programmer/tools/mig/ReadToastTlvCmdMsg.py
mtaghiza/tinyos-main-1
cac075f7eae46c6a37409e66137a78b9bc3a64b1
[ "BSD-3-Clause" ]
1
2022-02-21T14:31:18.000Z
2022-02-21T14:31:18.000Z
# # This class is automatically generated by mig. DO NOT EDIT THIS FILE. # This class implements a Python interface to the 'ReadToastTlvCmdMsg' # message type. # from apps.breakfast.tools.Life.tools import Message # The default size of this message type in bytes. DEFAULT_MESSAGE_SIZE = 0 # The Active Message type as...
25.651613
83
0.589034
676fc5a4320ccf930e62ea9c83c1e80209fdd34f
14,245
py
Python
cli.py
JulianStier/elman-srl
1b28552e20e5f5d0428423bd1e290c51a7a6f5e9
[ "MIT" ]
null
null
null
cli.py
JulianStier/elman-srl
1b28552e20e5f5d0428423bd1e290c51a7a6f5e9
[ "MIT" ]
null
null
null
cli.py
JulianStier/elman-srl
1b28552e20e5f5d0428423bd1e290c51a7a6f5e9
[ "MIT" ]
1
2019-02-15T03:13:56.000Z
2019-02-15T03:13:56.000Z
import argparse import hashlib import numpy import pickle import os.path import math import random import time import sys from model.elman import model from preprocessing.index import WordIndex, LabeledData from preprocessing.simplesrl import SimpleSrl from util.util import context_window, minibatch, shuffle parser = ...
42.27003
267
0.64563
75f890eb59d298c06ed6d5e01bdb2e896eda325c
678
py
Python
matrix_imposter_bot/__main__.py
mrjohnson22/matrix-imposter-bot
961747b71ef3b2ac3a383b0106ebb30171b5b055
[ "Apache-2.0" ]
14
2019-11-24T22:05:10.000Z
2022-02-01T02:14:07.000Z
matrix_imposter_bot/__main__.py
mrjohnson22/matrix-imposter-bot
961747b71ef3b2ac3a383b0106ebb30171b5b055
[ "Apache-2.0" ]
8
2020-01-25T19:36:37.000Z
2020-07-12T07:04:57.000Z
matrix_imposter_bot/__main__.py
mrjohnson22/matrix-imposter-bot
961747b71ef3b2ac3a383b0106ebb30171b5b055
[ "Apache-2.0" ]
null
null
null
import sys from . import app from . import config dev = False debug = False skip_prep = False for arg in sys.argv[1:]: if arg == '-d': dev = True elif arg == '-g': debug = True elif arg == '--skip': skip_prep = True else: print(f'Invalid argument: {arg}') sys....
17.384615
46
0.603245
b5d5d37654ebd30384e60dc9194f1681fbcf55af
1,044
py
Python
ansible/roles/hoover/templates/search-local.py
hoover/liquid-setup
498fc8a946e1e28ff0f344c8b9ad78ae931a1798
[ "MIT" ]
3
2017-05-24T14:24:12.000Z
2017-07-19T10:59:18.000Z
ansible/roles/hoover/templates/search-local.py
hoover/liquid-setup
498fc8a946e1e28ff0f344c8b9ad78ae931a1798
[ "MIT" ]
71
2017-06-09T10:51:30.000Z
2018-07-04T08:13:11.000Z
ansible/roles/hoover/templates/search-local.py
hoover/liquid-setup
498fc8a946e1e28ff0f344c8b9ad78ae931a1798
[ "MIT" ]
1
2017-05-17T19:54:52.000Z
2017-05-17T19:54:52.000Z
from pathlib import Path base_dir = Path(__file__).absolute().parent.parent.parent.parent DEBUG = {% if devel %}True{% else %}False{% endif %} DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'hoover-search', }, } INSTALLED_APPS = ( 'hoover.contrib.oa...
28.216216
69
0.721264
4b98cc143bfd745bcae9001bb1c59d1234550833
2,418
py
Python
dev_utils/make-minimal-datafiles.py
check-spelling/webbpsf
88d2915e623750dff8be4b9ddbdf15ed15285f4f
[ "BSD-3-Clause" ]
null
null
null
dev_utils/make-minimal-datafiles.py
check-spelling/webbpsf
88d2915e623750dff8be4b9ddbdf15ed15285f4f
[ "BSD-3-Clause" ]
1
2021-03-02T15:06:50.000Z
2021-03-02T15:06:50.000Z
dev_utils/make-minimal-datafiles.py
check-spelling/webbpsf
88d2915e623750dff8be4b9ddbdf15ed15285f4f
[ "BSD-3-Clause" ]
1
2021-12-27T04:24:30.000Z
2021-12-27T04:24:30.000Z
#!/usr/bin/env python # Make minimal data files # This is used to make a stripped-down version of the data files for use on Travis CI import os, sys import astropy.io.fits as fits import subprocess import glob try: inputfile = sys.argv[1] except IndexError: print("""ERROR - no input data file provided.\n\nUsa...
34.056338
128
0.70761
a8a22c7de4dd8b14356016936ec2986428d3e16b
131
py
Python
boris/intro_to_lists.py
magicalcarpet/the_complete_python_course
0ac0c5015a93607d7d29258ac0a3fc38dda81bd2
[ "MIT" ]
null
null
null
boris/intro_to_lists.py
magicalcarpet/the_complete_python_course
0ac0c5015a93607d7d29258ac0a3fc38dda81bd2
[ "MIT" ]
null
null
null
boris/intro_to_lists.py
magicalcarpet/the_complete_python_course
0ac0c5015a93607d7d29258ac0a3fc38dda81bd2
[ "MIT" ]
null
null
null
empty = [] empty = list() sodas = ['Coke', 'Pepsi', 'Dr Pepper'] print(len(sodas)) quarterly_revenue = [15000, 1200, 9000, 20000]
18.714286
46
0.641221
15730308320d670d4994a5282a31f27404fd7934
886
py
Python
src/jwt_auth.py
rarandall/Zoom2Youtube
1a33312fb2ea96a6b34de2520101a4c6e2ef304e
[ "MIT" ]
null
null
null
src/jwt_auth.py
rarandall/Zoom2Youtube
1a33312fb2ea96a6b34de2520101a4c6e2ef304e
[ "MIT" ]
null
null
null
src/jwt_auth.py
rarandall/Zoom2Youtube
1a33312fb2ea96a6b34de2520101a4c6e2ef304e
[ "MIT" ]
null
null
null
import time from datetime import datetime from datetime import timedelta import jwt def make_http_headers(access_token: str) -> dict: return { "authorization": "Bearer {}".format(access_token), "content-type": "application/json" } def generate_access_token( api_key: str, ap...
23.315789
65
0.680587
74a95091930b5e4b8e1b90d1bb06f64b39cc92a0
472
py
Python
engine/serializers/datamap.py
hammerheadlemon/bcompiler-engine
2910b44bc1123e88e644491050ee6a6d9df146b2
[ "MIT" ]
2
2019-09-23T08:51:48.000Z
2019-10-14T08:44:28.000Z
engine/serializers/datamap.py
hammerheadlemon/bcompiler-engine
2910b44bc1123e88e644491050ee6a6d9df146b2
[ "MIT" ]
27
2019-07-08T11:15:03.000Z
2020-06-22T15:47:25.000Z
engine/serializers/datamap.py
yulqen/bcompiler-engine
40eff19e04eabacac991bb34d31a7e7a7d6b729a
[ "MIT" ]
1
2019-09-07T14:05:16.000Z
2019-09-07T14:05:16.000Z
import json from typing import Any class DatamapEncoder(json.JSONEncoder): def default(self, o: Any) -> Any: # type: ignore try: to_serialize = { "key": o.key, "sheet": o.sheet, "cellref": o.cellref, "data_type": o.data_type, ...
26.222222
53
0.497881
511f922d1e5f9e3bb866d741672070f5ddaf4b72
1,804
py
Python
cryptoblotter/trades/gcppubsub.py
PAV-Laboratory/cryptoblotter
f573592a3638fbc6cae24d76305de36b932949c6
[ "MIT" ]
1
2021-08-01T19:16:02.000Z
2021-08-01T19:16:02.000Z
cryptoblotter/trades/gcppubsub.py
PAV-Laboratory/cryptoblotter
f573592a3638fbc6cae24d76305de36b932949c6
[ "MIT" ]
null
null
null
cryptoblotter/trades/gcppubsub.py
PAV-Laboratory/cryptoblotter
f573592a3638fbc6cae24d76305de36b932949c6
[ "MIT" ]
null
null
null
import os from decimal import Decimal from cryptofeed.backends.gcppubsub import GCPPubSubCallback from gcloud.aio.pubsub import PublisherClient, PubsubMessage from yapic import json from ..constants import PROJECT_ID from ..utils import is_local, set_environment from .utils import normalize_symbol class GCPPubSubTr...
31.103448
76
0.64745
aa07522f9c97d3753080f0fa97b9f828d841f35f
1,625
py
Python
openpyxl/tests/schema.py
sekcheong/openpyxl
e1ba037f171efa348f75431c35a50de5ca277b78
[ "MIT" ]
null
null
null
openpyxl/tests/schema.py
sekcheong/openpyxl
e1ba037f171efa348f75431c35a50de5ca277b78
[ "MIT" ]
null
null
null
openpyxl/tests/schema.py
sekcheong/openpyxl
e1ba037f171efa348f75431c35a50de5ca277b78
[ "MIT" ]
null
null
null
from __future__ import absolute_import # Copyright (c) 2010-2017 openpyxl import os from zipfile import ZipFile from lxml.etree import XMLSchema from lxml.etree import parse # Provide schema based validators, lxml required # use schema.validate(Element) or schema.assertValid(Element) for messages SCHEMA_FOLDER = o...
31.25
83
0.705231
5c304f24adb7a914ee1b513c7eadb6a1008ecff3
25,143
py
Python
update/parallel_runner.py
megadarkparticle/Clone-for-thesis
58375f6f0e02b04d88cc34cd257061a145ce4853
[ "Apache-2.0" ]
null
null
null
update/parallel_runner.py
megadarkparticle/Clone-for-thesis
58375f6f0e02b04d88cc34cd257061a145ce4853
[ "Apache-2.0" ]
null
null
null
update/parallel_runner.py
megadarkparticle/Clone-for-thesis
58375f6f0e02b04d88cc34cd257061a145ce4853
[ "Apache-2.0" ]
null
null
null
from envs import REGISTRY as env_REGISTRY from functools import partial from components.episode_buffer import EpisodeBatch from multiprocessing import Pipe, Process import numpy as np import torch as th import torch.nn as nn device = th.device("cpu") # Based (very) heavily on SubprocVecEnv from OpenAI Baselines # http...
42.471284
147
0.54365
083cf357e5b046432cbfd1855362910feeafe27c
9,743
py
Python
docs/conf.py
corzani/radio81
eefe00efc768b3c91ada2a6a695eb143f8570393
[ "MIT" ]
null
null
null
docs/conf.py
corzani/radio81
eefe00efc768b3c91ada2a6a695eb143f8570393
[ "MIT" ]
null
null
null
docs/conf.py
corzani/radio81
eefe00efc768b3c91ada2a6a695eb143f8570393
[ "MIT" ]
null
null
null
# This file is execfile()d with the current directory set to its containing dir. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # # All configuration values have a default; values that are comme...
33.947735
85
0.69804
9dd28cf2cd7bb84b53e5c051db605f256aed0c3a
5,162
py
Python
prez/renderers/vocprez/vocprez_dataset_renderer.py
surroundaustralia/Prez
325043e5fa6088a027cbd2100a33494facc3febd
[ "BSD-3-Clause" ]
2
2021-12-21T06:53:18.000Z
2022-03-23T21:14:49.000Z
prez/renderers/vocprez/vocprez_dataset_renderer.py
surroundaustralia/Prez
325043e5fa6088a027cbd2100a33494facc3febd
[ "BSD-3-Clause" ]
20
2021-12-03T01:47:04.000Z
2022-03-31T04:33:08.000Z
prez/renderers/vocprez/vocprez_dataset_renderer.py
surroundaustralia/Prez
325043e5fa6088a027cbd2100a33494facc3febd
[ "BSD-3-Clause" ]
null
null
null
from typing import Dict, Optional, Union from fastapi.responses import Response, JSONResponse, PlainTextResponse from rdflib import Graph, URIRef, Literal from rdflib.namespace import DCAT, DCTERMS, RDF from connegp import MEDIATYPE_NAMES from config import * from renderers import Renderer from profiles.vocprez_profi...
36.097902
87
0.60926
515eedce8ec61273d106e004a490a1256d54d454
3,547
py
Python
test/test_mish.py
hiyyg/mish-cuda
b389b9f84433d8b9b4129d3e879ba746d248d8f2
[ "MIT" ]
45
2020-09-21T15:13:18.000Z
2022-03-14T13:38:11.000Z
test/test_mish.py
hiyyg/mish-cuda
b389b9f84433d8b9b4129d3e879ba746d248d8f2
[ "MIT" ]
null
null
null
test/test_mish.py
hiyyg/mish-cuda
b389b9f84433d8b9b4129d3e879ba746d248d8f2
[ "MIT" ]
14
2020-11-25T01:20:55.000Z
2022-03-24T10:11:50.000Z
import pytest import torch import torch.nn.functional as F from torch.testing import assert_allclose mish_forward_pt = lambda x: x.mul(torch.tanh(F.softplus(x))) class Mish(torch.nn.Module): def forward(self, x): return mish_forward_pt(x) def get_input_params(): devs = ['cpu'] if torch.cuda.is_...
29.07377
88
0.636594
4856c551bcab901b3e480e5d978fdd84c6146771
1,295
py
Python
sample/primer/filters.py
pine2104/docker_uwsgi_nginx_django
47b1618048131fa7c654b9144a4b3372b9662825
[ "MIT" ]
null
null
null
sample/primer/filters.py
pine2104/docker_uwsgi_nginx_django
47b1618048131fa7c654b9144a4b3372b9662825
[ "MIT" ]
null
null
null
sample/primer/filters.py
pine2104/docker_uwsgi_nginx_django
47b1618048131fa7c654b9144a4b3372b9662825
[ "MIT" ]
null
null
null
from .models import Primer import django_filters from django import forms from django_filters.widgets import RangeWidget class PrimerFilter(django_filters.FilterSet): name = django_filters.CharFilter( lookup_expr='icontains', widget=forms.TextInput(attrs={'class': 'form-control'}) ) seq...
28.152174
142
0.672587
20f7e180c6a200b9597a50a253b50cf1844f95e2
1,041
py
Python
manage.py
xN03Lx/reviewsapp
65b79de0b6f30694de60c50e501d1edbdc5e125f
[ "MIT" ]
null
null
null
manage.py
xN03Lx/reviewsapp
65b79de0b6f30694de60c50e501d1edbdc5e125f
[ "MIT" ]
null
null
null
manage.py
xN03Lx/reviewsapp
65b79de0b6f30694de60c50e501d1edbdc5e125f
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys from pathlib import Path if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some...
32.53125
77
0.658982
afcec378a638309bd69c988651cb420e33c3f9c8
444
py
Python
Grader/SteeringWheel.py
zed-ee/grader-simulator
e8a7f14008bad1aac2363dd46afa313c6d49ac03
[ "MIT" ]
1
2019-07-18T23:19:49.000Z
2019-07-18T23:19:49.000Z
Grader/SteeringWheel.py
zed-ee/grader-simulator
e8a7f14008bad1aac2363dd46afa313c6d49ac03
[ "MIT" ]
null
null
null
Grader/SteeringWheel.py
zed-ee/grader-simulator
e8a7f14008bad1aac2363dd46afa313c6d49ac03
[ "MIT" ]
null
null
null
from Config import * class SteeringWheel: def __init__(self, parent): self.wheel = loader.loadModel("models/grader/steering-wheel") self.wheel.reparentTo(parent) self.wheel.setPos(0, 1.35, 6.1) self.wheel.setHpr(0, 60, 0) def setPos(self, x, y, z): self.whee...
29.6
69
0.596847
f5a56ee00f56c919da24713c47655c35196c977d
329
py
Python
pypushwoosh/base.py
shiratamu/pushwoosh-python-lib
da05d7b72729ebfc65a7ab0b08c9009632a38833
[ "MIT" ]
18
2015-01-08T19:51:42.000Z
2021-11-12T11:42:18.000Z
pypushwoosh/base.py
shiratamu/pushwoosh-python-lib
da05d7b72729ebfc65a7ab0b08c9009632a38833
[ "MIT" ]
7
2015-03-08T09:01:03.000Z
2017-11-13T05:26:21.000Z
pypushwoosh/base.py
shiratamu/pushwoosh-python-lib
da05d7b72729ebfc65a7ab0b08c9009632a38833
[ "MIT" ]
18
2015-02-17T03:40:54.000Z
2021-11-25T02:26:44.000Z
from .command import BaseCommand class PushwooshBaseClient(object): scheme = 'https' hostname = 'cp.pushwoosh.com' endpoint = 'json' version = '1.3' method = 'POST' debug = False def invoke(self, command): assert isinstance(command, BaseCommand), 'Command must be instance of Base...
21.933333
90
0.668693
fb0d7ba7f92e35b54b90ec3891050805755c19ac
1,299
py
Python
eternabench/load_data.py
eternagame/EternaBench
1df177603ce326c1f68931a027b449f44f38c203
[ "MIT" ]
null
null
null
eternabench/load_data.py
eternagame/EternaBench
1df177603ce326c1f68931a027b449f44f38c203
[ "MIT" ]
null
null
null
eternabench/load_data.py
eternagame/EternaBench
1df177603ce326c1f68931a027b449f44f38c203
[ "MIT" ]
null
null
null
import pandas as pd import os data_path = os.environ['ETERNABENCH_PATH'] def load_CM_data(): print("Loading EternaBench ChemMapping Filtered dataset (n=14339), last update Jul 10 2021") return pd.read_json(data_path+"/data/EternaBench_ChemMapping_Filtered_10Jul2021.json.zip") def load_CM_unfiltered_data(): print(...
41.903226
99
0.797537
73450aa1701b25f02523b9ad68dde948d78c24c2
1,262
py
Python
Pickup.py
servusDei2018/binding-of-isaac
5bcbc5500a7e25a197395aacb06df4a846683f19
[ "MIT" ]
26
2017-09-28T16:16:49.000Z
2021-12-08T07:56:52.000Z
Pickup.py
servusDei2018/binding-of-isaac
5bcbc5500a7e25a197395aacb06df4a846683f19
[ "MIT" ]
1
2020-03-05T15:26:58.000Z
2020-03-12T22:12:50.000Z
Pickup.py
servusDei2018/binding-of-isaac
5bcbc5500a7e25a197395aacb06df4a846683f19
[ "MIT" ]
9
2018-05-27T20:28:50.000Z
2021-12-14T23:27:53.000Z
# Pickup.py # Aaron Taylor # Moose Abumeeiz # # This is the class for the HUD pickups (keys, bombs, coins) # from pygame import * class Pickup: """The class for the HUD pickup counters""" def __init__(self, variant, textures, font): self.variant = variant self.score = 0 self.font = font self.digit1 = fon...
20.031746
70
0.656894
a2b321d3a0a29a624e86018281432b61474fffdc
1,592
py
Python
backend/src/blockchain/models/utils.py
sdediego/blockchain
786246c3fc4d80a827d5a6f54e2257b836cc1cf3
[ "MIT" ]
null
null
null
backend/src/blockchain/models/utils.py
sdediego/blockchain
786246c3fc4d80a827d5a6f54e2257b836cc1cf3
[ "MIT" ]
null
null
null
backend/src/blockchain/models/utils.py
sdediego/blockchain
786246c3fc4d80a827d5a6f54e2257b836cc1cf3
[ "MIT" ]
null
null
null
# encoding: utf-8 import hashlib import json from datetime import datetime from logging import getLogger from logging.config import fileConfig from os.path import dirname, join from src.exceptions import BlockError # Custom logger for utils module fileConfig(join(dirname(dirname(dirname(__file__))), 'config', 'loggi...
30.037736
81
0.709799
272adec4d5516433cebbad912ddff6817919fb29
26,453
py
Python
pyqchem/qc_input.py
abelcarreras/PyQchem
2edf984ba17373ad3fd450b18592c8b7827b72e5
[ "MIT" ]
16
2020-03-06T00:15:16.000Z
2022-02-21T12:54:46.000Z
pyqchem/qc_input.py
abelcarreras/PyQchem
2edf984ba17373ad3fd450b18592c8b7827b72e5
[ "MIT" ]
3
2020-12-24T12:44:14.000Z
2021-03-30T03:11:16.000Z
pyqchem/qc_input.py
abelcarreras/PyQchem
2edf984ba17373ad3fd450b18592c8b7827b72e5
[ "MIT" ]
3
2020-06-05T20:55:41.000Z
2021-03-23T18:17:15.000Z
import numpy as np from copy import deepcopy from pyqchem.basis import basis_to_txt import hashlib, json import warnings from pyqchem.errors import QchemInputWarning, QchemInputError def normalize_values(value): """ Set all string values (including keys and values of dictionaries) to lower case :param va...
40.38626
151
0.547575
49278b2796b6cce6f8d7b96ed31235ea867360fb
1,121
py
Python
buildroot-external/package/mycroft-service/mycroft-systemd_messagebus.py
NeonDaniel/OpenVoiceOS
a89647b5b59e3f8f318281c7c98ab05e9f19ca6d
[ "Apache-2.0" ]
96
2020-10-07T20:56:40.000Z
2022-03-17T01:22:29.000Z
buildroot-external/package/mycroft-service/mycroft-systemd_messagebus.py
NeonDaniel/OpenVoiceOS
a89647b5b59e3f8f318281c7c98ab05e9f19ca6d
[ "Apache-2.0" ]
38
2020-10-10T20:38:46.000Z
2022-03-14T11:59:52.000Z
buildroot-external/package/mycroft-service/mycroft-systemd_messagebus.py
NeonDaniel/OpenVoiceOS
a89647b5b59e3f8f318281c7c98ab05e9f19ca6d
[ "Apache-2.0" ]
15
2020-11-19T06:20:41.000Z
2022-03-06T23:03:00.000Z
#!/usr/bin/env python ########################################################################## # mycroft-systemd_messagebus.py # # 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://...
36.16129
74
0.663693
f646aa2f4a650b8da426395980c296005244f9a8
233
py
Python
src/parser/exceptions/ArityException.py
iliastsa/woof
5436f2fee6d07f93651cdb36d9d9314b387f54a0
[ "MIT" ]
6
2020-05-11T14:01:17.000Z
2022-01-10T22:50:07.000Z
src/parser/exceptions/ArityException.py
iliastsa/woof
5436f2fee6d07f93651cdb36d9d9314b387f54a0
[ "MIT" ]
null
null
null
src/parser/exceptions/ArityException.py
iliastsa/woof
5436f2fee6d07f93651cdb36d9d9314b387f54a0
[ "MIT" ]
null
null
null
class ArityException(Exception): def __init__(self, conflict): self.conflict = conflict def __str__(self): return f'Mismatched arity at line {self.conflict[0]}, column {self.conflict[1]}: {self.conflict[2]}'
33.285714
108
0.678112
3b801e0608707e648534acc506f832ecffb25ce1
1,352
py
Python
bdgym/wrappers/single_agent_wrapper.py
RDLLab/benevolent-deception-gym
4d04e097609097e0f07c661aac221184ebdec2fe
[ "MIT" ]
null
null
null
bdgym/wrappers/single_agent_wrapper.py
RDLLab/benevolent-deception-gym
4d04e097609097e0f07c661aac221184ebdec2fe
[ "MIT" ]
null
null
null
bdgym/wrappers/single_agent_wrapper.py
RDLLab/benevolent-deception-gym
4d04e097609097e0f07c661aac221184ebdec2fe
[ "MIT" ]
null
null
null
"""An environment wrapper for multi-agent gym environments It returns only the observations for a single agent """ import gym class SingleAgentWrapper(gym.Wrapper): """A single agent wrapper for multi-agetnt gym environments """ def __init__(self, env: gym.Env, ego_agent_id: int): assert 0 <= ego_ag...
35.578947
80
0.639053
1be514280cace5c079ad20f4d7e035d272c7d190
1,926
py
Python
dstl/translate/azure.py
kabirkhan/dstl
9bfbba27e99da4736d460888ea908a71bd1c7ae9
[ "MIT" ]
2
2021-05-12T09:22:04.000Z
2021-10-12T10:57:08.000Z
dstl/translate/azure.py
kabirkhan/dstl
9bfbba27e99da4736d460888ea908a71bd1c7ae9
[ "MIT" ]
null
null
null
dstl/translate/azure.py
kabirkhan/dstl
9bfbba27e99da4736d460888ea908a71bd1c7ae9
[ "MIT" ]
null
null
null
from typing import Iterable, List, Optional import httpx from spacy.util import minibatch from tqdm.auto import tqdm from .base import BaseTranslator class AzureTranslator(BaseTranslator): """AzureTranslator uses the Microsoft Azure Translation API to translate documents from source_lang to target_lang.""" ...
34.392857
103
0.604881
95c3614f8e7217c96c5f1cf2a5a310b303fa0ef3
417
py
Python
Algorithm/Easy/501-1000/569AddDigits.py
MartinYan623/Lint-Code
57d2fa441d6496234615736e3f55d0b71aaa51dc
[ "MIT" ]
null
null
null
Algorithm/Easy/501-1000/569AddDigits.py
MartinYan623/Lint-Code
57d2fa441d6496234615736e3f55d0b71aaa51dc
[ "MIT" ]
1
2020-08-08T10:14:53.000Z
2020-08-08T10:18:37.000Z
Algorithm/Easy/501-1000/569AddDigits.py
MartinYan623/Lint-Code
57d2fa441d6496234615736e3f55d0b71aaa51dc
[ "MIT" ]
null
null
null
class Solution: """ @param: num: a non-negative integer @return: one digit """ def addDigits(self, num): # write your code here if num < 10: return num sum = 0 while num >= 10: a = num / 10 sum += a num = num - 10 * a ...
20.85
39
0.431655
162408fd9b6cd60d0ce8dde28a1a86d9a9dd6748
2,097
py
Python
bqskit/ir/gates/constant/identity.py
jkalloor3/bqskit
ad34a6eae3c0e62d2bd960cd4cd841ba8e845811
[ "BSD-3-Clause-LBNL" ]
null
null
null
bqskit/ir/gates/constant/identity.py
jkalloor3/bqskit
ad34a6eae3c0e62d2bd960cd4cd841ba8e845811
[ "BSD-3-Clause-LBNL" ]
null
null
null
bqskit/ir/gates/constant/identity.py
jkalloor3/bqskit
ad34a6eae3c0e62d2bd960cd4cd841ba8e845811
[ "BSD-3-Clause-LBNL" ]
null
null
null
"""This module implements the IdentityGate.""" from __future__ import annotations from typing import Sequence import numpy as np from bqskit.ir.gates.constantgate import ConstantGate from bqskit.qis.unitary.unitarymatrix import UnitaryMatrix from bqskit.utils.typing import is_valid_radixes class IdentityGate(Const...
33.285714
78
0.624225
142bee80fbb30470984f4bc3691e0706f71cb7c1
3,512
py
Python
mysite/polls/tests.py
leifan89/django-tutorial
9bf8d72a4e3ad21cba8f0214e9af6790084adf70
[ "MIT" ]
null
null
null
mysite/polls/tests.py
leifan89/django-tutorial
9bf8d72a4e3ad21cba8f0214e9af6790084adf70
[ "MIT" ]
null
null
null
mysite/polls/tests.py
leifan89/django-tutorial
9bf8d72a4e3ad21cba8f0214e9af6790084adf70
[ "MIT" ]
null
null
null
import datetime from django.test import TestCase from django.utils import timezone from django.urls import reverse from .models import Question # Create your tests here. def create_question(question_text, days): time = timezone.now() + datetime.timedelta(days=days) return Question.objects.create(question_tex...
41.317647
84
0.699601
78354f32acbdacaeaec723d0218fcb81a654c136
95,652
py
Python
pandas/tests/frame/test_indexing.py
augustoproiete-forks/pandas-dev--pandas
fcd73ad2e7482414b61d47056c6c9c220b11702c
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
pandas/tests/frame/test_indexing.py
augustoproiete-forks/pandas-dev--pandas
fcd73ad2e7482414b61d47056c6c9c220b11702c
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
pandas/tests/frame/test_indexing.py
augustoproiete-forks/pandas-dev--pandas
fcd73ad2e7482414b61d47056c6c9c220b11702c
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function from datetime import datetime, date, timedelta, time from pandas.compat import map, zip, range, lrange, lzip, long from pandas import compat from numpy import nan from numpy.random import randn import numpy as np import pandas.core.common as com from pa...
34.618893
79
0.529419