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
90e4500b52a4dc0f28bd8ad99dc80e53df4d46ce
fb100402d517b9d443b7c90475757b66298edd9e
/Examen2B/ant-backend/sistemas/models.py
30c0c30f22c87818f92203e554ead4ee0c29d42b
[]
no_license
2018-B-GR2-AplicacionesMoviles/Examen2B-YaselgaErnesto
d0d633f38fd318c6c6759928ea27408a3da6a8cd
438b950bc5fe7c061014eac289f4c406a67d91d9
refs/heads/master
2020-04-21T00:18:44.545565
2019-02-09T13:32:43
2019-02-09T13:32:43
169,192,729
0
0
null
null
null
null
UTF-8
Python
false
false
1,010
py
models.py
from django.db import models class SistemaOperativo(models.Model): nombre = models.CharField(max_length=20, null=False, blank=False) version = models.CharField(null=False, blank=False, max_length=8) fechaLanzamiento = models.CharField(max_length=20, null=False, blank=False) peso_gigas = models.CharFie...
502e231f58160e66645ad41dff1923792f1d9913
131b7ea0fd8581e0e94b9b0019fb8ff8c3dd450f
/RetailOpenCV/tools.py
ca53b63c3d125c47d46c22df4dd5f090d5665419
[]
no_license
lulzzz/RetailOpenCV
ad68b0294d971f1ec02e3d7b4accbaee0e6a7e41
c0119fb8a88b29d584bcd0c14e59ef6fe439f5d4
refs/heads/master
2021-01-20T04:05:20.653024
2017-04-27T17:08:19
2017-04-27T17:08:19
null
0
0
null
null
null
null
UTF-8
Python
false
false
33,433
py
tools.py
import config as cf import cv2 import numpy as np from datetime import datetime import random import os import sys from copy import copy from Source import Source from ForgroundExtraction import ForgroundExtraction from Person import Person from Group import Group import json import requests import math ...
2da781b455a229883661778de96c80be16982202
b51b329904840805e313f62fe176cb458015739a
/podcastmanager/api/tests.py
c54f71b2e59dc02c071b5136c929e9b04a0715fa
[]
no_license
mkarpiarz/podcast-manager
a5a9ab66488825666445c03f1b0f951f1f6b80de
3cc269682cb0588e4fddf2033bf7c543321c368a
refs/heads/master
2020-03-28T08:04:06.055973
2018-09-07T00:07:16
2018-09-07T00:28:39
147,943,163
0
0
null
null
null
null
UTF-8
Python
false
false
1,972
py
tests.py
from django.test import TestCase from .models import Podcast from rest_framework.test import APIClient from rest_framework import status from django.core.urlresolvers import reverse class PodcastTestCase(TestCase): """This class defines the test suite for the Podcast model.""" def setUp(self): """Defi...
bc2438f44cea4a95e2f43c36a83d353b4913b9ed
896a471df116eb311e1104ad73670bd77f8860f5
/apps/profiles/models.py
5dab05468671bc846a933899b4c9c8dc66748267
[]
no_license
nrgsjamshidi/social_network_project
6b86950172493895a29dfc0b335880030993a595
98e0f2149fe54a2390228f881fab8e573af1ee7f
refs/heads/master
2023-03-21T01:20:11.490461
2021-03-12T20:28:37
2021-03-12T20:28:37
347,189,544
0
0
null
null
null
null
UTF-8
Python
false
false
3,622
py
models.py
from django.contrib.auth.models import User from django.db import models from django.conf import settings from autoslug import AutoSlugField from django.db.models import Q # class ProfileManager(models.Manager): # def get_all_profiles_to_invite(self, following): # profiles = Profile.objects.all().exclude(...
83be84475367977dfa784b8455e12ed66346e0df
db3ba5776866f978fc2da97c8ac99ca3488a31dc
/production/views.py
a3613587cb808a2ccff2b836f4ae05dec2b45766
[]
no_license
barguello/AmpersandCopy
b7c2216f2ff4530e24f91233dc8332850a375988
cc3e20960bf057d9101c3d4f0cac1b61bdef9089
refs/heads/master
2021-01-10T14:03:38.315929
2016-02-24T03:51:59
2016-02-24T03:51:59
52,412,200
0
0
null
null
null
null
UTF-8
Python
false
false
7,916
py
views.py
import datetime from braces.views import CsrfExemptMixin, JSONResponseMixin, AjaxResponseMixin from django.core.urlresolvers import reverse_lazy from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.views.generic import TemplateView, ListView, DeleteView, Cr...
d5edd0482d36ec226f8856f1f23dab9058e39dd7
5a9ebb5750759866b547140e928ff760f194f456
/build/exp_excavator/cmake/exp_excavator-genmsg-context.py
621241c9baefbb920e7a13e5e724a8c40aca7dc6
[]
no_license
rsandzimier/ros_ws
1c0a9d3adf3bdfc23aeff2779f666bf3deeb3c89
f546b3e03cb9cfc9d06003a85baf6e598f2d0ee4
refs/heads/master
2020-03-29T17:19:44.213960
2018-10-12T19:28:38
2018-10-12T19:28:38
150,120,496
0
0
null
null
null
null
UTF-8
Python
false
false
1,104
py
exp_excavator-genmsg-context.py
# generated from genmsg/cmake/pkg-genmsg.context.in messages_str = "/home/dlab/ros_ws/src/exp_excavator/msg/PowerMachine.msg;/home/dlab/ros_ws/src/exp_excavator/msg/PowerBucket.msg;/home/dlab/ros_ws/src/exp_excavator/msg/JointValues.msg;/home/dlab/ros_ws/src/exp_excavator/msg/JointCommandDynamixel.msg;/home/dlab/ros_w...
a8962dc41a9dab18319016536b6a78d225fccb5d
7f4c2a09e62297f9037d0d196a452d2da5e7d61e
/player.py
4e33a9a1d7d64c6461967d99e99659eb031f6775
[]
no_license
bbpm99/connect4
8faf14ee2a38b6daa65a649029390d1d8cb6ef3f
9f477774f0da13efdb49eae4fb2a357103f24d21
refs/heads/master
2020-07-07T18:45:15.561412
2019-08-20T19:40:46
2019-08-20T19:40:46
203,442,906
0
0
null
null
null
null
UTF-8
Python
false
false
955
py
player.py
# # A Connect-Four Player class # from board import Board class Player: def __init__(self, checker): """constructs new player with checker attribute and num of moves""" assert(checker == 'X' or checker == 'O') self.checker = checker self.num_moves = 0 def __repr__(self): ...
046cbe1fea3df18bd8d4ae3cc07cbbf5b52567ca
53fab060fa262e5d5026e0807d93c75fb81e67b9
/backup/user_305/ch88_2019_11_27_15_39_37_177262.py
c161921d51cc822338e536a44c8c6245075dd168
[]
no_license
gabriellaec/desoft-analise-exercicios
b77c6999424c5ce7e44086a12589a0ad43d6adca
01940ab0897aa6005764fc220b900e4d6161d36b
refs/heads/main
2023-01-31T17:19:42.050628
2020-12-16T05:21:31
2020-12-16T05:21:31
306,735,108
0
0
null
null
null
null
UTF-8
Python
false
false
364
py
ch88_2019_11_27_15_39_37_177262.py
class Retangulo: def __init__(self, p1, p2): self.largura = abs(p1.x - p2.x) self.altura = abs(p1.y - p2.y) def calcula_perimetro(self): perimetro = 2 * self.altura + 2* self.largura return perimetro def calcula_area(self): area = self.altura...
70fa9d3d3af004279f4f5d581b8ff4a87ebfc361
6cbe2980063b15c7eed0e6e60f7786caf8bfa878
/1978.py
6d191558d6ad6b9b9532a47ccaa2ac99d4124e6e
[]
no_license
jshk1205/pythonPractice
f8dd1d17420bb5556730465986ff762306cea59b
59843d39d1079726f812459939d7fbc7346174c9
refs/heads/master
2023-07-10T09:18:43.539144
2021-08-19T07:27:41
2021-08-19T07:27:41
388,735,955
1
0
null
null
null
null
UTF-8
Python
false
false
1,015
py
1978.py
n= int(input()) # 리스트 원소 개수 입력 num = list(map(int, input().split(' '))) # 리스트 원소 입력 dec = 0 #소수의 개수 if n == len(num): # 지정한 리스트의 원소 개수와 입력한 리스트의 원소의 수가 같은경우 실행 for i in num: count = 0 # 약수의 개수 for k in range(1, i+1): #약수의 개수 구하기 if i % k == 0: count += 1 if coun...
eb505e45d29634c3b9fcc2d6c0431095dadd1610
4d000c5fe5ca330d439c46845e411ef3c313e9e5
/itws/views.py
ab0708b258ad19f8882c4a6360d0a8fcb95e0669
[]
no_license
kaustubh-pandey/Plant-Nursery
2ba0078fe65555c304778400c0821c339ff15c77
148f2d4f1c485d9185d96a4338a84a8b17e97f49
refs/heads/master
2023-03-24T13:12:41.692425
2021-03-20T08:24:39
2021-03-20T08:24:39
106,642,576
1
1
null
null
null
null
UTF-8
Python
false
false
437
py
views.py
from __future__ import unicode_literals import time from django.shortcuts import get_object_or_404, render,redirect from django.template import loader from django.http import HttpResponse from django.http import Http404 #from sensor.models import * def index(request): #return render(request, 'sensor/itws.html') ...
7d402bb5e0279a125251b97c88342f59dd5dc9f0
0a037e4ee03c5afbf6f58b7293fefab1cc6998cf
/week5/alchemy.py
f6603a40d97393ffa5db12036489ff89d3f02979
[]
no_license
mingyyy/crash_course
6ac2a41b14c821e96e3938047cb056ad2ce99280
dad9f9b37ef3093dad25a0cb7fddf0e65fed3571
refs/heads/master
2020-04-24T14:24:43.283617
2019-12-25T07:43:05
2019-12-25T07:43:05
172,019,856
0
0
null
null
null
null
UTF-8
Python
false
false
627
py
alchemy.py
import sqlalchemy as sqa from pprint import pprint # pip install psycopg2 username = "Ming" password = "" db_name = "dvdrental" # connection string to postgres DATABASE_URI = f"postgres+psycopg2://{username}@localhost:5432/{db_name}" engine = sqa.create_engine(DATABASE_URI) connection = engine.connect() metadata = s...
69d03899cefec9153aa0e4134f458eb53c6db9a2
53eb258f88bad98afb6143af9a55aec49d7948dd
/statsplotter
e2ad8c66529551994c34f636ed96134c1087375f
[]
no_license
serviceprototypinglab/lambda-docker-measurements
02386e8c22dcf4f6238871ae16e2afccb7afba9c
144601cf380056c7c2cac6c3507c2a1f3484a830
refs/heads/master
2021-07-12T04:57:34.272579
2020-11-03T06:03:07
2020-11-03T06:03:07
210,836,685
2
1
null
null
null
null
UTF-8
Python
false
false
4,587
statsplotter
#!/usr/bin/env python3 # # Syntax: statsplotter [nocanvas] [noframing] [nohull|nouhull] import pylab import pandas as pd import sys import glob import math import json # avoid Type3 font problem - http://phyletica.org/matplotlib-fonts/ pylab.rcParams['pdf.fonttype'] = 42 pylab.rcParams['ps.fonttype'] = 42 def conv(x...
52566cb43ec685ae80cc3c8c699776258bdee290
f247b141645eec0c46fe786a271b1b9b7699ca79
/0x01-python-if_else_loops_functions/3-print_alphabt.py
ab6d80382e823d9b39da35187495d10f010cd2bb
[]
no_license
klich1984/holbertonschool-higher_level_programming
fa4af3090c2a8f5a794c8433f3ec80d481fbab11
82e07396b689dea8ea7de1fdac8b63d2e38dd142
refs/heads/main
2023-04-22T01:57:15.777412
2021-05-12T20:26:03
2021-05-12T20:26:03
320,377,698
1
0
null
null
null
null
UTF-8
Python
false
false
137
py
3-print_alphabt.py
#!/usr/bin/python3 for alp in range(97, 123): if alp == 101 or alp == 113: continue print("{}".format(chr(alp)), end='')
5ce9191bd836944497c73f235e9d45e1ad9cfd2c
704c38e94eca75600e6de6ceb8d210c3bbbbc51d
/count_elapsed.py
ccce91f636b993d3152ae735132b123f3f184123
[ "MIT" ]
permissive
ColdSauce/Mac-OBS-Tools
ff1910a1fa54c6ccd15597e5b103333c0fcf4f97
14cf5a623bf2703583b81f06102859ea89d3281d
refs/heads/master
2020-03-11T09:44:22.622572
2018-04-22T23:45:49
2018-04-22T23:45:49
129,921,024
0
1
MIT
2018-04-22T23:45:50
2018-04-17T14:55:26
Python
UTF-8
Python
false
false
736
py
count_elapsed.py
import time def convert_to_hours_minutes_secs(secs): mins = int(secs / 60) hours = int(mins / 60) % 60 secs = secs % 60 mins = mins % 60 return "{}:{}:{}".format(str(hours).zfill(2), str(mins).zfill(2), str(secs).zfill(2)) def write_time_to_file(time_file, time_to_write): time_file.seek(0) ...
6dafa327386d1b5818183552f1f3ad12c0667c77
0e2564abf04c62f1797f35a53d21a74d2839221f
/DataBase/CinemaBase/migrations/0001_initial.py
7dfe75a6a736f0c757c4261951449b387d34ad7d
[ "MIT" ]
permissive
John15321/CinemaManagementSystem
b34122c92f0e2ca6c4d46ac3f4f8656cde53a3d7
f48c2ea23ac3737beeb2553ad57257dde579a800
refs/heads/main
2023-06-04T07:05:01.861211
2021-06-15T18:16:33
2021-06-15T18:16:33
354,600,269
3
0
null
null
null
null
UTF-8
Python
false
false
4,540
py
0001_initial.py
# Generated by Django 3.2.3 on 2021-05-19 21:36 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='CinemaHall', fields=[ ...
e9206acc198d159f7d5ef4c86dc01fd5b346f2e3
cd4ec01b2f6f21cef8eb4d769e7c6abbbc5dd311
/PARPROX/parprox.py
b02a096a713f29097af1a449bd29aa7c77edf94d
[]
no_license
Piressss/spoj_br
f2d8085f969dfea038d85c865690214d76bd7275
1a0d87feaf9644812b16084609946fa598f5f844
refs/heads/master
2020-04-22T06:03:36.253677
2019-02-11T18:16:08
2019-02-11T18:16:08
170,177,638
0
0
null
null
null
null
UTF-8
Python
false
false
947
py
parprox.py
#!/usr/bin/env python import sys import math import timeit def value(p1=[],p0=[]): res=math.hypot(int(p1[0])-int(p0[0]),int(p1[1])-int(p0[0])) return res # x=[] # y=[] tmp=[] min_v=2000000 num=int(str.split(raw_input())[0]) for i in range(num): tmp.append(str.split(raw_input())) # x.append(tmp[0]) ...
deda751347e1a391d65a3c237ccd7fbecfdd6259
b1479301d36e26794c5bf23ebff750c767b71f4c
/link_finder.py
71d6f00dc5c85add78ce80d32db8e61d5a74108e
[ "MIT" ]
permissive
benevolentprof/fb-notification-mail
c0b2d5aa3ef23077fe0936234aa8c03fbef9dc9c
e8a0d391884352d140093a87a18579ac2f6872a0
refs/heads/master
2021-01-17T12:47:48.013604
2016-07-24T00:41:54
2016-07-24T00:41:54
58,655,640
0
0
null
null
null
null
UTF-8
Python
false
false
1,057
py
link_finder.py
"""create a class to take a look at HTML and sift through it and find all the links/a tags""" from HTMLParser import HTMLParser import urlparse class linkFinder(HTMLParser): def __init__(self, baseURL, pageURL): super(type(self),self).__init__() self.reset() self.baseURL = baseURL ...
0ee1ee00f3597ffa6aa74ea5bfc66fca18c7cfd9
6ec1594260ddd88fe852da7ca40dcde139fd2157
/capstone/celery.py
8de3f48a381d1b8f8158902607436f4f63393ed6
[]
no_license
SunnyShikhar/alumnize
88b50a9c5608ecaeb20ec97cf540e4b3ad9fabfa
637cc7cb74cc92a46c5dad782469424ad21dc1a1
refs/heads/master
2021-03-30T21:13:47.440976
2018-04-22T06:58:07
2018-04-22T06:58:07
124,872,948
0
0
null
null
null
null
UTF-8
Python
false
false
776
py
celery.py
from __future__ import absolute_import, unicode_literals import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'capstone.settings') app = Celery('capstone') # Using a string here means the worker don't have to serialize ...
330465e9c7046e35f6e9643ad0783b8b0f75b9e3
466912406272829982f75854cf0104c6ce8c9814
/data/nlp/task/tn.py
1f80c0f141aa16e10b8cdf4cd2f2570f501f9aef
[]
no_license
logonmy/Codes
9631fa103fc499663361fa7eeccd7cedb9bb08e4
92723efdeccfc193f9ee5d0ab77203c254f34bc2
refs/heads/master
2021-09-21T18:07:22.985184
2018-08-30T05:53:26
2018-08-30T05:53:26
null
0
0
null
null
null
null
UTF-8
Python
false
false
19,710
py
tn.py
# -*- coding: utf-8 -*- __author__ = 'victor' import os import sys reload(sys) sys.setdefaultencoding('utf-8') sys.path.append(os.path.join(os.path.split(os.path.realpath(__file__))[0], '..')) sys.path.append(os.path.join(os.path.split(os.path.realpath(__file__))[0], '../../util')) import db as dbcon from fundtag imp...
25cb0cb38790a6b720c0583f72b381aff20e6640
41960a07a8118cf99236972c1e94a36ef00c55c9
/user_input/utils/daily_activity.py
4f4c68fd10945140d6873cc9f6dad0536a89c5f4
[ "MIT" ]
permissive
wahello/jvb
7288f3fc8099dbbdfa5cdac86b251d4d739f4dca
c87fdf49ae040668323d1a034aa407cfe23c4a1d
refs/heads/bug/aa_ranges/chart2
2022-11-29T12:58:37.561674
2019-06-17T10:50:17
2019-06-17T10:50:17
211,479,327
0
1
MIT
2022-11-19T02:54:15
2019-09-28T09:52:28
null
UTF-8
Python
false
false
4,741
py
daily_activity.py
import ast from datetime import datetime,time,timezone,timedelta from django.db.models import Q import quicklook from user_input.models import DailyActivity def get_activity_base_format(activity): activity_data = activity['activity_data'] activity_data_dict = ast.literal_eval(activity_data) activity_wea...
b68da27e43afb48e4806b93679c7c6a007dc39b6
cb8b096752e53e575b38c810206c68d2e77a3559
/tests/test_version.py
f1a4b6e3e67f4ad562b5a5a454a2bebbdf4015ca
[ "BSD-2-Clause" ]
permissive
ponty/confduino
8f82418491ced6a7e61cac54c9c8b2115cfb57c4
f4c261e5e84997f145a8bdd001f471db74c9054b
refs/heads/master
2021-06-04T05:30:34.358074
2017-02-23T15:00:22
2017-02-23T15:00:22
2,018,647
4
1
BSD-2-Clause
2018-03-05T17:40:52
2011-07-08T16:14:23
Python
UTF-8
Python
false
false
747
py
test_version.py
from confduino import set_arduino_path from confduino.version import intversion from nose.tools import eq_ from data import TEST_ARDUINO_INSTALLATIONS # def test_ver2(): # for x in TEST_ARDUINO_INSTALLATIONS: # print (x) # set_arduino_path(x.path) # eq_(version(), x.ver) def test_iver():...
ebb54fc5195abd91f11ea881f69655535b539202
77148b3ea534ae459ba84adbcd76bad8cea7cd5b
/tool/execargs.py
39bf339d4759d048e1b45178a91c377fbeea6126
[]
no_license
drmikehenry/vimfiles
26e554d241024d4e9c423f2c3839d4d70b66a906
d22c88283536c50a5d21e71bab6d81688425a125
refs/heads/main
2023-08-09T07:05:01.240290
2023-08-05T20:57:24
2023-08-05T20:57:24
1,559,396
35
6
null
2023-03-18T21:04:58
2011-04-02T12:53:11
Vim Script
UTF-8
Python
false
false
520
py
execargs.py
"""Chain program execution through Python for better argument parsing. Simply turns around and invokes a subprocess call on the passed-in arguments directly. E.g., this invocation:: python3 execargs.py perl somePerlScript.pl arg1 arg2 is logically equivalent to this one, but with better quote handling:: pe...
a3b0654ea426c6a06c261d972a93034549e938c4
b1662f782b6188af2d27450dea79e052162877ef
/WebScraper.py
0d42bbd4bfecb049fb62e90f7eccfc00bded3f3a
[]
no_license
Ruddmaster/Ruddmaster
c88bb28cd961c65ab6154fc5fab74b15cff65b46
a47a5a7bb6f815a854be1c31dacf92f37eea0d98
refs/heads/main
2023-04-06T12:10:05.847471
2021-04-20T17:32:02
2021-04-20T17:32:02
359,612,895
0
0
null
null
null
null
UTF-8
Python
false
false
1,062
py
WebScraper.py
import requests as requests from bs4 import BeautifulSoup # features to add: # url's for each item to click # short description of the job # remove all listings that are not remote URL = "https://www.indeed.com/jobs?q=python+developer&remotejob=032b3046-06a3-4876-8dfd-474eb5e7ed11" for page in range(10, 50...
b29e1ded2d5ff962e8c60fb79ab6b52ae987feb4
de4949b69df7bfa078733132a30f16359d6fc111
/Generators/BFSGenerator.py
07e3046ab4218b92416477f70fcde99579797a97
[]
no_license
adambenn/mazerunner
53c08c173081d5a5b309d09c8e9f18a984986d40
c415600faa4566a72222b172bee684af5475d55c
refs/heads/master
2021-01-15T14:35:57.812094
2016-04-10T19:40:44
2016-04-10T19:40:44
55,325,604
0
0
null
null
null
null
UTF-8
Python
false
false
133
py
BFSGenerator.py
from Generators.DFSGenerator import * class BFSGenerator(DFSGenerator): def getNext(self, stack): return stack.popleft()
b80531c5c4f99ea71f7f03e668ac71d11aae7825
c1b5cd29f25a22cffae14f7691fdb6b5b4fed770
/public/genTempData.py
e9a4770d0d2838314d8aace052687f226382bbaa
[ "Apache-2.0" ]
permissive
raymond-yuan/global_weather
d2c47842583ff801823ebbda025fe7b1748931d4
754dc2040aafefd5aeefeb0faf222c71d0ae11d3
refs/heads/master
2021-01-17T20:01:23.320255
2016-12-07T04:23:14
2016-12-07T04:23:14
71,750,089
0
2
null
null
null
null
UTF-8
Python
false
false
3,018
py
genTempData.py
import requests import json with open("Output.txt", "r") as cityIdTxt: data = cityIdTxt.read() cityArray = data.split(",") city100Array = [] outstr = "" for i in range(len(cityArray)): if ((i + 1) % 25) == 0: outstr = outstr[:-1] city100Array.append(outstr) outstr = "" else: ...
cb469e4dd1910e931ae760579133029fda76a00f
18deb2e423c447dd4d2ecf91b1d557c8408e45c9
/Crawler/alternate/alternate/spiders/alt_soundcard.py
d853c7602e3d42ebb1eff3766f2550c3585763ea
[]
no_license
Zenj1n/pcbuild.com
c195ed448520c19c8c0c52cbfc476690518b16bb
bfa1a18c9de465a1c48da65c9380027dde47ceb5
refs/heads/master
2021-01-16T17:46:12.262530
2015-04-09T11:15:54
2015-04-09T11:15:54
24,584,859
0
0
null
null
null
null
UTF-8
Python
false
false
3,216
py
alt_soundcard.py
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import HtmlXPathSelector from py2neo import neo4j import csv import datetime class alt_soundcard(CrawlSpider): name = "alt_soundcard" allowed_domains = ["alternate.nl"] ...
bc2cd1d70f3b31d10a3e2a1d1ed86f0be806a680
09ecdb0d81cfb2a47f6829b34583553a3730065b
/ABC/168/C.py
2567bb4e5147488333353d914bdcd0ff7de067c6
[]
no_license
ucho0303/AtCoder
fd757a5efe6f124281d51a9d190f4e1eb407f51c
0d37265c4a53187ed34f7aaf5a9415a5d9b19517
refs/heads/master
2021-05-25T18:40:55.010475
2021-02-16T04:17:07
2021-02-16T04:17:07
253,874,000
0
0
null
null
null
null
UTF-8
Python
false
false
153
py
C.py
import math a,b,h,m = map(int,input().split()) h *= 5 h += m/12 s = abs(h-m) coss = math.cos(math.radians(s*6)) print((a**2 + b**2 - 2*a*b*coss)**(0.5))
7000cfef6e2842b90fc79307b8a55dc4227c3ff4
c24db3ef0d4d7f8920f517efb2935a684b43fd5e
/main2.py
52fa910e5da4d9497e0817c462cdbe2f0fba75e5
[]
no_license
hcj5206/Self_Project
a2c0bd39b883a52e265891fceae469d43e869731
bc0c7910f39d7ebf506f20040dca1a00ad91c75a
refs/heads/master
2020-09-12T15:12:02.790590
2019-11-26T02:56:31
2019-11-26T02:56:31
222,462,180
0
0
null
null
null
null
UTF-8
Python
false
false
1,009
py
main2.py
''' -*- coding: utf-8 -*- @Author : HCJ @Time : 2019-11-25 10:06 @Software: PyCharm @File : main2.py ''' from __future__ import print_function import cv2 import numpy as np from matplotlib import pyplot as plt img_0=cv2.imread('img/2.jpg',0) gray=img_0.copy() cv2.imwrite("./outimg2/0原图.jpg",gray) # 高斯滤波 img = cv...
1f7670e4223298087173c41b887973622972454f
3474b315da3cc5cb3f7823f19a18b63a8da6a526
/scratch/KRAMS/src/ibvpy/mats/mats2D/mats2D_cmdm/mats2D_cmdm.py
b4ae0317bf37b2e2f28904ebc937bf7b245b1bfc
[]
no_license
h4ck3rm1k3/scratch
8df97462f696bc2be00f1e58232e1cd915f0fafd
0a114a41b0d1e9b2d68dbe7af7cf34db11512539
refs/heads/master
2021-01-21T15:31:38.718039
2013-09-19T10:48:24
2013-09-19T10:48:24
29,173,525
0
0
null
2015-01-13T04:58:57
2015-01-13T04:58:56
null
UTF-8
Python
false
false
9,331
py
mats2D_cmdm.py
#------------------------------------------------------------------------------- # # Copyright (c) 2009, IMB, RWTH Aachen. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in simvisage/LICENSE.txt and may be redistributed only # under the conditions des...
0d2cb05f03c5148d545df139b233bb65df55f7c4
21d1d0cade05ae0ab3dff1598d64f80cef9a411d
/Python/Programmers/Level3/리틀프렌즈사천성.py
7aabad1adc691ca74efc1da5c8df28984e00bf84
[]
no_license
louisuss/Algorithms-Code-Upload
56d1a140a1674a53c13bcec5be96ea6da7c35219
6c97c713858b075162d5d86f124c0555f383c5b0
refs/heads/master
2023-01-08T21:37:19.702276
2020-11-09T04:03:50
2020-11-09T04:03:50
258,399,889
0
0
null
null
null
null
UTF-8
Python
false
false
5,352
py
리틀프렌즈사천성.py
def find_route(m1, n1, m2, n2, c): up, down, left, right = check_edges(m1, n1, m2, n2, c) case = (m1-m2)*(n1-n2) if case == 0: return (m1 == m2 and up) or (n1 == n2 and left) elif case > 0: return (up and right) or (down and left) else: return (up and left) or (down and right...
161da4d5ff10a315485cc48eaccb0d8501945547
65c42501fe8bdbbcc67d2790a4febc69fb43d3e9
/schedule/urls.py
648ba6ac8c15c27a8191189bd4da7dda92f7b07a
[]
no_license
crankycoder/classsite
fb9c301ec195e62431a09d8c3d92dc476e14d1a2
613868188b833ab3192cf8ecd3ef09737427500e
refs/heads/master
2020-12-25T06:06:28.870773
2013-01-14T17:46:59
2013-01-14T17:46:59
null
0
0
null
null
null
null
UTF-8
Python
false
false
437
py
urls.py
from django.conf.urls.defaults import patterns, include, url from schedule.views import ScheduleTemplateView from django.contrib.auth.decorators import user_passes_test from day_no.views import UpdateDayNoView urlpatterns = patterns('', url(r'^$', ScheduleTemplateView.as_view(), name='schedule-template-view'), ...
39c18a2f3084eab461d508ab84d497f549bdedaf
f77f3685a4cc351c20b7c531d1bae80e95d23dce
/login.py
32d13c988ea7d6b90a06d916d1a742e151019602
[]
no_license
0p3rator/momenllary-server
3926cc6a46e63d0300c2eb3f449be632fd1eb656
0b60ff7746fff54c8f9811299fe58cb90781b4e9
refs/heads/master
2020-03-24T02:33:06.853658
2018-07-25T13:57:36
2018-07-25T13:57:36
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,618
py
login.py
# -*- coding: UTF-8 -*- from flask import Blueprint, abort, request, redirect, Response, url_for from service.forms import LoginForm from service.user_service import User from flask_login import login_user, login_required from flask_login import LoginManager, current_user from flask_login import logout_user import os ...
523a0baf16e186e30c9d16f849b01d1c995589b4
66c7b0da6ee27ddce0943945503cdecf199f77a2
/rllib/dataset/transforms/mean_function.py
2f7796300595779d71a66d3fcb1eb65e4d6f6acb
[ "MIT" ]
permissive
tzahishimkin/extended-hucrl
07609f9e9f9436121bcc64ff3190c966183a2cd9
c144aeecba5f35ccfb4ec943d29d7092c0fa20e3
refs/heads/master
2023-07-09T22:57:28.682494
2021-08-24T08:50:16
2021-08-24T08:50:16
383,819,908
0
0
null
null
null
null
UTF-8
Python
false
false
1,383
py
mean_function.py
"""Implementation of a Transformation that offsets the data with a mean function.""" import torch.jit import torch.nn as nn from .abstract_transform import AbstractTransform class DeltaState(nn.Module): """Implementation of a Mean function that returns f(s, a) = s.""" def forward(self, state, action): ...
d7750a2ae0543f24b45256a43a5632da6b778bb9
bca92f88e00020f3d648b6495fde82d721711695
/src/Phobos.py
f067f9b60eeffdc6a2392ea5f43fabd60f66b98b
[]
no_license
kpk-pl/phobos
803199665c5c4f819cd8e88204547d17e4b9295c
0f5e6b07e4cfcf5ca2b5b6caacc4b624e3919227
refs/heads/master
2020-12-05T01:18:38.376044
2018-06-17T20:07:43
2018-06-17T20:07:43
231,960,687
0
0
null
null
null
null
UTF-8
Python
false
false
1,012
py
Phobos.py
#!/usr/bin/python3 import sys from PyQt5.QtWidgets import QApplication from MainWindow import MainWindow if __name__ == '__main__': app = QApplication(sys.argv) mainWindow = MainWindow() mainWindow.show() # TESTING CODE #mainWindow.processNewPhotos(['C:/Users/krzysiek/Pictures/C32...
f5e57e8174f32abe7bfbce492fd68dba7215bd12
0809673304fe85a163898983c2cb4a0238b2456e
/src/lesson_developer_tools/unittest_equality.py
53766d1fda45ef886cfb36d12a74c100e4c9353c
[ "Apache-2.0" ]
permissive
jasonwee/asus-rt-n14uhp-mrtg
244092292c94ff3382f88f6a385dae2aa6e4b1e1
4fa96c3406e32ea6631ce447db6d19d70b2cd061
refs/heads/master
2022-12-13T18:49:02.908213
2018-10-05T02:16:41
2018-10-05T02:16:41
25,589,776
3
1
Apache-2.0
2022-11-27T04:03:06
2014-10-22T15:42:28
Python
UTF-8
Python
false
false
347
py
unittest_equality.py
import unittest class EqualityTest(unittest.TestCase): def testExpectEqual(self): self.assertEqual(1, 3 - 2) def testExpectEqualFails(self): self.assertEqual(2, 3 - 2) def testExpectNotEqual(self): self.assertNotEqual(2, 3 - 2) def testExpectNotEqualFails(self): sel...
4e66acb284a8a4c0aa4201ba991b7b96fc068242
6db992a052a0dc0e2d68a227a55953730367505f
/time_calculator.py
8fedd567654b8f714e2c5e5b4df8102a992ea0d4
[]
no_license
cwarner11/time_calculator
b61a51e43378f71496014ca2784c250380ca5a9b
65bfe32122a5307f01d809f09cab107f0c166f72
refs/heads/master
2022-11-29T04:54:00.071102
2020-08-07T14:31:05
2020-08-07T14:31:05
285,390,077
0
0
null
null
null
null
UTF-8
Python
false
false
2,812
py
time_calculator.py
def add_time(start, duration, day = ''): start1,start2 = start.split() hours,minutes = start1.split(':') duration_of_hours,duration_of_minutes = duration.split(':') duration_of_hours = int(duration_of_hours) duration_of_minutes = int(duration_of_minutes) hours = int(hours) minutes = int(m...
98c0acd6972a158e6824dba3d6dedea6a1a1a745
b4fdda2c2ca4b6873e16dd368b29436436af7926
/datasets/phrasecut_utils/iou.py
5d2df893868dc139af7887fc37a99ee145c4bca2
[ "Apache-2.0" ]
permissive
helloimlixin/mdetr
48149b49cfc18b6934db8ed1a7149bf8e480eb1b
cb3922d88f9c5b74b751813cf0dfe346283749c4
refs/heads/main
2023-09-02T07:01:50.645918
2021-11-01T20:20:23
2021-11-01T20:20:23
422,914,012
0
0
Apache-2.0
2021-10-30T15:08:12
2021-10-30T15:08:12
null
UTF-8
Python
false
false
5,223
py
iou.py
# Copyright (c) Aishwarya Kamath & Nicolas Carion. Licensed under the Apache License 2.0. All Rights Reserved """Direct import from https://github.com/ChenyunWu/PhraseCutDataset/blob/b15fb71a1ba692ea3186498f1390e8854b681a66/utils/iou.py """ from .data_transfer import * # IoU function def iou_box(box1, box2, xywh=Tru...
193f646ab157ae3f16cb01f53811a60c21d08ceb
8cef6fd18178f9b86addfb3dd7738819b2abf002
/ckanext/govdatade/tests/test_harvester.py
3bca7f1ab2ecc8ac55b3fad968f4e3426062f648
[]
no_license
fraunhoferfokus/ckanext-govdatade
980c06ec1363b4394f9b32a43e54a2ef3ad7a381
cb461aa6ff48dae6f515ca3695dacfbe55115e26
refs/heads/master
2021-01-21T14:01:35.802088
2016-05-27T08:20:43
2016-05-27T08:20:43
8,406,815
2
5
null
2015-11-19T15:07:38
2013-02-25T10:11:44
Python
UTF-8
Python
false
false
11,444
py
test_harvester.py
#!/usr/bin/python # -*- coding: utf8 -*- from ckanext.govdatade.harvesters.ckanharvester import BerlinCKANHarvester from ckanext.govdatade.harvesters.jsonharvester import MoersCKANHarvester from ckanext.govdatade.harvesters.ckanharvester import RLPCKANHarvester import os import json import unittest class BerlinHarv...
db4a98f6e2887822f7c0913c6ab775eddbab7e57
d9fff94503380a228b97a008e4c27a0f7cbabe1c
/project2.py
dc01cf580b142c84e01fd3af761c5e4d72145672
[]
no_license
becorey/me580-project2
748ca7c6a4d848d3795a8a66a0b944ad474945db
473b6576fa99f33e73c9a9a4725ec2cb73af3e57
refs/heads/master
2021-01-12T11:19:29.832096
2016-11-11T08:10:40
2016-11-11T08:10:40
72,898,361
0
0
null
null
null
null
UTF-8
Python
false
false
4,275
py
project2.py
# Author : Corey Berman # ME 580, Fall 2016, Prof Terry Yan # 1D heat transfer # hydrodynammically fully developed flow # in a round pipe # Procedure: # 1) Initial guess phi_star # 2) Solve for lamda_star = # 1/(4*integral(phi*eta*(1-eta^2)d_eta, 0,1)) # 3) With lamda_star, solve the ODE # lamda*(1/eta)*...
d2182e10a090842702f50b88803b4b29fe0259cf
318aea76262d78ade0893c17fb9b5c6723a00028
/Labs/Lab2.py
28bf295cfd83662736bee484033f177e8538e420
[]
no_license
SergeyMatles/Net4U
9f409edb08d5feb9669f3ca3caed8eeae9423f86
a4224acc9b027f7c4dd5175371d21bc6b8b47991
refs/heads/master
2023-02-01T22:56:34.041385
2020-12-23T17:14:45
2020-12-23T17:14:45
319,649,469
0
0
null
null
null
null
UTF-8
Python
false
false
676
py
Lab2.py
#Prices Agva=3 Melaf=2 Cok=5 Chick=20 Mam=17 #Shopping Options Tomato=int(input("How many Tomatos would you like?")) Cucambers=int(input("How many Cucambers would you like?")) Cokes=int(input("How many Cokes would you like?")) Chicken=int(input("How many Chikens would you like?")) #Print Shoping List print("Your Shopin...
bcc2228f6b2361b33bfb72d0c6483dde28d45bfb
7231f6c4451b77f0a723646b4eb767777d5c99b9
/backend.py
732d18459e56bcaf918756d4e96f9c1c3db512b7
[]
no_license
mindcrunch4u/object-recognition-with-tree-cnn
9bd8612f6150b9c79070a89cd7b02d37fa6b661d
ed136b10a8ff78df03798631cf7ec09412517083
refs/heads/master
2023-05-22T08:29:07.397987
2021-06-15T08:32:21
2021-06-15T08:32:21
373,061,832
0
0
null
null
null
null
UTF-8
Python
false
false
6,702
py
backend.py
#!/usr/bin/env python import os import sys from copy import deepcopy from components.utils import bracket_check, generic_print, err, ok, inf, debug, pack_details_dict, save_pickle, load_pickle from components.node import node, init from components.config_loader import load_tree, load_global_config from components.move...
3363ecf91fafd7439b01144dcabf9201c57845b5
66ecba7f4a3974042fabba6093531a5264dd30d7
/src/entity.py
9d1df34a93023db2be4b9996540974d2cee17c6b
[]
no_license
SadS4ndWiCh/snakegame-pygame
572f2052df75be7d57fc38311d64deaba7a7e4d8
8d0a33942b564c811df2189ca6782e73fd789bb4
refs/heads/main
2023-07-14T07:25:19.519263
2021-08-19T14:12:43
2021-08-19T14:12:43
397,273,392
0
0
null
null
null
null
UTF-8
Python
false
false
438
py
entity.py
from pygame import Vector2 from abc import ABC, abstractmethod class Entity(ABC): def __init__(self) -> None: self.position = Vector2() def has_collide(self, other): """ Checa se a entidade se colidiu com outra """ if(not issubclass(type(other), Entity)): raise ValueError('É necessário que a c...
8ca2b086216eff383ad376aed3b3e8c9f05ee844
de07e21906bf84a608a11efd6e8694d423b9bc8e
/Homework/si601-hw-1/si601-hw1_wanjun.py
7adc779ae20aad6eb4ac1c0e2bb215a993bf5b25
[ "MIT" ]
permissive
lfthwjx/DataManipulation
c445e85e70a4a3dbcb3d3c147c83f4f82b99dfca
23dbae5df9945c3fb1f0896accf376cb2d0e003a
refs/heads/master
2020-07-03T14:13:59.509628
2016-11-18T21:30:42
2016-11-18T21:30:42
74,165,595
0
0
null
null
null
null
UTF-8
Python
false
false
2,510
py
si601-hw1_wanjun.py
#!/usr/bin/python -tt """ Created on Sep. 10th @ author Jun Wang (wanjun) """ import csv import math #Step 1: Processing the input file wb_ind = open("world_bank_indicators.txt", 'rU') wb_ind_names = wb_ind.readline().split('\t') wb_ind_value = [] for indrow in wb_ind: indwt = indrow.split('\t') ...
e70ba3287cb4e88c0c763374662dec4eef89909b
0a6322f0fcc26bc928046b2d245a8ed40194cd06
/7/70.py
7ce4849913838770aee633101a3bf8cd8c21038c
[]
no_license
kenta997/100nock
77229bfcd5307ae93997aa9f7e03e6a64bd88ce2
0bb5217fb66f39d4165f8311f0b82cc2c7d58f42
refs/heads/master
2021-07-19T02:35:52.601905
2021-07-14T12:58:47
2021-07-14T12:58:47
209,467,897
0
0
null
null
null
null
UTF-8
Python
false
false
664
py
70.py
import codecs import random encoding = "cp1252" with codecs.open("rt-polaritydata/rt-polarity.pos", mode="r", encoding=encoding) as f: pos = f.readlines() with codecs.open("rt-polaritydata/rt-polarity.neg", mode="r", encoding=encoding) as f: neg = f.readlines() pos = ["+1 " + x for x in pos] neg = ["-1 " + x...
82d15018fb2c099ed49f401f87c4a3fc9c6179ba
918836bab78cb77860472681c80c9ff2ea7a9413
/proxy_example/proxy_example/spiders/movies.py
fd142bf2c8aa5a6708ea68bd6250725520050740
[]
no_license
jhy6677/myweb4
cd2288031f58a5b08aa8b3c67af418bb7fc40cde
e1f386868629651307f69328a49fd0c3c3461974
refs/heads/master
2021-01-24T03:43:14.607078
2018-02-26T02:33:48
2018-02-26T02:33:48
122,901,955
0
0
null
null
null
null
UTF-8
Python
false
false
1,524
py
movies.py
# -*- coding: utf-8 -*- import scrapy from scrapy import Request import json import re from pprint import pprint class MoviesSpider(scrapy.Spider): BASE_URL = 'https://movie.douban.com/j/search_subjects?type=movie&tag=%s&sort=' \ 'recommend&page_limit=%s&page_start=%s' MOVIE_TAG = '豆瓣高分' PAG...
a1e3087894b174eb6a53bf94bbef2f21cfad0b58
f3a87ca94beb521f328ed218013ddc868658fc66
/names.py
0d3534709a9182be3fd307b4415aea2fb9caa8c4
[]
no_license
tafiela/Learn_Python_the_hardway
15c14e6cb17dac64b1888c538a0a2f826f5b556e
1477272e825a2a218f928773c6b06f95143f8bbf
refs/heads/master
2021-01-19T19:26:45.958912
2017-04-30T17:46:26
2017-04-30T17:46:26
88,419,496
0
0
null
2017-04-16T17:10:46
2017-04-16T14:43:16
Python
UTF-8
Python
false
false
138
py
names.py
def naming(stuff): age = stuff * 10 height = stuff *20 weight = stuff *30 return age, height, weight stuff = 9 print naming(stuff)
e605cb348c0760bce3788a85fe95c67d68b9b76b
55c552b03a07dcfa2d621b198aa8664d6ba76b9a
/Algorithm/BOJ/4153_직각삼각형_b3/4153.py
976e0f13f5ad059c66e85a2274ea9a3255ddd0df
[]
no_license
LastCow9000/Algorithms
5874f1523202c10864bdd8bb26960953e80bb5c0
738d7e1b37f95c6a1b88c99eaf2bc663b5f1cf71
refs/heads/master
2023-08-31T12:18:45.533380
2021-11-07T13:24:32
2021-11-07T13:24:32
338,107,899
0
1
null
null
null
null
UTF-8
Python
false
false
268
py
4153.py
# boj 4153 직각삼각형 b3 # noj.am/4153 while True: lines = list(map(int, input().split())) if sum(lines) == 0: break lines.sort() if lines[0] ** 2 + lines[1] ** 2 == lines[2] ** 2: print("right") else: print("wrong")
95205ee69789ad9a8fd02349cb5574e1eaf31d79
e634b1e148491dec5d394ce380209f46b0942ef8
/src/blockdiff-cli3.6
1950159bd693d3ed049c09c7471bf8e04401a7df
[ "MIT" ]
permissive
io-developer/py-blockdiff
7cd8059aa63ee6ca62d6baa7820ed398b4e1b9d2
5d97b3c4a45b063ec2a9483315a733faff81659b
refs/heads/master
2020-03-21T01:39:09.984297
2018-06-20T19:28:42
2018-06-20T19:28:42
137,953,755
1
0
null
null
null
null
UTF-8
Python
false
false
94
6
blockdiff-cli3.6
#! /usr/bin/python3.6 import blockdiff.cli if __name__ == '__main__': blockdiff.cli.run()
2cfb17cdc1215873399e56102be2d3c9e1095a05
46e4d09512b5bfb45d821a0f172172436b81a891
/celery_app/tasks/historical_view/fetch_es_data.py
4ad20b0911688707ef4a9b1277ae859ea356ae14
[]
no_license
MANOJ1304/Python-Central-Celery
e9bd237e0607dfcd21185c2275bac70d9c39a341
ec36c517f18731bd103d6135cac5e07c55064be8
refs/heads/master
2023-03-01T17:22:51.589021
2021-01-21T08:42:16
2021-01-21T08:42:16
338,272,158
0
0
null
null
null
null
UTF-8
Python
false
false
599
py
fetch_es_data.py
from cross_shopping_analytics.utility import pull_data, normalization class ESDataFetch(object): def __init__(self, config): self.config = config def get_plain_data(self): config = [ self.config.get('es').get("index"), self.config.get('es').get("username...
9ab712f9f723bf34f4a3a72a12775361c588497d
a2a2f7bb6fe41f3a24e0d856bb48b4a15536f158
/AnalysisOfUnstructuredData/helpers/tweet/circle_place.py
f6bbdd56a0d63e1a3bfbc3a2eaa2fe25997318ea
[]
no_license
TheDecks/Studies
48acbaa6320549c47cf27730b25ed9411446c4e6
10f8df64e519427970b88fd1f460ec7c0536f29f
refs/heads/master
2020-08-10T20:46:41.428011
2020-01-17T13:34:59
2020-01-17T13:34:59
214,417,564
0
0
null
2020-01-17T13:35:01
2019-10-11T11:21:32
Python
UTF-8
Python
false
false
832
py
circle_place.py
from typing import Tuple from AnalysisOfUnstructuredData.helpers.tweet.place import Place from math import pi, cos, asin, sqrt class CirclePlace(Place): def __init__(self, name: str, middle_point: Tuple[float, float], radius: float): super(CirclePlace, self).__init__(name) self.mid = middle_poin...
9b3114196402529770444403968c7e93f78e0694
4a8d25cf2ae37cac7cfbf8d2c66314bcb60950b5
/_includes/solutions/microbit/simple-beacon.py
d170681bffebfc2e77f40960910d6e88ff8042fc
[]
no_license
deejaygraham/makers-n-creators
f557497bcedb937308b567a417a8c9f960f8d7ea
3bca8f7c7fd86256e29722a4e222ef573cfb8952
refs/heads/master
2021-01-20T00:46:44.039274
2019-12-16T08:32:31
2019-12-16T08:32:31
83,799,008
2
1
null
null
null
null
UTF-8
Python
false
false
205
py
simple-beacon.py
from microbit import * import radio beacon_id = 1 # Lowest power transmit radio.config(power=0) radio.on() while True: radio.send(str(beacon_id)) display.show(str(beacon_id)) sleep(1000)
76e68ca430c8068c75007fdedfc20901cfb5fdc6
8f7367fdf4f0173babbad11cdd8555cf57f1ea07
/kakuro.py
be2e1b5a85595520ba551b813df51211a052a827
[]
no_license
joeyuan19/KakuroSolver
c9009dbc3c17bdf783b759481282662927dbb49e
19efc8a8bf5bf7abc5b1d6f3d124ce5979bcf0b3
refs/heads/master
2020-04-04T22:51:43.774084
2018-11-06T06:46:15
2018-11-06T06:46:15
156,338,493
0
0
null
null
null
null
UTF-8
Python
false
false
8,230
py
kakuro.py
import itertools def generate_sums(): for a in range(1,10): for b in range(a+1,10): yield [a,b] for c in range(b+1,10): yield [a,b,c] for d in range(c+1,10): yield [a,b,c,d] for e in range(d+1,10): ...
fe337e98c09f443399735608fc2a0a9f56cb73df
a009253336153bad578e22ad36102d3eb112a38d
/main.py
a01915de5dc47463a823fe09cc7670c85d882c21
[]
no_license
privatecaptain/painting_pro
bdb6b41e9868f20b5806d62e3888232b3b646bc9
af0c02562324acc4652ca0c2bc24c572afafbb7a
refs/heads/master
2021-01-10T04:38:37.660859
2015-12-30T04:19:21
2015-12-30T04:19:21
48,781,529
0
0
null
null
null
null
UTF-8
Python
false
false
1,661
py
main.py
from flask import Flask,render_template,request,make_response from flask.ext.sqlalchemy import SQLAlchemy # Init Flask Instance app = Flask(__name__,static_url_path="/static") # IN PRODUCTION,PLEASE TURN THIS OFF!!! app.debug = True SECRET_KEY = '$&^&B&*^*MN&*CDMN&*()B^&*()P^&_N*NM(P)*&D()&*^' # db config app.con...
041aa406af6f8861f93cba700178beae1273b0d6
e482c992b167a72abbdf979a72693b64cde0080c
/Graphs/Java/q.py
6d5963544682978747b266fd1c090a9b47e5f190
[]
no_license
satishbhambri91/Data-Structures-and-Algorithms
7da9e6f0c6997e4b769fb6cee6874875fd2baad4
e079f98ea0c628fe1b3c1e79f6b40a03eaa91f44
refs/heads/master
2021-05-14T03:18:47.691582
2019-01-12T21:21:48
2019-01-12T21:21:48
116,616,972
0
0
null
2019-01-12T06:50:35
2018-01-08T02:06:07
Java
UTF-8
Python
false
false
65
py
q.py
new_range = [i*i for i in range(0,5) if i%2 != 0] print new_range
2691a0570874cef9741732a88c7a1ac63822f693
16bae1fc18cbaa7ed7ccfd028f07dadbd49a9261
/elif_test.py
b39656673bd1884430934a95a1b770fda0a9e36e
[]
no_license
jmcbroome/practice-area
f87ff52057564d67689a675e7c12779e43dffbbc
3b3d25a7de2002bcb095acdc38b388e2a5662eef
refs/heads/master
2020-03-26T00:25:57.103596
2018-08-10T18:28:34
2018-08-10T18:28:34
144,320,082
0
0
null
null
null
null
UTF-8
Python
false
false
111
py
elif_test.py
spam = input() if spam == 1: print('hello') elif spam == 2: print('hi there') else: print('greetings')
aed9de1e928a65338685005c8b4f699bfd27abb9
4539ff15683d78774720b5c0ed91ceeb8a7e3249
/test_veterans.py
8e4de6f29d8f72249656db0bf3f63d1f30f3a6d2
[]
no_license
bagjohn/mouseworld
1bf4bb38fada1955227d3b71bc58c272533badf8
423dfdadedd8745f1c7cce73c3c11ff3e5aef2fd
refs/heads/master
2021-01-22T03:29:40.990269
2017-07-26T19:11:26
2017-07-26T19:11:26
92,380,580
1
0
null
null
null
null
UTF-8
Python
false
false
4,735
py
test_veterans.py
from mouseworld import mouseworld import time import sys import numpy as np mouse_data = np.load(sys.argv[1]) if mouse_data['motor_NN_on'] : if mouse_data['learning_on'] : num_mice = [0, 0, 152] else : num_mice = [0, 152, 0] else : num_mice = [152, 0, 0] genome = np.around(mouse_data['gen...
bcc5d775efcf926488873a95a8429338756376b3
0a292cbb4e09dcb91fb7f4d058c7ed2474b19cc7
/gan.py
35107c19bfdf040422438af26a4b618b7d14aa01
[]
no_license
sriramvasu/segnet_vgg16
52797e865d5779cdc5dd509541c85fea45234471
c6a863f0ef8e34787dfac8022a9daa5b6c24de50
refs/heads/master
2020-12-02T08:17:28.419262
2017-08-24T17:51:44
2017-08-24T17:51:44
96,801,198
0
1
null
2017-08-23T18:07:37
2017-07-10T16:57:43
Python
UTF-8
Python
false
false
11,516
py
gan.py
import tensorflow as tf import numpy as np from image_reader import image_reader import os import math from utils_mod import * #import h5py import fnmatch from argparse import ArgumentParser class DCGAN(): def __init__(self,keep_prob=0.5,is_gpu=False,weights_path=None,pretrained=False): self.keep_prob = keep_prob...
5eed3d6c09ed640cb105d6cd7510cfc5f3f4ab28
30172cf8c7eca2eb5a825b96ed276ba68c746e9f
/charts/plot_albedo_multi_regression_v1_all.py
fde736f8815281d2db4a06d1e35fc7d878fcaf18
[]
no_license
masseyr/deciduous
272451928b0d0cf76aede4d4889a224e87a49c3d
0d2cbb7381f856a7e720419e661b53e633da39b9
refs/heads/master
2021-05-26T05:16:30.208263
2019-12-11T00:25:40
2020-06-09T00:25:40
127,552,187
0
0
null
null
null
null
UTF-8
Python
false
false
22,991
py
plot_albedo_multi_regression_v1_all.py
from geosoup import Handler, Opt, Sublist, RFRegressor, MRegressor, Samples from datetime import datetime import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib import gridspec import matplotlib.cm as cm from scipy.ndimage.filters import gaussian_filter from scipy.ndimage import spline_fil...
6735f7a9b3daeb68045ea4b7336dbd0a7d779d95
a2f979f4b3cb07810d9a957a229091f7305965a4
/day-7/part-1.py
ed226a9b0a4bfe57d5c75b85c70d39ab32eae4f9
[]
no_license
PandaStripes11/advent-of-code-2020
2c48d439c2edbc65659381339ee2f8bff5326ebc
1ac5672e8ccbc7cfa80ca16636b9c5914fb9c8cb
refs/heads/main
2023-02-08T19:36:22.093316
2021-01-02T22:41:43
2021-01-02T22:41:43
326,283,386
0
0
null
null
null
null
UTF-8
Python
false
false
812
py
part-1.py
with open("./day-7/input.txt") as inp: data = inp.read().splitlines() all_bags = [] unique_bags = [] def handy_haversacks(color): global all_bags global unique_bags bag_lines = [line for line in data if color in line and line.index(color) != 0] if len(bag_lines) == 0: return [] else: ...
b169c08d4638a22bd6b8283ac7f643874307c5ec
d487e736905afd6747b4d4ba93c0e1ccdca611a6
/green.white.py
8d39fcaa6790e943197722724b4500e8588ee143
[]
no_license
Amla63/List
2cd8c3bcc91b843debfb2f135201cd3928523c8b
926defc8eebb921f940ca0f02ef7e2b165dde3f3
refs/heads/main
2023-06-08T04:07:44.692220
2021-06-29T11:22:42
2021-06-29T11:22:42
378,122,233
0
0
null
null
null
null
UTF-8
Python
false
false
93
py
green.white.py
a=['red','green','white','black','pink','yellow'] i=1 while i<(len(a)-2): print(a[i]) i=i+1
54fb99ad2815671d0615bf895c33660da48e87c6
abc2d1fc623604c68b81998d3702d2b375881245
/vars.py
528ca44806b7b29ace7b179529b43187f3ae4fc1
[]
no_license
RogerTangos/bikepoints-scratch
c5d0f04f62b65733413f87031e271481a1b00e74
61bd56844d45e9f3a3a9e7f2a03056095323276e
refs/heads/master
2022-12-15T00:24:13.459947
2020-09-15T10:58:53
2020-09-15T10:58:53
290,798,107
1
0
null
null
null
null
UTF-8
Python
false
false
71
py
vars.py
# The dataset name. # DATASET = "cambridge" DATASET = "cambridge-small"
1ad3d8d98ce45a5fd01ba5ee8b0299c8bad83dbe
7eb3009e95a15a992c0c21afe0884008ba10544d
/game/src/mod/distributed/ModServerRepository.py
d27d091a00738c4804755dc8f506b536dcad8dac
[]
no_license
tsp-team/ttsp-src
be391ebc44f01463ff2e802ab039438e07a645f3
9bf1869adbc4f0c1dff69095c04f4604a515c4e4
refs/heads/master
2022-12-04T09:50:36.944988
2020-08-23T21:01:32
2020-08-23T21:01:32
263,228,539
0
0
null
null
null
null
UTF-8
Python
false
false
8,391
py
ModServerRepository.py
from src.mod.distributed.ServerRepository import ServerRepository from direct.distributed.MsgTypesCMU import * from direct.distributed.PyDatagram import PyDatagram from panda3d.core import DatagramIterator, PointerToConnection, NetAddress from src.mod.ModMsgTypes import * class ModServerRepository(ServerRepository): ...
2b81f164630d3b15bb7b41f23b090486bf10365a
d93b3e835f1bee1fd792a269bf9e8aeb6b389bae
/max_days_in_year.py
9273b8793aa64a61ec7a89bd83ff0337aac93e7f
[]
no_license
Tcpat/MIT-py
7527de3408d9dd91fdae98fd9f2a61493d9af862
02c0ba3ba9a7ed5154491fba467cfef75e40ef80
refs/heads/master
2022-11-22T00:58:37.228919
2020-07-27T19:23:04
2020-07-27T19:23:04
271,955,776
0
0
null
null
null
null
UTF-8
Python
false
false
676
py
max_days_in_year.py
from datetime import date, timedelta def most_frequent_days(year): start_date = date(year, 1, 1) end_date = date(year, 12, 31) delta = (timedelta(days = 1)) week_days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] dict_days = {} for day in week_days: di...
163c6318bad7999100cde9103eca675f6343f3d2
445d3fa62b9c8b9510dd025b89c91ca5371145c2
/Set10/10.4.py
c6e4fc4c9f1a2155037edc1c3283fbf5f80ea290
[]
no_license
RadoslawNowak3/PythonUni
2198aefc44b677b737bab8ed6e07713eb615b3b6
86b69fc016152faf3adfad636bfad1825332fb36
refs/heads/main
2023-02-23T22:00:32.833509
2021-01-30T04:22:43
2021-01-30T04:22:43
null
0
0
null
null
null
null
UTF-8
Python
false
false
735
py
10.4.py
from Queue import * import unittest class Test(unittest.TestCase): def setUp(self): self.queue = Queue(); def test_str(self): self.assertEqual(str(self.queue), '[None, None, None, None, None, None]') def test_eq(self): self.assertEqual(self.queue, Queue()) def test_is_empty(self): self.asse...
692062137612b56581a02ce9023199ecda7d8380
b5e6421138031d5eacc51fb1c1fde12ed8dccf42
/old/Python/Exploration des donnees/CinetiqueInflorescencesFonctions1.py
2398ba88f2d15b454049ab2e4a44fc51a532c06f
[]
no_license
fredboudon/cecidomyie
5bd9896490e58925eac5146ba0e947c39653089b
93d328001ad042d2a5b06e47a3b1a5e9aa991bc4
refs/heads/master
2020-05-24T07:50:03.831959
2019-05-16T11:09:57
2019-05-16T11:09:57
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,785
py
CinetiqueInflorescencesFonctions1.py
# Importation des librairies import matplotlib.pyplot as plt from pandas import * # Pour la lecture des fichiers def bloc (Nom, groupe, Sheet, un, deux, trois, quatre, cinq) : f = read_excel('../../Fichiers de donnees/Donnees re organisees/Fichier donnees floraison/'+Nom+'.xls') liste = f.groupby(groupe).su...
a9e7162599965aaddc9b2d282c677f5493f5435a
4a1bc2159552653d21b8be83f49776f96a401515
/voteit/velruse/image_plugins/tests.py
fb6641e7c05e270a0b9a277e5b3b4eea5b33e9ab
[]
no_license
VoteIT/voteit.velruse
766608b21449a5528e13a6cd458ea0efea036296
27d81311022cb09c562410683de02209c22f06e1
refs/heads/master
2020-04-17T00:46:23.938651
2014-02-21T19:06:36
2014-02-21T19:06:36
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,362
py
tests.py
import unittest import colander from pyramid import testing from zope.interface.verify import verifyObject from zope.interface.verify import verifyClass from voteit.core.models.interfaces import IProfileImage class FacebookProfileImagePluginTests(unittest.TestCase): def setUp(self): self.config = testing...
a62766e76b32fc7fa9c6d6e6c6e5b2ec1ab6f940
b3f7997e3d1f59969ba3a4fbe4b525c08586296b
/alembic/versions/3e89e6178be0_create_user_table.py
6cb5a33469924c7dafaa50fa1f07d664f693ea62
[]
no_license
alam-mahtab/fastapi
53dc492b97bc1f3c93a46ff8f14f864050a189ee
6809d738bb4faa352d454aa62a23f80679cf76c2
refs/heads/main
2023-02-21T05:24:47.306738
2021-01-04T06:15:56
2021-01-04T06:15:56
324,480,319
0
0
null
null
null
null
UTF-8
Python
false
false
1,045
py
3e89e6178be0_create_user_table.py
"""create user table Revision ID: 3e89e6178be0 Revises: Create Date: 2020-12-30 11:14:37.997289 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3e89e6178be0' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_tabl...
add1d75fc1f9467a459fe6c596d0e14fecc7d76e
96f08b29b0bbcc81f020598820628708c37aa0fd
/exercise_03/step_03/main.py
48c3ee1f96d5a1e89d756e0d0ba4aa2782852da0
[]
no_license
dawkinrm/lab_04
f8a157763b003037d13b9795c2543609da975db6
e14e0e71082bbf508ce246bed07baaf8fedfd8fc
refs/heads/master
2020-04-06T03:39:11.025666
2015-03-03T21:51:59
2015-03-03T21:51:59
31,623,489
0
0
null
null
null
null
UTF-8
Python
false
false
1,865
py
main.py
import random import math from kivy.app import App from kivy.uix.widget import Widget from kivy.uix.settings import SettingsWithSidebar from kivy.properties import ObjectProperty, NumericProperty, StringProperty from kivy.core.image import ImageLoader from kivy.core.audio import SoundLoader from kivy.core.window import...
e5b75f6db46d03910c9eab890fb5be2c18d8b448
b6f152c8138e01ee4db4669a83673d5b40f87f74
/getcounty/pipeline/processing.py
d1edefaf0e4a519fa92e0562fd44507b74bdfb7e
[ "MIT" ]
permissive
OaklandPeters/getcounty
4a1fcf6b0c14c54e327592ae619ff0ab5cdfc8c2
7fd86f3c9c02617ab015ccf4ff1e71ab081aaf87
refs/heads/master
2021-01-25T06:36:30.439312
2014-11-04T17:03:52
2014-11-04T17:03:52
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,920
py
processing.py
""" Build Plan: Setup dummy function for unified processing Setup pipeline Write-out at end Hand test Setup pipeline unittest Create value to fill in for values which were not found IE when parts of the pipeline fail class NotFound() """ from __future__ import absolute_impor...
9c76a19e662492359f79adcb34730a1089052cc0
3b67da8ecae2db409b0c13cc57fdd1d094c3680f
/src/services/analytics.py
00fe61b157423bab7e98adff38edf25025e69db4
[]
no_license
dmRohach/fastapi_blog
4784a63699824da6a0f0aebae9cf279dc09988f2
dac6ee28310f872dec2ff31759aa4b7b46ea83a7
refs/heads/main
2023-06-10T17:38:53.952418
2021-07-10T00:40:14
2021-07-10T00:40:14
382,381,925
0
0
null
null
null
null
UTF-8
Python
false
false
836
py
analytics.py
from fastapi import Depends from sqlalchemy.orm import Session from sqlalchemy import func from datetime import date from ..database import get_session from .. import tables class AnalyticService: def __init__(self, session: Session = Depends(get_session)): self.session = session def daily_analytics...
3f6a5dcf7f58b65f0baa10ab43a40083293ecb11
a394b1053f018ff8be63221c61682df03af4937b
/admin/rdm_custom_storage_location/export_data/views/location.py
5e129bfab8936680c17370f02ed88f18c2fd0ff1
[ "Apache-2.0", "LGPL-2.0-or-later", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "MIT", "AGPL-3.0-only", "LicenseRef-scancode-unknown-license-reference", "MPL-1.1", "CPAL-1.0", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-warranty-disclaimer", "BSD-2-Clause" ]
permissive
RCOSDP/RDM-osf.io
81b11d9511f6248ec9bccb6c586b54a58429e1e7
5d632eb6d4566d7d31cd8d6b40d1bc93c60ddf5e
refs/heads/develop
2023-09-01T09:10:17.297444
2023-08-28T04:59:04
2023-08-28T04:59:04
123,298,542
12
24
Apache-2.0
2023-09-12T08:58:28
2018-02-28T14:46:05
Python
UTF-8
Python
false
false
9,486
py
location.py
# -*- coding: utf-8 -*- import inspect # noqa import json import logging from django.contrib.auth.mixins import UserPassesTestMixin from django.http import JsonResponse from django.views import View from django.views.generic import ListView from rest_framework import status as http_status from admin.rdm.utils import...
796a9d1db1667e968523a6db7b589a3df701651c
b81fdb2e007a03e2e80e2309272835ccd47270c6
/test_session.py
6fb72a4e767ebfc2a4173adc23886b37a035d897
[ "BSD-3-Clause" ]
permissive
rayluo/flask-session
ae1a359741e71a76d97eac5fcb8641b2d96281c1
ea8351438e4c79bad59429a43dd662c167c32a32
refs/heads/0.3.x
2023-05-11T02:07:55.520742
2020-04-02T21:42:13
2020-04-02T21:42:13
250,658,856
6
5
NOASSERTION
2020-04-02T21:42:14
2020-03-27T22:07:13
Python
UTF-8
Python
false
false
6,365
py
test_session.py
import unittest import tempfile import flask from flask_session import Session class FlaskSessionTestCase(unittest.TestCase): def test_null_session(self): app = flask.Flask(__name__) Session(app) def expect_exception(f, *args, **kwargs): try: f(*args, **kw...
01058176aeca50c0e596a4fa4d3a365641d600f5
56fdd9739056ef70d2bbc61c31e34616d9560e8d
/openweathermap.py
fe33d7d238bb9254d0fb6bb8c272b73eb06d25c9
[]
no_license
smoilovskiy/API_openweathermap
8e2610c428c4c3f35f95a914b5c174956e7e1ebc
47df5b32deb505c07b48721f7f7605aab0105bd7
refs/heads/master
2020-12-04T12:51:38.608304
2020-01-04T13:57:01
2020-01-04T13:57:01
231,771,867
0
0
null
null
null
null
UTF-8
Python
false
false
568
py
openweathermap.py
import requests api_url = "http://api.openweathermap.org/data/2.5/weather" city = input('Enter City : ') params = { 'q': city, 'appid': '11c0d3dc6093f7442898ee49d2430d20', 'units': 'metric' } res = requests.get(api_url, params=params) # print(res.status_code) # print(res.headers["Content-Type"]) # prin...
1ba8cda2d2376bd93a169031caa473825b3912da
bb87579e47fc04b299694b8a8fe318f022f54ee8
/Practice Python/Exercise_02.py
3b9985f40f02a9f1ad73df4092fdc81f17bc70b8
[]
no_license
QaisZainon/Learning-Coding
7bbc45197085dfa8f41ac298d26cf54e99e7b877
a3991842e79c30f24d7bc0cca77dbd09bc03372f
refs/heads/master
2022-12-23T05:47:26.512814
2020-09-25T08:10:20
2020-09-25T08:10:20
297,945,320
0
0
null
null
null
null
UTF-8
Python
false
false
795
py
Exercise_02.py
''' Ask the user for a number Check for even or odd Print out a message for the user Extras: 1. If number is a multiple of 4, print a different message. 2. Ask the users for two numbers, check if it is divisible, then print message according to the answer. ''' def even_odd(): num = int(input('Enter a n...
33412cfd9e653d71f9540d1c7948ef95567f35e7
bd0c3044a335d784fdc54910a43a658c0c44056b
/nrc_db.py
ab286f1f270d1fce31975c8fb99d1ae87efb56a2
[]
no_license
Danielafe7GitHub/Musicalizador_TExtos
ce247ff257b8b6a45600c47c83515220749954cd
0bca957c27f7418b4fac82806d95105a07506951
refs/heads/master
2020-03-13T09:51:48.599750
2018-05-31T22:01:30
2018-05-31T22:01:30
131,072,830
0
0
null
null
null
null
UTF-8
Python
false
false
1,097
py
nrc_db.py
#!/usr/bin/python import math import nltk from nltk.corpus import wordnet #Cargando nrc_lexicon al vector ncr_lexicon [[palabra,anger,antici,disgu,fear,joy,negati,posi,sadness,surprise,trust],[...]] n = open("nrc.txt", 'r+') linea = n.readline() pal_senti_emoci = [] nrc_lexicon = [] pal_pivote = "aback" pal_senti_emoc...
ee30833983e87a8869185a20417bd28f2da7327d
3b374cc7122ffb262ee1e2293e1d5ec39b20d801
/temp.py
370e4dd3da060c05c80efc19adcd0a819f6c772c
[]
no_license
queeniemak1106/ctof
e190bc9a5af54d86908ca3f8b4415088e2e5d56f
7c2ceac7ee4e2cc9687e75ce9650c5e41fbe0859
refs/heads/master
2022-11-27T11:51:06.435623
2020-08-04T11:30:26
2020-08-04T11:30:26
284,957,882
0
0
null
null
null
null
UTF-8
Python
false
false
114
py
temp.py
c = input('please input temperature in C: ') c = float(c) f = c * 9 / 5 + 32 print('today temperature in F is', f)
79f2fc929e0ae3523cac045626a0636fb44929ef
82805e03beef89d29901a156b33a658416fe9639
/apps/concours_networks/actors/twitter.py
8597a83ea963dd6ea605f080da637b2b7f823c98
[]
no_license
neironus/100DaysOfPython
a1db806a3da41f7e825c156acb4d72b588d30c84
65dc932d92b15d877ff4f0e839b037b89b1ba072
refs/heads/master
2020-08-04T23:37:31.918112
2018-10-04T07:28:24
2018-10-04T07:28:24
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,542
py
twitter.py
import twitter import re class Twitter(object): def __init__(self, key, secret, token, token_secret): self.api = twitter.Api( consumer_key=key, consumer_secret=secret, access_token_key=token, access_token_secret=token_secret, sleep_on_rate_limit=...
b0b6409d78926cd292955dcc0c3f99d8d65c5144
af05288af7008e70dcb9397e9e57fb8a264e1254
/images.py
94c6615be5310367d6ea3c679453b3d2ce6c6301
[]
no_license
mtejedorg/OpenCV-Tutorials
a129c7ab049f987def9af5a6adcdc5c9bcf31890
1b3ea472b568635a77d288c523d5bb193dc72979
refs/heads/master
2020-12-27T12:16:06.789027
2015-11-18T01:35:30
2015-11-18T01:35:30
null
0
0
null
null
null
null
UTF-8
Python
false
false
963
py
images.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # David Pascual Hernandez, 2015 import numpy as np import cv2 import sys if len(sys.argv) != 2: print "usage : python images.py <image_file>" sys.exit(1) else: # Leemos la imagen (en escala de grises) img = cv2.imread(sys.argv[1], 0) # tambien ('img', cv...
77973c6b6d3b285ccd613e3e5141a5de869ac634
6f8fa938b3002b640e50b6767ebd0b517fa6cc35
/plataforma/core/views.py
e7b62d70eda4708db0fd33f5d1e1d06b1443d6db
[]
no_license
hernandavidc/ctrata
087e815eb49f6fe3e134862996d7169fbce2b7b3
ebaa1edaa18aa5fc6a8b3deadabb3a8ae19a4eb6
refs/heads/master
2022-11-09T22:51:08.781105
2018-09-01T18:55:50
2018-09-01T18:55:50
147,011,346
0
1
null
2022-11-03T07:53:14
2018-09-01T15:45:17
Python
UTF-8
Python
false
false
3,020
py
views.py
from django.views.generic import TemplateView from django.views.generic.list import ListView from django.shortcuts import render, get_list_or_404 from django.http import JsonResponse, HttpResponse from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required from django....
c4d8d513c2aaeb9d5cdb7e998095e402c66b6061
0cb80be5ca6ecd6a1e958304dd2e9bc44d951d31
/visualizations.py
90350887371f0d75a8046ec461545d4fbffcd2a9
[ "MIT" ]
permissive
sinhars/Kaggle-Stroke-Prediction
9f71e66ff371fe489c8d7671603a4b781a65fb49
7689545ff8bed601cb7f524eebc836c18c5cea3f
refs/heads/main
2023-04-23T17:56:51.515403
2021-05-01T19:40:05
2021-05-01T19:40:05
363,207,936
0
0
null
null
null
null
UTF-8
Python
false
false
2,328
py
visualizations.py
import math import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns class Visualizations(): #Class Constructor def __init__(self, style="seaborn", fontSize=12): params = { 'axes.titlesize': fontSize+2, 'xtick.labelsize': fontSize, ...
d079d96895b67b34191cb1500c4f91687ee72469
b5519125e19b18b10e352f3811e3d7c194dbea65
/string_train.py
4e5b7988349da19bef43a88aa6e99e8d62fb3916
[]
no_license
Eugene-twj/python_train
56961a08bd2ff97a157038891e9b418c2c7317cb
0e91a186cdff4c6ebcb9ac59c63eabdbb5c04b2d
refs/heads/master
2020-03-21T08:55:20.498326
2018-06-23T05:26:10
2018-06-23T05:26:10
null
0
0
null
null
null
null
UTF-8
Python
false
false
657
py
string_train.py
message = 'just try "hello world"' print(message) message = "try again " print(message) name = "asDw" print(name.title()) print(name.upper()) print(name.capitalize()) print(name.casefold()) old = 23 print('hi my name is %s,I am %d' % (message, old)) print('%2d-%02d' % (333, 1)) print('%.3f' % 3.1415926) r = 17.125 pr...
99f4ba5d624105fd6832b3e3763392b249f33d59
96dcea595e7c16cec07b3f649afd65f3660a0bad
/homeassistant/components/config/automation.py
72a493f8c1f0828522705d4f077bdcc7b61bb5b4
[ "Apache-2.0" ]
permissive
home-assistant/core
3455eac2e9d925c92d30178643b1aaccf3a6484f
80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743
refs/heads/dev
2023-08-31T15:41:06.299469
2023-08-31T14:50:53
2023-08-31T14:50:53
12,888,993
35,501
20,617
Apache-2.0
2023-09-14T21:50:15
2013-09-17T07:29:48
Python
UTF-8
Python
false
false
2,392
py
automation.py
"""Provide configuration end points for Automations.""" import uuid from homeassistant.components.automation.config import ( DOMAIN, PLATFORM_SCHEMA, async_validate_config_item, ) from homeassistant.config import AUTOMATION_CONFIG_PATH from homeassistant.const import CONF_ID, SERVICE_RELOAD from homeassist...
838d8acbaef9f59162a1e837a1c5efb268d2ec14
ac47074bcf749273941ab01213bb6d1f59c40c99
/utility/code_format.py
afa7b6adbffaf5bcc8ae4ce160b56b4795b38915
[]
no_license
xuzhihua95/quant
c5561e2b08370610f58662f2871f1f1490681be2
c7e312c70d5f400b7e777d2ff4c9f6f223eabfee
refs/heads/master
2020-05-19T17:04:08.796981
2019-04-24T02:50:29
2019-04-24T02:50:29
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,503
py
code_format.py
import numpy as np class CodeFormat(object): """ 基金、股票代码后缀操作 """ def __init__(self): pass @staticmethod def fund_code_add_postfix(code): """ 添加wind基金后缀 .OF """ if type(code) in [np.float]: code = int(code) code_str = str(code) code_str = code_s...
3f5a916d87450c0b59c3e89b3caaac22759a726d
01aa7be59cc2753accf5a79b680a3fc910160fb9
/tests/test_admin.py
8ece11b894bf9324aa786325442c51127897fe94
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
inveniosoftware/invenio-sipstore
38c7f1c0138f14ce788dceb66044a5779e90b453
c213d0738360f44eebd643f2e095a2ce53bd9dcc
refs/heads/master
2020-04-06T06:17:15.246973
2019-02-16T19:21:45
2019-02-21T15:17:12
57,033,641
1
11
NOASSERTION
2022-02-16T21:24:25
2016-04-25T10:40:12
Python
UTF-8
Python
false
false
2,069
py
test_admin.py
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2019 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Admin interface tests.""" from __future__ import absolute_import, print_function ...
46ffd32cebc7fac3d8c95695bfd7a6a0231fe8f7
46e8408eba8b63f3c8598eabb515e6306e4ebc19
/LindaSonrisa/applications/boleta/views.py
5aebd1f7094313ec861b8f059436cef849627c57
[]
no_license
SieteGL/azure
36d559053f9c07325a1182fddb227eca42850fe1
d448e44455df15694d2928763664a0831b995c9e
refs/heads/master
2023-06-22T19:47:17.825081
2021-07-21T16:35:32
2021-07-21T16:35:32
372,620,927
0
0
null
null
null
null
UTF-8
Python
false
false
13,957
py
views.py
from django.utils import timezone from datetime import datetime, time from rest_framework import serializers from rest_framework.generics import ( ListAPIView, CreateAPIView, ) # from rest_framework.authentication import TokenAuthentication from rest_framework.permissions import IsAuthenticated, IsAdminUser fr...
ee06ab4807fe87d87deb7754fb1ab1c5bd6357ca
a883229fe2bdfb3a56e11d87ec9791e4c534c827
/BNUtilities.py
dd92943281a568699a7527c7c4b6ffeae41fe12b
[]
no_license
francescodelduchetto/knowledge_chatbot
dfbc060e6539bb75e05d33035bca83a6fd8278a9
a8677ebff18933f786261a4cad4c1ae2d79afe6b
refs/heads/master
2021-06-26T03:31:01.366731
2017-09-11T12:27:30
2017-09-11T12:27:30
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,915
py
BNUtilities.py
import urllib, urllib2, json, re, requests from pprint import pprint bn_key = 'e9f3fe01-6f53-4f49-829f-8dbaf49af6b9' def disambiguate(sentence): bn_disambiguate_url = 'https://babelfy.io/v1/disambiguate' request = bn_disambiguate_url + '?' + 'text=' + urllib.quote(sentence.encode('utf8')) + '&lang=EN' + '&th=.0...
d78c1585f0192bd295e487a3e7772aa52dc25c2b
1a2d5bd2aec6fb4498f3656761a288d27aa7155e
/coral/schema/school.py
bee125db982577ec6a08a2069420463a45a43013
[]
no_license
qq7987590/coral
2f70a48f7ca089645d6fb0b4d8799728a3424c1d
53f2f10070ec526210bb48b9f45d8caa97537287
refs/heads/master
2023-07-06T01:24:18.170331
2021-08-08T07:46:34
2021-08-08T07:46:34
393,866,039
0
0
null
null
null
null
UTF-8
Python
false
false
387
py
school.py
from .common import RequestSchema, marshmallow class AddSchoolSchema(RequestSchema): name = marshmallow.String(required=True) area = marshmallow.String(required=True) location = marshmallow.String(required=True) location_coordinate = marshmallow.String(required=True) liaison = marshmallow.String(r...
74262be8efa31bf9c88c975746a0b0e9bf24ea53
c9bdd7f7b29fffe3b04c4d92cbc40e59ebf33a8a
/lab02/lab02-2.py
46849a47635818c7f6d221c77486aaeb26e7ec33
[]
no_license
ksaid0203/computer-graphics
c7864155d962ebf2d33f8481b9e125fe978b4841
b5acd2315592e019e674caaf5f295ecd3ca25b63
refs/heads/master
2020-08-01T11:44:06.911545
2019-12-23T10:55:04
2019-12-23T10:55:04
210,986,868
0
1
null
null
null
null
UTF-8
Python
false
false
1,749
py
lab02-2.py
from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * IsSphere = True IsSmall = True """ 메뉴를 어떻게 만들고 작성하는지 보자. """ def MyDisplay(): global IsSphere, IsSmall glClear(GL_COLOR_BUFFER_BIT) glColor3f(0.5, 0.0, 0.5) if IsSphere and IsSmall: glutWireSphere(0.2, 15, 15) elif ...
4bdbc943a5e5cc9e334409f19bcd6568f88cb6ef
cb4e4cbd8d073ddde387f013e768330e15c44799
/알고리즘/BOJ/BOJ1158.py
94dc2d0945dca016da6cc9260fbf1606f1c0130d
[]
no_license
greendolphin7/Algorithm_Practice
ec30faf12d7e2efdebcc015993d8751da7cbc5f7
dc7913b625f600e2c875be7f8e9b173efea93235
refs/heads/master
2023-05-23T21:13:41.277611
2021-06-16T15:10:38
2021-06-16T15:10:38
280,076,863
1
0
null
null
null
null
UTF-8
Python
false
false
377
py
BOJ1158.py
# 요세푸스 문제 from collections import deque N, K = map(int, input().split()) people = list() people = deque(i for i in range(1, N + 1)) answer = [] while len(people) != 0: for i in range(K - 1): move_person = people.popleft() people.append(move_person) answer.append(str(people.popleft())) result =...
747b01efb8f73e3f7d55ca879622e930ba2cdf4a
553f126db4999cd219274a59a68f22cbb5d86463
/resource/exception.py
e56c0d58b35dde62f146211af7ac6bc618c9b837
[]
no_license
doyeon326/simple_python
57bbd9a498beb6f4aa02673b16e0d31429984eee
8343ef369de46095f5375de45e85b8900174f302
refs/heads/master
2023-01-29T16:40:56.680578
2020-12-11T09:09:28
2020-12-11T09:09:28
316,967,430
0
0
null
null
null
null
UTF-8
Python
false
false
2,364
py
exception.py
#파이썬 예외처리의 이해 #예외 종류 #문법적으로 에러가 없지만, 코드 실행(런타임)프로세스에서 발생하는 예외 처리도 중요 #linter: 코드 스타일, 문법 체크 #SyntaxError: 잘못된 문법 #print('Tes) # x=>y #NameError : 참조변수가 없음 a = 10 b = 15 #print(c) #ZeoDivisionError : 0 나누기에러 #print(10 / 0) #IndexError: 인덱스 범위 오버 x = [10, 20, 30] print(x[0]) #print(x[3]) #예외 발생 #keyError dic = {"...
5c455c0d3e807c9a5ebcf005ed664cad70fd4f56
4a4de7322e2a68442a6025474b4e6c622b9e1496
/one-pixel-attack/differential_evolution.py
7c6ec040eeffd011291d46ebe4cb2d5ddeb4bc86
[ "MIT" ]
permissive
Wapiti08/GAN_Image
f794888ddace71d0395081bc9c76a6c95004574e
6c66b6e79985d2b477f0195e1673ba473640569c
refs/heads/master
2023-01-01T01:14:43.197637
2020-10-15T16:35:39
2020-10-15T16:35:39
287,821,257
0
0
null
null
null
null
UTF-8
Python
false
false
1,958
py
differential_evolution.py
""" population should be a numpy array. If number of candidates in population is N, and number of perturbations for each sample is M, then the shape of population array is (N, M, 5) """ import random import numpy as np def initialize_random_candidate(config): """ As mentioned in the paper """...
118528210a6ffb8d4b6a33815f98f9ac9b59f33d
d2c92cfe95a60a12660f1a10c0b952f0df3f0e8e
/weddingdress/settings0.py
32d9596c64282b198fc07c4906c73a0f35af86f4
[]
no_license
snamper/zzpython
71bf70ec3762289bda4bba80525c15a63156a3ae
20415249fa930ccf66849abb5edca8ae41c81de6
refs/heads/master
2021-12-21T16:12:22.190085
2017-09-30T06:26:05
2017-09-30T06:26:05
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,782
py
settings0.py
import os,sys sys.path.append('/var/pythoncode/zz91public/') pyuploadpath="/usr/data/resources/pyuploadimages/" pyimgurl="http://img1.zz91.com/pyuploadimages/" FILE_CHARSET='UTF-8' DEFAULT_CHARSET = 'utf-8' DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ) MANAGERS = ADMINS memcacheconfig="192.168.110.12...
55bd2f8f5806e8cdeee7ea0328c7ccb69d0eeb42
32037607ae542e4776c0ed6a3c105b92446e82e5
/shablon/Poisons.py
33d9188009a2d89f59c317fcbc1545e97a92879d
[]
no_license
ekaterinazenkova/hse_prog1
c9a5dbd49ba56968c8ffb9b0b439f389e9387ada
7de824da69e29b674e39bd4e0ea594341a0cd4ee
refs/heads/master
2021-09-16T09:57:15.895469
2018-06-19T08:55:50
2018-06-19T08:55:50
103,241,563
0
0
null
null
null
null
UTF-8
Python
false
false
1,394
py
Poisons.py
import string import random with open ("/Users/ekaterinazenkova/Desktop/text.txt", "r", encoding="utf-8") as f: text ="" line = f.readline() while line: line = line.strip() #удаляю пробелы в начале и конце строки text += line # это так покороче записывают: text = text + line ...
ff6c1f0f0447ce73d3857678384bb6b18c85d38b
7330582f3d74837f5ce9779829f898c9c9d220b9
/src/news/admin.py
b7483a8c8e82515c8bf13e9fcc625fb7755a6c14
[]
no_license
dyachoksa/visp-site
1b6c2129637e39d3ebe9f2af4df594f0c64ca114
1346e52413e2ef59e753ae1c42cadf74d0d5fbf9
refs/heads/master
2020-12-29T02:40:19.115620
2017-06-14T06:58:19
2017-06-14T06:58:19
39,848,285
0
0
null
null
null
null
UTF-8
Python
false
false
845
py
admin.py
# -*- coding: utf-8 -*- # # Author: Sergey Dyachok <sergey@sdyachok.com.ua> # Version: 1.0 # License: MIT License # from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import News class NewsAdmin(admin.ModelAdmin): prepopul...
afed4a6c929c6421ebf4f89e265e914c52055b3a
b92e8a885b217ef53b644dbe829da298966a3fa3
/Task 1: Integration Architecture/avro_from_gcs_to_bigquery.py
293c8329f2cd99400a55b0ce86e3b245d73c18ca
[]
no_license
dfdavila2/Big-Data-Training
3ec06920643f933aedd2f5f3d1f8499e7f58ff1b
d443883b6cdbc1c0e5b1222ddf86f3457c0cff74
refs/heads/main
2023-02-24T22:29:40.244228
2021-01-23T19:49:11
2021-01-23T19:49:11
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,197
py
avro_from_gcs_to_bigquery.py
# from apache_beam.io import ReadFromAvro # from apache_beam.io import WriteToBigQuery # from apache_beam.pipeline import Pipeline # from apache_beam.io.gcp.gcsio import GcsIO from apache_beam.io import BigQueryDisposition import apache_beam as beam import argparse import json PROJECT_ID = 'cedar-freedom-298301' RUNN...
779db2228bc7a02f2a5abc7d013ae8745dca4f49
89a44eabbe7998df9e7d80c3c07e962f88b7cfdd
/website/zwave/api.py
7a1895f917314447fc7b440b63cd0c58dea976a0
[]
no_license
robrocker7/ghoknhar
f53dddcf8ba240b2f2b625df98d1c7af8f676b54
452f3282260a6a3e8eee61b373f521165c47c53b
refs/heads/master
2020-05-21T14:07:39.115127
2016-01-04T17:55:03
2016-01-04T17:55:03
4,651,274
2
0
null
null
null
null
UTF-8
Python
false
false
1,728
py
api.py
from rest_framework import mixins from rest_framework import generics from .models import Device, CommandClass from .serializers import DeviceSerializer, CommandClassSerializer class DeviceAll(mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView): """ Device APIs...
6311be51dd8d86bfd4a51372f23d4785ce396c39
f0f4eef5a57807960070a1989799def6deaf30ef
/bclearer_boson_1_2_source/b_code/substages/operations/a_load/boson_1_gml_data_loader/os_open_names_nf_ea_com/os_open_names_domain_to_nf_ea_com_orchestrator.py
f12c3d0b505a5c93544751f2b3b57fc77401c9fe
[ "MIT" ]
permissive
boro-alpha/bclearer_boson_1_2
4f8dd72b79e0ccdd759271d79e3cbfa61a949ac6
571b2e1ca6dee93ccc5cb4e30abe2660f40c2ac0
refs/heads/master
2023-08-23T05:02:30.384138
2021-11-04T11:24:35
2021-11-04T11:24:35
424,218,650
1
1
null
null
null
null
UTF-8
Python
false
false
7,596
py
os_open_names_domain_to_nf_ea_com_orchestrator.py
from bclearer_source.b_code.substages.operations.b_evolve.common.new_root_package_creator import create_root_package from nf_common_source.code.nf.types.nf_column_types import NfColumnTypes from nf_ea_common_tools_source.b_code.nf_ea_common.common_knowledge.ea_connector_types import EaConnectorTypes from nf_ea_common_t...
272338f2ae102f9083225f208d0e24226a8692f6
8409a5e56614b6abf5a04b4dbbca77302a36c2fc
/bots/eduScrapy/eduScrapy/Tool.py
b192001ced859f43b49a5797193e57f30a1c57d2
[ "MIT" ]
permissive
snake-lvyonghao/Tyut-Proxy
aee3e5e19df0ed26c49e97282137dff190377a80
c0c97bf2a2c748ed7f5f13fa57bb6e46dd658c6a
refs/heads/master
2022-11-06T00:32:00.780663
2020-06-20T01:04:20
2020-06-20T01:04:20
256,274,566
7
5
null
null
null
null
UTF-8
Python
false
false
1,012
py
Tool.py
import base64 import json from aip import AipOcr from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 from Crypto.PublicKey import RSA # publickey算法 def crack_pwd(key, pwd): key = "-----BEGIN PUBLIC KEY-----\n" + key + "\n-----END PUBLIC KEY-----" rsakey = RSA.importKey(key) cipher = Cipher_pkcs1_v1_...
c5c0c03454f6243ca51aa6e8ac86521032f265f5
06fb11d23b5a9aa24db136b4108d5279600f0137
/classification/object_classification/data.py
68f49c2d5c793f1777bba725f7a44e202ff223bd
[]
no_license
dannisliang/senstextile
949e34e301fd83575c74c588bac34810f8173ad8
b3ac6013b09a681fe63a68fb749ae8c3cb017c29
refs/heads/master
2023-03-26T23:00:15.006577
2021-03-23T21:17:40
2021-03-23T21:17:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,975
py
data.py
import os import h5py import numpy as np import matplotlib.pyplot as plt import torch from torch.autograd import Variable from torch.utils.data import Dataset class GloveDataset(Dataset): def __init__(self, args, phase): self.args = args self.phase = phase data = [] label = [] ...
c673811da5847cb3842eee3929faf7bd6e846c3f
f50cbce4f7690c481442999d40e4396117ca707f
/Python/splitString.py
c5ca2166e40b09f3c7828d597f3979d5677e2e4b
[]
no_license
betohurtado3/Katas
9c5d77ba43b1e1ec0801b9eca232a74a4656b0af
4d97b502ffa7622a8357025372ffda9059a1aad3
refs/heads/master
2023-07-04T21:28:11.855335
2021-08-24T18:25:29
2021-08-24T18:25:29
395,062,690
0
0
null
null
null
null
UTF-8
Python
false
false
222
py
splitString.py
def solution(s): l = list(s) array = [] if len(l) % 2 != 0: l.append("_") for item in range(0, len(l), 2): array.append(l[item] + l[item+1]) return array print(solution('asdfadsf'))