hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
594cc653ec79a656a999da000662af797c265edc | 669 | py | Python | source/try_init_models.py | tuanle618/deepArt-generation | bfa11d9f2a825ed53420f85adf3ffe23966b42be | [
"MIT"
] | 8 | 2019-03-25T14:53:55.000Z | 2022-01-09T11:08:30.000Z | source/try_init_models.py | ptl93/deepArt-generation | bfa11d9f2a825ed53420f85adf3ffe23966b42be | [
"MIT"
] | 10 | 2020-01-28T21:56:49.000Z | 2022-02-10T00:10:30.000Z | source/try_init_models.py | ptl93/deepArt-generation | bfa11d9f2a825ed53420f85adf3ffe23966b42be | [
"MIT"
] | 5 | 2019-03-18T13:46:26.000Z | 2022-02-20T15:05:56.000Z | # -*- coding: utf-8 -*-
"""
@title: try_init_models.py
@author: Tuan Le
@email: tuanle@hotmail.de
"""
from dcgan import DCGAN
from vae import VAE
if __name__ == "__main__":
print("Init DCGAN_1 model...")
dcgan_1 = DCGAN(name='DCGAN_1')
print("Init DCGAN_2 model...")
dcgan_2 = DCGAN(name='DCGAN_2... | 20.90625 | 35 | 0.588939 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 318 | 0.475336 |
3ca0c10499ba17cd0bb023edc1433da2fe3b0c6e | 1,144 | py | Python | 03. Programacion orientada a objetos/12. sobrecarga relacional/e1.py | Cidryl/python-desde-cero | fade09d13ab0ed0cbb4f45a49a4ad9e3980f3276 | [
"MIT"
] | null | null | null | 03. Programacion orientada a objetos/12. sobrecarga relacional/e1.py | Cidryl/python-desde-cero | fade09d13ab0ed0cbb4f45a49a4ad9e3980f3276 | [
"MIT"
] | null | null | null | 03. Programacion orientada a objetos/12. sobrecarga relacional/e1.py | Cidryl/python-desde-cero | fade09d13ab0ed0cbb4f45a49a4ad9e3980f3276 | [
"MIT"
] | null | null | null | class Persona:
def __init__(self,nombre, edad):
self.nombre=nombre
self.edad=edad
def __eq__(self,objeto2):
if self.edad==objeto2.edad:
return True
else:
return False
def __ne__(self,objeto2):
if self.edad!=o... | 22.88 | 52 | 0.523601 | 940 | 0.821678 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.083916 |
3ca23892448af2cabbc53d9df0bfd9fc4244b346 | 1,416 | py | Python | crack-data-structures-and-algorithms/leetcode/sort_list_q148.py | Watch-Later/Eureka | 3065e76d5bf8b37d5de4f9ee75b2714a42dd4c35 | [
"MIT"
] | 20 | 2016-05-16T11:09:04.000Z | 2021-12-08T09:30:33.000Z | crack-data-structures-and-algorithms/leetcode/sort_list_q148.py | Watch-Later/Eureka | 3065e76d5bf8b37d5de4f9ee75b2714a42dd4c35 | [
"MIT"
] | 1 | 2018-12-30T09:55:31.000Z | 2018-12-30T14:08:30.000Z | crack-data-structures-and-algorithms/leetcode/sort_list_q148.py | Watch-Later/Eureka | 3065e76d5bf8b37d5de4f9ee75b2714a42dd4c35 | [
"MIT"
] | 11 | 2016-05-02T09:17:12.000Z | 2021-12-08T09:30:35.000Z | # Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
class Solution(object):
def sortList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
return merge_sort_list(head)
def merge_sort... | 22.47619 | 89 | 0.57274 | 264 | 0.186441 | 0 | 0 | 0 | 0 | 0 | 0 | 501 | 0.353814 |
3ca2ace31bf9ede1d629dd5fbae03c55bc75f2bf | 71 | py | Python | labs/py3code.py | turing4ever/illustrated-python-3-course | d1faff57590713fcd1c6a9215529d6f9c629b046 | [
"MIT"
] | 57 | 2018-04-25T21:57:07.000Z | 2021-12-21T19:09:00.000Z | labs/py3code.py | radovankavicky/illustrated-python-3-course | d1faff57590713fcd1c6a9215529d6f9c629b046 | [
"MIT"
] | 4 | 2018-04-30T05:32:46.000Z | 2021-12-06T17:55:36.000Z | labs/py3code.py | radovankavicky/illustrated-python-3-course | d1faff57590713fcd1c6a9215529d6f9c629b046 | [
"MIT"
] | 26 | 2018-04-27T06:11:35.000Z | 2021-04-11T12:07:37.000Z |
# place super_test.py code here
# place keyword_test.py code here
| 8.875 | 33 | 0.732394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.901408 |
3ca2e7b053503c5f1274ef05c3605bdeeddc592f | 71,712 | py | Python | Source Codes/CDBC_Source_Code.py | CDBCTool/CDBC | 70e64241e4fb7687832e3771f316cb036f6fc3c7 | [
"MIT"
] | 13 | 2019-05-13T22:45:32.000Z | 2022-02-27T07:19:16.000Z | Source Codes/CDBC_Source_Code.py | CDBCTool/CDBC | 70e64241e4fb7687832e3771f316cb036f6fc3c7 | [
"MIT"
] | 2 | 2019-09-03T03:57:06.000Z | 2021-11-21T14:01:31.000Z | Source Codes/CDBC_Source_Code.py | CDBCTool/CDBC | 70e64241e4fb7687832e3771f316cb036f6fc3c7 | [
"MIT"
] | 3 | 2019-11-04T17:05:02.000Z | 2021-12-29T18:14:51.000Z | from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys,os,time
from scipy.stats import gamma, norm, beta
import matplotlib.pyplot as plt
from datetime import date, timedelta
import numpy as np
import tkinter
from os import listdir
from os.path import isfile, join
def sorted_values(Obs,Sim):
co... | 45.76388 | 228 | 0.526146 | 69,649 | 0.971205 | 0 | 0 | 0 | 0 | 0 | 0 | 15,767 | 0.219859 |
3ca4fb77d1058786e6c3813cfbd46b9161c2b28a | 3,473 | py | Python | lagom/core/es/base_es_master.py | lkylych/lagom | 64777be7f09136072a671c444b5b3fbbcb1b2f18 | [
"MIT"
] | null | null | null | lagom/core/es/base_es_master.py | lkylych/lagom | 64777be7f09136072a671c444b5b3fbbcb1b2f18 | [
"MIT"
] | null | null | null | lagom/core/es/base_es_master.py | lkylych/lagom | 64777be7f09136072a671c444b5b3fbbcb1b2f18 | [
"MIT"
] | null | null | null | from lagom.core.multiprocessing import BaseIterativeMaster
class BaseESMaster(BaseIterativeMaster):
"""
Base class for master of parallelized evolution strategies (ES).
It internally defines an ES algorithm.
In each generation, it distributes all sampled solution candidates, each for one worker... | 37.344086 | 98 | 0.600921 | 3,412 | 0.982436 | 0 | 0 | 0 | 0 | 0 | 0 | 2,091 | 0.602073 |
3ca513ca1cc8091c31b7381ae44ccedd1283fc01 | 1,096 | py | Python | Roman_Morozov_dz_3/task_5.py | Wern-rm/2074_GB_Python | f0b7a7f4ed993a007c1aef6ec9ce266adb5a3646 | [
"MIT"
] | null | null | null | Roman_Morozov_dz_3/task_5.py | Wern-rm/2074_GB_Python | f0b7a7f4ed993a007c1aef6ec9ce266adb5a3646 | [
"MIT"
] | null | null | null | Roman_Morozov_dz_3/task_5.py | Wern-rm/2074_GB_Python | f0b7a7f4ed993a007c1aef6ec9ce266adb5a3646 | [
"MIT"
] | null | null | null | """
Реализовать функцию get_jokes(), возвращающую n шуток, сформированных из трех случайных слов, взятых из трёх списков (по одному из каждого):
"""
import random
nouns = ["автомобиль", "лес", "огонь", "город", "дом"]
adverbs = ["сегодня", "вчера", "завтра", "позавчера", "ночью"]
adjectives = ["веселый", "яркий", "зе... | 40.592593 | 140 | 0.666058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 482 | 0.373065 |
3ca67e9442436a3a4c05f92ccc99c1b4150df427 | 11,217 | py | Python | tools.py | akerestely/nonlinearBestFit | e45b5e33dd8fdfc2f9bd19b48523b1759e694fc4 | [
"MIT"
] | 1 | 2019-10-09T07:39:55.000Z | 2019-10-09T07:39:55.000Z | tools.py | akerestely/nonlinearBestFit | e45b5e33dd8fdfc2f9bd19b48523b1759e694fc4 | [
"MIT"
] | null | null | null | tools.py | akerestely/nonlinearBestFit | e45b5e33dd8fdfc2f9bd19b48523b1759e694fc4 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
np.random.seed(421)
def hCG(x: np.ndarray, A: float, B: float, alpha: float):
return A * np.exp(-alpha * x) + B
def gen_rand_points(n: int, A: float = 1000, B: float = 3, alpha: float = 0.01, noise: float = 2, consecutive: bool = False):
"""
:param n: number of poin... | 36.537459 | 174 | 0.61594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,250 | 0.200588 |
3ca799dcd7f204dd2b5700a464c22a2701817676 | 925 | py | Python | Section 2 - Data (variables, assignments and expressions)/Breakouts/Breakout 2.2 - ATM/convert pseudo-code solution.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | 10 | 2020-02-14T14:28:15.000Z | 2022-02-02T18:44:11.000Z | Section 2 - Data (variables, assignments and expressions)/Breakouts/Breakout 2.2 - ATM/convert pseudo-code solution.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | null | null | null | Section 2 - Data (variables, assignments and expressions)/Breakouts/Breakout 2.2 - ATM/convert pseudo-code solution.py | gitjot/python-for-lccs | a8a4ae8847abbc33361f80183c06d57b20523382 | [
"CC0-1.0"
] | 8 | 2020-03-25T09:27:42.000Z | 2021-11-03T15:24:38.000Z | # Event: LCCS Python Fundamental Skills Workshop
# Date: May 2018
# Author: Joe English, PDST
# eMail: computerscience@pdst.ie
# Purpose: Solution to Breakout 2.2 (ATM)
# Display a welcome message
print("Welcome to LCCS Bank Ltd.")
print("=========================")
# Initialise a variable called balance to... | 27.205882 | 52 | 0.692973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 687 | 0.742703 |
3ca93bc9e19f578ac6c9e0e416c1d3d6ec54c6d4 | 460 | py | Python | src/unit6/user/user_datastore.py | cdoremus/udacity-python_web_development-cs253 | 87cf5dd5d0e06ee745d3aba058d96fa46f2aeb6b | [
"Apache-2.0"
] | null | null | null | src/unit6/user/user_datastore.py | cdoremus/udacity-python_web_development-cs253 | 87cf5dd5d0e06ee745d3aba058d96fa46f2aeb6b | [
"Apache-2.0"
] | null | null | null | src/unit6/user/user_datastore.py | cdoremus/udacity-python_web_development-cs253 | 87cf5dd5d0e06ee745d3aba058d96fa46f2aeb6b | [
"Apache-2.0"
] | null | null | null | '''
Created on Apr 30, 2012
@author: h87966
'''
class UserDataStore():
'''
classdocs
'''
def __init__(self):
'''
Constructor
'''
def save(self, user):
pass
def delete(self, user_id):
pass
def fetch(self, user_i... | 12.777778 | 40 | 0.43913 | 410 | 0.891304 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.234783 |
3ca9eb97e4365037a9faa4fd695283f51ac6d5a4 | 3,870 | py | Python | sciflo/utils/mail.py | hysds/sciflo | f706288405c8eee59a2f883bab3dcb5229615367 | [
"Apache-2.0"
] | null | null | null | sciflo/utils/mail.py | hysds/sciflo | f706288405c8eee59a2f883bab3dcb5229615367 | [
"Apache-2.0"
] | null | null | null | sciflo/utils/mail.py | hysds/sciflo | f706288405c8eee59a2f883bab3dcb5229615367 | [
"Apache-2.0"
] | 1 | 2019-02-07T01:08:34.000Z | 2019-02-07T01:08:34.000Z | from smtplib import SMTP
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email.header import Header
from email.utils import parseaddr, formataddr, COMMASPACE, formatdate
from email.encoders import encode_base64
def send_email(sender, cc_rec... | 42.527473 | 103 | 0.708527 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,435 | 0.370801 |
3caa5d8aa46dcaada0dadcfe04d781f5ae6b979d | 496 | py | Python | my-ml-api/api/schemas.py | ballcarsen/MyMlTool | eb476e21799ec773fa816f63693e6de4c52d0094 | [
"MIT"
] | null | null | null | my-ml-api/api/schemas.py | ballcarsen/MyMlTool | eb476e21799ec773fa816f63693e6de4c52d0094 | [
"MIT"
] | null | null | null | my-ml-api/api/schemas.py | ballcarsen/MyMlTool | eb476e21799ec773fa816f63693e6de4c52d0094 | [
"MIT"
] | null | null | null | from typing import List, Optional
from pydantic import BaseModel
class UploadBase(BaseModel):
file_name: str
user_id: int
class UploadCreate(UploadBase):
pass
class Upload(UploadBase):
upload_id: int
class Config:
orm_mode = True
class UserBase(BaseModel):
first_name: str
l... | 13.777778 | 33 | 0.677419 | 413 | 0.832661 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3caab00869605f81530d9a70561508995ff52b3b | 2,467 | py | Python | apps/extention/views/tool.py | rainydaygit/testtcloudserver | 8037603efe4502726a4d794fb1fc0a3f3cc80137 | [
"MIT"
] | 349 | 2020-08-04T10:21:01.000Z | 2022-03-23T08:31:29.000Z | apps/extention/views/tool.py | rainydaygit/testtcloudserver | 8037603efe4502726a4d794fb1fc0a3f3cc80137 | [
"MIT"
] | 2 | 2021-01-07T06:17:05.000Z | 2021-04-01T06:01:30.000Z | apps/extention/views/tool.py | rainydaygit/testtcloudserver | 8037603efe4502726a4d794fb1fc0a3f3cc80137 | [
"MIT"
] | 70 | 2020-08-24T06:46:14.000Z | 2022-03-25T13:23:27.000Z | from flask import Blueprint
from apps.extention.business.tool import ToolBusiness
from apps.extention.extentions import validation, parse_json_form
from library.api.render import json_detail_render
tool = Blueprint('tool', __name__)
@tool.route('/ip', methods=['GET'])
def tool_ip():
"""
@api {get} /v1/tool/... | 29.369048 | 115 | 0.614512 | 0 | 0 | 0 | 0 | 2,300 | 0.905155 | 0 | 0 | 1,844 | 0.725699 |
3cab08629b30111114e01484ab49b594bbdb9dd0 | 3,948 | py | Python | apt_repoman/connection.py | memory/repoman | 4c5cdfba85afcab5a1219fa5629abc457de27ed5 | [
"Apache-2.0"
] | 1 | 2017-07-01T21:46:40.000Z | 2017-07-01T21:46:40.000Z | apt_repoman/connection.py | memory/repoman | 4c5cdfba85afcab5a1219fa5629abc457de27ed5 | [
"Apache-2.0"
] | null | null | null | apt_repoman/connection.py | memory/repoman | 4c5cdfba85afcab5a1219fa5629abc457de27ed5 | [
"Apache-2.0"
] | 6 | 2017-07-13T21:41:14.000Z | 2020-08-07T19:40:25.000Z |
# stdlib imports
import logging
import time
# pypi imports
from boto3 import Session
LOG = logging.getLogger(__name__)
class Connection(object):
def __init__(self, role_arn='', profile_name='', region=None):
self._log = LOG or logging.getLogger(__name__)
self.role_arn = role_arn
self.... | 31.584 | 76 | 0.563323 | 3,822 | 0.968085 | 0 | 0 | 1,392 | 0.352584 | 0 | 0 | 880 | 0.222898 |
3cabc6bebd08e9407e6c12b5afc414ea98b75d01 | 1,412 | py | Python | setup.py | squidfarts/py-program | 98c3694ffa90b5969eafe1093def9097dfd0d62c | [
"Apache-2.0"
] | null | null | null | setup.py | squidfarts/py-program | 98c3694ffa90b5969eafe1093def9097dfd0d62c | [
"Apache-2.0"
] | null | null | null | setup.py | squidfarts/py-program | 98c3694ffa90b5969eafe1093def9097dfd0d62c | [
"Apache-2.0"
] | 1 | 2021-02-19T20:32:33.000Z | 2021-02-19T20:32:33.000Z | #!/user/bin/env python3
###################################################################################
# #
# NAME: setup.py #
# ... | 50.428571 | 83 | 0.24221 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,224 | 0.866856 |
3cac0aa35252a097de5d59a421a354021c1ccdfa | 21,267 | py | Python | paul_analysis/Python/labird/fieldize.py | lzkelley/arepo-mbh-sims_analysis | f14519552cedd39a040b53e6d7cc538b5b8f38a3 | [
"MIT"
] | null | null | null | paul_analysis/Python/labird/fieldize.py | lzkelley/arepo-mbh-sims_analysis | f14519552cedd39a040b53e6d7cc538b5b8f38a3 | [
"MIT"
] | null | null | null | paul_analysis/Python/labird/fieldize.py | lzkelley/arepo-mbh-sims_analysis | f14519552cedd39a040b53e6d7cc538b5b8f38a3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Methods for interpolating particle lists onto a grid. There are three classic methods:
ngp - Nearest grid point (point interpolation)
cic - Cloud in Cell (linear interpolation)
tsc - Triangular Shaped Cloud (quadratic interpolation)
Each function takes inputs:
Values ... | 34.246377 | 137 | 0.590022 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,322 | 0.579395 |
3cad04b55e10337da5937edce699d46c3369e96d | 1,607 | py | Python | epytope/test/DummyAdapter.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 7 | 2021-02-01T18:11:28.000Z | 2022-01-31T19:14:07.000Z | epytope/test/DummyAdapter.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 22 | 2021-01-02T15:25:23.000Z | 2022-03-14T11:32:53.000Z | epytope/test/DummyAdapter.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 4 | 2021-05-28T08:50:38.000Z | 2022-03-14T11:45:32.000Z | # This code is part of the epytope distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""
.. module:: DummyAdaper
:synopsis: Contains a pseudo data base adapter for testing purposes.
.. moduleauthor:: schubert, brachvogel
"""
import copy... | 31.509804 | 73 | 0.6229 | 1,221 | 0.759801 | 0 | 0 | 0 | 0 | 0 | 0 | 805 | 0.500933 |
3cad775a80e54adc9a4854ed12070f7e895a7dd6 | 2,819 | py | Python | backend/plugins/nav_bar/migrations/0008_migrate_to_link_all_base.py | marksweb/django-cms-60min-demo-2021 | d9ca83538d6c5c7a0b0e1a18ae1a15bda4c296e4 | [
"MIT"
] | null | null | null | backend/plugins/nav_bar/migrations/0008_migrate_to_link_all_base.py | marksweb/django-cms-60min-demo-2021 | d9ca83538d6c5c7a0b0e1a18ae1a15bda4c296e4 | [
"MIT"
] | 1 | 2022-01-15T11:29:16.000Z | 2022-01-15T22:11:45.000Z | backend/plugins/nav_bar/migrations/0008_migrate_to_link_all_base.py | marksweb/django-cms-60min-demo-2021 | d9ca83538d6c5c7a0b0e1a18ae1a15bda4c296e4 | [
"MIT"
] | 3 | 2022-01-14T15:55:00.000Z | 2022-01-23T23:46:56.000Z | # Generated by Django 2.2.16 on 2020-09-17 16:00
from django.db import migrations, models
import django.db.models.deletion
import enumfields.fields
import link_all.models
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('nav_bar', '0007_... | 38.616438 | 171 | 0.630011 | 2,644 | 0.937921 | 0 | 0 | 0 | 0 | 0 | 0 | 743 | 0.263569 |
3cadd23dc28e0931be3476bf361e1ba65acc6956 | 4,187 | py | Python | test/unit/utils/test_expiration_queue.py | dolphinridercrypto/bxcommon | 8f70557c1dbff785a5dd3fcdf91176066e085c3a | [
"MIT"
] | 12 | 2019-11-06T17:39:10.000Z | 2022-03-01T11:26:19.000Z | test/unit/utils/test_expiration_queue.py | dolphinridercrypto/bxcommon | 8f70557c1dbff785a5dd3fcdf91176066e085c3a | [
"MIT"
] | 8 | 2019-11-06T21:31:11.000Z | 2021-06-02T00:46:50.000Z | test/unit/utils/test_expiration_queue.py | dolphinridercrypto/bxcommon | 8f70557c1dbff785a5dd3fcdf91176066e085c3a | [
"MIT"
] | 5 | 2019-11-14T18:08:11.000Z | 2022-02-08T09:36:22.000Z | import time
import unittest
from mock import MagicMock
from bxcommon.utils.expiration_queue import ExpirationQueue
class ExpirationQueueTests(unittest.TestCase):
def setUp(self):
self.time_to_live = 60
self.queue = ExpirationQueue(self.time_to_live)
self.removed_items = []
def test_... | 34.319672 | 106 | 0.662288 | 4,067 | 0.97134 | 0 | 0 | 0 | 0 | 0 | 0 | 297 | 0.070934 |
3caefd3f5a8bfe14855d5ea0372e3bc9a9317bc4 | 480 | py | Python | legacy-code/pailindrome.py | developbiao/pythonbasics | a7549786629e820646dcde5bb9f1aad4331de9be | [
"MIT"
] | 1 | 2019-06-13T15:33:57.000Z | 2019-06-13T15:33:57.000Z | legacy-code/pailindrome.py | developbiao/pythonbasics | a7549786629e820646dcde5bb9f1aad4331de9be | [
"MIT"
] | null | null | null | legacy-code/pailindrome.py | developbiao/pythonbasics | a7549786629e820646dcde5bb9f1aad4331de9be | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
def is_palindrome(n):
x = n
op_num = 0
while n:
op_num = op_num * 10 + n % 10
n = n//10
return x == op_num
# Test
output = filter(is_palindrome, range(1, 1000))
print('1~1000:', list(output))
if list(filter(is_palindrome, range(1, 200))) ==... | 25.263158 | 163 | 0.55 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.179435 |
3cafbcdeecba4bc828647c5d5e2a12435c74df80 | 776 | py | Python | spotify_search/search.py | MiltonLn/spotify-tracks-pyconco2020 | 4a75b15852344f7dac066bea3c3e3abb1157d198 | [
"MIT"
] | 1 | 2021-07-29T16:09:30.000Z | 2021-07-29T16:09:30.000Z | spotify_search/search.py | MiltonLn/spotify-tracks-pyconco2020 | 4a75b15852344f7dac066bea3c3e3abb1157d198 | [
"MIT"
] | null | null | null | spotify_search/search.py | MiltonLn/spotify-tracks-pyconco2020 | 4a75b15852344f7dac066bea3c3e3abb1157d198 | [
"MIT"
] | null | null | null | from importlib import import_module
from flask import Flask, request, jsonify
from .spotify_api import get_spotify_response
app = Flask(__name__)
app.config.from_object("spotify_search.settings")
@app.route("/search", methods=["GET"])
def search():
search_term = request.args.get("search_term", "")
limit =... | 26.758621 | 65 | 0.719072 | 0 | 0 | 0 | 0 | 573 | 0.738402 | 0 | 0 | 134 | 0.17268 |
3cb1615543f6a7b7ba1580acd4a1477cfa004ce2 | 3,940 | py | Python | Python/src/controllers/MainController.py | Jictyvoo/EXA868--PathFinder | 1fe839e0d3c14f36a4a2187cc8bc00c19f3bda4a | [
"MIT"
] | null | null | null | Python/src/controllers/MainController.py | Jictyvoo/EXA868--PathFinder | 1fe839e0d3c14f36a4a2187cc8bc00c19f3bda4a | [
"MIT"
] | null | null | null | Python/src/controllers/MainController.py | Jictyvoo/EXA868--PathFinder | 1fe839e0d3c14f36a4a2187cc8bc00c19f3bda4a | [
"MIT"
] | null | null | null | import math
from models.business.OrganismController import OrganismController
from models.value.Finder import Finder
from models.value.Labyrinth import Labyrinth
class MainController:
def __init__(self):
self.__labyrinth = Labyrinth("../config.json")
self.__labyrinth.loadLabyrinth("../labyrinth.... | 39.4 | 103 | 0.628173 | 3,774 | 0.957868 | 0 | 0 | 0 | 0 | 0 | 0 | 310 | 0.07868 |
3cb181b4a78692a5068ea6ba57d0e24bbe0db8c2 | 3,386 | py | Python | accounts/views.py | callmewind/billdev | fcd53cb98284677fb619abeafb17a88035aabfd6 | [
"MIT"
] | null | null | null | accounts/views.py | callmewind/billdev | fcd53cb98284677fb619abeafb17a88035aabfd6 | [
"MIT"
] | null | null | null | accounts/views.py | callmewind/billdev | fcd53cb98284677fb619abeafb17a88035aabfd6 | [
"MIT"
] | null | null | null | from django.views.generic.edit import CreateView
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import RedirectView
from django.conf import settings
from .forms import *
class ActivateAccountTokenGenerator(Passw... | 36.804348 | 208 | 0.646486 | 3,098 | 0.914944 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.135854 |
3cb5796f6762e147de6c1a95dfd1c12f82cf44f8 | 241 | py | Python | hw-2/useful_modules.py | Atlasshrugs00/astr-119 | be30734d2580acd947e5b2e22e3039d0d42419f3 | [
"MIT"
] | null | null | null | hw-2/useful_modules.py | Atlasshrugs00/astr-119 | be30734d2580acd947e5b2e22e3039d0d42419f3 | [
"MIT"
] | 8 | 2021-09-24T04:02:52.000Z | 2021-12-09T05:45:22.000Z | hw-2/useful_modules.py | Atlasshrugs00/astr-119 | be30734d2580acd947e5b2e22e3039d0d42419f3 | [
"MIT"
] | null | null | null | import numpy as np #numpy library
import matplotlib.pyplot as plt #matplotlib pyplot
import sys #acces to c-like sys library
import os #gives access to operating system
print(sys.argv) #prints any command line arguments
print(os.getcwd()) | 26.777778 | 50 | 0.792531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.526971 |
3cb70deff93c19ea3ca28c0dcdec1ef4bed01acf | 3,532 | py | Python | Custom/text.py | SemLaan/Hotel-review-sentiment-analysis | b7fd22dcea63bab1c7fe666a7f4912931de1f4dc | [
"Apache-2.0"
] | null | null | null | Custom/text.py | SemLaan/Hotel-review-sentiment-analysis | b7fd22dcea63bab1c7fe666a7f4912931de1f4dc | [
"Apache-2.0"
] | null | null | null | Custom/text.py | SemLaan/Hotel-review-sentiment-analysis | b7fd22dcea63bab1c7fe666a7f4912931de1f4dc | [
"Apache-2.0"
] | null | null | null |
import pandas as pd
from nltk import tokenize as tokenizers
from nltk.stem import PorterStemmer, WordNetLemmatizer
class TextCleaning:
def __init__(self):
return
def remove_hyperlinks(self, corpus):
corpus = corpus.str.replace(r"https?://t.co/[A-Za-z0-9]+", "https")
return ... | 22.213836 | 76 | 0.51812 | 1,936 | 0.548131 | 0 | 0 | 0 | 0 | 0 | 0 | 1,018 | 0.288222 |
3cb8b156ffda90f3a147616840973c64a0b81e50 | 546 | py | Python | kolibri/plugins/user_auth/root_urls.py | MBKayro/kolibri | 0a38a5fb665503cf8f848b2f65938e73bfaa5989 | [
"MIT"
] | 545 | 2016-01-19T19:26:55.000Z | 2022-03-20T00:13:04.000Z | kolibri/plugins/user_auth/root_urls.py | MBKayro/kolibri | 0a38a5fb665503cf8f848b2f65938e73bfaa5989 | [
"MIT"
] | 8,329 | 2016-01-19T19:32:02.000Z | 2022-03-31T21:23:12.000Z | kolibri/plugins/user_auth/root_urls.py | MBKayro/kolibri | 0a38a5fb665503cf8f848b2f65938e73bfaa5989 | [
"MIT"
] | 493 | 2016-01-19T19:26:48.000Z | 2022-03-28T14:35:05.000Z | """
This is here to enable redirects from the old /user endpoint to /auth
"""
from django.conf.urls import include
from django.conf.urls import url
from django.views.generic.base import RedirectView
from kolibri.core.device.translation import i18n_patterns
redirect_patterns = [
url(
r"^user/$",
Re... | 26 | 86 | 0.705128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.274725 |
3cb8db111fef337bf519873d89b2fd5a45a81770 | 250 | py | Python | Learning/CodeWars/Python/7 kyu_Sum_of_numbers_from_0_to_N.py | aliasfoxkde/snippets | bb6dcc6597316ef9c88611f526935059451c3b5a | [
"MIT"
] | null | null | null | Learning/CodeWars/Python/7 kyu_Sum_of_numbers_from_0_to_N.py | aliasfoxkde/snippets | bb6dcc6597316ef9c88611f526935059451c3b5a | [
"MIT"
] | null | null | null | Learning/CodeWars/Python/7 kyu_Sum_of_numbers_from_0_to_N.py | aliasfoxkde/snippets | bb6dcc6597316ef9c88611f526935059451c3b5a | [
"MIT"
] | null | null | null | # See: https://www.codewars.com/kata/56e9e4f516bcaa8d4f001763
def show_sequence(n):
if n == 0:
return '0=0'
elif n < 0:
return str(n) + '<0'
return str(range(n+1))[1:-1].replace(', ','+') + ' = ' + str(sum(range(1,n+1)))
| 27.777778 | 83 | 0.54 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.328 |
3cb8ec1381ca6215654d8b8a9da92a3ab2726159 | 4,685 | py | Python | Script.py | harisqazi1/Automated_Script | 6680e0604db55297fad2ab2f99ea61324ca88048 | [
"MIT"
] | null | null | null | Script.py | harisqazi1/Automated_Script | 6680e0604db55297fad2ab2f99ea61324ca88048 | [
"MIT"
] | null | null | null | Script.py | harisqazi1/Automated_Script | 6680e0604db55297fad2ab2f99ea61324ca88048 | [
"MIT"
] | null | null | null | """
Title: Automated Script for Data Scraping
Creator: Haris "5w464l1c10u5"
Purpose: This was made in order to make it easier to get data from online, all through one python script
Usage:
python3 Automated_Script.py
Resources:
https://www.digitalocean.com/community/tutorials/how-to-scrape-web-pages-with-beautiful-s... | 28.919753 | 159 | 0.683458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,650 | 0.565635 |
3cb91fcc9d369715e263d80560e5e0440993f481 | 144 | py | Python | pnbp/helpers/__init__.py | prettynb/pnbp | 1be54a2217a85675ec4a14a1c8a1d2501be88404 | [
"MIT"
] | 1 | 2021-07-30T02:00:29.000Z | 2021-07-30T02:00:29.000Z | pnbp/helpers/__init__.py | prettynb/pnbp | 1be54a2217a85675ec4a14a1c8a1d2501be88404 | [
"MIT"
] | null | null | null | pnbp/helpers/__init__.py | prettynb/pnbp | 1be54a2217a85675ec4a14a1c8a1d2501be88404 | [
"MIT"
] | null | null | null | from .base import _convert_datetime
from .codeblock import CodeBlock
from .link import Link
from .tag import Tag
from .url import Url
| 9 | 35 | 0.756944 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3cb929d8fa24f1122564db813af9ab0475a425f5 | 838 | py | Python | tests/elections/test_police_and_crime_commissioner.py | DemocracyClub/uk-election-timetables | 2541f9e5050a393906bafa2b70709fe650de3f32 | [
"MIT"
] | 2 | 2020-11-14T15:56:56.000Z | 2021-01-11T11:11:09.000Z | tests/elections/test_police_and_crime_commissioner.py | DemocracyClub/uk-election-timetables | 2541f9e5050a393906bafa2b70709fe650de3f32 | [
"MIT"
] | 12 | 2020-11-18T20:27:43.000Z | 2021-12-15T10:47:01.000Z | tests/elections/test_police_and_crime_commissioner.py | DemocracyClub/uk-election-timetables | 2541f9e5050a393906bafa2b70709fe650de3f32 | [
"MIT"
] | null | null | null | from datetime import date
from uk_election_timetables.elections import PoliceAndCrimeCommissionerElection
# Reference election: pcc.avon-and-somerset.2016-05-05
def test_publish_date_police_and_crime_commissioner():
election = PoliceAndCrimeCommissionerElection(date(2016, 5, 5))
assert election.sopn_publish... | 33.52 | 79 | 0.805489 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 126 | 0.150358 |
3cb98b826371f4dfda09a39ed9c09c8f6ab7451b | 847 | py | Python | LaureatsBackEnd-master/laureats/migrations/0011_auto_20200111_1525.py | SanaaCHAOU/laureat_management_ENSAT | d769714f9f8cb9ebf90e02577547ec348c011461 | [
"MIT"
] | null | null | null | LaureatsBackEnd-master/laureats/migrations/0011_auto_20200111_1525.py | SanaaCHAOU/laureat_management_ENSAT | d769714f9f8cb9ebf90e02577547ec348c011461 | [
"MIT"
] | null | null | null | LaureatsBackEnd-master/laureats/migrations/0011_auto_20200111_1525.py | SanaaCHAOU/laureat_management_ENSAT | d769714f9f8cb9ebf90e02577547ec348c011461 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.2 on 2020-01-11 14:25
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('laureats', '0010_auto_20200111_1458'),
]
operations = [
migrations.CreateModel(
name='Professio... | 28.233333 | 132 | 0.570248 | 721 | 0.85124 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.212515 |
3cbc5cfef3c4ee6f751fd3f8b8b9e741e7ebbbd4 | 1,952 | py | Python | python/250.count-univalue-subtrees.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 10 | 2019-09-15T00:23:57.000Z | 2022-01-05T12:53:42.000Z | python/250.count-univalue-subtrees.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 3 | 2021-06-30T00:39:26.000Z | 2021-08-01T07:13:59.000Z | python/250.count-univalue-subtrees.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 6 | 2020-02-08T02:55:22.000Z | 2022-01-02T22:48:18.000Z | # [250] Count Univalue Subtrees
# Description
# Given a binary tree, count the number of uni-value subtrees.
# A Uni-value subtree means all nodes of the subtree have the same value.
# Example
# Example 1
# Input: root = {5,1,5,5,5,#,5}
# Output: 4
# Explanation:
# 5
# / \
# ... | 22.436782 | 103 | 0.518955 | 1,116 | 0.571721 | 0 | 0 | 0 | 0 | 0 | 0 | 974 | 0.498975 |
3cbd5fce78146aae7cbddda0c039ec527c342db9 | 5,752 | py | Python | apis.py | teemuja/ndp_app3 | 8a9517b2e2385640dc1a2c1baf0ae07cf630c89c | [
"MIT"
] | null | null | null | apis.py | teemuja/ndp_app3 | 8a9517b2e2385640dc1a2c1baf0ae07cf630c89c | [
"MIT"
] | null | null | null | apis.py | teemuja/ndp_app3 | 8a9517b2e2385640dc1a2c1baf0ae07cf630c89c | [
"MIT"
] | null | null | null | # apis for ndp_d3
from owslib.wfs import WebFeatureService
import pandas as pd
import geopandas as gpd
import momepy
import streamlit as st
@st.cache(allow_output_mutation=True)
def pno_data(kunta,vuosi=2021):
url = 'http://geo.stat.fi/geoserver/postialue/wfs' # vaestoruutu tai postialue
wfs = WebFeatureServi... | 52.770642 | 134 | 0.685327 | 0 | 0 | 0 | 0 | 5,605 | 0.974274 | 0 | 0 | 1,878 | 0.326438 |
3cbec5b44846435b33e0ef20ab76a5f6a4ef6c68 | 6,471 | py | Python | test-suite/unit-testing/PortageLive.soap/tests/testIncrAddSentence.py | nrc-cnrc/Portage-SMT-TAS | 73f5a65de4adfa13008ea9a01758385c97526059 | [
"MIT"
] | null | null | null | test-suite/unit-testing/PortageLive.soap/tests/testIncrAddSentence.py | nrc-cnrc/Portage-SMT-TAS | 73f5a65de4adfa13008ea9a01758385c97526059 | [
"MIT"
] | null | null | null | test-suite/unit-testing/PortageLive.soap/tests/testIncrAddSentence.py | nrc-cnrc/Portage-SMT-TAS | 73f5a65de4adfa13008ea9a01758385c97526059 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# vim:expandtab:ts=3:sw=3
# @file testIncrStatus.py
# @brief Test SOAP calls to incrAddSentence using a deployed PortageLive web server.
#
# @author Samuel Larkin
#
# Traitement multilingue de textes / Multilingual Text Processing
# Tech. de l'information et des communications / Information and C... | 36.767045 | 118 | 0.637923 | 5,310 | 0.820584 | 0 | 0 | 726 | 0.112193 | 0 | 0 | 2,527 | 0.390512 |
3cbf25669395a89790375a19545ba5be63026880 | 1,919 | py | Python | Cryptography/Caesar_Cipher.py | hari40009/learnpython | b75e700f62f49ab9d8fef607ebd87a34c5cb6530 | [
"MIT"
] | 1 | 2018-11-07T04:13:52.000Z | 2018-11-07T04:13:52.000Z | Cryptography/Caesar_Cipher.py | engineerprogrammer/learnpython | 140acfd8fc6345745a9b274baaa1e58ea3217f9f | [
"MIT"
] | null | null | null | Cryptography/Caesar_Cipher.py | engineerprogrammer/learnpython | 140acfd8fc6345745a9b274baaa1e58ea3217f9f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
""" A program to use a Caesar cipher based on user input for the shift value """
MAX_SHIFT = 26
def whatMode():
""" Finds out what the user wants to do """
while True:
print("Do you wish to encrypt, decrypt or brute force a message: ")
mode = input().lower()
if ... | 27.028169 | 80 | 0.532569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 541 | 0.281918 |
3cc3cc243655d3b808c34d010f7d4b9e190e610a | 494 | py | Python | leetcode/python/medium/p046_permute.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | leetcode/python/medium/p046_permute.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | leetcode/python/medium/p046_permute.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | class Solution:
def __init__(self):
self.res = []
def permute(self, nums):
self.backTrack(nums, [])
return self.res
def backTrack(self, nums, track):
if len(nums) == len(track):
self.res.append(track[:])
return
for i in nums:
if i ... | 22.454545 | 39 | 0.506073 | 450 | 0.910931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3cc66fc74313d0ecd7ced030e26d629577fa26a1 | 74 | py | Python | Level1/count_p_and_y.py | chae-heechan/Programmers_Python_Algorithm_Study | c61af0b1b97d790e2332581eb0b7da42c3e510fa | [
"MIT"
] | null | null | null | Level1/count_p_and_y.py | chae-heechan/Programmers_Python_Algorithm_Study | c61af0b1b97d790e2332581eb0b7da42c3e510fa | [
"MIT"
] | null | null | null | Level1/count_p_and_y.py | chae-heechan/Programmers_Python_Algorithm_Study | c61af0b1b97d790e2332581eb0b7da42c3e510fa | [
"MIT"
] | null | null | null | def solution(s):
return (s.lower().count('p') == s.lower().count('y')) | 37 | 57 | 0.567568 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.081081 |
3cc75769cc0430a3c58ed37733ff77e1117674ee | 83 | py | Python | bemy/apps.py | foropolo/profiles-rest-api | f35cbb5727204bf4419c6b0a9797d7c624773219 | [
"MIT"
] | null | null | null | bemy/apps.py | foropolo/profiles-rest-api | f35cbb5727204bf4419c6b0a9797d7c624773219 | [
"MIT"
] | 6 | 2019-12-05T00:35:40.000Z | 2022-02-10T08:29:56.000Z | bemy/apps.py | foropolo/profiles-rest-api | f35cbb5727204bf4419c6b0a9797d7c624773219 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class BemyConfig(AppConfig):
name = 'bemy'
| 13.833333 | 33 | 0.73494 | 46 | 0.554217 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.072289 |
3cc9578bf937313ea3ce810099e43cb50d90651a | 634 | py | Python | ribosome/compute/ribosome.py | tek/ribosome-py | 8bd22e549ddff1ee893d6e3a0bfba123a09e96c6 | [
"MIT"
] | null | null | null | ribosome/compute/ribosome.py | tek/ribosome-py | 8bd22e549ddff1ee893d6e3a0bfba123a09e96c6 | [
"MIT"
] | null | null | null | ribosome/compute/ribosome.py | tek/ribosome-py | 8bd22e549ddff1ee893d6e3a0bfba123a09e96c6 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Generic, TypeVar, Type
from lenses import UnboundLens
from amino import Dat
from ribosome.data.plugin_state import PluginState
D = TypeVar('D')
CC = TypeVar('CC')
C = TypeVar('C')
class Ribosome(Generic[D, CC, C], Dat['Ribosome[D, CC, C]']):
def __init__(... | 21.862069 | 85 | 0.621451 | 367 | 0.578864 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.126183 |
3cc96d6bfddb10586b88d9ad0d7b86bd5ca4e9aa | 1,431 | py | Python | pythonstartup.py | avisilver/util_scripts | ffe4ee4b7a7b907b7d93bef5ec96151d2cbf8508 | [
"MIT"
] | null | null | null | pythonstartup.py | avisilver/util_scripts | ffe4ee4b7a7b907b7d93bef5ec96151d2cbf8508 | [
"MIT"
] | null | null | null | pythonstartup.py | avisilver/util_scripts | ffe4ee4b7a7b907b7d93bef5ec96151d2cbf8508 | [
"MIT"
] | null | null | null | # Add auto-completion and a stored history file of commands to your Python
# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
# bound to the Esc key by default (you can change it - see readline docs).
#
# Store the file in ~/.pystartup, and set an environment variable to point
# to it: "export ... | 31.108696 | 74 | 0.709294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 698 | 0.487771 |
3cc9c9c6db3e02d74038abeb59341c1138d3a879 | 70 | py | Python | saleor/plugins/category/notify_event.py | hoangtuananh97/saleor | 94ad493ef61302fb458822868fc2b4a884ec2065 | [
"CC-BY-4.0"
] | null | null | null | saleor/plugins/category/notify_event.py | hoangtuananh97/saleor | 94ad493ef61302fb458822868fc2b4a884ec2065 | [
"CC-BY-4.0"
] | 4 | 2021-09-06T03:55:32.000Z | 2021-10-15T08:47:58.000Z | saleor/plugins/category/notify_event.py | hoangtuananh97/saleor | 94ad493ef61302fb458822868fc2b4a884ec2065 | [
"CC-BY-4.0"
] | null | null | null | def send_category_notify():
print("Plugin Category when created")
| 23.333333 | 41 | 0.757143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.428571 |
3ccccac3d5c3d7c8d168081f420c8dfcbee68843 | 761 | py | Python | NhMedicalSite/panel/models.py | Dogruyer/ecommerce | aa505b401e42882a96e6ef6375bd1a1ed95c5b85 | [
"Apache-2.0"
] | null | null | null | NhMedicalSite/panel/models.py | Dogruyer/ecommerce | aa505b401e42882a96e6ef6375bd1a1ed95c5b85 | [
"Apache-2.0"
] | null | null | null | NhMedicalSite/panel/models.py | Dogruyer/ecommerce | aa505b401e42882a96e6ef6375bd1a1ed95c5b85 | [
"Apache-2.0"
] | 1 | 2018-11-01T11:10:58.000Z | 2018-11-01T11:10:58.000Z | from __future__ import unicode_literals
from django.db import models
# Create your models here.
class Category(models.Model):
category_name=models.CharField(max_length=100)
class Products(models.Model):
title=models.CharField(max_length=100)
content = models.TextField(max_length=300)
product_image=m... | 21.138889 | 75 | 0.730618 | 644 | 0.846255 | 0 | 0 | 0 | 0 | 0 | 0 | 73 | 0.095926 |
3cccd58c207124db8b9a503a7ea72e1986e27cb3 | 459 | py | Python | voxelcut/initial.py | JohnyEngine/CNC | e4c77250ab2b749d3014022cbb5eb9924e939993 | [
"Apache-2.0"
] | null | null | null | voxelcut/initial.py | JohnyEngine/CNC | e4c77250ab2b749d3014022cbb5eb9924e939993 | [
"Apache-2.0"
] | null | null | null | voxelcut/initial.py | JohnyEngine/CNC | e4c77250ab2b749d3014022cbb5eb9924e939993 | [
"Apache-2.0"
] | null | null | null | toolpath.coords = Coords(-100, -100, -5, 100, 100, 5)
voxelcut.set_current_color(12566512)
toolpath.coords.add_block(0.150768, 0, -5, 9.69846, 9.84808, 10)
GRAY = 0x505050
RED = 0x600000
BLUE = 0x000050
toolpath.tools[2] = Tool([[Span(Point(3, 0), Vertex(0, Point(3, 20), Point(0, 0)), False), GRAY], [Span(Point(3, 20),... | 45.9 | 170 | 0.681917 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.148148 |
3ccda61294b042b9301d3115e54f9eaad129e0a8 | 2,200 | py | Python | core/cliqueIntersectionGraph.py | ongmingyang/some-max-cut | 7ebabd06d3e46789a3672bd516adc48953ba135e | [
"MIT"
] | 3 | 2018-03-16T17:25:23.000Z | 2021-04-27T21:42:31.000Z | core/cliqueIntersectionGraph.py | ongmingyang/some-max-cut | 7ebabd06d3e46789a3672bd516adc48953ba135e | [
"MIT"
] | null | null | null | core/cliqueIntersectionGraph.py | ongmingyang/some-max-cut | 7ebabd06d3e46789a3672bd516adc48953ba135e | [
"MIT"
] | null | null | null | import sys
from clique import Clique
from cvxopt import spmatrix, amd
from collections import defaultdict as dd
import chompack as cp
from util.graph import Graph
LARGEST_CLIQUE_SIZE = 24
#
# A CliqueIntersectionGraph is a graph (V,E), where V is a set of cliques, each
# bag containing a clique, and (i,j) in E if cli... | 33.333333 | 79 | 0.678636 | 1,709 | 0.776818 | 0 | 0 | 0 | 0 | 0 | 0 | 852 | 0.387273 |
3ccdd8c975b584a486aac3e7fbb9b1d2ae39487f | 4,586 | py | Python | backend/src/baserow/contrib/database/airtable/tasks.py | ashishdhngr/baserow | b098678d2165eb7c42930ee24dc6753a3cb520c3 | [
"MIT"
] | null | null | null | backend/src/baserow/contrib/database/airtable/tasks.py | ashishdhngr/baserow | b098678d2165eb7c42930ee24dc6753a3cb520c3 | [
"MIT"
] | null | null | null | backend/src/baserow/contrib/database/airtable/tasks.py | ashishdhngr/baserow | b098678d2165eb7c42930ee24dc6753a3cb520c3 | [
"MIT"
] | null | null | null | import logging
from django.conf import settings
from baserow.config.celery import app
logger = logging.getLogger(__name__)
@app.task(
bind=True,
queue="export",
soft_time_limit=settings.BASEROW_AIRTABLE_IMPORT_SOFT_TIME_LIMIT,
)
def run_import_from_airtable(self, job_id: int):
"""
Starts the A... | 35.276923 | 86 | 0.657872 | 0 | 0 | 0 | 0 | 4,456 | 0.971653 | 0 | 0 | 1,275 | 0.27802 |
3cd0a4bbec748d6e33fb26e96ae01249982c0522 | 7,439 | py | Python | d2lbook/notebook.py | naoufelito/d2l-book | bb281e1640aaf039b4d2d69bb9c8d6334a7cb98a | [
"Apache-2.0"
] | null | null | null | d2lbook/notebook.py | naoufelito/d2l-book | bb281e1640aaf039b4d2d69bb9c8d6334a7cb98a | [
"Apache-2.0"
] | 1 | 2020-06-06T06:34:03.000Z | 2020-06-06T07:01:56.000Z | d2lbook/notebook.py | naoufelito/d2l-book | bb281e1640aaf039b4d2d69bb9c8d6334a7cb98a | [
"Apache-2.0"
] | null | null | null | """utilities to handle notebooks"""
from typing import Union, List, Optional
import copy
import notedown
import nbformat
import nbconvert
from nbformat import notebooknode
from d2lbook import markdown
from d2lbook import common
def create_new_notebook(nb: notebooknode.NotebookNode,
cells: Li... | 41.099448 | 152 | 0.609894 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,485 | 0.199624 |
3cd1756adb8c57eb1928457d00bc92c25a43ba4c | 1,204 | py | Python | myamiweb/imcache/imcacheconfig.py | leschzinerlab/myami-3.2-freeHand | 974b8a48245222de0d9cfb0f433533487ecce60d | [
"MIT"
] | null | null | null | myamiweb/imcache/imcacheconfig.py | leschzinerlab/myami-3.2-freeHand | 974b8a48245222de0d9cfb0f433533487ecce60d | [
"MIT"
] | null | null | null | myamiweb/imcache/imcacheconfig.py | leschzinerlab/myami-3.2-freeHand | 974b8a48245222de0d9cfb0f433533487ecce60d | [
"MIT"
] | 1 | 2019-09-05T20:58:37.000Z | 2019-09-05T20:58:37.000Z | # config file for imcached
# camera name pattern to cache. For example 'GatanK2' will restrict it
# only to camera name containing the string
camera_name_pattern = ''
# time in seconds to wait between consecutive queries
query_interval = 5
# limit query to later than this timestamp (mysql style: yyyymmddhhmmss)
min... | 23.607843 | 72 | 0.724252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 886 | 0.73588 |
3cd1a6c109376dfdc24ad44b61222972d5c24dd2 | 3,737 | py | Python | graphs/graphgenerator.py | andrew-lockwood/lab-project | e39a0f21966cdee519942cf2f94b7bab6ed2196e | [
"MIT"
] | 1 | 2017-08-30T15:21:31.000Z | 2017-08-30T15:21:31.000Z | graphs/graphgenerator.py | andrew-lockwood/lab-project-summer2016 | e39a0f21966cdee519942cf2f94b7bab6ed2196e | [
"MIT"
] | null | null | null | graphs/graphgenerator.py | andrew-lockwood/lab-project-summer2016 | e39a0f21966cdee519942cf2f94b7bab6ed2196e | [
"MIT"
] | 1 | 2017-06-15T20:44:59.000Z | 2017-06-15T20:44:59.000Z |
import sqlite3
import matplotlib.pyplot as plt
import re
from collections import Counter
db = "C:\\Users\\Andrew\\lab-project\\data\\frontiers_corpus.db"
def wordvsline():
q = "SELECT wordcount, linecount FROM ArticleTXT"
curr.execute(q)
x,y = zip(*curr.fetchall())
mpl_fig = plt.figure()
ax = mpl... | 24.585526 | 85 | 0.54616 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,584 | 0.423869 |
3cd1de8fe3c2b6efa630c25b86bb05e41fab354a | 5,612 | py | Python | peering_manager/constants.py | maznu/peering-manager | d249fcf530f4cc48b39429badb79bc203e0148ba | [
"Apache-2.0"
] | 127 | 2017-10-12T00:27:45.000Z | 2020-08-07T11:13:55.000Z | peering_manager/constants.py | maznu/peering-manager | d249fcf530f4cc48b39429badb79bc203e0148ba | [
"Apache-2.0"
] | 247 | 2017-12-26T12:55:34.000Z | 2020-08-08T11:57:35.000Z | peering_manager/constants.py | maznu/peering-manager | d249fcf530f4cc48b39429badb79bc203e0148ba | [
"Apache-2.0"
] | 63 | 2017-10-13T06:46:05.000Z | 2020-08-08T00:41:57.000Z | from collections import OrderedDict
from devices.filters import ConfigurationFilterSet
from devices.models import Configuration
from devices.tables import ConfigurationTable
from messaging.filters import ContactFilterSet, EmailFilterSet
from messaging.models import Contact, ContactAssignment, Email
from messaging.tabl... | 31.351955 | 85 | 0.533678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,179 | 0.210086 |
3cd24bc69492048a6c6dccda50896c121dfcd5b5 | 1,453 | py | Python | alexhart/day1-2.py | chadnetzer/advent2020 | b992eb202ff9dd5cc353914a136337412c8bd074 | [
"MIT"
] | null | null | null | alexhart/day1-2.py | chadnetzer/advent2020 | b992eb202ff9dd5cc353914a136337412c8bd074 | [
"MIT"
] | 1 | 2020-12-06T07:51:48.000Z | 2020-12-08T05:03:11.000Z | alexhart/day1-2.py | chadnetzer/advent2020 | b992eb202ff9dd5cc353914a136337412c8bd074 | [
"MIT"
] | 8 | 2020-12-01T21:29:21.000Z | 2020-12-09T23:55:15.000Z | chalenge_input = '''1956
1994
457
1654
2003
1902
1741
1494
1597
1129
1146
1589
1989
1093
1881
1288
1848
1371
1508
1035
1813
1335
1634
1102
1262
1637
1048
1807
1270
1528
1670
1803
1202
1294
1570
1640
1484
1872
1140
1207
1485
1781
1778
1772
1334
1267
1045
1194
1873
1441
1557
1414
1123
1980
1527
1591
1665
1916
1662
1139
1... | 6.634703 | 70 | 0.751549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,028 | 0.707502 |
3cd2638aee801c7efa156f6936b153c75c517e46 | 465 | py | Python | e2e_graphsage/utils/logging.py | mingruimingrui/E2EGraphSage | 90de7befd3a8ced514697c073b4c64e96b63bdb0 | [
"MIT"
] | null | null | null | e2e_graphsage/utils/logging.py | mingruimingrui/E2EGraphSage | 90de7befd3a8ced514697c073b4c64e96b63bdb0 | [
"MIT"
] | null | null | null | e2e_graphsage/utils/logging.py | mingruimingrui/E2EGraphSage | 90de7befd3a8ced514697c073b4c64e96b63bdb0 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import logging
def setup_logging(log_path, mode='w'):
fmt = '%(asctime)s %(levelname)-4.4s %(filename)s:%(lineno)d: %(message)s'
logging.root.handlers = []
logging.basicConfig(
filename=log_path,
filemode=mode,
format=fmt,
datefmt='%m... | 24.473684 | 78 | 0.647312 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.180645 |
3cd2949cb17d74dce66873599c286cade86072c8 | 3,486 | py | Python | dmipy/distributions/tests/test_bingham.py | AthenaEPI/mipy | dbbca4066a6c162dcb05865df5ff666af0e4020a | [
"MIT"
] | 59 | 2018-02-22T19:14:19.000Z | 2022-02-22T05:40:27.000Z | dmipy/distributions/tests/test_bingham.py | AthenaEPI/mipy | dbbca4066a6c162dcb05865df5ff666af0e4020a | [
"MIT"
] | 95 | 2018-02-03T11:55:30.000Z | 2022-03-31T15:10:39.000Z | dmipy/distributions/tests/test_bingham.py | AthenaEPI/mipy | dbbca4066a6c162dcb05865df5ff666af0e4020a | [
"MIT"
] | 23 | 2018-02-13T07:21:01.000Z | 2022-02-22T20:12:08.000Z | from numpy.testing import assert_almost_equal, assert_equal
from dmipy.utils import utils
import numpy as np
from dmipy.utils.utils import (
rotation_matrix_100_to_theta_phi, rotation_matrix_around_100,
rotation_matrix_100_to_theta_phi_psi
)
from dmipy.distributions import distributions
def test_rotation_100_... | 35.938144 | 77 | 0.676133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 429 | 0.123064 |
3cd3066a814fddcf19dac7173c44fed139f2e632 | 669 | py | Python | head_first_design_patterns/hofs/duck_dispenser.py | incolumepy-cursos/poop | e4ac26b8d2a8c263a93fd9642fab52aafda53d80 | [
"MIT"
] | null | null | null | head_first_design_patterns/hofs/duck_dispenser.py | incolumepy-cursos/poop | e4ac26b8d2a8c263a93fd9642fab52aafda53d80 | [
"MIT"
] | null | null | null | head_first_design_patterns/hofs/duck_dispenser.py | incolumepy-cursos/poop | e4ac26b8d2a8c263a93fd9642fab52aafda53d80 | [
"MIT"
] | null | null | null | __author__ = '@britodfbr'
from head_first_design_patterns.hofs import duck
from head_first_design_patterns.hofs import fly_behaviors
from head_first_design_patterns.hofs import quack_behaviors
def run():
# Instatiate ducks
print("==== Model duck ====")
model = duck.DuckHOF()
model.perform_quack()
... | 27.875 | 59 | 0.715994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.139013 |
3cd5abf591689acf3071f0da912c722b5ef681bb | 1,279 | py | Python | tests/test_zones_json.py | electricitymap/electricitymap-contrib | 6572b12d1cef72c734b80273598e156ebe3c22ea | [
"MIT"
] | 143 | 2022-01-01T10:56:58.000Z | 2022-03-31T11:25:47.000Z | tests/test_zones_json.py | electricitymap/electricitymap-contrib | 6572b12d1cef72c734b80273598e156ebe3c22ea | [
"MIT"
] | 276 | 2021-12-30T15:57:15.000Z | 2022-03-31T14:57:16.000Z | tests/test_zones_json.py | electricitymap/electricitymap-contrib | 6572b12d1cef72c734b80273598e156ebe3c22ea | [
"MIT"
] | 44 | 2021-12-30T19:48:42.000Z | 2022-03-29T22:46:16.000Z | import json
import unittest
from electricitymap.contrib.config import ZONES_CONFIG
ZONE_KEYS = ZONES_CONFIG.keys()
class ZonesJsonTestcase(unittest.TestCase):
def test_bounding_boxes(self):
for zone, values in ZONES_CONFIG.items():
bbox = values.get("bounding_box")
if bbox:
... | 34.567568 | 89 | 0.656763 | 1,099 | 0.859265 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.133698 |
3cd609e71dc0ee42d0acf42ff022c5f15ae9992d | 3,483 | py | Python | app/bda_core/entities/training/word2vec_trainer.py | bda-19fs/bda-chatbot | 4fcbda813ff5d3854a4c2e12413775676bcba9e2 | [
"MIT"
] | 1 | 2019-05-25T12:12:39.000Z | 2019-05-25T12:12:39.000Z | app/bda_core/entities/training/word2vec_trainer.py | bda-19fs/bda-chatbot | 4fcbda813ff5d3854a4c2e12413775676bcba9e2 | [
"MIT"
] | null | null | null | app/bda_core/entities/training/word2vec_trainer.py | bda-19fs/bda-chatbot | 4fcbda813ff5d3854a4c2e12413775676bcba9e2 | [
"MIT"
] | null | null | null | import gensim
import numpy as np
class Config:
'''
This class represents the configuration for the Word2Vec model.
'''
def __init__(self, dimension=150, hierarchical_softmax=0, negative_sampling=0, ns_exponent=0,
sample=0, window_size=5, workers=3, use_skip_gram=1, min_count=2, epochs... | 35.907216 | 116 | 0.681022 | 678 | 0.19466 | 0 | 0 | 0 | 0 | 0 | 0 | 1,375 | 0.394775 |
3cd825fe40c8c6d189d67799fba8e31f6ba53c8a | 642 | py | Python | polls/migrations/0008_auto_20150918_1715.py | santeyio/phantastesproject | 5ce1e2cb59e8283fe280e01d0e185be62cd4001a | [
"MIT"
] | null | null | null | polls/migrations/0008_auto_20150918_1715.py | santeyio/phantastesproject | 5ce1e2cb59e8283fe280e01d0e185be62cd4001a | [
"MIT"
] | null | null | null | polls/migrations/0008_auto_20150918_1715.py | santeyio/phantastesproject | 5ce1e2cb59e8283fe280e01d0e185be62cd4001a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('polls', '0007_vote'),
]
operatio... | 23.777778 | 76 | 0.605919 | 500 | 0.778816 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.102804 |
3cd8375d5dea7465c5253237889db106c353b42a | 4,342 | py | Python | src/main/python/bktools/framework/money/currency.py | bspa10/bktools | 8ddff2bb325df6c4c2bb5cadd3029c0e11ba0734 | [
"MIT"
] | null | null | null | src/main/python/bktools/framework/money/currency.py | bspa10/bktools | 8ddff2bb325df6c4c2bb5cadd3029c0e11ba0734 | [
"MIT"
] | null | null | null | src/main/python/bktools/framework/money/currency.py | bspa10/bktools | 8ddff2bb325df6c4c2bb5cadd3029c0e11ba0734 | [
"MIT"
] | null | null | null | # encoding: utf-8
# Standard Library
from os import path
from threading import Lock
from typing import Set
from typing import Optional
from xml.etree import ElementTree as ET
from xml.etree.ElementTree import Element
# 3rd Party Library
# Current Folder
# Current Application
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-... | 25.692308 | 120 | 0.52211 | 3,936 | 0.906495 | 0 | 0 | 1,804 | 0.415477 | 0 | 0 | 1,577 | 0.363197 |
3cd8a7fa6829673461545374eeacd667661ea155 | 4,863 | py | Python | DemoFinal.py | sohinim006/Heroku-App-demo | 875b894b48e8544f6dbe629635f195ccd97ba201 | [
"MIT"
] | null | null | null | DemoFinal.py | sohinim006/Heroku-App-demo | 875b894b48e8544f6dbe629635f195ccd97ba201 | [
"MIT"
] | 1 | 2020-06-02T02:53:57.000Z | 2020-06-02T02:53:57.000Z | DemoFinal.py | sohinim006/Heroku-App-demo | 875b894b48e8544f6dbe629635f195ccd97ba201 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
import pickle
# In[2]:
data=pd.read_csv("wd.csv",encoding="ISO-8859-1")
# In[3]:
data
# In[4]:
data.fillna(0,inplace=True) #it fills NaN with O's
# In[5]:
data
# In[6]:
data.dtypes
# In[7]:
#conversion
data['... | 15.438095 | 112 | 0.499897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,181 | 0.242754 |
3cd8ed3786032ec99ff11bc34e84132d3b428b08 | 1,926 | py | Python | Classes/gaussian.py | sankarebarri/Python | 0c39da1df74d74b7b0a3724e57b5205a7d88537f | [
"MIT"
] | null | null | null | Classes/gaussian.py | sankarebarri/Python | 0c39da1df74d74b7b0a3724e57b5205a7d88537f | [
"MIT"
] | null | null | null | Classes/gaussian.py | sankarebarri/Python | 0c39da1df74d74b7b0a3724e57b5205a7d88537f | [
"MIT"
] | null | null | null | import numpy as np
import math
class Gaussian:
def __init__(self, mu=0, sigma=1):
self.mean = mu
self.stdev = sigma
self.data = []
def calculate_mean(self):
self.mean = np.mean(self.data)
return self.mean
def calculate_stdev(self,... | 27.126761 | 81 | 0.574247 | 1,544 | 0.801661 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.023364 |
3cda167a85c43c6395a461abd5b9210a39f3e5bb | 987 | py | Python | setup.py | datagovau/ckanext-datagovau | 902c80a9c3a07ad6bbd52a4b19dac8a3ec2686b9 | [
"Apache-2.0"
] | 1 | 2019-07-22T08:02:11.000Z | 2019-07-22T08:02:11.000Z | setup.py | datagovau/ckanext-datagovau | 902c80a9c3a07ad6bbd52a4b19dac8a3ec2686b9 | [
"Apache-2.0"
] | null | null | null | setup.py | datagovau/ckanext-datagovau | 902c80a9c3a07ad6bbd52a4b19dac8a3ec2686b9 | [
"Apache-2.0"
] | 6 | 2015-01-23T16:32:18.000Z | 2021-06-27T03:42:18.000Z | from setuptools import find_packages, setup
version = "1.0.0a1"
# Keep in case we still need pylons...Just use the line below in place
# of the install_requires argument in the call to setup().
# install_requires=['requests', 'feedparser', 'pylons', 'python-dateutil'],
setup(
name="ckanext-datagovau",
version=... | 32.9 | 94 | 0.690983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 570 | 0.577508 |
3ce1874797f955e0861f0ec1dfc943c5714b8253 | 6,192 | py | Python | utils.py | kalpetros/greek-dictionary | 962f36c299cbb46ffce9c7f78db7c9e513269499 | [
"MIT"
] | 3 | 2021-04-27T16:39:12.000Z | 2021-11-17T02:15:13.000Z | utils.py | kalpetros/greek-dictionary | 962f36c299cbb46ffce9c7f78db7c9e513269499 | [
"MIT"
] | null | null | null | utils.py | kalpetros/greek-dictionary | 962f36c299cbb46ffce9c7f78db7c9e513269499 | [
"MIT"
] | 1 | 2021-06-15T23:57:44.000Z | 2021-06-15T23:57:44.000Z | import click
import os
import requests
import shutil
import sys
import time
from bs4 import BeautifulSoup
alphabet = [
{
'letter': 'Α',
'pages': 31660
},
{
'letter': 'Β',
'pages': 5050
},
{
'letter': 'Γ',
'pages': 5890
},
{
'letter':... | 18.211765 | 97 | 0.439599 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,142 | 0.34261 |
3ce716ac3e56a4c2bf161beb78851142feb3c86b | 1,585 | py | Python | pysanejs/api.py | Lookyloo/PySaneJS | 99615608222d7386e74472bcc052f40b05916b2a | [
"BSD-2-Clause"
] | 1 | 2019-01-30T16:12:32.000Z | 2019-01-30T16:12:32.000Z | pysanejs/api.py | CIRCL/PySaneJS | 501f22d0d22d6361bb71a8bf0bbb2e14d3c0f9f1 | [
"BSD-2-Clause"
] | 36 | 2021-06-09T17:34:05.000Z | 2022-03-28T09:04:37.000Z | pysanejs/api.py | Lookyloo/PySaneJS | 99615608222d7386e74472bcc052f40b05916b2a | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
from urllib.parse import urljoin
from typing import Union, Dict, List, Optional
class SaneJS():
def __init__(self, root_url: str='https://sanejs.circl.lu/'):
self.root_url = root_url
self.session = requests.session()
@property
... | 28.303571 | 129 | 0.477603 | 1,439 | 0.907886 | 0 | 0 | 191 | 0.120505 | 0 | 0 | 658 | 0.415142 |
3ce959e8fac079b9e0e0bacc34e00bde93edb83c | 1,937 | py | Python | Log1/HiPyQt3/HiPyQt38QTableWidget.py | codenara/PyQt1 | 1550920577188e4d318b47fc69ba5ee243092d88 | [
"MIT"
] | null | null | null | Log1/HiPyQt3/HiPyQt38QTableWidget.py | codenara/PyQt1 | 1550920577188e4d318b47fc69ba5ee243092d88 | [
"MIT"
] | null | null | null | Log1/HiPyQt3/HiPyQt38QTableWidget.py | codenara/PyQt1 | 1550920577188e4d318b47fc69ba5ee243092d88 | [
"MIT"
] | null | null | null | # HiPyQt version 3.8
# use QTableWidget
# use QCheckBox
# use QPushButton
import sys
from PyQt5.QtWidgets import *
class MyWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Hi PyQt")
self.setGeometry(50, 50, 400, 300)
# QTableWidget
self.tab... | 32.283333 | 97 | 0.674239 | 1,695 | 0.875065 | 0 | 0 | 0 | 0 | 0 | 0 | 219 | 0.113061 |
3cea6fdbaa10d4f4a87f24213944a946b586b65c | 1,346 | py | Python | predictor.py | abhayraw1/crnn.pytorch | 307f2dbf8163148d165ef15cdd522c7c137041e4 | [
"MIT"
] | null | null | null | predictor.py | abhayraw1/crnn.pytorch | 307f2dbf8163148d165ef15cdd522c7c137041e4 | [
"MIT"
] | null | null | null | predictor.py | abhayraw1/crnn.pytorch | 307f2dbf8163148d165ef15cdd522c7c137041e4 | [
"MIT"
] | null | null | null | import torch
from torch.autograd import Variable
from . import utils
from . import dataset
from PIL import Image
from pathlib import Path
from . import crnn
model_path = Path(__file__).parent/'data/crnn.pth'
alphabet = '0123456789abcdefghijklmnopqrstuvwxyz'
model = crnn.CRNN(32, 1, 37, 256)
if torch.cuda.is_availabl... | 28.041667 | 71 | 0.696137 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.102526 |
3ced3da168b0c4d5fb8345ab35a6e8f79cade777 | 2,951 | py | Python | src/graph_transpiler/webdnn/backend/webgl/kernels/split_axis.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | src/graph_transpiler/webdnn/backend/webgl/kernels/split_axis.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/backend/webgl/kernels/split_axis.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | from typing import List, Sequence
from webdnn.backend.code_generator.injectors.kernel_name_injector import KernelNameInjector
from webdnn.backend.webgl.attributes.channel_mode import ChannelMode, ChannelModeEnum
from webdnn.backend.webgl.generator import WebGLDescriptorGenerator
from webdnn.backend.webgl.kernel import... | 32.788889 | 127 | 0.686208 | 0 | 0 | 0 | 0 | 1,485 | 0.503219 | 0 | 0 | 857 | 0.29041 |
3ced6fbe48c455d53e5baee0065fd6577be73a4b | 35 | py | Python | __init__.py | chunlaw/GeoNews | 836547a51a0ed177f04135979e0a0f5212e88ed7 | [
"MIT"
] | 3 | 2016-09-05T13:43:59.000Z | 2016-09-05T15:36:12.000Z | __init__.py | chunlaw/GeoNews | 836547a51a0ed177f04135979e0a0f5212e88ed7 | [
"MIT"
] | null | null | null | __init__.py | chunlaw/GeoNews | 836547a51a0ed177f04135979e0a0f5212e88ed7 | [
"MIT"
] | null | null | null | __all__ = ['models']
import models
| 11.666667 | 20 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.228571 |
3cedde962258fae75ef3400a99dada61c8a82bd1 | 1,244 | py | Python | systemstat.py | asl97/asl97-i3bar-status-spacer | 83245582cf8973b0d128b5ed806e776e00960c5e | [
"MIT"
] | null | null | null | systemstat.py | asl97/asl97-i3bar-status-spacer | 83245582cf8973b0d128b5ed806e776e00960c5e | [
"MIT"
] | null | null | null | systemstat.py | asl97/asl97-i3bar-status-spacer | 83245582cf8973b0d128b5ed806e776e00960c5e | [
"MIT"
] | null | null | null | import time
import psutil
def _parsesendrecv(interface, new, old):
up = max(new[interface].bytes_sent - old[interface].bytes_sent, -1)
down = max(new[interface].bytes_recv - old[interface].bytes_recv, -1)
return up, down
class _netlink:
def __init__(self):
self.old = psutil.net_io_counters(per... | 28.272727 | 73 | 0.549035 | 769 | 0.618167 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.049035 |
3cefbde68b0741c1883ec538b390be6d177b8949 | 18,044 | py | Python | tests/test_net.py | ciubecca/kalasanty | df99f6814f073f2fb0fbd271d2fbfccb209c4b45 | [
"BSD-3-Clause"
] | 1 | 2021-10-19T16:59:31.000Z | 2021-10-19T16:59:31.000Z | tests/test_net.py | ciubecca/kalasanty | df99f6814f073f2fb0fbd271d2fbfccb209c4b45 | [
"BSD-3-Clause"
] | null | null | null | tests/test_net.py | ciubecca/kalasanty | df99f6814f073f2fb0fbd271d2fbfccb209c4b45 | [
"BSD-3-Clause"
] | 1 | 2021-10-20T13:05:56.000Z | 2021-10-20T13:05:56.000Z | import os
import numpy as np
import h5py
import tempfile
import pytest
from keras import backend as K
from keras.layers import Input, Convolution3D, concatenate
from keras.models import Model
from keras.optimizers import Adam
import pybel
from tfbio.data import Featurizer
from kalasanty.net import dice_np, dice,... | 39.483589 | 92 | 0.63323 | 0 | 0 | 119 | 0.006595 | 13,151 | 0.72883 | 0 | 0 | 1,946 | 0.107847 |
3cf130cd62278bdee384dab7ff29ec047f8b848a | 2,256 | py | Python | tests/test_bash_runner.py | rtmigo/svet | 06f9c5be7706351c2ef93fae0f9fa97ee69593f7 | [
"BSD-3-Clause"
] | 5 | 2021-05-18T19:55:22.000Z | 2022-03-07T20:52:19.000Z | tests/test_bash_runner.py | rtmigo/vien | 06f9c5be7706351c2ef93fae0f9fa97ee69593f7 | [
"BSD-3-Clause"
] | null | null | null | tests/test_bash_runner.py | rtmigo/vien | 06f9c5be7706351c2ef93fae0f9fa97ee69593f7 | [
"BSD-3-Clause"
] | 1 | 2021-05-23T04:04:29.000Z | 2021-05-23T04:04:29.000Z | # SPDX-FileCopyrightText: (c) 2021 Artëm IG <github.com/rtmigo>
# SPDX-License-Identifier: BSD-3-Clause
import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from timeit import default_timer as timer
from tests.common import is_posix
from vien._bash_runner import *
from tests.time_limited ... | 37.6 | 79 | 0.624113 | 1,870 | 0.828533 | 0 | 0 | 1,914 | 0.848028 | 0 | 0 | 513 | 0.227293 |
3cf1aac57cec16e9686acb6784d6d3e00f8dc890 | 8,825 | py | Python | adversarial/train_adversarial.py | liguge/Conditional-Adversarial-Domain-Generalization-with-Single-Discriminator | e0f2cd042e2c124e73d2982af28fa270263180d8 | [
"MIT"
] | 1 | 2022-01-16T03:21:18.000Z | 2022-01-16T03:21:18.000Z | adversarial/train_adversarial.py | liguge/Conditional-Adversarial-Domain-Generalization-with-Single-Discriminator | e0f2cd042e2c124e73d2982af28fa270263180d8 | [
"MIT"
] | 1 | 2022-03-29T10:50:48.000Z | 2022-03-30T07:14:56.000Z | adversarial/train_adversarial.py | hectorLop/Conditional-Adversarial-Domain-Generalization-with-Single-Discriminator | e0f2cd042e2c124e73d2982af28fa270263180d8 | [
"MIT"
] | 2 | 2022-01-16T03:21:54.000Z | 2022-03-10T01:17:12.000Z | from typing import Dict, List, Tuple
import torch
import numpy as np
import argparse
from torch import nn
import yaml
import pandas as pd
from sklearn.metrics import roc_auc_score
from adversarial.adversarial import AdversarialNetwork, Classifier, Discriminator
from adversarial.dataset import (
AdversarialDataset,... | 33.942308 | 136 | 0.566799 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 891 | 0.100963 |
3cf1f4f9c94b916e1af4be610a5cfc8f880bc37a | 18,425 | py | Python | generate_md.py | wzyjerry/EPO-patent-process | 686c0ea6d9122436071c809a238b8348cdf65120 | [
"MIT"
] | null | null | null | generate_md.py | wzyjerry/EPO-patent-process | 686c0ea6d9122436071c809a238b8348cdf65120 | [
"MIT"
] | null | null | null | generate_md.py | wzyjerry/EPO-patent-process | 686c0ea6d9122436071c809a238b8348cdf65120 | [
"MIT"
] | null | null | null | def trans_date(field: dict) -> str:
text = str(field['date'])
return '%s.%s.%s' % (text[6:], text[4:6], text[:4])
def trans_4xx(field: dict, lang: str) -> str:
text = str(field['bnum'])
return '%s %s %s/%s' % (trans_date(field), labels['bulletin'][lang], text[:4], text[4:])
def trans_ipc(field... | 39.623656 | 153 | 0.48711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,958 | 0.376678 |
3cf38cae0f2a545ab33232a28befeb4c8470d502 | 1,103 | py | Python | tests/test_http_basic_auth.py | zhanghe06/flask_restful | 6ef54f3f7efbbaff6169e963dcf45ab25e11e593 | [
"MIT"
] | 1 | 2020-12-04T03:15:47.000Z | 2020-12-04T03:15:47.000Z | tests/test_http_basic_auth.py | zhanghe06/flask_restful | 6ef54f3f7efbbaff6169e963dcf45ab25e11e593 | [
"MIT"
] | 1 | 2021-06-01T22:24:27.000Z | 2021-06-01T22:24:27.000Z | tests/test_http_basic_auth.py | zhanghe06/flask_restful | 6ef54f3f7efbbaff6169e963dcf45ab25e11e593 | [
"MIT"
] | 2 | 2020-12-04T03:16:18.000Z | 2021-09-04T14:10:12.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: test_http_basic_auth.py
@time: 2018-06-21 11:17
"""
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import requests
from requests.auth import HTTPBasicAuth
class HttpBasicAuthTest(u... | 20.425926 | 73 | 0.635539 | 790 | 0.696035 | 0 | 0 | 0 | 0 | 0 | 0 | 339 | 0.298678 |
3cf5781010a796345729a2c7347029eba43ec197 | 1,696 | py | Python | snomed_parent_cat_mapper.py | vickysam/pyHealth | 5660afd385a0342aa2039b42af5f208c672bfdeb | [
"Apache-2.0"
] | 7 | 2017-04-30T15:12:33.000Z | 2021-11-21T01:39:04.000Z | snomed_parent_cat_mapper.py | vickysam/pyHealth | 5660afd385a0342aa2039b42af5f208c672bfdeb | [
"Apache-2.0"
] | null | null | null | snomed_parent_cat_mapper.py | vickysam/pyHealth | 5660afd385a0342aa2039b42af5f208c672bfdeb | [
"Apache-2.0"
] | 2 | 2018-08-07T14:38:14.000Z | 2021-04-09T05:41:08.000Z | import csv
import pymedtermino
from pymedtermino.snomedct import *
pymedtermino.LANGUAGE = "en"
pymedtermino.REMOVE_SUPPRESSED_CONCEPTS = False
input_delta_file = 'sct2_Concept_Delta_INT_20160131.csv'
output_delta_file = 'sct2_Concept_Delta_INT_20160131_Top_Category_Mapped.csv'
data = []
snomed_data = []
with open('... | 32.615385 | 219 | 0.722877 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 461 | 0.271816 |
3cf5831f266719f857798ff19bb7f65e432caf03 | 710 | py | Python | Python/287. FindTheDuplicateNumber.py | RaymondWaterlooLi/LeetCode-Solutions | 7973d2838b114f1dffc29f436fb660a96b51f660 | [
"MIT"
] | 263 | 2020-10-05T18:47:29.000Z | 2022-03-31T19:44:46.000Z | Python/287. FindTheDuplicateNumber.py | RaymondWaterlooLi/LeetCode-Solutions | 7973d2838b114f1dffc29f436fb660a96b51f660 | [
"MIT"
] | 1,264 | 2020-10-05T18:13:05.000Z | 2022-03-31T23:16:35.000Z | Python/287. FindTheDuplicateNumber.py | RaymondWaterlooLi/LeetCode-Solutions | 7973d2838b114f1dffc29f436fb660a96b51f660 | [
"MIT"
] | 760 | 2020-10-05T18:22:51.000Z | 2022-03-29T06:06:20.000Z | #Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.
#There is only one duplicate number in nums, return this duplicate number.
class Solution(object):
def findDuplicate(self, nums):
#Traversing the list using for loop
s = sorted(nums) ... | 37.368421 | 111 | 0.539437 | 522 | 0.735211 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.391549 |
3cf74e26261f13d85a64a42ef32a7fccd8ef0a55 | 2,484 | py | Python | utils/evaluate_annotation.py | cltl-students/hamersma-agression-causes | 11cbfd94031a0a3c84a27afa20d8a539acdab609 | [
"MIT"
] | null | null | null | utils/evaluate_annotation.py | cltl-students/hamersma-agression-causes | 11cbfd94031a0a3c84a27afa20d8a539acdab609 | [
"MIT"
] | null | null | null | utils/evaluate_annotation.py | cltl-students/hamersma-agression-causes | 11cbfd94031a0a3c84a27afa20d8a539acdab609 | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.metrics import cohen_kappa_score, confusion_matrix
import os
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
dirname = os.path.dirname(__file__)
def extract_annotations(files):
'''Function that takes a file with the annotations as input and extra... | 39.428571 | 119 | 0.686393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 797 | 0.320853 |
3cf83d68c033ebd1a763e8c4a9ee5516e254ffd0 | 1,068 | py | Python | cogs/Events.py | popop098/Teasia-Bot.py | 764c3b1cab8e07a9e98690263ad94011ee26ab72 | [
"MIT"
] | 1 | 2020-12-21T12:05:25.000Z | 2020-12-21T12:05:25.000Z | cogs/Events.py | popop098/Taesia-Bot.py | 764c3b1cab8e07a9e98690263ad94011ee26ab72 | [
"MIT"
] | null | null | null | cogs/Events.py | popop098/Taesia-Bot.py | 764c3b1cab8e07a9e98690263ad94011ee26ab72 | [
"MIT"
] | 1 | 2021-10-30T03:45:42.000Z | 2021-10-30T03:45:42.000Z | import discord
from discord.ext import commands
from discord.ext.commands import has_permissions, MissingPermissions, CommandNotFound, BucketType, cooldown, CommandOnCooldown
from discord import Webhook, RequestsWebhookAdapter
from time import gmtime, strftime
from discord.utils import get
import youtube_dl
import logg... | 30.514286 | 126 | 0.729401 | 673 | 0.563652 | 0 | 0 | 587 | 0.491625 | 558 | 0.467337 | 244 | 0.204355 |
3cf96ed28f3d03023b6eb089f792b8961163dffe | 1,927 | py | Python | panopto_client/access.py | uw-it-cte/django-panopto-client | cdfc22e1a7c1e06de62477c30681da0755238152 | [
"Apache-2.0"
] | 4 | 2017-12-29T19:15:37.000Z | 2019-11-18T18:32:39.000Z | panopto_client/access.py | uw-it-cte/django-panopto-client | cdfc22e1a7c1e06de62477c30681da0755238152 | [
"Apache-2.0"
] | 2 | 2017-09-07T23:27:52.000Z | 2019-04-10T20:27:22.000Z | panopto_client/access.py | uw-it-cte/django-panopto-client | cdfc22e1a7c1e06de62477c30681da0755238152 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
"""
This module exposes Panopto "AccessManagement" Service methods
"""
from panopto_client import PanoptoAPI, PanoptoAPIException
class AccessManagement(PanoptoAPI):
def __init__(self):
super(AccessManagement, self).__... | 34.410714 | 76 | 0.637779 | 1,706 | 0.885314 | 0 | 0 | 0 | 0 | 0 | 0 | 517 | 0.268293 |
3cf9d103d47dd847c7bbdc09c8f10bae634a2961 | 20,459 | py | Python | src/astrild/particles/halo.py | Christovis/wys-ars | bb15f2d392842f9b32de12b5db5c86079bc97105 | [
"MIT"
] | 3 | 2021-07-27T14:45:58.000Z | 2022-01-31T21:09:46.000Z | src/astrild/particles/halo.py | Christovis/wys-ars | bb15f2d392842f9b32de12b5db5c86079bc97105 | [
"MIT"
] | 1 | 2021-11-03T10:47:45.000Z | 2021-11-03T10:47:45.000Z | src/astrild/particles/halo.py | Christovis/wys-ars | bb15f2d392842f9b32de12b5db5c86079bc97105 | [
"MIT"
] | 1 | 2021-11-03T10:17:34.000Z | 2021-11-03T10:17:34.000Z | import os
from gc import collect
from pathlib import Path
from typing import List, Optional, Tuple, Type, Union
from importlib import import_module
import yaml
import numpy as np
import pandas as pd
from sklearn.neighbors import BallTree
#from halotools.mock_observables import tpcf_multipole
from astrild.particles.e... | 34.853492 | 92 | 0.525783 | 19,768 | 0.966225 | 0 | 0 | 3,371 | 0.164769 | 0 | 0 | 8,362 | 0.40872 |
3cfb5d1a0f1982dc0361736334993c9728647d4a | 367 | py | Python | webapi.py | Netherdrake/steemdata-webapi | 02b443b6e7292577dfcca1a7fcc55329b1b70fb9 | [
"MIT"
] | 1 | 2017-04-20T04:22:07.000Z | 2017-04-20T04:22:07.000Z | webapi.py | Netherdrake/steemdata-webapi | 02b443b6e7292577dfcca1a7fcc55329b1b70fb9 | [
"MIT"
] | 1 | 2017-06-07T13:08:32.000Z | 2017-06-07T13:08:32.000Z | webapi.py | Netherdrake/steemdata-webapi | 02b443b6e7292577dfcca1a7fcc55329b1b70fb9 | [
"MIT"
] | null | null | null | import os
from eve import Eve
from eve_docs import eve_docs
from flask_bootstrap import Bootstrap
# init Eve
app = Eve(settings='settings.py')
# init Eve-Docs
Bootstrap(app)
app.register_blueprint(eve_docs, url_prefix='/docs')
if __name__ == '__main__':
app.run(host=os.getenv('FLASK_HOST', '127.0.0.1'),
... | 21.588235 | 54 | 0.719346 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.245232 |
3cfcd1fb4a8c9717754df6618804de4a66eaa349 | 5,475 | py | Python | notebooks/working/_02_tb-Demo-visual-marginal-independence-tests.py | hassanobeid1994/tr_b_causal_2020 | 1ffaeb7dcefccf5e1f24c459e9a2f140b2a052a5 | [
"MIT"
] | null | null | null | notebooks/working/_02_tb-Demo-visual-marginal-independence-tests.py | hassanobeid1994/tr_b_causal_2020 | 1ffaeb7dcefccf5e1f24c459e9a2f140b2a052a5 | [
"MIT"
] | 89 | 2020-02-10T02:52:11.000Z | 2020-06-23T03:50:27.000Z | notebooks/working/_02_tb-Demo-visual-marginal-independence-tests.py | hassan-obeid/tr_b_causal_2020 | 1ffaeb7dcefccf5e1f24c459e9a2f140b2a052a5 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,py,md
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.4.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # Purpose
# The point of th... | 30.586592 | 302 | 0.715982 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,957 | 0.540091 |
3cfd1eff7aa3274bf5ba215dcc74c84bcd761113 | 1,799 | py | Python | Labs/Lab-4.0 WiFi/5_wifi_logging.py | Josverl/MicroPython-Bootcamp | 29f5ccc9768fbea621029dcf6eea9c91ff84c1d5 | [
"MIT"
] | 4 | 2018-04-28T13:43:20.000Z | 2021-03-11T16:10:35.000Z | Labs/Lab-4.0 WiFi/5_wifi_logging.py | Josverl/MicroPython-Bootcamp | 29f5ccc9768fbea621029dcf6eea9c91ff84c1d5 | [
"MIT"
] | null | null | null | Labs/Lab-4.0 WiFi/5_wifi_logging.py | Josverl/MicroPython-Bootcamp | 29f5ccc9768fbea621029dcf6eea9c91ff84c1d5 | [
"MIT"
] | null | null | null | # import the network module
# This module provides access to various network related functions and classes.
# https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/network
import network,utime #pylint: disable=import-error
# ----------------------------------------------------------
# Define callback function... | 24.986111 | 81 | 0.568093 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,187 | 0.659811 |
3cfd92551f129b14e3271b5e4699d932dae50065 | 681 | py | Python | medium/1282.py | nkwib/leetcode | 73f7492ba208417d8bf8340b6bf9dc68a6ded7f7 | [
"MIT"
] | null | null | null | medium/1282.py | nkwib/leetcode | 73f7492ba208417d8bf8340b6bf9dc68a6ded7f7 | [
"MIT"
] | null | null | null | medium/1282.py | nkwib/leetcode | 73f7492ba208417d8bf8340b6bf9dc68a6ded7f7 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def groupThePeople(self, groupSizes: List[int]) -> List[List[int]]:
def slice_per(source, step):
for i in range(0, len(source), step):
yield source[i:i + step]
groups = {}
res = []
for index, person in enumerate(g... | 32.428571 | 71 | 0.565345 | 567 | 0.832599 | 547 | 0.803231 | 0 | 0 | 0 | 0 | 0 | 0 |
3cff24ff2a3befb7112dd8c73ae11e32acd5099b | 1,576 | py | Python | Code/Data_Collection/Web_Scraping/job_scraping/job_scraping/scrapy_crawler.py | gilnribeiro/Work-Project | 15ad906ef5e757daed1df9c7547e5703ad496930 | [
"MIT"
] | 1 | 2022-01-31T11:31:04.000Z | 2022-01-31T11:31:04.000Z | Code/Data_Collection/Web_Scraping/job_scraping/job_scraping/scrapy_crawler.py | gilnribeiro/Work-Project | 15ad906ef5e757daed1df9c7547e5703ad496930 | [
"MIT"
] | null | null | null | Code/Data_Collection/Web_Scraping/job_scraping/job_scraping/scrapy_crawler.py | gilnribeiro/Work-Project | 15ad906ef5e757daed1df9c7547e5703ad496930 | [
"MIT"
] | null | null | null | # Import spiders
from .spiders.bons_empregos import BonsEmpregosSpider
from .spiders.cargadetrabalhos import CargaDeTrabalhosSpider
from .spiders.emprego_org import EmpregoOrgSpider
from .spiders.emprego_xl import EmpregoXlSpider
from .spiders.net_empregos import NetEmpregosSpider
from twisted.internet import reactor,... | 34.26087 | 84 | 0.741751 | 0 | 0 | 943 | 0.59835 | 638 | 0.404822 | 0 | 0 | 407 | 0.258249 |
a70095a05438f3493dabb7b856707d3589d2cc37 | 2,302 | py | Python | sentiment/train/management/commands/train.py | mnvx/sentiment | b24fad4cfc67b0b443e8ab93b08ac1dbcb095a7c | [
"MIT"
] | null | null | null | sentiment/train/management/commands/train.py | mnvx/sentiment | b24fad4cfc67b0b443e8ab93b08ac1dbcb095a7c | [
"MIT"
] | null | null | null | sentiment/train/management/commands/train.py | mnvx/sentiment | b24fad4cfc67b0b443e8ab93b08ac1dbcb095a7c | [
"MIT"
] | null | null | null | import configparser
import csv
from django.core.management.base import BaseCommand
import logging
import os
from ....common.catalog.sentiment_type import SentimentType
from ....common.catalog.source import Source
class Command(BaseCommand):
help = 'Train the sentiment classifier'
def add_arguments(self, pars... | 34.878788 | 93 | 0.591659 | 2,087 | 0.906603 | 0 | 0 | 0 | 0 | 0 | 0 | 426 | 0.185056 |
a7024ecc7fc28ff6673f46a13ae3e63f8ae5b339 | 114 | py | Python | tests/demo/demoproject/urls.py | saxix/django-mb | 3700c05b45854a28bd23368c4e4971ae54c18cad | [
"BSD-3-Clause"
] | 2 | 2017-03-20T12:26:02.000Z | 2017-04-22T11:46:17.000Z | tests/demo/demoproject/urls.py | saxix/django-mb | 3700c05b45854a28bd23368c4e4971ae54c18cad | [
"BSD-3-Clause"
] | null | null | null | tests/demo/demoproject/urls.py | saxix/django-mb | 3700c05b45854a28bd23368c4e4971ae54c18cad | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from django.contrib import admin
admin.autodiscover()
urlpatterns = (
)
| 12.666667 | 38 | 0.798246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a70361c3e3b8431100d15650b5da10d40acb287d | 504 | py | Python | appzoo/utils/log/__init__.py | streamlit-badge-bot/AppZoo | 86547fdc5209fa137b0a6384d63e92f263c1e160 | [
"MIT"
] | 5 | 2020-11-05T12:13:45.000Z | 2021-11-19T12:26:49.000Z | appzoo/utils/log/__init__.py | streamlit-badge-bot/AppZoo | 86547fdc5209fa137b0a6384d63e92f263c1e160 | [
"MIT"
] | null | null | null | appzoo/utils/log/__init__.py | streamlit-badge-bot/AppZoo | 86547fdc5209fa137b0a6384d63e92f263c1e160 | [
"MIT"
] | 3 | 2020-11-23T23:06:34.000Z | 2021-04-18T02:12:40.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-App.
# @File : __init__.py
# @Time : 2019-12-10 17:24
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
from loguru import logger
trace = logger.add('runtime_{time}.log', rota... | 21.913043 | 80 | 0.571429 | 0 | 0 | 0 | 0 | 60 | 0.119048 | 0 | 0 | 309 | 0.613095 |
a704ebb77dcf3890670eefaa40d9424024056adf | 1,850 | py | Python | beast/tools/run/helper_functions.py | galaxyumi/beast | f5ce89d73c88ce481b04fc31a8c099c9c19041fb | [
"BSD-3-Clause"
] | 21 | 2017-03-18T13:46:06.000Z | 2022-02-21T16:02:10.000Z | beast/tools/run/helper_functions.py | galaxyumi/beast | f5ce89d73c88ce481b04fc31a8c099c9c19041fb | [
"BSD-3-Clause"
] | 673 | 2017-03-12T23:39:28.000Z | 2022-03-17T14:07:38.000Z | beast/tools/run/helper_functions.py | galaxyumi/beast | f5ce89d73c88ce481b04fc31a8c099c9c19041fb | [
"BSD-3-Clause"
] | 36 | 2017-03-18T18:00:35.000Z | 2021-09-22T06:35:55.000Z | # other imports
from multiprocessing import Pool
def subcatalog_fname(full_cat_fname, source_density, sub_source_density):
"""
Return the name of a sub-catalog
Parameters
----------
full_cat_fname : string
name of the photometry catalog
source_density : string
the current sou... | 21.511628 | 94 | 0.621081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,175 | 0.635135 |
a7054f9458e6b8299d380a912e48321581ca4d88 | 67 | py | Python | patan/exceptions.py | tttlh/patan | d3e5cfec085e21f963204b5c07a85cf1f029560c | [
"MIT"
] | null | null | null | patan/exceptions.py | tttlh/patan | d3e5cfec085e21f963204b5c07a85cf1f029560c | [
"MIT"
] | null | null | null | patan/exceptions.py | tttlh/patan | d3e5cfec085e21f963204b5c07a85cf1f029560c | [
"MIT"
] | 1 | 2021-03-01T08:35:34.000Z | 2021-03-01T08:35:34.000Z | # _*_ coding: utf-8 _*_
class IgnoreRequest(Exception):
pass
| 11.166667 | 31 | 0.671642 | 40 | 0.597015 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.343284 |
a70572ac4f62a9762d70dcd70a9fd3e4dc437ab3 | 2,621 | py | Python | experiments/sparse_sparsity_fixed_results.py | Remi-Boutin/sparsebm | 5979eafff99d59a3b6edac586ee5658529763402 | [
"MIT"
] | 1 | 2021-09-22T23:25:25.000Z | 2021-09-22T23:25:25.000Z | experiments/sparse_sparsity_fixed_results.py | Remi-Boutin/sparsebm | 5979eafff99d59a3b6edac586ee5658529763402 | [
"MIT"
] | null | null | null | experiments/sparse_sparsity_fixed_results.py | Remi-Boutin/sparsebm | 5979eafff99d59a3b6edac586ee5658529763402 | [
"MIT"
] | 1 | 2021-09-08T13:25:15.000Z | 2021-09-08T13:25:15.000Z | from matplotlib import rc
# rc("text", usetex=True)
import matplotlib
# font = {"size": 14}
# matplotlib.rc("font", **font)
import numpy as np
import matplotlib.pyplot as plt
import glob
import pickle
import time
import matplotlib.colors as mcolors
dataset_files = glob.glob("./experiments/results/sparsity_fixed/*.... | 26.474747 | 78 | 0.649752 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 768 | 0.293018 |
a70af31dd713880205073e138c1e10e6d9d8591d | 4,236 | py | Python | SerialController/Camera.py | Moi-poke/Poke-Controller-temp | b632f55eb6e5adc0f85f2ba6ef59c1230a5d5606 | [
"MIT"
] | 3 | 2021-04-23T06:30:36.000Z | 2022-01-04T09:10:25.000Z | SerialController/Camera.py | Moi-poke/Poke-Controller-temp | b632f55eb6e5adc0f85f2ba6ef59c1230a5d5606 | [
"MIT"
] | 1 | 2022-01-04T06:33:11.000Z | 2022-01-04T06:33:11.000Z | SerialController/Camera.py | Moi-poke/Poke-Controller-temp | b632f55eb6e5adc0f85f2ba6ef59c1230a5d5606 | [
"MIT"
] | 6 | 2021-10-03T05:42:50.000Z | 2022-03-15T00:29:09.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import cv2
import datetime
import os
import numpy as np
from logging import getLogger, DEBUG, NullHandler
def imwrite(filename, img, params=None):
_logger = getLogger(__name__)
_logger.addHandler(NullHandler())
_logger.setLevel(DEBUG)
_logg... | 33.09375 | 77 | 0.553824 | 3,496 | 0.825307 | 0 | 0 | 0 | 0 | 0 | 0 | 696 | 0.164306 |
a70b86cdb095113c2f13cde684b541b11f3759d8 | 4,975 | py | Python | my_tagger.py | jndevanshu/tagger | 51181d3ac9b0959ba507ee0c06c28bed55b51c76 | [
"Apache-2.0"
] | null | null | null | my_tagger.py | jndevanshu/tagger | 51181d3ac9b0959ba507ee0c06c28bed55b51c76 | [
"Apache-2.0"
] | null | null | null | my_tagger.py | jndevanshu/tagger | 51181d3ac9b0959ba507ee0c06c28bed55b51c76 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import time
import codecs
import optparse
import sys
import json
import numpy as np
from my_loader import prepare_sentence
from utils import create_input, iobes_iob, iob_ranges, zero_digits
from model import Model
from ccg_nlpy.core.text_annotation import TextAnnotation
from ccg_nlpy.... | 30.521472 | 213 | 0.605427 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,064 | 0.213869 |
a70d45fc226ab2dd59c5db64dd9ed218486ffae6 | 4,691 | py | Python | Inkscape-OUTPUT-PRO-master/outputpro/cutmarks.py | ilnanny/Inkscape-addons | a30cdde2093fa2da68b90213e057519d0304433f | [
"X11"
] | 3 | 2019-03-08T23:32:29.000Z | 2019-05-11T23:53:46.000Z | Inkscape-OUTPUT-PRO-master/outputpro/cutmarks.py | ilnanny/Inkscape-addons | a30cdde2093fa2da68b90213e057519d0304433f | [
"X11"
] | null | null | null | Inkscape-OUTPUT-PRO-master/outputpro/cutmarks.py | ilnanny/Inkscape-addons | a30cdde2093fa2da68b90213e057519d0304433f | [
"X11"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import subprocess #re, subprocess, simplestyle, os#inkex, os, random, sys, subprocess, shutil
def generate_final_file(isvector, hide_inside_marks, colormode, width, height, space, strokewidth, bleedsize, marksize, temp_dir):
if not isvector:
command = []
... | 56.518072 | 248 | 0.5534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 558 | 0.118951 |
a70ebc7cdf0e76c3a3a02437342d60d6be4b5d1f | 4,513 | py | Python | test/test_cli.py | Datateer/upload-agent | 4684bcf902d6c54baefb08446252a69612bf15a0 | [
"MIT"
] | null | null | null | test/test_cli.py | Datateer/upload-agent | 4684bcf902d6c54baefb08446252a69612bf15a0 | [
"MIT"
] | 2 | 2021-02-05T18:58:23.000Z | 2021-02-14T15:23:46.000Z | test/test_cli.py | Datateer/upload-agent | 4684bcf902d6c54baefb08446252a69612bf15a0 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
from unittest.mock import patch
from click.testing import CliRunner
import pytest
from datateer.upload_agent.main import cli
from datateer.upload_agent.config import load_config, save_config, save_feed
import datateer.upload_agent.constants as constants
@pytest.fixture
def runner... | 41.40367 | 132 | 0.734766 | 0 | 0 | 0 | 0 | 3,424 | 0.758697 | 0 | 0 | 1,642 | 0.363838 |
a70f8fbd9aef0f039b565e8b5e5bf81d26036760 | 14,899 | py | Python | modron/characters.py | WardLT/play-by-post-helper | 26df681f2a28510f88e552be628910e4e5fe57bb | [
"MIT"
] | null | null | null | modron/characters.py | WardLT/play-by-post-helper | 26df681f2a28510f88e552be628910e4e5fe57bb | [
"MIT"
] | 13 | 2020-04-08T02:56:58.000Z | 2020-10-04T21:52:43.000Z | modron/characters.py | WardLT/play-by-post-helper | 26df681f2a28510f88e552be628910e4e5fe57bb | [
"MIT"
] | null | null | null | """Saving and using information about characters"""
import json
import os
from enum import Enum
from typing import Dict, List, Optional, Tuple
import yaml
from pydantic import BaseModel, Field, validator
from modron.config import get_config
_config = get_config()
def _compute_mod(score: int) -> int:
"""Compute... | 34.093822 | 118 | 0.627626 | 12,527 | 0.840795 | 0 | 0 | 2,186 | 0.146721 | 0 | 0 | 6,162 | 0.413585 |
a7101a610a52017f13a5fe2d6d32d405867f9aef | 1,558 | py | Python | setup.py | Borsos/rubik | af220a142b81a8f5b5011e4e072be9e3d130e827 | [
"Apache-2.0"
] | 1 | 2019-11-13T00:44:09.000Z | 2019-11-13T00:44:09.000Z | setup.py | Borsos/rubik | af220a142b81a8f5b5011e4e072be9e3d130e827 | [
"Apache-2.0"
] | null | null | null | setup.py | Borsos/rubik | af220a142b81a8f5b5011e4e072be9e3d130e827 | [
"Apache-2.0"
] | 1 | 2019-11-13T00:47:16.000Z | 2019-11-13T00:47:16.000Z | #
# Copyright 2013 Simone Campagna
#
# 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... | 27.333333 | 101 | 0.668164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 921 | 0.591142 |
a710a43bb737f726810f9f83e8727afbf0fbd72e | 5,130 | py | Python | geco/mips/tests/test_set_cover.py | FreestyleBuild/GeCO | 6db1a549b3145b3bc5d3025a9bccc03be6575564 | [
"MIT"
] | 8 | 2020-12-16T09:59:05.000Z | 2022-03-18T09:48:43.000Z | geco/mips/tests/test_set_cover.py | FreestyleBuild/GeCO | 6db1a549b3145b3bc5d3025a9bccc03be6575564 | [
"MIT"
] | 101 | 2020-11-09T10:20:03.000Z | 2022-03-24T13:50:06.000Z | geco/mips/tests/test_set_cover.py | FreestyleBuild/GeCO | 6db1a549b3145b3bc5d3025a9bccc03be6575564 | [
"MIT"
] | 3 | 2021-04-06T13:26:03.000Z | 2022-03-22T13:22:16.000Z | import collections
import itertools
import pytest
from geco.mips.set_cover.yang import *
from geco.mips.set_cover.sun import *
from geco.mips.set_cover.orlib import *
from geco.mips.set_cover.gasse import *
"""
Generic Tests
"""
def test_set_cover_solution_1():
model = set_cover([1], [{0}])
model.optimize(... | 28.5 | 87 | 0.670175 | 0 | 0 | 0 | 0 | 4,074 | 0.794152 | 0 | 0 | 352 | 0.068616 |
a71112e7354fe0bb8dca61271d9bc6a1f7ca9381 | 8,430 | py | Python | lib/overnet/gen_bazel.py | PowerOlive/garnet | 16b5b38b765195699f41ccb6684cc58dd3512793 | [
"BSD-3-Clause"
] | null | null | null | lib/overnet/gen_bazel.py | PowerOlive/garnet | 16b5b38b765195699f41ccb6684cc58dd3512793 | [
"BSD-3-Clause"
] | null | null | null | lib/overnet/gen_bazel.py | PowerOlive/garnet | 16b5b38b765195699f41ccb6684cc58dd3512793 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import os
import sys
# This program generates BUILD.bazel, WORKSPACE, .bazelrc from BUILD.gn
##################... | 27.281553 | 100 | 0.57758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,054 | 0.480902 |
a711b022a699f3a1657ba1bf4a22b34ce38cfe57 | 2,878 | py | Python | hcplot/scales/colors/hue.py | bernhard-42/hcplot | 1c791e2b19b173b9b98a3d8914095e3c372c9de4 | [
"Apache-2.0"
] | null | null | null | hcplot/scales/colors/hue.py | bernhard-42/hcplot | 1c791e2b19b173b9b98a3d8914095e3c372c9de4 | [
"Apache-2.0"
] | null | null | null | hcplot/scales/colors/hue.py | bernhard-42/hcplot | 1c791e2b19b173b9b98a3d8914095e3c372c9de4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Bernhard Walter
#
# 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 writin... | 30.294737 | 99 | 0.592078 | 2,125 | 0.737847 | 0 | 0 | 1,706 | 0.592361 | 0 | 0 | 911 | 0.316319 |
a71203325ed630e617cb8551726c8b7f07f5f6f8 | 423 | py | Python | accounts/migrations/0013_alter_caller_list_file.py | Srinjay-hack/Buddy | 155b9ba58a20bf043493213dd8349f61012fc480 | [
"Apache-2.0"
] | null | null | null | accounts/migrations/0013_alter_caller_list_file.py | Srinjay-hack/Buddy | 155b9ba58a20bf043493213dd8349f61012fc480 | [
"Apache-2.0"
] | null | null | null | accounts/migrations/0013_alter_caller_list_file.py | Srinjay-hack/Buddy | 155b9ba58a20bf043493213dd8349f61012fc480 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.4 on 2021-07-12 14:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0012_alter_caller_estimated_amount'),
]
operations = [
migrations.AlterField(
model_name='caller',
name=... | 22.263158 | 72 | 0.614657 | 330 | 0.780142 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.269504 |
a712ce0eafb15d53426b4b979da8580fdd2c7a4c | 7,978 | py | Python | vk_bots/api.py | termisaal/VkBotsApi | 0957ea46952c260090741aeddf71d50dd950f74c | [
"MIT"
] | null | null | null | vk_bots/api.py | termisaal/VkBotsApi | 0957ea46952c260090741aeddf71d50dd950f74c | [
"MIT"
] | null | null | null | vk_bots/api.py | termisaal/VkBotsApi | 0957ea46952c260090741aeddf71d50dd950f74c | [
"MIT"
] | null | null | null | """
VK Bots API Wrapper
Copyright (c) 2020-2021 Misaal
"""
import aiohttp
import json
import typing
from .errors import VKAPIError
from .keyboard import Keyboard
from .utils import to_namedtuple, get_random_id
class MethodGroup:
"""Base class for API methods groups"""
def __init__(self, access_token, v):
... | 27.701389 | 93 | 0.534971 | 7,718 | 0.96741 | 0 | 0 | 0 | 0 | 5,747 | 0.720356 | 414 | 0.051893 |