blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
283
content_id
stringlengths
40
40
detected_licenses
listlengths
0
91
license_type
stringclasses
2 values
repo_name
stringlengths
3
135
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
68
visit_date
timestamp[ns]date
2015-07-25 20:53:29
2023-09-06 10:46:05
revision_date
timestamp[ns]date
1970-01-01 00:00:00
2037-05-03 13:00:00
committer_date
timestamp[ns]date
1970-01-01 00:00:00
2036-02-09 17:40:36
github_id
int64
1.61k
691M
⌀
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
24 values
gha_event_created_at
timestamp[ns]date
2012-06-03 10:21:33
2023-09-14 21:59:50
⌀
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-09-13 22:40:33
⌀
gha_language
stringclasses
250 values
src_encoding
stringclasses
27 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
6
10M
extension
stringclasses
289 values
filename
stringlengths
1
218
content
stringlengths
6
10M
62601eca767800f00b461ef46d72bddc5cf75de0
9abd182d02355ddf0b79afd4a35f7127a4a66f7a
/gluoncv/model_zoo/monodepthv2/resnet_encoder.py
169df0879a036125e834b04119605133dd9642ae
[ "Apache-2.0" ]
permissive
dmlc/gluon-cv
e1303086419a5733661d0fcb9095c09d4f2382ad
567775619f3b97d47e7c360748912a4fd883ff52
refs/heads/master
2023-07-19T12:02:36.824294
2023-01-19T00:37:33
2023-01-19T00:37:33
122,896,249
6,064
1,458
Apache-2.0
2023-01-19T00:37:35
2018-02-26T01:33:21
Python
UTF-8
Python
false
false
4,457
py
resnet_encoder.py
"""Encoder module of Monodepth2 Code partially borrowed from https://github.com/nianticlabs/monodepth2/blob/master/networks/resnet_encoder.py """ from __future__ import absolute_import, division, print_function import os import numpy as np import mxnet as mx from mxnet.gluon import nn from mxnet.context import cpu fr...
67be25e8fdf004515e18e1c20b8d0238222a2172
7f07e53572cfa88504c81994d17e5f750c2fdd45
/loss_function.py
df80c03673e424fc6a2030c8e2c763973077a814
[]
no_license
mahmoodmmr/DeepNewsvendor
930d61e6701c80c190ed65d7ca311fe012aa6b44
b3b36dedef593d1c3b45c96d88bfbe5f6d643be5
refs/heads/master
2022-05-14T21:03:17.536758
2022-05-12T17:41:16
2022-05-12T17:41:16
440,802,775
0
0
null
null
null
null
UTF-8
Python
false
false
1,115
py
loss_function.py
import torch import torch.nn as nn import numpy as np class EuclideanLoss(nn.Module): def __init__(self, c_p, c_h): super().__init__() self.c_p = c_p self.c_h = c_h def forward(self, y, d): ''' y: prediction, size = (n_product, n_obs) d: actual sales, size = ...
22909e41e4f9ad0280c22ec11ecfbccff87efae1
0eafacb3737fe1accb94fc2a8f2682d398a2ec95
/10010-waldo.py
a63e3834dccb4ecf59e564b6d7811ff6566bac14
[]
no_license
xikoto/programming_challenges_skiena_revilla
d717c16c6f8c3d0310a042e4d3e3c1eb7e99999d
14ab484d05be28db0a37489171caeeae8bb90323
refs/heads/master
2021-01-14T08:22:44.067824
2017-03-29T13:40:37
2017-03-29T13:40:37
81,951,351
0
0
null
null
null
null
UTF-8
Python
false
false
6,566
py
10010-waldo.py
import sys if __name__ == '__main__': cases = sys.stdin.readline() for i in range(int(cases)): sys.stdin.readline() lineas, columnas = sys.stdin.readline().strip().split(" ") lineas = int(lineas) columnas = int(columnas) list_lines = [] for linea in range(linea...
a3301180e53da4a6970c082e72d8721b29dcae2e
1a776fdf9ba9fc0ff24973141d54a4016239158f
/minemon3/minemon.py
fa1b04f1757a6af3a6671b5d5f6e751ff2ad8908
[]
no_license
MannerMan/MineMon
1aa25522953cac6f8f1ed8d7447e8bedd4482951
00c16b57ec9b4edfbcc75feda08cd0f038fd6f20
refs/heads/master
2021-01-22T08:58:37.353393
2015-06-14T16:25:25
2015-06-14T16:25:25
4,430,004
0
0
null
null
null
null
UTF-8
Python
false
false
16,929
py
minemon.py
#!/usr/local/bin/python # -*- coding: utf-8 -*- # importing regular stuff import os import sys import thread import threading import time import datetime from datetime import datetime import random import filecmp import ConfigParser import socket #my stuff will go here import include.action as action import include.l...
8928c2ff49cbad2a54252d41665c10437a471eeb
4bbfe889885084e33767020124d17607c120a5b2
/demisto_sdk/commands/create_artifacts/tests/content_artifacts_creator_test.py
0c8b6b2b5da1c7d1ef2a5404f534e05ce07bd00a
[ "MIT" ]
permissive
shubgwal-gif/demisto-sdk
fc80163b7a2c2fc00d5b664a47326a9dbebf6dd6
35b15113ff8488c7c9051da2c2cbcbc7c6915e8d
refs/heads/master
2023-01-29T11:31:36.928267
2020-12-08T16:37:20
2020-12-08T16:37:20
null
0
0
null
null
null
null
UTF-8
Python
false
false
7,893
py
content_artifacts_creator_test.py
from contextlib import contextmanager from filecmp import cmp, dircmp from shutil import copyfile, copytree, rmtree import pytest from demisto_sdk.commands.common.constants import PACKS_DIR, TEST_PLAYBOOKS_DIR from demisto_sdk.commands.common.tools import src_root TEST_DATA = src_root() / 'tests' / 'test_files' TEST_...
28233cb4a56ee805e66f34e6abd49137503d5f7b
0c828737ca73e73c4e39568dbfc80aa2a007b206
/apps/articles/models.py
8bdc281e1dcfe8a792c158926f37b2d564a69920
[ "BSD-3-Clause" ]
permissive
StuartMacKay/django-daterange-filterspec
e5734facc90602ec2416255b0b37e59d9e2eb9d7
a874ac91d6d07b56badfe6c90f414976fcda1b12
refs/heads/master
2022-03-01T05:33:17.956403
2022-02-07T08:22:48
2022-02-07T08:22:48
2,118,583
6
2
null
null
null
null
UTF-8
Python
false
false
298
py
models.py
from django.db import models class Article(models.Model): created = models.DateTimeField(auto_now_add=True) published = models.DateTimeField(null=True, blank=True) title = models.CharField(max_length=100) slug = models.SlugField(max_length=100) content = models.TextField()
e59763991974f4bfcd126879dd9aabd44bd89419
5dd1ff01b22c03af56d3acc8a8afe4dfd18f7624
/pastis/simulators/webbpsf_imaging.py
af8c4b2224959163004da99a10182d1325055feb
[ "BSD-3-Clause" ]
permissive
spacetelescope/PASTIS
4b007675e8f12d93b5da48dc1bf5e45b970b01f0
56eda252a9a7e3c0f21b6624308a4b175bf8ac9b
refs/heads/develop
2023-08-10T11:27:41.074990
2023-07-11T21:07:56
2023-07-11T21:07:56
127,809,825
6
5
BSD-3-Clause
2023-07-11T21:07:58
2018-04-02T20:39:24
Jupyter Notebook
UTF-8
Python
false
false
9,036
py
webbpsf_imaging.py
""" This is a module containing convenience functions to create the JWST aperture and coronagraphic images with WebbPSF. """ import os import numpy as np import matplotlib.pyplot as plt import astropy.units as u import logging import poppy from pastis.config import CONFIG_PASTIS import pastis.util as util log = loggi...
39b6ca21b8d4856e2b2edfcbd00b75fbce6dfff7
eb213d683e71d78eb2db47bd1d06487e1597d4ea
/dashboard/forms/user_form.py
cfcd3c324b80ab09a32b6b5093f9fd207d2ca5e6
[ "Apache-2.0" ]
permissive
PyFlux/PyFlux-Django-Html
9f7431c0e48f320a3cb6196154602e5f665250f2
8abae10261e276bf4942aed8d54ef3b5498754ca
refs/heads/master
2022-07-23T10:04:45.876368
2019-06-14T14:40:02
2019-06-14T14:40:02
189,351,126
0
0
Apache-2.0
2022-07-06T20:09:47
2019-05-30T05:29:01
JavaScript
UTF-8
Python
false
false
3,104
py
user_form.py
from django import forms from django.core.validators import RegexValidator from dashboard.validators import validate_domainonly_email class addUserForm(forms.Form): username = forms.CharField(label='User Name', required="required", disabled="", min_length=6, max_length=128, help_tex...
0b0b22043dda94ea57344fb3bf47255ad85c7f5b
9c73309df4a55003f8184f6d51808404c2c3a9c7
/TourCommentApi/TourCommentApi/Views/SpotListView.py
78d27a8cda083ef7d18bd7fb70f8d45bf1788d6f
[]
no_license
KevinSwiftiOS/TourCommentApiPro
962c67096ee593ad5288eb405f5324677d90e59f
91606492efbddf88de13a4dca0bc4da276b19979
refs/heads/master
2020-04-01T03:38:02.703032
2018-10-22T03:12:05
2018-10-22T03:12:05
152,829,769
0
0
null
null
null
null
UTF-8
Python
false
false
1,371
py
SpotListView.py
# -*- coding: utf-8 -*- from rest_framework.views import APIView from ..Models.ConnectToDBModel import * from ..Models.RegionInfoModel import * from .CommonView import * def get_one_spot(region): comments_data = get_comment_data(); data = {}; data['id'] = region.id; data['name'] = r...
11576597429e119cf4887a88139df4a9e6d7eb66
9bc726ddbbb849575c186f20b2327a183a51cdd8
/Cluster_extend.py
ee03af33c7778f72e138ba6887fe436df1b9296c
[]
no_license
XseniaP/PepSeed
d3a6cee9aa0d004e54a51bcd2d4126d7bdff5614
af5fd794b87f6eb640eaf1fc707f84301df7b488
refs/heads/master
2023-08-16T20:56:24.472300
2021-09-13T17:56:24
2021-09-13T17:56:24
401,710,577
0
0
null
null
null
null
UTF-8
Python
false
false
211
py
Cluster_extend.py
from tkinter import * from tkinter import filedialog from tkinter import scrolledtext import tkinter as tk import os import sys import subprocess import shlex from subprocess import check_output import pathlib
cc9a1fb746b82d92965afb6bad0a2bc5121cb00e
60b1287b503def67125ba535037d1f39df7d50fa
/python-exam/py1.py.py
c84b154c958cdc2140cbe4537e03df4f0d4e3d47
[]
no_license
CemTekelli/Coding
dc9b6e67ae168298e9722e2fd764356eb3110723
a329225fd95b2ba23f214950cc41243e67451adf
refs/heads/main
2023-06-13T06:28:27.443669
2021-07-09T13:52:04
2021-07-09T13:52:04
384,436,761
0
0
null
null
null
null
UTF-8
Python
false
false
6,023
py
py1.py.py
#Mettez votre code ici class Agence(): def __init__(self, nom, adresse, numero, mail="") : self.nom = nom self.adresse = adresse self.numero = numero self.mail = mail self.biens = [] def aVendre(self, maison): self.biens.append(maison) def offre(self, prix=0): if self.mail != "" : print("En v...
0500ef8cd522ff23f7698fcb2cc3c28264e130cd
29bec83fc600720533ad2bcf17fc90cd9ca385b7
/0x08-python-more_classes/practice/property_setter.py
f5f01a0fc142a292ecba6fc37154891e255d7196
[]
no_license
VictorZ94/holbertonschool-higher_level_programming
73a7f504cde583f43f641e18e692e062610870a4
ad512a1c76dc9b4c999a0ba2922c79f56206dd98
refs/heads/master
2023-03-25T04:38:12.708766
2021-03-24T01:08:47
2021-03-24T01:08:47
291,826,914
1
0
null
null
null
null
UTF-8
Python
false
false
1,216
py
property_setter.py
# class SampleClass: # def __init__(self, a): # ## private varibale or property in Python # self.__a = a # ## getter method to get the properties using an object # def get_a(self): # return self.__a # ## setter method to change the value 'a' using an object # def set_a...
635d19a34d36d5f531962a7843889c2a3e71e629
e44d00ffcea03f8656c40b3d4d993d51a38af3b0
/leetcode/Jan_2021/27_ConcatenationConsecutiveBinaryNumbers.py
5227b063a0dd1152cc6de8ba74f4f63312d5b8ca
[]
no_license
Ayushmanglani/competitive_coding
d6beec4f2b24aef34ea44c3a4a72074985b4a766
12325b09ae2bc6b169578b6a0a091069e14c9227
refs/heads/master
2023-06-12T04:43:41.130774
2021-07-03T13:01:37
2021-07-03T13:01:37
262,079,363
1
0
null
null
null
null
UTF-8
Python
false
false
385
py
27_ConcatenationConsecutiveBinaryNumbers.py
class Solution(object): def concatenatedBinary(self, n): res = '' for i in range(1,n+1): res += bin(i)[2:] return(int(res,2) %(10**9+7)) class Solution(object): def concatenatedBinary(self, n): ans, M = 0, 10**9 + 7 for x in range(n): ans = (ans *...
3b50d469c4f7019f1e502e340b555c5f357f3055
dc4aae00aa8dc91d52292004948e3b2dd6506a4f
/pytorch_Gpipe/model_partitioning/__init__.py
1e7e49df8aa2ec579437259554054fb53317d40c
[]
no_license
alondj/Pytorch-Gpipe
a48c7e3aad5ba775051ee65128e35fba168e7840
7c9bf892fe65ffe3efdb8cb00a7052b665d41f75
refs/heads/master
2020-04-29T19:22:55.658420
2019-11-13T19:47:05
2019-11-13T19:47:05
176,352,208
39
6
null
2019-11-04T09:10:21
2019-03-18T19:04:04
Python
UTF-8
Python
false
false
257
py
__init__.py
from .module_generation import generatePartitionModules from .partition_graph import partiton_graph as partition from .process_partition import post_process_partition __all__ = ["post_process_partition", "partition", "generatePartitionModules"]
73dfbebc59ee73c0bf448e59a9cbc549933e7766
cfcd117378664e4bea080b3c1011a25a575b3d51
/hawc/services/utils/doi.py
fe6fe91a413edffbe09e91ca1624172ca42d78cf
[ "MIT" ]
permissive
shapiromatron/hawc
9d3a625da54d336334da4576bd5dac6915c18d4f
51177c6fb9354cd028f7099fc10d83b1051fd50d
refs/heads/main
2023-08-03T13:04:23.836537
2023-08-01T18:39:16
2023-08-01T18:39:16
25,273,569
25
15
NOASSERTION
2023-09-14T17:03:48
2014-10-15T21:06:33
Python
UTF-8
Python
false
false
1,365
py
doi.py
import html import json import urllib.parse from hawc.apps.lit.constants import DOI_EXTRACT def try_get_doi(text: str, full_text: bool = False) -> str | None: """Try to extract a DOI out of text. Args: text (str): The text to find a DOI full_text (bool, optional): Additional checks if unstru...
e480fbe0baa19d1c87231a9589d53b1644f56223
b1bbfe2fa31d761d6a4658b022d344b5a0cb7dd8
/724-find_pivot_index.py
12b1a27ea874b51e100ad3dfb486d0dca200bc76
[]
no_license
stevestar888/leetcode-problems
f5917efc3516f8e40d5143b4dc10583c1e22dabd
844f502da4d6fb9cd69cf0a1ef71da3385a4d2b4
refs/heads/master
2022-11-12T05:01:02.794246
2022-10-28T16:45:48
2022-10-28T16:45:48
248,663,356
2
2
null
null
null
null
UTF-8
Python
false
false
756
py
724-find_pivot_index.py
""" https://leetcode.com/problems/find-pivot-index/ Strat: If we do a one pass to sum up all the contents of the array, and then keep track of the sum we've iterated over so far, we know essentially the nums left and right of the pivot at all times. Stats: O(n) / linear time, O(1) / constant space ""...
cd7d1de5445022b9add32484a6b3fbf1dce7ea89
fa81a7d6f0b9c0fc3c30d0ee524fb86163c71168
/handler/admin_handler.py
842d2b47db77c38357ee47168f17b287cdaeefc3
[]
no_license
zikkinbun/s2s
0535550161455b1aaa306a472e9230abbe10e6ce
d520316d773ee14e7db25d2da56e4a19e52f8821
refs/heads/master
2021-01-01T16:09:09.812947
2017-10-11T02:29:10
2017-10-11T02:29:10
97,779,753
0
0
null
null
null
null
UTF-8
Python
false
false
598
py
admin_handler.py
# _*_ coding:utf-8_*_ from utils.db_utils import TornDBReadConnector, TornDBWriteConnector from model.admin_model import AdminModel class getToken(object): def __init__(self): self.db_conns = {} self.db_conns['read'] = TornDBReadConnector() self.db_conns['write'] = TornDBWriteConnector() ...
8a8a098ce2ea3b578a8a954fa77b55f17c948919
26dedeae58c2ba75e8843f62d195c1a416f43ca0
/Longest Palindromic Substring.py
6920dc9c4a34da76f753b569ec4cebfa970d2093
[]
no_license
EscapeB/LeetCode
9bff46b90c1142d6d48a65ba3bbe4102da6788b1
ef0aa1045314518f39c6d8d7c0db11954afe1ec4
refs/heads/master
2021-06-07T02:07:29.847291
2019-12-09T13:12:52
2019-12-09T13:16:04
67,867,969
3
1
null
null
null
null
UTF-8
Python
false
false
1,694
py
Longest Palindromic Substring.py
# Given a string s, find the longest palindromic substring in s. # # You may assume that the maximum length of s is 1000. # # Example 1: # # Input: "babad" # Output: "bab" # Note: "aba" is also a valid answer. # Example 2: # # Input: "cbbd" # Output: "bb" # print(s.join('#')) # maxStr = '' # for i in range(len(s)): ...
607957e388b9e5ea7cf41a29bd7477330d6ebffa
553b34a101c54090e68f540d96369ac7d5774d95
/python/algo/test/test_theory_problems.py
86bd4b08560b81ef44ee268a06e3ddeb3a02a662
[ "MIT" ]
permissive
topliceanu/learn
fd124e1885b5c0bfea8587510b5eab79da629099
1c5b1433c3d6bfd834df35dee08607fcbdd9f4e3
refs/heads/master
2022-07-16T19:50:40.939933
2022-06-12T15:40:20
2022-06-12T15:40:20
21,684,180
26
12
MIT
2020-03-26T20:51:35
2014-07-10T07:22:17
JavaScript
UTF-8
Python
false
false
12,636
py
test_theory_problems.py
# -*- coding: utf-8 -*- import unittest import random from src.heap import Heap from src.graph import Graph from src.strongly_connected_components import scc class TheoryProblems(unittest.TestCase): def test_problem_1(self): """ You are given as input an unsorted array of n distinct numbers, wh...
bccdc12febb529f4c713d871bb99a31a0795e42d
6daa46259962d575ebce7c7a61d8616192dbbfc4
/home/views.py
14c28705f5caa41e02de07e063fa63ebf6d1f1ce
[]
no_license
johnnystefan/moviesApp
59225b4e16a3f972774539333882974fe11a64ef
82a3ce0d2cc2d6f3240397931e36acd897bd0970
refs/heads/master
2022-12-13T11:29:08.934200
2020-01-23T15:49:10
2020-01-23T15:49:10
234,404,966
0
0
null
2022-07-15T20:32:10
2020-01-16T20:24:15
Python
UTF-8
Python
false
false
967
py
views.py
from django.shortcuts import render from operator import attrgetter from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from movies.views import get_movie_queryset from movies.models import MoviePost MOVIE_POSTS_PER_PAGE = 10 def home_screen_view(request): context = {} query = "" query = r...
85f031c1c7e3f62d9fc5b93133c96695b7c3b8a5
c2660c2359727be98bed1d0420e83465659787ee
/RADIA_joblist.py
6fd568cce15f5ce65e0aa91adc344ee29261b3aa
[]
no_license
jingchunzhu/scripts
27fb97c43898be616d46b8d8fb14c2bb5705e8e3
d58a763640b3ddee1503adbf019179a4d68b88d5
refs/heads/master
2021-01-25T03:48:46.816903
2015-03-10T17:09:01
2015-03-10T17:09:01
31,970,241
0
0
null
null
null
null
UTF-8
Python
false
false
19
py
RADIA_joblist.py
../RADIA_joblist.py
4e632bfe41049a5ad18767b43cec483d85818d44
d72216e5499eec4b9f9c7a205e0fd641987b27ae
/210301/sources/timetable/app.py
d8f9383f4ac3cf9678f81f71ba7f56270e9872f1
[ "Apache-2.0" ]
permissive
ObukhovVladislav/python-adv
ca7cefaa80d78fb62f84dd7a61e5cf348c0572cc
ffab71d28e54d2c9b9c53c5fec453873242291f3
refs/heads/main
2023-05-09T14:42:09.142709
2021-05-30T06:42:49
2021-05-30T06:42:49
332,634,095
0
1
null
null
null
null
UTF-8
Python
false
false
446
py
app.py
import re import requests RE_XLS_FILE = re.compile(r'href="([^"]+\.xls)"') request_url = 'https://kpk.kss45.ru/%D1%83%D1%87%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F-%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B0/%D1%80%D0%B0%D1%81%D0%BF%D0%B8%D1%81%D0%B0%D0%BD%D0%B8%D0%B5_%D0%BF%D0%B0%D1%80.html' response = requests.get(request_url) co...
1ec6ac4df54adf70e242dbfc84d711d6b79d8762
56a64f1f7dbf9ff6387c854c222ffa5743c75b90
/towerDefense/monsters/monsterTypes.py
78bcc0847df42092779eedc273a42c6d549068f4
[]
no_license
brandonmclellan/PyDefense
32cfde97576ce2a2db3028ed19bbf8ed638bc1d0
91e954c01904a9ee84b0870eb82d807e34de2738
refs/heads/master
2021-01-19T10:15:13.202723
2013-02-02T02:52:12
2013-02-02T02:52:12
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,800
py
monsterTypes.py
''' Source Name: monster.py Author: Brandon McLellan Last Modified: August 9th, 2012 Last Modified By: Brandon McLellan Description: Revision History: Revision 3: - Balanced monster stats Revision 2: - Wrote other monster classes Revision 1: ...
673eec93e05116bc44f841fabfac4014c20ebfa9
3fedf223d6e026c701451efefc879fac0ac9a2e9
/oauthenticator/__init__.py
f5006703e1b9b4ffccf9e40da2fe68d17d104132
[ "BSD-3-Clause" ]
permissive
kooplex/oauthenticator
36a3138bbaf8b286ea012e54038ff4ac714a5b89
67c852d9fd0f0846214ef7adfe504dcae1efa3bc
refs/heads/master
2021-01-18T07:48:29.784823
2016-06-08T13:44:32
2016-06-08T13:44:32
60,700,629
0
0
null
2016-06-08T13:39:04
2016-06-08T13:39:03
Python
UTF-8
Python
false
false
162
py
__init__.py
from .oauth2 import * from .github import * from .gitlab import * from .bitbucket import * from .google import * from ._version import __version__, version_info
d11509a86edc21f73b570ef7d60f6658c56a2c6b
23811506f5ee32906dbd443acdf693630723adfa
/main.py
01953db173108ef8f3b26d77cbcf83c560298641
[]
no_license
KsyuYu/db-lab2
15b2da093751b5fdb62132ac0e0cec2799b40c8b
ae17457cd6932a355394c65ffdc8e3082b1fbf63
refs/heads/main
2023-04-15T23:54:43.689391
2021-04-05T00:14:46
2021-04-05T00:14:46
354,664,707
0
0
null
null
null
null
UTF-8
Python
false
false
4,248
py
main.py
import csv import os import logging import psycopg2 from datetime import datetime from psycopg2.errors import lookup LOG = logging.getLogger(__name__) logging.basicConfig(filename="database_logs.log", level=logging.INFO, format="%(asctime)s: %(message)s") def create_table(conn, cursor): LOG.info("C...
69f18ee65958e1b3c1be22d1059512d811ab4fa2
fffd207a792a1490a196b70b096d631ddd9eaac8
/Python Exercise/Exercises N°1/Palindromo.py
c0ef938960fc0b58dceecfa08b91b20f65f85b2c
[]
no_license
Greensly/InfoGeneral
da5b809d3740b2b610d147fda7429471314d8770
2fec224289ed7b543c1d7740df7d5bdd83ac77d5
refs/heads/master
2020-04-26T20:21:11.435480
2019-07-01T00:14:31
2019-07-01T00:14:31
173,807,006
0
0
null
null
null
null
UTF-8
Python
false
false
419
py
Palindromo.py
def palindromo(Word): large = len(Word) wordInv = "" for i in range(large): wordInv += Word[large-1-i] for j in range(large): if wordInv[j] == Word[j]: n = j+1 if n == large: print("La palabra es Palindrome") else: print("La palabra no es Palindrome") ...
cca41fc09f53af4a4c2b22b7156eb3571eb1cc9f
a63fa8453a64fd92009cbf74b5da2f4650ba3190
/arrays.py
e3bfd1534809827490116a87f245460aef07657e
[]
no_license
samida22/HackerRankSolutions
ed24a71831780180218d47f912726ff17207785b
55b10cff6d6dabe852014855ae3c4236d38b5670
refs/heads/main
2023-05-28T19:06:12.383286
2021-06-14T12:12:23
2021-06-14T12:12:23
376,809,781
0
0
null
null
null
null
UTF-8
Python
false
false
415
py
arrays.py
"""https://www.hackerrank.com/challenges/30-arrays/problem""" import math import os import random import re import sys #if __name__ == '__main__': n =input() arr = list(map(int, input().rstrip().split())) result_list = [] for i in range(int(n)): result_list.append(arr[n - i - 1]) print(" ".join(map(str, result_li...
a0b6d5b1e2a901adc62d5cc9a27f59bd30d55a7b
e19965211b36cd6268d78e76cdb2da76e31fa33d
/register/views.py
3f625385f0b18002136c88bd3efdfeabdb6b7842
[]
no_license
sureshsaravananbabu/workshop-registration-sysytem
c52627809c10b1c83497cb930d2c80fbe5aae149
686cf485af651840fdd5d641c7658e4829227f69
refs/heads/master
2020-05-20T14:39:35.514538
2019-05-08T15:13:41
2019-05-08T15:13:41
185,627,411
0
0
null
null
null
null
UTF-8
Python
false
false
616
py
views.py
from django.shortcuts import render,redirect from .models import register # Create your views here. def registerr(request,courseid): dicti={ 'course':courseid } return render(request,'register.html',dicti) def index(request): if request.method=='POST': a=register.objects.create(coursei...
04bc9253ee80f9b9f69592b50c90832a993464b4
4813d2d8c477a22d1f80fdfc45cd91458f211dca
/companyinfo/migrations/0009_auto_20200822_1309.py
dcdd100688b85a08b22ff4d4156ba0a9643c5521
[]
no_license
LaoFuoc/Nancy-education
41dab4e5a47622dae3327edaabad11eaa4d7ee86
04947a2032340e06596ec7e10fd0bd6a4a1429a9
refs/heads/master
2023-01-08T09:34:19.809478
2020-11-06T08:47:25
2020-11-06T08:47:25
287,872,549
0
0
null
null
null
null
UTF-8
Python
false
false
3,306
py
0009_auto_20200822_1309.py
# Generated by Django 3.0.7 on 2020-08-22 13:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('companyinfo', '0008_auto_20200816_1817'), ] operations = [ migrations.AlterModelOptions( name='teacher_select', opti...
219dc4bce2c34afd3dd2c7bbd665d46627702468
bc0d3a75d4eec1d170188894657fb1b92091946d
/data/images/standard_images/make_rot_image.py
04ad6507861bf545493c8f606a43d0aa19a004ed
[ "MIT" ]
permissive
ryuz/jelly
b0d9e7f067cdb09ef3522521790a62e8562287cc
c195e9ff67655065ef3fe27a8f249b1b82e5c043
refs/heads/master
2023-08-19T06:08:05.547962
2023-08-05T02:34:13
2023-08-05T02:34:13
2,084,115
42
13
MIT
2023-08-05T02:34:14
2011-07-21T15:20:53
Verilog
UTF-8
Python
false
false
816
py
make_rot_image.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import numpy as np import cv2 src_file = "color/Mandrill.bmp" dst_path = "Mandrill_128x128_rotation" size = (128, 128) center = (63, 63) def write_img(fname, img, type="P3"): with open(fname, "w") as f: f.write("{}\n".format(type)) f...
c321ed649901a4ba7aaf36695c1bb175f04674c5
142d44de2281736e2099da7519318dedfe58bf7b
/stock_data_crawler/history_data/history_financial_stock.py
d5e40c24345bf5152e08aa8f735e590f5e218ede
[]
no_license
hollebeijing/lm_crawler
1d4000a7fb61b7beaae91edf00956f79b331e4f3
2bc4258c54d229a0d10e6f240f61815da8125cda
refs/heads/master
2021-05-14T05:38:57.220875
2018-01-04T06:59:58
2018-01-04T06:59:58
116,225,783
0
0
null
null
null
null
UTF-8
Python
false
false
22,223
py
history_financial_stock.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Create : 2017/12/13 下午5:56 Author : Richard Chen File : history_financial_stock.py Software: IntelliJ IDEA ''' from conf.requests_useragent import get_user_agent import requests from common.db_utils.stock_crawler_inner_db import LmInnerReportDBMgr f...
27402810e0ee928c4d055de666f398f10dfdeda6
1a104094767e4f67965031e39c77407911acd700
/try2/code/getIoFileNames.py
9fc23602b1ca1ad36ee2521d9f574d62b713df70
[]
no_license
LombaxTech/spUni
e663a40e78b4f151b1a2535bae70ebac6ff96ae6
08f1abc613d8aab9e0d0b9afb0b328048ee68911
refs/heads/master
2021-02-28T18:19:36.639821
2020-04-30T17:58:29
2020-04-30T17:58:29
245,721,864
0
0
null
null
null
null
UTF-8
Python
false
false
476
py
getIoFileNames.py
import sys inputFile = sys.argv[1] outputFile = sys.argv[2] print('input file:', inputFile) print('output file:', outputFile) # file = open(inputFile) # lines = file.readlines() # print(lines) # for line in lines: # position = line.find('File_name') # if (position != -1): # # print(line[12:]) # ...
f7fad743332fb971c6366e6f52422a181ad52601
a7f02d8c42513a5b63cda853398359f43b9747fc
/lesson_3/hw3_task_1.py
0d8e9947e63fe49808954680eda6f74ee4278edd
[]
no_license
tritiumTino/parsing
4e2518536e74177602b643956966fa652ef8f24a
a7d3cd9b370ab8630d4f47f4d3b693279ee80409
refs/heads/master
2023-08-29T21:36:06.923910
2021-11-01T11:20:20
2021-11-01T11:20:20
413,090,405
0
0
null
2021-11-01T11:21:03
2021-10-03T13:47:31
Python
UTF-8
Python
false
false
2,697
py
hw3_task_1.py
from __future__ import annotations import requests from bs4 import BeautifulSoup import re from pymongo import MongoClient import time VACANCY = 'Junior+python+developer' URL = 'https://spb.hh.ru/search/vacancy?area=2&fromSearchLine=true&st=searchVacancy&text={vacancy}&page={page}' headers = requests.utils.default_he...
e91d219eb53d83d971ab39724240ca7bac276a82
f3e1d48b4c2798f8c45a54d30f2733ed62639634
/tests/strategies/test_factors.py
ff1adb3e7e6533f3f7a2bb92c0fcae668857f724
[ "BSD-3-Clause" ]
permissive
PermutaTriangle/Tilings
fe64b40bba439f887ae688c4c8e492d0a8c60aad
c3764f1e24d906f4a11a15832e1d9cde23e0ed4a
refs/heads/develop
2023-06-24T17:58:32.312291
2023-06-06T17:32:49
2023-06-06T17:32:49
121,506,164
6
7
BSD-3-Clause
2023-06-06T16:57:58
2018-02-14T12:03:05
Python
UTF-8
Python
false
false
8,070
py
test_factors.py
from itertools import chain import pytest from comb_spec_searcher import CartesianProduct from tilings import GriddedPerm, Tiling from tilings.strategies import FactorFactory from tilings.strategies.factor import FactorStrategy, Interleaving pytest_plugins = [ "tests.fixtures.simple_tiling", "tests.fixtures....
550eac647a554a8a277b10e8b6854a977a7ba0f3
88c2b52bfa421be0fb715a200f4e2a80d0b898aa
/blockchain_manager/blockchain.py
72a9a4b9759381e1053472f3993ee0b2e0011ffa
[]
no_license
Cau-Coin/Blockchain-System
a52552eb8ad3f5532d5beef042af6fe6be800da5
7b68a61032560f750d13b81d61e13461cc39a51b
refs/heads/master
2020-03-30T18:53:51.805941
2018-11-02T07:40:13
2018-11-02T07:40:13
151,519,229
1
0
null
2018-11-02T07:40:14
2018-10-04T04:38:45
Python
UTF-8
Python
false
false
5,578
py
blockchain.py
# -*- coding: utf-8 -*- import pymongo from blockchain_manager.genesis_block import create_genesis_block from blockchain_manager.leader_adapter import propose_block, broadcast_next_leader from blockchain_manager.node_adapter import send_tx_msg from node_info import tx_limit_num class Blockchain: def __init__(sel...
ffe341504800b8df43516ac9fc71adc26c2eeab3
767e1e9d5864e03fb1df563173261def4921fadb
/worklog/worklog.py
74681d1d904d2b6c075b2c1899ee9b515cd00c2f
[ "CC0-1.0" ]
permissive
gs1571/tlog
dd10365611a0ae812780d8a4421d695d2148d10a
17a1b1bf2ec83498cc613a410435b061b869ee46
refs/heads/main
2023-01-30T07:50:58.426677
2020-12-08T09:30:11
2020-12-08T09:30:11
316,491,508
1
0
null
null
null
null
UTF-8
Python
false
false
4,045
py
worklog.py
# tlog - Moving time entries from toggl.com to jira # Written in 2020 by Grigory Solovyev gs1571@gmail.com # # To the extent possible under law, the author(s) have dedicated all copyright # and related and neighboring rights to this software to the public domain worldwide. # This software is distributed without any w...
c5ac8168724840c95f7416cf8021b998712ef02e
20314bd50a56814505bcb895ed68defba4b4a2fb
/Add-Two_numbers/solution.py
ea60322e935117b15975e4d5f515ca8b7ef01d20
[]
no_license
kaashdesai1/Leetcode-Problems
8ef51159890496a0fe7f07a90294ca140e32334f
d1bd389be35f2ac932097afc588d6de1ab9664ed
refs/heads/main
2023-01-02T14:15:34.687486
2020-10-13T20:33:26
2020-10-13T20:33:26
303,818,677
0
0
null
null
null
null
UTF-8
Python
false
false
675
py
solution.py
def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: """ (2 -> 4 -> 3) + (5 -> 6 -> 4) | | """ prev = head = ListNode(0) carry = 0 while l1 != None or l2 != None: val1 = l1.val if l1 else 0 val2 = l2.val if l2 els...
d0d6f01267cd45bec8a44289fcb75e29935c0bc0
65d41c00466155d6cb290b555ca421113463e1a1
/src/twitter_analysis.py
817f35fe80d7ba386a156957cdee496b49f2d8e5
[]
no_license
MalakaGu/sentiment-cdn-election
257ba255ed8008de1d52cf71d9daaaddacdfbbe3
351532af71cc309c8c29bdfbe0f848bb6dc111ca
refs/heads/master
2022-08-22T03:34:10.986521
2020-03-26T20:05:42
2020-03-26T20:05:42
266,509,699
0
0
null
2020-05-24T09:34:16
2020-05-24T09:34:15
null
UTF-8
Python
false
false
6,996
py
twitter_analysis.py
import re import nltk import pandas as pd from textblob import TextBlob def lemmatize_with_postag(sentence): ''' https://www.machinelearningplus.com/nlp/lemmatization-examples-python/ ''' sent = TextBlob(sentence) tag_dict = {"J": 'a', "N": 'n', "V": 'v', ...
f86192927d57461abec909f1ecd6a762b429bbf8
2dc7068b717215b4c5d9b1e9f17991a32d211c91
/Python/TCP/demo2/client2.py
4568e79f95aeaf95544dc2ed56122c2dc3d942fe
[]
no_license
wugsh/socket
03186b6683f5e530a6e27ac447e1f2334e54ca6b
975df34c84f3da3e06634073d6097913e69b043d
refs/heads/master
2023-02-21T03:12:40.446481
2021-01-23T12:23:03
2021-01-23T12:23:03
331,864,467
0
0
null
null
null
null
UTF-8
Python
false
false
504
py
client2.py
import socket def main(): # 1. 创建tcp的套接字 tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # 2. 链接服务器 tcp_socket.connect(("127.0.0.1", 10000)) while True: # 3. 发送数据/接收数据 send_data = input("请输入要发送的数据:") if send_data == "exit": break tc...
968e23c640f2f33674be1b7653af3aa1b1be9f50
e2d52c641715f2675142c91aef30af23c6679cab
/hole_scripts/vtk_pore/create_channel_surface.py
dfc6e4d24da59d32000ddac466214cd8bbff0c9d
[]
no_license
ozyo/stb_proteinart
9baa9e3c2243395459e927bc82270007167fb3c5
915526cd023b048851f5720861353e5f9bcf9a29
refs/heads/master
2020-05-22T01:14:49.628189
2019-12-10T23:26:43
2019-12-10T23:26:43
31,619,525
0
1
null
2019-12-10T23:26:44
2015-03-03T20:26:05
HTML
UTF-8
Python
false
false
2,201
py
create_channel_surface.py
import vtk from draw_pdb import * #for now we read only one pdb file. Also we need to seperate the points and the radius data from an sph file. These are later stages not VTK issues. They will be fixed when volume rendering app is good enough. ##first we read the pdb file create everything. ### after pdb file ...
1aa0de23288ccdd58b0efb34a523f76eca8e4191
ff1d54c16569924d1af23fc6ed2eddc34f4b8c09
/2020/07/30.py
910083bafa486b00da33a86a8e3a6d135a2322a7
[ "MIT" ]
permissive
frankpiva/leetcode
e39efbcebd32532b8c4c39fdd82c70740e8acce4
85540af1fd72ad9e92c5a6ad253b1aaeec5065d9
refs/heads/master
2023-09-03T01:41:52.855106
2021-11-23T04:50:39
2021-11-23T04:50:39
273,632,717
0
0
null
null
null
null
UTF-8
Python
false
false
2,429
py
30.py
""" Word Break II Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences. Note: The same word in the dictionary may be reused multiple times in the segmentati...
0636a5808dd15c7a3fbaf129e355b1a8e794b298
2c82eba8cb0d05f8a264745016e3dc895eb1e911
/londonacademy_beginner/londonitacademy_exercise/3.0-Exercise.py
69aaba80bbece23e2cd7f35a7105417f2a0fb50c
[]
no_license
metalaarif/python-basic-apps
facd18a57dae8398625656b2d3e9c0948064387a
7457b795dcbb0f3c4423e8a21c0cdff87fdf7810
refs/heads/master
2020-04-09T23:24:59.185562
2018-12-24T18:50:59
2018-12-24T18:50:59
160,656,012
0
0
null
null
null
null
UTF-8
Python
false
false
252
py
3.0-Exercise.py
#!/usr/bin/python3 # London Academy of IT # Python Exercise 3 ''' Write Python code that displays the number from 1 to 5 as steps. for example: 1 2 3 4 5 ''' for x in range(1, 6): print("\t" * (x - 1), x)
1806ab88fa92ed77af9d116efa9138acfb14a185
b69724493c2714f0f0b613497d5d7ff236e62458
/backend/registration/views.py
91ea8fe9991d8b26a3c86720b7e25166a04be03b
[]
no_license
gian-hess/motion
ad7aa538dff94a8bb0dc4c14ec075985f4d87504
ff967c94fefdadd7bdf8b5b0e867fa256f97ba5c
refs/heads/master
2023-08-03T18:32:14.800085
2021-09-29T14:59:42
2021-09-29T14:59:42
411,703,589
0
0
null
null
null
null
UTF-8
Python
false
false
5,009
py
views.py
from django.contrib.auth import get_user_model from django.core.mail import send_mail from django.http import HttpResponse from rest_framework.generics import CreateAPIView, UpdateAPIView from rest_framework.response import Response from registration.models import Registration, code_generator from registration.seriali...
8e2a61d00ae293997dad91f87593df6e1b670646
c74c907a32da37d333096e08d2beebea7bea65e7
/kaikeba/RL_BOOK/Chapter12-Bandit/test.py
bf6f05b9c969803959074471ef4797371623a330
[]
no_license
wangqiang79/learn
6b37cc41140cc2200d928f3717cfc72357d10d54
e4b949a236fa52de0e199c69941bcbedd2c26897
refs/heads/master
2022-12-25T06:24:39.163061
2020-07-13T15:43:13
2020-07-13T15:43:13
231,796,188
2
2
null
2022-12-08T07:03:05
2020-01-04T16:45:33
Jupyter Notebook
UTF-8
Python
false
false
1,303
py
test.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/10/9 14:04 # @Author : liuyb # @Site : # @File : test.py # @Software: PyCharm # @Description: import matplotlib.pyplot as plt import seaborn as sns import slots # Test multiple strategies for the same bandit probabilities probs = [0.4, 0.9, 0.8] ...
4e15ee0f7aaad720f288798f1009e6652e77c98b
5e538363979d9e78f4442119609f6aefc15bc085
/ledger/urls.py
c2d635d82f8c837276e2595b3eea53f3c66a4e94
[]
no_license
sahiranas/crystalplazabooking
20e1d7b740ec2d5b5bd3a8badc9f34a1a2435d19
49ae9f61968491f4743f95fefb448891e84c7ad1
refs/heads/main
2023-06-30T09:42:23.879549
2021-08-07T12:06:30
2021-08-07T12:06:30
393,669,905
0
0
null
null
null
null
UTF-8
Python
false
false
291
py
urls.py
from django.contrib import admin from django.urls import path,include from ledger import views urlpatterns = [ path("",views.allreports,name='allreports'), path("<int:pk>/",views.detailreport,name='detailreport'), path("newreport/<int:pk>/",views.newreport,name="newreport") ]
c591b588b4ea36aea26c14e6f17164fb05db86b2
184bf12540e9f3dd26d26ad189a9e3a244a1994f
/main.py
b00776f69c1285001721e157899f85aa576394da
[]
no_license
Wildhammer/blumber
4f791d669fdb798892143d4201c11daf8b198b66
427cf4a906c53c574242eb8b7b1be77be564692b
refs/heads/master
2021-01-11T20:48:09.628434
2017-02-11T18:12:30
2017-02-11T18:12:30
79,186,989
0
0
null
null
null
null
UTF-8
Python
false
false
7,275
py
main.py
#paramiko must be installed beforehand import paramiko from scp import SCPClient import json from pprint import pprint import sys import datetime import calendar import random import os import subprocess from enum import Enum import re class mode(Enum): WRITE = 1 EDIT = 2 REMOVE = 3 # The default mode is WRITE cm...
07d3c67712973acb97ca2be721f24c62ce655923
f73ca5563e8900e1fb7b9f29c94e695402ecb051
/util/plot.py
9a1b5d008fc2bae4a4188914e261cf03936feafb
[]
no_license
IceBucketScience/analysis
ad5b29307da714827a7970e55328a34fa4dda295
d08d2951e8ed0cb75b67125cf9296552cf097565
refs/heads/master
2021-01-20T07:47:23.730105
2015-05-29T06:39:54
2015-05-29T06:39:54
35,286,765
0
0
null
null
null
null
UTF-8
Python
false
false
2,077
py
plot.py
import pandas as pd import numpy as np from math import floor from matplotlib.ticker import FuncFormatter def add_binary_jitter(data, x_col, y_col, amount=0.05): x_vals = data.loc[:, x_col] y_vals = data.loc[:, y_col].apply(lambda p: np.random.normal(p, amount)) return pd.concat([x_vals, y_vals], axis=1) ...
0854b338781c9884bba0792427e9c1cd51e23799
b8069ffd711fc7169d3040805637ada7a02fa3fb
/completed/leetcode-Searcha2DMatrixII.py
790dab1fe23e58f9022acd10c8d20bba222913d2
[]
no_license
aaronchu415/LeetCode
afcd1186f066d64e14e5276e589dd0f1d79227ed
cb8d2d13cb3318ae623db2bd3548e37e8400016c
refs/heads/master
2020-04-13T09:35:57.576275
2019-09-09T23:42:13
2019-09-09T23:42:13
163,115,690
2
2
null
null
null
null
UTF-8
Python
false
false
954
py
leetcode-Searcha2DMatrixII.py
# // _NAME: Search a 2D Matrix II # // _LINK: https://leetcode.com/problems/search-a-2d-matrix-ii/ # // _CATEGORY: 2d Array class Solution: def searchMatrix(self, matrix, target): """ :type matrix: List[List[int]] :type target: int :rtype: bool """ if len(matrix) =...
4c159ab5cd5c8af607c434581f349e276ccd7258
41c300db613e2b7ecda5eac2e862e04909bbf681
/cloud_deploy_system/usweb/models.py
8ac5d27ce60aec0bd6018f37f7cce3742e11aa39
[ "MIT" ]
permissive
shalk/update_system_web
55861482fe8027044aa44092a4aa1c9e79e2f65c
7568ffbfd277b0d25438a2d09364caf4a5b68102
refs/heads/master
2021-01-23T17:04:40.224003
2016-10-09T06:06:02
2016-10-09T06:06:02
68,667,621
0
0
null
null
null
null
UTF-8
Python
false
false
913
py
models.py
#!/usr/bin/env python #-*- coding: utf-8 -*- """ File Name: models.py Author: shalk Mail: shalk@qq.com Created Time: 2016-10-09 09:58:27 Description: """ from django.db import models class AnsibleAdHoc(models.Model): name = models.CharField(max_length=50) host_pattern = models.CharField(max_length=100) ...
953a8d40ab41906dc4c136b8ed012cc9bd951b32
2887ae998a3f136814d6d98278570e14a31e0a92
/all files in folders.py
6a8478aeb8a89342d3879f4ffc7281aa1b704dd6
[]
no_license
sashnat/essential-temp
d7dbd847579bc6b66b323da6893195f64390a43d
a476c949f38357807580cf17f317cb40dae07fbf
refs/heads/master
2021-06-03T20:35:38.012102
2021-02-13T09:41:27
2021-02-13T09:41:27
79,732,965
0
0
null
null
null
null
UTF-8
Python
false
false
1,036
py
all files in folders.py
import os tree = os.walk('Z:\Python') print(tree) pdir = 'Z:\Python' contdir = [] for i in os.walk(pdir): contdir.append(i) for i in contdir: print (i) for d, dirs, files in os.walk('Z:\Python'): for f in files: print (f) '''Для получения полных адресов подойдет функция os.path.j...
65bd6cbc3e069d4945329a103ff0c7b9de92321b
2097cb7a59fe8a4b94cc750dff9a5ea1694fd7f8
/bh_3_tasks-Sherlat_ready/tasks/list_tuple/sort_list.py
7590cdd65c97c70387e4426a690462265af8ae7c
[]
no_license
Slavik0041/BelHard_education
fde9968eb74eb74cff9aea36c62cc2e37803dd4d
1d547a6de72701e702256fa2fb27c7885e6518b1
refs/heads/main
2023-04-07T17:58:58.774606
2021-04-05T22:04:43
2021-04-05T22:04:43
342,808,616
1
0
null
null
null
null
UTF-8
Python
false
false
700
py
sort_list.py
""" ЗАДАНИЕ -------------------------------------------------------------------------------- Написать функцию, которая вернет 2 списка, один отсортированные по возрастанию, а второй по убыванию """ from copy import deepcopy def sort_list(collection: list) -> tuple: asc_sort = deepcopy(collection) desc_sort = ...
a3bac419a6263cc0b0a1d6a772b79efd4bb312ab
6da4f1b2ea4bb292b93a8fbfa3153a82baeff594
/generatorexpression.py
aa5218e82c211d98d14848f5fa483b007a8786b5
[]
no_license
Ssawalha/W1D3-Assignments
dc92188862d82a00466a5756fb439b58d0e7635b
700f84359b8637a91517cf07349e499ff3d26f19
refs/heads/master
2020-06-20T06:31:11.102363
2019-07-15T15:38:50
2019-07-15T15:38:50
197,026,726
1
0
null
null
null
null
UTF-8
Python
false
false
451
py
generatorexpression.py
# use a generator expression where you would use a list comprehension but # do not need to store the list beyond its immediate usage max([2*i for i in range(100)]) # this uses extra memory to create the list object max(2*i for i in range(100)) # transforms the values in range one by one to create a sequence for ma...
7d0edbfe2b5f29311c059a19ec1ad878a13600d2
5743e3ae83a88978b5c200e945d84e40ba16c536
/proto/collector/collector_pb2.py
49f8166fa548c562673988a5bcb8db346169145c
[ "Apache-2.0" ]
permissive
hyposcaler/gnmi
1fdba692912561a10049bfe3b0f9bca49d7795b7
d5360e33fc3b22effeaaaf55f345c1f950765bed
refs/heads/master
2023-04-10T21:58:34.517142
2023-01-27T01:00:55
2023-01-27T01:00:57
263,472,927
0
0
Apache-2.0
2020-05-12T23:10:21
2020-05-12T23:10:20
null
UTF-8
Python
false
true
1,985
py
collector_pb2.py
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/collector/collector.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as ...
e44140eec1653d3d5cf16e5dfc9e658c21d2a01a
b18edbe25e517d89f39371ef224047bdd59fb392
/python/сокеты/ZMQ с очередями/Zmq/messaging_pattern/pair/server.py
98f8d39d36add76ede31cf221336292af66c1d86
[]
no_license
telminov/my_notes_for_various-_programlanguages
57decaaffe73fcb126e48d0e133fd46c4fd23e2f
c764b142f08b8fed4cbbff71294db2b64b0e91b3
refs/heads/master
2021-01-21T00:59:55.157355
2016-05-14T21:00:31
2016-05-14T21:00:31
null
0
0
null
null
null
null
UTF-8
Python
false
false
397
py
server.py
import zmq import random import sys import time port = "5556" context = zmq.Context() socket = context.socket(zmq.PAIR) socket.bind("tcp://*:%s" % port) # bind = "tcp://{0}:{1}".format('localhost', port) # socket.bind(bind) while True: # socket.send_string("Server message to client3") # send msg...
a037b8dda0b025bee676f9e55d4810f720875d9a
a7d6807af3b8b67d0ac93b014d9a688d8d612539
/algoexpert/11-dynamic-programming/min_number_coins_change.py
aa78e2a720a6ec92ef7b0e0f488837ef5bbeba84
[]
no_license
shehryarbajwa/Algorithms--Datastructures
06a9f86bedbf40909011365cf169d5c77791b643
cbd456e0db9ea6a542926015aeee4bd2ceff9ff9
refs/heads/master
2023-04-11T21:00:17.438588
2021-05-11T23:19:05
2021-05-11T23:19:05
193,496,161
0
0
null
null
null
null
UTF-8
Python
false
false
513
py
min_number_coins_change.py
#Time Complexity O(nd) #Space Complexity O(n) def min_number_coins_change(n,denoms): min_ways_to_make_change = [float('inf') for amount in range(n + 1)] min_ways_to_make_change[0] = 0 for denom in denoms: for amount in range(n + 1): if denom <= amount: min_ways_to_make_...
80658affe3a9437b7a0c7550babf68ec99cf95c2
1db2e2238b4ef9c1b6ca3b99508693ee254d6904
/develop/PerAA_analysis_for_jupyternotebooks/AA_analysis_enevolv.py
6a1d7d38d7e36a3e5f71e0b5ba5fb45bac2482fc
[]
no_license
pgreisen/pythonscripts
8674e08095f76edf08ef2059300349218079724c
0aadf8f96d19b306c1bc44a772e766a06fe3408b
refs/heads/master
2021-07-06T23:54:57.774342
2021-06-08T19:36:36
2021-06-08T19:36:36
22,017,192
3
0
null
null
null
null
UTF-8
Python
false
false
5,407
py
AA_analysis_enevolv.py
import pandas as pd import numpy as np from scipy.stats.mstats import gmean import plotly from plotly.graph_objs import Scatter, Layout import plotly import plotly.offline as offline import plotly.graph_objs as go import plotly.plotly as py import plotly.figure_factory as ff from datetime import date class AA_analysis...
09a47072620b05195e0802ce1c2b36a944ee93d4
4a2544b024acd86a09d550c72e2820e496dff2fd
/tests/test_find_closest.py
db126be4a42abe470cf206efc698136e8c6e1037
[]
no_license
sylvaus/project_stop_finder
e6268bc7c4b344d670b8702f0b21d863e1ae2b11
7ece537adf51393197181e9222d78a5497ba361e
refs/heads/master
2020-09-10T19:23:48.813560
2020-01-09T17:14:35
2020-01-09T17:14:35
221,813,291
0
0
null
2020-01-09T17:14:37
2019-11-15T00:45:08
Python
UTF-8
Python
false
false
894
py
test_find_closest.py
import pytest from finders.find_closest import find_closest_stop from finders.gps import GPSPosition from finders.stops import Stop SAMPLE_STOPS = [ Stop("location_sw", GPSPosition(-10, -10)) , Stop("location_se", GPSPosition(10, -10)) , Stop("location_ne", GPSPosition(10, 10)) , Stop("location_nw", G...
6081411c028316230ca760c05650ea711a44dea0
69975c7def4ae23b6495af97a39c19b91419ce03
/BTFriendswNodes.py
ad5e3f3fa21810b4826ff40fa2a07f30663bb9ae
[]
no_license
jlshowngoshen/Datastructures
61db2b678482cd0f4b359fca2306ddd92ea08666
09686235532a0499d46540e404462ba8f52f2dd2
refs/heads/master
2020-09-15T13:09:31.056887
2019-11-26T20:09:58
2019-11-26T20:09:58
223,454,919
0
0
null
null
null
null
UTF-8
Python
false
false
1,755
py
BTFriendswNodes.py
# A binary tree node class Node: # Constructor to create a new node def __init__(self, data, payload): self.data = data self.payload = payload self.left = None self.right = None def __repr__(self): return str(self.data) # Recursive function to check if two given binary trees are identical or not def isI...
a6f185ef2a0ebe985f4f141d799f042a79d4d5a3
d66fef4839e1b024164030e50b7bfe454a6b84b3
/addons/po_persian_calendar/models/HttpExtensions.py
7bd0e5b6d899adf5fbb062b5a9a10eff1064cad8
[ "Apache-2.0" ]
permissive
farvashani/parOdoo
45bf0c446e17fc123e576f596dc4e785455759f9
8c6f67848e0689b76fb780feca08d819fd3c1847
refs/heads/master
2023-04-20T17:38:46.875613
2021-04-26T16:48:24
2021-04-26T16:48:24
null
0
0
null
null
null
null
UTF-8
Python
false
false
776
py
HttpExtensions.py
from ..globals import models, Http class HttpExtensions(Http): _inherit = 'ir.http' def session_info(self): result = super(HttpExtensions, self).session_info() if result and result.get("user_context",False): user_context = result.get("user_context") user = self...
bab677a6c7dd6ac682f29148626db4bd695ee3b8
6d0b5559fe8e8c80ebe87dbca35658931ca40666
/Semester 3/NoSQL DataBases/3/Homework3.py
6487815689b677618eac5abc351f1cfa64c1286d
[]
no_license
sataheri/Projects
83040c17583f8dfb4bffe06f3deef916aed87cad
453c94b6e90fff0794cb28cb96c0e940e65eae31
refs/heads/master
2020-04-26T16:20:28.601475
2019-07-15T22:11:10
2019-07-15T22:11:10
173,675,128
0
1
null
null
null
null
UTF-8
Python
false
false
2,605
py
Homework3.py
from pymongo import MongoClient, ASCENDING, DESCENDING import pprint host = 'ec2-54-67-15-68.us-west-1.compute.amazonaws.com' client = MongoClient(host, 9210) db = client.nosql # db.create_collection('population_Ali') #defining a new collection population_Ali.delete_many({}) #Removing all existed documents in po...
18bc8a8b1cbb544cfbe581e32ee5e509d67beafd
34e3b2211bdd3bedba4e8ae9b01e237acca52ec5
/__main__.py
68507b8dfe80322b921042c92f410bb5b0e8ec92
[]
no_license
alexandre-k/simplessh
3b7eef35734c398b575de4ca71d0f6bdd2ef1bc1
2b3ddf7d1a58629833cc0ffdee7a01b340f75319
refs/heads/master
2020-03-27T03:44:41.231664
2016-07-28T02:12:44
2016-07-28T02:12:44
64,389,037
0
0
null
null
null
null
UTF-8
Python
false
false
748
py
__main__.py
from connection import Machine from credentials import get_credentials targets = ['45.32.13.245'] #targets = ['localhost'] input_file = 'cmd' def main(): global targets username, password = get_credentials('laozi') remote_host = Machine(username, password) for target in targets: remote_host.co...
7701a98d836dc9551a4e2eb4b7d9c10307b3f665
e4f8b14cead542586a96bcaa75993b0a29b3c3d0
/pyNastran/bdf/dev_vectorized/cards/nonlinear/nlparm.py
e2fa4fb1ad955fd5daab5c6f545ff174d92e9d81
[]
no_license
afcarl/cyNastran
f1d1ef5f1f7cb05f435eac53b05ff6a0cc95c19b
356ee55dd08fdc9880c5ffba47265125cba855c4
refs/heads/master
2020-03-26T02:09:00.350237
2014-08-07T00:00:29
2014-08-07T00:00:29
144,398,645
1
0
null
2018-08-11T15:56:50
2018-08-11T15:56:50
null
UTF-8
Python
false
false
4,424
py
nlparm.py
from pyNastran.bdf.fieldWriter import print_card from pyNastran.bdf.bdfInterface.assign_type import (integer, integer_or_blank, double_or_blank, string_or_blank) class NLPARM(object): """ Defines a set of parameters for nonlinear static analysis iteration strategy. +--------+--------+------+-----...
456d79a69c170a59af742648f16e0171cd5a2412
97eb0a986191976ad5db3eb63d69c7bbbe1f1b8e
/genmedia.py
45ac7edde26ae321431add36549a56e84e4a3d99
[]
no_license
semeniuta/CarND-LaneLines-P1
e85771d74ee4fde68652d65de83cc827c305a609
a48c6fa684c4b4d990e53fef53b49ef0c9ed7061
refs/heads/master
2021-05-06T04:16:15.275371
2018-01-07T21:23:22
2018-01-07T21:23:22
114,926,974
0
0
null
2017-12-20T20:11:37
2017-12-20T20:11:37
null
UTF-8
Python
false
false
2,646
py
genmedia.py
''' Generate the output images and videos, including rendering of the pipeline ''' import os import matplotlib.image as mpimg import cv2 from moviepy.editor import VideoFileClip from networkx.drawing.nx_agraph import to_agraph import lanespipeline import lanefinder from compgraph import CompGraph, CompGraphRunner C...
86b24ddaae0d3477a3f82295224b7e84805eed91
13edccdb425fc5780b9b826386707fd3cb1b1145
/tools/abel/tests/authenticator_test.py
60fa2da0e6abf0105a53b4388533a9a7c949f220
[ "Apache-2.0" ]
permissive
google/digitalbuildings
5603bb958446d38e37075e9a14f89182a8e805fe
0ffe5b61769143826142da4bada3c712b1fd0222
refs/heads/master
2023-09-03T20:03:37.081139
2023-09-01T17:41:58
2023-09-01T17:41:58
240,568,500
319
132
Apache-2.0
2023-09-14T21:00:20
2020-02-14T17:57:23
Python
UTF-8
Python
false
false
1,121
py
authenticator_test.py
# Copyright 2023 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
8c05259ce577e6b6a6efdf778832e9bb817e47fd
561eb147f5da67ba60a50fc579292c6a84c2f866
/PassionsHacked/Assemblage/migrations/0003_auto_20161014_2137.py
db28cf823fcde455baf4e8c4ebb334dcb6a26132
[]
no_license
ValentinMoullet/PassionsHacked
bf8757303ac47052619f4baf20f2f39b4f361b24
f14ffa2cd00f693b300b4478c7dc5dd9026aa759
refs/heads/master
2021-01-11T02:54:01.212678
2016-10-15T12:18:58
2016-10-15T12:18:58
70,885,751
0
0
null
null
null
null
UTF-8
Python
false
false
1,206
py
0003_auto_20161014_2137.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-14 19:37 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
5fdcbccb99880da79eb0efbdecd328ca1cf73d7f
32862fd2d905008099629d56d0650427580d04f2
/setup_guide/tests/test_models.py
93da802bf51913e46610ea5ac243b9eab339a84c
[ "MIT" ]
permissive
stuaxo/invest
9bc046dc31b9a9675e81f933868f03d2999a99cd
15b84c511839b46e81608fca9762d2df3f6df16c
refs/heads/master
2020-04-17T06:47:50.932462
2018-07-05T15:45:12
2018-07-05T15:45:12
null
0
0
null
null
null
null
UTF-8
Python
false
false
693
py
test_models.py
from wagtail.tests.utils import WagtailPageTests from setup_guide.models import SetupGuideLandingPage, SetupGuidePage from home.models import HomePage class SetupGuideLandingPageTests(WagtailPageTests): def test_can_create_under_homepage(self): self.assertCanCreateAt(HomePage, SetupGuideLandingPage) ...
678189ac5b0105c90178647843335f9d4402dc66
0fba3f4dc62a352785c015e66f2b4612abe06845
/ControlEverything_Methane_Ozone/Ozone/ADC121C_MQ131.py
f98208c0a4e7c80616d2bc3a6537fcaa5cba2c25
[]
no_license
WesternHAB/HABcode
e86015c70a48e63cf189383056a9e0902dfeae6a
aa9c1765969bc7f8e858d5a4af0bc10137c6aca2
refs/heads/master
2020-04-24T16:59:52.413807
2018-05-29T12:35:05
2018-05-29T12:35:05
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,192
py
ADC121C_MQ131.py
#!/usr/bin/python3 # Distributed with a free-will license. # Use it any way you want, profit or free, provided it fits in the licenses of its associated works. # ADC121C_MQ131 # This code is designed to work with the ADC121C_I2CGAS_MQ131 I2C Mini Module available from ControlEverything.com. # https://www.controleveryth...
f2056ff46ce6e38c3b6ca553bbdec7f59d60b198
8246ab295e695b6ec0b2e762e328510666bd7bc1
/ejpy/ejElenaPY/28_hoja-VI-5_nota-ponderada-60-40.py
6b03247aacc9e443c8bb6798ae1c5ecc34bbda7a
[]
no_license
vtsartas/ejpython
56e486010c6782268d593afe4e3b11887aab79c6
55df653829d049e9fe1337b53696b63b6fd34861
refs/heads/master
2020-11-27T10:36:40.300424
2020-01-10T12:51:24
2020-01-10T12:51:24
229,406,472
0
0
null
null
null
null
UTF-8
Python
false
false
716
py
28_hoja-VI-5_nota-ponderada-60-40.py
# Ejercicio 28 - Hoja VI (5) - Indicar la nota ponderada según el criterio dado # (parte teórica 60%, práctica 40%) de cada uno de un número determinado de alumnos numalumnos=int(input("Introduce el número total de alumnos:\n")) print("Usa el punto '.' para los decimales") for contador in range(1,numalumnos+1): ...
a52cbe6dbf4b4fc82d09e5f34e6e135933f3af38
1a5493ea3ab3057a9166fa032889bbb4b2e820ae
/generator.py
d6e5621fc1497980469b29d33486b84a786fb249
[]
no_license
EthanKnight/converter-project
3f38078cfd287a60f7e416bf46185f3af669d3bf
db6bba652406d6151f61d7c43af170c20d023d90
refs/heads/master
2020-04-07T01:02:33.088616
2018-11-17T00:27:19
2018-11-17T00:27:19
157,928,495
0
0
null
null
null
null
UTF-8
Python
false
false
873
py
generator.py
#!/usr/bin/python3 ''' generator.py This program inputs a strings, and outputs the corresponding hex Creator: Ethan Knight Email: ethantknight@gmail.com Published: 20181116 ''' import sys import time import binascii def main(): print("\n", sys.version_info) try: while True: ...
67516551b595c02e70a0ba4005df8a97ba71b17e
73fe6bc67b6a567ee5afd0318055adb7a35131fb
/week2_algorithmic_warmup/1_fibonacci_number/fibonacci_1.py
008a16721e2e6377db2c518ecaa16dbc2765f487
[]
no_license
prateethvnayak/algos
40af7e8859d75bd2173a77ab3d8abe6a45374b5c
c9863adad5dc86ed684b0ba888a820e0b479ff4a
refs/heads/master
2020-03-20T20:37:54.675855
2018-10-12T23:31:02
2018-10-12T23:31:02
137,697,785
0
0
null
null
null
null
UTF-8
Python
false
false
270
py
fibonacci_1.py
# Uses python3 import numpy as np def fibonaci(n): if n <= 1: return n F = np.empty(shape=(n + 1)) F[0] = 0 F[1] = 1 for i in range(2, len(F)): F[i] = F[i - 1] + F[i - 2] return F[n] n = int(input()) print(int(fibonaci(n)))
96656e479989b7b612f983da94dc141927190e95
61df7d015ebdee4d0b16338e040aa08d3c9b9c5f
/main/s3.py
3214cb283e675a66498665112aaa97c47eb2b677
[ "MIT" ]
permissive
namphongpt/tator
95524823a1e92feefcf7f44b65d5ca88029620e5
0ca5ca588b86303ba8c23ba0717bc23bb0e9f097
refs/heads/master
2023-03-21T22:00:02.915690
2021-03-08T22:44:21
2021-03-08T22:44:21
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,656
py
s3.py
import os from urllib.parse import urlsplit, urlunsplit import boto3 class TatorS3: """Interface for object storage. """ @classmethod def setup_s3(cls): endpoint = os.getenv('OBJECT_STORAGE_HOST') region = os.getenv('OBJECT_STORAGE_REGION_NAME') access_key = os.getenv('OBJECT_S...
6deacb86b4f1000b56c98aec81ec6831cc7d4de2
b95b5fd69a5f682576f7a6777649bb4ef61485fc
/webpy/my_bookmarks/urls.py
b2f19ae6d736c51527c54a611e0f19e71ef83a21
[]
no_license
nostradamnit/shootout
6b2d056d1b36f1d0d86b1856a7e1edd672686ea6
0a8016393cda62114b7ba8219028cb3d64092d33
refs/heads/master
2020-06-07T03:09:32.037856
2012-12-01T13:34:01
2012-12-01T13:34:01
null
0
0
null
null
null
null
UTF-8
Python
false
false
188
py
urls.py
urls = ( '/', 'views.index', '/my_bookmarks', 'views.my_bookmarks', '/my_bookmarks/add', 'views.add_bookmark', '/register', 'views.register', '/login', 'views.login' )
5273c15ab166276b288104da663a44d0a4ce4905
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03723/s696994833.py
3dde1951c1bacd64c47cc66b2bc94d9a87d451ad
[]
no_license
Aasthaengg/IBMdataset
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
refs/heads/main
2023-04-22T10:22:44.763102
2021-05-13T17:27:22
2021-05-13T17:27:22
367,112,348
0
0
null
null
null
null
UTF-8
Python
false
false
326
py
s696994833.py
a, b, c = map(int, input().split()) if a == b == c and a % 2 == 0: print(-1) else: cnt = 0 while True: if a % 2 == 1 or b % 2 == 1 or c % 2 == 1: break _a = (b+c)//2 _b = (c+a)//2 _c = (a+b)//2 a = _a b = _b c = _c cnt += 1 prin...
969a8a3e85dcd821bf0d1ee81542fc6fe5e69cd9
dbe6e3af88be4f6c7c04986bbfc94bffc0c9b0e2
/GreedyDiff_GreedyRadio.py
a04adac1d24370fb389ea9422d31f287bf8c136e
[]
no_license
Bogdankozlovskiy/standart_algorithmes
489967e41bd38851c609a0adfd3c93bbf9a53114
8e54358f220f1b498e5b18363dab0a54f7105c99
refs/heads/master
2022-11-08T13:01:55.686247
2020-06-23T09:52:36
2020-06-23T09:52:36
268,085,692
0
0
null
null
null
null
UTF-8
Python
false
false
756
py
GreedyDiff_GreedyRadio.py
def get_cost(t): time = 0 score = 0 for i in t: time += i[1] score += time * i[0] return score def GreedyDiff(t): return sorted(t, key=lambda item: -(item[0] - item[1])) def GreedyRatio(t): return sorted(t, key=lambda item: -(item[0] / item[1])) def main(): tasks = [(1,...
a04db6136efc137d96304778e439691ba37f8a7c
7c09247d1625d2a048ddc0e686360612d6bd34e6
/semcollect/injector.py
ccd294dae1ceb4f62daf307bab7cd276aafc0ab9
[]
no_license
udoprog/semantic-collector
e3ff0958013ede70aadaeae1d8e93c0fa0515109
9f73c2bb6b7f57c25cd9a9c3170f8ed8cd50b06f
refs/heads/master
2023-06-19T22:43:53.558275
2015-02-14T17:00:22
2015-02-14T17:02:11
30,802,154
0
0
null
null
null
null
UTF-8
Python
false
false
1,325
py
injector.py
class Injector(object): """ Injector framework. Provides a hierarchy of named types that can be required. """ def __init__(self, components, parent=None): self._components = components self._parent = parent self._children = list() def require(self, name): c = se...
3eed4106abe68cbad6f225fe476e35054bb31a1f
c7b0b67d3cd539fbf2cb8c9adc1a317d9d86d556
/Python_Batch_Nov_2019/7. Datetime (Naive and Aware)/datetime_exercise.py
19c34cbfc7ee8eb10c2912c7167347f2f783a98a
[]
no_license
priyank-py/GettingStarted
9636bebb66b14c109fa2e8015ddd62033e0d1627
df07a53f84e854a5762aef816de8eaa5aed1cb0b
refs/heads/master
2020-05-23T22:37:11.949297
2019-12-18T10:52:44
2019-12-18T10:52:44
186,977,603
0
2
null
null
null
null
UTF-8
Python
false
false
359
py
datetime_exercise.py
##12th Nov 2019 ## ##12 days import datetime user_date = input('Enter the date: ') user_date_obj = datetime.datetime.strptime(user_date, '%dth %b %Y') month = user_date_obj.month year = user_date_obj.year start_month = datetime.datetime(year, month, 1) ##start_date = user_date_obj.replace(day=1) pri...
b55705094f312acc822f1a21ffd2bd9642f03858
753a70bc416e8dced2853f278b08ef60cdb3c768
/models/research/ptn/model_voxel_generation.py
0c8fc84669a7fccc0f3a33ecb4c847162d99521e
[ "MIT", "LicenseRef-scancode-proprietary-license", "Apache-2.0" ]
permissive
finnickniu/tensorflow_object_detection_tflite
ef94158e5350613590641880cb3c1062f7dd0efb
a115d918f6894a69586174653172be0b5d1de952
refs/heads/master
2023-04-06T04:59:24.985923
2022-09-20T16:29:08
2022-09-20T16:29:08
230,891,552
60
19
MIT
2023-03-25T00:31:18
2019-12-30T09:58:41
C++
UTF-8
Python
false
false
7,290
py
model_voxel_generation.py
# Copyright 2017 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
ae66e81129ef53e369b92e585c1b955ea5dc9a76
0411b9d321170a5a03448174da09f158532668c5
/predictor/local_persist.py
24c346b70959e32526492766caf8d54521be4ad7
[]
no_license
sportnumerics/predict
cc78ca5935066b30c608605b41b3103af4551975
f18fc629201b80a5e57319b3021445676127fe7e
refs/heads/master
2023-02-09T07:41:20.952105
2023-01-31T03:06:59
2023-01-31T03:06:59
81,633,381
2
0
null
2022-12-08T03:13:03
2017-02-11T05:39:30
Python
UTF-8
Python
false
false
260
py
local_persist.py
import json import os def write(key, obj): filename = os.path.join('output', key) if not os.path.exists(os.path.dirname(filename)): os.makedirs(os.path.dirname(filename)) with open(filename, 'w') as f: json.dump(obj, f, indent=2)
3ad94db1ff16b8fd4fa306d5a8d087d23534cc83
95f451b86782426c40e71f8096bf0d2c5341a59d
/semantic/semantic/wsgi.py
7b0e66ab2b4034011c27cee057de94070efa7baf
[ "MIT" ]
permissive
wushicanASL/semantic-search-system
0e30e81c6006ae54426d835109441f9580918d45
96b6581f191aacb1157b1408b2726e317ddc2c49
refs/heads/main
2023-06-01T16:37:23.757508
2021-06-24T00:07:45
2021-06-24T00:07:45
null
0
0
null
null
null
null
UTF-8
Python
false
false
108
py
wsgi.py
from semantic.logging import logger_setup from semantic.server import app logger_setup() application = app
586d319103333fa391f9222bf5cae882e42f214b
d31c1cbcf073d2f0b3cf3ec259c99fbb0bfd5dc1
/SeleniumWorker.py
c9183f80e02283d5ee8128d838a6b45fc21cf078
[]
no_license
zhuzemin/task_crowdsourcing_automation
dfeac320fa003bf866d1a4329d715b7727914f87
8e2c4c54e68f7ee680863fd83aae207a7b779b5c
refs/heads/master
2022-11-14T04:58:00.928441
2020-07-01T06:29:24
2020-07-01T06:29:24
276,283,348
1
0
null
null
null
null
UTF-8
Python
false
false
2,146
py
SeleniumWorker.py
from selenium import webdriver from PyQt5.QtCore import pyqtSignal, QThread from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions from selenium.webdriver.common.by import By DEBUG = True def debug(s): if DEBUG: print(s ) class SeleniumWorker(QTh...
93c5fbdee52f8a8b338653e351c9be25f6cafd88
6af9266b6d8185c19667c6b76c514501ba794700
/mc/mcdemo_placeBlocks.py
340f3cac97aa1717ba9df29047a27cf6ca3b4219
[]
no_license
mhoover0413/mehpythondocs
f30e65e361e6cf0d333dea19e1af041f858199bf
0737f9ac92b53d560951e7579a2a55dddba4c35d
refs/heads/main
2023-08-05T18:51:07.571159
2021-10-12T18:46:20
2021-10-12T18:46:20
408,454,041
0
0
null
null
null
null
UTF-8
Python
false
false
1,485
py
mcdemo_placeBlocks.py
#Macarios Hoover # Place a house with a button from mcpi.minecraft import Minecraft mc = Minecraft.create() #Use a module for requesting data online import requests #Use a module to control time import time #Setup for buttons and leds import RPi.GPIO as GPIO # Import Raspberry Pi GPIO library GPIO.setwarnings(False...
146802fc22435e95f3fcd33ea9330b95ef9c2e91
bfbefe503546698080a2d873f4752db022e03223
/Player/Test_Player.py
e0dd57111435d7394367a1c4a9e01960e10c068e
[ "MIT" ]
permissive
mprego/NBA
ed3a0ff79f273440ff1c71e8b204faa9b8da0ef7
6b065f0bafb72da2a9a8e4e01304e0097e6dfd77
refs/heads/master
2021-01-21T04:44:21.316884
2016-07-18T13:53:27
2016-07-18T13:53:27
49,378,918
0
0
null
null
null
null
UTF-8
Python
false
false
1,689
py
Test_Player.py
from unittest import TestCase from Player import Player from Players import Players import pandas as pd class Test_Player(TestCase): # def test_desc(self): # player = Player(f_name='Lebron', l_name='James', season='2015-16') # weight = player.desc.iloc[0]['WEIGHT'] # exp_weight = 250 #...
912c26a9fd50f1459886db4f099f7ad86bf0c18d
be456f67e7aa051dc6978063ae132689175af494
/google/cloud/servicedirectory_v1/services/registration_service/client.py
222f54263b762f5ed862876108f65f765ee87ee7
[ "Apache-2.0" ]
permissive
renovate-bot/python-service-directory
e91b6c2a2d54ac67a9ce6d464d5e821e976a8a21
ff323c3b3cbb312e1938b2bd640ea4e3122a8cdc
refs/heads/master
2023-06-07T13:52:13.955094
2021-08-31T00:06:17
2021-08-31T00:06:17
247,166,680
1
0
null
2020-03-13T21:46:04
2020-03-13T21:46:04
null
UTF-8
Python
false
false
83,729
py
client.py
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
23b93ac1ecec19c1936a41dc24a243f542c293a5
630d946a9c2cf87bd25668ac0b33085469a2e370
/impactlab/grantServer.py
9bcf8a6ec16db0333fb12336faf2c543f0a17260
[]
no_license
impactlab/foundationcenter
c721a273cc2788d11e39ca8142b107d26cb4de5a
4d1b19a59c02b30af42f9cc831443ab4604f363c
refs/heads/master
2022-08-20T17:05:49.727378
2015-03-25T18:52:44
2015-03-25T18:52:44
25,390,072
2
0
null
2022-07-06T19:59:49
2014-10-18T06:57:51
Python
UTF-8
Python
false
false
12,167
py
grantServer.py
from flask import Flask, request, current_app, jsonify from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy import create_engine import datetime, os import simplejson as json import threading, Queue import numpy as np import multiprocessing as mp import grantClassifier #Parameters DATABASE_URI = 'mssql+pyms...
c369fc3bc9eb5b6e368e298b3e2a682c8d0701d3
cc2da67a501b0ebfafd5c5dc9e554d119bde5212
/count-luck.py
2b19bb84ddcbf4f776add731907b1e6663c8e387
[]
no_license
bhanukarthik/pythonCode
ecbd30ff501db4b3a3a342f05847e3d490544bbc
e66622382ab34fc95a57628dffcd3872cc1090f0
refs/heads/master
2021-01-14T19:30:44.083406
2016-04-12T05:58:19
2016-04-12T05:58:19
37,643,750
0
0
null
null
null
null
UTF-8
Python
false
false
1,911
py
count-luck.py
def dfs(graph,b,e): out=0 discoverd=[] stack=[] stack.append(b) while e not in discoverd and len(stack)!=0: v=stack.pop() if v not in discoverd: discoverd.append(v) if e in discoverd: break if v in graph: if len(list...
a5fac16dc9fd9c73e84b52a7e3d33d60e071a46f
e5b57f00275a14406c488ff4d973ea69ca216c10
/Edge Detection/Edge_sobel.py
60c6d2265f92a59ecb0fa60a8dacda87fb6aa217
[]
no_license
MaitriDA/SRA_Image_Processing
1899b59261ce987e3daae024916be4ba88b12329
8b6f9802a37105d541f2067a60f37340e4370cc2
refs/heads/master
2022-12-13T17:47:20.053271
2020-09-16T09:05:11
2020-09-16T09:05:11
295,135,431
1
0
null
null
null
null
UTF-8
Python
false
false
864
py
Edge_sobel.py
import numpy as np import matplotlib.pyplot as plt vertical_f=[[-1,-2,-1],[0,0,0],[1,2,1]] horizontal_f=[[-1,0,1],[-2,0,2],[-1,0,1]] #img = plt.imread('Cube.jpg') img = plt.imread('Dog.png') n,m,d = img.shape edges_img = img.copy() for row in range(3, n-2): for col in range(3, m-2): ...
adfe51bb827fb12145b7abfbb640df182a543732
8aa2ac69ab439bbb20865fe129785a19b22122c6
/OpenCV.py
1fbbfb31e5ab85228a7d3a657f1e263a59752e10
[]
no_license
alwynster/opencv-stereo
7bdb4afadc518cd97183539be947179230ee5d54
0fbf6d70e2338c17cf9da91aa41c61e1c230ddb8
refs/heads/master
2021-01-01T03:55:32.217601
2014-12-04T15:54:13
2014-12-04T15:54:13
56,858,711
0
0
null
null
null
null
UTF-8
Python
false
false
1,848
py
OpenCV.py
import cv2 import numpy as np import subprocess import matplotlib.pyplot as pp # from timer import timer __library__ = 'tsukuba' def calculate_disp(min_frame, max_frame, algs): block = 5 base = __library__ + "/" digits = 5 if __library__ == 'tsukuba': form = "tsukuba_daylight_%s_%05d" elif ...
6a64a270bf1e9808368e2f19944ca4c9c6c052c5
f532044fc6336a772f1a557d1447e5c7c6b8c7c8
/keras_retinanet/callbacks/common.py
acde1dd18a10256798a0a96fdf11b09745d6352d
[ "Apache-2.0" ]
permissive
nikostsagk/Apple-detection
4248d3a63b7c7c816af4aee7db46949ccf4e0eb7
2cd4e7a802c914cb2b04bb33325c368126898055
refs/heads/master
2020-06-15T19:27:54.374128
2019-11-14T15:24:48
2019-11-14T15:24:48
195,374,503
17
7
null
null
null
null
UTF-8
Python
false
false
3,145
py
common.py
import keras.callbacks import numpy as np def default_lr_scheduler( base_lr = 1e-5, steps = np.array([15, 25]) ): def default_lr_scheduler_(epoch, lr): if (epoch > steps[0]) and (epoch <= steps[1]): lr = base_lr * 1e-1 elif epoch > steps[1]: lr = base_lr * 1e-2...
532bebeabdeefd0c7842ea338aeb7540d1fb02d3
b0f41ef2af5309fc172b05232dbde501a01d1234
/fyt/raids/templatetags/raids.py
58daa78c1ea9cc37f3fb16c8a26eeaf0802b2762
[]
no_license
rlmv/doc-trips
c4dfec9b80cf531b69b17ac2caaef509fa048cd3
59c1ffc0bff1adb4f86f1dcfaa66d8970ff55b72
refs/heads/master
2023-05-27T01:48:49.251830
2021-08-07T04:02:26
2021-08-07T04:02:26
21,745,373
10
3
null
2023-05-23T00:51:26
2014-07-11T17:36:35
Python
UTF-8
Python
false
false
753
py
raids.py
from django import template from django.urls import reverse register = template.Library() @register.simple_tag def new_raid_url(trips_year, **kwargs): """ Url to create a new raid, with kwargs added to url querystring and encoded. """ url = reverse('core:raids:create', kwargs={'trips_year': trip...
604d1e91fefdb79947bdce2b507eda1c49ea78c8
c4f5e200107f47759ae33237dcdc11987f8bc46d
/functions/list_function.py
452f888ad6a33098261cf1ff80aad6b4cadebbd8
[]
no_license
sarozadr/python-practice-problems
59c802a10d20d5eb4fcee56f3b9698f6e092100a
35dd2dc738c31a91c2a8f788d67d055e76589fb3
refs/heads/master
2022-11-14T13:52:11.579348
2020-07-01T21:34:12
2020-07-01T21:34:12
266,175,497
0
0
null
null
null
null
UTF-8
Python
false
false
194
py
list_function.py
"""Author Arianna Delgado Created on June 18, 2020 """ #This function fun() displays a list of numbers one by one def fun(list_num): for i in list_of: print (i) fun([1,2,3,4,5,6])
e5fbbcee439e384a0e6a11fcfbcbb48473c8979f
ecb9fef55282a173b7ae040a94e99bc9637ecb84
/mockpy/mockpy.py
d7d918d1013fffcce3cda813ae3f2a9d80583b41
[]
no_license
tonycn/mockpy
2aead5c74b5134e367e4039d15a25667f66d92a1
9936b27fd9f2d7249a03b14c48a349c1b2ff9e07
refs/heads/master
2021-01-15T09:46:20.691032
2016-04-15T06:47:59
2016-04-15T06:47:59
56,287,530
0
1
null
2016-04-15T03:18:18
2016-04-15T03:18:17
null
UTF-8
Python
false
false
2,618
py
mockpy.py
#!/usr/bin/env python from utils import args_parser from utils.network import NetworkConfig, turn_off_all_proxies from core.cherrypy_server import start_mock_server from core.proxy_server import start_proxy_server from utils.dir_init import * from utils.config import * import sys import version import os def start()...
0bff370a73007e54da0bb7174032f785a91e2716
fb5f18a4753fa69db52e9f27262772fc076c0181
/blog/blog/urls.py
b1036d4476fa9e78f4cdc804601c4f4f3c17994d
[ "MIT" ]
permissive
masaki-sato/django-sample
860ce5d7172e68bbbdafb05e91740f8dae1495fc
6957b124c6c1d0fca8908aa7071f616cdb9d0a4b
refs/heads/master
2021-01-24T14:33:39.109782
2014-10-10T11:55:00
2014-10-10T11:55:00
null
0
0
null
null
null
null
UTF-8
Python
false
false
345
py
urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'blog.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^post/(?P<post_id>\d+)/$','cms.views.po...
342afd75f3d685faf373ab320ce3e4478f1b3d43
faa2dec79d47ad023bb219c220a7d463f3108ef9
/StatArb/statArb.py
ee638fdb7b0ba15466c39f5d14d019d0b6ba8f6d
[]
no_license
nagyist/QuantFox
b3bafe761a72f8fed5f80aca5c836bea9bf62144
a22e3ef0a9dd15552fad5a8a23fbb711f4de08ce
refs/heads/master
2021-05-27T03:33:55.058446
2013-07-02T19:05:40
2013-07-02T19:05:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
20,254
py
statArb.py
from pyalgotrade.stratanalyzer import returns, trades, drawdown, sharpe from pyalgotrade.tools import yahoofinance from pyalgotrade.barfeed import yahoofeed from pyalgotrade.utils import stats from pyalgotrade import strategy, plotter, dataseries from datetime import datetime import numpy as np from numpy import mean, ...
4e37ff8e94f08dab4778a51f1edd385081607c59
1b4c38570e1d012631616fa2a2fa2e5fd79ae428
/main.py
38b7a807370331f126d89a084712d7a9a112d1de
[]
no_license
Jhamed7/MessageBox
3d673acdfab152f7babc210f6f622797fc12dbb4
64424292e7401996745853d524183b10365a4a7b
refs/heads/main
2023-05-10T23:36:48.117578
2021-06-02T17:38:58
2021-06-02T17:38:58
373,252,328
4
0
null
null
null
null
UTF-8
Python
false
false
4,479
py
main.py
import os import sys import random from functools import partial from PySide6 import QtGui from PySide6.QtWidgets import QMessageBox from PySide6.QtWidgets import * from PySide6.QtUiTools import QUiLoader from PySide6.QtGui import * from database import DataBase from datetime import datetime class MainWi...
b8b7a22921cbc488d857e49e758f4b72803fc205
1bb8d23108c5f86d2131b81e8ddd5b7bd53cc7c6
/单链表逆置.py
b64d8e16ad13eaf0f604e1493f0aab8f814f0039
[ "MIT" ]
permissive
ethanstrgo/-
e4479be324caf7276b45503462f39ca3a3936f54
884c123a292fb27b3270aa5816f49cbb9542c153
refs/heads/master
2021-05-14T16:49:43.372317
2018-01-11T15:54:41
2018-01-11T15:54:41
116,030,770
1
0
MIT
2018-01-11T15:54:41
2018-01-02T15:44:34
Python
UTF-8
Python
false
false
417
py
单链表逆置.py
class ListNode: def __init__(self, x): self.val = x self.next = None def recurse(head): if head is None or head.next is None: return head pre = head cur = head.next pre.next = None while cur: tmp = cur.next cur.next = pre pre = cur cur = t...
0ebe8fde100cebe49d7d00721aeb6cfb8b2b78ce
51992c4abe2208633a4d8ec85ac195d87ded7e02
/lifelines/tests/simple_tests.py
a1585ba2d34bfe076cd8bd3d1e8675d93b690369
[ "MIT" ]
permissive
Basqiat/lifelines
d197632199b6ce3fc4b0131225bc466d87b218a6
8bc0c8ae47aca7cfc96ef006d0fb85a41dbada99
refs/heads/master
2021-01-17T21:28:04.297579
2013-10-06T18:15:14
2013-10-06T18:15:14
null
0
0
null
null
null
null
UTF-8
Python
false
false
496
py
simple_tests.py
#quick tests import numpy as np from lifelines.generate_datasets import * T = np.linspace(0,100,1000) def int_sv_equals_exp_T(): """ Integral of SV curve = E[T] (assuming SV curve has finite integral) """ #create a survival curve hz, coefs, covart = generate_hazard_rates(1, 10, T) sv = construct_survival...
2bef2260b3831eb544ef3e5da7e5413a5c6482a5
17079988dedef6f830633a7a54b181355231fe3e
/Rotations/particle_test.py
1924261f7c99e4c5e254e0f5de885e8b4d3b1ddd
[]
no_license
sum008/python-backup
cdf6eaff60d882c36fe86b47ad311955d5869b02
729fbe2a5220941f9ba085c693c871592a529da8
refs/heads/master
2022-12-12T21:21:48.259680
2020-09-12T15:36:05
2020-09-12T15:36:05
285,461,845
0
0
null
null
null
null
UTF-8
Python
false
false
5,056
py
particle_test.py
import math import pygame as p import particle import random import vector_ p.init() width=640 height=400 screen = p.display.set_mode((width, height)) offset=0.99 r=25 run=True n=5 particle_array=[] particle_color=[] g=0.3 for i in range(n): angle=random.random()*random.choice([1,-1,5,-5,10,-10...
bff07ad57f29dbf73500c5b28b88b4df850ea652
d7af26589e778d42ec3dce686c9b0a2cc78ed3b9
/apps/coefficient/task.py
d72b94c0cfd01740e3f0ee87b6eb36f2ae7ea4ed
[]
no_license
leekucoco/jixiaokaohe20180509
7a4cbad306b549c60fc790aa334ab956ee741d61
4bead067206eca68adc5c4827265c3e98134a0f0
refs/heads/master
2020-03-16T13:46:46.314133
2018-10-12T08:56:03
2018-10-12T08:56:03
132,699,426
1
0
null
null
null
null
UTF-8
Python
false
false
1,014
py
task.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from celery import shared_task,task import time,json from celery.schedules import crontab from .models import CoefficientDetail @shared_task(track_started=True) def add(x, y): time.sleep(10) #模拟长时间执行 return x + y @shared_task d...
9830a410398493088850ca547e67cf293d67b7f4
978696a840e0af7ca8832cdfc2b2475db41cf71e
/mta_test.py
60cc62227777fca9529f7a8459281d519d941951
[]
no_license
John-Simmons/subway-time
b2b92b1e8a82ee8158f251a7b35de3fbde5adb37
b874e579d52ffd653f763380255c7782cc07f489
refs/heads/master
2020-11-28T09:58:34.341844
2019-12-23T22:09:04
2019-12-23T22:09:04
229,776,095
0
0
null
null
null
null
UTF-8
Python
false
false
1,010
py
mta_test.py
import requests; from google.transit import gtfs_realtime_pb2 from datetime import datetime import warnings def convert_time(posix_time): return datetime.utcfromtimestamp(posix_time).strftime('%Y-%m-%dT%H:%M:%SZ'); mta_feed = gtfs_realtime_pb2.FeedMessage(); mta_uri = "http://datamine.mta.info/mta_esi.php?key=91...
f7ab96d000d7a31599e55784529223aa5c2ab917
e244efdf080762759145c3c94a9f95b02133a859
/champion.py
affa8288b7198d2dcbad9bbddb84b3c14cfb71f7
[]
no_license
lxtonghhh/tactics
b680aa59c1e0a276dbe9808357e5840dac964fc7
80ba5be6a878b984a6d35a6c1da245bf0aa53315
refs/heads/master
2022-08-03T01:06:52.379930
2020-05-29T10:37:07
2020-05-29T10:37:07
267,777,258
0
0
null
null
null
null
UTF-8
Python
false
false
5,496
py
champion.py
import time, random CHAMPION_DICT = { "Lucian": dict( quality=2, character="shooter", AD=[50, 100, 180], AP=[0, 0, 0], DEF=[25, 25, 25], RES=[20, 20, 20], ASP=[0.7, 0.7, 0.7], CRT=[0.25, 0.25, 0.25], HP=[500, 900, 1600], MP=[30, 30, 30...