hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a0fd8510182cf81512b0f5b6e68cf53699718c2 | 383 | py | Python | apps/dataupload/admin.py | Sunbird-Ed/evolve-api | 371b39422839762e32401340456c13858cb8e1e9 | [
"MIT"
] | 1 | 2019-02-27T15:26:11.000Z | 2019-02-27T15:26:11.000Z | apps/dataupload/admin.py | Sunbird-Ed/evolve-api | 371b39422839762e32401340456c13858cb8e1e9 | [
"MIT"
] | 9 | 2019-12-16T10:09:46.000Z | 2022-03-11T23:42:12.000Z | apps/dataupload/admin.py | Sunbird-Ed/evolve-api | 371b39422839762e32401340456c13858cb8e1e9 | [
"MIT"
] | null | null | null | from django.contrib import admin
from . models import Chapter, Section, SubSection,ChapterKeyword,SectionKeyword,SubSectionKeyword,SubSubSection
admin.site.register(Chapter)
admin.site.register(Section)
admin.site.register(SubSection)
admin.site.register(ChapterKeyword)
admin.site.register(SectionKeyword)
admin.site.... | 31.916667 | 111 | 0.853786 |
4a0fd8db3cac4fe3b47ff388b2b68793abc42e00 | 1,682 | py | Python | crawler/archiveCrawler.py | jahanzebk/python-text-classifier | 577c076f400e140aa2df895aafb177dd796a42d1 | [
"MIT"
] | null | null | null | crawler/archiveCrawler.py | jahanzebk/python-text-classifier | 577c076f400e140aa2df895aafb177dd796a42d1 | [
"MIT"
] | null | null | null | crawler/archiveCrawler.py | jahanzebk/python-text-classifier | 577c076f400e140aa2df895aafb177dd796a42d1 | [
"MIT"
] | null | null | null | # from readability.readability import Document
import urllib2
import re
import time
import os
from bs4 import BeautifulSoup
#NOTE: this is in python 2.7 and is the working version
#This file only needed to run once to crawl the archives for links
def writeToFile(link):
#category = link.split('/')[3] # CATEGORY N... | 31.148148 | 137 | 0.583234 |
4a0fd94ee2ebbeb1310384209960a81ad52fb798 | 659 | py | Python | libcloudforensics/__init__.py | juju4/cloud-forensics-utils | 7bd4038e906c0e854d5b7b33d087239522ccd246 | [
"Apache-2.0"
] | 241 | 2020-02-08T20:05:54.000Z | 2022-03-31T23:51:30.000Z | libcloudforensics/__init__.py | juju4/cloud-forensics-utils | 7bd4038e906c0e854d5b7b33d087239522ccd246 | [
"Apache-2.0"
] | 376 | 2020-02-05T10:22:54.000Z | 2022-03-30T00:09:18.000Z | libcloudforensics/__init__.py | juju4/cloud-forensics-utils | 7bd4038e906c0e854d5b7b33d087239522ccd246 | [
"Apache-2.0"
] | 72 | 2020-02-06T07:34:30.000Z | 2022-03-05T18:02:13.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google 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 ... | 36.611111 | 74 | 0.743551 |
4a0fd9a56169e4e63e40fb1ee7d517cd69e13aea | 5,541 | py | Python | game/load_node_data.py | Muthaias/global-explorer | 38645a7ced2a1614f8d09b01986f4c0bf9cf2e0d | [
"MIT"
] | 1 | 2020-11-18T03:12:51.000Z | 2020-11-18T03:12:51.000Z | game/load_node_data.py | Muthaias/global-explorer | 38645a7ced2a1614f8d09b01986f4c0bf9cf2e0d | [
"MIT"
] | null | null | null | game/load_node_data.py | Muthaias/global-explorer | 38645a7ced2a1614f8d09b01986f4c0bf9cf2e0d | [
"MIT"
] | null | null | null | import yaml
import random
from collections import ChainMap
from .descriptors import NodeDescriptor, ActionDescriptor
from .game import Node, Action
from .actions import (
step_into,
combine_actions,
add_trace,
step_out,
step,
pass_time,
charge_card,
select_by_tags,
add_skill,
tra... | 27.705 | 73 | 0.557661 |
4a0fda44970b731dcddc4b1d403dc14936d0cafa | 298 | py | Python | regtests/c++/classmethod.py | ahakingdom/Rusthon | 5b6b78111b62281cd1381e53362c5d4b520ade30 | [
"BSD-3-Clause"
] | 622 | 2015-01-01T14:53:51.000Z | 2022-03-27T14:52:25.000Z | regtests/c++/classmethod.py | ahakingdom/Rusthon | 5b6b78111b62281cd1381e53362c5d4b520ade30 | [
"BSD-3-Clause"
] | 74 | 2015-01-05T01:24:09.000Z | 2021-04-26T00:06:38.000Z | regtests/c++/classmethod.py | ahakingdom/Rusthon | 5b6b78111b62281cd1381e53362c5d4b520ade30 | [
"BSD-3-Clause"
] | 67 | 2015-01-18T22:54:54.000Z | 2022-03-01T12:54:23.000Z | '''
class methods
'''
class A:
def __init__(self, x:int, y:int):
self.x = x
self.y = y
@classmethod
def foo(self):
print('my classmethod')
@classmethod
def bar(self, a:int) ->int:
return a+1000
def main():
x = A(1,2)
x.foo()
A.foo()
print x.bar( 100 )
y = A.bar(200)
print(y)
| 12.416667 | 34 | 0.590604 |
4a0fda8059b2740c74828f0d23d888655e363bb8 | 17,575 | py | Python | glance/common/exception.py | hmakkapati/glance | 9d6e89da2f1c001cb01b6bc6d38b5e098de92ccf | [
"Apache-2.0"
] | null | null | null | glance/common/exception.py | hmakkapati/glance | 9d6e89da2f1c001cb01b6bc6d38b5e098de92ccf | [
"Apache-2.0"
] | null | null | null | glance/common/exception.py | hmakkapati/glance | 9d6e89da2f1c001cb01b6bc6d38b5e098de92ccf | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# 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 ... | 31.383929 | 79 | 0.689331 |
4a0fdb3de9430e7e755b8253ddb7801bb34288bf | 2,696 | py | Python | app/tests/exo_currency/test_commands.py | jcazallasc/exo-investing | c32900dd2fd426a15f3b02389d75b51427e5df66 | [
"MIT"
] | null | null | null | app/tests/exo_currency/test_commands.py | jcazallasc/exo-investing | c32900dd2fd426a15f3b02389d75b51427e5df66 | [
"MIT"
] | null | null | null | app/tests/exo_currency/test_commands.py | jcazallasc/exo-investing | c32900dd2fd426a15f3b02389d75b51427e5df66 | [
"MIT"
] | null | null | null | import csv
from unittest.mock import patch
from django.core.management import call_command
from django.test import TestCase
from exo_currency.models import Currency, CurrencyExchangeRate, Provider
from exo_currency.utils import CURRENCY_EXCHANGER_PROVIDERS
class CommandsTestCase(TestCase):
def _get_num_lines_f... | 31.717647 | 88 | 0.714021 |
4a0fdbda8ca018d1ccbaef2d1222e7316ca1f2b9 | 5,212 | py | Python | tests/settings.py | danielmcquillen/django-machina | 08aa3a58a7889b0d5a5bcd6c24965c524762c7a6 | [
"BSD-3-Clause"
] | null | null | null | tests/settings.py | danielmcquillen/django-machina | 08aa3a58a7889b0d5a5bcd6c24965c524762c7a6 | [
"BSD-3-Clause"
] | 2 | 2021-06-02T00:29:11.000Z | 2021-09-01T23:02:30.000Z | tests/settings.py | danielmcquillen/django-machina | 08aa3a58a7889b0d5a5bcd6c24965c524762c7a6 | [
"BSD-3-Clause"
] | null | null | null | import os
from django import VERSION as DJANGO_VERSION
from machina import MACHINA_MAIN_STATIC_DIR, MACHINA_MAIN_TEMPLATE_DIR
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return 'nomigrations'
TEST_ROOT = os.path.abspath(os.path.d... | 28.79558 | 79 | 0.640445 |
4a0fdbfe4bd90eaf6070566ae89dab780049f092 | 1,493 | py | Python | javatool/search.py | tengge1/javatool | 44caa18b4b4c0222fe3ed629c88f17627013cf78 | [
"Apache-2.0"
] | 2 | 2017-04-10T14:04:12.000Z | 2020-08-16T04:07:15.000Z | javatool/search.py | tengge1/javatool | 44caa18b4b4c0222fe3ed629c88f17627013cf78 | [
"Apache-2.0"
] | null | null | null | javatool/search.py | tengge1/javatool | 44caa18b4b4c0222fe3ed629c88f17627013cf78 | [
"Apache-2.0"
] | null | null | null | import appuifw,os
class Search(object):
def __init__(self,super):
self.cn=super.cn
self.manager=super.manager
self.add=super.add
self.result=[]
self.index=appuifw.popup_menu([self.cn("Utf8编码"),self.cn("十六进制")])
if self.index!=None:
self.path=self... | 33.931818 | 75 | 0.45211 |
4a0fdc481c5a936d2863ba60f31ce7a87ac8d13b | 2,576 | py | Python | exampdftomindmap.py | synsandacks/CiscoExamPDFtoMindmap | fff0a10bcf18a2a2075e770b2305b038b1375de4 | [
"MIT"
] | 1 | 2022-02-10T09:31:50.000Z | 2022-02-10T09:31:50.000Z | exampdftomindmap.py | synsandacks/CiscoExamPDFtoMindmap | fff0a10bcf18a2a2075e770b2305b038b1375de4 | [
"MIT"
] | null | null | null | exampdftomindmap.py | synsandacks/CiscoExamPDFtoMindmap | fff0a10bcf18a2a2075e770b2305b038b1375de4 | [
"MIT"
] | 1 | 2022-02-09T21:19:38.000Z | 2022-02-09T21:19:38.000Z | import PyPDF2
import re
# Function that extracts the text from the supplied PDF and return the contents as a massive string.
def pdftotext(pdffile):
pdfFile = open(pdffile, 'rb')
pdfReader = PyPDF2.PdfFileReader(pdfFile)
numPages = pdfReader.numPages
pdfText = ''
for page in range(numPages):
... | 35.287671 | 113 | 0.590062 |
4a0fdd31be5159529d0421125b07cb697c8b915c | 39 | py | Python | octoprint_marlin_flasher/validation/validator_error.py | AvanOsch/OctoPrint-Marlin-Flasher | acc294d3eeb081f6967136389740c60a75c21f28 | [
"MIT"
] | 41 | 2019-04-02T23:05:19.000Z | 2022-03-31T09:39:08.000Z | octoprint_marlin_flasher/validation/validator_error.py | AvanOsch/OctoPrint-Marlin-Flasher | acc294d3eeb081f6967136389740c60a75c21f28 | [
"MIT"
] | 82 | 2019-04-02T14:50:42.000Z | 2022-03-26T05:33:55.000Z | octoprint_marlin_flasher/validation/validator_error.py | AvanOsch/OctoPrint-Marlin-Flasher | acc294d3eeb081f6967136389740c60a75c21f28 | [
"MIT"
] | 9 | 2019-10-16T08:16:11.000Z | 2022-01-19T10:59:44.000Z | class ValidatorError(Exception):
pass
| 13 | 32 | 0.820513 |
4a0fde47710e207e52c2e44e4db5cb8f953966a1 | 7,468 | py | Python | sahara/utils/cluster_progress_ops.py | esikachev/scenario | 40a59114c7bac44fea510767a3c07d73649f4caf | [
"Apache-2.0"
] | null | null | null | sahara/utils/cluster_progress_ops.py | esikachev/scenario | 40a59114c7bac44fea510767a3c07d73649f4caf | [
"Apache-2.0"
] | null | null | null | sahara/utils/cluster_progress_ops.py | esikachev/scenario | 40a59114c7bac44fea510767a3c07d73649f4caf | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Mirantis 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 agreed to in writ... | 29.752988 | 76 | 0.659347 |
4a0fdef657def203c91c790af2ca22a275825af6 | 485 | py | Python | src/kol/request/MeatOrchidRequest.py | danheath/temppykol | 7f9621b44df9f9d2d9fc0a5b2a06db116b9ccfab | [
"BSD-3-Clause"
] | 19 | 2015-02-16T08:30:49.000Z | 2020-05-01T06:06:33.000Z | src/kol/request/MeatOrchidRequest.py | danheath/temppykol | 7f9621b44df9f9d2d9fc0a5b2a06db116b9ccfab | [
"BSD-3-Clause"
] | 5 | 2015-01-13T23:01:54.000Z | 2016-11-30T15:23:43.000Z | src/kol/request/MeatOrchidRequest.py | danheath/temppykol | 7f9621b44df9f9d2d9fc0a5b2a06db116b9ccfab | [
"BSD-3-Clause"
] | 19 | 2015-05-28T09:36:19.000Z | 2022-03-15T23:19:29.000Z | from GenericRequest import GenericRequest
from kol.util import ParseResponseUtils
class MeatOrchidRequest(GenericRequest):
"Visits the hanging meat orchid in the clan rumpus room."
def __init__(self, session):
super(MeatOrchidRequest, self).__init__(session)
self.url = session.serverURL + 'clan... | 40.416667 | 93 | 0.760825 |
4a0fdfb1b4cdaf46d5c12eed256b2af8650fe411 | 3,330 | py | Python | movingpandas/tools/_show_versions.py | DeemanOne/movingpandas | 441d48f7aa98c861f1a66dcad486b9332b08e0b8 | [
"BSD-3-Clause"
] | null | null | null | movingpandas/tools/_show_versions.py | DeemanOne/movingpandas | 441d48f7aa98c861f1a66dcad486b9332b08e0b8 | [
"BSD-3-Clause"
] | null | null | null | movingpandas/tools/_show_versions.py | DeemanOne/movingpandas | 441d48f7aa98c861f1a66dcad486b9332b08e0b8 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import importlib
import platform
import sys
def _get_sys_info():
"""System information
Returns
-------
sys_info : dict
system and Python version information
"""
python = sys.version.replace("\n", " ")
blob = [
("python", python),
("executa... | 22.2 | 73 | 0.557958 |
4a0fe0d8929ade73c19986fe9f8811ceddbd72ee | 8,912 | py | Python | fol/estimator_box.py | Jacfger/simple-stuffs | 5596a03ec7a42a2f32b695ed73afb8c6a3cce030 | [
"MIT"
] | 9 | 2021-09-19T18:20:43.000Z | 2022-03-07T07:58:28.000Z | fol/estimator_box.py | Jacfger/simple-stuffs | 5596a03ec7a42a2f32b695ed73afb8c6a3cce030 | [
"MIT"
] | 1 | 2022-03-09T08:15:17.000Z | 2022-03-09T08:15:17.000Z | fol/estimator_box.py | Jacfger/simple-stuffs | 5596a03ec7a42a2f32b695ed73afb8c6a3cce030 | [
"MIT"
] | 3 | 2021-09-23T07:27:47.000Z | 2022-03-07T08:45:51.000Z | from typing import List
import torch
from torch import nn
import torch.nn.functional as F
from .appfoq import (AppFOQEstimator, IntList, find_optimal_batch,
inclusion_sampling)
class BoxOffsetIntersection(nn.Module):
def __init__(self, dim):
super(BoxOffsetIntersection, self).__ini... | 42.438095 | 79 | 0.609179 |
4a0fe0daa9109360b2abc2fc83af9a62efae356a | 331 | py | Python | tests/test_config.py | McahineLearning/wine_quality | 951d6aee7d6f6949a3d1671e433c1af0b886aeab | [
"MIT"
] | 1 | 2021-10-02T20:24:46.000Z | 2021-10-02T20:24:46.000Z | tests/test_config.py | McahineLearning/wine_quality | 951d6aee7d6f6949a3d1671e433c1af0b886aeab | [
"MIT"
] | null | null | null | tests/test_config.py | McahineLearning/wine_quality | 951d6aee7d6f6949a3d1671e433c1af0b886aeab | [
"MIT"
] | null | null | null | import pytest
class NotInRange(Exception):
def __init__(self, message = 'Value out of range'):
# self.input = input_
self.message = message
super().__init__(self.message)
def test_geneirc():
a = 5
with pytest.raises(NotInRange):
if a not in range(10,20):
raise ... | 25.461538 | 55 | 0.619335 |
4a0fe1bc0e48a83f9e8c3cdd8ab14a55814010a6 | 1,497 | py | Python | src/tests/dtlzproblems.py | KernelA/nsga3 | fc8c862fb41657108d5499f4343beb408e526c19 | [
"MIT"
] | 7 | 2020-06-12T21:52:18.000Z | 2022-03-24T14:28:01.000Z | src/tests/dtlzproblems.py | KernelA/nsga3 | fc8c862fb41657108d5499f4343beb408e526c19 | [
"MIT"
] | null | null | null | src/tests/dtlzproblems.py | KernelA/nsga3 | fc8c862fb41657108d5499f4343beb408e526c19 | [
"MIT"
] | 3 | 2018-01-01T09:46:18.000Z | 2021-06-16T07:09:26.000Z | import math
from abc import abstractmethod
import scipy
from pynsga3 import bproblem
__all__ = ["DTLZ1"]
class _BaseDTLZ(bproblem.MOProblem):
def __init__(self, amount_dec: int, amount_objs: int):
assert amount_objs > 1
self.__amount_objs = amount_objs
self.__lower_bounds = (0,) * amoun... | 22.343284 | 92 | 0.589846 |
4a0fe20770130e86ed25724fd5443cc3ed15e85c | 22,658 | py | Python | RL_utils.py | EmbodiedLearning/ICLR-Submission-2020 | 9806b7594eeb393de760545425a7b9fada0f9cef | [
"MIT"
] | 1 | 2021-10-12T09:48:56.000Z | 2021-10-12T09:48:56.000Z | RL_utils.py | EmbodiedLearning/ICLR-Submission-2020 | 9806b7594eeb393de760545425a7b9fada0f9cef | [
"MIT"
] | null | null | null | RL_utils.py | EmbodiedLearning/ICLR-Submission-2020 | 9806b7594eeb393de760545425a7b9fada0f9cef | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
import numpy as np
from JSAnimation import IPython_display
from matplotlib import animation
import cv2
import imageio
import mpld3
import scipy.misc
def plot_movie_js2(enc_array,image_array,save=None):
#Shows encoding and frames
fig = plt.figure(figsize=(10,3), dpi=72)... | 37.08347 | 122 | 0.573705 |
4a0fe392b2debeb359408b6a6b10d5bceca4a811 | 17,431 | py | Python | nucleus/iam/login.py | 1x-eng/PROTON | 2f27352f7eb9b46642325d800fcdb98ba5c99596 | [
"BSD-3-Clause"
] | 31 | 2018-09-28T05:00:02.000Z | 2021-11-09T11:06:57.000Z | nucleus/iam/login.py | PruthviKumarBK/PROTON | 2f27352f7eb9b46642325d800fcdb98ba5c99596 | [
"BSD-3-Clause"
] | 23 | 2019-05-17T08:48:07.000Z | 2020-01-20T22:34:28.000Z | nucleus/iam/login.py | 1x-eng/PROTON | 2f27352f7eb9b46642325d800fcdb98ba5c99596 | [
"BSD-3-Clause"
] | 7 | 2018-09-28T16:57:35.000Z | 2019-11-23T07:36:41.000Z | #
# Copyright (c) 2018, Pruthvi Kumar All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this list of conditions and the follo... | 55.336508 | 120 | 0.498824 |
4a0fe4ac1385ab6fe88e79305393600f5cb7dce5 | 845 | py | Python | example files/flask_apps/vib2/controller.py | nikku1234/InbreastData-Html-Page | 5f02b2e03e5f2f8f9fe9e2ce1b089b4dd2e36323 | [
"Apache-2.0"
] | 1 | 2020-07-02T06:06:18.000Z | 2020-07-02T06:06:18.000Z | example files/flask_apps/vib2/controller.py | nikku1234/InbreastData-Html-Page | 5f02b2e03e5f2f8f9fe9e2ce1b089b4dd2e36323 | [
"Apache-2.0"
] | 6 | 2020-06-17T14:19:47.000Z | 2022-03-12T00:36:20.000Z | example files/flask_apps/vib2/controller.py | nikku1234/InbreastData-Html-Page | 5f02b2e03e5f2f8f9fe9e2ce1b089b4dd2e36323 | [
"Apache-2.0"
] | null | null | null | from model import InputForm
from flask import Flask, render_template, request
import sys
# SVG or PNG plot?
svg = False
try:
if sys.argv[1] == 'svg':
svg = True
except IndexError:
pass
if svg:
from compute import compute_png_svg as compute
template = 'view_svg.html'
else:
from compute import... | 24.142857 | 62 | 0.635503 |
4a0fe4e0ccbb4163afe871ba1bd5fd87c9c63a99 | 286 | py | Python | Paned window/paned_window.py | hemidvsmusayev/Tkinter-learn | 3d35d7fedbda92a47450b84e3896e701e95de8cf | [
"MIT"
] | 1 | 2020-08-27T12:31:12.000Z | 2020-08-27T12:31:12.000Z | Paned window/paned_window.py | hemidvsmusayev/Tkinter-learn | 3d35d7fedbda92a47450b84e3896e701e95de8cf | [
"MIT"
] | null | null | null | Paned window/paned_window.py | hemidvsmusayev/Tkinter-learn | 3d35d7fedbda92a47450b84e3896e701e95de8cf | [
"MIT"
] | null | null | null | import tkinter
from tkinter import *
pw = PanedWindow()
pw.pack(fill=BOTH, expand=1)
left = Entry(pw, bd=5)
pw.add(left)
pw2 = PanedWindow(pw, orient=VERTICAL)
pw.add(pw2)
top = Scale(pw2, orient=HORIZONTAL)
pw2.add(top)
button = Button(pw2, text="Ok")
pw2.add(button)
mainloop()
| 14.3 | 38 | 0.706294 |
4a0fe5160498492f001a3381d8a37436abd568c5 | 6,766 | py | Python | rpscv/camera.py | sourcery-ai-bot/rps-cv | 9445528b106b445f0be266218889074a1a47e51d | [
"MIT"
] | null | null | null | rpscv/camera.py | sourcery-ai-bot/rps-cv | 9445528b106b445f0be266218889074a1a47e51d | [
"MIT"
] | null | null | null | rpscv/camera.py | sourcery-ai-bot/rps-cv | 9445528b106b445f0be266218889074a1a47e51d | [
"MIT"
] | null | null | null | # camera.py
# Source: https://github.com/DrGFreeman/rps-cv
#
# MIT License
#
# Copyright (c) 2017-2019 Julien de la Bruere-Terreault <drgfreeman@tuta.io>
#
# 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 ... | 40.759036 | 80 | 0.634939 |
4a0fe58f52153bb918233444c25647a95867f68c | 227 | py | Python | Implementation/1134. Armstrong Number.py | thewires2/Leetcode | a37ff81d60dd9195ba637b970b40aabbea5f4680 | [
"Unlicense"
] | 1 | 2021-06-30T17:51:56.000Z | 2021-06-30T17:51:56.000Z | Implementation/1134. Armstrong Number.py | thewires2/Leetcode | a37ff81d60dd9195ba637b970b40aabbea5f4680 | [
"Unlicense"
] | null | null | null | Implementation/1134. Armstrong Number.py | thewires2/Leetcode | a37ff81d60dd9195ba637b970b40aabbea5f4680 | [
"Unlicense"
] | null | null | null | class Solution:
def isArmstrong(self, N: int) -> bool:
x=list(map(int,str(N)))
b=list(map(lambda s:s**len(x),x))
if N==sum(b):
return True
else:
return False
| 22.7 | 42 | 0.471366 |
4a0fe71e137e78b527412158d34220a5764ec69b | 13,640 | py | Python | improver_tests/calibration/ensemble_calibration/helper_functions.py | cpelley/improver | ebf77fe2adc85ed7aec74c26671872a2e4388ded | [
"BSD-3-Clause"
] | 77 | 2017-04-26T07:47:40.000Z | 2022-03-31T09:40:49.000Z | improver_tests/calibration/ensemble_calibration/helper_functions.py | cpelley/improver | ebf77fe2adc85ed7aec74c26671872a2e4388ded | [
"BSD-3-Clause"
] | 1,440 | 2017-03-29T10:04:15.000Z | 2022-03-28T10:11:29.000Z | improver_tests/calibration/ensemble_calibration/helper_functions.py | MoseleyS/improver | ca028e3a1c842e3ff00b188c8ea6eaedd0a07149 | [
"BSD-3-Clause"
] | 72 | 2017-03-17T16:53:45.000Z | 2022-02-16T09:41:37.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 40.474777 | 86 | 0.640249 |
4a0fe7ac1d4cb800d86747b9a8f642bd24bc855a | 1,044 | py | Python | OOP/inheritence2.py | HarshilPatel007/learn-python | e64e6f8c95d39bfc229519ee7043787864997cdf | [
"MIT"
] | null | null | null | OOP/inheritence2.py | HarshilPatel007/learn-python | e64e6f8c95d39bfc229519ee7043787864997cdf | [
"MIT"
] | null | null | null | OOP/inheritence2.py | HarshilPatel007/learn-python | e64e6f8c95d39bfc229519ee7043787864997cdf | [
"MIT"
] | null | null | null |
class A:
def __init__(self):
print("In A __init__")
def feature1(self):
print("Feature 1")
def feature2(self):
print("Feature 2")
# class B(A):
class B:
def __init__(self):
super().__init__()
print("In B __init__")
def feature3(... | 15.352941 | 85 | 0.516284 |
4a0fe7c6e624f026b58d89bd62832d2a8b4f49b5 | 4,388 | py | Python | test/t_compliance/t_notify/test_fd_notifier.py | Invidence/auditree-framework | 39fbef32aa5066449485af501a74051838dc45f6 | [
"Apache-2.0"
] | null | null | null | test/t_compliance/t_notify/test_fd_notifier.py | Invidence/auditree-framework | 39fbef32aa5066449485af501a74051838dc45f6 | [
"Apache-2.0"
] | 15 | 2020-11-10T23:01:35.000Z | 2021-08-19T23:30:27.000Z | test/t_compliance/t_notify/test_fd_notifier.py | dlminvestments/auditree-framework | 19858c17797a7626fe20f0489d1aab163c6d69ec | [
"Apache-2.0"
] | null | null | null | # -*- mode:python; coding:utf-8 -*-
# Copyright (c) 2020 IBM Corp. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 35.674797 | 77 | 0.562215 |
4a0fe82b76199e567701522aba9d213efcd5260a | 12,765 | py | Python | dtBot/dtBot.py | an0mali/dtBot | a8333c0af61f1dbc166b447167145a0795f38d0f | [
"MIT"
] | 1 | 2022-02-16T19:27:31.000Z | 2022-02-16T19:27:31.000Z | dtBot/dtBot.py | an0mali/dtBot | a8333c0af61f1dbc166b447167145a0795f38d0f | [
"MIT"
] | null | null | null | dtBot/dtBot.py | an0mali/dtBot | a8333c0af61f1dbc166b447167145a0795f38d0f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 8 22:28:16 2021
@author: Qui
"""
import asyncio
from asyncio.windows_events import NULL
import discord
import os
import time
from requests.api import delete
import botutils
import authkey
from discord.ext import commands
import threading
from pathlib ... | 38.333333 | 146 | 0.493537 |
4a0fe8a231e4de12c8e340e4a5994ba5c3bce138 | 221 | py | Python | unittests/test_featureVisualization.py | dingguanglei/jdit | ef878e696c9e2fad5069f106496289d4e4cc6154 | [
"Apache-2.0"
] | 28 | 2019-06-18T15:56:53.000Z | 2021-11-09T13:11:13.000Z | unittests/test_featureVisualization.py | dingguanglei/jdit | ef878e696c9e2fad5069f106496289d4e4cc6154 | [
"Apache-2.0"
] | 2 | 2018-10-24T01:09:56.000Z | 2018-11-08T07:13:48.000Z | unittests/test_featureVisualization.py | dingguanglei/jdit | ef878e696c9e2fad5069f106496289d4e4cc6154 | [
"Apache-2.0"
] | 8 | 2019-01-11T01:12:15.000Z | 2021-03-12T10:15:43.000Z | from unittest import TestCase
class TestFeatureVisualization(TestCase):
def test__hook(self):
pass
def test__register_forward_hook(self):
pass
def test_trace_activation(self):
pass
| 17 | 42 | 0.696833 |
4a0fea84cc0dc02fc1d44f238f12dd3d81e6acd4 | 7,526 | py | Python | main.py | AbdullahKaratas/GenerationOfCylinders | e0e98d194990b8ad4d697a59c75eae5d647b936a | [
"MIT"
] | null | null | null | main.py | AbdullahKaratas/GenerationOfCylinders | e0e98d194990b8ad4d697a59c75eae5d647b936a | [
"MIT"
] | null | null | null | main.py | AbdullahKaratas/GenerationOfCylinders | e0e98d194990b8ad4d697a59c75eae5d647b936a | [
"MIT"
] | null | null | null | import time
from cylinder_fitting import fitting_rmsd
from cylinder_fitting import geometry
from cylinder_fitting import show_G_distribution
from cylinder_fitting import show_fit
from cylinder_fitting import fit
import pandas as pd
import pytest
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplo... | 31.889831 | 119 | 0.562052 |
4a0feaa561ea73af54a42a1d79be3616bce094d9 | 2,236 | py | Python | app/main.py | CirculusVCFB/example-fastapi | 87a9ba0c7db245326e3aa9b952585a440ba2327c | [
"bzip2-1.0.6"
] | null | null | null | app/main.py | CirculusVCFB/example-fastapi | 87a9ba0c7db245326e3aa9b952585a440ba2327c | [
"bzip2-1.0.6"
] | 1 | 2022-03-01T07:02:47.000Z | 2022-03-01T07:02:47.000Z | app/main.py | CirculusVCFB/example-fastapi | 87a9ba0c7db245326e3aa9b952585a440ba2327c | [
"bzip2-1.0.6"
] | null | null | null | import time
from fastapi import FastAPI, Response,status,HTTPException,Depends
from passlib.context import CryptContext
from fastapi.params import Body
from pydantic import BaseModel
from random import randrange
from typing import Optional, List
from sqlalchemy.orm import Session
from . import models, schemas, utils
fr... | 27.268293 | 151 | 0.709302 |
4a0febab843d3f09b91df751138b971c513eac8e | 262 | py | Python | lib_rovpp/policies/rovpp_v2a_lite_policy.py | iReynaldo/lib_rovpp | eb201adc948e9375123c2e2301ee524392dd7b0d | [
"BSD-3-Clause"
] | 1 | 2021-12-05T07:42:35.000Z | 2021-12-05T07:42:35.000Z | lib_rovpp/policies/rovpp_v2a_lite_policy.py | iReynaldo/lib_rovpp | eb201adc948e9375123c2e2301ee524392dd7b0d | [
"BSD-3-Clause"
] | null | null | null | lib_rovpp/policies/rovpp_v2a_lite_policy.py | iReynaldo/lib_rovpp | eb201adc948e9375123c2e2301ee524392dd7b0d | [
"BSD-3-Clause"
] | null | null | null | from .rovpp_v2_lite_policy import ROVPPV2LitePolicy
class ROVPPV2aLitePolicy(ROVPPV2LitePolicy):
name = "ROV++V2a Lite"
def _policy_propagate(*args, **kwargs):
"""Do nothing. Send blackholes according to export policy"""
return False
| 23.818182 | 68 | 0.717557 |
4a0fedd5e00c391230a5e9c4b7a33bdafca87ac5 | 10,627 | py | Python | validator/tests/integration/test_sawtooth_stats.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | 1 | 2019-03-18T13:31:11.000Z | 2019-03-18T13:31:11.000Z | validator/tests/integration/test_sawtooth_stats.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | null | null | null | validator/tests/integration/test_sawtooth_stats.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 36.269625 | 80 | 0.638844 |
4a0fee6db1d3e6f83a3cfe5423e738b896ea6fda | 1,753 | py | Python | docs/test_dist_cont.py | h-vetinari/tsne-cuda | b740a7d46a07ca9415f072001839fb66a582a3fa | [
"BSD-3-Clause"
] | 1,400 | 2018-05-09T17:17:59.000Z | 2022-03-31T14:17:59.000Z | docs/test_dist_cont.py | h-vetinari/tsne-cuda | b740a7d46a07ca9415f072001839fb66a582a3fa | [
"BSD-3-Clause"
] | 104 | 2018-06-06T09:21:31.000Z | 2022-03-05T03:11:35.000Z | docs/test_dist_cont.py | h-vetinari/tsne-cuda | b740a7d46a07ca9415f072001839fb66a582a3fa | [
"BSD-3-Clause"
] | 113 | 2018-08-01T23:45:28.000Z | 2022-03-20T08:46:23.000Z | # Generate a uniform random distributuion of points
import numpy as np
import scipy
from sklearn.decomposition import PCA
import tsnecuda
print('Loading data...')
import tflearn
(X,Y),_ = tflearn.datasets.cifar10.load_data()
# randomly sample some points
r_points = X[np.random.choice(np.arange(0,X.shape[0]), size=2... | 30.754386 | 99 | 0.764404 |
4a0feeaaf8c005c2fc8bb800e1fcc7f002ca4923 | 481 | py | Python | django/contrib/staticfiles/urls.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | 2 | 2016-09-27T09:30:19.000Z | 2016-10-17T01:47:43.000Z | env/lib/python2.7/site-packages/django/contrib/staticfiles/urls.py | luiscarlosgph/nas | e5acee61e8bbf12c34785fe971ce7df8dee775d4 | [
"MIT"
] | 10 | 2019-12-26T17:31:31.000Z | 2022-03-21T22:17:33.000Z | env/lib/python2.7/site-packages/django/contrib/staticfiles/urls.py | luiscarlosgph/nas | e5acee61e8bbf12c34785fe971ce7df8dee775d4 | [
"MIT"
] | 1 | 2020-12-24T01:28:30.000Z | 2020-12-24T01:28:30.000Z | from django.conf import settings
from django.conf.urls.static import static
urlpatterns = []
def staticfiles_urlpatterns(prefix=None):
"""
Helper function to return a URL pattern for serving static files.
"""
if prefix is None:
prefix = settings.STATIC_URL
return static(prefix, view='djan... | 26.722222 | 72 | 0.740125 |
4a0feefb97e6e2caf8870822bc173f7664f30631 | 46,654 | py | Python | src/api/meta/utils/basicapi/parseresult.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 84 | 2021-06-30T06:20:23.000Z | 2022-03-22T03:05:49.000Z | src/api/meta/utils/basicapi/parseresult.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 7 | 2021-06-30T06:21:16.000Z | 2022-03-29T07:36:13.000Z | src/api/meta/utils/basicapi/parseresult.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 40 | 2021-06-30T06:21:26.000Z | 2022-03-29T12:42:26.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
---------------------------------------------... | 42.374205 | 120 | 0.637587 |
4a0fefc82b758798564bef63a6c581a59692a202 | 1,323 | py | Python | gym_wrapper/abstractEnv.py | rtatze/JSBSim_gym_wrapper | 525d70e72e36fb284b2adfd63d2b3205d6e05202 | [
"MIT"
] | 10 | 2021-02-08T15:26:25.000Z | 2022-03-18T07:22:20.000Z | gym_wrapper/abstractEnv.py | rtatze/JSBSim_gym_wrapper | 525d70e72e36fb284b2adfd63d2b3205d6e05202 | [
"MIT"
] | 1 | 2021-02-23T08:09:57.000Z | 2021-02-23T11:13:29.000Z | gym_wrapper/abstractEnv.py | rtatze/JSBSim_gym_wrapper | 525d70e72e36fb284b2adfd63d2b3205d6e05202 | [
"MIT"
] | 4 | 2021-01-22T16:21:26.000Z | 2022-01-25T14:05:54.000Z | from typing import Tuple, List
import numpy as np
from enum import Enum
import gym
from gym import spaces
import logging
from abc import ABC, abstractmethod
class AbstractEnv(gym.Env, ABC):
def __init__(self):
super(AbstractEnv, self).__init__()
self.max_speed = 8
self.max_torque = 2.
... | 24.962264 | 100 | 0.579743 |
4a0fefe10987338a0f2f17fcead267a002316884 | 23 | py | Python | aio_telegraph/__init__.py | bluzir/aio-telegraph | cd5cb110067a1ad44a535197fc9a6cdc05d4c317 | [
"MIT"
] | 1 | 2019-08-19T09:15:14.000Z | 2019-08-19T09:15:14.000Z | aio_telegraph/__init__.py | bluzir/aio-telegraph | cd5cb110067a1ad44a535197fc9a6cdc05d4c317 | [
"MIT"
] | null | null | null | aio_telegraph/__init__.py | bluzir/aio-telegraph | cd5cb110067a1ad44a535197fc9a6cdc05d4c317 | [
"MIT"
] | 1 | 2019-05-17T19:00:30.000Z | 2019-05-17T19:00:30.000Z | name = 'aio_telegraph'
| 11.5 | 22 | 0.73913 |
4a0ff0a43adcfb23ede7a012551d2c570a9847bd | 591 | py | Python | what_is_the_python_decorator/demo7.py | NightmareQAQ/python-notes | 4e766be06073a495ff9654f0dd8c0bb03310c559 | [
"MIT"
] | 106 | 2017-05-02T10:25:50.000Z | 2022-03-23T14:57:28.000Z | what_is_the_python_decorator/demo7.py | NightmareQAQ/python-notes | 4e766be06073a495ff9654f0dd8c0bb03310c559 | [
"MIT"
] | 2 | 2021-01-14T15:07:15.000Z | 2021-12-21T07:18:05.000Z | what_is_the_python_decorator/demo7.py | NightmareQAQ/python-notes | 4e766be06073a495ff9654f0dd8c0bb03310c559 | [
"MIT"
] | 42 | 2017-07-31T07:07:38.000Z | 2021-12-26T09:36:55.000Z | def my_logging(func):
def wrapper(*args, **kwargs):
"""my wrapper"""
print('logging - {} is running'.format(func.__name__))
func(*args, **kwargs)
return wrapper
@my_logging
def f1(*args, **kwargs):
"""f1 function"""
print("f1")
for thing in args:
print('hello {}'.... | 23.64 | 62 | 0.590525 |
4a0ff137a730764924b446333ee0f5952a618206 | 34,856 | py | Python | src/sqlfluff/core/parser/grammar/base.py | iserko/sqlfluff | c0bad78f3fa9549591738c77f869724f721e6830 | [
"MIT"
] | null | null | null | src/sqlfluff/core/parser/grammar/base.py | iserko/sqlfluff | c0bad78f3fa9549591738c77f869724f721e6830 | [
"MIT"
] | null | null | null | src/sqlfluff/core/parser/grammar/base.py | iserko/sqlfluff | c0bad78f3fa9549591738c77f869724f721e6830 | [
"MIT"
] | null | null | null | """Base grammar, Ref, Anything and Nothing."""
import copy
from typing import List, NamedTuple, Optional, Union, Type, Tuple
from sqlfluff.core.errors import SQLParseError
from sqlfluff.core.string_helpers import curtail_string
from sqlfluff.core.parser.segments import BaseSegment, EphemeralSegment
from sqlfluff.cor... | 42.979038 | 141 | 0.538128 |
4a0ff1f1c7aca8e0a9102d9659954d2156fc56de | 1,234 | py | Python | alphacsc/other/sdtw/distance.py | sophiaas/alphacsc | 402b8f6c8ee4ba9c86e9da0e2073d900cf8da207 | [
"BSD-3-Clause"
] | 89 | 2017-05-31T19:20:52.000Z | 2022-03-22T09:52:17.000Z | alphacsc/other/sdtw/distance.py | sophiaas/alphacsc | 402b8f6c8ee4ba9c86e9da0e2073d900cf8da207 | [
"BSD-3-Clause"
] | 75 | 2017-07-15T14:03:40.000Z | 2022-03-29T17:31:58.000Z | alphacsc/other/sdtw/distance.py | sophiaas/alphacsc | 402b8f6c8ee4ba9c86e9da0e2073d900cf8da207 | [
"BSD-3-Clause"
] | 35 | 2017-06-16T12:48:23.000Z | 2022-03-21T09:49:55.000Z | import numpy as np
from sklearn.metrics.pairwise import euclidean_distances
from .soft_dtw_fast import _jacobian_product_sq_euc
class SquaredEuclidean(object):
def __init__(self, X, Y):
"""
Parameters
----------
X: array, shape = [m, d]
First time series.
Y:... | 22.436364 | 64 | 0.505673 |
4a0ff339c61d6d2de68af5df0b9d5fa4853928c9 | 3,435 | py | Python | qml/Lib/site-packages/dash_bootstrap_components/_components/Alert.py | SammyOngaya/qml | d4ede647a0ea79c9c4f07d4219e6576a55a3c343 | [
"Apache-2.0"
] | 1 | 2021-04-04T09:14:03.000Z | 2021-04-04T09:14:03.000Z | qml/Lib/site-packages/dash_bootstrap_components/_components/Alert.py | SammyOngaya/qml | d4ede647a0ea79c9c4f07d4219e6576a55a3c343 | [
"Apache-2.0"
] | null | null | null | qml/Lib/site-packages/dash_bootstrap_components/_components/Alert.py | SammyOngaya/qml | d4ede647a0ea79c9c4f07d4219e6576a55a3c343 | [
"Apache-2.0"
] | null | null | null | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Alert(Component):
"""An Alert component.
Alert allows you to create contextual feedback messages on user actions.
Control the visibility using callbacks with the `is_open` prop, or set it to
auto-d... | 61.339286 | 335 | 0.728384 |
4a0ff3515ceb977c8e4ea9001c2997e10aeb8d94 | 774 | py | Python | demos/gtk3/02-hello-world-test/buildconf.py | pustotnik/raven | adb75d04a1ce719266eb34c29b35151dfaf91a8a | [
"BSD-3-Clause"
] | 2 | 2019-10-14T05:05:34.000Z | 2022-03-28T04:55:00.000Z | demos/gtk3/02-hello-world-test/buildconf.py | pustotnik/raven | adb75d04a1ce719266eb34c29b35151dfaf91a8a | [
"BSD-3-Clause"
] | 42 | 2020-08-25T07:59:32.000Z | 2021-11-15T03:12:29.000Z | demos/gtk3/02-hello-world-test/buildconf.py | pustotnik/raven | adb75d04a1ce719266eb34c29b35151dfaf91a8a | [
"BSD-3-Clause"
] | 1 | 2021-08-13T13:59:51.000Z | 2021-08-13T13:59:51.000Z |
tasks = {
'hello' : {
'features' : 'cprogram',
'source' : 'hello.c',
'configure' : [
{
'do' : 'pkgconfig',
'packages' : 'gtk+-3.0 > 1 pango gtk+-3.0 <= 100 ',
'tool-atleast-version' : '0.1',
'pkg-version' : True,... | 23.454545 | 84 | 0.342377 |
4a0ff4cfe2158f2549896d70fa887c9063ea00c4 | 3,771 | py | Python | CEAM/settings.py | egruttadauria98/Crypto-Efficient-Asset-Management | ce4d47a8fe0b3a01bbad654e45afb5c335a2dc0f | [
"MIT"
] | 6 | 2021-11-29T14:05:56.000Z | 2022-03-26T21:41:49.000Z | CEAM/settings.py | egruttadauria98/Crypto-Efficient-Asset-Management | ce4d47a8fe0b3a01bbad654e45afb5c335a2dc0f | [
"MIT"
] | null | null | null | CEAM/settings.py | egruttadauria98/Crypto-Efficient-Asset-Management | ce4d47a8fe0b3a01bbad654e45afb5c335a2dc0f | [
"MIT"
] | 2 | 2021-12-24T16:02:31.000Z | 2021-12-25T11:25:44.000Z | """
Django settings for CEAM project.
Generated by 'django-admin startproject' using Django 3.2.9.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib im... | 26.935714 | 153 | 0.700345 |
4a0ff641f659065be156577894efa04e30addf32 | 291 | py | Python | packaging/get_version.py | JWCook/inat-image-tagger | 2ba48ec849517b32cee1bfe9527f838a4f22cd94 | [
"MIT"
] | 1 | 2020-05-10T23:17:07.000Z | 2020-05-10T23:17:07.000Z | packaging/get_version.py | JWCook/inat-image-tagger | 2ba48ec849517b32cee1bfe9527f838a4f22cd94 | [
"MIT"
] | 13 | 2020-05-23T14:56:39.000Z | 2020-05-24T03:35:21.000Z | packaging/get_version.py | JWCook/inat-image-tagger | 2ba48ec849517b32cee1bfe9527f838a4f22cd94 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Get app version from poetry config"""
from pathlib import Path
import tomlkit
PROJECT_DIR = Path(__file__).parent.parent.absolute()
with open(PROJECT_DIR / 'pyproject.toml', 'rb') as f:
conf = tomlkit.loads(f.read())
print(conf['tool']['poetry']['version'])
| 22.384615 | 53 | 0.704467 |
4a0ff658df0c6cc8378bea4d7d6282afedc33682 | 5,418 | py | Python | travel/docs/Amadeus-master/pactravel-master/swagger_client/models/infant.py | shopglobal/api | 176e1858d3f93e8e7854ba194698b6b9825841da | [
"CC-BY-4.0"
] | null | null | null | travel/docs/Amadeus-master/pactravel-master/swagger_client/models/infant.py | shopglobal/api | 176e1858d3f93e8e7854ba194698b6b9825841da | [
"CC-BY-4.0"
] | 1 | 2021-06-01T22:04:28.000Z | 2021-06-01T22:04:28.000Z | travel/docs/Amadeus-master/pactravel-master/swagger_client/models/infant.py | shopglobal/api | 176e1858d3f93e8e7854ba194698b6b9825841da | [
"CC-BY-4.0"
] | null | null | null | # coding: utf-8
"""
Amadeus Travel Innovation Sandbox
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 1.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import ... | 29.769231 | 225 | 0.588778 |
4a0ff6943a0cb84d6c75bf1c632bc9804f856890 | 371 | py | Python | Django/makeplan_old/user/migrations/0003_auto_20190222_1541.py | taoyan/python | 3fbb1e534ec91b33cd2ac690966d7253c2f5d757 | [
"MIT"
] | 1 | 2019-05-04T09:21:52.000Z | 2019-05-04T09:21:52.000Z | Django/makeplan_old/user/migrations/0003_auto_20190222_1541.py | taoyan/python | 3fbb1e534ec91b33cd2ac690966d7253c2f5d757 | [
"MIT"
] | 26 | 2020-07-18T02:02:54.000Z | 2022-02-26T10:49:58.000Z | Django/makeplan_old/user/migrations/0003_auto_20190222_1541.py | taoyan/python | 3fbb1e534ec91b33cd2ac690966d7253c2f5d757 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.5 on 2019-02-22 07:41
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('user', '0002_auto_20190222_1534'),
]
operations = [
migrations.RenameField(
model_name='user',
old_name='date_last_login',
... | 19.526316 | 47 | 0.592992 |
4a0ff87033a0540b04a79f0f417672a2b7528875 | 782 | py | Python | HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltESPKFFittingSmootherWithOutliersRejectionAndRK_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:24:46.000Z | 2021-11-30T16:24:46.000Z | HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltESPKFFittingSmootherWithOutliersRejectionAndRK_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 4 | 2021-11-29T13:57:56.000Z | 2022-03-29T06:28:36.000Z | HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltESPKFFittingSmootherWithOutliersRejectionAndRK_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:16:05.000Z | 2021-11-30T16:16:05.000Z | import FWCore.ParameterSet.Config as cms
hltESPKFFittingSmootherWithOutliersRejectionAndRK = cms.ESProducer("KFFittingSmootherESProducer",
BreakTrajWith2ConsecutiveMissing = cms.bool(True),
ComponentName = cms.string('hltESPKFFittingSmootherWithOutliersRejectionAndRK'),
EstimateCut = cms.double(20.0),
... | 41.157895 | 97 | 0.748082 |
4a0ff89a07dc73af952eda55575d607349bcbdc7 | 4,932 | py | Python | math3d_triangle.py | spencerparkin/pyMath3D | 8a0a5155f7db11a0d4d555d6963faf0bc0ea2b71 | [
"MIT"
] | null | null | null | math3d_triangle.py | spencerparkin/pyMath3D | 8a0a5155f7db11a0d4d555d6963faf0bc0ea2b71 | [
"MIT"
] | null | null | null | math3d_triangle.py | spencerparkin/pyMath3D | 8a0a5155f7db11a0d4d555d6963faf0bc0ea2b71 | [
"MIT"
] | 1 | 2021-03-06T05:28:22.000Z | 2021-03-06T05:28:22.000Z | # math3d_triangle.py
import math
from math3d_vector import Vector
from math3d_side import Side
from math3d_plane import Plane
from math3d_line_segment import LineSegment
class Triangle(object):
def __init__(self, point_a=None, point_b=None, point_c=None):
self.point_a = point_a.clone() if point_a is not ... | 44.035714 | 108 | 0.599554 |
4a0ff8b3d4f2de4b5a7c052ca03480feaafca0b4 | 8,315 | py | Python | ch8/playMap.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | null | null | null | ch8/playMap.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | null | null | null | ch8/playMap.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | 1 | 2021-07-23T09:59:15.000Z | 2021-07-23T09:59:15.000Z | import Stores
import csv
import Messages
class playMap:
__mapEmpty = " "
__mapWall = "|"
__mapLine = "-"
myStores = None
def printMap(self,userPo):
self.myStores = Stores.Stores()
# 新程式區塊
for k in range(1,28):
# 印出第一、二、三行
if (( k == 1 ) or (k == 2) o... | 39.221698 | 156 | 0.452796 |
4a0ff8f2f13edbc165a31f58c24a5db1be27b6d2 | 1,119 | py | Python | revscoring/utilities/tests/test_util.py | mariushoch/revscoring | 5ecd54d31c4088b6f142c0ef54116cc5bdce0ff2 | [
"MIT"
] | null | null | null | revscoring/utilities/tests/test_util.py | mariushoch/revscoring | 5ecd54d31c4088b6f142c0ef54116cc5bdce0ff2 | [
"MIT"
] | null | null | null | revscoring/utilities/tests/test_util.py | mariushoch/revscoring | 5ecd54d31c4088b6f142c0ef54116cc5bdce0ff2 | [
"MIT"
] | null | null | null | from ..util import read_labels_and_population_rates, read_labels_config
def test_plain_labels():
labels, label_weights, population_rates = read_labels_and_population_rates(
"true,false", ["true=5"], ["true=0.1", "false=0.9"], None)
assert labels == [True, False]
assert label_weights == {True: 5}
... | 32.911765 | 79 | 0.646113 |
4a0ffed8c900ddcbe70a211af359e890cd97ea91 | 787 | py | Python | ziproto/__init__.py | intellivoid/ZiProto-Python | fe1db33e8288a9f5500f26ae1b3339ecb6e913ab | [
"Apache-2.0"
] | 1 | 2021-01-04T19:25:34.000Z | 2021-01-04T19:25:34.000Z | ziproto/__init__.py | intellivoid/ZiProto-Python | fe1db33e8288a9f5500f26ae1b3339ecb6e913ab | [
"Apache-2.0"
] | null | null | null | ziproto/__init__.py | intellivoid/ZiProto-Python | fe1db33e8288a9f5500f26ae1b3339ecb6e913ab | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2020 Intellivoid Technologies
#
# 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 a... | 28.107143 | 75 | 0.752224 |
4a0ffef07f4b2d56f7f6a0612b9f00bee834e136 | 206 | py | Python | division.py | DahlitzFlorian/leverage-the-full-potential-of-type-hints-article-snippets | 2247b99aba6b9e4d97db81af8fabaf8b2f69bc30 | [
"MIT"
] | null | null | null | division.py | DahlitzFlorian/leverage-the-full-potential-of-type-hints-article-snippets | 2247b99aba6b9e4d97db81af8fabaf8b2f69bc30 | [
"MIT"
] | null | null | null | division.py | DahlitzFlorian/leverage-the-full-potential-of-type-hints-article-snippets | 2247b99aba6b9e4d97db81af8fabaf8b2f69bc30 | [
"MIT"
] | null | null | null | # division.py
from typing import Union
Number = Union[int, float]
def division(divident: Number, divisor: Number) -> float:
return divident / divisor
result = division(1.5, 2)
print(result) # 0.75
| 17.166667 | 57 | 0.703883 |
4a0fff88cd918d7e56db07749544c84354d4d67f | 4,540 | py | Python | MatchingPennies/trcopo_mp.py | manish-pra/trcopo | df8730f07ef554970c7a0aa653cc42d4886948ec | [
"MIT"
] | 5 | 2020-06-22T17:13:51.000Z | 2021-11-02T14:19:58.000Z | MatchingPennies/trcopo_mp.py | manish-pra/trcopo | df8730f07ef554970c7a0aa653cc42d4886948ec | [
"MIT"
] | null | null | null | MatchingPennies/trcopo_mp.py | manish-pra/trcopo | df8730f07ef554970c7a0aa653cc42d4886948ec | [
"MIT"
] | 1 | 2020-09-14T06:41:03.000Z | 2020-09-14T06:41:03.000Z | import torch
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
sys.path.insert(0, '..')
from trcopo_optim import TRCoPO
from torch.distributions import Categorical
import numpy as np
from MatchingPennies.matching_pennies import pennies_game
from torch.utils.tensorboard import SummaryWrite... | 33.382353 | 111 | 0.644493 |
4a0fffc41c52543b02a1d54cf49b92d2ebde149e | 1,405 | py | Python | docs/conf.py | gevent/python-tblib | ebc7cd6f60bf5943658bf9f02c1d6068dfdb6331 | [
"BSD-2-Clause"
] | 5 | 2017-06-23T14:52:49.000Z | 2018-10-23T16:17:06.000Z | docs/conf.py | gevent/python-tblib | ebc7cd6f60bf5943658bf9f02c1d6068dfdb6331 | [
"BSD-2-Clause"
] | null | null | null | docs/conf.py | gevent/python-tblib | ebc7cd6f60bf5943658bf9f02c1d6068dfdb6331 | [
"BSD-2-Clause"
] | 1 | 2021-01-13T11:23:05.000Z | 2021-01-13T11:23:05.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext... | 25.545455 | 72 | 0.69395 |
4a10003657013434458f3637c719af40eac69e68 | 1,306 | py | Python | examples/py/async-market-making-symbols.py | diwenshi61/ccxt | ebdda10e7c4ed8841d572f3bfe198b5f0e949cf6 | [
"MIT"
] | 24,910 | 2017-10-27T21:41:59.000Z | 2022-03-31T23:08:57.000Z | examples/py/async-market-making-symbols.py | diwenshi61/ccxt | ebdda10e7c4ed8841d572f3bfe198b5f0e949cf6 | [
"MIT"
] | 8,201 | 2017-10-28T10:19:28.000Z | 2022-03-31T23:49:37.000Z | examples/py/async-market-making-symbols.py | diwenshi61/ccxt | ebdda10e7c4ed8841d572f3bfe198b5f0e949cf6 | [
"MIT"
] | 6,632 | 2017-10-28T02:53:24.000Z | 2022-03-31T23:20:14.000Z | # -*- coding: utf-8 -*-
from asyncio import gather, get_event_loop
from pprint import pprint
import os
import sys
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root + '/python')
import ccxt.async_support as ccxt # noqa: E402
async def load_markets(exchange):
... | 30.372093 | 86 | 0.666922 |
4a1000d298eb060677e00fb674b2bf4de6ba634e | 182 | py | Python | mozillians/announcements/__init__.py | mozilla/vouched-mozillians | 88fca9aea0ab1e173cbc33776aa388b956859559 | [
"BSD-3-Clause"
] | 1 | 2020-10-27T12:17:34.000Z | 2020-10-27T12:17:34.000Z | mozillians/announcements/__init__.py | akatsoulas/vouched-mozillians | 6dcfaf61518ff038403b2b3e06ad9b813135b287 | [
"BSD-3-Clause"
] | 5 | 2020-09-28T19:04:19.000Z | 2020-10-27T19:48:31.000Z | mozillians/announcements/__init__.py | akatsoulas/vouched-mozillians | 6dcfaf61518ff038403b2b3e06ad9b813135b287 | [
"BSD-3-Clause"
] | 2 | 2020-09-22T08:55:10.000Z | 2020-09-24T10:40:58.000Z | from django.apps import AppConfig
default_app_config = "mozillians.announcements.AnnouncementsConfig"
class AnnouncementsConfig(AppConfig):
name = "mozillians.announcements"
| 20.222222 | 67 | 0.818681 |
4a100140024a158ec4c132a949652103c0c3e02a | 3,552 | py | Python | clumioapi/models/report_download.py | clumio-code/clumio-python-sdk | 63bfaf3afed5c0ab4bae3dd1be52271249d07c51 | [
"Apache-2.0"
] | null | null | null | clumioapi/models/report_download.py | clumio-code/clumio-python-sdk | 63bfaf3afed5c0ab4bae3dd1be52271249d07c51 | [
"Apache-2.0"
] | 1 | 2021-09-16T05:56:05.000Z | 2021-09-16T05:56:05.000Z | clumioapi/models/report_download.py | clumio-code/clumio-python-sdk | 63bfaf3afed5c0ab4bae3dd1be52271249d07c51 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2021. Clumio, Inc.
#
from typing import Any, Dict, Mapping, Optional, Sequence, Type, TypeVar
T = TypeVar('T', bound='ReportDownload')
class ReportDownload:
"""Implementation of the 'ReportDownload' model.
Attributes:
download_link:
The link to the actual CSV report.
... | 32.290909 | 88 | 0.599944 |
4a100198b08a5a5dbded11b669a8e3f6a6889e4e | 47,565 | py | Python | Sublime Text 3/Backup/20210122193107/backrefs/st3/backrefs/uniprops/unidata/scriptextensions.py | anekeallen/Sublime-Text-3 | 8502b9089ca4223f8ba7ff168626a0dbe67713cb | [
"MIT"
] | 182 | 2017-03-05T07:43:13.000Z | 2022-03-15T13:09:07.000Z | Sublime Text 3/Backup/20210122193107/backrefs/st3/backrefs/uniprops/unidata/scriptextensions.py | anekeallen/Sublime-Text-3 | 8502b9089ca4223f8ba7ff168626a0dbe67713cb | [
"MIT"
] | 3 | 2021-05-10T18:59:14.000Z | 2021-09-02T01:50:15.000Z | Sublime Text 3/Backup/20210122193107/backrefs/st3/backrefs/uniprops/unidata/scriptextensions.py | anekeallen/Sublime-Text-3 | 8502b9089ca4223f8ba7ff168626a0dbe67713cb | [
"MIT"
] | 16 | 2017-03-07T11:01:27.000Z | 2022-01-08T09:21:01.000Z | """Unicode Properties from Unicode version 6.1.0 (autogen)."""
from __future__ import unicode_literals
unicode_script_extensions = {
"^arabic": "\x00-\u05ff\u0605\u061c-\u061d\u065f\u06dd\u0700-\u074f\u0780-\u089f\u08a1\u08ad-\u08e3\u08ff-\ufb4f\ufbc2-\ufbd2\ufd3e-\ufd4f\ufd90-\ufd91\ufdc8-\ufdef\ufdfe-\ufe6f\ufe7... | 113.25 | 7,831 | 0.729486 |
4a10022e574310fa1bb9e6405ff1da2cc6ef8f01 | 19,219 | py | Python | chromeos-config/cros_config_host/libcros_config_host_unittest.py | Toromino/chromiumos-platform2 | 97e6ba18f0e5ab6723f3448a66f82c1a07538d87 | [
"BSD-3-Clause"
] | null | null | null | chromeos-config/cros_config_host/libcros_config_host_unittest.py | Toromino/chromiumos-platform2 | 97e6ba18f0e5ab6723f3448a66f82c1a07538d87 | [
"BSD-3-Clause"
] | null | null | null | chromeos-config/cros_config_host/libcros_config_host_unittest.py | Toromino/chromiumos-platform2 | 97e6ba18f0e5ab6723f3448a66f82c1a07538d87 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=class-missing-docstring
"""The unit test suite for the libcros_config_host.py library"""
... | 42.332599 | 113 | 0.599459 |
4a10028fc94c6d58d26b4c4197637a7e984cb776 | 15,698 | py | Python | econml/tests/test_integration.py | lwschm/EconML | 6e7b107e1f8a7a5922489eb81143db8656ff01af | [
"BSD-3-Clause"
] | 1 | 2022-03-26T16:05:27.000Z | 2022-03-26T16:05:27.000Z | econml/tests/test_integration.py | QPC-database/EconML | 0cec5ab3d4cb5d681f7d8600fb261d93ca528020 | [
"BSD-3-Clause"
] | null | null | null | econml/tests/test_integration.py | QPC-database/EconML | 0cec5ab3d4cb5d681f7d8600fb261d93ca528020 | [
"BSD-3-Clause"
] | 1 | 2021-08-20T09:06:42.000Z | 2021-08-20T09:06:42.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import numpy as np
import pandas as pd
import unittest
import pytest
import keras
import tensorflow as tf
from econml.drlearner import LinearDRLearner, SparseLinearDRLearner, ForestDRLearner
from econml.dml import LinearDML, ... | 54.131034 | 118 | 0.633393 |
4a1002d2002fd699e4a41cda3fe200420faa11d5 | 4,133 | py | Python | google/ads/googleads/v8/services/services/ad_group_label_service/transports/base.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 285 | 2018-10-05T16:47:58.000Z | 2022-03-31T00:58:39.000Z | google/ads/googleads/v8/services/services/ad_group_label_service/transports/base.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 425 | 2018-09-10T13:32:41.000Z | 2022-03-31T14:50:05.000Z | google/ads/googleads/v8/services/services/ad_group_label_service/transports/base.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 369 | 2018-11-28T07:01:00.000Z | 2022-03-28T09:53:22.000Z | # -*- coding: utf-8 -*-
# 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... | 35.93913 | 78 | 0.672151 |
4a100315d34b34bf3b4ae6917f7a0aee8da84fdd | 6,264 | py | Python | barry/cosmology/power_spectrum_smoothing.py | AaronGlanville/Barry | f181448b2ed10a8c08195e7e34819ceb8abfe532 | [
"MIT"
] | null | null | null | barry/cosmology/power_spectrum_smoothing.py | AaronGlanville/Barry | f181448b2ed10a8c08195e7e34819ceb8abfe532 | [
"MIT"
] | null | null | null | barry/cosmology/power_spectrum_smoothing.py | AaronGlanville/Barry | f181448b2ed10a8c08195e7e34819ceb8abfe532 | [
"MIT"
] | null | null | null | import logging
import math
import numpy as np
from scipy import integrate, interpolate, optimize
def get_smooth_methods_dict():
fns = {"hinton2017": smooth_hinton2017, "eh1998": smooth_eh1998}
return fns
def validate_smooth_method(method):
if method.lower() in get_smooth_methods_dict().keys():
r... | 31.796954 | 148 | 0.591156 |
4a100553d2ac271b6ec5ca21a795f40d72944902 | 4,989 | py | Python | spectree/response.py | robertmrk/spectree | 310bf5ae75d96dbba5ebbd967a73f1ded398c253 | [
"Apache-2.0"
] | null | null | null | spectree/response.py | robertmrk/spectree | 310bf5ae75d96dbba5ebbd967a73f1ded398c253 | [
"Apache-2.0"
] | null | null | null | spectree/response.py | robertmrk/spectree | 310bf5ae75d96dbba5ebbd967a73f1ded398c253 | [
"Apache-2.0"
] | null | null | null | from typing import Type
from pydantic import BaseModel
from .utils import get_model_key, parse_code
class Response:
"""
response object
:param codes: list of HTTP status code, format('HTTP_[0-9]{3}'), 'HTTP200'
:param code_models: dict of <HTTP status code>: <`pydantic.BaseModel`> or None
"""
... | 31.77707 | 83 | 0.596913 |
4a1007661a992d42cd07c8063889e126e56d54b3 | 2,036 | py | Python | molecule/java/tests/test_default.py | mvdheenux/OpenConext-deploy | 9c75866cba7675cafa8946e591ffac0fe528f7b3 | [
"Apache-2.0"
] | 11 | 2015-07-05T10:38:10.000Z | 2019-06-27T07:49:32.000Z | molecule/java/tests/test_default.py | mvdheenux/OpenConext-deploy | 9c75866cba7675cafa8946e591ffac0fe528f7b3 | [
"Apache-2.0"
] | 201 | 2015-02-03T14:52:30.000Z | 2022-03-09T08:45:00.000Z | molecule/java/tests/test_default.py | domgon/OpenConext-deploy | 80b28f59bdef2ac683744c07bb938c889cb43681 | [
"Apache-2.0"
] | 48 | 2015-03-10T13:28:23.000Z | 2021-11-28T23:15:32.000Z | import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_java_binary(host):
java_binary = host.file("/usr/bin/java")
command = host.run('/usr/bin/java -version 2>&1 | gr... | 34.508475 | 99 | 0.68664 |
4a10079d8a94179d7242bf6f672f63ffad30a4bf | 92,189 | py | Python | ortools/sat/python/cp_model.py | reachatul/or_tools | 50f90b0dc8a331092ad68b0d3919a503fb7cdd06 | [
"Apache-2.0"
] | null | null | null | ortools/sat/python/cp_model.py | reachatul/or_tools | 50f90b0dc8a331092ad68b0d3919a503fb7cdd06 | [
"Apache-2.0"
] | null | null | null | ortools/sat/python/cp_model.py | reachatul/or_tools | 50f90b0dc8a331092ad68b0d3919a503fb7cdd06 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010-2021 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... | 37.368869 | 85 | 0.625736 |
4a10087338abcfc3844a8bb0c65e411677ae489f | 279 | py | Python | toprepos/urls.py | sujpac/github-read-service | b4d691df91482867d4921c0df033a61040273fef | [
"MIT"
] | null | null | null | toprepos/urls.py | sujpac/github-read-service | b4d691df91482867d4921c0df033a61040273fef | [
"MIT"
] | null | null | null | toprepos/urls.py | sujpac/github-read-service | b4d691df91482867d4921c0df033a61040273fef | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import views
router = DefaultRouter()
router.register('', views.TopNReposViewSet, basename='top-n-repos-viewset')
urlpatterns = [
path('top/<int:N>/', include(router.urls)),
]
| 19.928571 | 75 | 0.741935 |
4a10092de7f02c55adbe616d479f72b5774d1e98 | 1,180 | py | Python | python/setup.py | jaimergp/openmm-plumed | db390e228c19ab0ec34bee8f98354475f29d168c | [
"Unlicense"
] | 19 | 2016-02-10T18:17:57.000Z | 2021-03-08T12:26:53.000Z | python/setup.py | jaimergp/openmm-plumed | db390e228c19ab0ec34bee8f98354475f29d168c | [
"Unlicense"
] | 35 | 2020-01-24T18:45:34.000Z | 2022-01-12T17:35:08.000Z | python/setup.py | jaimergp/openmm-plumed | db390e228c19ab0ec34bee8f98354475f29d168c | [
"Unlicense"
] | 13 | 2016-11-22T01:18:41.000Z | 2021-08-02T22:28:47.000Z | from distutils.core import setup
from distutils.extension import Extension
import os
import sys
import platform
openmm_dir = '@OPENMM_DIR@'
openmmplumed_header_dir = '@OPENMMPLUMED_HEADER_DIR@'
openmmplumed_library_dir = '@OPENMMPLUMED_LIBRARY_DIR@'
# setup extra compile and link arguments on Mac
extra_compile_args =... | 35.757576 | 106 | 0.649153 |
4a1009641df9063a4c46d668f0a3297a7668f762 | 3,673 | py | Python | src/google/auth/transport/_http_client.py | MarletteFunding/aws-kube-codesuite | ab4e5ce45416b83bffb947ab8d234df5437f4fca | [
"Apache-2.0"
] | 184 | 2017-12-20T21:50:06.000Z | 2022-03-19T13:24:58.000Z | src/google/auth/transport/_http_client.py | MarletteFunding/aws-kube-codesuite | ab4e5ce45416b83bffb947ab8d234df5437f4fca | [
"Apache-2.0"
] | 68 | 2016-12-12T20:38:47.000Z | 2020-07-26T18:28:49.000Z | src/google/auth/transport/_http_client.py | MarletteFunding/aws-kube-codesuite | ab4e5ce45416b83bffb947ab8d234df5437f4fca | [
"Apache-2.0"
] | 136 | 2018-01-09T22:52:06.000Z | 2022-02-24T13:26:18.000Z | # Copyright 2016 Google 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 agreed to in writing,... | 32.794643 | 78 | 0.642799 |
4a100a2fb40f3b7bde125003b838ddedc0a947e8 | 17,082 | py | Python | scripts/backend_tests.py | anubhavsinha98/oppia | 9a64ea2e91d2f471ce22bd39da77b43dccd5b51f | [
"Apache-2.0"
] | 1 | 2019-08-31T17:06:41.000Z | 2019-08-31T17:06:41.000Z | scripts/backend_tests.py | anubhavsinha98/oppia | 9a64ea2e91d2f471ce22bd39da77b43dccd5b51f | [
"Apache-2.0"
] | null | null | null | scripts/backend_tests.py | anubhavsinha98/oppia | 9a64ea2e91d2f471ce22bd39da77b43dccd5b51f | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 The Oppia 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 applicable ... | 37.215686 | 79 | 0.601101 |
4a100ab293fad5563e5bbac3bcced2b4f0ec1f1e | 12,955 | py | Python | tb_rest_client/models/models_ce/edge_info.py | jernkuan/thingsboard-python-rest-client | 3fb25272507494e6d494b27ca2380d3c543562e5 | [
"Apache-2.0"
] | null | null | null | tb_rest_client/models/models_ce/edge_info.py | jernkuan/thingsboard-python-rest-client | 3fb25272507494e6d494b27ca2380d3c543562e5 | [
"Apache-2.0"
] | null | null | null | tb_rest_client/models/models_ce/edge_info.py | jernkuan/thingsboard-python-rest-client | 3fb25272507494e6d494b27ca2380d3c543562e5 | [
"Apache-2.0"
] | 1 | 2021-11-26T11:24:56.000Z | 2021-11-26T11:24:56.000Z | # coding: utf-8
"""
ThingsBoard REST API
For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>. # noqa: E501
OpenAPI spec version: 2.0
Contact: info@thingsboard.io
Generated by: https://github.com/swagger-... | 27.273684 | 301 | 0.590351 |
4a100cd790fdd43e05bd9aaf06b10a8ca4d34eb8 | 1,903 | py | Python | utils/console.py | hndoss/EagleEye | 4ce6925dee2f7c23f5b1357d7e440956bd5869e2 | [
"WTFPL"
] | null | null | null | utils/console.py | hndoss/EagleEye | 4ce6925dee2f7c23f5b1357d7e440956bd5869e2 | [
"WTFPL"
] | null | null | null | utils/console.py | hndoss/EagleEye | 4ce6925dee2f7c23f5b1357d7e440956bd5869e2 | [
"WTFPL"
] | null | null | null | from termcolor import colored
import os
import getpass
VER = "0.2"
def banner():
logo = """
███████╗ █████╗ ██████╗ ██╗ ███████╗ ███████╗██╗ ██╗███████╗
██╔════╝██╔══██╗██╔════╝ ██║ ██╔════╝ ██╔════╝╚██╗ ██╔╝██╔════╝
█████╗ ███████║██║ ███╗██║ █████╗ Version █████╗ ╚████╔╝ █████╗ ... | 22.927711 | 111 | 0.347872 |
4a100d33d248681370edf8051a7f53eda3e067b4 | 6,262 | py | Python | oceanbolt/com/drydock_v3/services/drydock_service/transports/base.py | oceanbolt/oceanbolt-python-sdk | c03c400fb7861a7918c6d18d39ad7a108a72baab | [
"MIT"
] | 8 | 2021-04-15T08:43:55.000Z | 2021-12-21T09:23:58.000Z | oceanbolt/com/drydock_v3/services/drydock_service/transports/base.py | oceanbolt/oceanbolt-python-sdk | c03c400fb7861a7918c6d18d39ad7a108a72baab | [
"MIT"
] | null | null | null | oceanbolt/com/drydock_v3/services/drydock_service/transports/base.py | oceanbolt/oceanbolt-python-sdk | c03c400fb7861a7918c6d18d39ad7a108a72baab | [
"MIT"
] | 2 | 2022-01-16T11:43:51.000Z | 2022-03-24T19:26:44.000Z | # -*- coding: utf-8 -*-
# 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 o... | 37.053254 | 115 | 0.625998 |
4a100de7bfedb1234abd4920da2668d72f3e8af5 | 13,988 | py | Python | madminer/utils/interfaces/mg.py | alexander-held/madminer | c57989472bf42054821ef2357662b8b8e76b8afa | [
"MIT"
] | null | null | null | madminer/utils/interfaces/mg.py | alexander-held/madminer | c57989472bf42054821ef2357662b8b8e76b8afa | [
"MIT"
] | null | null | null | madminer/utils/interfaces/mg.py | alexander-held/madminer | c57989472bf42054821ef2357662b8b8e76b8afa | [
"MIT"
] | 1 | 2019-01-16T14:32:54.000Z | 2019-01-16T14:32:54.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
import os
import shutil
import logging
from madminer.utils.various import call_command, make_file_executable, create_missing_folders
logger = logging.getLogger(__name__)
def generate_mg_process(
mg_directory,
temp_directory,... | 34.79602 | 116 | 0.686446 |
4a100dea27eebcf11cfaf07e3bceb461054e6caa | 419 | py | Python | common/utils.py | jeina7/genie | b19e520a49c00b3ec846ee6a3d2219ae4549689e | [
"MIT"
] | null | null | null | common/utils.py | jeina7/genie | b19e520a49c00b3ec846ee6a3d2219ae4549689e | [
"MIT"
] | null | null | null | common/utils.py | jeina7/genie | b19e520a49c00b3ec846ee6a3d2219ae4549689e | [
"MIT"
] | null | null | null | import yaml
import os
phase = 'development'
root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), './'))
bigquery_config = yaml.load(
open(
os.path.join(root_path, 'config', 'bigquery.yaml'),
'r'
)
)
__all__ = ['phase', 'root_path', 'bigquery_config']
# CARDINAL_NUM
CARDINAL... | 16.115385 | 74 | 0.639618 |
4a100e6c521da58d42df7db74e3ac82d2d8ac7af | 2,029 | py | Python | wb/main/jobs/dev_cloud/profiling/handle_profiling_sockets_job.py | apaniukov/workbench | 2f2653ecfd0143d2d53e33ad84379f13443fdfaa | [
"Apache-2.0"
] | 23 | 2022-03-17T12:24:09.000Z | 2022-03-31T09:13:30.000Z | wb/main/jobs/dev_cloud/profiling/handle_profiling_sockets_job.py | apaniukov/workbench | 2f2653ecfd0143d2d53e33ad84379f13443fdfaa | [
"Apache-2.0"
] | 18 | 2022-03-21T08:17:44.000Z | 2022-03-30T12:42:30.000Z | wb/main/jobs/dev_cloud/profiling/handle_profiling_sockets_job.py | apaniukov/workbench | 2f2653ecfd0143d2d53e33ad84379f13443fdfaa | [
"Apache-2.0"
] | 16 | 2022-03-17T12:24:14.000Z | 2022-03-31T12:15:12.000Z | """
OpenVINO DL Workbench
Class for handling sockets of profiling from DevCloud service
Copyright (c) 2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.a... | 46.113636 | 95 | 0.78758 |
4a100f663eb13000d11efb2d1778af537a3df6e2 | 9,899 | py | Python | john_doe/cities/us/arkansas.py | xioren/JohnDoe | 4bd16f394709cac246438c8ffd650b4b301cb2b7 | [
"MIT"
] | null | null | null | john_doe/cities/us/arkansas.py | xioren/JohnDoe | 4bd16f394709cac246438c8ffd650b4b301cb2b7 | [
"MIT"
] | null | null | null | john_doe/cities/us/arkansas.py | xioren/JohnDoe | 4bd16f394709cac246438c8ffd650b4b301cb2b7 | [
"MIT"
] | null | null | null | cities = [
'Adona',
'Alco',
'Alexander',
'Alicia',
'Alix',
'Alleene',
'Alma',
'Almyra',
'Alpena',
'Alpine',
'Altheimer',
'Altus',
'Amagon',
'Amity',
'Antoine',
'Arkadelphia',
'Arkansas City',
'Armorel',
'Ash Flat',
'Ashdown',
'Atkins',
... | 15.8384 | 33 | 0.484291 |
4a101052d7314bff68636cd31ead6950d9c32199 | 17,609 | py | Python | core/models/conduct.py | u-n-i-c-o-rn/jimi | bbd647fa9cd4326305a33a99122d8d8a2614967d | [
"Apache-2.0"
] | 1 | 2021-03-14T21:27:51.000Z | 2021-03-14T21:27:51.000Z | core/models/conduct.py | u-n-i-c-o-rn/jimi | bbd647fa9cd4326305a33a99122d8d8a2614967d | [
"Apache-2.0"
] | null | null | null | core/models/conduct.py | u-n-i-c-o-rn/jimi | bbd647fa9cd4326305a33a99122d8d8a2614967d | [
"Apache-2.0"
] | null | null | null | import time
import copy
import traceback
import jimi
# Model Class
class _conduct(jimi.db._document):
name = str()
flow = list()
enabled = True
log = bool()
comment = str()
_dbCollection = jimi.db.db["conducts"]
def __init__(self):
# Cached lookups to limit reloading the same act... | 56.079618 | 290 | 0.559089 |
4a1010610e9cac290bacd99f3087c09af90339e1 | 62,296 | py | Python | src/biokbase/narrative/tests/test_jobcomm.py | charleshtrenholm/narrative | 054b52da816e4fd34bf376eef2bd79b241605714 | [
"MIT"
] | 13 | 2015-01-09T08:14:23.000Z | 2020-10-03T14:55:28.000Z | src/biokbase/narrative/tests/test_jobcomm.py | charleshtrenholm/narrative | 054b52da816e4fd34bf376eef2bd79b241605714 | [
"MIT"
] | 2,006 | 2015-01-04T01:18:31.000Z | 2022-03-31T21:08:22.000Z | src/biokbase/narrative/tests/test_jobcomm.py | charleshtrenholm/narrative | 054b52da816e4fd34bf376eef2bd79b241605714 | [
"MIT"
] | 78 | 2015-01-06T19:34:53.000Z | 2020-11-04T20:37:14.000Z | import unittest
from unittest import mock
import os
import itertools
import re
from biokbase.narrative.exception_util import transform_job_exception
from biokbase.narrative.jobs.jobcomm import exc_to_msg
import biokbase.narrative.jobs.jobcomm
import biokbase.narrative.jobs.jobmanager
from biokbase.narrative.jobs.jobma... | 35.822887 | 102 | 0.570518 |
4a101275b0bcb4402effa8fde80a3beb5034e6cf | 2,918 | py | Python | dsgrid/utils/utilities.py | dsgrid/dsgrid | a5eb4a0865b18fb5eb5fee838a37aa83f09e00d3 | [
"BSD-3-Clause"
] | 4 | 2021-12-10T21:20:45.000Z | 2022-01-05T00:27:53.000Z | dsgrid/utils/utilities.py | dsgrid/dsgrid | a5eb4a0865b18fb5eb5fee838a37aa83f09e00d3 | [
"BSD-3-Clause"
] | 21 | 2021-11-04T18:39:37.000Z | 2022-03-21T21:28:23.000Z | dsgrid/utils/utilities.py | dsgrid/dsgrid | a5eb4a0865b18fb5eb5fee838a37aa83f09e00d3 | [
"BSD-3-Clause"
] | null | null | null | """
Helpful utility functions for dsgrid
"""
import logging
import inspect
import json
import os
from enum import Enum
from prettytable import PrettyTable
try:
from IPython.display import display, HTML
from IPython import get_ipython
from ipykernel.zmqshell import ZMQInteractiveShell
_IPYTHON_INSTALL... | 21.93985 | 92 | 0.641535 |
4a1012c4f6515ccf32c600b3a8b1c754ac0bef28 | 886 | py | Python | python_modules/dagster/dagster/utils/yaml_utils.py | bambielli-flex/dagster | 30b75ba7c62fc536bc827f177c1dc6ba20f5ae20 | [
"Apache-2.0"
] | 1 | 2019-07-15T17:34:04.000Z | 2019-07-15T17:34:04.000Z | python_modules/dagster/dagster/utils/yaml_utils.py | bambielli-flex/dagster | 30b75ba7c62fc536bc827f177c1dc6ba20f5ae20 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/utils/yaml_utils.py | bambielli-flex/dagster | 30b75ba7c62fc536bc827f177c1dc6ba20f5ae20 | [
"Apache-2.0"
] | null | null | null | import glob
import yaml
from dagster import check
from .merger import dict_merge
def load_yaml_from_globs(*globs):
return load_yaml_from_glob_list(list(globs))
def load_yaml_from_glob_list(glob_list):
check.list_param(glob_list, 'glob_list', of_type=str)
all_files_list = []
for env_file_pattern ... | 23.315789 | 95 | 0.724605 |
4a1015a13e94f62a15e47cc23fc254f0d7306f66 | 26,071 | py | Python | gsm/utils.py | kernsuite-debian/gsm | a41e8b3ea26db94b3deb93bd413baa4a389fcaaa | [
"BSD-3-Clause"
] | null | null | null | gsm/utils.py | kernsuite-debian/gsm | a41e8b3ea26db94b3deb93bd413baa4a389fcaaa | [
"BSD-3-Clause"
] | null | null | null | gsm/utils.py | kernsuite-debian/gsm | a41e8b3ea26db94b3deb93bd413baa4a389fcaaa | [
"BSD-3-Clause"
] | null | null | null | # LOFAR IMAGING PIPELINE
#
# BBS Source Catalogue List
# Bart Scheers, 2011
# L.H.A.Scheers@u... | 44.642123 | 140 | 0.545664 |
4a1017204308da16bba3ad1fe17f4c178115bdf7 | 16,699 | py | Python | boost/libs/python/pyste/src/Pyste/GCCXMLParser.py | randolphwong/mcsema | eb5b376736e7f57ff0a61f7e4e5a436bbb874720 | [
"BSD-3-Clause"
] | 18 | 2016-03-04T15:44:24.000Z | 2021-12-31T11:06:25.000Z | boost/libs/python/pyste/src/Pyste/GCCXMLParser.py | randolphwong/mcsema | eb5b376736e7f57ff0a61f7e4e5a436bbb874720 | [
"BSD-3-Clause"
] | 49 | 2016-02-29T17:59:52.000Z | 2019-05-05T04:59:26.000Z | boost/libs/python/pyste/src/Pyste/GCCXMLParser.py | randolphwong/mcsema | eb5b376736e7f57ff0a61f7e4e5a436bbb874720 | [
"BSD-3-Clause"
] | 9 | 2015-09-09T02:38:32.000Z | 2021-01-30T00:24:24.000Z | # Copyright Bruno da Silva de Oliveira 2003. Use, modification and
# distribution is subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
from declarations import *
try:
# try to use internal elementtree
from xml.etree... | 34.862213 | 101 | 0.566441 |
4a1018acfd1fd0519e080d391a5926b974cd05ef | 7,553 | py | Python | densenetfinaltest.py | molyswu/Project | 5f36d07fa979c47110e5e80404b5ba55b6899b5a | [
"Apache-2.0"
] | 35 | 2017-09-08T13:24:30.000Z | 2022-03-01T01:22:01.000Z | densenetfinaltest.py | molyswu/Project | 5f36d07fa979c47110e5e80404b5ba55b6899b5a | [
"Apache-2.0"
] | 2 | 2018-02-28T07:29:54.000Z | 2019-04-29T10:37:29.000Z | densenetfinaltest.py | molyswu/Project | 5f36d07fa979c47110e5e80404b5ba55b6899b5a | [
"Apache-2.0"
] | 17 | 2017-11-21T10:49:47.000Z | 2021-03-19T08:16:40.000Z | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import numpy as np
import tensorflow as tf
def unpickle(file):
import _pickle as cPickle
fo = open(file, 'rb')
dict = cPickle.load(fo,encoding='latin1')
fo.close()
if 'data' in dict:
dict['data'] = dict['data... | 46.054878 | 133 | 0.617635 |
4a1018ce1f9deadba93be716e69faeccb6f65449 | 3,669 | py | Python | data_loader/datasets_importer/random_prid.py | Luxios22/Dual_Norm | b404a03b15fc05749e0c648d9e46ffe70f6b2a80 | [
"MIT"
] | null | null | null | data_loader/datasets_importer/random_prid.py | Luxios22/Dual_Norm | b404a03b15fc05749e0c648d9e46ffe70f6b2a80 | [
"MIT"
] | null | null | null | data_loader/datasets_importer/random_prid.py | Luxios22/Dual_Norm | b404a03b15fc05749e0c648d9e46ffe70f6b2a80 | [
"MIT"
] | null | null | null | import numpy as np
import os
import glob
import re
from .BaseDataset import BaseImageDataset
class PRID_AB(BaseImageDataset):
"""
A -> B
# WARNING: single shot instead of multiple shot.
pid >= 200 for unrelated gallery images.
"""
dataset_dir = 'PRID2011'
de... | 36.326733 | 116 | 0.605615 |
4a1018d3084d6c3371fab3686c9608ef0fd8a67e | 887 | py | Python | setup.py | nilsfast/turbines | c4269394a06f909868705b368861afaf69e8fe1e | [
"MIT"
] | 1 | 2022-02-09T09:10:08.000Z | 2022-02-09T09:10:08.000Z | setup.py | nilsfast/turbines | c4269394a06f909868705b368861afaf69e8fe1e | [
"MIT"
] | null | null | null | setup.py | nilsfast/turbines | c4269394a06f909868705b368861afaf69e8fe1e | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='turbines',
packages=find_packages(where='src'), #
version='0.0.1',
license='MIT',
description='Simple web framework for Python (obviously)',
author='Nils Fast', # Type in your name
author_email='', # Type in yo... | 30.586207 | 62 | 0.590755 |
4a1018ff29961a7a56ab75fa901774a94eecd2bb | 167 | py | Python | kokemomo/plugins/admin/__init__.py | Kokemomo/Kokemomo | 614504dc49b2f509b25c9ec2229f4438db73bab7 | [
"MIT"
] | 4 | 2016-06-12T13:19:23.000Z | 2020-01-29T09:46:15.000Z | kokemomo/plugins/admin/__init__.py | Kokemomo/Kokemomo | 614504dc49b2f509b25c9ec2229f4438db73bab7 | [
"MIT"
] | 67 | 2015-09-10T04:28:33.000Z | 2019-09-19T09:08:11.000Z | kokemomo/plugins/admin/__init__.py | Kokemomo/Kokemomo | 614504dc49b2f509b25c9ec2229f4438db73bab7 | [
"MIT"
] | 2 | 2016-06-13T11:20:42.000Z | 2016-07-22T07:44:31.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from kokemomo.plugins.admin.controller.km_admin import KMAdmin
__author__ = 'hiroki'
# 各コントローラの初期化
admin = KMAdmin()
| 15.181818 | 62 | 0.712575 |
4a101969796f8f85101b2e165550375c8761f404 | 12,952 | py | Python | src/data_loaders/attribute_annotation_data_loader.py | shigashiyama/seikanlp_sematt | b192c2568dc27cba497245a334baaa175b73270c | [
"MIT"
] | null | null | null | src/data_loaders/attribute_annotation_data_loader.py | shigashiyama/seikanlp_sematt | b192c2568dc27cba497245a334baaa175b73270c | [
"MIT"
] | null | null | null | src/data_loaders/attribute_annotation_data_loader.py | shigashiyama/seikanlp_sematt | b192c2568dc27cba497245a334baaa175b73270c | [
"MIT"
] | null | null | null | import sys
import constants, constants_sematt
import dictionary
from data_loaders import data_loader
from data_loaders.data_loader import DataLoader, Data, RestorableData
DELIM = ','
COLON = ':'
COLON_ALT = '^'
class AttributeAnnotationDataLoader(DataLoader):
def __init__(self,
token_index=1,
... | 37.760933 | 111 | 0.555435 |
4a101a5c8c176b7432f3b5f67b62be77493ab7c2 | 1,496 | py | Python | preprocessing/convertcsv2geojson.py | ellyrath/MIDSVizFinalProject | 6c07f819b558e490b8449535fea56561f30f272e | [
"MIT"
] | null | null | null | preprocessing/convertcsv2geojson.py | ellyrath/MIDSVizFinalProject | 6c07f819b558e490b8449535fea56561f30f272e | [
"MIT"
] | null | null | null | preprocessing/convertcsv2geojson.py | ellyrath/MIDSVizFinalProject | 6c07f819b558e490b8449535fea56561f30f272e | [
"MIT"
] | null | null | null | import csv, json
import sys
from geojson import Feature, FeatureCollection, Point
features = []
with open(sys.argv[1]) as csvfile:
reader = csv.reader(csvfile, delimiter=',')
rownum = 0
for line_ in reader:
if rownum == 0:
rownum = 1
continue
latitude = line_[4]
... | 29.92 | 63 | 0.509358 |
4a101b95a9f9b5b18ef9add61ed9b2d50a990060 | 288 | py | Python | app/manage.py | giordan83/dockdj | 8d57057b89cf2414e18e6cda733af944e32dbbe7 | [
"MIT"
] | 64 | 2015-10-04T02:54:06.000Z | 2021-03-30T04:02:47.000Z | app/manage.py | kodani/elasticdock | a413be1075a0b3c5ac77bb2686b97ac39ef5cb1d | [
"MIT"
] | 7 | 2015-10-05T15:11:34.000Z | 2017-10-30T03:44:03.000Z | app/manage.py | kodani/elasticdock | a413be1075a0b3c5ac77bb2686b97ac39ef5cb1d | [
"MIT"
] | 15 | 2015-11-13T21:02:48.000Z | 2019-10-01T08:06:01.000Z | #!/usr/bin/env python
"""Django's command line utility."""
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 22.153846 | 71 | 0.756944 |
4a101bb74cf1b1af872e58af10edf0946b8d8d64 | 2,064 | py | Python | lib/constants.py | sebbASF/steve | 14959c1861e421b642e08463c6ae2240ef3d39a4 | [
"Apache-2.0"
] | 12 | 2016-02-06T08:59:56.000Z | 2022-03-06T17:25:47.000Z | lib/constants.py | sebbASF/steve | 14959c1861e421b642e08463c6ae2240ef3d39a4 | [
"Apache-2.0"
] | 1 | 2021-11-02T12:01:56.000Z | 2021-11-02T12:01:56.000Z | lib/constants.py | isabella232/steve-1 | a642241836919199e590cd1b1c2a2f1560d4898a | [
"Apache-2.0"
] | 9 | 2016-03-08T16:17:44.000Z | 2022-02-25T00:11:43.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 28.666667 | 98 | 0.622093 |
4a101c843b256d19167e87920a37c193c70dc85e | 1,135 | py | Python | mlmodels/model_tf/misc/tf_serving/16.celery-hadoop-flask-text-classification/classification.py | gitter-badger/mlmodels | f08cc9b6ec202d4ad25ecdda2f44487da387569d | [
"MIT"
] | 1 | 2022-03-11T07:57:48.000Z | 2022-03-11T07:57:48.000Z | mlmodels/model_tf/misc/tf_serving/16.celery-hadoop-flask-text-classification/classification.py | whitetiger1002/mlmodels | f70f1da7434e8855eed50adc67b49cc169f2ea24 | [
"MIT"
] | null | null | null | mlmodels/model_tf/misc/tf_serving/16.celery-hadoop-flask-text-classification/classification.py | whitetiger1002/mlmodels | f70f1da7434e8855eed50adc67b49cc169f2ea24 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import json
import sys
import numpy as np
import tensorflow as tf
def load_graph(frozen_graph_filename):
with tf.gfile.GFile(frozen_graph_filename, "rb") as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
with tf.Graph().as_default() as graph:
... | 27.02381 | 64 | 0.651101 |
4a101caac4555d82c9d858f22bdc290f0174718d | 1,968 | py | Python | castle-dragonsnax.py | Arihant25/beginner-python-projects | 43c6489b6973522246073f2187a682487f1684c1 | [
"Unlicense"
] | 1 | 2020-06-11T06:10:08.000Z | 2020-06-11T06:10:08.000Z | castle-dragonsnax.py | Arihant25/beginner-python-projects | 43c6489b6973522246073f2187a682487f1684c1 | [
"Unlicense"
] | 1 | 2021-07-16T03:50:09.000Z | 2021-07-16T04:00:35.000Z | castle-dragonsnax.py | Arihant25/beginner-python-projects | 43c6489b6973522246073f2187a682487f1684c1 | [
"Unlicense"
] | 1 | 2021-07-16T03:28:39.000Z | 2021-07-16T03:28:39.000Z |
import random
exitChoice = "Nothing"
while exitChoice != "EXIT":
print("You are in a dark room in a mysterious castle.")
print("In front of you are four doors. You must choose one.")
playerChoice = input("Choose 1, 2, 3 or 4...")
if playerChoice == "1":
print("You find a room full of treasure... | 45.767442 | 102 | 0.594512 |
4a101e16cf4938fb1d8c9520b0bae4a4af1ef4ce | 86 | py | Python | chmod_monkey/__version__.py | Toilal/python-chmod-monkey | 66cc5c441152845f1d28a8a10357d94da4815381 | [
"MIT"
] | 4 | 2020-05-12T08:05:32.000Z | 2022-03-14T02:41:19.000Z | chmod_monkey/__version__.py | Toilal/python-chmod-monkey | 66cc5c441152845f1d28a8a10357d94da4815381 | [
"MIT"
] | null | null | null | chmod_monkey/__version__.py | Toilal/python-chmod-monkey | 66cc5c441152845f1d28a8a10357d94da4815381 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# pragma: no cover
"""
Version
"""
__version__ = '1.1.2.dev0'
| 12.285714 | 26 | 0.55814 |
4a101e82b21156acf5cc712672e7ef78648ce25f | 1,419 | py | Python | kas/__version__.py | texierp/kas | 71b9c43472acefd7b516899e1da78a5c6853681b | [
"MIT"
] | null | null | null | kas/__version__.py | texierp/kas | 71b9c43472acefd7b516899e1da78a5c6853681b | [
"MIT"
] | null | null | null | kas/__version__.py | texierp/kas | 71b9c43472acefd7b516899e1da78a5c6853681b | [
"MIT"
] | null | null | null | # kas - setup tool for bitbake based projects
#
# Copyright (c) Siemens AG, 2017-2018
#
# 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 r... | 43 | 79 | 0.770261 |
4a101e8a2e4d722cd7d080671281ae305a97f064 | 1,312 | py | Python | help/app/uploader.py | relarizky/flask-pre-order | d336c179414892a8fad4bdbe63c8cb5449921729 | [
"MIT"
] | null | null | null | help/app/uploader.py | relarizky/flask-pre-order | d336c179414892a8fad4bdbe63c8cb5449921729 | [
"MIT"
] | null | null | null | help/app/uploader.py | relarizky/flask-pre-order | d336c179414892a8fad4bdbe63c8cb5449921729 | [
"MIT"
] | null | null | null | # Author : Relarizky
# Github : https://github.com/relarizky
# File Name : help/app/uploader.py
# Last Modified : 01/27/21, 21:58 PM
# Copyright © Relarizky 2021
from typing import Union
from help.hash import create_md5
from werkzeug.utils import secure_filename
from werkzeug.datastructures import FileStorage
... | 23.017544 | 75 | 0.610518 |
4a101f9234aa1910415a6bc89ceb6f618802bf87 | 20,683 | py | Python | moto/ec2/utils.py | Preskton/moto | c9c30b82867294030833cef292db167955bc8240 | [
"Apache-2.0"
] | 1 | 2021-02-24T05:48:54.000Z | 2021-02-24T05:48:54.000Z | moto/ec2/utils.py | Preskton/moto | c9c30b82867294030833cef292db167955bc8240 | [
"Apache-2.0"
] | null | null | null | moto/ec2/utils.py | Preskton/moto | c9c30b82867294030833cef292db167955bc8240 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import base64
import hashlib
import fnmatch
import random
import re
import six
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
from moto.core import ACCO... | 31.82 | 164 | 0.672436 |
4a101fa05af9993f3fee44299a65e9e40e288715 | 422 | py | Python | ccpy/common.py | kindkaktus/CcPy | 8df2e445b254cbb456e379950c495ef55f984b72 | [
"BSD-3-Clause"
] | null | null | null | ccpy/common.py | kindkaktus/CcPy | 8df2e445b254cbb456e379950c495ef55f984b72 | [
"BSD-3-Clause"
] | 1 | 2015-05-19T05:50:41.000Z | 2015-06-01T12:31:52.000Z | ccpy/common.py | kindkaktus/CcPy | 8df2e445b254cbb456e379950c495ef55f984b72 | [
"BSD-3-Clause"
] | null | null | null | #
# Andrei Korostelev <andrei at korostelev dot net>
#
# Before using this product in any way please read the license agreement.
# If you do not agree to the terms in this agreement you are not allowed
# to use this product or parts of it. You can read this license in the
# file named LICENSE.
#
"""
CcPy global v... | 23.444444 | 74 | 0.722749 |
4a10203d22b78d0dcea4103a9438f47814f260d2 | 1,884 | py | Python | dewiki_functions.py | tonypdmtr/PlainTextWikipedia | 7e6ec7ddaf2e9c7f6daaf0807fc611e1b86fedcf | [
"MIT"
] | 199 | 2020-11-24T21:47:06.000Z | 2022-02-01T21:07:50.000Z | dewiki_functions.py | tonypdmtr/PlainTextWikipedia | 7e6ec7ddaf2e9c7f6daaf0807fc611e1b86fedcf | [
"MIT"
] | 6 | 2021-04-06T17:27:18.000Z | 2021-04-21T16:39:38.000Z | dewiki_functions.py | tonypdmtr/PlainTextWikipedia | 7e6ec7ddaf2e9c7f6daaf0807fc611e1b86fedcf | [
"MIT"
] | 17 | 2020-11-24T21:47:03.000Z | 2021-09-14T01:08:19.000Z | from threading import Thread
import json
import re
from html2text import html2text as htt
import wikitextparser as wtp
def dewiki(text):
text = wtp.parse(text).plain_text() # wiki to plaintext
text = htt(text) # remove any HTML
text = text.replace('\\n',' ') # replace newlines
text = re.sub('\s+',... | 34.888889 | 91 | 0.570064 |
4a10222e0295891ea117c70d9a6eea9c9be4eb5b | 796 | py | Python | manage.py | PuzzlehuntAtoZany/online-puzzle-hunt | 9f91e6b211a7ec83a08f7cf9810cc0667d452a93 | [
"MIT"
] | null | null | null | manage.py | PuzzlehuntAtoZany/online-puzzle-hunt | 9f91e6b211a7ec83a08f7cf9810cc0667d452a93 | [
"MIT"
] | null | null | null | manage.py | PuzzlehuntAtoZany/online-puzzle-hunt | 9f91e6b211a7ec83a08f7cf9810cc0667d452a93 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gph.settings.dev')
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the... | 34.608696 | 77 | 0.638191 |
4a102331db860b40998406b10807103c8f9c30f8 | 591 | py | Python | src/article/urls.py | metinonat/Django-Blog | d8e3f736bea36f56059bb1e6ad770ffb76a291a4 | [
"MIT"
] | 1 | 2020-02-03T21:18:51.000Z | 2020-02-03T21:18:51.000Z | src/article/urls.py | metinonat/Django-Blog | d8e3f736bea36f56059bb1e6ad770ffb76a291a4 | [
"MIT"
] | null | null | null | src/article/urls.py | metinonat/Django-Blog | d8e3f736bea36f56059bb1e6ad770ffb76a291a4 | [
"MIT"
] | null | null | null | from django.urls import path,include
from article.views import ArticleListView, ArticleCreateView, ArticleDetailView, ArticleUpdateView, ArticleDeleteView
urlpatterns = [
path('', ArticleListView.as_view(), name='articles'),
path('create', ArticleCreateView.as_view(), name='article_create'),
path('detail/<... | 59.1 | 117 | 0.751269 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.