blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c57c61d86c5572b1948a7a0502578e0809ad170e | e36472948f74fd5ed35fc64801a59db4efa27070 | /part_1/04_6_test.py | 174139579a5653b3edaa5a336c79a87ac1f5214f | [] | no_license | anton1k/python_crash_course | 051aad7c5a043830d8cc9e5fd314f568bf0f4a53 | 80f302074e5fef48fb40e72f7d79ab4b8658b38a | refs/heads/master | 2020-07-18T23:28:00.871466 | 2019-09-04T14:06:12 | 2019-09-04T14:06:12 | 206,333,934 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 75 | py | square = list(range(1, 21, 2))
print(square)
for i in square:
print(i)
| [
"40913464+anton1k@users.noreply.github.com"
] | 40913464+anton1k@users.noreply.github.com |
c269309d5a7e596f3b4d827d0729f1e6c2e2640b | 5bcbf7fc2fd10bfd51df37aa806cc2305d0fe077 | /mongokit_ng/schema_document.py | 0a0063bf73fc7e9d786e72cf9a10b383720c63aa | [
"MIT"
] | permissive | Windfarer/mongokit-ng | 29f9e10af48af77a44e829a2910c88f92af1f218 | 52844c9242c4483694d4f3f65cf0d70a13df1c35 | refs/heads/master | 2023-08-20T02:39:45.240670 | 2020-02-20T03:37:05 | 2020-02-20T03:37:05 | 216,472,772 | 15 | 3 | MIT | 2023-09-14T17:11:44 | 2019-10-21T03:47:34 | Python | UTF-8 | Python | false | false | 42,541 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2011, Nicolas Clairon
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the abov... | [
"windfarer@gmail.com"
] | windfarer@gmail.com |
ef9b7a69e3843ac4417cdf88c780113699fa503d | e3278ff5f2d28cb6c07ee89ed75e189661f287aa | /trains/urls.py | 1c45f047095e93987125920c10a1f1fa4289c3b1 | [] | no_license | ArturYumagulov/Travel_City | 3f7ba8581f81e71785e3ed76834ab948f1fbc2b3 | 09dbc58d09925c7bac19b74df0223a1340b60830 | refs/heads/master | 2023-03-14T14:43:45.317546 | 2021-03-06T22:05:28 | 2021-03-06T22:05:28 | 279,313,673 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 179 | py | from django.urls import path
from .views import home, TrainCreateViews
urlpatterns = [
path('add/', TrainCreateViews.as_view(), name='add'),
path('', home, name="home")
] | [
"zico.13288@gmail.com"
] | zico.13288@gmail.com |
a7f1a34e1dbca643640865dc62b696a4dbff6b39 | 8e97978634fad317bf33090f17097a13c4fda856 | /test_sdio/encode_image.py | c616b0f8e802b3128408e9e05439d803e6d574ea | [] | no_license | meesokim/bitbox | 31459009e2c8d54fa1538dab3c3d625920ce60d9 | 40e1883f6eaa16eb22e28072479c08c423262a58 | refs/heads/master | 2021-01-22T13:30:54.894759 | 2015-12-13T16:04:48 | 2015-12-13T16:04:48 | 29,057,990 | 0 | 0 | null | 2015-12-13T16:04:48 | 2015-01-10T13:29:39 | C | UTF-8 | Python | false | false | 684 | py | 'very simple encoder for one raw image data to .bin file. expects small data <32k pixels'
import sys, struct
from PIL import Image
def reduce(c) :
'R8G8B8A8 to A1R5G5B5'
return (1<<15 | (c[0]>>3)<<10 | (c[1]>>3)<<5 | c[2]>>3) if c[3]>127 else 0
src = Image.open(sys.argv[1]).convert('RGBA')
print "dimensio... | [
"makapuf2@gmail.com"
] | makapuf2@gmail.com |
283e4abc4a65e52a5d9b59d3a8238102b56d822c | 0ac08e36e128573a612bacfc85380b3917fa0fe3 | /18.py | c9374871b9e3c9a97e498e80ae2d80395bd24801 | [] | no_license | Henrique970/Monitoria | 9db148435b54e1175310c3bc0c134eb38e8a76be | 361fa3da50b5710eb44959962197e434c302dc7a | refs/heads/master | 2020-07-15T00:42:32.563702 | 2019-08-30T19:00:50 | 2019-08-30T19:00:50 | 205,439,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | import random
nome = input('Informe seu nome: ')
escolha = input('Informe i para impar e p para par: ')
numero = int(input('Informe seu número: '))
computador = random.randint(1,10)
soma = numero + computador
print('Você escolheu,',numero,'e o computador,',computador)
print('A soma dos dois é',soma)
if escolha == 'i':
... | [
"henrydossantos1560@gmail.com"
] | henrydossantos1560@gmail.com |
170a083c957c7be6132d27953ebb3e394bf8b3e5 | 130a98632d2ab4c171503b79e455b7aa27a1dda4 | /models/research/object_detection/inputs_test.py | 10dd078873c538661d0f57fd9154cb10f2b0c150 | [
"Apache-2.0",
"MIT"
] | permissive | aboerzel/German_License_Plate_Recognition | d7fc0314295f5cf0c9d7ae9c93a795e3ef1c5787 | 6fc53292b1d3ce3c0340ce724c2c11c77e663d27 | refs/heads/master | 2023-01-30T18:08:37.339542 | 2023-01-07T07:41:36 | 2023-01-07T07:41:36 | 245,586,430 | 34 | 12 | MIT | 2023-01-07T07:41:37 | 2020-03-07T07:16:51 | Python | UTF-8 | Python | false | false | 75,857 | 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 applica... | [
"andreas.boerzel@gmx.de"
] | andreas.boerzel@gmx.de |
1c69ce72d7668c9f655b4077f3fe6fef28f0a157 | eeaeb0f39262fa04233614ce377ac9dcd04f9b5e | /pyQt 5/my library pyqt5/QComboBox.py | a7d29c80b1d80e2e2fc041a97ce4e8fc09f32595 | [] | no_license | akashian4/python_example | 70811300c97c3e9874b2c6f47a05569e7451e4df | 64d57bfd9fe2d5ce71db3e1a03f0e6c4dfe3497f | refs/heads/main | 2023-08-12T10:03:21.417469 | 2021-09-30T19:41:03 | 2021-09-30T19:41:03 | 412,203,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,004 | py | ###QComboBox
import sys
from PyQt5.QtWidgets import QWidget,QLabel,QApplication,QComboBox
class F(QWidget):
def __init__(self):
super().__init__()
self.setUI()
def setUI(self):
self.lbl = QLabel(" ", self)
self.lbl.resize(50,20)
self.lbl.move(50, 150)
... | [
"akashian4@gmail.com"
] | akashian4@gmail.com |
24276040f76be3849eb58873430e762060fc75dd | 1e28d01665dd609bd443d44d974e712e0e1c2535 | /contact/forms.py | 4a95f7e4edb08715bc23dc62fc1c9693db764e90 | [] | no_license | Code-Institute-Submissions/Time-To-Rent | 44a4c4f918de786dfdd0426baf55669323a892f9 | b77a0f914cb32fd51af369db2987c3b1c42c5065 | refs/heads/master | 2023-06-15T07:41:52.557881 | 2021-06-29T22:26:12 | 2021-06-29T22:26:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,061 | py | from django import forms
from .models import Contact
class ContactForm(forms.ModelForm):
class Meta:
model = Contact
fields = ('full_name', 'email', 'contact_reason',
'message')
def __init__(self, *args, **kwargs):
"""
Add placeholders and classes, remove aut... | [
"Marc.gulliver100@gmail.com"
] | Marc.gulliver100@gmail.com |
45d34cd5b697ed70c4cfa9dfffdfe76104672c8f | e6956b020916b7b120f289f4790b73f836e9a0aa | /leads/models.py | dd4cc43f0c8aef3c5200381eb5175ba22af15b46 | [] | no_license | wilsonmwiti/testyangu | 4628afdd0ba533324aa642e597eeb5d60933e480 | a6e2c5bebf7fce8bccdc9e413583095cda522c1a | refs/heads/main | 2023-06-21T18:59:14.999930 | 2021-07-05T06:47:26 | 2021-07-05T06:47:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,297 | py | from django.db import models
from django.db.models.fields import BooleanField, CharField, TextField
from django.contrib.auth.models import User
CONVERTED_CHOICES = [
('No', 'NO'),
('Yes', 'Yes'),
('NA', 'Not applicabe'),
]
class ContactUs(models.Model):
time=models.DateTimeField(auto_now_add=True,verb... | [
"Iamdeveloper254@gmail.com"
] | Iamdeveloper254@gmail.com |
c49836f2e56130e13c2dacd1c19ed24793523e5b | 16f3cffc0e62d660103ada3185112caa9ee2ad4f | /marksheet.py | dabf959855ebef4b01e86ce099927e2117779242 | [] | no_license | hirak0373/AI-Practices | 5601adcf91427cf57de4703b16b794e931c4b05b | 4c23dc90c193f64f7511f1c1b9fc8cf79c776998 | refs/heads/master | 2020-06-25T10:03:15.001939 | 2019-07-28T11:25:42 | 2019-07-28T11:25:42 | 199,278,865 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 672 | py | eng =input("Enter marks of English: ")
bio = input("Enter marks of Biology: ")
chem = input("Enter marks of Chemistry: ")
pak = input("Enter marks of Pakistan Sudies: ")
sin = input("Enter marks of Sindhi: " )
obtain =int(eng)+int(bio)+int(chem)+int(pak)+int(sin)
print (obtain)
per =int(obtain)/425
per1=per*100
print("... | [
"Hirak0373"
] | Hirak0373 |
5eefceddfd476526d32fbc4ea9938a8b6fcb3b42 | a2f1179b0b096d2a4d6dfd2f98b9b7b1febe0cfd | /321810304056_Suppose passing marks of a subject is 35.Take input of marks from user and check whether it is greater than passing marks or not.py | c6ec71228a3825e0aaa6c9890caae47ae3d118e8 | [] | no_license | pooji12/Python | 55d811a9e310d97bb30e1c0f5187970dd67cbb80 | d72309086e7ead17c491c12a85374a5f6d514a42 | refs/heads/master | 2022-11-07T03:44:45.505998 | 2020-06-23T16:16:39 | 2020-06-23T16:16:39 | 273,281,765 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 302 | py |
# ## Suppose passing marks of a subject is 35.Take input of marks from user and check whether it is greater than passing marks or not
marks=float(input("Enter marks of the student"))
if marks>=35:
print("Student has passed in the subject")
else:
print("Student has failed in the subject") | [
"noreply@github.com"
] | pooji12.noreply@github.com |
83547d23b166d298dba8225456e446df30293c67 | c90962d0f3233205d4dc99391f6aab3402fa7ed8 | /parPDE/__init__.py | 4557dcb4c8a5af05fe9207a2e5b7ce6f3b66bbdf | [
"BSD-2-Clause"
] | permissive | chrisjbillington/parpde | f97a1303c404ec83f22df15c6fb4e80485176150 | 4f882cbbb9ad6c57814e4422e9ba063fa27886a0 | refs/heads/master | 2022-11-10T16:18:31.489069 | 2019-01-22T21:01:25 | 2019-01-22T21:01:25 | 275,920,389 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 109 | py | from .parPDE import *
try:
from __version__ import __version__
except ImportError:
__version__ = None | [
"chrisjbillington@gmail.com"
] | chrisjbillington@gmail.com |
70f6b0b090ff0d91affb41cb57adece59c466bc2 | 14f821fc6d2150fe8387f2e58753482cb01ff081 | /Tests/test_ordoneaza_crescator.py | edf715ca43e67aedd1a0d17f7deb76aec9e040c6 | [] | no_license | AP-MI-2021/lab-567-raluca2002 | d9798e2a16b14ab2ab718ac28d379c0488b8a7d5 | 27365dc8412dbc8c9c761433236e4fd80f487f65 | refs/heads/main | 2023-09-02T13:27:49.140431 | 2021-11-10T11:36:54 | 2021-11-10T11:36:54 | 420,812,527 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 618 | py | from Domain.librarie import creeaza_carte, get_id
from Logic.ordodeaza_crescator import ordoneaza_crescator
def get_data():
return [
creeaza_carte(1, 'v1', 'gen1', 60, 'silver'),
creeaza_carte(2, 'v2', 'gen1', 20, 'none'),
creeaza_carte(3, 'v3', 'gen2', 12, 'gold'),
creeaza_carte(4... | [
"raluca0602372yahoo.com"
] | raluca0602372yahoo.com |
7ee73bf343527b14d894d44745d77c7a4f338cbf | 7ce6db9c613e783739c1af16e1b89a4b20531290 | /weibo/spiders/weibocn.py | ba0392942a17eccbe874d887383c99846d27c367 | [] | no_license | Foxgeek36/WeiBo | d9ee855d6047d491d292a99319b63c8468a2ad92 | 386486d31f5fba895b99dc306b48c06a98b8ed8b | refs/heads/master | 2020-07-26T09:43:30.597611 | 2019-09-15T16:18:00 | 2019-09-15T16:18:00 | 208,606,874 | 0 | 0 | null | 2019-09-30T15:57:31 | 2019-09-15T14:34:08 | Python | UTF-8 | Python | false | false | 7,444 | py | # coding=utf-8
import json
from scrapy import Request, Spider
from weibo.items import *
class WeiboSpider(Spider):
'''
抓取目标站点为:https:m.weibo.cn / 从手机端站点作为切入
-用户详情页示例:https://m.weibo.cn/profile/2011075080
'''
name = 'weibocn'
allowed_domains = ['m.weibo.cn']
# 用户详情页中'关注'列表API /亲测实际有效
... | [
"1002301246@qq.com"
] | 1002301246@qq.com |
36297de68d4dda62481025cf1bbce659d0ce664f | 3b89c0a97ac6b58b6923a213bc8471e11ad4fe69 | /python/CodingExercises/CheckSecondStringFormedFirstString.py | 82a8ded99bb4b608b37b268d47ca9e6f94271932 | [] | no_license | ksayee/programming_assignments | b187adca502ecf7ff7b51dc849d5d79ceb90d4a6 | 13bc1c44e1eef17fc36724f20b060c3339c280ea | refs/heads/master | 2021-06-30T07:19:34.192277 | 2021-06-23T05:11:32 | 2021-06-23T05:11:32 | 50,700,556 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,218 | py | '''
Check whether second string can be formed from characters of first string
Given two strings str1 and str2, check if str2 can be formed from str1
Example :
Input : str1 = geekforgeeks, str2 = geeks
Output : Yes
Here, string2 can be formed from string1.
Input : str1 = geekforgeeks, str2 = and
Output : No
Here stri... | [
"kartiksayee@gmail.com"
] | kartiksayee@gmail.com |
ea2bb972d8ab0c6e4c705e1fe4e5253a81d3b550 | 6f9cb6a226001e1062a05101b2e271fbfb94191b | /sitemon/urls.py | ba4f9e4e95f7521bd845a0651d173caab5283f16 | [] | no_license | infoculture/ogd_sitemon | 61109b9f357bbbe8618ff8497948c6ca3406f9f3 | ba664e7741a3ef099f0bfc81cd3a7c462a1b18be | refs/heads/master | 2021-01-23T07:59:48.640425 | 2013-01-11T15:47:11 | 2013-01-11T15:47:11 | 7,560,991 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 700 | py | from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'', include('smon.urls')),
(r'^css/(?P<path>.*)$', 'django.views.static.serve',{'document_root': '/var/www/sitemon.opengovdata.ru/html/css'}), ... | [
"ibegtin@gmail.com"
] | ibegtin@gmail.com |
25b4001a10ee2d51a890bc339744c20aa1981f7f | 8aa283469088fd9b32d5be2069ab59a04dbcc3d4 | /DSP/DSP_filters.py | b436d055bfecd606c10a4ecddc9d794d95d79203 | [] | no_license | Matt-McNichols/perl | bb49629fc2a31c709d167c320f642dc99a205470 | fdeb71a85c1e2e0415c51b5b33f770f80fb4bdf7 | refs/heads/master | 2021-01-17T13:28:21.076463 | 2016-04-01T20:40:40 | 2016-04-01T20:40:40 | 39,844,054 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,528 | py | import argparse
import math
import numpy as np
from scipy import signal
import scipy.io.wavfile
import matplotlib.pyplot as plt
# This function does a mirror extension of the signal x_array
# It then calculates the output(y) after input(x_array) passes
# Through the filter(h_filter)
# After computing the output(y) ... | [
"Matt-McNichols@users.noreply.github.com"
] | Matt-McNichols@users.noreply.github.com |
8796fb8ca4716d9c715a5a6a59a3963a5c1b6074 | 1838a53201aca2cf3f11e8b6e3615935de04b1c5 | /13.py | 3da47848ca20d11ab884ac1dbeb47a850b5d753a | [] | no_license | antoprinciya/python-1 | 2f6df8ef32c2bda08bdc9d6897e1faff78eec3ba | e40759071dc209a5c8c56e77e67956176c78f214 | refs/heads/master | 2020-06-14T11:02:06.183604 | 2019-07-02T18:40:09 | 2019-07-02T18:40:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 164 | py | n1=int(input())
if n1>1:
for i in range(2,3):
if(n1%1)==0:
print("no")
else
print("yes")
else:
print("no")
| [
"noreply@github.com"
] | antoprinciya.noreply@github.com |
aaafe02c250a9c2699c0fd09dd69981d770de947 | 512a62900f8797f3e6f87850616548dff6b2bf25 | /board.py | 33d958d6fc02611642fa540eba7afcf94d4586a6 | [] | no_license | racocon/Eels-and-Escalators | 4e108cb4311e707a5924a65c8690535479434ea5 | 4edca7ba22396ee7ba67a19b9ac1f3b3bee7a220 | refs/heads/master | 2020-03-24T03:49:30.205382 | 2018-07-26T11:57:07 | 2018-07-26T11:57:07 | 142,434,211 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,412 | py |
class Board:
#initialize the 10x10 board for eels and escalators
#board = [["P", "p", " ", " ", " ", " ", " ", " ", " ", " "],
# [" ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
# [" ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
# [" ", " ", " ", " ", " ",... | [
"diyanah.nadzree@live.com"
] | diyanah.nadzree@live.com |
85df82d852eeb8e2b44964f94463348ae7366d32 | 7fad84a788a234fe80535f9bc75f70060a30c378 | /Agent_Recommend_Git/Agent_Recommend_Git/forms.py | bbd31efbe32657769187b2591cea94e5bf3c78ee | [] | no_license | KKK-cy/Agent_Recommend | 1ea21cd647521561683f77bc421b9ba2eed4004d | de2b2d72b571577b15b0bacebb5ca6b12654f66a | refs/heads/master | 2023-03-23T10:37:11.226124 | 2021-03-11T08:11:52 | 2021-03-11T08:11:52 | 261,702,537 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,091 | py | # -*- coding:utf-8 -*-
# @Time : 2021/1/11 11:08
# @Author : KCY
# @File : forms.py
# @Software: PyCharm
from django import forms
# 登录表单
class UserForm(forms.Form):
username = forms.CharField(label="用户名", max_length=128,widget=forms.TextInput(attrs={'class': 'form-control'}))
password = forms.CharField(label=... | [
"chuiyang.kong@einyun.ltd"
] | chuiyang.kong@einyun.ltd |
95439e170fc5055a456e2743c221afc668438b7a | 319ba101d095622a8f2f9870a5b496e042b915c1 | /thd.py | d25e8753502805694a0293dce96879253574ccf9 | [] | no_license | andrewleu/inetaddr-and-nic | 9edf6104a103ad3235a752fbaaf211f77a80d197 | 2baf4170765bb7942df16eccb8c47a53eeea7722 | refs/heads/master | 2021-08-08T12:12:35.128764 | 2020-06-11T03:44:10 | 2020-06-11T03:44:10 | 29,572,896 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 742 | py | import threading
import time
class MyThread(threading.Thread):
def run(self):
global num
time.sleep(1)
if mutex.acquire(1):
print self.name+str(mutex)
num = num+1
msg = self.name+' set num to '+str(num)
print msg
mutex.release()... | [
"andrewleu@hotmail.com"
] | andrewleu@hotmail.com |
d40ec1ea16fec299f7e84680371949b248b3a34d | 2da8862795c1f89a119a6af312aadd61040517d7 | /catkin_ws/build/joint_encoders/catkin_generated/pkg.installspace.context.pc.py | 1bf4e5033dcf512d6d1c3a9f520d08c56678dc64 | [] | no_license | AlfredWilmot/Modular-2-DOF-Cable-Driven-Segment | 7864086f58260fda0a5198325451776f296b4ab5 | 0723c00b5f1ad4d91d5f605379b1793eab815263 | refs/heads/master | 2021-10-27T08:58:26.233175 | 2021-10-22T09:02:35 | 2021-10-22T09:02:35 | 156,258,756 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 420 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "joint_encoders"
PROJECT_SPACE_DIR = "... | [
"alfred.wilmot@students.plymouth.ac.uk"
] | alfred.wilmot@students.plymouth.ac.uk |
078f048db806a896fa9fedd85cd87ed800b5ba27 | 1be0621633e7c7b81e868774e6bdfb472e2746bc | /Elementary/even_last.py | 74cabfdd62700ecdf0be2e3fccba92469c634b0a | [] | no_license | junzhao680/PyCheckio | 017cb4b69b692d46775d1d03dd9211fd73b52ca3 | 52f914b2b19da3ebd9b2ae2d0071a61fedba3219 | refs/heads/master | 2021-08-31T13:12:32.566903 | 2017-12-21T11:59:31 | 2017-12-21T11:59:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 661 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
def checkio(array):
"""
sums even-indexes elements and multiply at the last
"""
try:
return sum([array[i] for i in range(len(array)) if i % 2 == 0]) * array[-1]
except:
return 0
#These "asserts" using only for self-checking and not nece... | [
"huangqin611@gmail.com"
] | huangqin611@gmail.com |
309f2903d2fef0acae019ea359db53ecfbe15ff9 | 01c419db0c83e14cfe6b3f6dc82ed6889f64a9b4 | /python练习/urllib01.py | def6fae233929383cf26461ec0794a6314ab4ffb | [] | no_license | HuiMengYouXian/lianxi | 0a6812ae16ef29dad4023124cf5de96e02357b84 | 5c12d7548c13251df48e0afb555dac61bfc2beb6 | refs/heads/master | 2020-03-31T04:25:22.952883 | 2018-10-09T14:08:01 | 2018-10-09T14:08:01 | 151,904,371 | 0 | 0 | null | 2018-10-07T04:38:44 | 2018-10-07T04:00:01 | null | UTF-8 | Python | false | false | 456 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from urllib import request,parse
url="http://httpbin.org/post"
headers={
#伪装一个火狐浏览器
"User-Agent":'Mozilla/4.0(compatible:MSIE 5.5; Windows NT)',
"host":'httpbin.org'
}
dict={"name":'Chen'}
data=bytes(parse.urlencode(dict),encoding='utf-8')
req=request.Request... | [
"592883527@qq.com"
] | 592883527@qq.com |
974df7b001cc9ce833b59d2918d6c8f9e3ae6c16 | 2fc69271a1e2502e0ec5c24deed634a769e3699d | /OOT-ASSIGNMENT 6-IT-62.py | fe165421f6073a4d6ad1d8fa897adacc0cf63b25 | [] | no_license | padmajabollu/Python-Operator-overloading | 5a13c9eee57933d504abbb6673c3a03c40ed4e89 | 38b5c9e4d82533a4cfff793e1bef03a19d552898 | refs/heads/master | 2022-04-26T04:31:11.567138 | 2020-04-23T02:40:26 | 2020-04-23T02:40:26 | 258,075,097 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,474 | py | class currency(object):
cv = {"Rs":1,"$":60,"#":90,"E":70}
def __init__(self, value, unit):
self.value = value
self.unit = unit
def __str__(self):
return str(self.value) + " " + self.unit
def __add__(self,other):
if isinstance(other, currency):
... | [
"noreply@github.com"
] | padmajabollu.noreply@github.com |
ca58b1ce2b21900200329d5dbd2507235c210435 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03853/s066137758.py | acb2ac42342d566e74d51b19e21c6c91f5ab7f87 | [] | 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 | 288 | py | num = input().split()
hei = int(num[0])
wei = int(num[1])
photo = []
for i in range(hei):
temp = input()
temp = list(temp)
photo.append(temp)
photo.append(temp)
for i in range(hei*2):
for j in range(wei):
print(photo[i][j],end="")
print("\n",end="") | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
6727bdc422920e3e15e9e2a1708eb0cfd0380f25 | e7a7419bc957c6eece0f38b709a45bb187078089 | /project1.py | 00521cf0bff8e44d2b38a8bf7991bd69adb138a5 | [] | no_license | lucasfazzib/covid19_python_chart | 2ba92bc5ed13c1c9c71c82add9461d5f4fff6bef | ede0f158cfdebfdddabfb84c6bf28b495545f318 | refs/heads/main | 2023-06-18T14:44:20.624509 | 2021-07-10T03:21:32 | 2021-07-10T03:21:32 | 384,601,324 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,732 | py | from typing import final
import requests as r
import datetime as dt
import csv
from PIL import Image
from IPython.display import display
from urllib.parse import quote
url = 'https://api.covid19api.com/dayone/country/brazil'
resp = r.get(url)
#print(resp.status_code)
raw_data = resp.json()
#print(raw_data[0])
#{'ID':... | [
"lucasfazzi@hotmail.com"
] | lucasfazzi@hotmail.com |
363c4f8788d69ae5c719743e3bf95a12a1bf133b | cf53803d5389218a858e5168886f68ef17fff28d | /ssbccConfig.py | 60f086aa770a62b17bc21f2726460e1c0e0b8adb | [] | no_license | freecores/ssbcc | cfeeaae1e94711825c14750aab86ee5e3dc7ae84 | fe7713b18f7a6328de2d0dad774b8887327785ab | refs/heads/master | 2020-06-02T13:37:26.640555 | 2014-07-05T18:36:15 | 2014-07-05T18:36:15 | 21,918,103 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 35,531 | py | ################################################################################
#
# Copyright 2012-2013, Sinclair R.F., Inc.
#
# Utilities required by ssbcc
#
################################################################################
import math
import os
import re
import sys
from ssbccUtil import *
class SSB... | [
"sinclairrf@a4a847ef-c1ac-4a6e-99c4-be67e24668ce"
] | sinclairrf@a4a847ef-c1ac-4a6e-99c4-be67e24668ce |
c8f797faafcd39ea1bd701f5832affb0e3450ec8 | 694fc28bcd02568f027607d6a0553abf4bcd2fa4 | /debian/crud_init/crud_init/urls.py | 8298b43d353d24f085285578319f2f6673a1d68f | [] | no_license | ajloinformatico/Django-Concesionario-Crud-APP | 53e86aa4ae2f0f7ca1a111b38a6f6d7dd9806c78 | cfe78ab5aab58267f8d153cb9c3e5a21f01703e5 | refs/heads/main | 2023-03-20T08:09:04.371828 | 2021-03-09T18:34:04 | 2021-03-09T18:34:04 | 318,833,092 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,228 | py | """crud_init URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | [
"ajloinformatico@gmail.com"
] | ajloinformatico@gmail.com |
7eb0a27e9a13e4e5c3b60d8db374343ffbb07b17 | 8b5990d3306d53ef953c1628deacdfe39115c118 | /py_file.py | 631b9201557777ed5aac024da582825a1d85f7e4 | [] | no_license | Parvathi1129/Test | 974d498fa8080182c1b7184233d253295814bd3f | 1a419663b74646bd0bf508e5f8341a3456db7571 | refs/heads/master | 2021-01-22T23:05:58.372334 | 2017-09-22T07:05:10 | 2017-09-22T07:05:10 | 92,800,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 488 | py | num = 407
# take input from the user
# num = int(input("Enter a number: "))
# prime numbers are greater than 1
if num > 1:
# check for factors
for i in range(2,num):
if (num % i) == 0:
print(num,"is not a prime number")
print(i,"times",num//i,"is",num)
break
... | [
"noreply@github.com"
] | Parvathi1129.noreply@github.com |
5c0333f99729273b3ade42126951336ff76847d1 | f338c9b1a8b2b85dbb72705c55494d9253b3224e | /wavetable_gen_tools/miscfiltering/firplayground.py | ff352ec3c46ab3464bc99ff34dee1cd7aa70e0f8 | [] | no_license | starlingcode/viatools | f3ca2575b9bbd08e9a52027fefe55511540b7cb0 | 15868f5cc2104ba458defe9826fc190a782a56aa | refs/heads/master | 2023-04-06T13:57:56.337714 | 2022-03-20T03:52:22 | 2022-03-20T03:52:22 | 125,312,110 | 0 | 0 | null | 2022-03-17T21:06:17 | 2018-03-15T04:27:30 | Python | UTF-8 | Python | false | false | 704 | py |
lines = [line.rstrip('\n') for line in open('downloadedfiltercoeffs.txt')]
lines = [x.strip('\t') for x in lines]
lines = [x.strip('y[n] = (') for x in lines]
lines = [x.strip('+ (') for x in lines]
lines = [x.replace('*', '') for x in lines]
parsed_file = []
for line in lines:
if line != '':
parsed_f... | [
"liquidcitymotors@gmail.com"
] | liquidcitymotors@gmail.com |
0d8f76b499ac816e3bd0061d7450637456aaa4d7 | 1681332a25e5130517c403bb7a860ca30506d5ea | /res/dlworkshop/conv_test.py | abb17bf25cec4bb3835f22de94b69b03e0211a02 | [
"MIT",
"CC-BY-4.0"
] | permissive | dgyrt/dgyrt.github.io | 240550826aa031323db1f64b00b36db1ac3d65df | fac6c1a9d10d8e87bad6e80aa96027b84975ee1d | refs/heads/master | 2020-05-21T12:23:00.437395 | 2017-01-31T14:05:39 | 2017-01-31T14:05:39 | 43,422,967 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,173 | py | """" convnet test """
import os;
import gzip;
import cPickle as pickle;
import numpy as np;
import theano;
import theano.tensor as T;
from theano.tensor.nnet import conv;
from theano.tensor.signal import downsample;
n_epochs=100;
batch_size=100;
def relu(x):
return x*(x>1e-13);
class ConvLayer(object):
def... | [
"duguyue100@gmail.com"
] | duguyue100@gmail.com |
721a102e40b391250ee3101e851acdd76b192386 | 34f29e764609930da0b3d3d7db18dc63ab1b4a97 | /util/tasks/trainInvV2_2.py | d118d52a2810437ab0796e678089eb538f9bbefd | [] | no_license | samhu1989/RAtlasNet | c77fe2a65fcbfb34bfdf78a5e1c7abdcea989341 | 0b2859a620dd15f66c4af1355eb79356ee335507 | refs/heads/master | 2020-04-15T01:01:33.874790 | 2019-05-30T15:00:13 | 2019-05-30T15:00:13 | 164,260,625 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,503 | py | #
import os;
from .task import Task;
from ..ply import *;
from ..Lutils import *;
from ..utils import *;
from ..datasets import *;
import torch;
from torch.autograd import Variable;
from torch.utils.data import DataLoader;
import torch.nn as nn
import math;
import json;
sys.path.append("./ext/");
import dist_chamfer a... | [
"hsy19891228@yeah.net"
] | hsy19891228@yeah.net |
5eb6a7c2e27516ddc783d6c5f4528f7e5d755141 | 6dcf84980cc44c9cd0774ce95b248bfc0c81e2c0 | /kNeighbors/handwritingClassifier.py | 61f12e722691a6ff0a0137434968285707221033 | [] | no_license | wangdx2116/machineLearning | d3cd5a6e98b6938afe677789b629a56b68b78b6d | 2360927a11c1e3420c0e6690ba360fe79dcfcb84 | refs/heads/master | 2020-05-18T18:23:07.370939 | 2018-02-10T07:37:10 | 2018-02-10T07:37:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,377 | py | # -*- coding: utf-8 -*-
# k近邻实现手写数字的识别
# 作者:dyxm
from numpy import *
from os import listdir
import operator
# 读取数据到矩阵
def img2vector(filename):
# 创建向量
returnVect = zeros((1, 1024))
# 打开数据文件,读取每行内容
fr = open(filename)
for i in range(32):
# 读取每一行
lineStr = fr.readline()
#... | [
"857230132@qq.com"
] | 857230132@qq.com |
a0a3e8f4dab8d2d3cc6497f8b4e8c5507e50f494 | 9497432cd07d17be15853544197853d1ae7ae472 | /encryption files/hashing/sha384hash.py | 1880fd67f6fa014e3adfcf43b48c4f4a11238ba8 | [] | no_license | SeresAdrian/Crypto-Project | e99be9c2bf9155e1a54be4419d5626633fd2b333 | 4c2fd709f667bdfa71bc5fadd9b47a1c79f59c6a | refs/heads/master | 2022-07-25T13:54:46.704949 | 2020-05-18T19:40:42 | 2020-05-18T19:40:42 | 265,021,044 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 194 | py | #!/usr/bin/python
import hashlib
string=input("Please enter tha plaintext : ")
result = hashlib.sha384(string.encode())
print("The hexadecimal equivalent of hash is : ", result.hexdigest())
| [
"root@localhost.localdomain"
] | root@localhost.localdomain |
e04366763596d474dc1591978b472764c5ef6725 | c878ac9d001f4a8b52caea4e6ac585cbcb762c89 | /Scenes/PlayingGameScene.py | 1e548676f5f6847b1d021bad2661fe7e9a2e0b8d | [] | no_license | katieinder/MagnetGame | d278ee353aee8c3a5bb77e54cb1f3121a7f95e5c | 2ee7a108d04ab3dc19903154e59402c3de1f35a6 | refs/heads/master | 2020-07-04T14:25:15.451688 | 2016-11-22T14:15:32 | 2016-11-22T14:15:32 | 74,153,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,502 | py | import pygame
from Shared import *
from Scenes.Scene import Scene
import sys
class PlayingGameScene(Scene):
def __init__(self, game):
super(PlayingGameScene, self).__init__(game)
def render(self):
super(PlayingGameScene, self).render()
game = self.getGame()
ball=game.getBal... | [
"Katie@Katies-MacBook-Air.local"
] | Katie@Katies-MacBook-Air.local |
9796214d25e80f9655fb1910bc028c1969ce3aca | 1d8535658ed07fc88558c7d9bf3a01b709f189b1 | /src/reversion/migrations/0001_initial.py | 986fd81ac986f7c87b8babac57ae6a6c0bfa701a | [
"BSD-2-Clause"
] | permissive | druids/django-reversion | ebedc4debe3ffc611f9e2bf72a04f388274502a0 | d80a24b6a195c8a68bfc3100ba533419226fa18d | refs/heads/master | 2020-12-25T08:50:58.658410 | 2018-06-10T20:19:42 | 2018-06-10T20:19:42 | 40,229,843 | 0 | 3 | NOASSERTION | 2020-04-09T13:16:57 | 2015-08-05T06:56:01 | Python | UTF-8 | Python | false | false | 2,506 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contentt... | [
"dave@etianen.com"
] | dave@etianen.com |
562117f003163498fb1839859c84089b6e811c5b | 65fa32a8ce8a7ea3e610e2f6210101912880af58 | /tools/vmc_postproc/sfpnxphz.py | 804fa8683c18ea3772da2e7090af54ef30d26c14 | [
"MIT"
] | permissive | bdallapi/gpvmc | 9d09eb46f6e7093693e986ee48e45d7cc77faeff | 19575b3e6fe0b27b464a092d92072e74b9ea59dd | refs/heads/master | 2021-01-15T14:43:19.004456 | 2014-10-29T21:50:40 | 2014-10-29T21:50:40 | 25,629,938 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,373 | py | #!/bin/env python
import numpy as np
from vmc_postproc import recspace
def delta(kx,ky,params):
return 0.5*(np.exp(1j*params['phi'])*np.cos(kx*2*np.pi)+\
np.exp(-1j*params['phi'])*np.cos(ky*2*np.pi))
def mfham(kx,ky,params):
H=np.zeros([4,4]+list(np.shape(kx)),dtype=complex)
dk=delta(kx,k... | [
"Bastien Dalla Piazza"
] | Bastien Dalla Piazza |
d0693b0ad88f47db099867cf4761d478eef729b8 | e8ac30578ae04854181cd5233db96aee57dffa15 | /lib/python3.7/imp.py | 93b04b1279fde0f9b70449c2d762314e37dbd6e3 | [] | no_license | hariknair77/fsf_2019_screening_task1 | 50d1840c9dcfd18ff9ecb5832dbea89632c9554a | 473f137e9c080c4fc775e1d1163595231b760546 | refs/heads/master | 2020-04-25T19:48:11.554670 | 2019-03-10T06:34:30 | 2019-03-10T06:34:30 | 173,033,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 41 | py | /home/hari/anaconda3/lib/python3.7/imp.py | [
"hariknair77@gmail.com"
] | hariknair77@gmail.com |
e973b5c48496e567d2e0fae3626b51dd134136a6 | 99441588c7d6159064d9ce2b94d3743a37f85d33 | /pcl_test/cmake-build-debug/catkin_generated/generate_cached_setup.py | 182642f40547103257c7ec487f901a6e624ac514 | [] | no_license | YZT1997/robolab_project | 2786f8983c4b02040da316cdd2c8f9bb73e2dd4c | a7edb588d3145356566e9dcc37b03f7429bcb7d6 | refs/heads/master | 2023-09-02T21:28:01.280464 | 2021-10-14T02:06:35 | 2021-10-14T02:06:35 | 369,128,037 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,340 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/melodic/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.path.insert(0, ... | [
"yangzt_0943@163.com"
] | yangzt_0943@163.com |
290c90e1ec3e9aea7039b80484a81718c05d1dfb | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_shelled.py | 92293753951a72a46ead1e9e801bf3e2ad1a351b | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 233 | py |
from xai.brain.wordbase.nouns._shell import _SHELL
#calss header
class _SHELLED(_SHELL, ):
def __init__(self,):
_SHELL.__init__(self)
self.name = "SHELLED"
self.specie = 'nouns'
self.basic = "shell"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
ac0068272e44b2c8be212ec72274b2cd3cc76d3a | fb7d753aba613b1b84d06ad17d82722988b960ea | /App/migrations/0003_mustbuy.py | e3746268efb9349aa1c530937338c0e2f1fbd160 | [] | no_license | Bestlzh/AXF-first-django- | 8c5da15c3160f8ab15b21fa872782bf1c4d7ad6b | 452a66daf964db34026487279c5dbd37c31df576 | refs/heads/master | 2021-09-01T02:56:51.514477 | 2017-12-24T12:15:53 | 2017-12-24T12:15:53 | 115,260,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 761 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-27 09:49
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('App', '0002_nav'),
]
operations = [
migrations.CreateModel(
nam... | [
"lizihao0913@163.com"
] | lizihao0913@163.com |
a0ef7b70a8cf37b54a0e2e4f78c34348ea61b0a5 | d067509968cd8f9b1e29ec5ba69abbee56757ec6 | /headTracking/headTracking.py | c0cfce895fa2344951dce9adf8d26dddc91b0c3a | [
"MIT"
] | permissive | erizalmh/humanoid_challenge | de5edab24b7db54f9ba0c4f9c4b4cbbaf337ac19 | fc0f0049ae75b1be6bb59b100de900dc3d7a510a | refs/heads/master | 2022-04-09T18:07:14.139305 | 2018-05-07T06:20:09 | 2018-05-07T06:20:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,207 | py | #!/usr/bin/env python
# import the necessary packages
import numpy as np
import imutils
import cv2
import serial
import math
connected = True
camera = cv2.VideoCapture(1)
ser = serial.Serial() # create a serial port object
ser.baudrate = 9600 # baud rate, in bits/second
ser.port = "/dev/ttyACM0" # this i... | [
"monsoon117@gmail.com"
] | monsoon117@gmail.com |
bbc96985d0b7d59a1ed8256547223d6d3942caae | e03c75eef2c8f177003dd0de10805199d17250c2 | /VID21.py | 2ccfadd0c7e801ab107872ba1d3e20b78ccf3435 | [] | no_license | arsh-seth/Tkinter | d8a97ac89f88d8009fc224cec4d2295d4cd35059 | e4893f7b7aa4718dbb6ea13a3be67da8ee580e6e | refs/heads/master | 2022-09-08T12:15:25.390700 | 2020-06-02T18:24:38 | 2020-06-02T18:24:38 | 265,328,374 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 334 | py |
from tkinter import *
def add():
global i
lbx.insert(ACTIVE, f"{i}")
i+=1
i = 0
root = Tk()
root.geometry("455x233")
root.title("Listbox tutorial")
lbx = Listbox(root)
lbx.pack()
lbx.insert(END, "First item of our listbox")
Button(root, text="Add Item", command=add).pack()
roo... | [
"noreply@github.com"
] | arsh-seth.noreply@github.com |
9b8ffd02c0680421820d9d17d7078ba7ee1365ba | ce8bb40bf2b688f19ab8bcc20cfd58994413bc0f | /ajax/ajax_mysite/app01/views.py | b372bd95be6a215aa5b89bd42d3acb0b23b5da03 | [] | no_license | Fover21/project1 | 457f452d7f6e7ecbfc81a18512377ebc5457f3f6 | 84d596caf5701d7d76eee8c50f61bcb6150c57f2 | refs/heads/master | 2020-03-24T20:01:51.506348 | 2018-12-26T06:07:45 | 2018-12-26T06:07:45 | 142,955,917 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,389 | py | from django.shortcuts import render, HttpResponse, reverse, redirect
# Create your views here.
from django.views.decorators.csrf import csrf_exempt, csrf_protect
@csrf_exempt # 排除
def login(request):
return render(request, 'login.html')
def index(request):
i1, i2, i3 = '', '', ''
if request.method == ... | [
"850781645@qq.com"
] | 850781645@qq.com |
525faba85baf47e70bd840eb6b17b29331739083 | 0c41031269497790425702d4ad882423dc443a6a | /pandas14/pandas14_9.py | ad0ca612be2e850e77d6d818f876fb6c53ce6255 | [] | no_license | diegoami/datacamp-courses-PY | 4c546e69241ca429adefdd459db92d617cfa0e9f | bab3082929fa6f1cf2fc2f2efb46d16374715b4b | refs/heads/master | 2023-07-20T06:42:29.776349 | 2018-10-28T22:57:21 | 2018-10-28T22:57:21 | 92,448,198 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,599 | py | import pandas as pd
# Load DataFrame from file_path: editions
medals = pd.read_csv('../data/medals_2.csv')
# Construct the pivot_table: medal_counts
medal_counts = medals.pivot_table(index='Edition',values='Athlete',columns='NOC',aggfunc='count')
# Load DataFrame from file_path: editions
editions = pd.read_csv('../da... | [
"diego.amicabile@gmail.com"
] | diego.amicabile@gmail.com |
8a76f7524a07a73f9f4012875041fd152bc95a5e | ccb062bea92c4f50ff6fca39af2df6499f87fa53 | /build-debug/SConscript | 59a52d8ac85c58e0776a32b50a39f11c076429b4 | [
"MIT"
] | permissive | mathbouchard/BaseApp | da20b609ef0733d50c110ff2408410a1fa1191c8 | 6daeb7c8eef3921c1c41d0870fad4901540222a6 | refs/heads/master | 2021-01-19T17:47:53.900489 | 2014-01-22T04:09:08 | 2014-01-22T04:09:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,583 | # January 8 10:21 2014
# Copyright 2014 Mathieu Bouchard
# mathbouchard@gmail.com
from platform import system
from os import listdir
from collections import OrderedDict
is_debug = True;
suffix = ""
if(is_debug):
suffix = "d"
print("DEBUG")
else:
print("RELEASE")
print("System is "+ system());
def va... | [
"mathbouchard@gmail.com"
] | mathbouchard@gmail.com | |
5bf43a26a8f376a2920ea2a5ed4a757eb726910b | 5e8bda0dcaa424ccf2a7a0204b1becbd78f6f32b | /Unet.py | f4540fb26deb20a1d56457f881af994bd983782b | [] | no_license | ggrego04/electron_microscopy_digitisation | e8b4407d5fccedebceb3e2f436d39928cd43d767 | 7c1a6524fb4dd2359aa3edb3644a9aeccdfe2464 | refs/heads/main | 2023-02-13T11:26:11.543353 | 2021-01-15T23:40:32 | 2021-01-15T23:40:32 | 330,020,997 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,562 | py | # Imported Libraries
import tensorflow as tf
import numpy as np
from skimage.transform import resize
seed = 42
np.random.seed = seed
# dimensions of the image
IMG_WIDTH = 128
IMG_HEIGHT = 128
IMG_CHANNELS = 3
# this function returns the segmented image
def prediction(image):
# load the pretrained ... | [
"noreply@github.com"
] | ggrego04.noreply@github.com |
0df8d0fd941b9fda7e926758fb191fdf39c3a691 | 3d38c394ab9958c32e26f179ba7d045c55b162f0 | /pamixer/classes/SubVolume.py | a40bbce897aa1f98f8c8ad408a290032a3c3345c | [] | no_license | Valodim/pamixer | fb2d3e07de89c0b1088e7fc2dabd9823909aa94e | 99cea2fe72620076e7f10d1f2735cf83cf5055c5 | refs/heads/master | 2021-01-01T19:02:20.901345 | 2012-02-12T20:29:40 | 2012-02-12T20:29:40 | 1,437,808 | 10 | 1 | null | 2012-07-19T11:25:58 | 2011-03-04T02:31:00 | Python | UTF-8 | Python | false | false | 8,621 | py | import curses
from ..pulse.PulseAudio import PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT, PA_CHANNEL_POSITION_FRONT_CENTER, PA_CHANNEL_POSITION_REAR_CENTER, PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT, PA_CHANNEL_POSITION_LFE, PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, PA_CHANNEL_... | [
"valodim@mugenguild.com"
] | valodim@mugenguild.com |
fc10885cc1c93b0fef9785b5f6bc9a544e6d5749 | b943f725f8c6b20c277eb7b77e67689173bc0d1a | /simplemooc/core/urls.py | 06bf7fc6d8d6aa47edc54cbee4a80a33837c89a1 | [] | no_license | Akijunior/Eleanning | c4da62971735b5a6c18f0ee04758ac6db770c2a4 | 4b0e4c397b76a7839722b00f23ef3eb4f309d229 | refs/heads/master | 2020-08-19T05:14:57.581513 | 2019-10-21T15:33:36 | 2019-10-21T15:33:36 | 215,882,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 119 | py | from django.urls import path
from simplemooc.core.views import home
urlpatterns = [
path('', home, name='home'),
] | [
"suitsu19@gmail.com"
] | suitsu19@gmail.com |
2a43d736e2b0bed80741d6dc401155c5fb685570 | 374aac5655cbdead72683a5e8b6e02126a024768 | /tests/test_sqlalchemy.py | b05d87ce415b1c3218592d47c7af99354879f0b8 | [
"MIT"
] | permissive | naveenkumar-grofers/nplusone | 0f51179a5a4aa717ea2b537bfa1a8e07af568ebb | 2bcf727a73c05afa01a020993997a6a60778b872 | refs/heads/master | 2021-01-24T21:54:08.390445 | 2015-11-15T16:52:42 | 2015-11-15T16:52:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,041 | py | # -*- coding: utf-8 -*-
import pytest
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from nplusone.core import signals
import nplusone.ext.sqlalchemy # noqa
from tests import utils
from tests.utils import calls # noqa
pytest.yield_fixture(calls)
Base = declarative_base()
models... | [
"jm.carp@gmail.com"
] | jm.carp@gmail.com |
bb25994ee6bd92450fefb19af4aa9d2536f1f92b | eae7c90e108721099c90eafbea50425ffb6cca58 | /survay_form/survay_form/wsgi.py | ee0cad20a2107f93de85c54ea14147c22b0f3e74 | [] | no_license | azadehboojari/Django_Simple | ff52b4a35e1d2f57d5dd930c0e684e1a9d222d35 | 670e0bccb95f5d0e92b06d55e81eabdfc2836724 | refs/heads/master | 2020-04-02T01:44:34.264239 | 2018-10-20T05:51:19 | 2018-10-20T05:51:19 | 153,872,845 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | """
WSGI config for survay_form project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... | [
"azadeh.bojari@yahoo.com"
] | azadeh.bojari@yahoo.com |
7c65cfcefe6d0773903720bf31e2214bfdae2623 | 8cb0405401b1615dfeab18afe4d0be2438037b07 | /ff-13-2-clock/clock.py | f8aa84568cd740b4e69bb66e4d7ba2fb312f9c9c | [] | no_license | kwaters/hacks | d6b089b00c6134a92630a1ffba71c4b3686d0420 | 52813a7bef310445b7781d2e3ce989245466d66d | refs/heads/master | 2021-01-15T11:13:33.592050 | 2017-01-19T07:18:03 | 2017-01-19T07:18:03 | 1,401,386 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,389 | py | #!/usr/bin/env python
"""Clock puzzle sover for FF XIII-2."""
import argparse
import pprint
import exactcover
def create_grid(clock):
"""Turn the clock into an exact cover problem."""
size = len(clock)
m = []
# Each of the two moves from each number
for i, v in enumerate(clock):
m.appen... | [
"kwwaters@gmail.com"
] | kwwaters@gmail.com |
56250a36155d7f49b172ec18f33a5f218419669f | 4b7dce428c7bd29f3446725a502377ed24e2af7d | /Source Code/Relation.py | 6105f6c700077469f523c254c466006c04de3cec | [] | no_license | umairtehami/Twitter-Social-Capital | 24b569a67cd71335ea60fabe98cd054023b1abc7 | a09007472f4a6a6e179c02f3d9d30167b94dcb28 | refs/heads/main | 2023-08-23T21:04:46.965665 | 2021-10-27T15:42:20 | 2021-10-27T15:42:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,357 | py |
# Relation class saves information about the interactions within two profiles
class Relation:
def __init__(self, source, target, weight = 0, label = "", type = "Directed"):
self.source = source
self.target = target
self.weight = 1
self.label = label
self.type = typ... | [
"noreply@github.com"
] | umairtehami.noreply@github.com |
36fb968bc93923a42bc256ed24596a0c4cd64147 | 51418ae6005e41ae19b314ca0416331dfba4f21c | /tan/tanlibrary/src/clFFT-master/src/scripts/perf/fftPerformanceTesting.py | cb0602dc2cd990f53ca541ba6726fcbab7928b41 | [
"MIT",
"Apache-2.0"
] | permissive | GPUOpen-LibrariesAndSDKs/TAN | ead68a3dd2d8e3a3678ada593ef44ce55ab7d54e | 690ed6a92c594f4ba3a26d1c8b77dbff386c9b04 | refs/heads/beta-cross-platform | 2023-04-02T08:27:50.622740 | 2020-10-07T18:34:38 | 2020-10-07T18:34:38 | 65,836,265 | 141 | 32 | MIT | 2020-03-26T16:08:01 | 2016-08-16T16:33:14 | C++ | UTF-8 | Python | false | false | 11,307 | py | # ########################################################################
# Copyright 2013 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apach... | [
"fang.he@amd.com"
] | fang.he@amd.com |
15d215b500c6d26dbd37bfda3a9d73e8979c26aa | 01af3f8a79453482febefe64d356a616abc08c1e | /backend/config/settings/production/third_party.py | c58e3e64fb67c81f95dfd14e878c6d18778211f4 | [] | no_license | by-Exist/django-skeleton | 0ea3dbc815cb8da8417ef0f64e304715b8e5b5dd | 4848dd1074533b368015cdde943719114d001bcc | refs/heads/master | 2023-06-12T12:52:09.216952 | 2021-07-12T08:48:09 | 2021-07-12T08:48:09 | 372,245,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,638 | py | from .django import *
# Django Storage
# =============================================================================
STATICFILES_STORAGE = "config.storages.StaticStorage"
DEFAULT_FILE_STORAGE = "config.storages.MediaStorage"
AWS_S3_REGION_NAME = "ewr1" # TODO: region, endpoint url도 environment로 관리해야 하지 않을까?
AWS_S3... | [
"bolk9652@naver.com"
] | bolk9652@naver.com |
bf8a6a3bbd710bdaa7611c6890907a61a0e9cce7 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_010/ch136_2020_04_01_12_09_01_220465.py | 566b2a82eb758b3344edaf9b17037a14dee59e8d | [] | 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 | 1,641 | py | import random
dinheiro=10
dicas=True
jogo=True
chutes=True
dado1=random.randint (1,6)
dado2=random.randint (1,6)
dado3=random.randint (1,6)
soma=dado1+dado2+dado3
while dicas:
print ("Fase de dicas")
print ("Você tem {} dinheiros.".format (dinheiro))
if dinheiro==0:
dicas=False
... | [
"you@example.com"
] | you@example.com |
ca2e11ed3a29496a59aceae5171f893f340a43d0 | c0caed81b5b3e1498cbca4c1627513c456908e38 | /src/python/bindings/app/pyrosetta_toolkit/pyrosetta_toolkit.py | b9934a7edda6e3f28079e9c1f622ad02ca1c8a1e | [
"LicenseRef-scancode-other-permissive"
] | permissive | malaifa/source | 5b34ac0a4e7777265b291fc824da8837ecc3ee84 | fc0af245885de0fb82e0a1144422796a6674aeae | refs/heads/master | 2021-01-19T22:10:22.942155 | 2017-04-19T14:13:07 | 2017-04-19T14:13:07 | 88,761,668 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 11,387 | py | #!/usr/bin/env python
# (c) Copyright Rosetta Commons Member Institutions.
# (c) This file is part of the Rosetta software suite and is made available under license.
# (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
# (c) For more information, see http://www.rosettacommons.org... | [
"malaifa@yahoo.com"
] | malaifa@yahoo.com |
bb237b5e5a2ead7f2dad38a09c1b76d15c7f747b | fcb8d0d3b2066d6b0c6d43b76da6facbce805dd2 | /tkinter project/index.py | 58939779801d48ce141a01b2ab682b1518473858 | [] | no_license | urvisuthar85/python_prectice_projects | 1722655a3ce5b4e5c1c2b706f583a252eeedf8ec | 004bebfb79925a1d358c204a28a180d7227787c4 | refs/heads/master | 2022-12-23T18:36:48.927849 | 2020-10-05T10:26:33 | 2020-10-05T10:26:33 | 301,370,219 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,345 | py | from tkinter import *
window = Tk()
l1 = Label(window,text="Title")
l1.grid(row=0,column=0)
l2 = Label(window,text="Author")
l2.grid(row=0,column=2)
l3 = Label(window,text="Year")
l3.grid(row=1,column=0)
l4 = Label(window,text="ISON")
l4.grid(row=1,column=2)
titel_text = StringVar()
el = Entry(window,textvariable =... | [
"urvashicitrusbug@gmail.com"
] | urvashicitrusbug@gmail.com |
69024abc125c1c0fbb26411947e1976dc81fb6e6 | 1f41b828fb652795482cdeaac1a877e2f19c252a | /maya_menus/_MAINMENU_PMC_Rigging/05.Put Object-(RP[N])/03.Put Controller/18.sidePin.py | e9ed02aaea8fe1c13e224651d6f47fb6657f251a | [] | no_license | jonntd/mayadev-1 | e315efe582ea433dcf18d7f1e900920f5590b293 | f76aeecb592df766d05a4e10fa2c2496f0310ca4 | refs/heads/master | 2021-05-02T07:16:17.941007 | 2018-02-05T03:55:12 | 2018-02-05T03:55:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | from sgMaya import sgModel, sgCmds
sels = cmds.ls( sl=1 )
if not sels: sels = [None]
for sel in sels:
sgCmds.putControllerToGeo( sel, sgModel.Controller.sidePinPoints ) | [
"kimsung9k@naver.com"
] | kimsung9k@naver.com |
c27f0382061c7b128225a49078586dffc8011c53 | fcf993336ce067f1d3f05205cb545a861d1e51cb | /product_microservice/manage.py | 86c8f0cbbef358c6401940ad200611beac517e64 | [
"MIT"
] | permissive | fga-eps-mds/2018.2-FGAPP-produto | a2c5621cdf37c7baf04e30a9da54184966331034 | 5324c611c041269f035d27b2cf4e26c2f4b723e2 | refs/heads/master | 2020-03-27T21:35:34.440086 | 2018-11-05T22:41:42 | 2018-11-05T22:41:42 | 147,159,571 | 2 | 0 | MIT | 2018-11-10T01:19:38 | 2018-09-03T06:12:17 | Python | UTF-8 | Python | false | false | 564 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "product_microservice.settings.development")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Cou... | [
"lucascostaa73@gmail.com"
] | lucascostaa73@gmail.com |
d8bfc4ff4a4f91f23273d7deb2fa1347aa3f495e | 287c96d3d7b68f2faace8716ff8cf1c33662d49c | /New folder/test.py | 4e79c518b0d36b215b642bbabdc380e2bfe052a2 | [] | no_license | sovan91/Python-Code | 53efd576cd3bad8498f9983d4ca6ce434b5ed6fc | 1a68f83c52deddbc2eff47745f58a23c1f52a471 | refs/heads/master | 2020-04-13T04:28:25.202439 | 2019-02-13T14:33:44 | 2019-02-13T14:33:44 | 162,962,687 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | import logging
logging.basicConfig(filename='log.txt',level=logging.INFO)
logging.info("A new request come")
try:
x=int(input("Enter first input number:"))
y=int(input("Enter second input number:"))
print(x/y)
except ZeroDivisionError as msg:
print("We cannot divide with zero")
logging.exce... | [
"noreply@github.com"
] | sovan91.noreply@github.com |
be33d28852484275819ace98b621bc01decf9381 | 985a874c832d7632e287f2185b18aaf2e1b42018 | /dtcwt_gainlayer/layers/nonlinear.py | f3f2b274c311342e0a0b16400783156a896a9a06 | [
"MIT"
] | permissive | fbcotter/dtcwt_gainlayer | e2ea03ccfe8ad4f903b59846c1c902391c66b227 | 32ec3e21066edc2a0d5edefaf70f43d031d1b4ac | refs/heads/master | 2023-03-28T13:08:37.919222 | 2019-08-20T09:05:46 | 2019-08-20T09:05:46 | 157,608,716 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,276 | py | import torch
import torch.nn as nn
import torch.nn.functional as func
from dtcwt_gainlayer.layers.shrink import SparsifyWaveCoeffs_std, mag, SoftShrink
class PassThrough(nn.Module):
def forward(self, x):
return x
class WaveNonLinearity(nn.Module):
""" Performs a wavelet-based nonlinearity.
Args... | [
"fbcotter90@gmail.com"
] | fbcotter90@gmail.com |
f469053b33cfb03ae14b21cac402d0845b46abe2 | 0b838e11b59687db8c9265ba2de61aeea8159d5e | /flocker/node/agents/functional/test_cinder.py | abbc0a417f8a936075f94b3abaa48f9dd1c9a99f | [
"Apache-2.0"
] | permissive | Waynelemars/flocker | 542f46ae841df65825387aa4be30b0a5782e5476 | 10dc58892d826d4d7310f657675ebf2f8f66b3ed | refs/heads/master | 2020-12-25T22:37:28.364739 | 2015-05-02T10:42:14 | 2015-05-02T10:42:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,356 | py | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Functional tests for ``flocker.node.agents.cinder`` using a real OpenStack
cluster.
Ideally, there'd be some in-memory tests too. Some ideas:
* Maybe start a `mimic` server and use it to at test just the authentication
step.
* Mimic doesn't current... | [
"richard.wall@clusterhq.com"
] | richard.wall@clusterhq.com |
6050153dab9027461663ffdbfe0554f1de1b8bb9 | 85b3dff4a55bc4ac4060fac02db4ce71503ce584 | /test/espnet2/asr/encoder/test_branchformer_encoder.py | 69bbc4e0e141def910ddc41dd68f12ed2af51963 | [
"Apache-2.0"
] | permissive | yuekaizhang/espnet | 4702ec68d219304e64f9956b3c22ec6fde775479 | e12accce0cd040849bfe5b08a38d88b750474ac9 | refs/heads/master | 2022-09-19T16:05:57.606626 | 2022-09-09T07:18:30 | 2022-09-09T07:18:30 | 237,085,083 | 1 | 0 | Apache-2.0 | 2020-03-24T19:12:40 | 2020-01-29T21:22:36 | null | UTF-8 | Python | false | false | 5,032 | py | import pytest
import torch
from espnet2.asr.encoder.branchformer_encoder import BranchformerEncoder
@pytest.mark.parametrize(
"input_layer", ["linear", "conv2d", "conv2d2", "conv2d6", "conv2d8", "embed"]
)
@pytest.mark.parametrize("use_linear_after_conv", [True, False])
@pytest.mark.parametrize(
"rel_pos_typ... | [
"pengyf21@gmail.com"
] | pengyf21@gmail.com |
bbad0509e9351b873b34fba81193eca72f87c1e2 | e7cdba44218ea9b7899449162efa0a76ae3d2ab4 | /api/BackupCommentsController.py | 158281d1f9efbc7130ef431c8971bd0724522a8b | [] | no_license | sachithkk/pyknow-expert-system-api | b865cfb9aa97418ba236cb4dc22cde335b9ff27a | 5d8582aeb33366fde4fe02d91336cce9327dfecd | refs/heads/master | 2022-07-14T10:41:11.958565 | 2019-11-10T16:55:50 | 2019-11-10T16:55:50 | 200,712,030 | 1 | 0 | null | 2022-06-21T23:22:15 | 2019-08-05T18:55:22 | Python | UTF-8 | Python | false | false | 5,035 | py | from flask_restful import Resource
from flask import jsonify, request
import logging as logger
from app import flaskAppInstance
from flask_pymongo import PyMongo
import re, sys , pymongo, time, requests, os.path, csv
from selenium import webdriver
class CommentsController(Resource):
def post(self):
logg... | [
"virajlakshitha39@gmail.com"
] | virajlakshitha39@gmail.com |
0f644a13f109ca88e181d869c7b44bccfd61d07a | b8b7c3c3775e8c741cec2bb7807e07b2528e3b24 | /BT18CSE148/q3/q3.py | 9ccc6ba61c8305d3bbc86475553a134957820934 | [] | no_license | nicxdknight/AWP-Python- | e3698c62a1f7e5e35728fc0790280629d226474c | f9ebc4c107ad113f48ff7c9b95ec6964537162cd | refs/heads/master | 2022-11-30T02:43:48.976421 | 2020-08-17T14:32:41 | 2020-08-17T14:32:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 544 | py | #question 3
with open('D:\python\students.txt', 'r') as file1:
with open('D:\python\students2.txt', 'w') as file2:
for line in file1 :
splitLine=line.split('\t')
name=splitLine[0]
split_name = name.split(" ")
f_name = split_name[0].capitalize()
... | [
"noreply@github.com"
] | nicxdknight.noreply@github.com |
f910377dee9ef41f1ec81cd841026451cd070365 | 1fc779d7e8b646c08e79c08aa63c349452094100 | /issue56/misc/orr/square.py.txt | 0d41c887cb9f6706361db0802341cfc70a71a865 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | linuxgazette/lg | 4a26b871d06e7a2c1efa7912d0b3b06f00f332e0 | af1e21053fc7b12eddead4dd1884a5b66346e19d | refs/heads/master | 2021-01-01T16:41:32.829475 | 2017-07-20T23:54:57 | 2017-07-20T23:54:57 | 97,887,660 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 267 | txt | #! /usr/bin/python
"""square.py -- Make some noise about a square.
"""
class Square:
def __init__(self, length, width):
self.length = length
self.width = width
def area(self):
return self.length * self.width
my_square = Square(5, 2)
print my_square.area()
| [
"thomas@xteddy.org"
] | thomas@xteddy.org |
c49955be6d6677eb04106713a04b917202d6393a | 9d95509a23c5a6eee5a19e896a91c062ee328c6f | /day4/04生成器.py | a5a84055f379fc71aba8750f7c09591c0280c72f | [] | no_license | YuanShisong/pythonstudy | a50fd5fa1098170e35f8ca4cd3fa33c0990d79b7 | 1b8db5e79ddea7ed4c7c0756589db94ffb0c3041 | refs/heads/master | 2021-05-14T09:50:42.455615 | 2018-01-24T03:02:02 | 2018-01-24T03:02:02 | 116,335,843 | 0 | 0 | null | 2018-01-18T06:16:31 | 2018-01-05T03:19:30 | Python | UTF-8 | Python | false | false | 579 | py |
# yield关键字
a = (i**3 for i in range(4))
print(type(a)) # <class 'generator'>
def gen():
for i in range(4):
yield i**2
print(gen) # <function gen at 0x0000000001EC4B70>
mygen = gen()
print(mygen) # <generator object gen at 0x0000000001E34FC0>
print('\n------------')
def func():
for i in range(4):
... | [
"yuanshisong211@126.com"
] | yuanshisong211@126.com |
424cb94753351796806403f7cc9a2e083cce21b3 | 5912bb26963faee371050d1b450eb29d175f9832 | /code/ceat.py | d786d413ee452b7bad8f41b86513e7e6d356e6f3 | [] | no_license | krangelie/CEAT | fa06017a5bdecfe6cffb4fb7fa465f5f781a2e9f | 497e2958a152ad70004ef6f3b613b98efdd26389 | refs/heads/master | 2023-04-09T11:34:56.346880 | 2021-05-01T21:00:33 | 2021-05-01T21:00:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,538 | py | import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
import pickle
import scipy.stats
import time as t
import pickle
import random
import datetime
# weat 1
flowers = ['aster', 'clover', 'hyacinth', 'marigold', 'poppy', 'azalea', 'crocus', 'iris', 'orchid', 'rose', 'bluebell', 'daff... | [
"weiguowilliam@gmail.com"
] | weiguowilliam@gmail.com |
33f8c4175e657495c241d2cdfbfba142bd309671 | 514c292b9ec4bc40cbc623dfda8cad3b40450dad | /synthesizer/test_synthesize.py | b28803d3a853056f2a8cf39b170fcff0f9e739a0 | [] | no_license | FandM-CARES/anomaly-explain | 2bb240c1490b533c72d97af8be9db255acbfce66 | 51fac621c31b090595acf20098f7b46ac33a3f26 | refs/heads/main | 2023-08-17T13:16:39.799927 | 2021-10-11T06:50:43 | 2021-10-11T06:50:43 | 414,333,328 | 0 | 0 | null | 2021-10-06T18:48:14 | 2021-10-06T18:48:13 | null | UTF-8 | Python | false | false | 911 | py | # File: test_synthesize.py
# Author: Leilani H. Gilpin
# Date: 30 December 2019
# Section: 1
# Email: lhg@mit.edu
# Description: Unit tests for the explanation Synthesizer code
import sys
import os
import unittest
sys.path.append(os.path.abspath('../'))
import numpy as np
from synthesizer.synthesize import *
class... | [
"lgilpin@mit.edu"
] | lgilpin@mit.edu |
f41d0214026ead1d8003886b6a76d15d7f9fd2d8 | 29c3595a4e1f8de9382650610aee5a13e2a135f6 | /venv/Lib/site-packages/django/db/utils.py | 28afa6cd076757b79702b2aab41a1cc2382588ba | [
"MIT"
] | permissive | zoelesv/Smathchat | 1515fa56fbb0ad47e1859f6bf931b772446ea261 | 5cee0a8c4180a3108538b4e4ce945a18726595a6 | refs/heads/main | 2023-08-04T14:47:21.185149 | 2023-08-02T15:53:20 | 2023-08-02T15:53:20 | 364,627,392 | 9 | 1 | MIT | 2023-08-02T15:53:21 | 2021-05-05T15:42:47 | Python | UTF-8 | Python | false | false | 10,398 | py | import pkgutil
from importlib import import_module
from pathlib import Path
from asgiref.local import Local
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import cached_property
from django.utils.module_loading import import_string
DEFAULT_DB_ALI... | [
"ZoomLee@users.noreply.github.com"
] | ZoomLee@users.noreply.github.com |
993a5d37979fddf53740450c2cdf7044629bdf3c | a54aaaf50c84b8ffa48a810ff9a25bfe8e28ba96 | /euler046.py | 8ce01d4beb33dd2d3029d151e6ad65e2658bbe9b | [] | no_license | danielmmetz/euler | fd5faefdfd58de04e744316618f43c40e6cbb288 | fe64782617d6e14b8b2b65c3a039716adb789997 | refs/heads/master | 2021-01-17T08:44:26.586954 | 2016-05-12T02:35:10 | 2016-05-12T02:35:10 | 40,574,287 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | """
It was proposed by Christian Goldbach that every odd composite number can be
written as the sum of a prime and twice a square.
9 = 7 + 2×12
15 = 7 + 2×22
21 = 3 + 2×32
25 = 7 + 2×32
27 = 19 + 2×22
33 = 31 + 2×12
It turns out that the conjecture was false.
What is the smallest odd composite that cannot be written... | [
"danielmmetz@gmail.com"
] | danielmmetz@gmail.com |
10134aba04152ef4ac2b1d173b0b37654133802c | 985a2fcf185e8ec5c6a8f8f002b654b451169e2b | /python-osc.py | 9ff7d25ea6d6ce154502cf8e1fc61fcebebac74a | [] | no_license | lisajamhoury/mlmp5ktron | f623413637b42087ca01b790ad28d699a08fd513 | a87391f143d13a1397c34807ff7a29db0cf2a3e1 | refs/heads/master | 2021-01-25T12:43:37.744147 | 2018-03-19T20:13:59 | 2018-03-19T20:13:59 | 123,502,352 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,062 | py | from sklearn.externals import joblib
from pythonosc import dispatcher
from pythonosc import osc_server
from pythonosc import osc_message_builder
from pythonosc import udp_client
import argparse
import time
import random
def print_click(unused_addr, *args):
pose = args
pred = clf.predict([pose])
print(pred)
if pre... | [
"lisajamhoury@gmail.com"
] | lisajamhoury@gmail.com |
34a5496edaf78c200fe0a67006564fb6d0ff9b2b | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli-core/azure/cli/core/tests/test_aaz_paging.py | 2ec14f790d3d6bce17f38400edfd9df57904a7dc | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MPL-2.0",
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-2-Clause"
] | permissive | Azure/azure-cli | 13340eeca2e288e66e84d393fa1c8a93d46c8686 | a40fd14ad0b6e89720a2e58d4d9be3a6ce1535ca | refs/heads/dev | 2023-08-17T06:25:37.431463 | 2023-08-17T06:00:10 | 2023-08-17T06:00:10 | 51,040,886 | 4,018 | 3,310 | MIT | 2023-09-14T11:11:05 | 2016-02-04T00:21:51 | Python | UTF-8 | Python | false | false | 3,855 | py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | [
"noreply@github.com"
] | Azure.noreply@github.com |
22b95182bd9050b6d8dbb6cfd970e83489eff911 | 477c8309420eb102b8073ce067d8df0afc5a79b1 | /Applications/ParaView/Testing/Python/DisconnectAndSaveAnimation.py | f9f080edafa9f6c87116a65800627d5c41831290 | [
"LicenseRef-scancode-paraview-1.2"
] | permissive | aashish24/paraview-climate-3.11.1 | e0058124e9492b7adfcb70fa2a8c96419297fbe6 | c8ea429f56c10059dfa4450238b8f5bac3208d3a | refs/heads/uvcdat-master | 2021-07-03T11:16:20.129505 | 2013-05-10T13:14:30 | 2013-05-10T13:14:30 | 4,238,077 | 1 | 0 | NOASSERTION | 2020-10-12T21:28:23 | 2012-05-06T02:32:44 | C++ | UTF-8 | Python | false | false | 3,862 | py | #/usr/bin/env python
import QtTesting
import QtTestingImage
object1 = 'pqClientMainWindow/menubar/menuSources'
QtTesting.playCommand(object1, 'activate', 'SphereSource')
object2 = 'pqClientMainWindow/proxyTabDock/proxyTabWidget/qt_tabwidget_stackedwidget/objectInspector/Accept'
QtTesting.playCommand(object2, 'activat... | [
"aashish.chaudhary@kitware.com"
] | aashish.chaudhary@kitware.com |
666bf442cdc1c542e448f6a557b6ea3f30ca94f4 | 15881e370abc080f47ec29ec9a1a776563ba8033 | /static/exp_res/aco.py | 7c4a4ac2bab88696bdd688b5ac072c7c4e0cbd6f | [] | no_license | Hmz3192/ZJUT_Exp | 1ab02de50e5a66cc075f9b3363b3c9a81737cf2f | a1cfefa113f6c89160b2156714e0ecb7487590d9 | refs/heads/master | 2023-07-02T07:03:25.002469 | 2021-08-05T07:50:34 | 2021-08-05T07:50:34 | 389,601,561 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,585 | py | import numpy as np
import random
import matplotlib.pyplot as plt
import logging
import sys
logging.basicConfig(format="%(message)s", stream=sys.stdout, level=logging.DEBUG)
# city_location = np.loadtxt("test1.txt") # 读取文件中城市的坐标数据,可根据需要修改,test1.txt包含14个城市坐标
city_location = np.array(
[[106.54, 29.59], [91.11, 29.... | [
"1134598796@qq.com"
] | 1134598796@qq.com |
a45acb1419d1d3ba79d7a0de4d8b26d9a6a387e0 | 81940bcda8768bb106451e781604c5294aa12554 | /emenu/emenu/settings.py | f8bf76da1a10e3f37b4fc9e487eaac9c8dc98018 | [] | no_license | MarceliWydra/Emenu | 6eec2ec6bc536ce393337146b4c83a2a4d187cb1 | 0f8f827a24a0c2f1090163b838d924d5a1263383 | refs/heads/master | 2023-01-28T03:29:55.717227 | 2020-12-02T23:36:18 | 2020-12-02T23:36:18 | 318,019,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,405 | py | """
Django settings for emenu project.
Generated by 'django-admin startproject' using Django 2.2.17.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# ... | [
"marceli.wydra@gmail.com"
] | marceli.wydra@gmail.com |
7e9af219a82968e36365a2cf9a23ceaf78ef5ed0 | a5e80be6dadc665917c8b330cbc5f904c101b55e | /pytorch/helpers.py | ac3cf05349c8d00718eea24508aaf557b1a50820 | [] | no_license | Engler93/Self-Supervised-Autogenous-Learning | 45363c82e8f2b2014e7d68ed67cd4c1ba6e6d565 | 9f5e9eb75af95c6781e2d3e71bc0f739663c4120 | refs/heads/main | 2023-02-15T18:45:42.888322 | 2021-01-15T10:45:13 | 2021-01-15T10:45:13 | 327,023,179 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,096 | py | import socket
from socket import AddressFamily
from socket import SocketKind
import numpy as np
import torch
from torch import nn
from torch.optim import lr_scheduler, Optimizer
def find_free_port(addr):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((addr, 0))
s.listen(1)
port = s.getso... | [
"pengler@rhrk.uni-kl.de"
] | pengler@rhrk.uni-kl.de |
26f83bd32f0f51fecb1f418a7f0572ba228e1a4c | 838b850b5716fff5872e657758b29dafe28fd59e | /apps/organization/urls.py | 5c112ccbcab47fc2dea5e24371cfa20de7a4b531 | [] | no_license | linjiesen/Mxonline | 365ac4310c3236611ac86683143b65ce359cbd23 | 22d7507873051e9ec25f3fc6da48c1e61e1becab | refs/heads/master | 2020-05-21T21:40:24.723679 | 2019-05-11T16:52:38 | 2019-05-11T16:52:38 | 186,158,576 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,183 | py | # encoding: utf-8
from organization.views import OrgView, AddUserAskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView, \
AddFavView, TeacherListView, TeacherDetailView
from django.urls import path, re_path
app_name = "organization"
urlpatterns = [
# 课程机构列表url
path('list/', OrgView.as_view()... | [
"sqrtln@163.com"
] | sqrtln@163.com |
8ae1b0e2603185ca3f066a85347a8645b61df889 | 47ad6a81efc31faa19810cff1cca2717134f283e | /PyPoll/main.py | 6a6220f2b7c3f8aa6c8a87211239175f4930ee12 | [] | no_license | kglibrarian/python-challenge | 45ce02fbe791f279478ab838ecdd2f201fdaee2e | 4ab4135459ef9052255a340d08f35148f9adde30 | refs/heads/master | 2020-04-26T21:03:54.992885 | 2019-03-11T23:26:12 | 2019-03-11T23:26:12 | 173,830,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,388 | py | # Import the os module to create file paths across operating systems
import os
# Import the csv module for reading CSV files
import csv
csvpath = os.path.join('election_data_test.csv')
def voterInfo(voterID, county, candidate):
print("Election Results")
#The total number of votes cast
voterSum = len(vot... | [
"karen.gutzman@northwestern.edu"
] | karen.gutzman@northwestern.edu |
a3638d5459a2da3d0e41a495d7596b64ef04664b | bb63633ea6773067680e961af12d23dbb084df12 | /Local-Detection/classifiers/nne.py | 78285053641486a02c5716581cb9811dc309f143 | [] | no_license | agi2019/Framework-Deteksi | e157a73063ffacefa51377ffb9465e3f8f3fefd7 | 4be65f6644790f772f1d006b483f1f62e5e816f4 | refs/heads/master | 2020-11-27T11:49:58.330189 | 2020-01-28T00:20:23 | 2020-01-28T00:20:23 | 229,426,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,294 | py | import keras
import numpy as np
from utils.utils import calculate_metrics
from utils.utils import create_directory
from utils.utils import check_if_file_exits
import gc
from utils.constants import UNIVARIATE_ARCHIVE_NAMES as ARCHIVE_NAMES
import time
class Classifier_NNE:
def create_classifier(self, model_name, ... | [
"49863588+agi2019@users.noreply.github.com"
] | 49863588+agi2019@users.noreply.github.com |
dad9a0f5bb19b52082712f1571995b46984e9afe | 7057e137c5aeef1911eaecd24656d780d86879a4 | /day9/day9.py | b6467492a756ff5c6574f95fc2ad0ea15c0cc833 | [] | no_license | simonvbrae/advent-of-code-2020 | 2255b41be61f31f82499ab076e0d0f97d4a1b84b | 1f8f738bd48956e03939e3c09d32803530592094 | refs/heads/master | 2023-01-31T22:52:26.521069 | 2020-12-20T11:23:44 | 2020-12-20T11:23:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,493 | py | preamb_len=25
def find_incorrect_number(number, numbers):
for index,nr in enumerate(numbers):
for nr_2 in numbers[index+1:]:
if nr + nr_2 == number:
return 0
return number
# Original solution
def find_summing_set(number, numbers):
for startindex, _ in enumerate(numbers)... | [
"simon.vanbraeckel@ugent.be"
] | simon.vanbraeckel@ugent.be |
2db80125614126b1bda5dac81b52721288060e5e | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/D/dasfaha/get_imdb_movie_rating.py | 4f8bab114f20f4b7fedaa3cbfb02a591f9fa6362 | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,532 | py | import lxml.html
import scraperwiki
#Ge the data
html = scraperwiki.scrape("http://www.imdb.com/title/tt2103264/")
#The request to IMDB returns plain text so the line below processes this text and turns it into a format that can be queried
root = lxml.html.fromstring(html)
#The rating of a movie is within a div wit... | [
"pallih@kaninka.net"
] | pallih@kaninka.net |
2590462966f909cd040de762441fc5e29418c2f9 | 67e302a19a4975e652dcbc106609432f1484dc69 | /gesbol8.py | f088047656c3d1ada7655de1987e92b28effe484 | [] | no_license | iparedes/gesbol8 | 1af13a0bd0e7f2131f83d4d666dc932e0942051d | 869fc009523be49e4046fbaf8428c2ab3fd9ce81 | refs/heads/master | 2020-06-08T05:02:51.199060 | 2014-02-19T18:36:12 | 2014-02-19T18:36:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | # coding=utf-8
__author__ = 'nacho'
from ConfigManager import ConfigManager
from Tkinter import Tk
from Interfaz import Interfaz
def main():
Parametros=ConfigManager("./gesbol.ini")
root = Tk()
gui=Interfaz(root,Parametros)
gui.mainloop();
if __name__ == '__main__':
main()
| [
"iparedes@gmail.com"
] | iparedes@gmail.com |
7c004f111481b118849d8850a15900aaf292d0ad | 102f2b8a9b561e278267d4d33a941665dca02956 | /service/API_Yandex.py | 1fac1b9f02ae0d12e6d8e4d2c03b6b6c7bba8cd4 | [] | no_license | WTTeneger/portfolio_new | 7ba8964aac889295c35b6ca540b3df34a2939e4e | e62574cb86a7c66427fa68320d865cd5f700cb77 | refs/heads/main | 2023-06-16T12:15:21.084391 | 2021-07-11T21:21:57 | 2021-07-11T21:21:57 | 382,823,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,513 | py |
import requests
import time
from fake_useragent import UserAgent
ua = UserAgent()
domen = 'https://kinopoiskapiunofficial.tech'
# key_api = '8ddff7e1-d699-4f01-aaf6-a98347651223'
# key_api = '6c78c319-3562-4d75-bd42-e40cee7a7010'
key_api = '9788bb82-dfcd-408e-8a86-49f8834b9540'
h = {
'X-API-KEY': key_api,
}
# prin... | [
"50665935+WTTeneger@users.noreply.github.com"
] | 50665935+WTTeneger@users.noreply.github.com |
2bf07793bfef24a2bed035690bb6849533f776bc | 1239393937f155fd5090c41f462262098fa6c6c1 | /dev/docs/source/conf.py | 20af5dc2d5e88af3e123d49e2e27b9d9573e3297 | [
"BSD-2-Clause-Views",
"BSD-3-Clause"
] | permissive | hyunjinb/XlsxWriter | af4fe17c11b81c05ba8ec6adf27d0f6d1d632399 | b4c4b499ffb3db8e0fa1b306880bcbcb3675fd4d | refs/heads/master | 2021-01-23T13:42:00.785444 | 2017-09-05T23:17:06 | 2017-09-05T23:17:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,926 | py | # -*- coding: utf-8 -*-
#
# XlsxWriter documentation build configuration file, created by
# sphinx-quickstart on Mon Jan 28 00:12:14 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | [
"jmcnamara@cpan.org"
] | jmcnamara@cpan.org |
754e0bce9c3fc9f004f3229a31843293706fb40a | 72c973cf70e2a0e2517e26e9bca1e80fb9c06288 | /DataType02/NumberType1.py | 302bf34201470d9e831c412ccd4a2a8b8376ea4e | [] | no_license | HeoUk/Python-from-KOSMO | 1f24ff7ff3b4e6190870e8611ab29c8fb366538b | 738b59f891c5d726e66b3cffa21bd8d1dc9f2c0b | refs/heads/main | 2023-06-16T18:06:24.431746 | 2021-07-19T13:34:06 | 2021-07-19T13:34:06 | 384,444,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,495 | py | #정수형(int)은 소수점이 없는 숫자를 의미
#100,-100등
def pprint(value):
print('value:',value,sep='',end=',')
print('type:',type(value),sep='')
a=100
pprint(a)
#파이썬 3에서는 정수 / 정수 = 실수 이다(파이썬 2은 정수 / 정수 = 정수 이다).
b= 5/2
pprint(b)
#int()함수 : 정수로 변환하는 함수-소수점 이하를 버린다
c=int(b)
pprint(c)
'''
※정수는 10진수 이외에도 2진수, 8진수, 16진... | [
"noreply@github.com"
] | HeoUk.noreply@github.com |
86c1baeaad6ef264bb34f17abd2e37ff5e0cf09e | ee8d680c21761c04bb307975b64f6b7d6c6be007 | /main.py | c82cd639f32cf430b835dac2f556551885453e17 | [] | no_license | Pari555/Concatenation-Input-Type-Cast | 2f4dc1f3b8580bd56c356bc595a2057920b2fd88 | adb42911c1e7800158381fe4e8a8c95d9a60dea0 | refs/heads/master | 2023-02-24T19:05:11.624992 | 2021-01-21T23:35:03 | 2021-01-21T23:35:03 | 329,768,092 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 621 | py | print("Hello" + " World")
print("Hello" + " " + "World." + "Today is Thursday")
#this is concatenation of strings
print()
print("Tommorrow is Friday")
#If adding strings is "concatenaton"
#What is the + for integers called? Addition
# 5 + 4 = 9
print("5" + "4")
print(5 + 4)
FirstName = "Debanshi" #string
print("My ... | [
"123050@eesd.org"
] | 123050@eesd.org |
59f658230c9dd8484b67ab2baf9f5708c7cc1980 | a7a7f03c7b60bc7277a1b98982b0497bfd8542eb | /draw.py | 6f1e2e89719a23109111bb718ae041b9df513d46 | [] | no_license | cmohri/graphics_04 | a991262a23c7769f4c06d3fd2ed845f694429229 | 219b9ec14db0bfabf331e6dd38e6696dbe934fb7 | refs/heads/master | 2020-04-28T14:26:36.004199 | 2019-03-13T03:30:45 | 2019-03-13T03:30:45 | 175,338,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,458 | py | from display import *
from matrix import *
def add_circle( points, cx, cy, cz, r, step):
# parametric equations for x and y
x0 = r+cx
y0 = cy
t = step
while t <= 1.0001:
x1 = r*math.cos(2*math.pi*t)+cx
y1 = r*math.sin(2*math.pi*t)+cy
add_edge(points, x0, y0, cz, x1... | [
"clara.mohri@gmail.com"
] | clara.mohri@gmail.com |
9c2094cf9d422a88ec4f26ae5d04d22f8a5b3625 | 28bf8e279fde1a72e52e3689c221f4d9ad7ee168 | /0x0A-python-inheritance/11-square.py | a05e3c9d222959a67dac3ccd669e9fef4c8c43f5 | [] | no_license | nicorotich/alx-higher_level_programming | f60ac74d3aaef53ef5206ffc7e622474991398bf | 14e5f3a5dea3ee48ae264f31b5e899308ec8d563 | refs/heads/main | 2023-06-30T10:36:10.576451 | 2021-08-08T12:13:51 | 2021-08-08T12:13:51 | 361,627,722 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 482 | py | #!/usr/bin/python3
# 11-square.py
# Brennan D Baraban <375@holbertonschool.com>
"""Defines a Rectangle subclass Square."""
Rectangle = __import__('9-rectangle').Rectangle
class Square(Rectangle):
"""Represent a square."""
def __init__(self, size):
"""Initialize a new square.
Args:
... | [
"nicholaskrotich8@gmail.com"
] | nicholaskrotich8@gmail.com |
9698d3517322a3e343889b6e1a1ea6aab467f38e | 56f66cabf3793fb1b0658e6354ee31dc8f48fb86 | /Object_Detect/test01_image.py | 73f4eff2814341f0991a9b808184117db2d73e93 | [] | no_license | Jiwon0801/MachineLearning | 078028d42bd8651f7fb312ead7d3a6bf988e11f3 | c5b080420deb4f97ead57b32b29c596f6c0364f0 | refs/heads/master | 2020-05-07T21:30:07.985551 | 2019-04-29T04:13:08 | 2019-04-29T04:13:08 | 180,906,742 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,120 | py | import numpy as np
from PIL import Image
from detecter_image import get_detect_image
from detecter import Detecter
import cv2
# 테스트 이미지 파일 리스트
TEST_IMAGE_PATHS = [ './test_images/image6.jpg']
THRESHOLD = 0.3
detecter = Detecter()
detecter.setup('./frozen_inference_graph.pb', './mscoco_label_map.pbtxt')
... | [
"noreply@github.com"
] | Jiwon0801.noreply@github.com |
4db34577a189824be47add722f775cc3b21b0971 | 051802c6c1783dc337b6d064726f75a61abba476 | /backend/lead/models.py | f64dfd8effe368c9724e86743909d39bcab27208 | [] | no_license | cspartho/vue-django-crm | b0d5aa0b699e8efb8f6ca86e7fcc37171f2d343b | 977e05d5f583df2339ed8aaa3e18bcf61d58ad12 | refs/heads/main | 2023-07-07T03:05:43.736204 | 2021-08-12T14:18:32 | 2021-08-12T14:18:32 | 395,342,008 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,494 | py | from django.contrib.auth.models import User
from django.db import models
from team.models import Team
class Lead(models.Model):
NEW = 'new'
CONTACTED='contacted'
INPROGRESS = 'inprogress'
LOST = 'lost'
WON = 'won'
CHOICES_STATUS=(
(NEW,'New'),
(CONTACTED,'Contacted'),
(I... | [
"cspartho19@gmail.com"
] | cspartho19@gmail.com |
8a3441b439ae0c781ace3ba8281fe64a57450d67 | b550eda62179ffd8e49a59df7f8a30163140204f | /backend/openshift-old/services/user/service/model/user.py | 72451f8834453939723096891846cc39a7ccf1a3 | [
"Apache-2.0"
] | permissive | bgoesswe/openeo-repeatability | 6222fb235b70fda9da998b63fec92c0e5ac07169 | 087b9965e710d16cd6f29cb25e2cb94e443c2b30 | refs/heads/master | 2022-12-11T03:43:35.365574 | 2018-08-07T20:02:02 | 2018-08-07T20:02:02 | 139,158,921 | 0 | 1 | null | 2022-12-08T02:15:15 | 2018-06-29T14:27:34 | Python | UTF-8 | Python | false | false | 2,121 | py | ''' Model of User '''
import jwt
import datetime
from flask import current_app
from service import DB, BCRYPT
class User(DB.Model):
__tablename__ = "users"
id = DB.Column(DB.Integer, primary_key=True, autoincrement=True) # Umbennen in uid
username = DB.Column(DB.String(128), unique=True, nullable=False)
... | [
"bernhard.goesswein@geo.tuwien.ac.at"
] | bernhard.goesswein@geo.tuwien.ac.at |
c4be35002664253e83bad83bee500cc207fa909c | e4700f3ff598b997bf0ea35bcdb76b00c530c994 | /tmp.py | d616e22344314282bffb61071d044da898ac2eef | [] | no_license | nikkibisarya/therapysummarization | 64d056683454289561a45b6e5e1d88f5e3f78dae | 203b5a06577456d68d3022aa94d9476e0d352e18 | refs/heads/master | 2020-03-16T23:23:11.698069 | 2019-11-05T18:08:54 | 2019-11-05T18:08:54 | 133,075,146 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 407 | py |
import numpy as np
import matplotlib.pyplot as plt
loss = [1.0761, 0.8476, 0.7516, 0.6956, 0.6562, 0.6243, 0.5985, 0.5765, 0.5586, 0.5427, 0.5315, 0.5169, 0.5089, 0.4994,
0.4923, 0.4866, 0.4806, 0.4763, 0.4708, 0.4707]
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'... | [
"me@andrewszot.com"
] | me@andrewszot.com |
0152bca3423e36a8ff5ad25c2f7ce46e5acea2ed | bd1ed744bd408221445231a8838807fe31df5c54 | /func_reverse.py | 1421097cc08e4eaf0b7ab60c464b799646b79887 | [] | no_license | PhoebeCooney/CA116 | c7bb95e8e75832016be46d7b603883bbbed269a6 | 157311fbe3c57dc760c4a87618cdc6efb7be2eef | refs/heads/master | 2021-01-15T19:06:35.353483 | 2017-08-17T14:50:42 | 2017-08-17T14:50:42 | 99,807,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 339 | py | #import func_reverse
def swap(a, i ,j):
tmp = a[j]
a[j] = a[i]
a[i] = tmp
def reverse(a):
i = 0
while i < len(a)/2:
swap (a, i, len(a) - i - 1)
i += 1
a = [4, 3, 1, 2]
def main():
swap(a, 2, 3)
print a # [4, 3, 2, 1]
reverse(a)
print a # [1, 2, 3, 4]
if __name__ == "__... | [
"noreply@github.com"
] | PhoebeCooney.noreply@github.com |
d08e77c86c0263b332867904a5f7d5d164c1166e | 61b12137d849283aa057e11691e70fe846dcc136 | /skeleton.py | 57e5f26c824dedafa2cfa680174d948230923f2a | [
"MIT"
] | permissive | PrajitR/franklin | 00f396d282b0f3de08bc433cf64686394c60c15a | bbd4b81eec7ef70b42dd5d9fff1bf4c887f92e25 | refs/heads/master | 2020-05-29T17:28:25.015989 | 2014-05-20T02:27:18 | 2014-05-20T02:27:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,715 | py | import sys
import json
import os
import fnmatch
import itertools
from collections import defaultdict
def generate_structure (root_dir=os.getcwd()):
check_ignore = check_in_gitignore(get_gitignore())
struc = defaultdict(lambda: {})
for dirpath, dirnames, filenames in os.walk(root_dir):
if not valid_dir(dirpat... | [
"ramprajit@gmail.com"
] | ramprajit@gmail.com |
a54e6ee53269fe07a76bb0cdfd2d888cd08d3167 | ede3dcfe6093a6c726949832ca5be6d3883c5945 | /Milestone2/hogwild2/tests/test_svm.py | 70a28cc4d2f8200d5f3318a7e6e38dd310f2069f | [] | no_license | JustineWeb/project_systems | 26cb5236ecbbe79fdae51fd7dc1c3e7bc93e05cb | c579d2a749bfab79bbcdd2a9a46479a39401bb08 | refs/heads/master | 2022-01-06T22:45:14.463467 | 2019-05-16T12:06:14 | 2019-05-16T12:06:14 | 177,611,127 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 803 | py | from hogwild.svm import SVM
mock_data = [{1: 0.1, 2: 0.2},
{1: 0.2, 4: 0.9},
{3: 0.9, 8: 1},
{4: 0.4, 5: 0.7}]
mock_labels = [1, -1, 1, -1]
mock_delta_w = {1: 0.01, 2: 0.02, 3: 0.03, 4: 0.04, 5: 0.05, 6: 0, 7: 0, 8: 0.08}
def test_fit():
svm = SVM(1, 1e-5, 9)
expected_... | [
"alexis.mermet@epfl.ch"
] | alexis.mermet@epfl.ch |
12f5a26fff930d6da4d651c4f4dd72d554d44fc2 | b40fe0bd5f7678926baabdff48df9cff8ec673b6 | /lzyServer/manage.py | c78694823ca24da087e46e4630fb555c6131b801 | [] | no_license | huangzhongkai/lzy | 9f3c413c68b3d57677c06c2f588289d2b2889577 | f204294785589173cd11b6363c68590a8fc24dff | refs/heads/master | 2021-10-26T00:45:31.699647 | 2019-04-09T05:19:42 | 2019-04-09T05:19:42 | 79,820,602 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lzyServer.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
"huangzhongkai@huangzhongkaideMacBook-Pro.local"
] | huangzhongkai@huangzhongkaideMacBook-Pro.local |
7a2bcfd46f619cc050057c89f3a061ec7cdc19bb | 496e7fed497a88b93d428b6c1163399074dc9f3b | /post/forms.py | d62418ed576834090fa5dc932fabecce52cac546 | [] | no_license | tomaszwozniak/blog | e181b25899fffe7127f071b7065367267dd71fd1 | 12be9e620ba7a08aef8356cc0d9c7beec2632895 | refs/heads/master | 2016-09-16T01:33:45.555815 | 2015-09-03T19:43:00 | 2015-09-03T19:43:00 | 41,756,901 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | from django import forms
from post.models import Post, Comment
class PostForm(forms.ModelForm):
class Meta:
model = Post
exclude = ('views',)
class CommentForm(forms.ModelForm):
class Meta:
model = Comment
fields = ('full_name', 'value')
exclude = ('post', )
def... | [
"tomaszwozniak.wzm@gmail.com"
] | tomaszwozniak.wzm@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.