hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
368c29d9fda5480349720a3909b354de0bd4a95d | 3,023 | py | Python | modules/matrixmult.py | benedictvs/FOCS-Calculator | 25dad4c6624be1950ce21594b4127c05be20b121 | [
"MIT"
] | 1 | 2021-11-22T21:54:28.000Z | 2021-11-22T21:54:28.000Z | modules/matrixmult.py | benedictvs/FOCS-Calculator | 25dad4c6624be1950ce21594b4127c05be20b121 | [
"MIT"
] | 34 | 2021-10-07T22:55:23.000Z | 2021-12-06T00:48:55.000Z | modules/matrixmult.py | benedictvs/FOCS-Calculator | 25dad4c6624be1950ce21594b4127c05be20b121 | [
"MIT"
] | 1 | 2021-10-18T23:33:44.000Z | 2021-10-18T23:33:44.000Z |
"""
Matrix multiplcation solves for the distance between two points in 2 or 3
dimensional space.
"""
#
# MATRIX MULTIPLICATION SOLVER CLASS
#
#
# MATRIX MULTIPLICATION MODEL CLASS
#
| 33.966292 | 79 | 0.471386 | import numpy as np
from abstractclasses import solver, solver_model
"""
Matrix multiplcation solves for the distance between two points in 2 or 3
dimensional space.
"""
# ————————————————————————————————————————————————
# MATRIX MULTIPLICATION SOLVER CLASS
# ———————————————————————————————————————————————... | 576 | 0 | 0 | 2,501 | 0 | 0 | 0 | 24 | 98 |
8e3b1c8f2e480a357249c851458ce3bfb4f62ba2 | 5,229 | py | Python | x5gonlamtools/tools/text2phrase/text2phraser.py | X5GON/lamapi | 0558c3b7af520ab83bdbd29e1b1b9b87bdc147b0 | [
"BSD-2-Clause"
] | null | null | null | x5gonlamtools/tools/text2phrase/text2phraser.py | X5GON/lamapi | 0558c3b7af520ab83bdbd29e1b1b9b87bdc147b0 | [
"BSD-2-Clause"
] | null | null | null | x5gonlamtools/tools/text2phrase/text2phraser.py | X5GON/lamapi | 0558c3b7af520ab83bdbd29e1b1b9b87bdc147b0 | [
"BSD-2-Clause"
] | null | null | null | from typing import Any
PathType = str
# TODO: Search truth typing of phraser
PhraserType = Any
# %%
# %%
# %%
# %%
# %%
# print("Saving done")
# %%
# %%
# %%
if __name__ == '__main__':
main()
# %%
| 39.315789 | 117 | 0.625167 | import os
import pickle
from gensim.models.phrases import Phraser, Phrases
from gensim.utils import SaveLoad as gensimSaveLoad
from typing import List, Text, Any
PathType = str
# TODO: Search truth typing of phraser
PhraserType = Any
# %%
def train_model(texts: List[Text],
savedir: PathType) -> None:... | 21 | 0 | 0 | 0 | 0 | 4,706 | 0 | 51 | 244 |
6a282ee5ee2a663b0a628eb51b7309527024f500 | 1,586 | py | Python | python/euler113.py | feliposz/project-euler-solutions | 1aec50c4d2d86b515dc8607559575da9e4aecb3a | [
"MIT"
] | null | null | null | python/euler113.py | feliposz/project-euler-solutions | 1aec50c4d2d86b515dc8607559575da9e4aecb3a | [
"MIT"
] | null | null | null | python/euler113.py | feliposz/project-euler-solutions | 1aec50c4d2d86b515dc8607559575da9e4aecb3a | [
"MIT"
] | null | null | null | """Problem 113
10 February 2006
Working from left-to-right if no digit is exceeded by the digit to its
left it is called an increasing number; for example, 134468.
Similarly if no digit is exceeded by the digit to its right it is
called a decreasing number; for example, 66420.
We shall call a positive integer that i... | 36.883721 | 100 | 0.732661 | """Problem 113
10 February 2006
Working from left-to-right if no digit is exceeded by the digit to its
left it is called an increasing number; for example, 134468.
Similarly if no digit is exceeded by the digit to its right it is
called a decreasing number; for example, 66420.
We shall call a positive integer that i... | 0 | 0 | 0 | 0 | 0 | 586 | 0 | -10 | 89 |
cbfe41853248037140350feca255270e604c79c4 | 670 | py | Python | PythonExercicio/ex070.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | PythonExercicio/ex070.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | PythonExercicio/ex070.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | totalGasto = 0
maisdeMil = 0
maisBarato = ['', 1000000.00]
while True:
nome = str(input('nome do produto: '))
preo = float(input('preo do produto: '))
totalGasto += preo
if preo > 1000:
maisdeMil += 1
if preo < maisBarato[1]:
maisBarato[0] = nome
maisBarato[1] = preo
cont... | 31.904762 | 88 | 0.620896 | totalGasto = 0
maisdeMil = 0
maisBarato = ['', 1000000.00]
while True:
nome = str(input('nome do produto: '))
preço = float(input('preço do produto: '))
totalGasto += preço
if preço > 1000:
maisdeMil += 1
if preço < maisBarato[1]:
maisBarato[0] = nome
maisBarato[1] = preço
... | 14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ab02eb78de439113207007e00752d544983808e6 | 20,628 | py | Python | lenstronomy/Util/util.py | swagnercarena/lenstronomy | b8df91699b042273b158bd834ab85619229dbc1e | [
"MIT"
] | null | null | null | lenstronomy/Util/util.py | swagnercarena/lenstronomy | b8df91699b042273b158bd834ab85619229dbc1e | [
"MIT"
] | null | null | null | lenstronomy/Util/util.py | swagnercarena/lenstronomy | b8df91699b042273b158bd834ab85619229dbc1e | [
"MIT"
] | null | null | null | __author__ = 'Simon Birrer'
"""
this file contains standard routines
"""
from lenstronomy.Util.package_util import exporter
export, __all__ = exporter()
| 31.882535 | 131 | 0.594386 | __author__ = 'Simon Birrer'
"""
this file contains standard routines
"""
import numpy as np
import mpmath
import itertools
from lenstronomy.Util.numba_util import jit
from lenstronomy.Util.package_util import exporter
export, __all__ = exporter()
@export
def merge_dicts(*dict_args):
"""
Given any number of... | 0 | 19,707 | 0 | 0 | 0 | 0 | 0 | 6 | 733 |
71e21afa96b4813cda8720a586f05647618ac39b | 6,468 | py | Python | phoila/voila_handlers.py | datalayer-contrib/phoila | f8ff5f0a1f807829b57deae9f72bed91908258ad | [
"BSD-3-Clause"
] | 10 | 2019-08-09T14:45:49.000Z | 2020-03-30T12:48:05.000Z | phoila/voila_handlers.py | datalayer-contrib/phoila | f8ff5f0a1f807829b57deae9f72bed91908258ad | [
"BSD-3-Clause"
] | 9 | 2019-08-09T17:07:45.000Z | 2019-10-22T18:22:09.000Z | phoila/voila_handlers.py | datalayer-contrib/phoila | f8ff5f0a1f807829b57deae9f72bed91908258ad | [
"BSD-3-Clause"
] | 5 | 2019-08-09T17:57:53.000Z | 2019-10-22T12:14:14.000Z | """
This code is based on code from voila, copied under the following license:
BSD License
Copyright (c) 2018 Voila contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
a. Redistributions o... | 35.344262 | 114 | 0.640693 | """
This code is based on code from voila, copied under the following license:
BSD License
Copyright (c) 2018 Voila contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
a. Redistributions o... | 0 | 362 | 0 | 244 | 0 | 3,377 | 0 | 293 | 291 |
26fec536209173a6fb550e8e582130cba2da6feb | 343 | py | Python | mOe.py | solothinker/statistics-prob | 5da287ff1b6f5a8ad026781b226b1019efaa51f7 | [
"MIT"
] | null | null | null | mOe.py | solothinker/statistics-prob | 5da287ff1b6f5a8ad026781b226b1019efaa51f7 | [
"MIT"
] | null | null | null | mOe.py | solothinker/statistics-prob | 5da287ff1b6f5a8ad026781b226b1019efaa51f7 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = (20,10)
from distributionLib import Dist
np.random.seed(404)
N = 1000000
data = np.random.choice([0, 1], size=(N,1), p=[0.57, 0.43])
for sample in range(100,10000,500):
ind = np.random.randint(0,N,[sample,1])
Dist.MOE(data[ind... | 22.866667 | 59 | 0.682216 | import numpy as np
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = (20,10)
from distributionLib import Dist
np.random.seed(404)
N = 1000000
data = np.random.choice([0, 1], size=(N,1), p=[0.57, 0.43])
for sample in range(100,10000,500):
ind = np.random.randint(0,N,[sample,1])
Dist.MOE(data[ind... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
18bca2be7ceb1b2eda37a1c34d97a331e4f7cb5b | 1,439 | py | Python | fullstack/forms.py | BuildForSDG/frontend90 | 35b7297341f048b08a5ff02c7a96dad968004010 | [
"MIT"
] | 1 | 2020-11-16T11:54:29.000Z | 2020-11-16T11:54:29.000Z | fullstack/forms.py | BuildForSDG/frontend90 | 35b7297341f048b08a5ff02c7a96dad968004010 | [
"MIT"
] | 11 | 2020-05-17T18:39:21.000Z | 2021-09-22T19:14:28.000Z | fullstack/forms.py | BuildForSDG/frontend90 | 35b7297341f048b08a5ff02c7a96dad968004010 | [
"MIT"
] | 5 | 2020-05-18T11:19:44.000Z | 2020-11-12T14:46:31.000Z | # from cities_light.models import Country, Region, City
| 27.673077 | 55 | 0.660876 | from django import forms
from django.forms import ModelForm
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
# from cities_light.models import Country, Region, City
from .models import (ServiceProvider,
CustomerProfile, RatingAndReview)
class Serv... | 0 | 0 | 0 | 1,035 | 0 | 0 | 0 | 142 | 202 |
c474b8895ac93f17e9a698742f8661a9f83d6775 | 8,298 | py | Python | ibmsecurity/isam/statistics.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/isam/statistics.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/isam/statistics.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | import logging
from ibmsecurity.utilities import tools
logger = logging.getLogger(__name__)
def get_network(isamAppliance, application_interface, statistics_duration, check_mode=False, force=False):
"""
Retrieving the Application Interface Statistics
"""
return isamAppliance.invoke_get("Retrieving th... | 53.192308 | 127 | 0.536876 | import logging
from ibmsecurity.utilities import tools
logger = logging.getLogger(__name__)
def get_network(isamAppliance, application_interface, statistics_duration, check_mode=False, force=False):
"""
Retrieving the Application Interface Statistics
"""
return isamAppliance.invoke_get("Retrieving th... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e6bed0fa906c6eccc11bef4a99517d428af459d7 | 3,951 | py | Python | setup.py | ngsimon/web2py | 93297fed8a3a916b45d17f5c4d5d2b80aaf92788 | [
"BSD-3-Clause"
] | 1,573 | 2015-01-01T07:19:06.000Z | 2022-03-30T09:06:06.000Z | setup.py | ngsimon/web2py | 93297fed8a3a916b45d17f5c4d5d2b80aaf92788 | [
"BSD-3-Clause"
] | 1,691 | 2015-01-03T11:03:23.000Z | 2022-03-30T07:27:28.000Z | setup.py | ngsimon/web2py | 93297fed8a3a916b45d17f5c4d5d2b80aaf92788 | [
"BSD-3-Clause"
] | 895 | 2015-01-03T19:56:15.000Z | 2022-03-18T18:30:57.000Z | #!/usr/bin/env python
import tarfile
import os, sys
from setupbase import (require_clean_submodules)
#-------------------------------------------------------------------------------
# Make sure we aren't trying to run without submodules
#------------------------------------------------------------------------------... | 37.990385 | 94 | 0.576816 | #!/usr/bin/env python
import setuptools
from setuptools import setup
import tarfile
import os, sys
from setupbase import (
UpdateSubmodules,
check_submodule_status,
update_submodules,
require_clean_submodules
)
#-------------------------------------------------------------------------------
# Make ... | 0 | 0 | 0 | 0 | 0 | 2,561 | 0 | 112 | 68 |
29e80741bd747ffc50443880282dcf77ba9e6fe0 | 2,348 | py | Python | get_articles.py | faroit/deep-fireball | b37d08cb5b15359c363e7816fc7c163c1709a5ac | [
"MIT"
] | null | null | null | get_articles.py | faroit/deep-fireball | b37d08cb5b15359c363e7816fc7c163c1709a5ac | [
"MIT"
] | null | null | null | get_articles.py | faroit/deep-fireball | b37d08cb5b15359c363e7816fc7c163c1709a5ac | [
"MIT"
] | null | null | null | import urllib2
from bs4 import BeautifulSoup
from datetime import datetime
import pandas as pd
import argparse
"""Fetch all daringfireball articles since 2002
count the article character length
"""
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description='Fetch all daringfireball art... | 25.521739 | 77 | 0.497445 | import urllib2
from bs4 import BeautifulSoup
from datetime import datetime
import pandas as pd
import argparse
"""Fetch all daringfireball articles since 2002
count the article character length
"""
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description='Fetch all daringfireball art... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b8acda73b74de4585255ca1a66d34a81ef3df5df | 148 | py | Python | arbitrage/__init__.py | drinksober/arbitrage | 00ba419d84b7182692b62fed3121dd486cb5c2b9 | [
"MIT"
] | 10 | 2018-03-26T02:19:18.000Z | 2019-12-04T12:20:28.000Z | arbitrage/__init__.py | drinks5/arbitrage | 00ba419d84b7182692b62fed3121dd486cb5c2b9 | [
"MIT"
] | null | null | null | arbitrage/__init__.py | drinks5/arbitrage | 00ba419d84b7182692b62fed3121dd486cb5c2b9 | [
"MIT"
] | 1 | 2018-05-05T04:52:23.000Z | 2018-05-05T04:52:23.000Z | # -*- coding: utf-8 -*-
"""Top-level package for cycle-arbitrage."""
__author__ = """drinksober"""
__email__ = 'me@mum5.cn'
__version__ = '0.1.0'
| 18.5 | 44 | 0.628378 | # -*- coding: utf-8 -*-
"""Top-level package for cycle-arbitrage."""
__author__ = """drinksober"""
__email__ = 'me@mum5.cn'
__version__ = '0.1.0'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
56eedbac6807ea567c580f909cc8f5f2831c4a9e | 2,262 | py | Python | Dig Data Analysis.py | ankurRangi/Apache-Kafka-Twitter-API | ef5931f28ea285177fed4a0487a5fb18c10042a9 | [
"MIT"
] | null | null | null | Dig Data Analysis.py | ankurRangi/Apache-Kafka-Twitter-API | ef5931f28ea285177fed4a0487a5fb18c10042a9 | [
"MIT"
] | null | null | null | Dig Data Analysis.py | ankurRangi/Apache-Kafka-Twitter-API | ef5931f28ea285177fed4a0487a5fb18c10042a9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""BDA_Assignment_04_v2.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1gfYg_0pK4fVIOxYRi9ybLD3ySsqR2cg2
# Streaming Twitter Data Using Kafka
Importing the libraries:
"""
!pip install kafka-python
!pip install python-tw... | 33.264706 | 142 | 0.723254 | # -*- coding: utf-8 -*-
"""BDA_Assignment_04_v2.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1gfYg_0pK4fVIOxYRi9ybLD3ySsqR2cg2
# Streaming Twitter Data Using Kafka
Importing the libraries:
"""
!pip install kafka-python
!pip install python-tw... | 0 | 0 | 0 | 215 | 0 | 0 | 0 | 0 | 23 |
ae772338c0a4862d30d19eda147535981ed7df8f | 8,940 | py | Python | test/test_pyzpl.py | mbarkhau/pyzpl | 4944b948c1c5006b4befe03488e7d34bc06a0ea6 | [
"MIT"
] | 1 | 2016-11-23T09:47:11.000Z | 2016-11-23T09:47:11.000Z | test/test_pyzpl.py | mbarkhau/pyzpl | 4944b948c1c5006b4befe03488e7d34bc06a0ea6 | [
"MIT"
] | 2 | 2019-01-04T00:37:06.000Z | 2019-02-05T08:45:28.000Z | test/test_pyzpl.py | mbarkhau/pyzpl | 4944b948c1c5006b4befe03488e7d34bc06a0ea6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import collections
import functools as ft
import pytest
import pyzpl
import pyzpl2
FIXTURE_1_DATA = b"""
1. ZPL configuration file ex... | 26.294118 | 100 | 0.558501 | # -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import collections
import functools as ft
import pytest
import pyzpl
import pyzpl2
FIXTURE_1_DATA = b"""
1. ZPL configuration file ex... | 0 | 315 | 0 | 0 | 0 | 326 | 0 | 0 | 46 |
2668cc45daa8b52d31395b8f542fb8a1ba4f26d1 | 3,034 | py | Python | tests/unit/fields/test_collection.py | metabolize-forks/booby | 4e15e4e263dc387420398f808ffb345b760364d4 | [
"Apache-2.0"
] | null | null | null | tests/unit/fields/test_collection.py | metabolize-forks/booby | 4e15e4e263dc387420398f808ffb345b760364d4 | [
"Apache-2.0"
] | null | null | null | tests/unit/fields/test_collection.py | metabolize-forks/booby | 4e15e4e263dc387420398f808ffb345b760364d4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
| 32.978261 | 94 | 0.679631 | # -*- coding: utf-8 -*-
import collections
from expects import *
from booby import Model, fields, errors
from tests.unit._helpers import MyDict
class TestSetValueInCollectionField(object):
def test_when_value_is_a_list_of_dicts_then_value_is_a_list_of_models(self):
users = [{'name': 'Foo'}, {'name': 'F... | 0 | 0 | 0 | 2,719 | 0 | 0 | 0 | 32 | 252 |
d8b6dc4a4e6404cbab60209812d49c3cace65d9f | 1,394 | py | Python | rest/karenClient.py | PJBoy/karen | 4cba9641029f79b44e87133588942b1dda6c0488 | [
"0BSD"
] | null | null | null | rest/karenClient.py | PJBoy/karen | 4cba9641029f79b44e87133588942b1dda6c0488 | [
"0BSD"
] | null | null | null | rest/karenClient.py | PJBoy/karen | 4cba9641029f79b44e87133588942b1dda6c0488 | [
"0BSD"
] | null | null | null | import os, subprocess
url_search = 'http://127.0.0.1:8000/search'
url_image = 'http://127.0.0.1:8000/image'
proxies = {}
while True:
query = input('Query: ')
if not query:
break
results = get_search(query)
if len(results) == 0:
print('No results')
continue
... | 33.190476 | 147 | 0.629842 | import os, subprocess
import requests
url_search = 'http://127.0.0.1:8000/search'
url_image = 'http://127.0.0.1:8000/image'
proxies = {}
def get_search(quote):
r = requests.get(url_search, proxies = proxies, params = {'q': quote})
if not r.ok:
raise RuntimeError(f'{r.status_code} - {r.reason... | 0 | 0 | 0 | 0 | 0 | 424 | 0 | -6 | 73 |
f0e0ad50b19f2d7635e35a86f8f44cf87fea4c25 | 7,582 | py | Python | tests/kafka_cluster_manager/cluster_topology_test.py | dbgrigsby/kafka-utils | 4cf4500d4aeea872846269d410cc7dd70a31e00d | [
"Apache-2.0"
] | 302 | 2016-05-18T02:05:04.000Z | 2022-03-28T21:36:28.000Z | tests/kafka_cluster_manager/cluster_topology_test.py | dbgrigsby/kafka-utils | 4cf4500d4aeea872846269d410cc7dd70a31e00d | [
"Apache-2.0"
] | 135 | 2016-05-17T23:15:16.000Z | 2021-11-04T13:35:51.000Z | tests/kafka_cluster_manager/cluster_topology_test.py | dbgrigsby/kafka-utils | 4cf4500d4aeea872846269d410cc7dd70a31e00d | [
"Apache-2.0"
] | 133 | 2016-05-18T10:23:05.000Z | 2022-01-29T17:24:17.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp 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 ... | 34.307692 | 86 | 0.575574 | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp 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 ... | 0 | 0 | 0 | 6,675 | 0 | 0 | 0 | -8 | 91 |
9b96f6f8b09755ce868105970073970c1689b848 | 10,890 | py | Python | pyaz/apim/api/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/apim/api/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/apim/api/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | 1 | 2022-02-03T09:12:01.000Z | 2022-02-03T09:12:01.000Z | '''
Manage Azure API Management API's.
'''
from ... pyaz_utils import _call_az
def import_(path, resource_group, service_name, specification_format, api_id=None, api_revision=None, api_type=None, api_version=None, api_version_set_id=None, description=None, display_name=None, no_wait=None, protocols=None, service_url=... | 65.60241 | 466 | 0.744812 | '''
Manage Azure API Management API's.
'''
from ... pyaz_utils import _call_az
from . import operation, release, revision, versionset
def import_(path, resource_group, service_name, specification_format, api_id=None, api_revision=None, api_type=None, api_version=None, api_version_set_id=None, description=None, displa... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 22 |
63493727dd45db169ea27ed46baaad598056183c | 3,602 | py | Python | examples/flim/plot_resolution_frc.py | Fluorescence-Tools/tttrlib | 891db80ddc5e6a1098faa62bd336df11b060e041 | [
"BSD-3-Clause"
] | 9 | 2019-11-27T13:00:54.000Z | 2022-03-31T15:37:29.000Z | examples/flim/plot_resolution_frc.py | Fluorescence-Tools/tttrlib | 891db80ddc5e6a1098faa62bd336df11b060e041 | [
"BSD-3-Clause"
] | 6 | 2019-10-31T23:59:56.000Z | 2022-03-31T15:33:06.000Z | examples/flim/plot_resolution_frc.py | Fluorescence-Tools/tttrlib | 891db80ddc5e6a1098faa62bd336df11b060e041 | [
"BSD-3-Clause"
] | 1 | 2019-07-28T20:21:43.000Z | 2019-07-28T20:21:43.000Z | """
==================================
Fourier ring correlation of images
==================================
Estimation of the image resolution
----------------------------------
In electron microscopy the Fourier Ring Correlation (FRC) is widely used as a
measure for the resolution of an image. This very practical ap... | 30.786325 | 103 | 0.649917 | """
==================================
Fourier ring correlation of images
==================================
Estimation of the image resolution
----------------------------------
In electron microscopy the Fourier Ring Correlation (FRC) is widely used as a
measure for the resolution of an image. This very practical ap... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a7bd0e6b4553d3bd1b91eeeee2ae8c238bbd9776 | 17,156 | py | Python | PyEngine3D/ResourceManager/DDSLoader.py | ubuntunux/PyEngine3D | e5542b5b185e8b9b56fc4669a6f22eb06c386c4f | [
"BSD-2-Clause"
] | 121 | 2017-06-07T19:42:30.000Z | 2022-03-31T04:42:29.000Z | PyEngine3D/ResourceManager/DDSLoader.py | MatthewPChapdelaine/PyEngine3D | e5542b5b185e8b9b56fc4669a6f22eb06c386c4f | [
"BSD-2-Clause"
] | 16 | 2015-12-21T16:57:55.000Z | 2017-03-06T15:22:37.000Z | PyEngine3D/ResourceManager/DDSLoader.py | ubuntunux/GuineaPig | f32852ecbfa3ebdbba00afc466719fc78e37361c | [
"BSD-2-Clause"
] | 16 | 2018-01-15T03:12:13.000Z | 2022-03-31T04:42:41.000Z | import ctypes
dxgi_pixel_or_block_size = [
0,
16, 16, 16, 16,
12, 12, 12, 12,
8, 8, 8, 8, 8, 8,
8, 8, 8, 8,
8, 8, 8, 8,
4, 4, 4, 4,
4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4,
4,
4, 4, 4,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1, 1, 1, 1, 1, 1,
0, # DXGI_FORMAT_R1_UNORM ehm >.< ( TODO )
4, 4, 4,
... | 37.376906 | 160 | 0.626137 | import ctypes
import os
import struct
import numpy as np
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GL.shaders import *
from OpenGL.arrays.arraydatatype import *
from OpenGL.raw.GL.EXT.texture_compression_s3tc import *
from PyEngine3D.Common import logger
dxgi_pixel_or_block_size = [
0,
16, 16, ... | 0 | 0 | 0 | 11,369 | 0 | 2,216 | 0 | 62 | 443 |
281699015f27285cfae3d08e0f3fa877689fa64f | 10,402 | py | Python | vaspy/eigenval.py | arafune/vaspy | 36342eb9b2523fc5c878db5e269e77a51352364c | [
"BSD-3-Clause"
] | 10 | 2018-01-15T10:41:00.000Z | 2021-03-31T05:53:50.000Z | vaspy/eigenval.py | arafune/vaspy | 36342eb9b2523fc5c878db5e269e77a51352364c | [
"BSD-3-Clause"
] | null | null | null | vaspy/eigenval.py | arafune/vaspy | 36342eb9b2523fc5c878db5e269e77a51352364c | [
"BSD-3-Clause"
] | 3 | 2019-08-13T16:34:56.000Z | 2021-06-05T15:39:37.000Z | """This module provides EIGENVAL."""
from __future__ import division, print_function
import sys
from logging import INFO, Formatter, StreamHandler, getLogger
try:
except ImportError:
sys.stderr.write("Install matplotlib, or you cannot use methods relating to draw\n")
# logger
LOGLEVEL = INFO
logger = getLogger(_... | 29.635328 | 88 | 0.538262 | """This module provides EIGENVAL."""
from __future__ import division, print_function
import csv
import sys
from pathlib import Path
from logging import DEBUG, INFO, Formatter, StreamHandler, getLogger
import numpy as np
from typing import Dict, Optional, Sequence, Tuple, List, IO, Union
from vaspy.tools import open_... | 0 | 249 | 0 | 9,323 | 0 | 0 | 0 | 69 | 184 |
0faaba0738146766d716e2a88ee682f316f0e9b6 | 1,494 | py | Python | python_scripts/twitch.py | LucaKaufmann/HomeAssistant-Config | 3be0ab0a91a2ff188abf1e0a9d0dd4dea7d30d45 | [
"MIT"
] | 6 | 2018-09-10T21:49:43.000Z | 2020-08-16T13:11:07.000Z | python_scripts/twitch.py | LucaKaufmann/HomeAssistant-Config | 3be0ab0a91a2ff188abf1e0a9d0dd4dea7d30d45 | [
"MIT"
] | null | null | null | python_scripts/twitch.py | LucaKaufmann/HomeAssistant-Config | 3be0ab0a91a2ff188abf1e0a9d0dd4dea7d30d45 | [
"MIT"
] | null | null | null | streamInput = data.get('stream_name').lower()
chromecastInput = data.get('media_player')
chromecast = chromecastInput
streams = {
"overwatchleague": "overwatchleague",
"overwatch league": "overwatchleague",
"owl": "overwatchleague",
"lcs": "riotgames",
"ninja": "ninja",
"lupo": "drlupo",
"d... | 29.88 | 151 | 0.672691 | streamInput = data.get('stream_name').lower()
chromecastInput = data.get('media_player')
chromecast = chromecastInput
streams = {
"overwatchleague": "overwatchleague",
"overwatch league": "overwatchleague",
"owl": "overwatchleague",
"lcs": "riotgames",
"ninja": "ninja",
"lupo": "drlupo",
"d... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b39c43d0021d178a258b637ee9621caf69f2c4a1 | 230 | py | Python | nsot/util/__init__.py | BunkersCo/nsot | fd45bdf63794aa3015a87855f4d7b03663fd5396 | [
"Apache-2.0"
] | null | null | null | nsot/util/__init__.py | BunkersCo/nsot | fd45bdf63794aa3015a87855f4d7b03663fd5396 | [
"Apache-2.0"
] | null | null | null | nsot/util/__init__.py | BunkersCo/nsot | fd45bdf63794aa3015a87855f4d7b03663fd5396 | [
"Apache-2.0"
] | null | null | null | """
Utilities used across the project.
"""
# Core
from . import core
# Stats
from . import stats
__all__ = []
__all__.extend(core.__all__)
__all__.extend(stats.__all__)
| 13.529412 | 34 | 0.695652 | """
Utilities used across the project.
"""
# Core
from . import core
from .core import * # noqa
# Stats
from . import stats
from .stats import * # noqa
__all__ = []
__all__.extend(core.__all__)
__all__.extend(stats.__all__)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 60 |
33b59a94683e9233731ae17d913d467f1d11a562 | 1,126 | py | Python | day4/concurrency/collateral/network_threads.py | twin-bridges/pyplus-ons | 348ba1cb761a627ef5c6731ef4b99c6fd82ab055 | [
"Apache-2.0"
] | null | null | null | day4/concurrency/collateral/network_threads.py | twin-bridges/pyplus-ons | 348ba1cb761a627ef5c6731ef4b99c6fd82ab055 | [
"Apache-2.0"
] | null | null | null | day4/concurrency/collateral/network_threads.py | twin-bridges/pyplus-ons | 348ba1cb761a627ef5c6731ef4b99c6fd82ab055 | [
"Apache-2.0"
] | 5 | 2019-11-19T18:41:41.000Z | 2020-06-18T14:58:09.000Z |
MAX_WORKERS = 3
if __name__ == "__main__":
main()
| 23.458333 | 56 | 0.634991 | import yaml
from getpass import getpass
from concurrent.futures import ThreadPoolExecutor, wait
from netmiko import ConnectHandler
MAX_WORKERS = 3
def load_devices():
with open("netmiko.yml") as f:
devices = yaml.load(f)
return devices
def ssh_task(device):
print(f"Thread Started: {device['hos... | 0 | 0 | 0 | 0 | 0 | 865 | 0 | 43 | 157 |
02b72c0eef797e7638e1fd1ca6357d3fd7691590 | 2,476 | py | Python | screenpy/questions/text.py | Z-Brueske/screenpy | 1c852a49eb3821727662458fd707b9bcf48bb8cf | [
"MIT"
] | null | null | null | screenpy/questions/text.py | Z-Brueske/screenpy | 1c852a49eb3821727662458fd707b9bcf48bb8cf | [
"MIT"
] | null | null | null | screenpy/questions/text.py | Z-Brueske/screenpy | 1c852a49eb3821727662458fd707b9bcf48bb8cf | [
"MIT"
] | null | null | null | """
A question to discover the text of an element or many elements. Questions
must be asked with an expected resolution, like so:
the_actor.should_see_the(
(Text.of_the(WELCOME_BANNER), ReadsExactly("Welcome!")),
)
"""
| 27.820225 | 73 | 0.623586 | """
A question to discover the text of an element or many elements. Questions
must be asked with an expected resolution, like so:
the_actor.should_see_the(
(Text.of_the(WELCOME_BANNER), ReadsExactly("Welcome!")),
)
"""
from typing import List, Union
from ..actor import Actor
from ..pacing import bea... | 0 | 1,409 | 0 | 653 | 0 | 0 | 0 | 41 | 135 |
1a0cd259979075716eb3c375559753039807ee38 | 289 | py | Python | src/look_and_say.py | chris-kuo/elements_of_programming_interview | 8947980fdf60dfbb577600052b33d37f782216b5 | [
"MIT"
] | null | null | null | src/look_and_say.py | chris-kuo/elements_of_programming_interview | 8947980fdf60dfbb577600052b33d37f782216b5 | [
"MIT"
] | null | null | null | src/look_and_say.py | chris-kuo/elements_of_programming_interview | 8947980fdf60dfbb577600052b33d37f782216b5 | [
"MIT"
] | null | null | null |
print(look_and_say(8)) | 20.642857 | 78 | 0.678201 | import itertools
def look_and_say(n):
def next_number(nums):
curr = nums[-1]
groups = itertools.groupby(curr)
nums.append(''.join([str(len(list(group))) + key for key, group in groups]))
nums = ['1']
for _ in range(1, n):
next_number(nums)
return nums
print(look_and_say(8)) | 0 | 0 | 0 | 0 | 0 | 226 | 0 | -5 | 45 |
a19e8082e4417ddac2e193306ed2af6ceabeef4b | 3,115 | py | Python | tests/test_xref.py | odidev/fastobo-py | ab593954b448956e7baced876f24ee20230e74f7 | [
"MIT"
] | 20 | 2019-05-10T22:48:42.000Z | 2022-03-27T19:26:50.000Z | tests/test_xref.py | odidev/fastobo-py | ab593954b448956e7baced876f24ee20230e74f7 | [
"MIT"
] | 271 | 2019-05-15T22:05:40.000Z | 2022-03-29T09:54:03.000Z | tests/test_xref.py | odidev/fastobo-py | ab593954b448956e7baced876f24ee20230e74f7 | [
"MIT"
] | 3 | 2020-12-03T21:51:19.000Z | 2021-08-17T06:25:35.000Z | # coding: utf-8
| 33.494624 | 94 | 0.589406 | # coding: utf-8
import datetime
import unittest
import fastobo
class TestXref(unittest.TestCase):
type = fastobo.xref.Xref
def test_init(self):
id = fastobo.id.PrefixedIdent('ISBN', '0321842685')
try:
xref = self.type(id)
except Exception:
self.fail("could n... | 0 | 0 | 0 | 3,002 | 0 | 0 | 0 | -19 | 114 |
74b1ce6d711d987c051da3de9da3b12c183c4c0f | 607 | py | Python | ex076.py | amandagsilveira/Exercicios_cursoemvideo_Python | 9055d24d44d8e195df1691767a635b0b54357672 | [
"MIT"
] | null | null | null | ex076.py | amandagsilveira/Exercicios_cursoemvideo_Python | 9055d24d44d8e195df1691767a635b0b54357672 | [
"MIT"
] | null | null | null | ex076.py | amandagsilveira/Exercicios_cursoemvideo_Python | 9055d24d44d8e195df1691767a635b0b54357672 | [
"MIT"
] | null | null | null | '''Crie um programa que tenha uma tupla nica com nomes de produtos e seus respectivos preos,
na sequncia. No final, mostre uma listagem de preos, organizando os dados em forma tabular.'''
lista = ('Lpis', 1.5,
'Borracha', 1.75,
'Caneta', 2.5,
'Corretivo', 3.5,
'estojo', 15.50,
... | 30.35 | 96 | 0.558484 | '''Crie um programa que tenha uma tupla única com nomes de produtos e seus respectivos preços,
na sequência. No final, mostre uma listagem de preços, organizando os dados em forma tabular.'''
lista = ('Lápis', 1.5,
'Borracha', 1.75,
'Caneta', 2.5,
'Corretivo', 3.5,
'estojo', 15.50,
... | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
080d826a1bb3c5d99a2ea7d0035597d6138e5aaf | 639 | py | Python | python3/compile.py | abarker/cyfolds | 746ec63074495f875848226a298dd7d148828a53 | [
"MIT"
] | 10 | 2019-09-15T19:11:16.000Z | 2022-03-29T21:14:41.000Z | python3/compile.py | abarker/cyfolds | 746ec63074495f875848226a298dd7d148828a53 | [
"MIT"
] | 2 | 2020-02-02T12:57:32.000Z | 2020-03-16T06:51:27.000Z | python3/compile.py | abarker/cyfolds | 746ec63074495f875848226a298dd7d148828a53 | [
"MIT"
] | 1 | 2020-03-15T05:02:11.000Z | 2020-03-15T05:02:11.000Z | #!/usr/bin/env python3
"""
Run the command to compile cyfolds, optionally removing unneeded files.
Note this command also works (but doesn't set compiler options):
cythonize -a -i cyfolds.pyx
"""
import sys, os
python_executable = sys.executable
compile_command = python_executable + " setup.py build_ext --inpla... | 24.576923 | 71 | 0.682316 | #!/usr/bin/env python3
"""
Run the command to compile cyfolds, optionally removing unneeded files.
Note this command also works (but doesn't set compiler options):
cythonize -a -i cyfolds.pyx
"""
import sys, os
python_executable = sys.executable
compile_command = python_executable + " setup.py build_ext --inpla... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
578be65cd859287fa3d8164435441b5bfe8dbcd2 | 1,827 | py | Python | packages/cal3d/package.py | hlrs-vis/spack-hlrs-vis | 33c07e362e2b8f3a69dd255a5626cca49c08a29b | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 1 | 2021-08-03T14:14:17.000Z | 2021-08-03T14:14:17.000Z | packages/cal3d/package.py | hlrs-vis/spack-hlrs-vis | 33c07e362e2b8f3a69dd255a5626cca49c08a29b | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | packages/cal3d/package.py | hlrs-vis/spack-hlrs-vis | 33c07e362e2b8f3a69dd255a5626cca49c08a29b | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
| 33.218182 | 119 | 0.657909 | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Cal3d(AutotoolsPackage):
"""Skeletal 3D character animation library written in C++"""
... | 0 | 0 | 0 | 1,586 | 0 | 0 | 0 | -2 | 46 |
2b1831ad832f78ebe79cb52d348571395d855bbd | 5,673 | py | Python | old-metadata/explode.py | eliagbayani/local_reference_taxonomy | 5bdb2c6e3b5b158bee72a9eade64a595d1e595fb | [
"BSD-2-Clause"
] | 8 | 2017-05-20T07:53:09.000Z | 2021-08-16T03:30:59.000Z | old-metadata/explode.py | eliagbayani/local_reference_taxonomy | 5bdb2c6e3b5b158bee72a9eade64a595d1e595fb | [
"BSD-2-Clause"
] | 257 | 2015-01-11T12:05:12.000Z | 2021-11-04T17:26:02.000Z | old-metadata/explode.py | eliagbayani/local_reference_taxonomy | 5bdb2c6e3b5b158bee72a9eade64a595d1e595fb | [
"BSD-2-Clause"
] | 4 | 2015-10-23T13:45:23.000Z | 2021-03-12T17:28:53.000Z | # This script is responsible for changing the older metadata format
# (files resources.json and captures.json stored in the resources/
# directory) to the newer format (a properties.json file stored with
# every artifact archive).
import argparse
res = {}
cap = {}
# Read old resources and captures files
# Turn 2014... | 32.791908 | 93 | 0.56813 | # This script is responsible for changing the older metadata format
# (files resources.json and captures.json stored in the resources/
# directory) to the newer format (a properties.json file stored with
# every artifact archive).
import json, os, subprocess, argparse
res = {}
cap = {}
# Read old resources and captu... | 0 | 0 | 0 | 0 | 0 | 4,431 | 0 | 22 | 137 |
6982dce8eae0fd2fb4bd13abe2c0d3b758323c34 | 9,920 | py | Python | examples/e3sm_diags_for_cmip/cmip6_comparison.py | ACME-Climate/acme_diags | f0ba7f24167301c7b92061dacbf2e2b0fe7f334f | [
"BSD-3-Clause"
] | 3 | 2017-07-12T23:19:15.000Z | 2018-01-02T22:49:17.000Z | examples/e3sm_diags_for_cmip/cmip6_comparison.py | ACME-Climate/acme_diags | f0ba7f24167301c7b92061dacbf2e2b0fe7f334f | [
"BSD-3-Clause"
] | 109 | 2017-07-07T18:51:07.000Z | 2018-04-17T04:16:31.000Z | examples/e3sm_diags_for_cmip/cmip6_comparison.py | ACME-Climate/acme_diags | f0ba7f24167301c7b92061dacbf2e2b0fe7f334f | [
"BSD-3-Clause"
] | 3 | 2017-07-03T23:30:29.000Z | 2018-01-02T19:34:12.000Z | # Script to perform comparison with CMIP6 models
# On NERSC
"""
source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_cori-haswell.sh
"""
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
import numpy as np
import numpy.ma as ma
# --- Function to read E3SM Diags metrics for CMIP6 m... | 33.066667 | 148 | 0.64375 | # Script to perform comparison with CMIP6 models
# On NERSC
"""
source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_cori-haswell.sh
"""
import glob
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
import matplotlib.transforms as mtransforms
import numpy as np
import numpy.ma as ... | 0 | 0 | 0 | 0 | 0 | 2,834 | 0 | 0 | 111 |
3489f6a2e3a4409adc639b2b529e4829846e7660 | 893 | py | Python | train/exemplar_strategies/herding.py | srvCodes/continual-learning-benchmark | faa074bd241a5929ca1d5ae185f67e62945b6180 | [
"MIT"
] | 40 | 2020-08-28T10:47:12.000Z | 2022-03-25T02:02:38.000Z | train/exemplar_strategies/herding.py | srvCodes/continual-learning-benchmark | faa074bd241a5929ca1d5ae185f67e62945b6180 | [
"MIT"
] | 1 | 2020-08-01T15:18:39.000Z | 2020-08-01T15:18:39.000Z | train/exemplar_strategies/herding.py | srvCodes/continual-learning-benchmark | faa074bd241a5929ca1d5ae185f67e62945b6180 | [
"MIT"
] | 8 | 2020-08-01T16:55:35.000Z | 2022-03-21T06:05:17.000Z | import numpy as np
def herding_selection(x, m, mean_=None):
"""
Source: https://github.com/PatrickZH/End-to-End-Incremental-Learning/blob/39d6f4e594e805a713aa7a1deedbcb03d1f2c9cc/utils.py#L176
Parameters
----------
x: the features, n * dimension
m: the number of selected exe... | 29.766667 | 136 | 0.538634 | import numpy as np
def herding_selection(x, m, mean_=None):
"""
Source: https://github.com/PatrickZH/End-to-End-Incremental-Learning/blob/39d6f4e594e805a713aa7a1deedbcb03d1f2c9cc/utils.py#L176
Parameters
----------
x: the features, n * dimension
m: the number of selected exe... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3d446d66401b69aa86264b9c5f0739148f4c66fb | 11,854 | py | Python | yt_dlp/extractor/netdna.py | atgarcia78/yt-dlp | 70e59f1456b244e549bcd9f39744c70fb53b6cbb | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/netdna.py | atgarcia78/yt-dlp | 70e59f1456b244e549bcd9f39744c70fb53b6cbb | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/netdna.py | atgarcia78/yt-dlp | 70e59f1456b244e549bcd9f39744c70fb53b6cbb | [
"Unlicense"
] | 1 | 2022-03-25T21:51:45.000Z | 2022-03-25T21:51:45.000Z | # coding: utf-8
from __future__ import unicode_literals
import traceback
| 42.949275 | 164 | 0.450734 | # coding: utf-8
from __future__ import unicode_literals
import re
from .commonwebdriver import SeleniumInfoExtractor
from ..utils import (
ExtractorError,
sanitize_filename,
)
import hashlib
import sys
import traceback
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver... | 0 | 2,344 | 0 | 8,985 | 0 | 0 | 0 | 150 | 272 |
f30808e6e08cddc4f2175de816503590fcd89759 | 432 | py | Python | 08-classes/class_with_behaviour.py | johnehunt/PythonIntroDS | 7e9d5c5494191cd68bc71e140df5fb30290a8da6 | [
"Apache-2.0"
] | 1 | 2021-09-20T11:22:47.000Z | 2021-09-20T11:22:47.000Z | 08-classes/class_with_behaviour.py | johnehunt/PythonIntroDS | 7e9d5c5494191cd68bc71e140df5fb30290a8da6 | [
"Apache-2.0"
] | null | null | null | 08-classes/class_with_behaviour.py | johnehunt/PythonIntroDS | 7e9d5c5494191cd68bc71e140df5fb30290a8da6 | [
"Apache-2.0"
] | null | null | null | # Definition of a class with some basic behaviour
p3 = Person('Adam', 21)
print(p3)
p3.birthday()
print(p3)
| 18.782609 | 55 | 0.664352 | # Definition of a class with some basic behaviour
class Person:
""" An example class to hold a persons name and age"""
def __init__(self, name, age):
self.name = name
self.age = age
def __str__(self):
return self.name + ' is ' + str(self.age)
def birthday(self):
print ('Happy birthday you were', self.ag... | 0 | 0 | 0 | 299 | 0 | 0 | 0 | 0 | 23 |
78517c7a97c5595be7ebc2e8680a88b70f222293 | 8,050 | py | Python | compose/model.py | katetolstaya/kernelrl | 963d72a4912faffeaab2627f16e6c103a7678fc4 | [
"MIT"
] | null | null | null | compose/model.py | katetolstaya/kernelrl | 963d72a4912faffeaab2627f16e6c103a7678fc4 | [
"MIT"
] | null | null | null | compose/model.py | katetolstaya/kernelrl | 963d72a4912faffeaab2627f16e6c103a7678fc4 | [
"MIT"
] | null | null | null |
try:
from configparser import ConfigParser
except ImportError:
| 37.268519 | 152 | 0.514658 | import copy, json, random
import numpy as np
from corerl.core import ScheduledParameter
from corerl.function import KernelRepresentation
import pdb
import pickle
import csv
import matplotlib.pyplot as plt
from enum import Enum
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser imp... | 0 | 0 | 0 | 6,963 | 0 | 618 | 0 | 45 | 343 |
1ccd509736b730bad48cf395742dfd23ec7d2d55 | 5,178 | py | Python | python_prototype/inc.py | kamranshamaei/tarsim | dcb0f28f7b1422ba125c85cd53a1420d69d466eb | [
"Apache-2.0"
] | 22 | 2019-03-01T01:41:53.000Z | 2022-02-28T03:57:40.000Z | python_prototype/inc.py | kamranshamaei/tarsim | dcb0f28f7b1422ba125c85cd53a1420d69d466eb | [
"Apache-2.0"
] | 5 | 2020-01-08T19:21:48.000Z | 2021-07-15T20:39:17.000Z | python_prototype/inc.py | kamranshamaei/tarsim | dcb0f28f7b1422ba125c85cd53a1420d69d466eb | [
"Apache-2.0"
] | 7 | 2019-03-01T02:59:11.000Z | 2022-02-17T14:08:11.000Z | """"@package config
Contains all config files necessary for simulator
Rignumber body configuration data
"""
IS_ACCURATE_TIMER = False
U_X = np.array([1, 0, 0])
U_Y = np.array([0, 1, 0])
U_Z = np.array([0, 0, 1])
| 36.985714 | 103 | 0.614716 | """"@package config
Contains all config files necessary for simulator
Rignumber body configuration data
"""
import copy
import time
import inspect
from config.protobuf import *
import math
def set_inter_thread_data(new_data, data, data_lock):
data_lock.acquire()
if len(new_data) is len(data):
for i i... | 0 | 0 | 0 | 3,889 | 0 | 821 | 0 | -29 | 271 |
28957ed5554cd5923f9eb74785fe166a20979eb6 | 1,597 | py | Python | mtp_noms_ops/apps/security/constants.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-noms-ops | eb537fb8a8e3adc588d50af1b000402c957b32a7 | [
"MIT"
] | null | null | null | mtp_noms_ops/apps/security/constants.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-noms-ops | eb537fb8a8e3adc588d50af1b000402c957b32a7 | [
"MIT"
] | null | null | null | mtp_noms_ops/apps/security/constants.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-noms-ops | eb537fb8a8e3adc588d50af1b000402c957b32a7 | [
"MIT"
] | null | null | null | from django.utils.translation import gettext_lazy as _
CHECK_REJECTION_CATEGORY_TEXT_MAPPING = {
'fiu_investigation_id': _('Associated FIU investigation'),
'intelligence_report_id': _('Associated intelligence report (IR)'),
'other_reason': _('Other reason'),
}
CHECK_REJECTION_CATEGORY_BOOLEAN_MAPPING = {
... | 45.628571 | 118 | 0.786475 | from django.utils.translation import gettext_lazy as _
CHECK_REJECTION_CATEGORY_TEXT_MAPPING = {
'fiu_investigation_id': _('Associated FIU investigation'),
'intelligence_report_id': _('Associated intelligence report (IR)'),
'other_reason': _('Other reason'),
}
CHECK_REJECTION_CATEGORY_BOOLEAN_MAPPING = {
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c7a38210aaeed7cc0418ae9c6abb65464e467600 | 5,376 | py | Python | 2017/19_a_series_of_tubes.py | pchudzik/adventofcode | e1d6521621f6ca90f9dc53cf3d1ed5b8c5c2b7d1 | [
"MIT"
] | null | null | null | 2017/19_a_series_of_tubes.py | pchudzik/adventofcode | e1d6521621f6ca90f9dc53cf3d1ed5b8c5c2b7d1 | [
"MIT"
] | null | null | null | 2017/19_a_series_of_tubes.py | pchudzik/adventofcode | e1d6521621f6ca90f9dc53cf3d1ed5b8c5c2b7d1 | [
"MIT"
] | null | null | null | """
--- Day 19: A Series of Tubes ---
Somehow, a network packet got lost and ended up here. It's trying to follow a routing diagram (your puzzle input), but
it's confused about where to go.
Its starting point is just off the top of the diagram. Lines (drawn with |, -, and +) show the path it needs to take,
starting b... | 29.701657 | 120 | 0.641927 | """
--- Day 19: A Series of Tubes ---
Somehow, a network packet got lost and ended up here. It's trying to follow a routing diagram (your puzzle input), but
it's confused about where to go.
Its starting point is just off the top of the diagram. Lines (drawn with |, -, and +) show the path it needs to take,
starting b... | 0 | 0 | 0 | 0 | 0 | 2,519 | 0 | -5 | 229 |
67a27f2d48c56fdc3fbbeca6de33ee4fba108e63 | 701 | py | Python | tsl/__init__.py | TorchSpatiotemporal/tsl | da13493b0cf83826bf41fe78a67e8d4ce1d7a8a0 | [
"MIT"
] | 4 | 2022-03-21T09:16:33.000Z | 2022-03-30T12:24:30.000Z | tsl/__init__.py | TorchSpatiotemporal/tsl | da13493b0cf83826bf41fe78a67e8d4ce1d7a8a0 | [
"MIT"
] | null | null | null | tsl/__init__.py | TorchSpatiotemporal/tsl | da13493b0cf83826bf41fe78a67e8d4ce1d7a8a0 | [
"MIT"
] | null | null | null | import os
import tsl.global_scope
data = LazyLoader('data', globals(), 'tsl.data')
datasets = LazyLoader('datasets', globals(), 'tsl.datasets')
nn = LazyLoader('nn', globals(), 'tsl.nn')
predictors = LazyLoader('predictors', globals(), 'tsl.predictors')
imputers = LazyLoader('imputers', globals(), 'tsl.imputers')
__... | 21.242424 | 66 | 0.663338 | import os
import tsl.global_scope
from tsl.global_scope import *
data = LazyLoader('data', globals(), 'tsl.data')
datasets = LazyLoader('datasets', globals(), 'tsl.datasets')
nn = LazyLoader('nn', globals(), 'tsl.nn')
predictors = LazyLoader('predictors', globals(), 'tsl.predictors')
imputers = LazyLoader('imputers',... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 22 |
f5f10f3f42d6eb4924884b44cfea70bd48335be4 | 8,643 | py | Python | src/elarian/utils/helpers.py | ElarianLtd/python-sdk | f603688dffba4b46c5a9f208a75b3dc3d75ed565 | [
"MIT"
] | 4 | 2021-05-27T23:15:21.000Z | 2021-12-29T11:40:02.000Z | src/elarian/utils/helpers.py | ElarianLtd/python-sdk | f603688dffba4b46c5a9f208a75b3dc3d75ed565 | [
"MIT"
] | 2 | 2021-05-20T05:51:02.000Z | 2021-07-13T11:25:54.000Z | src/elarian/utils/helpers.py | ElarianLtd/python-sdk | f603688dffba4b46c5a9f208a75b3dc3d75ed565 | [
"MIT"
] | null | null | null |
def get_valid_keys(target, prefix):
"""Lists the valid keys to be used on specific proto"""
keys = map(lambda key: key.replace(f'{prefix}_', ''), target.keys())
return list(filter(lambda item: item != 'UNSPECIFIED', list(keys)))
def get_enum_value(target, key, prefix):
"""Used to get the provider ... | 43.432161 | 112 | 0.586023 | from .generated.common_model_pb2 import (
CustomerNumber,
MediaType,
)
from .generated.messaging_model_pb2 import (
OutboundMessage,
VoiceCallAction,
RecordSessionCallAction,
RejectCallAction,
PromptMessageReplyAction,
PromptMessageMenuItemBody,
TextToSpeechVoice,
MessagingChanne... | 0 | 0 | 0 | 0 | 0 | 7,470 | 0 | 280 | 90 |
0a90fedf85ef7d2f156a5e61bf7b8f36d7e04b7f | 13,977 | py | Python | mindarmour/natural_robustness/transform/image/transformation.py | hboshnak/mindarmour | 0609a4eaea875a84667bed279add9305752880cc | [
"Apache-2.0"
] | null | null | null | mindarmour/natural_robustness/transform/image/transformation.py | hboshnak/mindarmour | 0609a4eaea875a84667bed279add9305752880cc | [
"Apache-2.0"
] | null | null | null | mindarmour/natural_robustness/transform/image/transformation.py | hboshnak/mindarmour | 0609a4eaea875a84667bed279add9305752880cc | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 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
#
# Unless required by applicable law or agreed to... | 38.188525 | 119 | 0.595407 | # Copyright 2022 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
#
# Unless required by applicable law or agreed to... | 0 | 0 | 0 | 12,866 | 0 | 0 | 0 | 132 | 249 |
c2b061571641b102a28a466a27cccb90ff2a8f36 | 4,847 | py | Python | tests/fugue/workflow/test_workflow.py | WangCHX/fugue | bb9758d23b0041d4ed00f6195f317d097a9dd683 | [
"Apache-2.0"
] | null | null | null | tests/fugue/workflow/test_workflow.py | WangCHX/fugue | bb9758d23b0041d4ed00f6195f317d097a9dd683 | [
"Apache-2.0"
] | null | null | null | tests/fugue/workflow/test_workflow.py | WangCHX/fugue | bb9758d23b0041d4ed00f6195f317d097a9dd683 | [
"Apache-2.0"
] | null | null | null |
# schema: a:int
| 30.872611 | 86 | 0.632763 | import copy
from random import randint, seed
from typing import Any, Dict, Iterable, List
from adagio.instances import WorkflowContext, WorkflowResultCache
from fugue.collections.partition import PartitionSpec
from fugue.dataframe import DataFrame
from fugue.dataframe.array_dataframe import ArrayDataFrame
from fugue.d... | 0 | 144 | 0 | 823 | 120 | 2,710 | 0 | 509 | 513 |
c6ccf5e371d3bf7c6aebf63a67c96884ff07f5b2 | 38,850 | py | Python | src/lib/detectors/base_detector.py | hz-ants/CenterPose- | a92d93b09660e266a43533a0dc722445873829ea | [
"BSD-Source-Code"
] | 96 | 2021-11-17T20:19:20.000Z | 2022-03-23T07:12:06.000Z | src/lib/detectors/base_detector.py | hz-ants/CenterPose- | a92d93b09660e266a43533a0dc722445873829ea | [
"BSD-Source-Code"
] | 2 | 2022-01-04T11:16:27.000Z | 2022-01-06T05:33:58.000Z | src/lib/detectors/base_detector.py | hz-ants/CenterPose- | a92d93b09660e266a43533a0dc722445873829ea | [
"BSD-Source-Code"
] | 13 | 2021-11-17T21:29:42.000Z | 2022-03-04T22:47:38.000Z | # Copyright (c) 2021 NVIDIA Corporation. All rights reserved.
# This work is licensed under the NVIDIA Source Code License - Non-commercial.
# Full text can be found in LICENSE.md
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
| 50 | 123 | 0.486512 | # Copyright (c) 2021 NVIDIA Corporation. All rights reserved.
# This work is licensed under the NVIDIA Source Code License - Non-commercial.
# Full text can be found in LICENSE.md
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import cv2
import copy
import... | 0 | 0 | 0 | 37,987 | 0 | 0 | 0 | 192 | 380 |
774c23c9071d54311613c8b17c76c40bdf103116 | 13,583 | py | Python | pyEpiabm/pyEpiabm/sweep/host_progression_sweep.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 11 | 2021-12-02T15:24:02.000Z | 2022-03-10T14:02:13.000Z | pyEpiabm/pyEpiabm/sweep/host_progression_sweep.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 119 | 2021-11-24T13:56:48.000Z | 2022-03-30T11:52:07.000Z | pyEpiabm/pyEpiabm/sweep/host_progression_sweep.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 3 | 2022-01-13T03:05:19.000Z | 2022-03-11T22:00:17.000Z | #
# Progression of infection within individuals
#
| 47 | 79 | 0.638445 | #
# Progression of infection within individuals
#
import random
import numpy as np
from collections import defaultdict
import pyEpiabm as pe
from pyEpiabm.core import Parameters, Person
from pyEpiabm.property import InfectionStatus
from pyEpiabm.utility import StateTransitionMatrix, TransitionTimeMatrix
from .abstra... | 0 | 1,601 | 0 | 11,608 | 0 | 0 | 0 | 121 | 202 |
2bc5bc50e13deb69a93ba1bf4f7acdaadbf960d0 | 172 | py | Python | Unit 3/3.5/3.5.8 Rectangle Pt3.py | shashwat73/cse | 60e49307e57105cf9916c7329f53f891c5e81fdb | [
"MIT"
] | 1 | 2021-04-08T14:02:49.000Z | 2021-04-08T14:02:49.000Z | Unit 3/3.5/3.5.8 Rectangle Pt3.py | shashwat73/cse | 60e49307e57105cf9916c7329f53f891c5e81fdb | [
"MIT"
] | null | null | null | Unit 3/3.5/3.5.8 Rectangle Pt3.py | shashwat73/cse | 60e49307e57105cf9916c7329f53f891c5e81fdb | [
"MIT"
] | null | null | null | length = int(input("Do"))
width = int(input("Doer"))
area = length*width
perimeter = 2* (length+width)
print "Area: " + str(area)
print "Perimeter:" + str(perimeter)
| 24.571429 | 36 | 0.645349 | length = int(input("Do"))
width = int(input("Doer"))
area = length*width
perimeter = 2* (length+width)
print "Area: " + str(area)
print "Perimeter:" + str(perimeter)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9b6bfbc5066ef87b9ffc1d37e6b8b4a721e1ff59 | 556 | py | Python | telemetry/telemetry/benchmark_runner.py | brave-experiments/catapult | 0d8246fe06fb598577f2344efcbc4b4e5b3aa323 | [
"BSD-3-Clause"
] | null | null | null | telemetry/telemetry/benchmark_runner.py | brave-experiments/catapult | 0d8246fe06fb598577f2344efcbc4b4e5b3aa323 | [
"BSD-3-Clause"
] | 1 | 2022-03-02T13:24:12.000Z | 2022-03-02T13:24:12.000Z | telemetry/telemetry/benchmark_runner.py | brave-experiments/catapult | 0d8246fe06fb598577f2344efcbc4b4e5b3aa323 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Parses the command line, discovers the appropriate benchmarks, and runs them.
Handles benchmark configuration, but all the logic for
actually running the ... | 37.066667 | 80 | 0.794964 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Parses the command line, discovers the appropriate benchmarks, and runs them.
Handles benchmark configuration, but all the logic for
actually running the ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dc0e2c117180508edd3b69dc989126477e2b53ea | 3,077 | py | Python | processor/utils/anchor_generator_builder.py | laobadao/TF_VS_Caffe | 943b47daefa42f07db285a331647d09669085f9f | [
"MIT"
] | null | null | null | processor/utils/anchor_generator_builder.py | laobadao/TF_VS_Caffe | 943b47daefa42f07db285a331647d09669085f9f | [
"MIT"
] | null | null | null | processor/utils/anchor_generator_builder.py | laobadao/TF_VS_Caffe | 943b47daefa42f07db285a331647d09669085f9f | [
"MIT"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 32.734043 | 80 | 0.61586 | # 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... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f0e49787dd63e951ab1ffa7166e70b92aef62474 | 2,106 | py | Python | src/waldur_slurm/migrations/0003_allocationusage.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 26 | 2017-10-18T13:49:58.000Z | 2021-09-19T04:44:09.000Z | src/waldur_slurm/migrations/0003_allocationusage.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 14 | 2018-12-10T14:14:51.000Z | 2021-06-07T10:33:39.000Z | src/waldur_slurm/migrations/0003_allocationusage.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 32 | 2017-09-24T03:10:45.000Z | 2021-10-16T16:41:09.000Z | # Generated by Django 1.11.1 on 2017-10-16 15:16
import django.core.validators
| 33.967742 | 73 | 0.441595 | # Generated by Django 1.11.1 on 2017-10-16 15:16
import django.core.validators
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... | 0 | 0 | 0 | 1,896 | 0 | 0 | 0 | 41 | 89 |
4ec71318987d768d39dee6432be0dc3482308e0e | 107 | py | Python | auth/__init__.py | Stickyamp11/easyfruitApi | a5ab56d53866e8e592e2dd6730b82dca1cdeacfa | [
"MIT"
] | null | null | null | auth/__init__.py | Stickyamp11/easyfruitApi | a5ab56d53866e8e592e2dd6730b82dca1cdeacfa | [
"MIT"
] | null | null | null | auth/__init__.py | Stickyamp11/easyfruitApi | a5ab56d53866e8e592e2dd6730b82dca1cdeacfa | [
"MIT"
] | null | null | null | from flask import Blueprint
auth = Blueprint('auth', __name__, url_prefix='/auth')
from . import rest-api
| 21.4 | 54 | 0.747664 | from flask import Blueprint
auth = Blueprint('auth', __name__, url_prefix='/auth')
from . import rest-api
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2bfc7ea0a884bf177b80413224d1b790c01aaf23 | 1,453 | py | Python | Excel/experiments/openpyxl-exprt.py | 2amitprakash/Python_Codes | c7e915c0da87fb7438777be5945f81d4126fea42 | [
"MIT"
] | null | null | null | Excel/experiments/openpyxl-exprt.py | 2amitprakash/Python_Codes | c7e915c0da87fb7438777be5945f81d4126fea42 | [
"MIT"
] | null | null | null | Excel/experiments/openpyxl-exprt.py | 2amitprakash/Python_Codes | c7e915c0da87fb7438777be5945f81d4126fea42 | [
"MIT"
] | null | null | null | from openpyxl import Workbook
from openpyxl import load_workbook
# Import necessary style classes
from openpyxl.styles import Font, Alignment, Border, Side, colors
wb = Workbook()
# grab the active worksheet
ws = wb.active
# Data can be assigned directly to cells
ws['A1'] = 42
# Rows can also be app... | 29.06 | 73 | 0.690984 | from openpyxl import Workbook
from openpyxl import load_workbook
# Import necessary style classes
from openpyxl.styles import Font, Color, Alignment, Border, Side, colors
wb = Workbook()
# grab the active worksheet
ws = wb.active
# Data can be assigned directly to cells
ws['A1'] = 42
# Rows can also... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 |
e782629c0fa79a5a86edb99cc20c6f7250375b97 | 3,409 | py | Python | src/benchsuite/core/model/provider.py | benchmarking-suite/benchmarking-common | 97a075cc353e5237d0f1507d339a49e8c8afe9ac | [
"Apache-2.0"
] | 1 | 2018-07-05T09:15:54.000Z | 2018-07-05T09:15:54.000Z | src/benchsuite/core/model/provider.py | benchmarking-suite/benchmarking-common | 97a075cc353e5237d0f1507d339a49e8c8afe9ac | [
"Apache-2.0"
] | 1 | 2018-06-06T09:00:17.000Z | 2018-06-06T09:00:17.000Z | src/benchsuite/core/model/provider.py | benchmarking-suite/benchsuite-core | 97a075cc353e5237d0f1507d339a49e8c8afe9ac | [
"Apache-2.0"
] | null | null | null | # Benchmarking Suite
# Copyright 2014-2017 Engineering Ingegneria Informatica S.p.A.
#
# 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 ... | 33.097087 | 129 | 0.727779 | # Benchmarking Suite
# Copyright 2014-2017 Engineering Ingegneria Informatica S.p.A.
#
# 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 ... | 0 | 493 | 0 | 6 | 0 | 1,651 | 0 | 96 | 405 |
95fb25b7119ba5651617aa8abf9f611fc2231876 | 1,565 | py | Python | src/Sephrasto/Objekte.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 15 | 2017-11-09T12:49:52.000Z | 2022-03-06T12:18:48.000Z | src/Sephrasto/Objekte.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 40 | 2018-02-01T21:32:01.000Z | 2022-03-22T11:35:28.000Z | src/Sephrasto/Objekte.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 13 | 2018-03-12T17:50:42.000Z | 2022-03-06T12:21:41.000Z | '''
In dieser Datei werden Waffen und Rstungen definiert.
''' | 24.453125 | 58 | 0.553994 | '''
In dieser Datei werden Waffen und Rüstungen definiert.
'''
class Objekt():
def __init__(self):
self.name = ''
self.text = ''
self.isUserAdded = True
def __eq__(self, other) :
if self.__class__ != other.__class__: return False
return self.__dict__ == other.__dict__
... | 2 | 0 | 0 | 1,352 | 0 | 0 | 0 | 0 | 151 |
5422ea5c8be30c75b18ea55f1820135ad38c8e25 | 2,496 | py | Python | neutron_lbaas/agent/agent_device_driver.py | 2020human/neutron-lbaas | c5acb45ff6a8c2c41b84bdb2406450731491cad8 | [
"Apache-2.0"
] | null | null | null | neutron_lbaas/agent/agent_device_driver.py | 2020human/neutron-lbaas | c5acb45ff6a8c2c41b84bdb2406450731491cad8 | [
"Apache-2.0"
] | null | null | null | neutron_lbaas/agent/agent_device_driver.py | 2020human/neutron-lbaas | c5acb45ff6a8c2c41b84bdb2406450731491cad8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack Foundation. All rights reserved
# Copyright 2015 Rackspace
#
# 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/LICE... | 22.899083 | 78 | 0.685497 | # Copyright 2013 OpenStack Foundation. All rights reserved
# Copyright 2015 Rackspace
#
# 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/LICE... | 0 | 1,487 | 0 | 129 | 0 | 0 | 0 | -22 | 234 |
d92c641f3a9e1f71efb7801019ea8bb6113d0c68 | 1,626 | py | Python | main.py | carlfarterson/LTC_signal | e6f66dc292bacb8eb3bbf1a09138c9204a29431d | [
"MIT"
] | 1 | 2021-04-10T10:52:16.000Z | 2021-04-10T10:52:16.000Z | main.py | carlfarterson/LTC_signal | e6f66dc292bacb8eb3bbf1a09138c9204a29431d | [
"MIT"
] | null | null | null | main.py | carlfarterson/LTC_signal | e6f66dc292bacb8eb3bbf1a09138c9204a29431d | [
"MIT"
] | 3 | 2020-04-28T17:44:50.000Z | 2021-04-10T10:52:09.000Z | import pandas as pd
from itertools import combinations
from twilio.rest import Client
avg_pairs = list(combinations(averages, 2))
message = ''
for coin in coins:
ticker, data = fetch_data(coin)
df = pd.DataFrame(
columns=['timestamp','open', 'high', 'low', 'close', 'volume'],
data=data
)... | 27.1 | 75 | 0.597171 | import ccxt
import pandas as pd
from itertools import combinations
from twilio.rest import Client
from api import *
avg_pairs = list(combinations(averages, 2))
message = ''
def fetch_data(coin):
binance = ccxt.binance()
try:
ticker = coin + '/USDT'
data = binance.fetch_ohlcv(ticker, '1h')
... | 0 | 0 | 0 | 0 | 0 | 235 | 0 | -14 | 67 |
4bda540bbc9e154e47c6b5bacbd9c15a47a644a2 | 949 | py | Python | hail_scripts/v01/utils/add_primate_ai.py | NLSVTN/hail-elasticsearch-pipelines | 8b895a2e46a33d347dd2a1024101a6d515027a03 | [
"MIT"
] | null | null | null | hail_scripts/v01/utils/add_primate_ai.py | NLSVTN/hail-elasticsearch-pipelines | 8b895a2e46a33d347dd2a1024101a6d515027a03 | [
"MIT"
] | null | null | null | hail_scripts/v01/utils/add_primate_ai.py | NLSVTN/hail-elasticsearch-pipelines | 8b895a2e46a33d347dd2a1024101a6d515027a03 | [
"MIT"
] | null | null | null |
PRIMATE_AI_VDS_PATHS = {
'37': 'gs://seqr-reference-data/GRCh37/primate_ai/PrimateAI_scores_v0.2.vds',
'38': 'gs://seqr-reference-data/GRCh38/primate_ai/PrimateAI_scores_v0.2.liftover_grch38.vds',
}
| 33.892857 | 110 | 0.752371 | import hail
PRIMATE_AI_VDS_PATHS = {
'37': 'gs://seqr-reference-data/GRCh37/primate_ai/PrimateAI_scores_v0.2.vds',
'38': 'gs://seqr-reference-data/GRCh38/primate_ai/PrimateAI_scores_v0.2.liftover_grch38.vds',
}
def read_primate_ai_vds(hail_context, genome_version, subset=None):
if genome_version not in [... | 0 | 0 | 0 | 0 | 0 | 681 | 0 | -10 | 68 |
5c46099f9839b26ea341c22d56b4afd57fc37f25 | 20,742 | py | Python | openmixup/models/backbones/vision_transformer.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 10 | 2021-12-30T10:22:27.000Z | 2022-03-30T02:31:38.000Z | openmixup/models/backbones/vision_transformer.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 3 | 2022-01-20T21:02:48.000Z | 2022-03-19T13:49:45.000Z | openmixup/models/backbones/vision_transformer.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | null | null | null | # Reference: https://github.com/open-mmlab/mmclassification/tree/master/mmcls/models/backbone/vision_transformer.py
import torch.nn as nn
| 40.275728 | 115 | 0.561759 | # Reference: https://github.com/open-mmlab/mmclassification/tree/master/mmcls/models/backbone/vision_transformer.py
import math
from typing import Sequence
from functools import reduce
from operator import mul
import numpy as np
import torch
import torch.nn as nn
from mmcv.cnn import build_norm_layer
from mmcv.cnn.bri... | 0 | 15,385 | 0 | 4,373 | 0 | 0 | 0 | 444 | 400 |
869bbb3d23c932d2e6343cda63acd1e4e75a660b | 12,875 | py | Python | jip/maven.py | mhmgad/jip | cd333883cda5dcb448e7c98b1e83560c378daf41 | [
"MIT"
] | null | null | null | jip/maven.py | mhmgad/jip | cd333883cda5dcb448e7c98b1e83560c378daf41 | [
"MIT"
] | null | null | null | jip/maven.py | mhmgad/jip | cd333883cda5dcb448e7c98b1e83560c378daf41 | [
"MIT"
] | null | null | null | #! /usr/bin/env jython
# -
# Copyright (C) 2011 Sun Ning<classicning@gmail.com>
#
# 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
... | 41.938111 | 122 | 0.625786 | #! /usr/bin/env jython
# -
# Copyright (C) 2011 Sun Ning<classicning@gmail.com>
#
# 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
... | 0 | 162 | 0 | 11,345 | 0 | 0 | 0 | 24 | 203 |
9f059f23cda24fbb0e84c19258cfa0c73d8d0944 | 6,662 | py | Python | fermipy/jobs/name_policy.py | jefemagril/fermipy | ff67ba87516be1a31d1ad12b900f19bc7f1e2406 | [
"BSD-3-Clause"
] | null | null | null | fermipy/jobs/name_policy.py | jefemagril/fermipy | ff67ba87516be1a31d1ad12b900f19bc7f1e2406 | [
"BSD-3-Clause"
] | null | null | null | fermipy/jobs/name_policy.py | jefemagril/fermipy | ff67ba87516be1a31d1ad12b900f19bc7f1e2406 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Handle the naming conventions for DM pipeline analysis
"""
from __future__ import absolute_import, division, print_function
| 36.80663 | 100 | 0.65746 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Handle the naming conventions for DM pipeline analysis
"""
from __future__ import absolute_import, division, print_function
import sys
import yaml
from fermipy.jobs.utils import is_null, is_not_null
class NameFactory(object):
""" Helper class to... | 0 | 0 | 0 | 6,370 | 0 | 0 | 0 | 9 | 91 |
a18ce9b28d47d2b0f8739a73af4aadcdae3e7d12 | 2,498 | py | Python | live/views.py | austinhartzheim/madhacks-live | ec572d124350f91fd5afa2d20a6ed556b3f15863 | [
"MIT"
] | null | null | null | live/views.py | austinhartzheim/madhacks-live | ec572d124350f91fd5afa2d20a6ed556b3f15863 | [
"MIT"
] | null | null | null | live/views.py | austinhartzheim/madhacks-live | ec572d124350f91fd5afa2d20a6ed556b3f15863 | [
"MIT"
] | null | null | null | from django.shortcuts import render_to_response
from django.template import RequestContext
import datetime, gspread, dateutil.parser
import madhacks.settings
def main_live(request):
'''
Show the screen prompting the user to enter their email address
before they go on with the voting.
'''
currdate... | 33.306667 | 149 | 0.639712 | from django.http import HttpResponseRedirect
from django.shortcuts import render, render_to_response
from django.contrib.auth.models import User
from django.forms.formsets import formset_factory
from django.template import RequestContext
from vote.models import *
from vote.forms import *
from live.models import *
im... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 134 |
2206722d432355835754f173ff74ab26d15fcf02 | 1,016 | py | Python | pyll/utils/timer.py | manuflores/hti-cnn | b862446ab5f7477c5f2586b1d061c615997646cd | [
"BSD-2-Clause"
] | 7 | 2019-05-16T07:56:17.000Z | 2021-09-01T08:12:37.000Z | pyll/utils/timer.py | manuflores/hti-cnn | b862446ab5f7477c5f2586b1d061c615997646cd | [
"BSD-2-Clause"
] | 1 | 2019-04-19T06:25:28.000Z | 2019-04-19T06:25:28.000Z | pyll/utils/timer.py | manuflores/hti-cnn | b862446ab5f7477c5f2586b1d061c615997646cd | [
"BSD-2-Clause"
] | 3 | 2019-04-05T17:05:40.000Z | 2021-08-15T11:37:56.000Z | # -*- coding: utf-8 -*-
"""
Michael Widrich, Markus Hofmarcher, 2017
"""
| 23.627907 | 74 | 0.533465 | # -*- coding: utf-8 -*-
"""
© Michael Widrich, Markus Hofmarcher, 2017
"""
import time
class Timer(object):
def __init__(self, name="", verbose=True, precision='msec'):
self.verbose = verbose
self.name = name
self.precision = precision
self.restart()
def __enter__(self):
... | 2 | 0 | 0 | 904 | 0 | 0 | 0 | -10 | 45 |
6db64ea2455fb28c765958d2607a2da4968f6e4d | 183 | py | Python | models/__init__.py | mochell/stormy_forerunners | 6ae19e14acded94638578ceeea53ef6ef1bf5198 | [
"MIT"
] | null | null | null | models/__init__.py | mochell/stormy_forerunners | 6ae19e14acded94638578ceeea53ef6ef1bf5198 | [
"MIT"
] | null | null | null | models/__init__.py | mochell/stormy_forerunners | 6ae19e14acded94638578ceeea53ef6ef1bf5198 | [
"MIT"
] | null | null | null | __all__ = ["JONSWAP_gamma", "gaussian_gamma", "JONSWAP_gamma", "shape_models"]
#import stormrecon as stormrecon
#import tools as tools
#import io as io
#import plotters as plotters
| 26.142857 | 79 | 0.770492 | __all__ = ["JONSWAP_gamma", "gaussian_gamma", "JONSWAP_gamma", "shape_models"]
#import stormrecon as stormrecon
#import tools as tools
#import io as io
#import plotters as plotters
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b124279246da1bd02ffca3d4d5578aa16d4a139f | 1,763 | py | Python | aoc2021/day12/solution.py | jschmidtnj/competitive | cb16f285f1022d9d16e654b755d89a1b0e53deeb | [
"MIT"
] | null | null | null | aoc2021/day12/solution.py | jschmidtnj/competitive | cb16f285f1022d9d16e654b755d89a1b0e53deeb | [
"MIT"
] | null | null | null | aoc2021/day12/solution.py | jschmidtnj/competitive | cb16f285f1022d9d16e654b755d89a1b0e53deeb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
if __name__ == '__main__':
print(part_1())
print(part_2())
| 28.901639 | 63 | 0.522405 | #!/usr/bin/env python3
from collections import defaultdict, deque
def part_1() -> int:
graph = defaultdict(list)
with open('input.txt', 'r') as f:
for line in f:
line = line.strip()
parent, child = line.split('-')
graph[parent].append(child)
graph[child... | 0 | 0 | 0 | 0 | 0 | 1,581 | 0 | 21 | 69 |
b209683ca5102578ed36168742d7edeba2399a8a | 1,105 | py | Python | tello-command.py | doffing81/tello | 820cf9e6ec86632d626569e34157397f054c6921 | [
"MIT"
] | null | null | null | tello-command.py | doffing81/tello | 820cf9e6ec86632d626569e34157397f054c6921 | [
"MIT"
] | null | null | null | tello-command.py | doffing81/tello | 820cf9e6ec86632d626569e34157397f054c6921 | [
"MIT"
] | null | null | null | """
This will prompt a user to enter a command for a Tello drone.
Tello SDK v1.0.0 commands = "https://dl-cdn.ryzerobotics.com/downloads/tello/0228/Tello+SDK+Readme.pdf"
Tello SDK v1.3.0 commands = "https://terra-1-g.djicdn.com/2d4dce68897a46b19fc717f3576b7c6a/Tello%20/For%20Tello/Tello%20SDK%20Documentation%20EN_1.3_... | 33.484848 | 162 | 0.661538 | """
This will prompt a user to enter a command for a Tello drone.
Tello SDK v1.0.0 commands = "https://dl-cdn.ryzerobotics.com/downloads/tello/0228/Tello+SDK+Readme.pdf"
Tello SDK v1.3.0 commands = "https://terra-1-g.djicdn.com/2d4dce68897a46b19fc717f3576b7c6a/Tello%20编程相关/For%20Tello/Tello%20SDK%20Documentation%20EN_... | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d4a40ca412b0fcb9469040f1dc23033fa04a9808 | 5,530 | py | Python | tfx_bsl/sketches/misragries_sketch_test.py | meixinzhang/tfx-bsl | ff40846050827175b419b7b12c16a3f5b276a20d | [
"Apache-2.0"
] | null | null | null | tfx_bsl/sketches/misragries_sketch_test.py | meixinzhang/tfx-bsl | ff40846050827175b419b7b12c16a3f5b276a20d | [
"Apache-2.0"
] | null | null | null | tfx_bsl/sketches/misragries_sketch_test.py | meixinzhang/tfx-bsl | ff40846050827175b419b7b12c16a3f5b276a20d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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, ... | 29.572193 | 80 | 0.611935 | # Copyright 2020 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, ... | 0 | 1,478 | 0 | 2,784 | 0 | 195 | 0 | 53 | 181 |
2d28d8db30bec21bab634c5fd1baea0e0e58f504 | 420 | py | Python | models/__init__.py | billhepeng/wx_tools | 64369531bd76a935eff547c50ff68150a240849d | [
"Apache-2.0"
] | 1 | 2021-01-19T02:49:14.000Z | 2021-01-19T02:49:14.000Z | models/__init__.py | billhepeng/wx_tools | 64369531bd76a935eff547c50ff68150a240849d | [
"Apache-2.0"
] | null | null | null | models/__init__.py | billhepeng/wx_tools | 64369531bd76a935eff547c50ff68150a240849d | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
| 24.705882 | 32 | 0.819048 | # coding=utf-8
from . import livechat_channel
from . import reply_about_models
from . import menu_about_models
from . import wx_user
from . import wx_corpuser
from . import wx_autoreply_model
from . import wx_config_model
from . import res_partner
from . import wxuser_uuid
from . import corpuser_uuid
from . import wx_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 309 |
6d38fb0514b998a41a767af95b2b6602201018ec | 2,995 | py | Python | custom_components/senseme/config_flow.py | OzGav/senseme-hacs | ff9b9a450be37e80ddb6380a4730c4526bb14c28 | [
"MIT"
] | 27 | 2017-02-20T17:49:32.000Z | 2021-12-22T08:58:46.000Z | custom_components/senseme/config_flow.py | OzGav/senseme-hacs | ff9b9a450be37e80ddb6380a4730c4526bb14c28 | [
"MIT"
] | 66 | 2017-02-22T16:01:20.000Z | 2022-03-05T15:09:56.000Z | custom_components/senseme/config_flow.py | OzGav/senseme-hacs | ff9b9a450be37e80ddb6380a4730c4526bb14c28 | [
"MIT"
] | 13 | 2020-02-09T22:42:38.000Z | 2022-03-19T06:48:07.000Z | """Config flow for SenseME."""
DISCOVER_TIMEOUT = 5
| 32.912088 | 81 | 0.620033 | """Config flow for SenseME."""
import ipaddress
import voluptuous as vol
from aiosenseme import async_get_device_by_ip_address, discover_all
from homeassistant import config_entries
from homeassistant.const import CONF_HOST
from .const import CONF_HOST_MANUAL, CONF_INFO, DOMAIN
DISCOVER_TIMEOUT = 5
class SensemeFl... | 0 | 0 | 2,293 | 375 | 0 | 0 | 0 | 116 | 157 |
c1d6b2ea181d5cf65ca588471ecc83582d54b2a5 | 807 | py | Python | Image/resizeimg.py | LC-Duarte/pytil | 271b4e8dee408b586fbd741511116726e10d1fc0 | [
"MIT"
] | null | null | null | Image/resizeimg.py | LC-Duarte/pytil | 271b4e8dee408b586fbd741511116726e10d1fc0 | [
"MIT"
] | null | null | null | Image/resizeimg.py | LC-Duarte/pytil | 271b4e8dee408b586fbd741511116726e10d1fc0 | [
"MIT"
] | null | null | null | import cv2
import sys
print("Hello")
target_path = '/Users/Leonardo/Desktop/logo-coritiba.jpg'
reduce_by = 11
img = cv2.imread(target_path)
shape = img.shape
new0 = int(shape[0]/reduce_by)
new1 = int(shape[1]/reduce_by)
print(f"Orginal Shape = {shape}; New Shape ({new0}, {new1}, {shape[2]})")
try:
redu = cv2.re... | 25.21875 | 79 | 0.700124 | import cv2
import sys
print("Hello")
target_path = '/Users/Leonardo/Desktop/logo-coritiba.jpg'
reduce_by = 11
img = cv2.imread(target_path)
shape = img.shape
new0 = int(shape[0]/reduce_by)
new1 = int(shape[1]/reduce_by)
print(f"Orginal Shape = {shape}; New Shape ({new0}, {new1}, {shape[2]})")
try:
redu = cv2.re... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b98a847aac7bc5cee71bca689f5bd185a3819b77 | 5,750 | py | Python | lenstronomy/PointSource/Types/lensed_position.py | heather999/lenstronomy | 8102fe026c1f3ba6e81d8a1f59cceb90e68430b4 | [
"MIT"
] | null | null | null | lenstronomy/PointSource/Types/lensed_position.py | heather999/lenstronomy | 8102fe026c1f3ba6e81d8a1f59cceb90e68430b4 | [
"MIT"
] | null | null | null | lenstronomy/PointSource/Types/lensed_position.py | heather999/lenstronomy | 8102fe026c1f3ba6e81d8a1f59cceb90e68430b4 | [
"MIT"
] | null | null | null |
__all__ = ['LensedPositions']
| 52.752294 | 119 | 0.658435 | import numpy as np
from lenstronomy.PointSource.Types.base_ps import PSBase, _expand_to_array
__all__ = ['LensedPositions']
class LensedPositions(PSBase):
"""
class of a a lensed point source parameterized as the (multiple) observed image positions
Name within the PointSource module: 'LENSED_POSITION'
... | 0 | 0 | 0 | 5,601 | 0 | 0 | 0 | 50 | 67 |
215095b596d46dfb9be5d016b9319bae2de0f6bf | 1,320 | py | Python | src/data/bg_ri_eng.py | nedlrichards/tau_decomp | 77560307836f67ae68f3571fb6cd0fd9d831398d | [
"MIT"
] | null | null | null | src/data/bg_ri_eng.py | nedlrichards/tau_decomp | 77560307836f67ae68f3571fb6cd0fd9d831398d | [
"MIT"
] | null | null | null | src/data/bg_ri_eng.py | nedlrichards/tau_decomp | 77560307836f67ae68f3571fb6cd0fd9d831398d | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
plt.ion()
source_depth = 'shallow'
#source_depth = 'deep'
save_dict = one_freq(400)
save_dict['e_ri_400'] = save_dict.pop('e_ri')
save_dict['e_ri_0_400'] = save_dict.pop('e_ri_0')
save_dict['loop_len_400'] = save_dict.pop('loop_len')
"""
tmp_dict = one_freq(1e3)
save... | 26.4 | 74 | 0.665909 | import numpy as np
from math import pi
from os.path import join
import matplotlib.pyplot as plt
from src import MLEnergy, list_tl_files
plt.ion()
source_depth = 'shallow'
#source_depth = 'deep'
def one_freq(fc):
tl_list = list_tl_files(fc, source_depth=source_depth)
x_s = []
e_ri = []
e_ri_0 = []
... | 0 | 0 | 0 | 0 | 0 | 666 | 0 | 19 | 90 |
5e2b6e1969ce5954f3bdccfa6a100c966b6661fa | 1,246 | py | Python | imagedraw/imagedraw-paths.py | martinmcbride/python-imaging-book-examples | 37e4ccf9b7b2fc3ff75b1fdb9f772de452a843b2 | [
"MIT"
] | 1 | 2021-08-22T17:09:44.000Z | 2021-08-22T17:09:44.000Z | imagedraw/imagedraw-paths.py | sthagen/python-imaging-book-examples | 2a079c5271f9849bc90a33bed6f3288142035ea7 | [
"MIT"
] | null | null | null | imagedraw/imagedraw-paths.py | sthagen/python-imaging-book-examples | 2a079c5271f9849bc90a33bed6f3288142035ea7 | [
"MIT"
] | 1 | 2021-08-22T17:09:48.000Z | 2021-08-22T17:09:48.000Z | # Author: Martin McBride
# Created: 2021-07-07
# Copyright (C) 2021, Martin McBride
# License: MIT
# Draw paths with Pillow
from PIL import Image, ImageDraw, ImagePath
import math
count = 201
points = [curve(t) for t in range(0, count, 10)]
# Creating and drawing a path
image = Image.new('RGB', (400, 300), 'light... | 19.46875 | 59 | 0.685393 | # Author: Martin McBride
# Created: 2021-07-07
# Copyright (C) 2021, Martin McBride
# License: MIT
# Draw paths with Pillow
from PIL import Image, ImageDraw, ImagePath
import math
import random
count = 201
def curve(x):
y = (x-100)**2/100
return x, y
points = [curve(t) for t in range(0, count, 10)]
# Cre... | 0 | 0 | 0 | 0 | 0 | 87 | 0 | -8 | 67 |
a3fbe48071f7fc7c36317844d7f21651190631a2 | 408 | py | Python | bot.py | MrAsminaf/T-Rex_bot | 67c32323b8002308c53a7a7a3c0bcec8c814f1af | [
"MIT"
] | null | null | null | bot.py | MrAsminaf/T-Rex_bot | 67c32323b8002308c53a7a7a3c0bcec8c814f1af | [
"MIT"
] | null | null | null | bot.py | MrAsminaf/T-Rex_bot | 67c32323b8002308c53a7a7a3c0bcec8c814f1af | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 17.73913 | 41 | 0.64951 | import pyautogui
from PIL import ImageGrab, ImageOps
from numpy import *
def Jump():
pyautogui.keyDown('space')
def ImageSum():
box = [770, 380, 850, 450]
image = ImageGrab.grab(box)
grayImage = ImageOps.grayscale(image)
a = array(grayImage.getcolors())
print(a.sum())
return a.sum()
def main... | 0 | 0 | 0 | 0 | 0 | 230 | 0 | 7 | 135 |
95464089294a197e7aedeb9cdf44b80eb42724ab | 1,767 | py | Python | configs/system.py | microsoft/PARA | 966c7b8b170d935157adf944175d939bd15a4f16 | [
"MIT"
] | null | null | null | configs/system.py | microsoft/PARA | 966c7b8b170d935157adf944175d939bd15a4f16 | [
"MIT"
] | null | null | null | configs/system.py | microsoft/PARA | 966c7b8b170d935157adf944175d939bd15a4f16 | [
"MIT"
] | null | null | null | from collections import namedtuple
HOST = namedtuple('HOST', 'servers sockets channels DPC')
DRAM = namedtuple('DRAM', 'ranks bgroups banks')
'''
Datacenter of ICX servers: 100K, 2 sockets, 8 channels, 2DPC
Datacenter of ARM servers: 100K, 1 socket, 12 channels, 1DPC
Dual-socket ICX server: 1 node, 2 sockets, 8 chan... | 27.609375 | 106 | 0.633843 | from collections import namedtuple
HOST = namedtuple('HOST', 'servers sockets channels DPC')
DRAM = namedtuple('DRAM', 'ranks bgroups banks')
'''
Datacenter of ICX servers: 100K, 2 sockets, 8 channels, 2DPC
Datacenter of ARM servers: 100K, 1 socket, 12 channels, 1DPC
Dual-socket ICX server: 1 node, 2 sockets, 8 c... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 |
bcbc6b0f76417ebb6565d633ece1efa22a7779e9 | 3,095 | py | Python | computor.py | madvid/42_computorv1 | e7ed8bc5eee004fe166fac5d31ed261820e9cc23 | [
"MIT"
] | null | null | null | computor.py | madvid/42_computorv1 | e7ed8bc5eee004fe166fac5d31ed261820e9cc23 | [
"MIT"
] | null | null | null | computor.py | madvid/42_computorv1 | e7ed8bc5eee004fe166fac5d31ed261820e9cc23 | [
"MIT"
] | null | null | null | # =========================================================================== #
# ____________________ |Importation des lib/packages| ____________________ #
# =========================================================================== #
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import ... | 31.907216 | 82 | 0.541195 | # =========================================================================== #
# ____________________ |Importation des lib/packages| ____________________ #
# =========================================================================== #
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2a046ced552a6a2e47dcd643908579b1b9557da6 | 6,093 | py | Python | tmlib/lda/ldalearning.py | hncuong/topicmodel-lib | a14b065838c5ea996cc13b6454b8c051a2a87c9b | [
"MIT"
] | 3 | 2020-06-09T04:47:46.000Z | 2020-07-24T08:18:58.000Z | tmlib/lda/ldalearning.py | hncuong/topicmodel-lib | a14b065838c5ea996cc13b6454b8c051a2a87c9b | [
"MIT"
] | null | null | null | tmlib/lda/ldalearning.py | hncuong/topicmodel-lib | a14b065838c5ea996cc13b6454b8c051a2a87c9b | [
"MIT"
] | 1 | 2021-03-08T10:54:33.000Z | 2021-03-08T10:54:33.000Z | import sys, os
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..'))
import logging
FORMAT = "%(levelname)s> In %(module)s.%(funcName)s line %(lineno)d at %(asctime)-s> %(message)s"
logging.basicConfig(format=FORMAT, level=logging.INFO)
logger = logging.getLogger(__name__)
| 38.563291 | 125 | 0.617758 | import sys, os
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..'))
from tmlib.datasets import utilizies
from ldamodel import LdaModel
from tmlib.datasets.dataset import DataSet
import logging
FORMAT = "%(levelname)s> In %(module)s.%(funcName)s line %(lineno)d at %(asctime)-s> %(message)s"
logg... | 0 | 0 | 0 | 5,637 | 0 | 0 | 0 | 44 | 112 |
560d50f7122c78ed47967a0293dfc91bfcb446bb | 1,431 | py | Python | scripts/result2latex.py | jinzhao3611/Political_Stance_Prediction | b2314363e00a41836c5ae747ec29933601976736 | [
"MIT"
] | null | null | null | scripts/result2latex.py | jinzhao3611/Political_Stance_Prediction | b2314363e00a41836c5ae747ec29933601976736 | [
"MIT"
] | 3 | 2020-11-13T18:49:31.000Z | 2022-02-10T01:47:02.000Z | scripts/result2latex.py | jinzhao3611/Political_Stance_Prediction | b2314363e00a41836c5ae747ec29933601976736 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 31.108696 | 89 | 0.645003 | from os.path import join as pjoin
from os import listdir
import pandas as pd
from pandas import DataFrame
def get_best_performance(input_df: "DataFrame", binary: bool) -> "DataFrame":
line = input_df.iloc[input_df["micro_f"].argmax()]
if binary:
result = line[["micro_f", "Left-leaning_f", "Right-leani... | 0 | 0 | 0 | 0 | 0 | 1,213 | 0 | 18 | 157 |
e7963127091b0bc9639c98e29377d85410010087 | 472 | py | Python | webapp/home/templatetags/markdown.py | usegalaxy-au/galaxy-media-site | 3ec13e0f42591d2543768f252be037784933e271 | [
"MIT"
] | null | null | null | webapp/home/templatetags/markdown.py | usegalaxy-au/galaxy-media-site | 3ec13e0f42591d2543768f252be037784933e271 | [
"MIT"
] | 36 | 2021-11-14T21:34:22.000Z | 2022-03-24T22:46:42.000Z | webapp/home/templatetags/markdown.py | neoformit/galaxy-content-site | a6eeaf1893c12dd4d7d714fb823f43509a0a3893 | [
"MIT"
] | null | null | null | """Markdown rendering with python-markdown2.
https://github.com/trentm/python-markdown2
"""
from django import template
register = template.Library()
| 19.666667 | 44 | 0.616525 | """Markdown rendering with python-markdown2.
https://github.com/trentm/python-markdown2
"""
import markdown2
from django import template
register = template.Library()
@register.filter()
def markdown(md):
"""Render html from markdown string."""
if not md:
return ""
return markdown2.markdown(md, ... | 0 | 278 | 0 | 0 | 0 | 0 | 0 | -5 | 46 |
d8a0ae1f9e988d5c2cbccd32b851e5193e7800b0 | 491 | py | Python | meiduo_mall/meiduo_mall/apps/areas/urls.py | Zasling/meiduo_mall | c222b10588a9a5835ec7266b07019dc8b8ca7d65 | [
"MIT"
] | 1 | 2019-04-12T08:56:29.000Z | 2019-04-12T08:56:29.000Z | meiduo_mall/meiduo_mall/apps/areas/urls.py | Zasling/meiduo_mall | c222b10588a9a5835ec7266b07019dc8b8ca7d65 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/areas/urls.py | Zasling/meiduo_mall | c222b10588a9a5835ec7266b07019dc8b8ca7d65 | [
"MIT"
] | 1 | 2020-03-30T14:35:22.000Z | 2020-03-30T14:35:22.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^areas/$', views.AreasView.as_view()),
# ,{'pk':1300}
url(r'^areas/(?P<pk>\d+)/$', views.AreaView.as_view()),
url(r'^addresses/$', views.AddressView.as_view()),
url(r'^addresses/(?P<pk>\d+)/$', views.AddressView.as_view()),
... | 35.071429 | 75 | 0.631365 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^areas/$', views.AreasView.as_view()),
# 如果路由匹配成功,会生成一个字典数据{'pk':1300}
url(r'^areas/(?P<pk>\d+)/$', views.AreaView.as_view()),
url(r'^addresses/$', views.AddressView.as_view()),
url(r'^addresses/(?P<pk>\d+)/$', views.Address... | 51 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bcc97809bae5b3ef3ce33fa4847a57ad78a25213 | 3,903 | py | Python | silo/benchmarks/results/istc11-3-16-13.py | anshsarkar/TailBench | 25845756aee9a892229c25b681051591c94daafd | [
"MIT"
] | 274 | 2015-01-23T16:24:09.000Z | 2022-02-22T03:16:14.000Z | silo/benchmarks/results/istc11-3-16-13.py | anshsarkar/TailBench | 25845756aee9a892229c25b681051591c94daafd | [
"MIT"
] | 3 | 2015-03-17T11:52:36.000Z | 2019-07-22T23:04:25.000Z | silo/benchmarks/results/istc11-3-16-13.py | anshsarkar/TailBench | 25845756aee9a892229c25b681051591c94daafd | [
"MIT"
] | 94 | 2015-01-07T06:55:36.000Z | 2022-01-22T08:14:15.000Z | RESULTS = [({'scale_factor': 1000, 'threads': 1, 'txn_flags': 1, 'db': 'kvdb', 'bench': 'ycsb'}, (455923.0, 0.0)), ({'scale_factor': 1000, 'threads': 1, 'txn_flags': 1, 'db': 'ndb-proto2', 'bench': 'ycsb'}, (392189.0, 0.0)), ({'scale_factor': 4000, 'threads': 4, 'txn_flags': 1, 'db': 'kvdb', 'bench': 'ycsb'}, (1837830.... | 1,951.5 | 3,902 | 0.570074 | RESULTS = [({'scale_factor': 1000, 'threads': 1, 'txn_flags': 1, 'db': 'kvdb', 'bench': 'ycsb'}, (455923.0, 0.0)), ({'scale_factor': 1000, 'threads': 1, 'txn_flags': 1, 'db': 'ndb-proto2', 'bench': 'ycsb'}, (392189.0, 0.0)), ({'scale_factor': 4000, 'threads': 4, 'txn_flags': 1, 'db': 'kvdb', 'bench': 'ycsb'}, (1837830.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
461c5356a6924c335a6822c19302d8aca5bde7b0 | 546 | py | Python | src/plotSave.py | nik7273/computational-medical-knowledge | 03357fc63382bed49509d7860f87a3d010f03018 | [
"Apache-2.0"
] | null | null | null | src/plotSave.py | nik7273/computational-medical-knowledge | 03357fc63382bed49509d7860f87a3d010f03018 | [
"Apache-2.0"
] | null | null | null | src/plotSave.py | nik7273/computational-medical-knowledge | 03357fc63382bed49509d7860f87a3d010f03018 | [
"Apache-2.0"
] | 1 | 2019-09-17T18:38:44.000Z | 2019-09-17T18:38:44.000Z | # -*- coding: utf-8 -*-
"PLOTTING FILE"
| 26 | 91 | 0.692308 | # -*- coding: utf-8 -*-
"PLOTTING FILE"
import matplotlib.pyplot as plt
import Graphics as artist
def plot_and_save(frequencies, words, ylabel, savefile):
fig = plt.figure()
ax = fig.add_subplot(111)
ax.semilogy(frequencies,'k--',linewidth=3)
artist.adjust_spines(ax)
ax.set_xticks(xrange(len(wor... | 0 | 0 | 0 | 0 | 0 | 422 | 0 | 14 | 68 |
a8ccf99bf92775e812696b7aa7a676a37b4a0fa6 | 62,852 | py | Python | prmaya/scripts/prSelectionUi.py | parzival-roethlein/prmaya | 1a081ac859a97f9fbbbc91226441aa75a5449fea | [
"MIT"
] | 20 | 2018-09-03T05:50:09.000Z | 2021-03-27T11:42:38.000Z | prmaya/scripts/prSelectionUi.py | parzival-roethlein/prmaya | 1a081ac859a97f9fbbbc91226441aa75a5449fea | [
"MIT"
] | null | null | null | prmaya/scripts/prSelectionUi.py | parzival-roethlein/prmaya | 1a081ac859a97f9fbbbc91226441aa75a5449fea | [
"MIT"
] | 4 | 2018-09-14T02:06:47.000Z | 2020-01-28T15:14:39.000Z | """
# SOURCE
https://gum.co/prselectionui
https://github.com/parzival-roethlein/prmaya
# DESCRIPTION
A dynamic User Interface (UI) to manage selections and poses in Autodesk Maya.
# USAGE
Put the file prSelectionUi.py in your Maya scripts folder and execute:
- Python:
import prSelectionUi;prSelectionUi.UI()
- MEL (fo... | 40.084184 | 179 | 0.592344 | """
# SOURCE
https://gum.co/prselectionui
https://github.com/parzival-roethlein/prmaya
# DESCRIPTION
A dynamic User Interface (UI) to manage selections and poses in Autodesk Maya.
# USAGE
Put the file prSelectionUi.py in your Maya scripts folder and execute:
- Python:
import prSelectionUi;prSelectionUi.UI()
- MEL (fo... | 0 | 2,009 | 0 | 56,899 | 0 | 0 | 0 | 2 | 183 |
6d054b1471d4e47cd65d6f2c1c0ade33fa15e499 | 2,424 | py | Python | authApp/types/UserType.py | Alex-Bruno/steller-web | 9dba1766989f9aaf165a26434dda40cf5c5cc409 | [
"MIT"
] | null | null | null | authApp/types/UserType.py | Alex-Bruno/steller-web | 9dba1766989f9aaf165a26434dda40cf5c5cc409 | [
"MIT"
] | null | null | null | authApp/types/UserType.py | Alex-Bruno/steller-web | 9dba1766989f9aaf165a26434dda40cf5c5cc409 | [
"MIT"
] | null | null | null | #
#
| 31.076923 | 245 | 0.614274 | from django.contrib.auth.models import Group
from django.contrib.auth.forms import UserCreationForm, UserCreationForm, UserChangeForm
from django import forms
#
from authApp.models import User
#
class FilterUserForm(forms.Form):
name = forms.CharField(
widget=forms.TextInput(
attrs={
... | 28 | 0 | 0 | 2,145 | 0 | 0 | 0 | 103 | 156 |
dfa24d2d396a057ad4abd3fca908278d7a8726ed | 2,432 | py | Python | dia-proc.py | kwoodham/sublime | ed3dcd7b0a22938d1d7de2d55db3cc2960ed117f | [
"CC-BY-4.0"
] | 1 | 2015-08-04T11:43:34.000Z | 2015-08-04T11:43:34.000Z | dia-proc.py | kwoodham/sublime | ed3dcd7b0a22938d1d7de2d55db3cc2960ed117f | [
"CC-BY-4.0"
] | null | null | null | dia-proc.py | kwoodham/sublime | ed3dcd7b0a22938d1d7de2d55db3cc2960ed117f | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/python3
import subprocess
import sys
import re
import textwrap
P = []
P.append(['<lb type="x-begin-paragraph"/>', ''])
P.append(['<lb type="x-end-paragraph"/>', '\\'])
P.append(['<q marker="">', ''])
P.append(['</q>', ''])
P.append(['<milestone marker="“" type="cQuote"/>', '"'])
P.append(['<milestone... | 28.27907 | 81 | 0.559622 | #!/usr/bin/python3
import subprocess
import sys
import re
import textwrap
P = []
P.append(['<lb type="x-begin-paragraph"/>', ''])
P.append(['<lb type="x-end-paragraph"/>', '\\'])
P.append(['<q marker="">', ''])
P.append(['</q>', ''])
P.append(['<milestone marker="“" type="cQuote"/>', '"'])
P.append(['<milestone... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e6cfb40a7909a858375c17997ee8066614cf094f | 577 | py | Python | tests/data_for_tests.py | Eldenwyre/DataMiningLib | 9b6d8c8c322faf23e5c72320160e2749c939c4ca | [
"MIT"
] | null | null | null | tests/data_for_tests.py | Eldenwyre/DataMiningLib | 9b6d8c8c322faf23e5c72320160e2749c939c4ca | [
"MIT"
] | null | null | null | tests/data_for_tests.py | Eldenwyre/DataMiningLib | 9b6d8c8c322faf23e5c72320160e2749c939c4ca | [
"MIT"
] | null | null | null | import numpy as np
# Num entries per column
DATA_LENGTH = 10
# Data for tests in datamining lib
data = {
"dates": [
"01/17/2000",
"January 17, 2000",
"Jan 17, 2000",
"17 Jan 2000",
"17 January 2000",
"01-17-2000",
"January 17th 2000",
"17-01-2000",
... | 24.041667 | 74 | 0.464471 | import numpy as np
# Num entries per column
DATA_LENGTH = 10
# Data for tests in datamining lib
data = {
"dates": [
"01/17/2000",
"January 17, 2000",
"Jan 17, 2000",
"17 Jan 2000",
"17 January 2000",
"01-17-2000",
"January 17th 2000",
"17-01-2000",
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4ba1b4fa6ac22800fb173161a2a0825382d61b72 | 2,361 | py | Python | pacote download/aula10.py | henrique-maceira/estudos-em-python-3 | aae9ab3df35034444497d13c1c8d7f9ea2c4b2ab | [
"MIT"
] | null | null | null | pacote download/aula10.py | henrique-maceira/estudos-em-python-3 | aae9ab3df35034444497d13c1c8d7f9ea2c4b2ab | [
"MIT"
] | null | null | null | pacote download/aula10.py | henrique-maceira/estudos-em-python-3 | aae9ab3df35034444497d13c1c8d7f9ea2c4b2ab | [
"MIT"
] | null | null | null | import random
#===exerccio 01===
num= int(input("Seu palpite:"))
sor= random.randint(1,5)
if (num == sor):
print("O nmero sorteado foi {}.\nVoc o bicho mesmo hein".format(sor))
else:
print("O nmero sorteado foi {}.\nTente novamente".format(sor))
#===exerccio02===
vel= float(input("velocidade do automvel: "))
... | 32.791667 | 105 | 0.618806 | import random
#===exercício 01===
num= int(input("Seu palpite:"))
sor= random.randint(1,5)
if (num == sor):
print("O número sorteado foi {}.\nVocê é o bichão mesmo hein".format(sor))
else:
print("O número sorteado foi {}.\nTente novamente".format(sor))
#===exercício02===
vel= float(input("velocidade do automóv... | 106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
49cd42d8558d45b7810a4b458b53bd6ffc27d481 | 5,624 | py | Python | xsdata/formats/dataclass/parsers/mixins.py | pashashocky/xsdata | 1cd681598d2235626d0e21716fc9fb885d26e351 | [
"MIT"
] | null | null | null | xsdata/formats/dataclass/parsers/mixins.py | pashashocky/xsdata | 1cd681598d2235626d0e21716fc9fb885d26e351 | [
"MIT"
] | null | null | null | xsdata/formats/dataclass/parsers/mixins.py | pashashocky/xsdata | 1cd681598d2235626d0e21716fc9fb885d26e351 | [
"MIT"
] | null | null | null | from typing import Optional
NoneStr = Optional[str]
| 29.445026 | 87 | 0.607219 | import abc
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple
from typing import Type
from xsdata.exceptions import XmlHandlerError
from xsdata.formats.bindings import AbstractParser
from xsdata.formats.dataclass.parsers.config import ParserConfi... | 0 | 1,735 | 0 | 3,404 | 0 | 0 | 0 | 115 | 313 |
07d3c56c661508aceb7614458b915275d98c79f3 | 984 | py | Python | scripts/process_surface_data.py | NCAR/mlsurfacelayer | 762d2fe43c9da23fe3779057bfc5d4d3871b2f47 | [
"MIT"
] | 1 | 2022-02-16T01:16:55.000Z | 2022-02-16T01:16:55.000Z | scripts/process_surface_data.py | NCAR/mlsurfacelayer | 762d2fe43c9da23fe3779057bfc5d4d3871b2f47 | [
"MIT"
] | null | null | null | scripts/process_surface_data.py | NCAR/mlsurfacelayer | 762d2fe43c9da23fe3779057bfc5d4d3871b2f47 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
if __name__ == "__main__":
main() | 46.857143 | 130 | 0.705285 | #!/usr/bin/env python
import argparse
from mlsurfacelayer.data import process_cabauw_data
from mlsurfacelayer.data import process_idaho_data
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input", help="Input data path.")
parser.add_argument("-s", "--site", default="cabauw", hel... | 0 | 0 | 0 | 0 | 0 | 782 | 0 | 53 | 89 |
a479f4d71c6326cce26fad23ae885287ea3ce629 | 3,890 | py | Python | daily_fantasy_sports_models/draft_kings/nba/models/contests/salary_cap/classic/lineup.py | jaebradley/daily_fantasy_sports_models | a8a4b6296badabe116aaf49e89aa53ab8d75853a | [
"MIT"
] | 2 | 2021-09-06T06:52:48.000Z | 2021-09-09T23:34:07.000Z | daily_fantasy_sports_models/draft_kings/nba/models/contests/salary_cap/classic/lineup.py | jaebradley/daily_fantasy_sports_models | a8a4b6296badabe116aaf49e89aa53ab8d75853a | [
"MIT"
] | 4 | 2021-09-06T16:23:07.000Z | 2021-09-16T18:46:21.000Z | daily_fantasy_sports_models/draft_kings/nba/models/contests/salary_cap/classic/lineup.py | jaebradley/daily_fantasy_sports_models | a8a4b6296badabe116aaf49e89aa53ab8d75853a | [
"MIT"
] | null | null | null | from daily_fantasy_sports_models.draft_kings.nba.models.contests.salary_cap.player_pool.player import Player \
as PlayerPoolPlayer
# "Lineups...must include players from at least 2 different NBA games"
# "a valid lineup must not exceed the salary cap of $50,000"
# https://www.draftkings.com/help/rules/4
# ... | 30.629921 | 110 | 0.661954 | from dataclasses import dataclass
from daily_fantasy_sports_models.core.sets import is_disjoint
from daily_fantasy_sports_models.draft_kings.nba.models.contests.salary_cap.player_pool.player import Player \
as PlayerPoolPlayer
from daily_fantasy_sports_models.draft_kings.nba.models.core.position import Position
... | 0 | 2,747 | 0 | 195 | 0 | 0 | 0 | 116 | 202 |
6f2b969076b332b37990f3fbb47651ae60f9885a | 481 | py | Python | python/sdss_install/install4/__init__.py | sdss/sdss_install | f641c158877b827ccd519c5b5bafce76ecda2ec7 | [
"BSD-3-Clause"
] | 3 | 2019-06-28T18:45:01.000Z | 2020-07-19T03:38:51.000Z | python/sdss_install/install4/__init__.py | sdss/sdss_install | f641c158877b827ccd519c5b5bafce76ecda2ec7 | [
"BSD-3-Clause"
] | 49 | 2018-09-29T01:03:25.000Z | 2020-05-12T15:54:55.000Z | python/sdss_install/install4/__init__.py | sdss/sdss_install | f641c158877b827ccd519c5b5bafce76ecda2ec7 | [
"BSD-3-Clause"
] | 1 | 2019-04-29T16:14:57.000Z | 2019-04-29T16:14:57.000Z | # License information goes here
# -*- coding: utf-8 -*-
"""
======================
sdss_install.install4
======================
This package contains code for installing SDSS-IV software products.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# The line above will help with 2to... | 26.722222 | 82 | 0.727651 | # License information goes here
# -*- coding: utf-8 -*-
"""
======================
sdss_install.install4
======================
This package contains code for installing SDSS-IV software products.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# The line above will help with 2to... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 89 |
6494ae361f944ae3cf8153562be41369a5001385 | 17,382 | py | Python | caffe2/python/tutorials/py_gen/CIFAR10_Part2.py | inkawhich/caffe2 | 411c52c3945c9f0b46a11730175986a75c9f39be | [
"Apache-2.0"
] | 6 | 2016-09-28T18:51:21.000Z | 2019-04-01T04:42:08.000Z | caffe2/python/tutorials/py_gen/CIFAR10_Part2.py | inkawhich/caffe2 | 411c52c3945c9f0b46a11730175986a75c9f39be | [
"Apache-2.0"
] | null | null | null | caffe2/python/tutorials/py_gen/CIFAR10_Part2.py | inkawhich/caffe2 | 411c52c3945c9f0b46a11730175986a75c9f39be | [
"Apache-2.0"
] | 1 | 2017-11-09T21:53:57.000Z | 2017-11-09T21:53:57.000Z | #########################################################
#
# DO NOT EDIT THIS FILE. IT IS GENERATED AUTOMATICALLY. #
# PLEASE LOOK INTO THE README FOR MORE INFORMATION. #
#
#########################################################
# coding: utf-8
# # CIFAR-10: Part 2
#
# Welcome back! If you have not completed... | 44.116751 | 924 | 0.729375 | #########################################################
#
# DO NOT EDIT THIS FILE. IT IS GENERATED AUTOMATICALLY. #
# PLEASE LOOK INTO THE README FOR MORE INFORMATION. #
#
#########################################################
# coding: utf-8
# # CIFAR-10: Part 2
#
# Welcome back! If you have not completed... | 0 | 0 | 0 | 0 | 0 | 2,475 | 0 | 62 | 135 |
0b6352e2d5b21f0f5e779876f61a8b06830704b5 | 6,080 | py | Python | autocomplete_light/autocomplete/model.py | kimetrica/django-autocomplete-light | be516741fc1072615f376d1459ce5ad7ecec1bbe | [
"MIT"
] | null | null | null | autocomplete_light/autocomplete/model.py | kimetrica/django-autocomplete-light | be516741fc1072615f376d1459ce5ad7ecec1bbe | [
"MIT"
] | 2 | 2021-03-31T18:52:30.000Z | 2021-12-13T19:50:13.000Z | autocomplete_light/autocomplete/model.py | kimetrica/django-autocomplete-light | be516741fc1072615f376d1459ce5ad7ecec1bbe | [
"MIT"
] | null | null | null |
__all__ = ('AutocompleteModel', )
| 34.942529 | 78 | 0.604441 | from django.db.models import Q
from django.utils.encoding import force_text
from django.db import connection
from ..settings import DEFAULT_SEARCH_FIELDS
__all__ = ('AutocompleteModel', )
class AutocompleteModel(object):
"""Autocomplete which considers choices as a queryset.
.. py:attribute:: choices
... | 0 | 0 | 0 | 5,866 | 0 | 0 | 0 | 66 | 112 |
bfca2924dfa23f55a89a549dc298d93f78d763e6 | 876 | py | Python | process_mmsdk/scratch.py | e-remington-lee/record_video | e33d9ab91e1194da3c94286344c309debd57dc02 | [
"Apache-2.0"
] | 2 | 2021-08-24T03:26:44.000Z | 2022-02-07T12:52:43.000Z | process_mmsdk/scratch.py | e-remington-lee/record_video | e33d9ab91e1194da3c94286344c309debd57dc02 | [
"Apache-2.0"
] | null | null | null | process_mmsdk/scratch.py | e-remington-lee/record_video | e33d9ab91e1194da3c94286344c309debd57dc02 | [
"Apache-2.0"
] | null | null | null | import csv
with open("process_mmsdk/mosei_dataset_int.csv", "r") as rf:
csvreader = csv.reader(rf)
next(csvreader)
with open("process_mmsdk/no_sentiment.csv", "w", newline="") as wf:
csvwriter = csv.writer(wf)
headers = ["video_name_segment", "happy", "sad", "anger", "surprise", "disgust",... | 27.375 | 96 | 0.552511 | import csv
def convert(number):
if number == -3:
return 0
elif number == -2:
return 1
elif number == -1:
return 2
elif number == 0:
return 3
elif number == 1:
return 4
elif number == 2:
return 5
elif number == 3:
return 6
with open("... | 0 | 0 | 0 | 0 | 0 | 273 | 0 | 0 | 23 |
359fcf75770aab11cd37a0cafccb991868d37351 | 384 | py | Python | tictactoe/gameplay/migrations/0002_move_status.py | saumil-jain/tictactoe | 8fa9996dcbedc274e43571ab8c1849431175bb48 | [
"MIT"
] | null | null | null | tictactoe/gameplay/migrations/0002_move_status.py | saumil-jain/tictactoe | 8fa9996dcbedc274e43571ab8c1849431175bb48 | [
"MIT"
] | null | null | null | tictactoe/gameplay/migrations/0002_move_status.py | saumil-jain/tictactoe | 8fa9996dcbedc274e43571ab8c1849431175bb48 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.1 on 2018-01-18 09:06
| 20.210526 | 62 | 0.583333 | # Generated by Django 2.0.1 on 2018-01-18 09:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gameplay', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='move',
name='status',
fiel... | 0 | 0 | 0 | 270 | 0 | 0 | 0 | 19 | 46 |
37fbf0176f31031373e2246d455eb1b5a7e27604 | 1,157 | py | Python | proj/celery.py | iandmyhand/python-tester | b4fa2bd2706f3fb516388c9866e86fb7a1a9dfa4 | [
"MIT"
] | 1 | 2015-03-30T08:35:57.000Z | 2015-03-30T08:35:57.000Z | proj/celery.py | iandmyhand/python-tester | b4fa2bd2706f3fb516388c9866e86fb7a1a9dfa4 | [
"MIT"
] | null | null | null | proj/celery.py | iandmyhand/python-tester | b4fa2bd2706f3fb516388c9866e86fb7a1a9dfa4 | [
"MIT"
] | null | null | null | # celery.py
"""
Using SQS queue & MySQL result
pip install https://github.com/celery/vine/zipball/master#egg=vine
pip install https://github.com/celery/kombu/zipball/master#egg=kombu
pip install https://github.com/celery/py-amqp/zipball/master#egg=amqp
pip install https://github.com/celery/billiard/zipball/master#egg=b... | 33.057143 | 193 | 0.766638 | # celery.py
"""
Using SQS queue & MySQL result
pip install https://github.com/celery/vine/zipball/master#egg=vine
pip install https://github.com/celery/kombu/zipball/master#egg=kombu
pip install https://github.com/celery/py-amqp/zipball/master#egg=amqp
pip install https://github.com/celery/billiard/zipball/master#egg=b... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
124a97546aee25d8cb33592bda48b40675ae2148 | 1,746 | py | Python | beginner/list_comprehension.py | chaudha4/python-projects | baba3235069b7d6b084f28904f0662c043762175 | [
"MIT"
] | null | null | null | beginner/list_comprehension.py | chaudha4/python-projects | baba3235069b7d6b084f28904f0662c043762175 | [
"MIT"
] | 3 | 2021-11-23T22:19:19.000Z | 2022-03-12T00:52:34.000Z | beginner/list_comprehension.py | chaudha4/python-projects | baba3235069b7d6b084f28904f0662c043762175 | [
"MIT"
] | null | null | null | print(f"\n{'*' * 50}")
# Example 1 - Using Square function
print(f'Square of 5 is {square(5)}')
lst = [1, 2, -5, 4]
# Apply the square function to each element in the list - Using For loop
rslt = list() # Or rslt = []
for ii in lst:
rslt.append(square(ii))
print("Example 1 - Using Loop", rslt)
# Apply the squ... | 23.917808 | 122 | 0.647766 | print(f"\n{'*' * 50}")
# Example 1 - Using Square function
def square(x):
return x * x
print(f'Square of 5 is {square(5)}')
lst = [1, 2, -5, 4]
# Apply the square function to each element in the list - Using For loop
rslt = list() # Or rslt = []
for ii in lst:
rslt.append(square(ii))
print("Example 1 - Us... | 0 | 0 | 0 | 0 | 0 | 357 | 0 | 0 | 92 |
7624c99f5046ec6bade9801e681ca29d30676e73 | 154 | py | Python | spotify/credentials.py | andeen171/Django-React-Spotify-Controller | 4dd6095b110cb8bc4f3bd516916768ef85efe77f | [
"Unlicense"
] | 2 | 2021-10-19T17:29:04.000Z | 2021-10-19T17:29:30.000Z | spotify/credentials.py | andeen171/Django-React-Spotify-Controller | 4dd6095b110cb8bc4f3bd516916768ef85efe77f | [
"Unlicense"
] | null | null | null | spotify/credentials.py | andeen171/Django-React-Spotify-Controller | 4dd6095b110cb8bc4f3bd516916768ef85efe77f | [
"Unlicense"
] | null | null | null | CLIENT_ID = "9ecf1e52d5034f01ac8fce5378decd00"
CLIENT_SECRET = "519c44e4a4764c208327e9ba8059f2fd"
REDIRECT_URI = "http://localhost:8000/spotify/redirect"
| 38.5 | 55 | 0.844156 | CLIENT_ID = "9ecf1e52d5034f01ac8fce5378decd00"
CLIENT_SECRET = "519c44e4a4764c208327e9ba8059f2fd"
REDIRECT_URI = "http://localhost:8000/spotify/redirect"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dc72d3b656ad82c0b39743974c04ad15fe6f5147 | 1,749 | py | Python | tests/functions_tests/baseline_test.py | camilorey/signals_package | fe28fe9b4f791a951fb5249ab0da5efbcd54fd5c | [
"MIT"
] | 1 | 2022-01-03T19:39:45.000Z | 2022-01-03T19:39:45.000Z | tests/functions_tests/baseline_test.py | camilorey/signals_package | fe28fe9b4f791a951fb5249ab0da5efbcd54fd5c | [
"MIT"
] | null | null | null | tests/functions_tests/baseline_test.py | camilorey/signals_package | fe28fe9b4f791a951fb5249ab0da5efbcd54fd5c | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main() | 39.75 | 96 | 0.630646 | import unittest
import math
from signals.functions.baseline import BaseLine
class BaselineTest(unittest.TestCase):
def test_functionDefaultCreate(self):
base_test = BaseLine()
base_dict = {'_amplitude':0,'_period':0,'_phase':0,'_translation':0}
self.assertEqual(base_test.__dict__,base_dict... | 0 | 0 | 0 | 1,603 | 0 | 0 | 0 | 16 | 67 |
534946893723d7de3f6da0b0488112b9d1e42172 | 2,581 | py | Python | adlibre_dms/apps/mdtui/templatetags/mui_permissions.py | adlibre/Adlibre-DMS | 96ce41b5699e2ea58e3ca560d46d481e954f17a4 | [
"BSD-3-Clause"
] | 48 | 2015-02-25T03:20:35.000Z | 2022-03-11T09:02:42.000Z | adlibre_dms/apps/mdtui/templatetags/mui_permissions.py | adlibre/Adlibre-DMS | 96ce41b5699e2ea58e3ca560d46d481e954f17a4 | [
"BSD-3-Clause"
] | 6 | 2015-01-09T08:30:53.000Z | 2016-12-05T15:03:01.000Z | adlibre_dms/apps/mdtui/templatetags/mui_permissions.py | adlibre/Adlibre-DMS | 96ce41b5699e2ea58e3ca560d46d481e954f17a4 | [
"BSD-3-Clause"
] | 24 | 2015-01-15T11:41:40.000Z | 2022-03-17T20:31:06.000Z | """
Module: Permissions for templates rendering helpers for MDTUI
Project: Adlibre DMS
Copyright: Adlibre Pty Ltd 2012
License: See LICENSE for license information
Author: Iurii Garmash
"""
from django import template
register = template.Library()
| 30.011628 | 68 | 0.672608 | """
Module: Permissions for templates rendering helpers for MDTUI
Project: Adlibre DMS
Copyright: Adlibre Pty Ltd 2012
License: See LICENSE for license information
Author: Iurii Garmash
"""
from django import template
from mdtui.security import SEC_GROUP_NAMES
register = template.Library()
@register.simple_tag(take... | 0 | 2,218 | 0 | 0 | 0 | 0 | 0 | 21 | 91 |
cb8357256ca5927438e0d4939592bbeb67f49e8b | 6,758 | py | Python | datageneration/main_part2.py | phivision/surreal | 61f56db4c840013497eef4c3954d1112c1c1acec | [
"MIT-CMU",
"OLDAP-2.2.1"
] | null | null | null | datageneration/main_part2.py | phivision/surreal | 61f56db4c840013497eef4c3954d1112c1c1acec | [
"MIT-CMU",
"OLDAP-2.2.1"
] | null | null | null | datageneration/main_part2.py | phivision/surreal | 61f56db4c840013497eef4c3954d1112c1c1acec | [
"MIT-CMU",
"OLDAP-2.2.1"
] | null | null | null | import sys
import os
from os.path import join
import numpy as np
import time
start_time = None
if __name__ == '__main__':
# time logging
#global start_time
start_time = time.time()
from pickle import load
import argparse
# parse commandline arguments
log_message(sys.argv)
... | 39.290698 | 166 | 0.60654 | import sys
import os
from os import remove
from os.path import join, dirname, realpath, exists
import numpy as np
def load_body_data(smpl_data, idx=0):
cmu_keys = []
for seq in smpl_data.files:
if seq.startswith('pose_'):
cmu_keys.append(seq.replace('pose_', ''))
name = sorted(cmu... | 0 | 0 | 0 | 0 | 0 | 605 | 0 | 27 | 67 |
a7f2103ef315fd3e1285381b39b6d16d9f69b77d | 8,369 | py | Python | places/add_test_places.py | samargulies/welp | 8ed292c392885840787752f86d0aa8f538da5465 | [
"MIT"
] | null | null | null | places/add_test_places.py | samargulies/welp | 8ed292c392885840787752f86d0aa8f538da5465 | [
"MIT"
] | 7 | 2020-06-05T18:14:31.000Z | 2022-03-11T23:20:50.000Z | places/add_test_places.py | samargulies/welp | 8ed292c392885840787752f86d0aa8f538da5465 | [
"MIT"
] | null | null | null |
min_x = -74.8
max_x = -75.2
min_y = 39.7
max_y = 40.2
objects = [
"CD",
"Christmas ornament",
"acorn",
"apple",
"bag",
"bag of cotton balls",
"bag of popcorn",
"bag of rubber bands",
"ball of yarn",
"balloon",
"banana",
"bananas",
"bandana",
"bangle bracelet",
... | 17.806383 | 74 | 0.509738 | from .models import Place
from django.contrib.gis.geos import Point
import random
min_x = -74.8
max_x = -75.2
min_y = 39.7
max_y = 40.2
objects = [
"CD",
"Christmas ornament",
"acorn",
"apple",
"bag",
"bag of cotton balls",
"bag of popcorn",
"bag of rubber bands",
"ball of yarn",
... | 0 | 0 | 0 | 0 | 0 | 395 | 0 | 16 | 89 |