blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 281 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 6 116 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 313
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 18.2k 668M ⌀ | star_events_count int64 0 102k | fork_events_count int64 0 38.2k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 107
values | src_encoding stringclasses 20
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.02M | extension stringclasses 78
values | content stringlengths 2 6.02M | authors listlengths 1 1 | author stringlengths 0 175 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
234fe0703bcd32e0a8e3cea1e43969c845b3ac6e | ba0cbdae81c171bd4be7b12c0594de72bd6d625a | /MyToontown/Toontown2016/toontown/toonbase/ToontownStartDist.py | 6718c47b2d8ad07f5cb8e4b83442d6bf516c3334 | [] | no_license | sweep41/Toontown-2016 | 65985f198fa32a832e762fa9c59e59606d6a40a3 | 7732fb2c27001264e6dd652c057b3dc41f9c8a7d | refs/heads/master | 2021-01-23T16:04:45.264205 | 2017-06-04T02:47:34 | 2017-06-04T02:47:34 | 93,279,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,538 | py | # This is the "main" module that will start a distribution copy of
# Toontown 2016
# Replace some modules that do exec:
import collections
collections.namedtuple = lambda *x: tuple
# This is included in the package by the prepare_client script. It contains the
# PRC file data, (stripped) DC file, and time zo... | [
"sweep14@gmail.com"
] | sweep14@gmail.com |
42c8a383b2d310a0e02a6e8acb97b3e392f78b79 | 2e72c5ab40eed0dd41ffb2c6cc902c019434cd55 | /MainPage/findClosestBranch.py | 8f31ae807402216c2ba1e687f7644f72902e2c54 | [] | no_license | MateuszsuetaM/ussr | 445c777df0656178d153ab0f5b43d4b052cb48ce | 9e62714ef8f3d79f97bc07bc376d97cb6372de52 | refs/heads/master | 2021-09-03T11:27:23.959714 | 2018-01-08T18:11:22 | 2018-01-08T18:11:22 | 111,199,941 | 0 | 0 | null | 2017-11-25T13:22:07 | 2017-11-18T11:25:52 | Python | UTF-8 | Python | false | false | 622 | py | from math import cos, asin, sqrt
from company import models
def distance(lat1, lon1, lat2, lon2):
p = 0.017453292519943295
a = 0.5 - cos((lat2-lat1)*p)/2 + cos(lat1*p)*cos(lat2*p) * (1-cos((lon2-lon1)*p)) / 2
return 12742 * asin(sqrt(a))
def getClosest(u_lat, u_lon):
closestBranch = ''
closestDist... | [
"ksazon@sigma.ug.edu.pl"
] | ksazon@sigma.ug.edu.pl |
976ee0ae69a2b1866f4ac2bf56a9bc4c1732988a | d8e4c9182c83ef781e2b574cd639917ecd38a53a | /ralgraph/chart.py | 07c1f0a5891c0850ea04238b64b8002c3a7563bf | [] | no_license | mirmik/ralgraph | b98fa39904b1e5cea4cfde9f4e6a81a3b7728999 | a66da89ab85b86b7d68787b8b199267f12c40da7 | refs/heads/master | 2020-07-03T12:20:35.018998 | 2020-04-06T10:00:35 | 2020-04-06T10:00:35 | 201,902,647 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,309 | py | #!/usr/bin/python3
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import numpy
import time
import threading
class ArrayChart:
def __init__(self, plot=None):
self.plot = plot
self.x_chart_coords = []
self.y_chart_coords = []
self.autoscale = True
self.xmin = float("inf... | [
"netricks@protonmail.com"
] | netricks@protonmail.com |
910aba7d092e6fe88237d6d7c73f25a5638d20a8 | c70dfc0d74b34e41f7d2dbdbd6bfaca2f79af55b | /cyp/models/convnet.py | 7e74e171c0c26477317c14467986b5411a787c77 | [
"MIT"
] | permissive | jeangolay/pycrop-yield-prediction | a2c65fa3bd704d1d3251318a9afe39bfcd05cf10 | 1b36b673cc58b506ad4d3c8bd6b6917ac5a72d28 | refs/heads/master | 2021-02-18T06:58:31.844163 | 2019-11-25T13:45:55 | 2019-11-25T13:45:55 | 245,172,915 | 0 | 1 | MIT | 2020-03-05T13:39:21 | 2020-03-05T13:39:20 | null | UTF-8 | Python | false | false | 7,994 | py | import torch
from torch import nn
import torch.nn.functional as F
from pathlib import Path
from .base import ModelBase
class ConvModel(ModelBase):
"""
A PyTorch replica of the CNN structured model from the original paper. Note that
this class assumes feature_engineering was run with channels_first=True
... | [
"gabriel.tseng@mail.mcgill.ca"
] | gabriel.tseng@mail.mcgill.ca |
2e230cb8aa62731299b1f164e9a99323b26e1092 | 727d8e53595146fcb20a1fc9ede035027caa78e0 | /fixAddPlants.py | 811caca48f68155a4a71f49c7484616654f2a039 | [] | no_license | yzyly1992/PWP-Lib-Crawler | b5de68c26e72ccf46bb89bfc5c68d0158d0e044e | 7c14d1444a230c2cd4b33160afa2a57299735b7b | refs/heads/master | 2021-05-23T15:16:16.497585 | 2020-10-09T00:50:55 | 2020-10-09T00:50:55 | 253,356,336 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 313 | py | import os, re
import json
with open("plants.json", "r") as jsonFile:
data = json.load(jsonFile)
i = len(data)
n = 0
while n < i:
path = data[n]["path"]
data[n]["mac"] = path.replace("\\", "/").replace("Y:", "/Volumes/Library")
n += 1
with open("plants.json", "w") as f:
json.dump(data, f)
| [
"zyang03@risd.edu"
] | zyang03@risd.edu |
85fe15a332034b335a9570daf22b21f4db86e628 | 6c7208a85a33accbae4408946a458558766787fd | /writeAbsence.py | 26afee715eb56695b0e69e45fc9603bd29ac7090 | [] | no_license | 17Pixelz/Face_Reco | f3f409537bb8c196d299cb2104e0ac8d27799feb | 40d477a847226619fa8f09ecf5dd4bd2c808d13c | refs/heads/main | 2023-05-31T11:54:47.436625 | 2021-06-24T16:35:16 | 2021-06-24T16:35:16 | 376,830,855 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | import csv
def giveAbsenceFile(names):
with open('absence.csv', mode='w') as absence:
writer = csv.writer(absence, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
for name in set(names):
writer.writerow([name, 'P']) | [
"touamayoussef@gmail.com"
] | touamayoussef@gmail.com |
132e4ee4c793bdc4161705a02085ff9af6bd4275 | cdf4c78d609fc6cf39deaa74dae56d2ba33f027f | /basic_syntax/1_6input.py | 5d81bcc6d037727e7b73cf9ba605a95a81b678af | [] | no_license | choyeaeun/Python_study | 0b201b91e28b63a382bee1fc3c74ee3c2056844a | d0dab7aabb4579fa24dd64b42ca94d2be854264a | refs/heads/master | 2020-08-07T16:37:14.534707 | 2019-10-11T15:51:03 | 2019-10-11T15:51:03 | 213,526,906 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 261 | py | #사용자의 입력을 받는 함수 input
print('what is your name?')
a = input()
print('my name is ', a)
#input함수에서는 간단한 print기능이 포함되어 있음
mine = input('가위 바위 보 중에 하나를 내 보세요')
print('mine:', mine) | [
"silbia629@gmail.com"
] | silbia629@gmail.com |
3df046ae73258735aa27ee3942b82aec114a9ca8 | e72b8ac4d15e37fca4a34c775de490371bf3a2e1 | /plasmapy/utils/calculator/widget_helpers.py | 1a10b2c87b53d06d6d14eea15d3f0d9c28b93ecb | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | RAJAGOPALAN-GANGADHARAN/PlasmaPy | a4cd91cfcc31cfe6b69b6174d37bb094ddbf0052 | 3c1d6a72af2531a4603f227eabe74971a98da662 | refs/heads/main | 2023-01-08T05:12:02.952882 | 2022-03-19T18:00:35 | 2022-03-19T18:00:35 | 159,909,658 | 1 | 0 | NOASSERTION | 2018-12-01T04:42:14 | 2018-12-01T04:42:12 | null | UTF-8 | Python | false | false | 18,149 | py | """
Contains functions that create widgets and process properties for the calculator.
"""
__all__ = []
import abc
import importlib
import ipywidgets as widgets
from inspect import signature
from plasmapy.particles import Particle
BLACK = (0, 0, 0)
"""RGB constant for black."""
DARK_RED = (255, 0, 0)
"""RGB Consta... | [
"noreply@github.com"
] | noreply@github.com |
d857d210c85ab7e5b44aa427f2403019ebe176a1 | f08d137b7821d79672c91e5f06967ffa1f90e278 | /.history/Python/Main_py_20211021101357.py | 24180ebf2cf62ee0838fe71a2cd46e81d5e858e6 | [] | no_license | anhviet-key/hello-cac-ban | a39ffb1731a77dd171523ea145f5d8b62fccde7c | 18411b51add7e3277d42869f8a50c67111337983 | refs/heads/main | 2023-08-23T09:02:01.074958 | 2021-10-27T07:48:47 | 2021-10-27T07:48:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | from Sub_py import emailProcess, print_Mess
def main():
emails = ["hello.vi@gmail.com", "Package@yahoo.com", "Test@gmail.dev"]
for email in emails:
usemailProcess(email)
if __name__ == "__main__":
main()
| [
"92666546+anhviet-key@users.noreply.github.com"
] | 92666546+anhviet-key@users.noreply.github.com |
a7da83c154c9480e68fc45b27de2fc75c7bd51ce | 5bfd97b3ed5b173af6d97cbed91fe4cbeb9d5690 | /901_recommendation/plots.py | 6b573a9702b23a39ebbe973c8ec8bab6096177b4 | [] | no_license | AndersonJo/python-lab | dce6c1e96313ce339153c3aaf13b052581113726 | eafbeddc7a7706377478282252806de3a56cc5bb | refs/heads/master | 2020-03-22T20:54:26.708450 | 2018-10-30T05:56:50 | 2018-10-30T05:56:50 | 140,641,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,040 | py | from random import uniform
import pylab as p
from data import critics
def display_critics(name1, name2):
"""
plot the two critics' movie scores.
@param name1 (str): the name of a critic
@param name2 (str): the name of a critic
"""
movies1 = critics.get(name1, None)
movies2 = critic... | [
"a141890@gmail.com"
] | a141890@gmail.com |
e782fadcca8915536908baee95741f6ecdf8ee5d | 63d1f90e4f32cc179635b50597fb264d77a8149d | /ceaos/__init__.py | ee66221e89d5f6cc061a3f4472e5abad0e404b7b | [] | no_license | kxu11235/cea-os | 6474fbfd0cd632d40693f472abf5c7f700ab9772 | 851639a609a4a238bbefedf191a8d0eaf567ed20 | refs/heads/main | 2023-06-01T07:39:30.098497 | 2021-06-09T16:43:47 | 2021-06-09T16:43:47 | 375,759,475 | 0 | 0 | null | 2021-06-10T16:15:44 | 2021-06-10T16:15:43 | null | UTF-8 | Python | false | false | 71 | py | # CEA-OS is an operating system for controlled environment agriculture
| [
"nandan.t@live.com"
] | nandan.t@live.com |
89315f19c44ce6a4e4989a4db8b8892a9ebb7e53 | d154b2c87c1ac29b008acbcfe7dbf1f904f72840 | /FirstLab/venv/Scripts/pip3-script.py | 8a1386c20815cc18abfa22301321e849233b9caf | [] | no_license | sophiacrumb/BDAS | 4cb1ede2022f7ef49e182be2ecb7a21faedff1f5 | 02576e057c7835ff506eb68eb9fccdc952e078f1 | refs/heads/main | 2022-12-31T08:07:55.880154 | 2020-10-20T16:13:45 | 2020-10-20T16:13:45 | 303,101,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | #!D:\PycharmProjects\FirstLab\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys... | [
"sophiacrumb@yandex.ru"
] | sophiacrumb@yandex.ru |
596b45507c8239328799775cbfed3e1258342f5c | 11f5ff0c46b1ed0d89a2b582bea6d91432563ff2 | /conftest.py | f560e935abaee6394bf5fff41d6d6f7d26baa25d | [] | no_license | hfridland/test_items | 829e76ba7cf66cd2d417a1033e7d47425f029e2a | f335c97dc1e26a706f05c6cd26e58804dce61da9 | refs/heads/main | 2023-05-22T10:49:16.537579 | 2021-06-05T18:45:17 | 2021-06-05T18:45:17 | 374,188,484 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | import pytest
from selenium import webdriver
def pytest_addoption(parser):
parser.addoption('--language', action='store', default=None,
help="Choose user language")
@pytest.fixture(scope="function")
def browser(request):
browser = webdriver.Chrome()
yield browser
browser.quit()
... | [
"hfridland@shaw.ca"
] | hfridland@shaw.ca |
d00a26baca490f31f439effc72c908cdb5f1a988 | f8bdc46409c9f5eaf3d85ef157260589462d941a | /demos/instance_occlsegm/instance_occlsegm_lib/contrib/instance_occlsegm/models/mask_rcnn/mask_rcnn_train_chain.py | dcac6d9a34651571c6619b60979f08467e428520 | [
"MIT",
"BSD-3-Clause"
] | permissive | start-jsk/jsk_apc | 2e268f8b65e9d7f4f9cc4416dc8383fd0a7b9750 | c4e349f45ef38457dc774e33f6902acf1a1540a6 | refs/heads/master | 2023-09-05T09:06:24.855510 | 2023-09-01T17:10:12 | 2023-09-01T17:10:12 | 25,620,908 | 36 | 25 | NOASSERTION | 2023-09-01T17:10:14 | 2014-10-23T05:28:31 | Common Lisp | UTF-8 | Python | false | false | 9,218 | py | # Modified works:
# --------------------------------------------------------
# Copyright (c) 2017 - 2018 Kentaro Wada.
# Licensed under The MIT License [see LICENSE for details]
# --------------------------------------------------------
# This is modified work of FasterRCNNTrainChain:
# -------------------------------... | [
"www.kentaro.wada@gmail.com"
] | www.kentaro.wada@gmail.com |
9afaba937a03de22be796a6bd07f246a6dced59f | 42b4211e959b797ba23089b70242ce7ba591c65b | /572_Subtree_of_Another_Tree.py | 21c7cb567a7173cbf2f7797c287c716fa73fd23e | [] | no_license | shauryasrivatava/devsnest_dsa | 7699de2f0707f27785137a72280b20ad5ddcd789 | 01274b1d2d623677a7512276599647ee5222bb6b | refs/heads/main | 2023-05-04T05:05:32.237159 | 2021-05-18T18:46:36 | 2021-05-18T18:46:36 | 348,429,262 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
def same(s,t):
if s is None and t is None :
return True
if s is None or t is None:
return False
if s... | [
"noreply@github.com"
] | noreply@github.com |
4faf1c90487d459da70158af665f0ebc2c9cf364 | d75fc0ae459066bfb15187d1c902e22000153dc4 | /TestScript/tenderverificationONSupplierStatus.py | 44e27edee4b8c97a036372329b6aa5c7f6dc4e37 | [] | no_license | sureshkumarkadi/Project | 875a05a752164ff9620286ab8261c7774acc4f27 | 4652edfa6ac47d6f44bd41e03314d96753e09d92 | refs/heads/master | 2020-03-25T19:52:23.124215 | 2018-08-09T05:28:08 | 2018-08-09T05:28:08 | 144,104,609 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,308 | py | #-------------------------------------------------------------------------------
# Name: module2
# Purpose:
#
# Author: mathew.jacob
#
# Created: 25/08/2016
# Copyright: (c) mathew.jacob 2016
# Licence: <your licence>
#-------------------------------------------------------------------------------... | [
"Suresh.Kumar@causeway.com"
] | Suresh.Kumar@causeway.com |
9dcddbcc8d5d3f81e9b43c1b674bb99bf74081e6 | 495943f075f6a641d456d66deebb208847cb6c50 | /bases/bases.py | 4b971bac31d64037ece100affafdb194b8cec092 | [] | no_license | LukazDane/CS-1.3 | 377a6ef77c3db4a497f492ed73a3ba2487531b93 | 9cee1f71b9374a54a1fe336cd1f8db1a51275ef8 | refs/heads/master | 2022-07-04T00:26:48.498036 | 2020-05-11T02:37:00 | 2020-05-11T02:37:00 | 255,189,216 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,209 | py | import string
import math
# ##### https://en.wikipedia.org/wiki/List_of_Unicode_characters
# Hint: Use these string constants to encode/decode hexadecimal digits and more
# string.digits is '0123456789'
# string.hexdigits is '0123456789abcdefABCDEF'
# string.ascii_lowercase is 'abcdefghijklmnopqrstuvwxyz'
# string.asc... | [
"deandrevidal@aol.com"
] | deandrevidal@aol.com |
bc5eee51bb8fa035ca88cc586c8b806b2004d5e4 | 1cefaa5074569d972479fdc23b09d2cb70bc2332 | /apps/product/models.py | 7be7c81872b2e29b3673c58870fcbc1b78844f95 | [] | no_license | SazidAhmed/Django-Rest-Store-Server | 8cf5cfe8099686b6ef0952f72e29f69e9e995f9f | 99f98b4522913296867fdab38f4e53ce3596f200 | refs/heads/master | 2023-04-11T16:24:55.974446 | 2021-04-29T15:09:41 | 2021-04-29T15:09:41 | 357,680,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,059 | py | from io import BytesIO
from PIL import Image
from django.core.files import File
from django.db import models
class Category(models.Model):
name = models.CharField(max_length=255)
slug = models.SlugField()
class Meta:
ordering = ('name',)
class Meta:
verbose_name_plural = 'Categories'... | [
"sazidahmed.official@gmail.com"
] | sazidahmed.official@gmail.com |
0e4529c3d3b3619b12b70827cb8b534191dd1ce1 | 9804004f7518c825579a2a8b0cde8dd5a3ba82b2 | /project_alva/project_alva/machine_learning/model/stats.py | 625fa81bfdae90ed4616558eb7d9c409bb73ff9d | [] | no_license | encoder-90/ds_projects | df69b18f659c886e37fec8bff083da11d2d6dc3d | 97d3a5c6c2441aea10a2487656fd2c972c4ccfa0 | refs/heads/main | 2023-08-13T00:49:33.424616 | 2021-09-27T06:07:46 | 2021-09-27T06:07:46 | 320,169,391 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,593 | py | import numpy as np
import uuid
import pygal
from machine_learning.data import helper
def transform_target_y(data):
"""
Transform the target column y to natural log. This scales the target and helps to stabilize the outcome
by normally distributing the values.
NOTE: It needs to transform back with exp... | [
"a.jirov@student.fontys.nl"
] | a.jirov@student.fontys.nl |
a23916c417b2fe893c1d68ba20334ad5fc4aee29 | 15b4acc80b261325fdfc95f55852e8bf2bdbbb58 | /Keras_tf.py | 1ca06439b516cfcbd3c51dcb558640c67c4a0982 | [] | no_license | ChristianMDahl/ClassificationGradesheetsMiniPics | 8b551904fdac734a144ac3339ea7b410266ace6b | 1fd03c1b80ccb996723382ae657081e368cd8b34 | refs/heads/master | 2021-07-09T16:58:55.267843 | 2017-10-07T15:34:35 | 2017-10-07T15:34:35 | 106,108,152 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,303 | py | #---------------------------------------------------------
# Classification of mini_pics from sweedish grading sheets
#---------------------------------------------------------
import tensorflow as tf
#Re_estimate = 1: New model is trained
#Re_estimate = 0: Most recently trianed model is loaded
##################
Re_e... | [
"christianmdahl@gmail.com"
] | christianmdahl@gmail.com |
ccecdaff747cdec374326dda1a311cbd51a5223a | 9e4e40eafb302a560ce33f2c8418769fa14185d1 | /section3/sentiment_analysis.py | 0ebb649d7cd782b635beafc7bfaa8e394e758d86 | [] | no_license | anantsrivastava30/TextMining | 371bd46663e39702a0e38f8a6598e3e3030aca35 | f13f001295ee2567a6b2e4c277774fdac6426a44 | refs/heads/master | 2021-05-06T03:10:50.061765 | 2018-02-09T07:40:02 | 2018-02-09T07:40:02 | 114,817,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,214 | py | # coding: utf-8
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import roc_auc_score
from sklearn.svm import SVC
from sklearn.feature_extracti... | [
"anantsrivastava30@gmail.com"
] | anantsrivastava30@gmail.com |
b6c14ecc4de8df6c97043617c7c8596c81f72f7a | 36f0cb1f6d660ab3f6de972c2c43b79276399581 | /prgrm1.py | 9c26052c51df30bd4ab8ae5b41b9d00e0eece9b9 | [] | no_license | alugurikeerthana/task1 | ea16a813f7015d55b17f154f049b129c72afe87d | fe3c4a112c6832c2ffc1ac4c1b7e5566d97bceec | refs/heads/master | 2020-03-19T13:13:39.361996 | 2018-06-08T05:05:39 | 2018-06-08T05:05:39 | 136,568,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 75 | py | import numpy as np
x = np.random.randint(low=10, high=30, size=6)
print(x)
| [
"noreply@github.com"
] | noreply@github.com |
92f23dfc35fd5f746d7c4a087a4c054ae511a765 | 637d06abc4c533cabfed9518857c702b6d0558a6 | /users/migrations/0001_initial.py | fbaefc5cbc447a45eaa28c11f2b2df3d9d6bbbaf | [] | no_license | nakusha/airbnb_django_backend | 5756b2e02abb3304ca67ee387041a83813890119 | 2a60c9279d5a661be264e5568451d544a29962ca | refs/heads/master | 2023-06-20T02:08:16.540289 | 2021-07-18T15:26:37 | 2021-07-18T15:26:37 | 367,626,436 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,519 | py | # Generated by Django 3.2.3 on 2021-06-16 07:25
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_m... | [
"“runnaway@naver.com”"
] | “runnaway@naver.com” |
8f621fcf4d57992e0318f3582902bd71e2732e6d | fcbacd428f9cbf0e384534fea1ebc068efa7285a | /data.py | 6700e4831b1b5bdc34e692d0fc5da333e279a696 | [] | no_license | punkungkub/RoobotEvolution | f064b5fa58e0a2920ccc9b349521ed0a1a29a86c | 8f4d1a40a3921b493cf963653eba07a5ed537b70 | refs/heads/master | 2022-11-27T01:44:50.513264 | 2020-08-04T06:48:11 | 2020-08-04T06:48:11 | 284,873,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,566 | py | import matplotlib.pyplot as plt
import numpy as np
import pickle, json
import os,shutil
from threading import Thread
class data:
def __init__(self):
self.generation=[]
self.fitness={}
self.data={}
def storage(self, gen, data):
self.generation.append(gen)
self.da... | [
"43475513+punkungkub@users.noreply.github.com"
] | 43475513+punkungkub@users.noreply.github.com |
f934db4460afcfe6a86fce63da946622c0bed8ad | 981ac0fc0958ed4258e8adb4408980857d8d0cc1 | /monitor/web_session.py | a4258028fbf0b035aafff6aada8783b9b6f5cd4e | [] | no_license | D3ee/YjMonitor | 1dc8e19d464784610cc9db9450d069b3bad5fe65 | 8179f9d39aa5b60274da4b7e38e173e380265c42 | refs/heads/master | 2020-05-27T23:52:57.340370 | 2019-05-27T10:28:57 | 2019-05-27T10:28:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,156 | py | import sys
import asyncio
import aiohttp
import printer
from exceptions import LogoutError, RspError
from json_rsp_ctrl import Ctrl, JsonRspType, DEFAULT_CTRL, TMP_DEFAULT_CTRL
sem = asyncio.Semaphore(2)
class WebSession:
def __init__(self):
self.var_session = aiohttp.ClientSession(timeout=ai... | [
"yjqiang1@gmail.com"
] | yjqiang1@gmail.com |
fe1157f372e8999831140b5c8835adac1ce983b2 | bc572eca7a03aec83ee55300887a21cad3dbd160 | /tools/Polygraphy/tests/comparator/test_postprocess.py | 0cbba453125e5baa918d358612e41d35c9cb243d | [
"Apache-2.0",
"BSD-3-Clause",
"ISC",
"BSD-2-Clause",
"MIT"
] | permissive | wuqiangch/TensorRT | fba0029dc5c0b3b9ffa091e45f26d8d10d702393 | d04182cd0086c70db4a8ad30e0d7675c4eb33782 | refs/heads/master | 2023-05-31T21:04:01.079351 | 2021-06-23T20:37:20 | 2021-06-25T19:39:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,520 | py | #
# Copyright (c) 2021, NVIDIA CORPORATION. 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 appl... | [
"rajeevsrao@users.noreply.github.com"
] | rajeevsrao@users.noreply.github.com |
96659a31eb97f9771b0d4e5698d71ee2d18d1006 | b715012e5ba8c54ff6676aa4c7c7f3c7ed7ee32a | /gridworld.py | bf3fb97f8fcfb3f37474453ca2321ab8d1b56b8a | [] | no_license | chengshaozhe/sheep_policy | 569adf80e129ed070e0866e6f53d1b61ddfcd76d | fcbfaaa2506e228036fe8606ca271555fc3f291a | refs/heads/master | 2021-08-08T07:23:59.063663 | 2020-04-19T12:35:37 | 2020-04-19T12:35:37 | 158,331,454 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,104 | py |
import numpy as np
from viz import *
from reward import *
import random
from collections import deque
import os
from PIL import Image
class GridWorld():
def __init__(self, name='', nx=None, ny=None):
self.name = name
self.nx = nx
self.ny = ny
self.coordinates = tuple(it.product(ra... | [
"chengshaozhe@gmail.com"
] | chengshaozhe@gmail.com |
ebc1183cbaf4a2933e809513c7b5f6acf4717951 | f9efe2ce2325ad3d5d3c5762f3c85e51a2612ea8 | /expert_finding/data/io_aminer.py | 26118e99e5876e001ee1f12a857a1ff36bc01e49 | [] | no_license | elvesmrodrigues/Kcore_Expert_Finding | 3e3347fa77b51d81999fcac12ac9a7324568763e | c03174640f62771492805fb6cbb08f3d2ba6f88f | refs/heads/main | 2023-06-25T03:42:15.155785 | 2021-07-26T12:57:22 | 2021-07-26T12:57:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,136 | py | import itertools
import os
import pkg_resources
import json
def load_papers(infname):
papers = list()
with open(infname, 'r', encoding='UTF-8') as f:
for key, group in itertools.groupby(f, key=lambda l: l.strip(' \n\r') == ''):
if not key:
refs = []
authors =... | [
"653574281@qq.com"
] | 653574281@qq.com |
51d9224e7d85e7e8c277046b5010c9ddf16e3dd0 | 57068b73b78602a4a8ea1c2c677b2c9867d7f208 | /examples-code/zmq/Request-Reply-Broker/rrworker.py | 0ef890c37bb4e131882a7fa89f9bf8c7118ec597 | [] | no_license | firewood1996/MELINDA | 2f158d1942224b1cb7ef72d46a5f510229f54e87 | a090cea086e6b2502ea4f910008f9daf50e464d6 | refs/heads/master | 2023-02-22T11:40:44.350351 | 2021-01-21T22:35:22 | 2021-01-21T22:35:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 964 | py | #
# Request-reply service in Python
# Connects REP socket to tcp://localhost:5560
#
import zmq
import threading
import time
import random
def worker_routine(url, id, context=None):
"""Worker routine"""
context = context or zmq.Context.instance()
# Socket to talk to dispatcher
socket = context.sock... | [
"aluiziorocha@gmail.com"
] | aluiziorocha@gmail.com |
865653721e38190f7bb6c4e6c6f1a383d99f2912 | af24f5e44068ddc91e05ecdbafac2d01755fd2e9 | /blog/migrations/0020_auto_20200628_1343.py | 2777a5cec6aa72149d91a967dc170165469e8635 | [] | no_license | IsraJC/my-first-blog | a34b666fe09ae091c54c00e6121a6bd528fd22e1 | 84bc92a6cde1aec527600040cd382cd1853c1574 | refs/heads/master | 2023-08-12T18:42:21.745988 | 2021-10-04T19:50:09 | 2021-10-04T19:50:09 | 269,368,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | # Generated by Django 2.2.13 on 2020-06-28 12:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0019_auto_20200628_1343'),
]
operations = [
migrations.AlterField(
model_name='cv',
name='number',
... | [
"israchanna@gmail.com"
] | israchanna@gmail.com |
2c1de13fdef7761a42417213fdc33376772cf25d | f06e3ade8249ccbee25ebad78dea2948c2286cdb | /marketplace/products/migrations/0002_auto_20190120_2126.py | 2cf39d0da9236d189f3da9d07b2e8cdda8523a9f | [] | no_license | billangli/shopify-backend-challenge-2019 | e5c22816f4c460ae13113fc1d0d4a8a50093c157 | e33a7c3870adee61edcf9880128a96d934529e7b | refs/heads/master | 2020-04-17T12:08:15.272777 | 2019-01-22T03:01:37 | 2019-01-22T03:01:37 | 166,569,083 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 681 | py | # Generated by Django 2.1.5 on 2019-01-20 21:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Product',
fields=[
('id',... | [
"bill.ang.li@hotmail.com"
] | bill.ang.li@hotmail.com |
e3d532d22641804ec9d82074ad11b3215ec161a3 | 4deaf8f4f1a91fc12c3a3d10bc8794fa62f54657 | /switch.py | f6bd0e72d22502c54be4568db69b160e68abb5b5 | [] | no_license | AdopaX/Manimouse | 03554d81ef5a1a8576ec7041d361541dff0c5096 | 3b02fca16b93be98af093274e6249465b9ee2295 | refs/heads/master | 2021-06-14T21:35:03.308346 | 2017-01-29T17:27:14 | 2017-01-29T17:27:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,308 | py | # All packages needed for the program are imported ahead
import cv2
import numpy as np
import pyautogui
import time
# Some global variables or others that need prior intialization are initalized here
# colour ranges for feeding to the inRange funtions
blue_range = np.array([[88,78,20],[128,255,255]])
yellow_range = ... | [
"noreply@github.com"
] | noreply@github.com |
3e74debc23e55b4b8d6a39cd6b30e66149ba4444 | 986ce59a572a9e3d9f606c4fcbec256776cce47a | /src/utils/cognitoUtils.py | dee82673ac05f95a362c2f596929cfee88be472d | [] | no_license | fbambusi/ido-measures-api | ce92f8f6e058e455a17d9cc55ac7f958440a2bdb | 73ba90a2800a7c086a694f170e24a35e4e41f938 | refs/heads/master | 2023-02-06T11:33:24.319122 | 2020-12-24T14:28:42 | 2020-12-24T14:28:42 | 324,167,416 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,034 | py | import os
import json
import boto3
from botocore.config import Config
def get_client():
my_config = Config(
region_name='eu-central-1',
)
uip = ("a/a/"+os.environ.get("COGNITO_POOL", 'eu-central-1_sPMQnKBGz')).split("/")[-1]
client = boto3.client('cognito-idp', config=my_config)
return cl... | [
"fbambusi@github.com"
] | fbambusi@github.com |
175006eb5905eb05d3eff2e0c2859795a73c2c91 | 7e2d10ed5b62aa908f1facec1400c6b59314878e | /.venv/lib/python3.7/site-packages/mypy/checkexpr.py | 45e302f6595b20685e9aa4c77e360424d06d5cde | [] | no_license | iphysresearch/watchlist | dfe0370ae80d1ab0d4333af445bec9eb80a2ddde | 214a18d406e3b173cffa6eb2f5250d4553eda9f7 | refs/heads/master | 2020-04-11T20:19:16.424183 | 2019-01-14T17:36:09 | 2019-01-14T17:36:09 | 162,066,460 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175,805 | py | """Expression type checker. This file is conceptually part of TypeChecker."""
from collections import OrderedDict
from contextlib import contextmanager
from typing import (
cast, Dict, Set, List, Tuple, Callable, Union, Optional, Iterable,
Sequence, Iterator
)
MYPY = False
if MYPY:
from typing import Class... | [
"hewang@mail.bnu.edu.cn"
] | hewang@mail.bnu.edu.cn |
92c6ec1b0ac953e0a1245895ca861e3111037464 | cfa1ef35dccc82950f4dde53a0e576fa56be05c5 | /scripts/pysolc.py | 070c3db1f95a65cf4da0d4fc9e636c4b88d99a9e | [
"Apache-2.0"
] | permissive | YakShavingCatHerder/securify | 08bb0b12b30a8b46f5a6bc388d343169c955330e | 51ba1240e60332b4a1e6ad02090da6fe57676354 | refs/heads/master | 2022-04-03T06:05:00.418130 | 2020-01-23T17:02:22 | 2020-01-23T17:02:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,052 | py | """
Author: Tobias Kaiser
Copyright 2018 ChainSecurity AG
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agree... | [
"noreply@github.com"
] | noreply@github.com |
440ce5170b6b74c30529ffd3efbb1496ea483d6e | 527344b91c7d06214888aa69605a05a3762caf47 | /pipeline.py | a58865fb11a81ce6ffdcd44f8624f9adc804114d | [] | no_license | ljing2007/gbm-pipeline | bdecf57643eefb74bb6ec36ef58b388ef54450f5 | 9a8b390012b07300f8635a10ea806b070f1c3d40 | refs/heads/master | 2022-04-30T12:30:14.039639 | 2020-04-05T12:17:04 | 2020-04-05T12:17:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,400 | py | import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from catboost import CatBoostClassifier, Pool, cv
from catboost.datasets import titanic
def build_titanic_dataset():
df_train, df_test = titanic()
df_train.fillna(-999, inplac... | [
"goldandrabbit@foxmail.com"
] | goldandrabbit@foxmail.com |
6e38310be82e01e137cece99982ef936860d1f0b | 9ee644fdb3b0a5ae7887ecb1f4a9013b3abbcb8b | /Python/Django/dojo_ninjas/dojo_ninjas/settings.py | f3e07d741cff65ec58b50ed4eae76aa6c0bf3c86 | [] | no_license | avvarga/Lab206 | 0aa0bf7f1e0340466c5e120e7c1a8726f9385567 | c55fae4044625355ec392f3de58442b2767f7916 | refs/heads/master | 2021-04-15T15:42:11.700351 | 2018-04-13T23:07:25 | 2018-04-13T23:07:25 | 126,499,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,182 | py | """
Django settings for dojo_ninjas project.
Generated by 'django-admin startproject' using Django 1.10.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import ... | [
"avvarga@amazon.com"
] | avvarga@amazon.com |
5ffd36d869008d618bce87a0a1a4aa4f68b48187 | d7c906197941a8c0f74674843da8b00fd3fdb06b | /api/application.py | 4531500e225944ee507ecccc252e1ed518ddfbd8 | [] | no_license | assarar/middleware | c5aebc49bf2f0060c89ab23edb7af2bd4571f9a8 | 281e18524fa2b0db57a2d7473e07dd37b8e85c9b | refs/heads/master | 2023-02-16T04:28:01.508871 | 2019-02-08T07:09:44 | 2019-02-08T07:09:44 | 156,621,137 | 0 | 0 | null | 2023-02-02T04:29:48 | 2018-11-07T23:17:33 | Python | UTF-8 | Python | false | false | 910 | py | from flask import Flask
from db import MysqlDatabase
app = Flask(__name__)
connector = MysqlDatabase(host='localhost', user='root',
password='', database='sih')
@app.route('/')
def main():
return "Microservice (patient) en marche !"
@app.route('/patients', methods=['GET'])
def getPati... | [
"ouafae.assrar@gmail.com"
] | ouafae.assrar@gmail.com |
9ef454972e6ab905dfec2327debb7474b0fc91fc | eeebae33ee2da583b464bb675cb6c81119524635 | /fsdet/modeling/postprocessing.py | 8acf145378d611b6b3d701c952733f6f7e27efed | [
"Apache-2.0"
] | permissive | rakshitsakhuja/fsodet-run | 1fe37c752ddc41b3b08cc6e706876edd0606372f | f663f701fb44915eb6de6e3bf8a9b5860db1f4c0 | refs/heads/master | 2023-04-10T23:08:58.718076 | 2021-04-25T09:33:58 | 2021-04-25T09:33:58 | 341,829,584 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,454 | py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from torch.nn import functional as F
from fsdet.structures import Instances
def detector_postprocess(results, output_height, output_width):
"""
Resize the output instances.
The input images are often resized when entering an object de... | [
"masterkidster@gmail.com"
] | masterkidster@gmail.com |
778001ad149d4c82f36a8f1efe334bf413d659b5 | a739b289cbda3acc9ef69a379cb0d7068c18cf66 | /Transformer_with_vision/model/transformer.py | 9b58365a4b29c5209bc5e7bc12ed2050994278ea | [] | no_license | fhzh123/transformer_research | ac96d837cf287ab9b42dc044344cb70d9bb63724 | a39ca029e3557b8c6eb90eb8ca5eb5964c49b965 | refs/heads/main | 2023-04-18T16:01:57.878040 | 2021-05-09T14:42:05 | 2021-05-09T14:42:05 | 352,910,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,405 | py | import torch
from torch import nn
from torch import Tensor
from torch.nn import functional as F
from einops import rearrange, reduce, repeat
from einops.layers.torch import Rearrange, Reduce
class MultiHeadAttention(nn.Module):
def __init__(self, emb_size: int = 512, num_heads: int = 8, dropout: float = 0):
... | [
"fhzh@naver.com"
] | fhzh@naver.com |
b720b9c5a348255e3b970540d2f67bbf1a434b9c | 0061ce5fa45763d99ca230c5a8989ab775ff62b0 | /src/machine_learning_main.py | 0ceaada39f19980993eadc0ae49dec9cbd8db8b0 | [] | no_license | marianolongo/va-tp-deteccion | f1f9590d2a35586cbea18dc5b0d7587c15969b8c | 840547e6ee223db9c49afa0e7ac026795d734e13 | refs/heads/master | 2022-12-21T13:33:25.407990 | 2020-09-25T04:38:28 | 2020-09-25T04:38:28 | 298,467,462 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 263 | py | from src.machine.utils.hu_moments_generation import generate_hu_moments_file
from src.machine.utils.testing_model import load_and_test
from src.machine.utils.training_model import train_model
generate_hu_moments_file()
model = train_model()
load_and_test(model)
| [
"mariano.longo@ing.austral.edu.ar"
] | mariano.longo@ing.austral.edu.ar |
27fe093654f6b8ee9c997e2087efe318a09c1895 | affaef08f7746dbe673dd6c2ebabb31b7c41d299 | /python/cs381_GameDevPipeline/StumpysGrove/gfxMgr.py | d632a6da182cb2552b413f29281cdee98270c9d3 | [] | no_license | jflorespadilla/SchoolProjects | 066abe331ca75be8fff75abf7ca5a0a7811d369f | da1f7e1e7ad90902000c4d6920e8cb61a8d2bb19 | refs/heads/master | 2020-09-20T03:01:57.900266 | 2016-09-08T18:16:53 | 2016-09-08T18:16:53 | 67,721,967 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,882 | py | # Graphics manager
import ogre.renderer.OGRE as ogre
import math
import utils
# Manages graphics. Creates graphics, scene, scene nodes, renders scene
class GfxMgr:
def __init__(self, engine):
self.engine = engine
pass
def init(self):
self.createRoot()
self.defineResources()
... | [
"jesus.florespadilla@yahoo.com"
] | jesus.florespadilla@yahoo.com |
6aa5681f125b8a73167c2dfdba8b7fdb9c678e06 | 2901489f227a97e25c0c65240628af40bc1c167d | /django_razorpay/src/migrations/0004_auto_20210803_0954.py | c11b15126b7c7287e82765af0b514b37634dbfcf | [] | no_license | P-1702/Payment-Gateway | 5452c0ea4acd8fd4a0fcdf5a0ce557ca06eaa099 | f9c1fa326a7851d231cdf8de3b73357abfd20b8e | refs/heads/master | 2023-07-01T19:08:47.048874 | 2021-08-04T12:38:57 | 2021-08-04T12:38:57 | 392,681,334 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | # Generated by Django 3.1.7 on 2021-08-03 04:24
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('src', '0003_auto_20210803_0949'),
]
operations = [
migrations.RenameModel(
old_name='Payments',
new_name='Payment',
... | [
"muprat172@gmail.com"
] | muprat172@gmail.com |
c93b3085e92eda3e230de1b7f13d0c1ee4cdba54 | e187a8b23f47d7124b53682452658d9bfc2066d0 | /CloudTest/CloudTest/node_ta/agent_quick_flaw_scan.py | b5b17408fff8833bfb8bd104320d745d1319442a | [] | no_license | PhelanWang/CloudProject | 6f4f1e16f6f6c71b8071f8361ae2ecf5bdf82c2d | d103dbe2e0a81c6f957331f51a1c13b133aae94f | refs/heads/master | 2022-07-06T21:22:35.299093 | 2019-04-18T13:25:59 | 2019-04-18T13:25:59 | 166,331,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,677 | py | # -*- coding: utf-8 -*-
__author__ = 'root'
def is_load_external():
return globals().has_key('AGENT_LOADER')
# Execute this while run this agent file directly
if not is_load_external():
# Import ctest package
from lib.agent.ctest import SwitchAgent
# Create SwitchAgent instance
agent = SwitchAge... | [
"1825633959@qq.com"
] | 1825633959@qq.com |
4db7df871d0e756cc3c77119d78e5b1511d56535 | bea2621cfdd7e7bb9390339bb87e5692806a645f | /verticalShift.py | 7ae1dd1b30c68ede9ee320b49068a5eefdfca7f5 | [] | no_license | Artmann/data_augmentation | 1afd0b2a93a268770ef31de3b98efff7d7bf5a65 | f4c908613a2988f04ef1a45a7d21baa6e47305b7 | refs/heads/main | 2023-02-22T23:37:37.709027 | 2021-01-24T07:50:39 | 2021-01-24T07:50:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,366 | py | # python program to demonstrate the vertical shift of the image with the height_shift_range argument
# we import all our required libraries
from numpy import expand_dims
from keras.preprocessing.image import load_img
from keras.preprocessing.image import img_to_array
from keras.preprocessing.image import ImageDataGene... | [
"noreply@github.com"
] | noreply@github.com |
c9ccb921814b23fe474ca6b3e2c1613e8783603f | c2d1b262e0ffc2f61cb3fb36b2d0ae63f5e6d151 | /src/hw/pwm/pwm_provider_pca9685.py | d91bf5a9176b983448f418528d29de0bccecf305 | [
"BSD-3-Clause"
] | permissive | geoff-coppertop/train-turnout-control-python | d78bdb3ef7fc4d903197959ff7b1d846ed5e8ef5 | dec330e0e9931ee43b59c97d300b82c37d35253b | refs/heads/master | 2022-07-30T12:19:59.351399 | 2018-03-27T02:18:46 | 2018-03-27T02:25:40 | 121,705,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,564 | py | #!/usr/bin/env python
# # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# pwm_provider_pca9685.py
#
# G. Thomas
# 2018
#-------------------------------------------------------------------------------
import logging
from src.hw.pwm.pwm_provider import PWMProvid... | [
"geoffrey.thomas@garmin.com"
] | geoffrey.thomas@garmin.com |
5a9dff2f0a91e131b60e46a368beace41b98b3dd | f0c9df58c012c7fcd64346cc5a3ac0275656156f | /BM3D_py/cpp2py_test/close_power_of_2_test.py | c16be25364ba84dcdf092a1eaef023b746667cfd | [
"MIT"
] | permissive | oleges1/denoising_project | 48c32e419bd9172354b6bf30eae7fe47db37817d | c2b5048db3dd2bf3261d0cd2e8fec0588d765387 | refs/heads/master | 2023-01-02T08:23:54.705304 | 2020-10-22T14:35:19 | 2020-10-22T14:35:19 | 306,343,881 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 508 | py | import numpy as np
def my_closest_power_of_2(M, max):
M = np.where(max < M, max, M)
while max > 1:
M = np.where((max // 2 < M) * (M < max), max // 2, M)
max //= 2
return M
def closest_power_of_2(n):
r = 1
while r * 2 <= n:
r *= 2
return r
if __name__ == '__main__':
... | [
"ya.hef@yandex.ru"
] | ya.hef@yandex.ru |
d017df644bde5225b2ea4930d586dc593bd9fa99 | d24f39c95eb2fc89851d90464eb0cdf3b2c6c60f | /Ondas Planas/movimento_sem_ateunacao.py | bccad25aaecfea2adbf04f2fe0a877cc2cb7416d | [] | no_license | marcos-moura97/eletromagnetism_python | d74c62a85df0e2b81e18555583ce4146fd106e0f | f44f7afc5fad8ffc58dd8be5ec7e074a37b69e41 | refs/heads/master | 2023-08-28T08:10:02.568516 | 2021-11-04T10:48:05 | 2021-11-04T10:48:05 | 299,422,313 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,681 | py | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import math
pi = math.pi #Famoso pi
Emaxmais = 10 #Amplitude do campo incidente
FimaisGraus = 0 #Fase Finais (graus) da amplitude do campo incidente
Emaxmenos = 10 #Amplitude do campo refletido
FimenosGraus =... | [
"noreply@github.com"
] | noreply@github.com |
5415aabb59728ebc4a5c6162aa5db91bddd6490d | a9e3f3ad54ade49c19973707d2beb49f64490efd | /Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/cms/envs/devstack_docker.py | 2eece814deae2c31cf5456b34af9e0f386c38c4e | [
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"MIT"
] | permissive | luque/better-ways-of-thinking-about-software | 8c3dda94e119f0f96edbfe5ba60ca6ec3f5f625d | 5809eaca7079a15ee56b0b7fcfea425337046c97 | refs/heads/master | 2021-11-24T15:10:09.785252 | 2021-11-22T12:14:34 | 2021-11-22T12:14:34 | 163,850,454 | 3 | 1 | MIT | 2021-11-22T12:12:31 | 2019-01-02T14:21:30 | JavaScript | UTF-8 | Python | false | false | 129 | py | """ Overrides for Docker-based devstack. """
from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import
| [
"rafael.luque@osoco.es"
] | rafael.luque@osoco.es |
a51b08bd33feac6916911115650f7cd6e8d8124f | 194d3a2a704497ab4462cf29528df030cc8ddc54 | /binarysearch.py | 04cbc935c02205db3c05a96f4aa1ca346e00c2d6 | [] | no_license | nitinps/PESU-IO-SUMMER | f3525d76f55cddb92111641fd1ca3dcad338fb1e | e197c6f95ebd3f3c68bde0715656c713903f7cdc | refs/heads/master | 2020-05-31T15:17:13.064978 | 2019-07-07T17:34:49 | 2019-07-07T17:34:49 | 190,353,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 473 | py | numbers=[]
pos=-1
found=0
low=0
high=int(input("Enter length of list: "))
print("Enter numbers: ")
for i in range(0,high):
k=int(input())
numbers.append(k)
x=int(input("Enter number you want to search: "))
while low<=high and found==0:
mid=int((low+high)/2)
if(numbers[mid]==x):
pos=mid
found... | [
"51399837+nitinps@users.noreply.github.com"
] | 51399837+nitinps@users.noreply.github.com |
1a8fdc4014ea36359c165795b904676bd01011cd | 2636b249a82b8bdeb02166aea94f3941dece962c | /manage.py | 768c4e6fb3926f7578c87b80e90dcac45f7d286b | [] | no_license | van0509/muxueonline | 87a2f542f5b9bf15d43cf49710bb92e9f0e65266 | 1dd02a0ecff114575b27463ad1aa5b555089430c | refs/heads/master | 2020-03-27T07:52:39.566043 | 2018-09-06T12:55:59 | 2018-09-06T12:56:00 | 146,198,946 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 543 | py | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'muxueonline.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. ... | [
"free001@vip.qq.com"
] | free001@vip.qq.com |
10e8fdc24e2631260da50fd20f4deaaab12510ab | c1e0874f55d05ee990ed2d637c2910701b32d246 | /soft_uni_fundamentals/Data Types and Variables/exercises/03_elevator.py | 6b18bc3621dfad99d97435503cea446731f70608 | [] | no_license | borislavstoychev/Soft_Uni | 5d047bef402c50215e0abc825476326889ffd0be | ccc0b2fb18f8ad6809b475eb20e82a9e4eb4b0b0 | refs/heads/master | 2023-05-11T12:27:08.672058 | 2021-05-28T18:00:10 | 2021-05-28T18:00:10 | 277,556,731 | 3 | 2 | null | 2021-02-11T19:57:37 | 2020-07-06T13:58:23 | Python | UTF-8 | Python | false | false | 119 | py | n = int(input())
p = int(input())
if n % p == 0:
courses = n//p
else:
courses = n // p + 1
print(courses) | [
"noreply@github.com"
] | noreply@github.com |
7e8163e5286903c46159443b731345784fe85218 | de69dd4c86f7c7b0a5a1fa0c27fb45c8241b36ea | /reserveTime/asgi.py | ea213ba502d8da84f87ec7ab762a76eb8928f976 | [] | no_license | Sim30n/DIY-online-booking | bec065abc546b9915c3bbab9af3f7e6d7a797be9 | 68ab52506d0294260f7746762908265738854007 | refs/heads/main | 2023-03-10T03:05:59.492591 | 2021-02-21T14:35:57 | 2021-02-21T14:35:57 | 336,381,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | """
ASGI config for reserveTime project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_S... | [
"petteri.sarkka@fmail.com"
] | petteri.sarkka@fmail.com |
a6d0047071d0b232286f98b5287c49a605e6a21e | 320a98d428bf06eff6f3f209b1eadeb366a65482 | /common/version.py | c4dd9de7ffd4c1b577a51386ff7b1cc74c444cd3 | [] | no_license | Ryan--Yang/share | 6fe8b21918206fed903bd7a315216b47e58f697e | 4acc658f7c0a8f1b50f7b5c0b8884b96fe1e137d | refs/heads/master | 2020-12-31T02:42:22.125477 | 2013-12-04T07:27:53 | 2013-12-24T01:54:38 | 14,791,494 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,644 | py | from util import *
default_java_file = '/usr/lib/jvm/default-java'
gcc_file = '/usr/bin/gcc'
def handle_option():
global args
parser = argparse.ArgumentParser(description = 'Set up the version of Java',
formatter_class = argparse.RawTextHelpFormatter,
... | [
"yang.gu@intel.com"
] | yang.gu@intel.com |
e8ad07e31379beae3dffbece9f29e72942cd9ab7 | 9f2a944624d3499555e31b384fc0611a4a834b41 | /cookies-ver.py | 906cb912efe7683f08d77f771b218d77cd7ee3c3 | [] | no_license | silver926z/cprog_parser | 8c3079c85fd92864745baf169d064b50ddf685c4 | b6f4616a26483275fb3860ca2be7a35fd854a850 | refs/heads/master | 2021-01-25T09:37:27.526275 | 2017-06-09T12:53:37 | 2017-06-09T12:53:37 | 93,858,514 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,518 | py |
import requests
from bs4 import BeautifulSoup
import lxml
url = "http://www.niotv.com/i_index.php?cont=day"
headers = {
"Host": "www.niotv.com",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:43.0) Gecko/20100101 Firefox/43.0",
"Accept": "image/png,image/*;q=0.8,*/*;q=0.5",
"Accept-Language": "zh-TW... | [
"silver926z@gmail.com"
] | silver926z@gmail.com |
b53ae71c9ed4ce817b4e285d4827aaf89a7c7035 | 448c17f5a937f6f3d45a3b8da747348ec0b06e76 | /tests/test_pinpoint.py | 681518f7d8c06ea39ef8f2901d4525542ccda18b | [
"MIT"
] | permissive | surajitdb/pyscissor | a85f5d6c44c2e3b28d48ec61ed89b2dd98fc7c02 | 247e819d2d87c982df20ee42bce2b881e89d5f25 | refs/heads/master | 2023-01-12T02:25:53.564677 | 2020-11-18T12:15:50 | 2020-11-18T12:15:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | import unittest
import numpy as np
from pyscissor import pinpoint
import pytest
class test_scissor(unittest.TestCase):
# generel + lat not reversed
def test_generel_lnr(self):
lats = np.array([24,23])
lons = np.array([88,89])
vals = np.array([[1,2],[3,4]])
t = pinpoin... | [
"nzahasan@gmail.com"
] | nzahasan@gmail.com |
4de8e6f3f997c044235468a34eb39dc9ca07df91 | df458ae26f8e1b59e4fc4273701f77cc2e340a3c | /tests/test_viewgroups.py | a7c869008bd24a94bbc80a387a23758393244f2e | [
"BSD-3-Clause"
] | permissive | radiac/django-fastview | 64bcf3f07ed62a1863b5a402d1fedc998ed433f3 | daf898f416c3f89efc3ef290f8158232d055af36 | refs/heads/develop | 2023-03-20T22:49:14.789026 | 2022-10-02T19:43:22 | 2022-10-02T19:43:22 | 230,815,383 | 13 | 1 | NOASSERTION | 2023-03-04T05:44:10 | 2019-12-29T23:26:56 | Python | UTF-8 | Python | false | false | 1,637 | py | """
Test viewgroup
"""
from fastview import permissions
from fastview.viewgroups import ModelViewGroup
from .app.models import Entry
def test_modelviewgroup_permissions__permissions_set_on_subclass():
class TestPermission(permissions.Permission):
pass
test_permission = TestPermission()
class En... | [
"git@radiac.net"
] | git@radiac.net |
6d7552c80362211c8655afa1523750f82b5f34b9 | cbdbb05b91a4463639deefd44169d564773cd1fb | /djangoproj/forms_lab/lab/models.py | a49bb957d8bc48b023dce230a3be6f848e11e28a | [] | no_license | blazprog/py3 | e26ef36a485809334b1d5a1688777b12730ebf39 | e15659e5d5a8ced617283f096e82135dc32a8df1 | refs/heads/master | 2020-03-19T20:55:22.304074 | 2018-06-11T12:25:18 | 2018-06-11T12:25:18 | 136,922,662 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 354 | py | from django.db import models
class Nakup(models.Model):
datum_nakupa = models.DateField()
trgovina = models.CharField(max_length=30)
class NakupIzdelki(models.Model):
nakup = models.ForeignKey(Nakup)
izdelek = models.CharField(max_length=30)
kolicina = models.IntegerField(default=1)
cena = mo... | [
"blaz.korosec@mentis.si"
] | blaz.korosec@mentis.si |
85459e0cbd82140fa14886b0e5285bd8b8a76a28 | b1303152c3977a22ff9a0192c0c32310e65a6d77 | /python/567.permutation-in-string.py | c5487e09f925108dce4b4931b43c66fadd915fda | [
"Apache-2.0"
] | permissive | stavanmehta/leetcode | 1b8da1c2bfacaa76ddfb96b8dbce03bf08c54c27 | 1224e43ce29430c840e65daae3b343182e24709c | refs/heads/master | 2021-07-15T16:02:16.107962 | 2021-06-24T05:39:14 | 2021-06-24T05:39:14 | 201,658,706 | 0 | 0 | Apache-2.0 | 2021-06-24T05:39:15 | 2019-08-10T16:59:32 | Java | UTF-8 | Python | false | false | 81 | py | class Solution:
def checkInclusion(self, s1: str, s2: str) -> bool:
| [
"noreply@github.com"
] | noreply@github.com |
a6c3b2d3c30d77febcd634cf65a7f06d7baf74a8 | bd408f54b0bcd9c37c2fe38195a1caa3480c1d68 | /library/rekognition.py | 96c999a38a26a64154d6dafd33615b95b7d5ac07 | [] | no_license | clara081094/refactoredRekognition | 601c33396dbeb9cf2d799537e85beb6d7bc712c8 | 4f61d2727a22c6de021a6d28077fa5cc3aabb02e | refs/heads/master | 2023-09-04T03:15:08.615401 | 2019-02-01T19:11:35 | 2019-02-01T19:11:35 | 168,747,363 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,260 | py | import boto3
import json
#from botocore.exceptions import ClientError
class Rekognition(object):
def __init__(self):
self.client = boto3.client(
'rekognition',
region_name="us-east-1",
aws_access_key_id="AKIAIMM524QL43QPT43A",
aws_secret_access_key="Un70EtWSf6CzK... | [
"clara.081094@gmail.com"
] | clara.081094@gmail.com |
6653c822271f595c1ee6011406a88613852cd291 | 3325f16c04ca8e641cbd58e396f983542b793091 | /Seção 13 - Leitura e Escrita em Arquivos/Exercícios da Seção/Exercício_04.py | 3140f4c4229bb75d6849a37c399fbae14f608b1f | [] | no_license | romulovieira777/Programacao_em_Python_Essencial | ac929fbbd6a002bcc689b8d6e54d46177632c169 | e81d219db773d562841203ea370bf4f098c4bd21 | refs/heads/master | 2023-06-11T16:06:36.971113 | 2021-07-06T20:57:25 | 2021-07-06T20:57:25 | 269,442,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,434 | py | """
4) Faça um programa que receba do usuário um arquivo texto e mostre na tela
quantas letras são vogais e quantas são consoantes
"""
from Exercício_03 import conta_vogais
def conta_consoantes(txt):
"""Retorna a quantidade de consoantes que existe no texto recebido por parâmetro.
Caso o que for recebido por... | [
"romulo.vieira777@gmail.com"
] | romulo.vieira777@gmail.com |
eed858b8e82142df84227a811836ca3ac041cc93 | f74602a8f37fc9357ba7d638ada8f0df8e2d85c1 | /CFG.py | da09e3c8ab87ee2df8b5323b4fb99de443f08c81 | [] | no_license | VictorTonyXie/PDA2Chomsky | 128d34f580bbdf38aec4688e5f9f284330184d98 | 5014f463f8780fb54f25f3d6cd2d0c7bf3cc5a4f | refs/heads/main | 2023-02-10T16:24:56.513324 | 2021-01-03T11:23:39 | 2021-01-03T11:23:39 | 326,349,947 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,211 | py | class CFG:
variables: list[str] = []
terminals: list[str] = []
start_variable: str
production_rules: dict[str, list[list[str]]] = {}
def __init__(self, variables: list[str], terminals: list[str], start_variable):
self.variables = variables.copy()
self.terminals = terminals.copy()
... | [
"taoxie2006@126.com"
] | taoxie2006@126.com |
390b2f724eeeaf6d0e23372bb737c97147f3ea23 | 415e11fbf113512c3b2081a55796bcddc652b34e | /main_app/urls.py | c1775d5a977858c3a241602eb866ef810f1db2f1 | [] | no_license | cooperama/candy-collector-v2.0 | e51cdbcd67071e0423c22038843f96939fb04cc8 | 26cb58d875313693a5ec477a5bbe4efb204d9017 | refs/heads/master | 2023-02-03T13:46:39.190537 | 2020-10-31T21:33:13 | 2020-10-31T21:33:13 | 322,905,474 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 689 | py | from django.urls import path
from . import views
urlpatterns = [
# Static
path('', views.home, name='home'),
path('about/', views.about, name='about'),
# Candy
path('candy/', views.candy_index, name='candy_index'),
path('candy/<int:candy_id>/', views.candy_detail, name='candy_detail'),
pat... | [
"coope133@gmail.com"
] | coope133@gmail.com |
ff91889dcdaa347c138e4b81f3c25c581ec6ac76 | f3c380495cda1fe7d791c421216bc3d373b44b5a | /lambda.py | ef1b5c3f683d7538fc93d2b877bc9f34727b55ee | [] | no_license | siwangqishiq/PythonLearn | 01c63703b1dafbf4eec27a7b6e6846413045efb3 | 275b1becb1be9cca566956e6f58088e983e68208 | refs/heads/master | 2021-08-23T10:19:52.189996 | 2017-11-12T06:33:20 | 2017-11-12T06:33:20 | 105,995,836 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 262 | py |
def main():
data = [{"name":"毛利兰","age":17},{"name":"工藤新","age":18},{"name":"鲁鲁修","age":16},{"name":"夜神月","age":20}]
for d in data:
print(d)
print("="*50)
data.sort(key = lambda x:x["age"])
for d in data:
print(d)
main()
| [
"525647740@qq.com"
] | 525647740@qq.com |
34a8a5d6bf82521b2d655e068ef808d27f366861 | 13fa7bc8ac70b217382459a136b0125813328410 | /Util/SocketServer.py | bb3a83b9d06070420d323a74df2e648676fb1875 | [] | no_license | Leia1002/Rizhao-master0803 | ca8ba452aa52d99301aec0a120690729d49ce90d | b5d2427eb96068fdcaa57402ad3b11f36aca3736 | refs/heads/master | 2020-03-25T04:44:10.661627 | 2018-08-28T12:45:33 | 2018-08-28T12:45:33 | 143,410,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,611 | py | # -*- coding: utf-8 -*-
import threading
import time
from Util.Dispatch import Dispatch
'''
此处以后再加入java互动
开始线程,本类其实是一个定时器作用
'''
class SocketServer(object):
def everyMonth(self):
while True:
lock = True
# todo:bug 此处循环无数次,如何设置为一次
if time.strftime("%d") == '1' and lock... | [
"mafei@Hisense.ad"
] | mafei@Hisense.ad |
4ef4c33489c9c34b2e73cd65241fe22cde9f4cb9 | 6a5732f38be806ffa0a8f44a687e74035fab24b8 | /factory-ai-vision/EdgeSolution/modules/PredictModule/utility.py | d810717a8e61be9ed01af770a35147dd2f4db344 | [
"MIT"
] | permissive | dlepow/azure-intelligent-edge-patterns | ccf92a29c95a419cae29142fb620a2bc14745f44 | 60ca7203115bdf26932e7bc037c37b2a7dac5756 | refs/heads/master | 2023-03-09T17:22:03.827655 | 2021-02-05T14:19:00 | 2021-02-05T14:19:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,243 | py | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for
# full license information.
import glob
import json
import logging
import os
import shutil
import socket
import subprocess
import subprocess as sp
import sys
import time
import urllib.request as u... | [
"ronpai0919@gmail.com"
] | ronpai0919@gmail.com |
5175327d4e1008c88bb99408d5bb2c97b9319872 | 9a116b59c4f05e18a4899dd4aa544e9f73e4a680 | /main.py | 4c353f3f34d07ead92107133e104399fa1c1cef4 | [
"MIT"
] | permissive | grostein/security_cam_storage_App_Engine | 3734e11996a682ad07b0993dc479cd97ee665b8f | b4cceeeff1468068cb03b68efa6300d620c026a6 | refs/heads/master | 2021-01-10T10:58:37.406210 | 2015-12-30T10:57:28 | 2015-12-30T10:57:28 | 48,793,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,963 | py | import webapp2
from google.appengine.api import users
from google.appengine.ext import ndb
from modelli import *
from datetime import datetime, timedelta
from email import email
import logging
def sicurezza(self):
user = users.get_current_user()
if user:
if user.email() == email:
pass
else:
self.redirec... | [
"massimiliano@iviaggidellemeraviglie.com"
] | massimiliano@iviaggidellemeraviglie.com |
744efb60853dbb0d6435abca149d3b53b7da4457 | 641ff329536c95de473e9dfdeeb844f0eb6948b6 | /backend/tests/search/query_builder/test_create_query_filter.py | 01dc341f947b762f606816180ad34570ab6be609 | [
"MIT"
] | permissive | dnum-mi/cartographie-donnees | 573a852f685180c7a6657f11a977ecedf7f0541d | 26850923764ab4173b6824dff5c6bb3dbb753915 | refs/heads/main | 2023-08-16T04:26:41.158107 | 2023-01-20T13:01:14 | 2023-01-20T13:01:14 | 416,670,629 | 11 | 7 | MIT | 2023-03-30T14:29:31 | 2021-10-13T09:24:45 | JavaScript | UTF-8 | Python | false | false | 3,778 | py | from typing import List
from pytest_unordered import unordered
from app.models import Organization
from app.search.enums import Strictness
from app.search.query_builder import create_query_filter
def test_query_with_filters_and_text(sample_organizations: List[Organization]):
query = create_query_filter(
... | [
"yann.carfantan@artelys.com"
] | yann.carfantan@artelys.com |
5211a4898c1a211510a8046ed40929d34e12d441 | 867437c13bad3c10c2c2e78eeab0827b6a46c754 | /app/main.py | 3d62cd7d3f6cc56e31c2739ea35420cc57ee08f3 | [] | no_license | BoredTweak/heroku-api-redis-demo | 40e6fe34a2c884297ccc7fc4fb211eb62781e780 | fc024821467a5ba4b59821b8020437845108f3f0 | refs/heads/main | 2023-07-25T02:53:09.298035 | 2021-08-25T16:18:26 | 2021-08-25T16:18:26 | 399,864,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 605 | py | import threading
import redis
import sys
import time
from fastapi import FastAPI
import os
from dotenv import load_dotenv
load_dotenv()
hostAddress = os.environ.get('REDIS_URL')
port = os.environ.get('REDIS_PORT')
app = FastAPI(root_path='/api')
@app.get('/heartbeat')
def get_heartbeat():
r = redis.Redis(host=ho... | [
"alex.elia37@gmail.com"
] | alex.elia37@gmail.com |
a341ca2afe835fa5c459a897d33b89eeafb9f226 | 8e7421d340586a8d1d93304add04daf51506ada5 | /image_beautify/image_histogram_equalization.py | 26e976a007184c7c29e401198ffed20170f226d0 | [] | no_license | wddzz/opencv_and_tensorflow_study | a419d5d951be1ba52cbdbc3aafafb93092e643f1 | f89639af5268df00899601fa0e525afa0b63a713 | refs/heads/master | 2020-03-22T16:01:34.602285 | 2018-08-01T15:57:18 | 2018-08-01T15:57:18 | 140,297,326 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 791 | py | import cv2
import numpy as np
img0 = cv2.imread("H:\\Files\\image_process\\damimi.jpg",1)
# 灰度 直方图均衡化
# gray = cv2.cvtColor(img0,cv2.COLOR_BGR2GRAY)
# dst = cv2.equalizeHist(gray)
# 彩色 直方图均衡化
# (b,g,r) = cv2.split(img0)
# bdst = cv2.equalizeHist(b)
# gdst = cv2.equalizeHist(g)
# rdst = cv2.equalizeHist(r)
# dst = cv2... | [
"406452653@qq.com"
] | 406452653@qq.com |
2eef82d1bf14b03fe93199ebb554bad4dae8ae0a | ec3f9f1b1327ec8a69bd2fc056cdb2dbf7c243d3 | /week_1/Solution_4.py | 7651516d57b86a5b26049840c54e0379842a2db2 | [] | no_license | WhiteFeniks/Python_Cursera | e5d7e04c40eb586a9763f38de55c88cfb77318a4 | 0dbb85f0a225e7152599bbea75e1637d8f4dd04c | refs/heads/master | 2022-11-15T22:39:35.663524 | 2020-07-11T16:55:39 | 2020-07-11T16:55:39 | 278,734,455 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 32 | py | n = int(input())
print (2**n)
| [
"macbookair@White-Fang-Mac.local"
] | macbookair@White-Fang-Mac.local |
fdfd405481a69ee32d75908d3217785d365d90a4 | f6fafb196e9e68e3f849ec4dfa4046632380c822 | /100 days of code/day 17/quiz_brain.py | 450561a3478070d271164a21cc5acb2a8888923b | [] | no_license | Juozapaitis/100daysOfCodeUdemy | 77f0f2c658952e6bed5d776ff135233d96328471 | 4de48a778ea438f5c36f6d9638c3c01a7d7437ff | refs/heads/master | 2023-09-02T04:53:47.604007 | 2021-10-20T08:42:04 | 2021-10-20T09:30:00 | 419,249,733 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 941 | py | class QuizBrain():
def __init__(self, questions_list):
self.question_number = 0
self.score = 0
self.questions_list = questions_list
def next_question(self):
current_question = self.questions_list[self.question_number]
self.question_number += 1
user_answer = inpu... | [
"justasjuozapaitis65@gmail.com"
] | justasjuozapaitis65@gmail.com |
618d26a1de085c3b232b50f8a719c096a1a4c389 | b5ca0a2ce47fdb4306bbdffcb995eb7e6eac1b23 | /Python/Regex and Parsing/Validating phone numbers/attempt2.py | 2b2d832379b0eb3a6171a2ff4bfd378358e9b641 | [] | no_license | rsoemardja/HackerRank | ac257a66c3649534197b223b8ab55011d84fb9e1 | 97d28d648a85a16fbe6a5d6ae72ff6503a063ffc | refs/heads/master | 2022-04-14T22:46:03.412359 | 2020-04-03T07:44:04 | 2020-04-03T07:44:04 | 217,687,370 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | import re
n = int(input())
for _ in range(n):
if re.fullmatch('[789]\d{9}', input()) != None:
print('YES')
else:
print('NO') | [
"rsoemardja@gmail.com"
] | rsoemardja@gmail.com |
7cc0f99a45c4afebcd51d2a614f223eba92ad6fd | e2561aaf3fec80646c0c44fa369d062865bd8f39 | /backend/tests/views.py | eced51ac47ebd25216bd2576375aff6912fed3bf | [] | no_license | prakritimaddheshiya/tests | b4fb2ba91f7d51d6f4c5dd2da0a8a38c3ff8fd29 | 91cffb07fa0ab674b0e49e11b6f8d5c39159357e | refs/heads/main | 2023-04-20T15:59:08.619385 | 2021-05-17T11:26:57 | 2021-05-17T11:26:57 | 368,150,110 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 968 | py | from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Tests
from .serializers import TestsSerializer
class TestsCreateView(APIView):
def post(self, request):
serializer = TestsSerializer(data=request.data)
if se... | [
"ayushgupta0010@gmail.com"
] | ayushgupta0010@gmail.com |
d8d5fb0ee104918f31eeef19697fffe2a9eb2015 | 9e5c864130ba4f9ae257ba0709cda1263f7b402a | /teststr.py | 0a54138cc9d82da409060d28364758c3a99d0adb | [] | no_license | LBJ-Max/basepython | ee7ce77247f92de009b0724d2656d3ddbd085130 | b7c2ee2af628125584372371389598fe81708468 | refs/heads/master | 2020-06-25T11:27:40.459374 | 2019-07-28T14:21:56 | 2019-07-28T14:21:56 | 199,296,609 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 214 | py | hello_str = "hello world"
# 1.统计字符串长度
print(len(hello_str))
# 2.统计字符串出现次数
times = hello_str.count("l")
print(times)
# 3.某个字符串出现的位置
print(hello_str.index("llo")) | [
"fenggaopan@dangdang.com"
] | fenggaopan@dangdang.com |
565f68b1cd1ccd748262cc61ea4bcdfe3a049ade | 42362ce3f8da59b0ba70a844243d1323221c084c | /umari.py | 4229ba2d347f356b60df256af1f114bf5cd8e5a6 | [] | no_license | Umaritfs/fb | 3c741099ca013b28775f0078459ed45454c353da | c69dbbc930106cbfe1d5625b247831a77a14dc9c | refs/heads/master | 2022-04-24T12:14:33.531320 | 2020-04-30T09:08:06 | 2020-04-30T09:08:06 | 260,159,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,013 | py | #!/usr/bin/python2
#coding=utf-8
import os,sys,time,datetime,random,hashlib,re,threading,json,urllib,cookielib,requests,mechanize
from multiprocessing.pool import ThreadPool
from requests.exceptions import ConnectionError
from mechanize import Browser
reload(sys)
sys.setdefaultencoding('utf8')
br = mechanize.Browse... | [
"noreply@github.com"
] | noreply@github.com |
24ec79d14b8a83f2c499760bc56922b02185906e | 43f299b826dc0289108e3852f3c8d92ba47677b4 | /coursera_download_files.py | fb6a14746a13590d6abff3a7b396f612b4d70dc2 | [] | no_license | bertothunder/tools | daaeeeb2243ea0819c8f5b1d9ce622564a15f239 | 207b37edf4a0d9d953f36e248591ea889c8fcd46 | refs/heads/master | 2021-01-01T06:54:24.191178 | 2014-11-27T18:02:23 | 2014-11-27T18:02:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,997 | py |
#! /usr/bin/env python2.7
'Download all the class files to a local directory'
import os, re, dumbdbm, time, gzip, cStringIO, threading, sys, argparse
from collections import namedtuple
from multiprocessing.pool import ThreadPool as Pool
from pprint import pprint
# Web scrapping modules
import mechanize, cookielib
... | [
"acurrope@cisco.com"
] | acurrope@cisco.com |
252f6b30ab9c777e478f9d48787a4711d088af58 | 9729365a58351c9cf42edb932b8272db8ca98b6f | /CRIMSONModuleTemplate/Template/SolverStudies/template.py | 45d2b6ae369ddfa9a4917b294becfc854d13af01 | [] | no_license | rkhlebnikov/CRIMSONPythonModules | fbde5666aceae947a575f661518306694f052559 | b72865579e3b503940986e9217d3541a66ee92d5 | refs/heads/master | 2023-03-04T03:06:37.004018 | 2021-09-21T20:42:30 | 2021-09-21T20:42:30 | 48,180,113 | 3 | 3 | null | 2023-03-01T15:25:27 | 2015-12-17T14:50:33 | Python | UTF-8 | Python | false | false | 1,700 | py | from PythonQt import QtGui
from PythonQt.CRIMSON import FaceType
from PythonQt.CRIMSON import Utils
from CRIMSONCore.SolutionStorage import SolutionStorage
from {{ModuleName}}.BoundaryConditions import ({{#BoundaryConditionNames}}{{name}}, {{/BoundaryConditionNames}})
class {{ClassName}}(object):
def __init__(sel... | [
"r.khlebnikov@gmail.com"
] | r.khlebnikov@gmail.com |
b5bfb5e75a09d0dabb71a971677befdb2e4ce011 | b0c40ad8f68f099a49449efcc037ee6bfdafa5e2 | /python/20190508 challenges/fizzbuzz_game_answer.py | 4dd00810b33d34b2ec089b8d909508c36943b60a | [] | no_license | behappyny/python_study | f8f2dc1ed7070290af82274da5c411e68e19e2a8 | 556c715047d09d60213f9d098ebd29124a9fdc0a | refs/heads/master | 2020-03-08T13:31:34.955775 | 2019-05-14T03:13:25 | 2019-05-14T03:13:25 | 128,160,093 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | a = 30
if a % 15 == 0:
print('FizzBuzz')
elif a % 3 == 0:
print('Fizz')
elif a % 5 == 0:
print('Buzz')
else:
print('a') | [
"noreply@github.com"
] | noreply@github.com |
a3e8f85b15362854f00e8158fedd47775ff9a1fb | 9b5597492e57313712c0a842ef887940f92636cd | /judge/sessions/2018Individual/sgessow@gmail.com/PB_02.py | f67c2bfbbc1ddd96d57cfd996db5fcf43c0930bf | [] | no_license | onionhoney/codesprint | ae02be9e3c2354bb921dc0721ad3819539a580fa | fcece4daf908aec41de7bba94c07b44c2aa98c67 | refs/heads/master | 2020-03-11T11:29:57.052236 | 2019-05-02T22:04:53 | 2019-05-02T22:04:53 | 129,971,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 529 | py | Cases=input()
Cases=int(Cases)
for i in range(Cases):
Num1= [int(x) for x in input().split()]
Num2= [int(x) for x in input().split()]
Num3= [int(x) for x in input().split()]
count=0
ans=[]
for i in Num1:
if i==1:
ans.append(count)
count=count+1
count=0
for i i... | [
"root@codesprintla.com"
] | root@codesprintla.com |
4fcb401701f06fd6fd59e2e4e19e1e9a75953692 | 0f4c9d1a717b362291ce6eedca3160ce23532e0d | /day-35-rain-alert/main1.py | 8ee7f6f3d2cf2789304b054cada1e1d35724b7f7 | [] | no_license | leba0495/100-Days-Of-Python-Journey | 2de22e784b3b18e00edf60ad788158a3c169d14e | 9df993b10c29f610b5d7504b0c3a29e08677ce77 | refs/heads/main | 2023-02-22T08:47:34.588505 | 2021-01-24T23:37:57 | 2021-01-24T23:37:57 | 324,022,719 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,340 | py | import requests
import os
from twilio.rest import Client
from twilio.http.http_client import TwilioHttpClient
# Info for request from OpenWeather
OWM_Endpoint = "https://api.openweathermap.org/data/2.5/onecall?"
API_KEY = os.environ.get("OMW_API_KEY")
MY_LAT = 40.678177
MY_LONG = -73.944160
# Info for twilio function... | [
"noreply@github.com"
] | noreply@github.com |
6698de943e743d11300f391dd839dad9369a9914 | c2f4afee3ec4faef7231da2e48c8fef3d309b3e3 | /AppendFile.py | 7fcd0d08932bb7aacd4bdcc2a8461d8776ca7cac | [] | no_license | tanu312000/pyChapter | a723f99754ff2b21e694a9da3cb2c6ca0cd10fce | 2fd28aefcbfaf0f6c34db90fdf0d77f9aea142ce | refs/heads/master | 2020-05-03T15:51:34.334806 | 2019-03-31T16:17:45 | 2019-03-31T16:17:45 | 178,712,059 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 682 | py | '''#WAP to read line by line from keyboard & append to a list until n times. Break the loop under break condition.
#Step:1
# 1)ReadLine from keyboard
Line=input("Enter a Line"+"\n")
# 2)Append in the list
li=[]
li.append(Line)
# 3)Until n times
while True:
Status=input("Do you want to continue")
# 4)Break th... | [
"tanurocks90@gmail.com"
] | tanurocks90@gmail.com |
c361dedd1d0804ff593bc36fb18646206b67bd9a | 289697340c92e61dacbb921b7fd63201e7056eea | /agv2/Paint.py | 761918a9305fd2b0c163a661786923f90080b35c | [] | no_license | zhenhuic/projects-summary | 51a5c6e1411c69d96491a7775d7ce1ae8a1714bd | bb7dce6b5e2b18d783bec6dddca203721462e709 | refs/heads/master | 2022-12-30T22:24:14.788445 | 2020-10-23T13:13:34 | 2020-10-23T13:13:34 | 252,084,716 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 17,313 | py | import sys, math
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import Qt, QRect
import time
#from carshow import Ui_mainwindow
# 读取所有点的数据 并用字典 id:[x,y]存储
def readpoints():
points = {}
with open('newpoint1.txt') as f:
for line in f:
point = line.split(',', -1)[0... | [
"zhenhuiccc@gmail.com"
] | zhenhuiccc@gmail.com |
cc3f3c2352289d73e494b36f97e557535e657bed | c8bf3e2b94fe9a296e688cbb419563e0fa77c9c3 | /test_video.py | 5aefa09fb132c217bc47f87f01f18b8c6a0c5315 | [] | no_license | josefmtd/test-cv | 306884b4c185db6dbf02a683ccd0866c053f402a | ee40195bff27be068e58bccfa5ae0f60d9b6db68 | refs/heads/master | 2020-03-20T09:34:30.164397 | 2018-06-15T03:57:20 | 2018-06-15T03:57:20 | 137,341,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 821 | py | # import the necessary packages
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2
# initialize the camera and grab a reference to the raw camera capture
camera = PiCamera()
camera.resolution = (640,480)
camera.framerate = 32
rawCapture = PiRGBArray(camera, size=(640, 480))
# ... | [
"josstemat@gmail.com"
] | josstemat@gmail.com |
9090363a9ae18d37db75ef5f9cfa91a9746969d5 | 054b2c78cf70a81823da522f1bb5889f42787365 | /mudao/ui/__init__.py | 78dc516a1d30d973d1d13ab0207c9f1ca480fe43 | [] | no_license | musum/mudao | 9537ca1f6262b1271f9c4f6a247e00549762d254 | fbf8c507aa6e1755ac4126d7e4d75ace99b97fd4 | refs/heads/master | 2020-03-26T16:27:59.967129 | 2018-11-11T10:40:46 | 2018-11-11T10:40:46 | 145,103,715 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 115 | py | from mudao.ui.uiFile import FilePannel
from mudao.ui.uiCmd import CmdPannel
from mudao.ui.uiMain import MainWindow
| [
"test@test.com"
] | test@test.com |
33f06e48105dd16509b58527c0eed07ca7ed05a6 | bc441bb06b8948288f110af63feda4e798f30225 | /cmdb_sdk/model/notify/subscriber_pb2.pyi | f37ead231f841e671f9d1f218fbe6e05d86a7244 | [
"Apache-2.0"
] | permissive | easyopsapis/easyops-api-python | 23204f8846a332c30f5f3ff627bf220940137b6b | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | refs/heads/master | 2020-06-26T23:38:27.308803 | 2020-06-16T07:25:41 | 2020-06-16T07:25:41 | 199,773,131 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,884 | pyi | # @generated by generate_proto_mypy_stubs.py. Do not edit!
import sys
from cmdb_sdk.model.notify.subscribe_info_pb2 import (
SubscribeInfo as cmdb_sdk___model___notify___subscribe_info_pb2___SubscribeInfo,
)
from google.protobuf.descriptor import (
Descriptor as google___protobuf___descriptor___Descriptor,
)
... | [
"service@easyops.cn"
] | service@easyops.cn |
89fdc67025f1d1105bd747a337937acde1171361 | e9d25b27509087df06acb685fe08a335fb72113b | /project_stock/project_stock/migrations/0006_auto_20160511_1246.py | 7c576a85e507cfa8dec282f8817ba396e01ba9e6 | [] | no_license | cenh/ProjectStockSD | 32cfa4d9ee6b8b81a0faaac47a1fc545476f92c0 | 7611c6a9152a9a8d0dc237eb12bf604fdd718c2f | refs/heads/master | 2020-05-20T06:03:50.960284 | 2016-06-15T10:23:52 | 2016-06-15T10:23:52 | 51,740,226 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 481 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-05-11 10:46
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('project_stock', '0005_project_end_date'),
]
operations = [
migrations.AlterF... | [
"ninjalf2@gmail.com"
] | ninjalf2@gmail.com |
c868dac673e8b151e58bccdabedd5a1e9275f883 | 115098a64947ccb9310e1f4d8bd44f9ca3eb6821 | /wp.py | 551dde359ea9fc48469d61fa1158ef01fe0eaee2 | [
"MIT"
] | permissive | wakanapo/wpsearch | 73264b34fedaf104d90e59d5187e8ac6a79ffccf | bbf480f02ac4ae0a7a489e9d216c149c3c375dc6 | refs/heads/master | 2020-03-07T13:06:24.376364 | 2018-03-29T23:47:21 | 2018-03-29T23:47:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,493 | py | import sqlite3
import sys
import json
class Document():
"""Abstract class representing a document.
"""
def id(self):
"""Returns the id for the Document. Should be unique within the Collection.
"""
raise NotImplementedError()
def text(self):
"""Returns the text for ... | [
"keishi.hattori@gmail.com"
] | keishi.hattori@gmail.com |
011d3b37d7cb2a349a9f335003c370504e1fc868 | 26fb93b2df4b6226e708027beccb2f0d442a4522 | /MWTracker/GUI_Qt4/SWTrackerViewer/SWTrackerViewer_GUI.py | fbf28e5f0a9297acd767443f273c16285271614c | [] | no_license | KezhiLi/Multiworm_Tracking | bb4fd1d1beeab26f4402f5aa5a3f159700fa0009 | cd91e968a557957e920d61db8bc10957666b6bc2 | refs/heads/master | 2021-01-22T16:10:23.591064 | 2016-04-13T15:51:18 | 2016-04-13T15:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,201 | py | import sys
from PyQt4.QtGui import QApplication, QMainWindow, QFileDialog, QMessageBox, QFrame
from PyQt4.QtCore import QDir, QTimer, Qt, QPointF
from PyQt4.QtGui import QPixmap, QImage, QPainter, QColor, QFont, QPolygonF, QPen
from MWTracker.GUI_Qt4.SWTrackerViewer.SWTrackerViewer_ui import Ui_ImageViewer
from MWTrac... | [
"ver228@gmail.com"
] | ver228@gmail.com |
bf068617a07cc247a0e776ea487f6d60f4cbd555 | c36f43dc25cd7f2b52aa606f57bc9d690c248242 | /Python Data Visualisation/solutions/case_studies/case_study_d_flytipping.py | 84018bb1f60c90f74485d7dca81fab9fdfa71250 | [] | no_license | rachelchalmersCDDO/hello-git | 53a400f64ba49c84aca7afe0f4af9901effd753a | 0f72eceed31f503cea526785e8716321a7f31e78 | refs/heads/main | 2023-04-27T04:37:45.071999 | 2021-05-11T11:48:59 | 2021-05-11T11:48:59 | 366,358,490 | 0 | 0 | null | 2021-05-11T11:48:59 | 2021-05-11T11:31:10 | Jupyter Notebook | UTF-8 | Python | false | false | 2,630 | py | figure, axes = plt.subplots(figsize = (8,4)) # Set up our figure and axis
axes.axis("off") # Removes the axis from the figure
# Create the header - This is easiest to create as a new table with 1 row and position above our existing table.
header = plt.table(cellText=[["Number of fly-tipping incidents by waste type"]]... | [
"rachel.chalmers@digital.cabinet-office.gov.uk"
] | rachel.chalmers@digital.cabinet-office.gov.uk |
65a76d10ad4faa3451c1076b45faf88e43b89b85 | 9bce32b47bd2f5d676e2c880febc31e0cd2ebada | /core/__init__.py | 0ec37ce465b51e237c214b819e8afab3d0832ce2 | [] | no_license | ranxiao/Predictive-Performance-Eval-Toolbox | fa4a29cac6a5fe870d427c3a137e1eee6ccc6bc7 | e97280c51b13f0d8a2c82ec393a73f64433d1674 | refs/heads/main | 2023-05-30T14:46:51.043669 | 2021-06-24T20:05:41 | 2021-06-24T20:05:41 | 314,012,246 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 36 | py | from .processors import Process, run | [
"noreply@github.com"
] | noreply@github.com |
4ce90ed6b7934f21c3463432f8284e1baa696b8f | cc1b87f9368e96e9b3ecfd5e0822d0037e60ac69 | /dashboard/dashboard/deprecate_tests_test.py | 63b49de8e073633803e4351d0465573bfede7986 | [
"BSD-3-Clause"
] | permissive | CTJyeh/catapult | bd710fb413b9058a7eae6073fe97a502546bbefe | c98b1ee7e410b2fb2f7dc9e2eb01804cf7c94fcb | refs/heads/master | 2020-08-19T21:57:40.981513 | 2019-10-17T09:51:09 | 2019-10-17T18:30:16 | 215,957,813 | 1 | 0 | BSD-3-Clause | 2019-10-18T06:41:19 | 2019-10-18T06:41:17 | null | UTF-8 | Python | false | false | 9,522 | py | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import datetime
import mock
import unittest
im... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
25e72161c8d4276d21d755c960750c74d408ce34 | 8f75dae40363144b7ea0eccb1b2fab804ee60711 | /tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_v1_generated_iam_credentials_sign_blob_async.py | fffa6de4bc73a43e8c4de2347fdbc936e2ed972e | [
"Apache-2.0"
] | permissive | software-dov/gapic-generator-python | a2298c13b02bff87888c2949f4909880c3fa2408 | 304b30d3b4ec9ccb730251154b10896146a52900 | refs/heads/master | 2022-06-04T00:14:28.559534 | 2022-02-28T18:13:26 | 2022-02-28T18:13:26 | 191,990,527 | 0 | 1 | Apache-2.0 | 2022-01-27T19:35:04 | 2019-06-14T18:41:06 | Python | UTF-8 | Python | false | false | 1,491 | py | # -*- coding: utf-8 -*-
# Copyright 2022 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... | [
"noreply@github.com"
] | noreply@github.com |
aa2c753332ce7bf08b7e2a7efc44efcee9ed5542 | b10917820bac7e879c6e4b4a480d42e816675542 | /ID3_Decision Tree Algorithm.py | 564ee6850ac92bad323dd5f4c5c650e854cb00ab | [] | no_license | ronypy/ID3-Decision-Tree-algorithm | 8c753a3a6028dc7e29c70f77de7beae780b6a696 | f3ec2d34901297333125b0a15ce00b687e7776d3 | refs/heads/master | 2020-08-22T11:32:16.506272 | 2019-10-20T15:46:30 | 2019-10-20T15:46:30 | 216,385,156 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,450 | py | import csv
import math
# from operator import add
'''
readAllSamples is a user defined function. It is used to read all the sample of CSV file. It takes filename as an argument as well as test row count to make a test set from the file. This function returns a train set and a test set.
'''
def readAllSamp... | [
"noreply@github.com"
] | noreply@github.com |
14759c80b4c7aa5733b45151693919130262ebcd | 25ba2f7256c15ed23c129837380f340ad56a932e | /limacharlie/Spout.py | 75852122d299f39e84f6d61556da862e9d22b141 | [
"Apache-2.0"
] | permissive | macdaliot/python-limacharlie | c60d4b5d7a7a8985bc67208b88b5fa0748866fd3 | dc8011418f09d3acc0ebce5ea3afb98e4b7f600f | refs/heads/master | 2021-06-17T08:27:28.358390 | 2018-11-25T15:09:33 | 2018-11-25T15:09:33 | 161,183,497 | 0 | 0 | Apache-2.0 | 2021-02-09T18:28:39 | 2018-12-10T14:00:08 | Python | UTF-8 | Python | false | false | 10,197 | py | from gevent import monkey; monkey.patch_all()
from gevent.queue import Queue
import gevent.pool
import sys
import json
import requests
import os
import traceback
import uuid
import time
from .utils import *
_CLOUD_KEEP_ALIVES = 60
_TIMEOUT_SEC = ( _CLOUD_KEEP_ALIVES * 2 ) + 1
class Spout( object ):
'''Listener o... | [
"maxime@refractionpoint.com"
] | maxime@refractionpoint.com |
06b102050b963026c4e5184c89d73ea7e22da896 | 4cc16cdcee820f258fcdb7550b853949fc59de46 | /mobject/vectorized_mobject.py | 615e24502c0de9496acb4dcc415c9e2f3a81e407 | [] | no_license | eitanas/manim | c710802ef301b11d0ac6549bb58e04fcc59cc16d | 825ff127a517f35041b2def6efe29a8d6358cd4c | refs/heads/master | 2021-01-22T16:26:09.805304 | 2016-08-15T22:07:28 | 2016-08-15T22:07:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,000 | py | import re
from .mobject import Mobject
from helpers import *
class VMobject(Mobject):
CONFIG = {
"fill_color" : None,
"fill_opacity" : 0.0,
"stroke_color" : None,
#Indicates that it will not be displayed, but
#that it should count in parent mobject's path
... | [
"grantsanderson7@gmail.com"
] | grantsanderson7@gmail.com |
6f37e652c5ee9b68c1579f12e147989fb8c2cbd4 | c8fab9ceda9a5882584d9944a91c84a1828e1d8b | /code/35.数组中的逆序对.py | 4396b2143041b5024aa2e6b5cae176862168b323 | [] | no_license | Confucius-hui/Sword-to-office | 7683bdb3037b711181e78aec5a16c9dbfa1c34d9 | 0a018c77e7faa89ad3f1daa87cee31d2b539e082 | refs/heads/master | 2020-04-08T07:58:10.713008 | 2019-06-20T08:38:03 | 2019-06-20T08:38:03 | 159,159,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,555 | py | '''
在数组中的两个数字,如果前面一个数字大于后面的数字,则这两个数字组成一个逆序对。
输入一个数组,求出这个数组中的逆序对的总数P。
并将P对1000000007取模的结果输出。 即输出P%1000000007
'''
# -*- coding:utf-8 -*-
class Solution:
def InversePairs1(self, data):
length = len(data)
count = 0
for i in range(length):
for j in range(i+1,length):
i... | [
"1034243218@qq.com"
] | 1034243218@qq.com |
dbf025d7bcfc7df0a48718eccc0b0cb14810a02c | c2f35e5d3cfbbb73188a0cd6c43d161738e63bd1 | /12-Django框架学习/bj18/test2/booktest/admin.py | e10072641c8350576c99bd572fcb82581b21d2f6 | [] | no_license | yangh-zzf-itcast/Python_heima_Study | 2a7cd0d801d9d6f49548905d373bb409efc4b559 | 7d753c1cdd5c46a0e78032e12b1d2f5d9be0bf68 | refs/heads/master | 2020-04-30T06:59:04.000451 | 2019-04-19T12:15:30 | 2019-04-19T12:15:30 | 176,670,172 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 188 | py | from django.contrib import admin
from booktest.models import BookInfo, HeroInfo
# Register your models here.
# 注册模型类
admin.site.register(BookInfo)
admin.site.register(HeroInfo)
| [
"2459846416@qq.com"
] | 2459846416@qq.com |
c181290b15d6ff56e69337cc726815e6b271b393 | 2bcbf097c6f99a2ea30269bcab2420e9c7f08b67 | /homeassistant/components/wallbox/const.py | 62c9b2f6efdc0323ce964f2ff95c285d9867164d | [
"Apache-2.0"
] | permissive | yozik04/core | fe8fe96ac91ff18f2631ea40786e3b413dee839d | 3374005b336284730209c571240039683cf662bf | refs/heads/dev | 2023-03-06T02:28:28.520609 | 2021-10-30T17:18:39 | 2021-10-30T17:18:39 | 245,432,602 | 0 | 0 | Apache-2.0 | 2023-02-22T06:16:08 | 2020-03-06T13:54:31 | Python | UTF-8 | Python | false | false | 3,655 | py | """Constants for the Wallbox integration."""
from homeassistant.const import (
CONF_DEVICE_CLASS,
CONF_ICON,
CONF_NAME,
CONF_UNIT_OF_MEASUREMENT,
DEVICE_CLASS_BATTERY,
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_POWER,
ELECTRIC_CURRENT_AMPERE,
ENERGY_KILO_WATT_HOUR,
... | [
"noreply@github.com"
] | noreply@github.com |
2390b2d58a1a06651ea1b46e681dc0a4a1d5453d | 1317129f0bc7d5c87aadba09b9ebe3e2c9613357 | /modelling.py | 679190f47d1c2b235df89a292fa6d22598f6a6b5 | [] | no_license | aaqib-ali/Income_prediction | 9dcecfcf73ff3b3a6c9608d573663ba7b8ff4f16 | f420ead78b7684e723f7801d6c7f47c1bae1aaa7 | refs/heads/main | 2023-04-09T20:27:12.999711 | 2021-04-16T09:02:28 | 2021-04-16T09:02:28 | 346,493,822 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,089 | py | import time
import os
import pandas as pd
from collections import Counter
import seaborn as sns
import utils.helper_exploration as exploration
from sklearn.preprocessing import OneHotEncoder, StandardScaler
from sklearn.compose import make_column_transformer, ColumnTransformer
from sklearn.pipeline import Pipeline
from... | [
"aaqib_ali90@protonmail.com"
] | aaqib_ali90@protonmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.